passo_mobile_app/lib/model/passo/bldg_loc.dart

106 lines
3.1 KiB
Dart
Raw Normal View History

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 String? dateCreated;
final String? dateModified;
2023-09-01 03:22:48 +00:00
final dynamic street;
final dynamic barangay;
final dynamic municipality;
final dynamic province;
final String? genCode;
2023-09-01 03:22:48 +00:00
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,
this.genCode,
2023-07-28 02:35:36 +00:00
});
BldgLoc copy(
{int? id,
int? bldgapprDetailsId,
String? assessedById,
String? assessedByName,
String? dateCreated,
String? dateModified,
dynamic street,
dynamic barangay,
dynamic municipality,
dynamic province,
String? genCode}) {
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,
genCode: genCode ?? this.genCode);
}
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"],
dateModified: json["date_modified"],
2023-07-28 02:35:36 +00:00
street: json["street"],
barangay: json["barangay"],
municipality: json["municipality"],
province: json["province"],
genCode: json["gen_code"],
);
factory BldgLoc.fromJson2(Map<String, dynamic> json) => BldgLoc(
id: json["id"],
bldgapprDetailsId: json["bldgapprDetailsId"],
assessedById: json["assessedById"],
assessedByName: json["assessedByName"],
dateCreated: json["dateCreated"],
dateModified: json["dateModified"],
street: json["street"],
barangay: json["barangay"],
municipality: json["municipality"],
province: json["province"],
genCode: json["gen_code"],
2023-07-28 02:35:36 +00:00
);
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,
"date_modified": dateModified,
2023-07-28 02:35:36 +00:00
"street": street,
"barangay": barangay,
"municipality": municipality,
"province": province,
"gen_code": genCode,
2023-07-28 02:35:36 +00:00
};
}