class RepairEquipmentRecordModel {
  String? equipmentName;
  String? createdBy;
  String? createdAt;
  List<EquipmentUpdateRecordVoOfRepairEquipmentRecordModel>?
      equipmentUpdateRecordVo;
  EquipmentServiceRecordVoOfRepairEquipmentRecordModel? equipmentServiceRecordVo;
  PollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel?
      pollingAndUpkeepRecoredVo;
  PointOfRepairEquipmentRecordModel? point;

  RepairEquipmentRecordModel({
    this.equipmentName,
    this.createdBy,
    this.createdAt,
    this.equipmentUpdateRecordVo,
    this.equipmentServiceRecordVo,
    this.pollingAndUpkeepRecoredVo,
    this.point,
  });

  RepairEquipmentRecordModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    equipmentName = map['equipmentName'];
    createdBy = map['createdBy'];
    createdAt = map['createdAt'];
    equipmentUpdateRecordVo =
        List<EquipmentUpdateRecordVoOfRepairEquipmentRecordModel>.from(
            (map["equipmentUpdateRecordVo"] ?? []).map((x) =>
                EquipmentUpdateRecordVoOfRepairEquipmentRecordModel.fromJson(
                    x)));
    equipmentServiceRecordVo =
        EquipmentServiceRecordVoOfRepairEquipmentRecordModel.fromJson(
            map["equipmentServiceRecordVo"] ?? {});
    pollingAndUpkeepRecoredVo =
        PollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel.fromJson(
            map["pollingAndUpkeepRecoredVo"] ?? {});
    point = PointOfRepairEquipmentRecordModel.fromJson(map["point"] ?? {});
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['equipmentName'] = this.equipmentName;
    json['createdBy'] = this.createdBy;
    json['createdAt'] = this.createdAt;
    json['equipmentUpdateRecordVo'] = List<dynamic>.from(
        (equipmentUpdateRecordVo ?? []).map((x) => x.toJson()));
    json['equipmentServiceRecordVo'] = this.equipmentServiceRecordVo!.toJson();
    json['pollingAndUpkeepRecoredVo'] = this.pollingAndUpkeepRecoredVo!.toJson();
    json['point'] = this.point!.toJson();

    return json;
  }
}

class EquipmentUpdateRecordVoOfRepairEquipmentRecordModel {
  String? name;
  String? number;
  String? category;
  dynamic type;
  String? status;
  dynamic productDate;
  dynamic productNumber;
  dynamic installDate;
  dynamic life;
  String? location;
  dynamic manager;
  String? routinginspectionName;
  String? maintenancecodeName;
  String? updateBy;
  String? updateAt;

  EquipmentUpdateRecordVoOfRepairEquipmentRecordModel({
    this.name,
    this.number,
    this.category,
    this.type,
    this.status,
    this.productDate,
    this.productNumber,
    this.installDate,
    this.life,
    this.location,
    this.manager,
    this.routinginspectionName,
    this.maintenancecodeName,
    this.updateBy,
    this.updateAt,
  });

  EquipmentUpdateRecordVoOfRepairEquipmentRecordModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    name = map['name'];
    number = map['number'];
    category = map['category'];
    type = map['type'];
    status = map['status'];
    productDate = map['productDate'];
    productNumber = map['productNumber'];
    installDate = map['installDate'];
    life = map['life'];
    location = map['location'];
    manager = map['manager'];
    routinginspectionName = map['routinginspectionName'];
    maintenancecodeName = map['maintenancecodeName'];
    updateBy = map['updateBy'];
    updateAt = map['updateAt'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['name'] = this.name;
    json['number'] = this.number;
    json['category'] = this.category;
    json['type'] = this.type;
    json['status'] = this.status;
    json['productDate'] = this.productDate;
    json['productNumber'] = this.productNumber;
    json['installDate'] = this.installDate;
    json['life'] = this.life;
    json['location'] = this.location;
    json['manager'] = this.manager;
    json['routinginspectionName'] = this.routinginspectionName;
    json['maintenancecodeName'] = this.maintenancecodeName;
    json['updateBy'] = this.updateBy;
    json['updateAt'] = this.updateAt;

    return json;
  }
}

