207 lines
5.9 KiB
Dart
207 lines
5.9 KiB
Dart
// To parse this JSON data, do
|
|
//
|
|
// final propertyInfo = propertyInfoFromJson(jsonString);
|
|
|
|
import 'dart:convert';
|
|
|
|
PropertyInfo propertyInfoFromJson(String str) =>
|
|
PropertyInfo.fromJson(json.decode(str));
|
|
|
|
String propertyInfoToJson(PropertyInfo data) => json.encode(data.toJson());
|
|
|
|
class PropertyInfo {
|
|
final int? id;
|
|
final String? assessedById;
|
|
final String? assessedByName;
|
|
final String? dateCreated;
|
|
final String? dateModified;
|
|
final String? transCode;
|
|
final String? tdn;
|
|
final String? pin;
|
|
final String? fname;
|
|
final String? mname;
|
|
final String? lname;
|
|
final String? bday;
|
|
final String? address;
|
|
final String? telno;
|
|
final String? tin;
|
|
final String? adminUser;
|
|
final String? adminAddress;
|
|
final String? adminTelno;
|
|
final String? adminTin;
|
|
final String? faasType;
|
|
final String? genCode;
|
|
|
|
PropertyInfo({
|
|
this.id,
|
|
this.assessedById,
|
|
this.assessedByName,
|
|
this.dateCreated,
|
|
this.dateModified,
|
|
this.transCode,
|
|
this.tdn,
|
|
this.pin,
|
|
this.fname,
|
|
this.mname,
|
|
this.lname,
|
|
this.bday,
|
|
this.address,
|
|
this.telno,
|
|
this.tin,
|
|
this.adminUser,
|
|
this.adminAddress,
|
|
this.adminTelno,
|
|
this.adminTin,
|
|
this.faasType,
|
|
this.genCode,
|
|
});
|
|
|
|
PropertyInfo copy({
|
|
int? id,
|
|
String? assessedById,
|
|
String? assessedByName,
|
|
String? dateCreated,
|
|
String? dateModified,
|
|
String? transCode,
|
|
String? tdn,
|
|
String? pin,
|
|
String? owner,
|
|
String? address,
|
|
String? telno,
|
|
String? tin,
|
|
String? adminUser,
|
|
String? adminAddress,
|
|
String? adminTelno,
|
|
String? adminTin,
|
|
String? faasType,
|
|
String? genCode,
|
|
}) =>
|
|
PropertyInfo(
|
|
id: id ?? this.id,
|
|
assessedById: assessedById ?? this.assessedById,
|
|
assessedByName: assessedByName ?? this.assessedByName,
|
|
dateCreated: dateCreated ?? this.dateCreated,
|
|
dateModified: dateModified ?? this.dateModified,
|
|
transCode: transCode ?? this.transCode,
|
|
tdn: tdn ?? this.tdn,
|
|
pin: pin ?? this.pin,
|
|
fname: fname ?? this.fname,
|
|
mname: mname ?? this.mname,
|
|
lname: lname ?? this.lname,
|
|
bday: bday ?? this.bday,
|
|
address: address ?? this.address,
|
|
telno: telno ?? this.telno,
|
|
tin: tin ?? this.tin,
|
|
adminUser: adminUser ?? this.adminUser,
|
|
adminAddress: adminAddress ?? this.adminAddress,
|
|
adminTelno: adminTelno ?? this.adminTelno,
|
|
adminTin: adminTin ?? this.adminTin,
|
|
faasType: faasType ?? this.faasType,
|
|
genCode: genCode ?? this.genCode,
|
|
);
|
|
|
|
factory PropertyInfo.fromJson(Map<String, dynamic> json) => PropertyInfo(
|
|
id: json["id"],
|
|
assessedById: json["assessed_by_id"],
|
|
assessedByName: json["assessed_by_name"],
|
|
// dateCreated: json["date_created"] == null
|
|
// ? null
|
|
// : DateTime.parse(json["date_created"]),
|
|
// dateModified: json["date_modified"] == null
|
|
// ? null
|
|
// : DateTime.parse(json["date_modified"]),
|
|
transCode: json["trans_code"],
|
|
tdn: json["tdn"],
|
|
pin: json["pin"],
|
|
fname: json["fname"],
|
|
mname: json["mname"],
|
|
lname: json["lname"],
|
|
bday: json["bday"],
|
|
address: json["address"],
|
|
telno: json["telno"],
|
|
tin: json["tin"],
|
|
adminUser: json["admin_user"],
|
|
adminAddress: json["admin_address"],
|
|
adminTelno: json["admin_telno"],
|
|
adminTin: json["admin_tin"],
|
|
faasType: json["faas_type"],
|
|
genCode: json["gen_code"],
|
|
);
|
|
|
|
factory PropertyInfo.fromJson2(Map<String, dynamic> json) => PropertyInfo(
|
|
id: json["id"],
|
|
assessedById: json["assessedById"],
|
|
assessedByName: json["assessedByName"],
|
|
// dateCreated: json["date_created"] == null
|
|
// ? null
|
|
// : DateTime.parse(json["date_created"]),
|
|
// dateModified: json["date_modified"] == null
|
|
// ? null
|
|
// : DateTime.parse(json["date_modified"]),
|
|
transCode: json["transCode"],
|
|
tdn: json["tdn"],
|
|
pin: json["pin"],
|
|
fname: json["fname"],
|
|
mname: json["mname"],
|
|
lname: json["lname"],
|
|
bday: json["bday"],
|
|
address: json["address"],
|
|
|
|
telno: json["telno"],
|
|
tin: json["tin"],
|
|
adminUser: json["adminUser"],
|
|
adminAddress: json["adminAddress"],
|
|
adminTelno: json["adminTelno"],
|
|
adminTin: json["adminTin"],
|
|
faasType: json["faasType"],
|
|
genCode: json["genCode"],
|
|
);
|
|
|
|
factory PropertyInfo.fromMap(Map<String, dynamic> map) => PropertyInfo(
|
|
id: map["id"],
|
|
assessedById: map["assessedById"],
|
|
assessedByName: map["assessedByName"],
|
|
dateCreated: map["dateCreated"],
|
|
dateModified: map["dateModified"],
|
|
transCode: map["transCode"],
|
|
tdn: map["tdn"],
|
|
pin: map["pin"],
|
|
fname: map["fname"],
|
|
mname: map["mname"],
|
|
lname: map["lname"],
|
|
bday: map["bday"],
|
|
address: map["address"],
|
|
telno: map["telno"],
|
|
tin: map["tin"],
|
|
adminUser: map["adminUser"],
|
|
adminAddress: map["adminUser"],
|
|
adminTelno: map["adminTelno"],
|
|
adminTin: map["adminTin"],
|
|
faasType: map["faasType"],
|
|
genCode: map["genCode"]);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"id": id,
|
|
"assessed_by_id": assessedById,
|
|
"assessed_by_name": assessedByName,
|
|
"date_created": dateCreated,
|
|
"date_modified": dateModified,
|
|
"trans_code": transCode,
|
|
"tdn": tdn,
|
|
"pin": pin,
|
|
"fname": fname,
|
|
"mname": mname,
|
|
"lname": lname,
|
|
"bday": bday,
|
|
"address": address,
|
|
"telno": telno,
|
|
"tin": tin,
|
|
"admin_user": adminUser,
|
|
"admin_address": adminAddress,
|
|
"admin_telno": adminTelno,
|
|
"admin_tin": adminTin,
|
|
"faas_type": faasType,
|
|
"gen_code": genCode,
|
|
};
|
|
}
|