scored true
This commit is contained in:
@@ -68,6 +68,29 @@ class FirebaseServiceRepository {
|
||||
.map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id))
|
||||
.toList());
|
||||
}
|
||||
|
||||
// actualizar professionalScored a true
|
||||
|
||||
Future<void> setProfessionalScored(String serviceId) {
|
||||
return serviceCollection
|
||||
.doc(serviceId)
|
||||
.update({'professional_scored': true});
|
||||
}
|
||||
|
||||
Future<void> setUserScored(String serviceId) {
|
||||
return serviceCollection.doc(serviceId).update({'user_scored': true});
|
||||
}
|
||||
|
||||
// TODO: NEW
|
||||
Stream<List<ServiceEntity>> getServicesByDay(String day) {
|
||||
return serviceCollection
|
||||
.where('day', isEqualTo: day)
|
||||
.where('status', whereIn: [0, 1, 2, 3])
|
||||
.snapshots()
|
||||
.map((querySnapshot) => querySnapshot.docs
|
||||
.map((doc) => ServiceEntity.fromDocument(doc.data(), doc.id))
|
||||
.toList());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user