This commit is contained in:
Felipe
2024-10-25 21:35:21 -05:00
parent d575ca9244
commit 721111ea31
7 changed files with 35 additions and 55 deletions
@@ -5,7 +5,8 @@ class FirebaseServiceRepository {
final serviceCollection = FirebaseFirestore.instance.collection('services');
Future<String> createService(ServiceEntity entity) async {
DocumentReference<Map<String, dynamic>> docRef = await serviceCollection.add(entity.toDocument());
DocumentReference<Map<String, dynamic>> docRef =
await serviceCollection.add(entity.toDocument());
return docRef.id;
}
@@ -79,8 +80,7 @@ class FirebaseServiceRepository {
.toList());
}
Stream<List<ServiceEntity>> getPendingServicesForProfessional(
String professionalId) {
Stream<List<ServiceEntity>> getPendingServicesForProfessional(String professionalId) {
return serviceCollection
.where('professional_id', isEqualTo: professionalId)
.where('status', whereIn: [0])