/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2021-08-30 11:36:16
 * @LastEditTime : 2021-09-30 17:18:30
 * @Description  : Do not edit
 */
import 'package:json_annotation/json_annotation.dart';
part 'task_operation_detail.g.dart';

@JsonSerializable(nullable: true)
class TaskOperationDetail {
  final String? id;
  final String? exPlatformId;
  final String? type;
  final String? relationType;
  final String? relationId;
  final String? relationName;
  final String? relationParentId;
  final bool? isRelationQrCode;
  final String? status;
  final num? nodeSequenceNumber;
  final List<FormDataOfTaskOperationDetailModel>? formData;
  final List<ExecutableNodeOfTaskOperationDetailModel>? executableNode;
  final List<NodeDataOfTaskOperationDetailModel>? nodeData;

  TaskOperationDetail({
    this.id,
    this.exPlatformId,
    this.type,
    this.relationType,
    this.relationId,
    this.relationName,
    this.relationParentId,
    this.isRelationQrCode,
    this.status,
    this.nodeSequenceNumber,
    this.formData,
    this.executableNode,
    this.nodeData,
  });

  ///
  ///
  ///
  ///
  ///
  ///
  ///
//***以下为模板代码谨慎修改***
  factory TaskOperationDetail.fromJson(Map<String, dynamic> json) =>
      _$TaskOperationDetailFromJson(json);
  Map<String, dynamic> toJson() => _$TaskOperationDetailToJson(this);
}

class FormDataOfTaskOperationDetailModel {
  String? workStandardIds;

  FormDataOfTaskOperationDetailModel({
    this.workStandardIds,
  });

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

    workStandardIds = map['workStandardIds'];
  }

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

    json['workStandardIds'] = this.workStandardIds;

    return json;
  }
}

@JsonSerializable(nullable: true)
class ExecutableNodeOfTaskOperationDetailModel {
  String? id;
  String? exPlatformId;
  String? relationType;
  String? relationId;
  num? nodeSequenceNumber;
  String? relationName;

  ExecutableNodeOfTaskOperationDetailModel({
    this.id,
    this.exPlatformId,
    this.relationType,
    this.relationId,
    this.nodeSequenceNumber,
    this.relationName,
  });

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

    id = map['id'];
    exPlatformId = map['exPlatformId'];
    relationType = map['relationType'];
    relationId = map['relationId'];
    nodeSequenceNumber = map['nodeSequenceNumber'];
    relationName = map['relationName'];
  }

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

    json['id'] = this.id;
    json['exPlatformId'] = this.exPlatformId;
    json['relationType'] = this.relationType;
    json['relationId'] = this.relationId;
    json['nodeSequenceNumber'] = this.nodeSequenceNumber;
    json['relationName'] = this.relationName;

    return json;
  }
}

class NodeDataOfTaskOperationDetailModel {
  String? communityName;
  bool? isRelationQrCode;
  String? communityAreaName;
  String? resultAbnormal;

  NodeDataOfTaskOperationDetailModel({
    this.communityName,
    this.isRelationQrCode,
    this.communityAreaName,
    this.resultAbnormal,
  });

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

    communityName = map['communityName'];
    isRelationQrCode = map['isRelationQrCode'];
    communityAreaName = map['communityAreaName'];
    resultAbnormal = map['resultAbnormal'];
  }

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

    json['communityName'] = this.communityName;
    json['isRelationQrCode'] = this.isRelationQrCode;
    json['communityAreaName'] = this.communityAreaName;
    json['resultAbnormal'] = this.resultAbnormal;

    return json;
  }
}
