antes de agregar el id

This commit is contained in:
Felipe
2024-04-07 18:03:51 -05:00
parent bfe782e47e
commit 60547febb6
10 changed files with 751 additions and 19 deletions
@@ -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());
}
}