Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
restaurant_collection_contacts_isar_model.dart
Go to the documentation of this file.
1import 'package:isar/isar.dart';
2import '../../../../features/collections/data/models/res/res_collection_contact_model.dart';
3
4part 'restaurant_collection_contacts_isar_model.g.dart';
5
8 @Index(type: IndexType.value)
9 Id? id;
10
11 @Index(type: IndexType.value)
12 int? restaurantId;
13
14 List<CollectionContact>? collectionContacts;
15
17
19 required int restaurantId,
20 required List<ResCollectionContactModel> contacts,
21 }) {
25 .map((contact) => CollectionContact.fromModel(contact))
26 .toList();
27 }
28
29 List<ResCollectionContactModel>? toModel() {
30 return collectionContacts?.map((contact) => contact.toModel()).toList();
31 }
32}
33
34@embedded
35class CollectionContact {
36 int? id;
38
39 static CollectionContact fromModel(ResCollectionContactModel model) {
40 return CollectionContact()
41 ..id = model.id
42 ..reference = model.reference;
43 }
44
45 ResCollectionContactModel toModel() {
46 return ResCollectionContactModel(
47 id: id!,
49 );
50 }
51}
static RestaurantCollectionContactsIsarModel() RestaurantCollectionContactsIsarModel fromModel({ required int restaurantId, required List< ResCollectionContactModel > contacts, })
Index(type:IndexType.value) Id? id
Index(type:IndexType.value) int? restaurantId
final String type
final int restaurantId
class CollectionPaymentError extends CollectionsInformationState contacts
class Partner String
collection class RestaurantCollectionContactsIsarModel id
ResCollectionContactModel toModel()
static CollectionContact fromModel(ResCollectionContactModel model)
class SearchWeeklyCollectionsEvent extends WeeklyCollectionsEvent collection