/*
 * @Author: WuXiangNan
 * @Date: 2021-07-06 16:58:20
 * @LastEditors: WuXiangNan
 * @LastEditTime: 2021-07-06 17:08:10
 * @Description: 
 */

import 'package:wisdom_cli/wisdom_cli.dart';

class AuthCompany implements WPickerEntity {
  String? code;
  String? name;
  bool? disabled;

  AuthCompany({this.code, this.name, this.disabled = false});

  AuthCompany.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});
    code = map['code'];
    name = map['name'];
    disabled = map['disabled'] ?? this.disabled;
  }

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

    json['code'] = this.code;
    json['name'] = this.name;
    json['disabled'] = this.disabled;

    return json;
  }

  @override
  String get selectName => this.name!;

  @override
  Object get selectUnique => this.code!;

  @override
  bool get selectDisabled => this.disabled!;
}
