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/adress_model.dart

61 lines
1.3 KiB

class AddressModel {
3 years ago
int? id;
String? name;
String? tel;
int? location;
String? locationName;
String? addressDetail;
int? isDefault;
String? province;
String? city;
String? district;
3 years ago
AddressModel({
this.id,
this.name,
this.tel,
this.location,
this.locationName,
this.addressDetail,
this.isDefault,
this.province = '',
this.city = '',
this.district = '',
});
AddressModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
tel = json['tel'];
location = json['location'];
locationName = json['locationName'];
addressDetail = json['addressDetail'];
isDefault = json['isDefault'];
}
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;
data['location'] = this.location;
data['locationName'] = this.locationName;
data['addressDetail'] = this.addressDetail;
data['isDefault'] = this.isDefault;
return data;
}
factory AddressModel.empty() {
3 years ago
return AddressModel(
id: null,
name: '',
tel: '',
location: null,
locationName: '',
addressDetail: '',
isDefault: null);
}
3 years ago
}