/// id : "989bf0708d85409c9e0db505ed94a6fc"
/// name : "人员"
/// sort : 30
/// hasChildren : false
/// riskMeasure : ""
/// isShow : "1"
/// parentId : "0"

class DeviceRiskParent {
  DeviceRiskParent({
    String? id,
    String? name,
    int? sort,
    bool? hasChildren,
    String? riskMeasure,
    String? isShow,
    String? parentId,
  }) {
    _id = id;
    _name = name;
    _sort = sort;
    _hasChildren = hasChildren;
    _riskMeasure = riskMeasure;
    _isShow = isShow;
    _parentId = parentId;
  }

  DeviceRiskParent.fromJson(dynamic json) {
    _id = json['id'];
    _name = json['name'];
    _sort = json['sort'];
    _hasChildren = json['hasChildren'];
    _riskMeasure = json['riskMeasure'];
    _isShow = json['isShow'];
    _parentId = json['parentId'];
  }

  String? _id;
  String? _name;
  int? _sort;
  bool? _hasChildren;
  String? _riskMeasure;
  String? _isShow;
  String? _parentId;

  DeviceRiskParent copyWith({
    String? id,
    String? name,
    int? sort,
    bool? hasChildren,
    String? riskMeasure,
    String? isShow,
    String? parentId,
  }) =>
      DeviceRiskParent(
        id: id ?? _id,
        name: name ?? _name,
        sort: sort ?? _sort,
        hasChildren: hasChildren ?? _hasChildren,
        riskMeasure: riskMeasure ?? _riskMeasure,
        isShow: isShow ?? _isShow,
        parentId: parentId ?? _parentId,
      );

  String? get id => _id;

  String? get name => _name;

  int? get sort => _sort;

  bool? get hasChildren => _hasChildren;

  String? get riskMeasure => _riskMeasure;

  String? get isShow => _isShow;

  String? get parentId => _parentId;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['name'] = _name;
    map['sort'] = _sort;
    map['hasChildren'] = _hasChildren;
    map['riskMeasure'] = _riskMeasure;
    map['isShow'] = _isShow;
    map['parentId'] = _parentId;
    return map;
  }
}
