/*
 * @Author: XianKaiQun
 * @Date: 2020-07-31 09:25:15
 * @LastEditors: XianKaiQun
 * @LastEditTime: 2020-08-19 16:58:56
 * @Description: 
 */
///保洁、安保记录详情
class CleanRecordModel {
  String? id;
  String? qrcodeManagementId;
  String? communityId;
  String? positionId;
  String? position;
  String? positionName;
  List<CleanRecordSnapshotVosOfCleanRecordModel>? cleanRecordSnapshotVos;
  String? state;
  String? remark;
  String? createdName;
  String? createdAt;
  String? exRemark;
  List? photos;

  CleanRecordModel({
    this.id,
    this.qrcodeManagementId,
    this.communityId,
    this.positionId,
    this.position,
    this.positionName,
    this.cleanRecordSnapshotVos,
    this.state,
    this.remark,
    this.createdName,
    this.createdAt,
    this.exRemark,
    this.photos,
  });

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

    id = map['id'];
    qrcodeManagementId = map['qrcodeManagementId'];
    communityId = map['communityId'];
    positionId = map['positionId'];
    position = map['position'];
    positionName = map['positionName'];
    cleanRecordSnapshotVos =
        List<CleanRecordSnapshotVosOfCleanRecordModel>.from(
            (map["cleanRecordSnapshotVos"] ?? []).map(
                (x) => CleanRecordSnapshotVosOfCleanRecordModel.fromJson(x)));
    state = map['state'];
    remark = map['remark'];
    createdName = map['createdName'];
    createdAt = map['createdAt'];
    exRemark = map['exRemark'];
    photos = map['photos'];
  }

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

    json['id'] = this.id;
    json['qrcodeManagementId'] = this.qrcodeManagementId;
    json['communityId'] = this.communityId;
    json['positionId'] = this.positionId;
    json['position'] = this.position;
    json['positionName'] = this.positionName;
    json['cleanRecordSnapshotVos'] = List<dynamic>.from(
        (cleanRecordSnapshotVos ?? []).map((x) => x.toJson()));
    json['state'] = this.state;
    json['remark'] = this.remark;
    json['createdName'] = this.createdName;
    json['createdAt'] = this.createdAt;
    json['exRemark'] = this.exRemark;
    json['photos'] = this.photos;

    return json;
  }
}

class CleanRecordSnapshotVosOfCleanRecordModel {
  String? item;
  num? sort;
  bool? complete;

  CleanRecordSnapshotVosOfCleanRecordModel({
    this.item,
    this.sort,
    this.complete,
  });

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

    item = map['item'];
    sort = map['sort'];
    complete = map['complete'];
  }

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

    json['item'] = this.item;
    json['sort'] = this.sort;
    json['complete'] = this.complete;

    return json;
  }
}