class EquipmentServiceRecordVoOfRepairEquipmentRecordModel {
  List<String>? beforeImg;
  List<String>? afterImg;
  String? content;

  EquipmentServiceRecordVoOfRepairEquipmentRecordModel({
    this.beforeImg,
    this.afterImg,
    this.content,
  });

  EquipmentServiceRecordVoOfRepairEquipmentRecordModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    beforeImg = map['beforeImg']?.cast<String>();
    afterImg = map['afterImg']?.cast<String>();
    content = map['content'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['beforeImg'] = this.beforeImg;
    json['afterImg'] = this.afterImg;
    json['content'] = this.content;

    return json;
  }
}

class PollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel {
  String? name;
  String? cycleType;
  num? cycleNum;
  String? cycleName;
  List<OpreateRecordVoOfPollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel>?
      opreateRecordVo;
  List? photos;
  PollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel({
    this.name,
    this.cycleType,
    this.cycleNum,
    this.cycleName,
    this.opreateRecordVo,
    this.photos,
  });

  PollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    name = map['name'];
    cycleType = map['cycleType'];
    cycleNum = map['cycleNum'];
    cycleName = map['cycleName'];
    opreateRecordVo = List<
            OpreateRecordVoOfPollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel>.from(
        (map["opreateRecordVo"] ?? []).map((x) =>
            OpreateRecordVoOfPollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel
                .fromJson(x)));
    photos = map['photos'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['name'] = this.name;
    json['cycleType'] = this.cycleType;
    json['cycleNum'] = this.cycleNum;
    json['cycleName'] = this.cycleName;
    json['opreateRecordVo'] =
        List<dynamic>.from((opreateRecordVo ?? []).map((x) => x.toJson()));
    json['photos'] = this.photos;

    return json;
  }
}

class OpreateRecordVoOfPollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel {
  String? opreateName;
  String? type;
  List<OpreateContentOfOpreateRecordVoOfPollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel>?
      opreateContent;

  OpreateRecordVoOfPollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel({
    this.opreateName,
    this.type,
    this.opreateContent,
  });

  OpreateRecordVoOfPollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel.fromJson(
      json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    opreateName = map['opreateName'];
    type = map['type'];
    opreateContent = List<
            OpreateContentOfOpreateRecordVoOfPollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel>.from(
        (map["opreateContent"] ?? []).map((x) =>
            OpreateContentOfOpreateRecordVoOfPollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel
                .fromJson(x)));
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['opreateName'] = this.opreateName;
    json['type'] = this.type;
    json['opreateContent'] =
        List<dynamic>.from((opreateContent ?? []).map((x) => x.toJson()));

    return json;
  }
}

class OpreateContentOfOpreateRecordVoOfPollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel {
  String? opreateContent;
  String? status;

  OpreateContentOfOpreateRecordVoOfPollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel({
    this.opreateContent,
    this.status,
  });

  OpreateContentOfOpreateRecordVoOfPollingAndUpkeepRecoredVoOfRepairEquipmentRecordModel.fromJson(
      json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    opreateContent = map['opreateContent'];
    status = map['status'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['opreateContent'] = this.opreateContent;
    json['status'] = this.status;

    return json;
  }
}

class PointOfRepairEquipmentRecordModel {
  dynamic longitude;
  dynamic latitude;

  PointOfRepairEquipmentRecordModel({
    this.longitude,
    this.latitude,
  });

  PointOfRepairEquipmentRecordModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    longitude = map['longitude'];
    latitude = map['latitude'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['longitude'] = this.longitude;
    json['latitude'] = this.latitude;

    return json;
  }
}
