/*
 * @Author: XianKaiQun
 * @Date: 2020-09-02 14:36:01
 * @LastEditors: ChenYaJin
 * @LastEditTime: 2023-02-14 17:23:36
 * @Description: 
 */
import 'package:wisdom_cli/wisdom_ui.dart';

class StatusModel implements WPickerEntity {
  String? code;
  String? name;
  bool? disabled;
  String? quantity;

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

  StatusModel.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 => name ?? '';

  @override
  get selectUnique => code!;

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

class StatusStatistic {
  int? process;
  int? hangUp;

  StatusStatistic({
    this.process,
    this.hangUp,
  });

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

    process = map['process'];
    hangUp = map['hangUp'];
  }

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

    json['process'] = this.process;
    json['hangUp'] = this.hangUp;
    return json;
  }
}
