class FireAgentCategoryModel {
  FireAgentCategoryModel(
      {this.id,
      this.createDate,
      this.amount,
      this.stockId,
      this.warehouseStructureId,
      this.batchNum,
      this.rfid,
      this.equipmentDetailId,
      this.equipmentDetail,
      this.warehouseId,
      this.qrCode,
      this.status,
      this.companyName,
      this.orgCode,
      this.departmentName,
      this.departmentOrgcode,
      this.img});

  dynamic id;
  dynamic createDate;
  dynamic amount;
  dynamic stockId;
  dynamic warehouseStructureId;
  dynamic batchNum;
  dynamic rfid;
  dynamic equipmentDetailId;
  EquipmentDetail equipmentDetail;
  dynamic warehouseId;
  dynamic qrCode;
  dynamic status;
  dynamic companyName;
  dynamic orgCode;
  dynamic departmentName;
  dynamic departmentOrgcode;
  dynamic img;
  factory FireAgentCategoryModel.fromJson(Map<String, dynamic> json) =>
      FireAgentCategoryModel(
        id: json["id"],
        createDate: json["createDate"],
        amount: json["amount"],
        stockId: json["stockId"],
        warehouseStructureId: json["warehouseStructureId"],
        batchNum: json["batchNum"],
        rfid: json["rfid"],
        equipmentDetailId: json["equipmentDetailId"],
        equipmentDetail: EquipmentDetail.fromJson(json["equipmentDetail"]),
        warehouseId: json["warehouseId"],
        qrCode: json["qrCode"],
        status: json["status"],
        companyName: json["companyName"],
        orgCode: json["orgCode"],
        departmentName: json["departmentName"],
        departmentOrgcode: json["departmentOrgcode"],
        img: json['img'],
      );

  Map<String, dynamic> toJson() => {
        "id": id,
        "createDate": createDate,
        "amount": amount,
        "stockId": stockId,
        "warehouseStructureId": warehouseStructureId,
        "batchNum": batchNum,
        "rfid": rfid,
        "equipmentDetailId": equipmentDetailId,
        "equipmentDetail": equipmentDetail.toJson(),
        "warehouseId": warehouseId,
        "qrCode": qrCode,
        "status": status,
        "companyName": companyName,
        "orgCode": orgCode,
        "departmentName": departmentName,
        "departmentOrgcode": departmentOrgcode,
        "img": img,
      };
}

class EquipmentDetail {
  EquipmentDetail({
    this.id,
    this.createDate,
    this.name,
    this.code,
    this.equipmentId,
    this.equipment,
    this.categoryName,
    this.remark,
    this.creatorId,
    this.unitId,
    this.manufacturerId,
    this.manufacturerName,
    this.manufacturerInfo,
    this.standard,
    this.img,
    this.video,
    this.maintenanceCycle,
    this.updateDate,
    this.agent,
    this.brand,
    this.contractCode,
    this.productionDate,
    this.perfQuotaStr,
    this.expiryDate,
    this.priceInterregional,
    this.country,
    this.supplierId,
    this.certifications,
    this.instructionManual,
    this.equPropertyList,
    this.orgCode,
    this.companyName,
    this.departmentOrgcode,
    this.departmentName,
    this.equipmentDetailImport,
    this.unitName,
  });

  String id;
  dynamic createDate;
  String name;
  String code;
  dynamic equipmentId;
  dynamic equipment;
  String categoryName;
  dynamic remark;
  dynamic creatorId;
  dynamic unitId;
  dynamic manufacturerId;
  dynamic manufacturerName;
  dynamic manufacturerInfo;
  String standard;
  dynamic img;
  dynamic video;
  dynamic maintenanceCycle;
  dynamic updateDate;
  dynamic agent;
  String brand;
  dynamic contractCode;
  dynamic productionDate;
  dynamic perfQuotaStr;
  dynamic expiryDate;
  dynamic priceInterregional;
  dynamic country;
  dynamic supplierId;
  dynamic certifications;
  dynamic instructionManual;
  dynamic equPropertyList;
  dynamic orgCode;
  dynamic companyName;
  dynamic departmentOrgcode;
  dynamic departmentName;
  bool equipmentDetailImport;
  String unitName;

  factory EquipmentDetail.fromJson(Map<String, dynamic> json) =>
      EquipmentDetail(
        id: json["id"],
        createDate: json["createDate"],
        name: json["name"],
        code: json["code"],
        equipmentId: json["equipmentId"],
        equipment: json["equipment"],
        categoryName: json["categoryName"],
        remark: json["remark"],
        creatorId: json["creatorId"],
        unitId: json["unitId"],
        manufacturerId: json["manufacturerId"],
        manufacturerName: json["manufacturerName"],
        manufacturerInfo: json["manufacturerInfo"],
        standard: json["standard"],
        img: json["img"],
        video: json["video"],
        maintenanceCycle: json["maintenanceCycle"],
        updateDate: json["updateDate"],
        agent: json["agent"],
        brand: json["brand"],
        contractCode: json["contractCode"],
        productionDate: json["productionDate"],
        perfQuotaStr: json["perfQuotaStr"],
        expiryDate: json["expiryDate"],
        priceInterregional: json["priceInterregional"],
        country: json["country"],
        supplierId: json["supplierId"],
        certifications: json["certifications"],
        instructionManual: json["instructionManual"],
        equPropertyList: json["equPropertyList"],
        orgCode: json["orgCode"],
        companyName: json["companyName"],
        departmentOrgcode: json["departmentOrgcode"],
        departmentName: json["departmentName"],
        equipmentDetailImport: json["import"],
        unitName: json['unitName'],
      );

  Map<String, dynamic> toJson() => {
        "id": id,
        "createDate": createDate,
        "name": name,
        "code": code,
        "equipmentId": equipmentId,
        "equipment": equipment,
        "categoryName": categoryName,
        "remark": remark,
        "creatorId": creatorId,
        "unitId": unitId,
        "manufacturerId": manufacturerId,
        "manufacturerName": manufacturerName,
        "manufacturerInfo": manufacturerInfo,
        "standard": standard,
        "img": img,
        "video": video,
        "maintenanceCycle": maintenanceCycle,
        "updateDate": updateDate,
        "agent": agent,
        "brand": brand,
        "contractCode": contractCode,
        "productionDate": productionDate,
        "perfQuotaStr": perfQuotaStr,
        "expiryDate": expiryDate,
        "priceInterregional": priceInterregional,
        "country": country,
        "supplierId": supplierId,
        "certifications": certifications,
        "instructionManual": instructionManual,
        "equPropertyList": equPropertyList,
        "orgCode": orgCode,
        "companyName": companyName,
        "departmentOrgcode": departmentOrgcode,
        "departmentName": departmentName,
        "import": equipmentDetailImport,
        "unitName": unitName,
      };
}
