/*
 * @Author: XianKaiQun
 * @Date: 2020-08-03 17:03:36
 * @LastEditors: XianKaiQun
 * @LastEditTime: 2020-08-17 11:24:03
 * @Description: 
 */
///巡检保养表单
class RepairEquipmentNormModel {
  String? id;
  String? normId;
  String? equipmentName;
  String? equipmentNumber;
  String? name;
  List<OperatorsOfRepairEquipmentNormModel>? operators;
  String? rule;
  num? cycleNum;
  String? cycleType;
  String? cycleName;
  num? uploadPhotoProbability;

  RepairEquipmentNormModel({
    this.id,
    this.normId,
    this.equipmentName,
    this.equipmentNumber,
    this.name,
    this.operators,
    this.rule,
    this.cycleNum,
    this.cycleType,
    this.cycleName,
    this.uploadPhotoProbability,
  });

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

    id = map['id'];
    normId = map['normId'];
    equipmentName = map['equipmentName'];
    equipmentNumber = map['equipmentNumber'];
    name = map['name'];
    operators = List<OperatorsOfRepairEquipmentNormModel>.from(
        (map["operators"] ?? [])
            .map((x) => OperatorsOfRepairEquipmentNormModel.fromJson(x)));
    rule = map['rule'];
    cycleNum = map['cycleNum'];
    cycleType = map['cycleType'];
    cycleName = map['cycleName'];
    uploadPhotoProbability = map['uploadPhotoProbability'];
  }

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

    json['id'] = this.id;
    json['normId'] = this.normId;
    json['equipmentName'] = this.equipmentName;
    json['equipmentNumber'] = this.equipmentNumber;
    json['name'] = this.name;
    json['operators'] =
        List<dynamic>.from((operators ?? []).map((x) => x.toJson()));
    json['rule'] = this.rule;
    json['cycleNum'] = this.cycleNum;
    json['cycleType'] = this.cycleType;
    json['cycleName'] = this.cycleName;
    json['uploadPhotoProbability'] = this.uploadPhotoProbability;

    return json;
  }
}

class OperatorsOfRepairEquipmentNormModel {
  String? id;
  String? type;
  List<String>? connent;
  String? name;
  num? imgCount;

  OperatorsOfRepairEquipmentNormModel({
    this.id,
    this.type,
    this.connent,
    this.name,
    this.imgCount,
  });

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

    id = map['id'];
    type = map['type'];
    connent = map['connent'].cast<String>();
    name = map['name'];
    imgCount = map['imgCount'];
  }

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

    json['id'] = this.id;
    json['type'] = this.type;
    json['connent'] = this.connent;
    json['name'] = this.name;
    json['imgCount'] = this.imgCount;

    return json;
  }
}
