125 lines
4.5 KiB
Dart
125 lines
4.5 KiB
Dart
// To parse this JSON data, do
|
|
//
|
|
// final landExt = landExtFromJson(jsonString);
|
|
|
|
import 'dart:convert';
|
|
|
|
LandExt landExtFromJson(String str) => LandExt.fromJson(json.decode(str));
|
|
|
|
String landExtToJson(LandExt data) => json.encode(data.toJson());
|
|
|
|
class LandExt {
|
|
final int? id;
|
|
final int? landapprDetailsId;
|
|
final String? assessedById;
|
|
final String? assessedByName;
|
|
final DateTime? dateCreated;
|
|
final DateTime? dateModified;
|
|
final bool? taxable;
|
|
final bool? exempt;
|
|
final int? qtr;
|
|
final int? yr;
|
|
final String? appraisedbyName;
|
|
final DateTime? appraisedbyDate;
|
|
final String? recommendapprName;
|
|
final DateTime? recommendapprDate;
|
|
final String? approvedbyName;
|
|
final DateTime? approvedbyDate;
|
|
final String? memoranda;
|
|
final String? swornstatementNo;
|
|
final DateTime? dateReceived;
|
|
final DateTime? entryDateAssessment;
|
|
final String? entryDateBy;
|
|
|
|
LandExt({
|
|
this.id,
|
|
this.landapprDetailsId,
|
|
this.assessedById,
|
|
this.assessedByName,
|
|
this.dateCreated,
|
|
this.dateModified,
|
|
this.taxable,
|
|
this.exempt,
|
|
this.qtr,
|
|
this.yr,
|
|
this.appraisedbyName,
|
|
this.appraisedbyDate,
|
|
this.recommendapprName,
|
|
this.recommendapprDate,
|
|
this.approvedbyName,
|
|
this.approvedbyDate,
|
|
this.memoranda,
|
|
this.swornstatementNo,
|
|
this.dateReceived,
|
|
this.entryDateAssessment,
|
|
this.entryDateBy,
|
|
});
|
|
|
|
factory LandExt.fromJson(Map<String, dynamic> json) => LandExt(
|
|
id: json["id"],
|
|
landapprDetailsId: json["landappr_details_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"]),
|
|
taxable: json["taxable"],
|
|
exempt: json["exempt"],
|
|
qtr: json["qtr"],
|
|
yr: json["yr"],
|
|
appraisedbyName: json["appraisedby_name"],
|
|
appraisedbyDate: json["appraisedby_date"] == null
|
|
? null
|
|
: DateTime.parse(json["appraisedby_date"]),
|
|
recommendapprName: json["recommendappr_name"],
|
|
recommendapprDate: json["recommendappr_date"] == null
|
|
? null
|
|
: DateTime.parse(json["recommendappr_date"]),
|
|
approvedbyName: json["approvedby_name"],
|
|
approvedbyDate: json["approvedby_date"] == null
|
|
? null
|
|
: DateTime.parse(json["approvedby_date"]),
|
|
memoranda: json["memoranda"],
|
|
swornstatementNo: json["swornstatement_no"],
|
|
dateReceived: json["date_received"] == null
|
|
? null
|
|
: DateTime.parse(json["date_received"]),
|
|
entryDateAssessment: json["entry_date_assessment"] == null
|
|
? null
|
|
: DateTime.parse(json["entry_date_assessment"]),
|
|
entryDateBy: json["entry_date_by"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"id": id,
|
|
"landappr_details_id": landapprDetailsId,
|
|
"assessed_by_id": assessedById,
|
|
"assessed_by_name": assessedByName,
|
|
"date_created": dateCreated?.toIso8601String(),
|
|
"date_modified": dateModified?.toIso8601String(),
|
|
"taxable": taxable,
|
|
"exempt": exempt,
|
|
"qtr": qtr,
|
|
"yr": yr,
|
|
"appraisedby_name": appraisedbyName,
|
|
"appraisedby_date":
|
|
"${appraisedbyDate!.year.toString().padLeft(4, '0')}-${appraisedbyDate!.month.toString().padLeft(2, '0')}-${appraisedbyDate!.day.toString().padLeft(2, '0')}",
|
|
"recommendappr_name": recommendapprName,
|
|
"recommendappr_date":
|
|
"${recommendapprDate!.year.toString().padLeft(4, '0')}-${recommendapprDate!.month.toString().padLeft(2, '0')}-${recommendapprDate!.day.toString().padLeft(2, '0')}",
|
|
"approvedby_name": approvedbyName,
|
|
"approvedby_date":
|
|
"${approvedbyDate!.year.toString().padLeft(4, '0')}-${approvedbyDate!.month.toString().padLeft(2, '0')}-${approvedbyDate!.day.toString().padLeft(2, '0')}",
|
|
"memoranda": memoranda,
|
|
"swornstatement_no": swornstatementNo,
|
|
"date_received":
|
|
"${dateReceived!.year.toString().padLeft(4, '0')}-${dateReceived!.month.toString().padLeft(2, '0')}-${dateReceived!.day.toString().padLeft(2, '0')}",
|
|
"entry_date_assessment":
|
|
"${entryDateAssessment!.year.toString().padLeft(4, '0')}-${entryDateAssessment!.month.toString().padLeft(2, '0')}-${entryDateAssessment!.day.toString().padLeft(2, '0')}",
|
|
"entry_date_by": entryDateBy,
|
|
};
|
|
}
|