v1.0.27
This commit is contained in:
@@ -4,17 +4,20 @@ class CustomerMembership {
|
||||
late int membershipId;
|
||||
int? customerId;
|
||||
DateTime? startDate;
|
||||
DateTime? endDate;
|
||||
|
||||
CustomerMembership.fromJson(Map json) {
|
||||
membershipId = json['membershipId'];
|
||||
customerId = json['customerId'] ?? 0;
|
||||
startDate = json['startDate'] == null ? null : DateTime.parse(json['startDate']);
|
||||
endDate = json['endDate'] == null ? null : DateTime.parse(json['endDate']);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"membershipId": membershipId,
|
||||
"customerId": customerId ?? 0,
|
||||
"startDate": startDate == null ? "" : DateFormat('yyyy-MM-dd HH:mm:ss').format(startDate!),
|
||||
"endDate": startDate == null ? "" : DateFormat('yyyy-MM-dd HH:mm:ss').format(endDate!),
|
||||
};
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user