parent
6e5326151a
commit
5654dc45b8
@ -0,0 +1,63 @@
|
||||
class CommitteeItemModel {
|
||||
int id;
|
||||
int positionId;
|
||||
String name;
|
||||
int sexId;
|
||||
int age;
|
||||
int educationId;
|
||||
String roomName;
|
||||
String profession;
|
||||
String roomNumber;
|
||||
int unitNo;
|
||||
int estateNo;
|
||||
|
||||
String get sexValue {
|
||||
if (sexId == 0 || sexId == null) return '未设置';
|
||||
if (sexId == 1) return '男';
|
||||
if (sexId == 2) return '女';
|
||||
return '未设置';
|
||||
}
|
||||
|
||||
CommitteeItemModel(
|
||||
{this.id,
|
||||
this.positionId,
|
||||
this.name,
|
||||
this.sexId,
|
||||
this.age,
|
||||
this.educationId,
|
||||
this.roomName,
|
||||
this.profession,
|
||||
this.roomNumber,
|
||||
this.unitNo,
|
||||
this.estateNo});
|
||||
|
||||
CommitteeItemModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
positionId = json['positionId'];
|
||||
name = json['name'];
|
||||
sexId = json['sexId'];
|
||||
age = json['age'];
|
||||
educationId = json['educationId'];
|
||||
roomName = json['roomName'];
|
||||
profession = json['profession'];
|
||||
roomNumber = json['roomNumber'];
|
||||
unitNo = json['unitNo'];
|
||||
estateNo = json['estateNo'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['positionId'] = this.positionId;
|
||||
data['name'] = this.name;
|
||||
data['sexId'] = this.sexId;
|
||||
data['age'] = this.age;
|
||||
data['educationId'] = this.educationId;
|
||||
data['roomName'] = this.roomName;
|
||||
data['profession'] = this.profession;
|
||||
data['roomNumber'] = this.roomNumber;
|
||||
data['unitNo'] = this.unitNo;
|
||||
data['estateNo'] = this.estateNo;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
class BaseListModel {
|
||||
int pageCount;
|
||||
int rowCount;
|
||||
List<dynamic> tableList;
|
||||
BaseListModel({
|
||||
this.pageCount,
|
||||
this.rowCount,
|
||||
this.tableList,
|
||||
});
|
||||
BaseListModel.zero({
|
||||
this.pageCount = 0,
|
||||
this.rowCount = 0,
|
||||
this.tableList = const [],
|
||||
});
|
||||
|
||||
BaseListModel.err({
|
||||
this.pageCount = 0,
|
||||
this.rowCount = 0,
|
||||
this.tableList = const [],
|
||||
});
|
||||
|
||||
BaseListModel.fromJson(Map<String, dynamic> json) {
|
||||
pageCount = json['pageCount'] ?? 0;
|
||||
rowCount = json['rowCount'] ?? 0;
|
||||
tableList = json['tableList'] ?? [];
|
||||
}
|
||||
}
|
Loading…
Reference in new issue