/*
 * @Author: ChenYaJin
 * @Date: 2023-04-21 11:45:14
 * @LastEditors: ChenYaJin
 * @LastEditTime: 2023-08-11 18:00:58
 * @Description: 作业异常
 */
class RecordAbnormalModel {
  String? id;
  String? createdAt;
  String? deviceRoomId;
  String? deviceRoomName;
  String? relationId;
  String? communityId;
  String? communityName;
  String? communityAreaId;
  String? communityAreaName;
  String? relationName;
  num? resultAbnormalCount;
  bool? resultAbnormal;
  String? createdByName;
  String? relationType;
  num? abnormalRank;
  List<String>? workStandardIds;
  String? excutivePlatformLinkId;
  String? status;
  String? exPlatformId;

  RecordAbnormalModel({
    this.id,
    this.createdAt,
    this.deviceRoomId,
    this.deviceRoomName,
    this.relationId,
    this.communityId,
    this.communityName,
    this.communityAreaId,
    this.communityAreaName,
    this.relationName,
    this.resultAbnormalCount,
    this.resultAbnormal,
    this.createdByName,
    this.relationType,
    this.abnormalRank,
    this.workStandardIds,
    this.excutivePlatformLinkId,
    this.status,
    this.exPlatformId,
  });

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

    id = map['id'];
    createdAt = map['createdAt'];
    deviceRoomId = map['deviceRoomId'];
    deviceRoomName = map['deviceRoomName'];
    relationId = map['relationId'];
    communityId = map['communityId'];
    communityName = map['communityName'];
    communityAreaId = map['communityAreaId'];
    communityAreaName = map['communityAreaName'];
    relationName = map['relationName'];
    resultAbnormalCount = map['resultAbnormalCount'];
    resultAbnormal = map['resultAbnormal'];
    createdByName = map['createdByName'];
    relationType = map['relationType'];
    abnormalRank = map['abnormalRank'] ?? 0;
    excutivePlatformLinkId = map['excutivePlatformLinkId'] ?? '';
    workStandardIds = List.from(map['workStandardIds'] ?? []);
    status = map['status'];
    exPlatformId = map['exPlatformId'];
  }

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

    json['id'] = this.id;
    json['createdAt'] = this.createdAt;
    json['deviceRoomId'] = this.deviceRoomId;
    json['deviceRoomName'] = this.deviceRoomName;
    json['relationId'] = this.relationId;
    json['communityId'] = this.communityId;
    json['communityName'] = this.communityName;
    json['communityAreaId'] = this.communityAreaId;
    json['communityAreaName'] = this.communityAreaName;
    json['relationName'] = this.relationName;
    json['resultAbnormalCount'] = this.resultAbnormalCount;
    json['resultAbnormal'] = this.resultAbnormal;
    json['createdByName'] = this.createdByName;
    json['relationType'] = this.relationType;
    json['abnormalRank'] = this.abnormalRank;
    json['excutivePlatformLinkId'] = this.excutivePlatformLinkId;
    json['workStandardIds'] = this.workStandardIds;
    json['status'] = this.status;
    json['exPlatformId'] = this.exPlatformId;

    return json;
  }
}

class CalendarAbnormalList {
  List<String>? list;
  String? date;
  CalendarAbnormalList({
    this.date,
    this.list,
  });

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

    list = List<String>.from(map['list'] ?? []);
    date = map['date'];
  }

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

    json['list'] = List<dynamic>.from(list ?? []);
    json['date'] = this.date;

    return json;
  }
}
