/*
 * @Author: XianKaiQun
 * @Date: 2020-08-18 15:36:31
 * @LastEditors: ChenYaJin
 * @LastEditTime: 2021-11-24 22:04:43
 * @Description: 
 */
import 'package:wisdom_cli/new/widgets/picker.dart';

class PayerModel extends WPickerEntity {
  String? payer;
  String? mobile;
  bool? disabled;

  PayerModel({
    this.payer,
    this.mobile,
    this.disabled = false,
  });

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

    payer = map['payer'];
    mobile = map['mobile'];
    disabled = map['disabled'] ?? this.disabled;
  }

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

    json['payer'] = this.payer;
    json['mobile'] = this.mobile;
    json['disabled'] = this.disabled;

    return json;
  }

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

  @override
  Object get selectUnique => '$payer$mobile';

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