/*
 * @Author: WuXiangNan
 * @Date: 2021-01-12 10:33:55
 * @LastEditTime: 2021-01-18 08:39:49
 * @LastEditors: WuXiangNan
 * @Description: 
 */

import 'package:wisdom_cli/wisdom_cli.dart';

class NoticeTypeModel implements WPickerEntity {
  String? name;
  String? code;

  NoticeTypeModel({
    this.name,
    this.code,
  });

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

    name = map['name'];
    code = map['code'];
  }

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

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

    return json;
  }

  @override
  bool get selectDisabled => false;

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

  @override
  String get selectUnique => this.code ?? '';
}
