This commit is contained in:
bossanyit 2023-05-08 19:42:08 +02:00
parent 16603f00bd
commit 928396112a
3 changed files with 6 additions and 3 deletions

View File

@ -1,8 +1,8 @@
Workout Test and Diet 4 You Common Util Functions Workout Test and Diet 4 You Common Util Functions
### Version 1.0.26 ### Version 1.0.27
- no more webapi - customer_membership end_date
### Version 1.0.25 ### Version 1.0.25

View File

@ -4,17 +4,20 @@ class CustomerMembership {
late int membershipId; late int membershipId;
int? customerId; int? customerId;
DateTime? startDate; DateTime? startDate;
DateTime? endDate;
CustomerMembership.fromJson(Map json) { CustomerMembership.fromJson(Map json) {
membershipId = json['membershipId']; membershipId = json['membershipId'];
customerId = json['customerId'] ?? 0; customerId = json['customerId'] ?? 0;
startDate = json['startDate'] == null ? null : DateTime.parse(json['startDate']); startDate = json['startDate'] == null ? null : DateTime.parse(json['startDate']);
endDate = json['endDate'] == null ? null : DateTime.parse(json['endDate']);
} }
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() => {
"membershipId": membershipId, "membershipId": membershipId,
"customerId": customerId ?? 0, "customerId": customerId ?? 0,
"startDate": startDate == null ? "" : DateFormat('yyyy-MM-dd HH:mm:ss').format(startDate!), "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 @override

View File

@ -1,6 +1,6 @@
name: workouttest_util name: workouttest_util
description: Workout Test app and web functions. description: Workout Test app and web functions.
version: 1.0.27 version: 1.0.28
environment: environment:
sdk: ">=2.18.6 <3.0.0" sdk: ">=2.18.6 <3.0.0"