antes de agregar el id
This commit is contained in:
@@ -38,6 +38,17 @@ class FirebaseServiceRepository {
|
||||
.toList());
|
||||
}
|
||||
|
||||
Stream<List<ServiceEntity>> getServicesForProfessional(
|
||||
String professionalId) {
|
||||
return serviceCollection
|
||||
.where('professional_id', isEqualTo: professionalId)
|
||||
.where('status', whereIn: [0, 1, 2])
|
||||
.snapshots()
|
||||
.map((querySnapshot) => querySnapshot.docs
|
||||
.map((doc) => ServiceEntity.fromDocument(doc.data()))
|
||||
.toList());
|
||||
}
|
||||
|
||||
Stream<List<ServiceEntity>> getServicesHistoryForUser(String userId) {
|
||||
return serviceCollection
|
||||
.where('user_id', isEqualTo: userId)
|
||||
@@ -47,4 +58,15 @@ class FirebaseServiceRepository {
|
||||
.map((doc) => ServiceEntity.fromDocument(doc.data()))
|
||||
.toList());
|
||||
}
|
||||
|
||||
Stream<List<ServiceEntity>> getServicesHistoryForProfessional(
|
||||
String professionalId) {
|
||||
return serviceCollection
|
||||
.where('professional_id', isEqualTo: professionalId)
|
||||
.where('status', whereIn: [3, 4])
|
||||
.snapshots()
|
||||
.map((querySnapshot) => querySnapshot.docs
|
||||
.map((doc) => ServiceEntity.fromDocument(doc.data()))
|
||||
.toList());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user