workouttest_util/lib/model/customer_activity.dart
2023-02-10 19:48:58 +01:00

32 lines
740 B
Dart

// ignore: depend_on_referenced_packages
import 'package:intl/intl.dart';
class CustomerActivity {
late int activityId;
late int customerId;
late String type;
late DateTime? dateAdd;
bool? skipped;
CustomerActivity.fromJson(Map json) {
activityId = json['activityId'];
customerId = json['custoemrId'];
type = json['type'];
skipped = json['skipped'];
dateAdd = DateTime.parse(json['dateAdd']);
}
Map<String, dynamic> toJson() => {
'activityId': activityId,
'customerId': customerId,
'type': type,
'skipped': skipped,
"dateAdd": DateFormat('yyyy-MM-dd HH:mm:ss').format(dateAdd!),
};
@override
String toString() {
return toJson().toString();
}
}