/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2022-07-12 11:36:28
 * @LastEditTime : 2022-08-11 18:02:22
 * @Description  : Do not edit
 */

import 'package:wisdom_cli/wisdom_cli.dart';

class TypeListModel implements WPickerEntity {
  String? id;
  String? name;
  String? remark;
  String? createAt;
  String? createBy;
  String? updateAt;
  String? updateBy;
  num? preset;
  num? deleted;

  TypeListModel({
    this.id,
    this.name,
    this.remark,
    this.createAt,
    this.createBy,
    this.updateAt,
    this.updateBy,
    this.preset,
    this.deleted,
  });

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

    id = map['id'];
    name = map['name'];
    remark = map['remark'];
    createAt = map['createAt'];
    createBy = map['createBy'];
    updateAt = map['updateAt'];
    updateBy = map['updateBy'];
    preset = map['preset'];
    deleted = map['deleted'];
  }

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

    json['id'] = this.id;
    json['name'] = this.name;
    json['remark'] = this.remark;
    json['createAt'] = this.createAt;
    json['createBy'] = this.createBy;
    json['updateAt'] = this.updateAt;
    json['updateBy'] = this.updateBy;
    json['preset'] = this.preset;
    json['deleted'] = this.deleted;

    return json;
  }

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

  @override
  get selectUnique => id ?? '';

  @override
  bool get selectDisabled => false;
}
