/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2021-05-06 09:00:16
 * @LastEditTime : 2023-08-04 11:21:16
 * @FilePath     : /wisdom-huiguanjia-app/task_package/lib/src/models/task_organ_stat.dart
 * @Description  : Do not edit
 */
import 'package:wisdom_cli/wisdom_cli.dart';

class TaskOrganStat implements WPickerEntity {
  String? id;
  String? name;
  String? parentId;
  String? parentName;
  dynamic rootOrganId;
  dynamic rootOrganName;
  dynamic employeeId;
  dynamic shortName;
  dynamic type;
  bool? isSelect;

  TaskOrganStat({
    this.id,
    this.name,
    this.parentId,
    this.parentName,
    this.rootOrganId,
    this.rootOrganName,
    this.employeeId,
    this.shortName,
    this.type,
    this.isSelect,
  });

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

    id = map['id'];
    name = map['name'];
    parentId = map['parentId'];
    parentName = map['parentName'];
    rootOrganId = map['rootOrganId'];
    rootOrganName = map['rootOrganName'];
    employeeId = map['employeeId'];
    shortName = map['shortName'];
    type = map['type'];
    isSelect = map['isSelect'];
  }

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

    json['id'] = this.id;
    json['name'] = this.name;
    json['parentId'] = this.parentId;
    json['parentName'] = this.parentName;
    json['rootOrganId'] = this.rootOrganId;
    json['rootOrganName'] = this.rootOrganName;
    json['employeeId'] = this.employeeId;
    json['shortName'] = this.shortName;
    json['type'] = this.type;
    json['isSelect'] = this.isSelect;

    return json;
  }

  @override
  bool get selectDisabled => false;

  @override
  String get selectName => this.name ?? '';

  @override
  Object get selectUnique => this.id ?? '';
}
