2023-07-28 02:35:36 +00:00
|
|
|
// To parse this JSON data, do
|
|
|
|
//
|
|
|
|
// final bldgLoc = bldgLocFromJson(jsonString);
|
|
|
|
|
|
|
|
import 'dart:convert';
|
|
|
|
|
|
|
|
BldgLoc bldgLocFromJson(String str) => BldgLoc.fromJson(json.decode(str));
|
|
|
|
|
|
|
|
String bldgLocToJson(BldgLoc data) => json.encode(data.toJson());
|
|
|
|
|
|
|
|
class BldgLoc {
|
2023-09-01 03:22:48 +00:00
|
|
|
final int? id;
|
|
|
|
final int? bldgapprDetailsId;
|
|
|
|
final String? assessedById;
|
|
|
|
final String? assessedByName;
|
|
|
|
final DateTime? dateCreated;
|
|
|
|
final DateTime? dateModified;
|
|
|
|
final dynamic street;
|
|
|
|
final dynamic barangay;
|
|
|
|
final dynamic municipality;
|
|
|
|
final dynamic province;
|
|
|
|
|
2023-07-28 02:35:36 +00:00
|
|
|
BldgLoc({
|
|
|
|
this.id,
|
|
|
|
this.bldgapprDetailsId,
|
2023-09-01 03:22:48 +00:00
|
|
|
this.assessedById,
|
|
|
|
this.assessedByName,
|
|
|
|
this.dateCreated,
|
|
|
|
this.dateModified,
|
2023-07-28 02:35:36 +00:00
|
|
|
this.street,
|
|
|
|
this.barangay,
|
|
|
|
this.municipality,
|
|
|
|
this.province,
|
|
|
|
});
|
|
|
|
|
2023-11-10 08:38:47 +00:00
|
|
|
BldgLoc copy({
|
|
|
|
int? id,
|
|
|
|
int? bldgapprDetailsId,
|
|
|
|
String? assessedById,
|
|
|
|
String? assessedByName,
|
|
|
|
DateTime? dateCreated,
|
|
|
|
DateTime? dateModified,
|
|
|
|
dynamic street,
|
|
|
|
dynamic barangay,
|
|
|
|
dynamic municipality,
|
|
|
|
dynamic province,
|
|
|
|
}) {
|
|
|
|
return BldgLoc(
|
|
|
|
id: id ?? this.id,
|
|
|
|
bldgapprDetailsId: bldgapprDetailsId ?? this.bldgapprDetailsId,
|
|
|
|
assessedById: assessedById ?? this.assessedById,
|
|
|
|
assessedByName: assessedByName ?? this.assessedByName,
|
|
|
|
dateCreated: dateCreated ?? this.dateCreated,
|
|
|
|
dateModified: dateModified ?? this.dateModified,
|
|
|
|
street: street ?? this.street,
|
|
|
|
barangay: barangay ?? this.barangay,
|
|
|
|
municipality: municipality ?? this.municipality,
|
|
|
|
province: province ?? this.province);
|
|
|
|
}
|
|
|
|
|
2023-07-28 02:35:36 +00:00
|
|
|
factory BldgLoc.fromJson(Map<String, dynamic> json) => BldgLoc(
|
|
|
|
id: json["id"],
|
|
|
|
bldgapprDetailsId: json["bldgappr_details_id"],
|
2023-09-01 03:22:48 +00:00
|
|
|
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"]),
|
2023-07-28 02:35:36 +00:00
|
|
|
street: json["street"],
|
|
|
|
barangay: json["barangay"],
|
|
|
|
municipality: json["municipality"],
|
|
|
|
province: json["province"],
|
|
|
|
);
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
|
|
"id": id,
|
|
|
|
"bldgappr_details_id": bldgapprDetailsId,
|
2023-09-01 03:22:48 +00:00
|
|
|
"assessed_by_id": assessedById,
|
|
|
|
"assessed_by_name": assessedByName,
|
|
|
|
"date_created": dateCreated?.toIso8601String(),
|
|
|
|
"date_modified": dateModified?.toIso8601String(),
|
2023-07-28 02:35:36 +00:00
|
|
|
"street": street,
|
|
|
|
"barangay": barangay,
|
|
|
|
"municipality": municipality,
|
|
|
|
"province": province,
|
|
|
|
};
|
|
|
|
}
|