/*
 * @Author: XianKaiQun
 * @Date: 2020-08-10 16:04:21
 * @LastEditors: XianKaiQun
 * @LastEditTime: 2020-08-17 11:17:24
 * @Description: 
 */
class SecurityTemplateModel {
  String? id;
  String? number;
  String? positionName;
  List<SecurityPatrolsTemplateVosOfSecurityTemplateModel>?
      securityPatrolsTemplateVos;
  bool? uploadPhotoProbability;
  SecurityTemplateModel({
    this.id,
    this.number,
    this.positionName,
    this.securityPatrolsTemplateVos,
    this.uploadPhotoProbability,
  });

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

    id = map['id'];
    number = map['number'];
    positionName = map['positionName'];
    securityPatrolsTemplateVos =
        List<SecurityPatrolsTemplateVosOfSecurityTemplateModel>.from(
            (map["securityPatrolsTemplateVos"] ?? []).map((x) =>
                SecurityPatrolsTemplateVosOfSecurityTemplateModel.fromJson(x)));
    uploadPhotoProbability = map['uploadPhotoProbability'];
  }

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

    json['id'] = this.id;
    json['number'] = this.number;
    json['positionName'] = this.positionName;
    json['uploadPhotoProbability'] = this.uploadPhotoProbability;
    json['securityPatrolsTemplateVos'] = List<dynamic>.from(
        (securityPatrolsTemplateVos ?? []).map((x) => x.toJson()));

    return json;
  }
}

class SecurityPatrolsTemplateVosOfSecurityTemplateModel {
  String? id;
  String? qrcodeManagementId;
  String? item;
  num? sort;

  SecurityPatrolsTemplateVosOfSecurityTemplateModel({
    this.id,
    this.qrcodeManagementId,
    this.item,
    this.sort,
  });

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

    id = map['id'];
    qrcodeManagementId = map['qrcodeManagementId'];
    item = map['item'];
    sort = map['sort'];
  }

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

    json['id'] = this.id;
    json['qrcodeManagementId'] = this.qrcodeManagementId;
    json['item'] = this.item;
    json['sort'] = this.sort;

    return json;
  }
}
