/*
 * @Author: XianKaiQun
 * @Date: 2020-04-22 09:34:33
 * @LastEditors: ChenYaJin
 * @LastEditTime: 2023-01-10 09:56:47
 * @Descripttion: 
 */
import 'package:wisdom_cli/wisdom_ui.dart';

///小区列表项
class PartCommunityModel implements WPickerEntity {
  String? id;
  String? name;
  String? address;
  String? districtsName;

  PartCommunityModel({
    this.id,
    this.name,
    this.address,
    this.districtsName,
  });

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

    id = map['id'];
    name = map['name'];
    address = map['address'];
    districtsName = map['districtsName'];
  }

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

    json['id'] = this.id;
    json['name'] = this.name;
    json['address'] = this.address;
    json['districtsName'] = this.districtsName;

    return json;
  }

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

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

  @override
  bool get selectDisabled => false;
}
