/*
 * @Author: WuWei
 * @Date: 2020-07-24 09:30:05
 * @LastEditors  : WuWei
 * @LastEditTime : 2023-05-16 09:52:37
 * @Description:
 */

class ReportDialogModel {
  String? reportId;
  List<DialogsOfReportDialogModel>? dialogs;
  String? businessType;
  String? status;
  num? evaluationScore;
  String? evaluationContent;
  String? createTime;
  String? description;
  List<dynamic>? photos;
  String? statusName;
  String? name;
  String? mobile;
  String? businessTypeName;
  String? communityName;
  dynamic qrName;
  dynamic houseName;
  String? headPortrait;

  ReportDialogModel({
    this.reportId,
    this.dialogs,
    this.businessType,
    this.status,
    this.evaluationScore,
    this.evaluationContent,
    this.createTime,
    this.description,
    this.photos,
    this.statusName,
    this.name,
    this.mobile,
    this.businessTypeName,
    this.communityName,
    this.qrName,
    this.houseName,
    this.headPortrait,
  });

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

    reportId = map['reportId'];
    dialogs = List<DialogsOfReportDialogModel>.from((map["dialogs"] ?? [])
        .map((x) => DialogsOfReportDialogModel.fromJson(x)));
    businessType = map['businessType'];
    status = map['status'];
    evaluationScore = map['evaluationScore'];
    evaluationContent = map['evaluationContent'];
    createTime = map['createTime'];
    description = map['description'];
    photos = map['photos'];
    statusName = map['statusName'];
    name = map['name'];
    mobile = map['mobile'];
    businessTypeName = map['businessTypeName'];
    communityName = map['communityName'];
    qrName = map['qrName'];
    houseName = map['houseName'];
    headPortrait = map['headPortrait'];
  }

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

    json['reportId'] = this.reportId;
    json['dialogs'] =
        List<dynamic>.from((dialogs ?? []).map((x) => x.toJson()));
    json['businessType'] = this.businessType;
    json['status'] = this.status;
    json['evaluationScore'] = this.evaluationScore;
    json['evaluationContent'] = this.evaluationContent;
    json['createTime'] = this.createTime;
    json['description'] = this.description;
    json['photos'] = this.photos;
    json['statusName'] = this.statusName;
    json['name'] = this.name;
    json['mobile'] = this.mobile;
    json['businessTypeName'] = this.businessTypeName;
    json['communityName'] = this.communityName;
    json['qrName'] = this.qrName;
    json['houseName'] = this.houseName;
    json['headPortrait'] = this.headPortrait;

    return json;
  }
}

class DialogsOfReportDialogModel {
  String? createAt;
  List<ReportDialogsListOfDialogsOfReportDialogModel>? reportDialogsList;

  DialogsOfReportDialogModel({
    this.createAt,
    this.reportDialogsList,
  });

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

    createAt = map['createAt'];
    reportDialogsList =
        List<ReportDialogsListOfDialogsOfReportDialogModel>.from(
            (map["reportDialogsList"] ?? []).map((x) =>
                ReportDialogsListOfDialogsOfReportDialogModel.fromJson(x)));
  }

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

    json['createAt'] = this.createAt;
    json['reportDialogsList'] =
        List<dynamic>.from((reportDialogsList ?? []).map((x) => x.toJson()));

    return json;
  }
}

class ReportDialogsListOfDialogsOfReportDialogModel {
  dynamic id;
  dynamic repairId;
  String? dialog;
  String? dialogFrom;
  String? statusName;
  dynamic createAt;
  dynamic createBy;
  dynamic updateAt;
  dynamic updateBy;
  dynamic userId;
  dynamic unionId;
  String? dialogType;
  String? headPortrait;
  String? userName;
  String? headType;

  ReportDialogsListOfDialogsOfReportDialogModel({
    this.id,
    this.repairId,
    this.dialog,
    this.dialogFrom,
    this.statusName,
    this.createAt,
    this.createBy,
    this.updateAt,
    this.updateBy,
    this.userId,
    this.unionId,
    this.dialogType,
    this.headPortrait,
    this.userName,
    this.headType,
  });

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

    id = map['id'];
    repairId = map['repairId'];
    dialog = map['dialog'];
    dialogFrom = map['dialogFrom'];
    statusName = map['statusName'];
    createAt = map['createAt'];
    createBy = map['createBy'];
    updateAt = map['updateAt'];
    updateBy = map['updateBy'];
    userId = map['userId'];
    unionId = map['unionId'];
    dialogType = map['dialogType'];
    headPortrait = map['headPortrait'];
    userName = map['userName'];
    headType = map['headType'];
  }

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

    json['id'] = this.id;
    json['repairId'] = this.repairId;
    json['dialog'] = this.dialog;
    json['dialogFrom'] = this.dialogFrom;
    json['statusName'] = this.statusName;
    json['createAt'] = this.createAt;
    json['createBy'] = this.createBy;
    json['updateAt'] = this.updateAt;
    json['updateBy'] = this.updateBy;
    json['userId'] = this.userId;
    json['unionId'] = this.unionId;
    json['dialogType'] = this.dialogType;
    json['headPortrait'] = this.headPortrait;
    json['userName'] = this.userName;
    json['headType'] = this.headType;

    return json;
  }
}
