// 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 {
  final int? id;
  final int? bldgapprDetailsId;
  final String? assessedById;
  final String? assessedByName;
  final String? dateCreated;
  final String? dateModified;
  final dynamic street;
  final dynamic barangay;
  final dynamic municipality;
  final dynamic province;
  final String? genCode;

  BldgLoc({
    this.id,
    this.bldgapprDetailsId,
    this.assessedById,
    this.assessedByName,
    this.dateCreated,
    this.dateModified,
    this.street,
    this.barangay,
    this.municipality,
    this.province,
    this.genCode,
  });

  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);
  }

  factory BldgLoc.fromJson(Map<String, dynamic> json) => BldgLoc(
        id: json["id"],
        bldgapprDetailsId: json["bldgappr_details_id"],
        assessedById: json["assessed_by_id"],
        assessedByName: json["assessed_by_name"],
        dateCreated: json["date_created"],
        dateModified: json["date_modified"],
        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"],
      );

  Map<String, dynamic> toJson() => {
        "id": id,
        "bldgappr_details_id": bldgapprDetailsId,
        "assessed_by_id": assessedById,
        "assessed_by_name": assessedByName,
        "date_created": dateCreated,
        "date_modified": dateModified,
        "street": street,
        "barangay": barangay,
        "municipality": municipality,
        "province": province,
        "gen_code": genCode,
      };
}
