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.
38 lines
1023 B
38 lines
1023 B
4 years ago
|
import 'package:flustars/flustars.dart';
|
||
|
|
||
|
class HouseModel {
|
||
|
int id;
|
||
|
String roomName;
|
||
|
int status;
|
||
|
String effectiveTimeStart;
|
||
|
String effectiveTimeEnd;
|
||
|
|
||
|
DateTime get effectiveStartDate => DateUtil.getDateTime(effectiveTimeStart);
|
||
|
DateTime get effectiveEndDate => DateUtil.getDateTime(effectiveTimeEnd);
|
||
|
|
||
|
HouseModel(
|
||
|
{this.id,
|
||
|
this.roomName,
|
||
|
this.status,
|
||
|
this.effectiveTimeStart,
|
||
|
this.effectiveTimeEnd});
|
||
|
|
||
|
HouseModel.fromJson(Map<String, dynamic> json) {
|
||
|
id = json['id'];
|
||
|
roomName = json['roomName'];
|
||
|
status = json['status'];
|
||
|
effectiveTimeStart = json['effectiveTimeStart'];
|
||
|
effectiveTimeEnd = json['effectiveTimeEnd'];
|
||
|
}
|
||
|
|
||
|
Map<String, dynamic> toJson() {
|
||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||
|
data['id'] = this.id;
|
||
|
data['roomName'] = this.roomName;
|
||
|
data['status'] = this.status;
|
||
|
data['effectiveTimeStart'] = this.effectiveTimeStart;
|
||
|
data['effectiveTimeEnd'] = this.effectiveTimeEnd;
|
||
|
return data;
|
||
|
}
|
||
|
}
|