class NormDetailModel {
  dynamic id;
  String? normId;
  dynamic equipmentName;
  dynamic equipmentNumber;
  String? name;
  List<OperatorsOfNormDetailModel>? operators;
  dynamic rule;
  num? cycleNum;
  String? cycleType;
  String? cycleName;
  dynamic uploadPhotoProbability;

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

  NormDetailModel.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<OperatorsOfNormDetailModel>.from((map["operators"] ?? [])
        .map((x) => OperatorsOfNormDetailModel.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 OperatorsOfNormDetailModel {
  String? id;
  String? type;
  List<String>? connent;
  String? name;
  dynamic imgCount;

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

  OperatorsOfNormDetailModel.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;
  }
}
