parent
68b3236218
commit
86cfd241d3
@ -0,0 +1,51 @@
|
||||
class FixerItemModel {
|
||||
int id;
|
||||
String name;
|
||||
List<RepairmanVos> repairmanVos;
|
||||
|
||||
FixerItemModel({this.id, this.name, this.repairmanVos});
|
||||
|
||||
FixerItemModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
if (json['repairmanVos'] != null) {
|
||||
repairmanVos = new List<RepairmanVos>();
|
||||
json['repairmanVos'].forEach((v) {
|
||||
repairmanVos.add(new RepairmanVos.fromJson(v));
|
||||
});
|
||||
} else
|
||||
repairmanVos = [];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
if (this.repairmanVos != null) {
|
||||
data['repairmanVos'] = this.repairmanVos.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class RepairmanVos {
|
||||
int id;
|
||||
String name;
|
||||
String tel;
|
||||
|
||||
RepairmanVos({this.id, this.name, this.tel});
|
||||
|
||||
RepairmanVos.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
tel = json['tel'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['name'] = this.name;
|
||||
data['tel'] = this.tel;
|
||||
return data;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue