toMap method
Implementation
Map<String, dynamic> toMap() => <String, dynamic>{
"id": id,
"customerName": customerName,
"customerPhoneNumber": customerPhoneNumber,
"price": price,
"startDate": startDate?.toIso8601String(),
"expiryDate": expiryDate?.toIso8601String(),
"dailyEntryLimit": dailyEntryLimit,
"officeHoursOnly": officeHoursOnly,
"addTags": addTags == null ? null : List<dynamic>.from(addTags!.map((int x) => x)),
"removeTags": removeTags == null ? null : List<dynamic>.from(removeTags!.map((int x) => x)),
if (detail1 != null) "detail1": detail1,
if (detail2 != null) "detail2": detail2,
if (tags != null) "tags": List<dynamic>.from(tags!.map((int x) => x)),
if (adminUserIds != null) "adminUserIds": List<dynamic>.from(adminUserIds!.map((String x) => x)),
if (addAdminUserIds != null) "addAdminUserIds": List<dynamic>.from(addAdminUserIds!.map((String x) => x)),
if (removeAdminUserIds != null) "removeAdminUserIds": List<dynamic>.from(removeAdminUserIds!.map((String x) => x)),
};