You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aku_new_community/lib/model/user/car_parking_model.dart

29 lines
757 B

import 'package:flustars/flustars.dart';
class CarParkingModel {
String code;
int type;
String effectiveTimeEnd;
DateTime get effectiveDate => DateUtil.getDateTime(effectiveTimeEnd);
bool get outdated {
DateTime now = DateTime.now();
return effectiveDate.isAfter(now);
}
CarParkingModel({this.code, this.type, this.effectiveTimeEnd});
CarParkingModel.fromJson(Map<String, dynamic> json) {
code = json['code'];
type = json['type'];
effectiveTimeEnd = json['effectiveTimeEnd'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['code'] = this.code;
data['type'] = this.type;
data['effectiveTimeEnd'] = this.effectiveTimeEnd;
return data;
}
}