passo_mobile_app/lib/model/passo/property_assessment_edit.dart

110 lines
3.9 KiB
Dart
Raw Normal View History

2023-09-01 03:22:48 +00:00
// To parse this JSON data, do
//
// final propertyAssessment = propertyAssessmentFromJson(jsonString);
import 'package:meta/meta.dart';
import 'dart:convert';
PropertyAssessmentEdit propertyAssessmentFromJson(String str) =>
PropertyAssessmentEdit.fromJson(json.decode(str));
String propertyAssessmentToJson(PropertyAssessmentEdit data) =>
json.encode(data.toJson());
class PropertyAssessmentEdit {
final int? id;
final int? bldgapprDetailsId;
final String? actualUse;
final String? marketValue;
final String? assessmentLevel;
final String? assessedValue;
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 String? memoranda;
final String? swornstatementNo;
final DateTime? dateReceived;
final DateTime? entryDateAssessment;
final String? entryDateBy;
PropertyAssessmentEdit({
this.id,
this.bldgapprDetailsId,
this.actualUse,
this.marketValue,
this.assessmentLevel,
this.assessedValue,
this.taxable,
this.exempt,
this.qtr,
this.yr,
this.appraisedbyName,
this.appraisedbyDate,
this.recommendapprName,
this.recommendapprDate,
this.approvedbyName,
this.memoranda,
this.swornstatementNo,
this.dateReceived,
this.entryDateAssessment,
this.entryDateBy,
});
factory PropertyAssessmentEdit.fromJson(Map<String, dynamic> json) =>
PropertyAssessmentEdit(
id: json["id"],
bldgapprDetailsId: json["bldgappr_details_id"],
actualUse: json["actual_use"],
marketValue: json["market_value"],
assessmentLevel: json["assessment_level"],
assessedValue: json["assessed_value"],
taxable: json["taxable"],
exempt: json["exempt"],
qtr: json["qtr"],
yr: json["yr"],
appraisedbyName: json["appraisedby_name"],
appraisedbyDate: DateTime.parse(json["appraisedby_date"]),
recommendapprName: json["recommendappr_name"],
recommendapprDate: DateTime.parse(json["recommendappr_date"]),
approvedbyName: json["approvedby_name"],
memoranda: json["memoranda"],
swornstatementNo: json["swornstatement_no"],
dateReceived: DateTime.parse(json["date_received"]),
entryDateAssessment: DateTime.parse(json["entry_date_assessment"]),
entryDateBy: json["entry_date_by"],
);
Map<String, dynamic> toJson() => {
"id": id,
"bldgappr_details_id": bldgapprDetailsId,
"actual_use": actualUse,
"market_value": marketValue,
"assessment_level": assessmentLevel,
"assessed_value": assessedValue,
"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,
"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,
};
}