/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2021-03-29 11:22:36
 * @LastEditTime : 2021-04-09 14:42:58
 * @FilePath     : /wisdom-huiguanjia-app/oa_package/lib/src/models/task_detail_model.dart
 * @Description  : Do not edit
 */

class TaskDetailModel {
  String? creator;
  List<TracesOfTaskDetailModel>? traces;
  String? formValue;
  String? formHtml;
  String? processName;
  String? organ;
  String? createTime;
  String? activeTaskName;
  bool? operateAble;
  String? id;
  String? activeTaskId;
  String? activeFormId;
  bool? firstNode;
  bool? audit;

  TaskDetailModel({
    this.creator,
    this.traces,
    this.formValue,
    this.formHtml,
    this.processName,
    this.organ,
    this.createTime,
    this.activeTaskName,
    this.operateAble,
    this.id,
    this.activeTaskId,
    this.activeFormId,
    this.firstNode,
    this.audit,
  });

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

    creator = map['creator'];
    traces = List<TracesOfTaskDetailModel>.from(
        (map["traces"] ?? []).map((x) => TracesOfTaskDetailModel.fromJson(x)));
    formValue = map['formValue'];
    formHtml = map['formHtml'];
    processName = map['processName'];
    organ = map['organ'];
    createTime = map['createTime'];
    activeTaskName = map['activeTaskName'];
    operateAble = map['operateAble'];
    id = map['id'];
    activeTaskId = map['activeTaskId'];
    activeFormId = map['activeFormId'];
    firstNode = map['firstNode'];
    audit = map['audit'];
  }

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

    json['creator'] = this.creator;
    json['traces'] = List<dynamic>.from((traces ?? []).map((x) => x.toJson()));
    json['formValue'] = this.formValue;
    json['formHtml'] = this.formHtml;
    json['processName'] = this.processName;
    json['organ'] = this.organ;
    json['createTime'] = this.createTime;
    json['activeTaskName'] = this.activeTaskName;
    json['operateAble'] = this.operateAble;
    json['id'] = this.id;
    json['activeTaskId'] = this.activeTaskId;
    json['activeFormId'] = this.activeFormId;
    json['firstNode'] = this.firstNode;
    json['audit'] = this.audit;

    return json;
  }
}

class TracesOfTaskDetailModel {
  String? finishTime;
  String? content;
  String? title;
  String? action;
  String? taskName;
  String? startTime;
  num? useTime;
  String? operator;
  bool? firstNode;

  TracesOfTaskDetailModel({
    this.finishTime,
    this.content,
    this.title,
    this.action,
    this.taskName,
    this.startTime,
    this.useTime,
    this.operator,
    this.firstNode,
  });

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

    finishTime = map['finishTime'];
    content = map['content'];
    title = map['title'];
    action = map['action'];
    taskName = map['taskName'];
    startTime = map['startTime'];
    useTime = map['useTime'];
    operator = map['operator'];
    firstNode = map['firstNode'];
  }

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

    json['finishTime'] = this.finishTime;
    json['content'] = this.content;
    json['title'] = this.title;
    json['action'] = this.action;
    json['taskName'] = this.taskName;
    json['startTime'] = this.startTime;
    json['useTime'] = this.useTime;
    json['operator'] = this.operator;
    json['firstNode'] = this.firstNode;

    return json;
  }
}
