class FileCategorysTreeModel {
  int id;
  int createTime;
  String createBy;
  int updateTime;
  String updateBy;
  int pid;
  String name;
  int brandId;
  String icon;
  String descr;
  int statuz;
  String sort;
  String pidName;
  String brandName;
  List<FileCategorysModel> chilList;

  FileCategorysTreeModel(
      {this.id,
      this.createTime,
      this.createBy,
      this.updateTime,
      this.updateBy,
      this.pid,
      this.name,
      this.brandId,
      this.icon,
      this.descr,
      this.statuz,
      this.sort,
      this.pidName,
      this.brandName,
      this.chilList});

  FileCategorysTreeModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    createTime = json['createTime'];
    createBy = json['createBy'];
    updateTime = json['updateTime'];
    updateBy = json['updateBy'];
    pid = json['pid'];
    name = json['name'];
    brandId = json['brandId'];
    icon = json['icon'];
    descr = json['descr'];
    statuz = json['statuz'];
    sort = json['sort'];
    pidName = json['pidName'];
    brandName = json['brandName'];
    if (json['chilList'] != null) {
      chilList = new List<FileCategorysModel>();
      json['chilList'].forEach((v) {
        chilList.add(new FileCategorysModel.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['createTime'] = this.createTime;
    data['createBy'] = this.createBy;
    data['updateTime'] = this.updateTime;
    data['updateBy'] = this.updateBy;
    data['pid'] = this.pid;
    data['name'] = this.name;
    data['brandId'] = this.brandId;
    data['icon'] = this.icon;
    data['descr'] = this.descr;
    data['statuz'] = this.statuz;
    data['sort'] = this.sort;
    data['pidName'] = this.pidName;
    data['brandName'] = this.brandName;
    if (this.chilList != null) {
      data['chilList'] = this.chilList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class FileCategorysModel {
  int id;
  int createTime;
  String createBy;
  int updateTime;
  String updateBy;
  int pid;
  String name;
  int brandId;
  String icon;
  String descr;
  int statuz;
  String sort;
  String pidName;
  String brandName;

  FileCategorysModel(
      {this.id,
      this.createTime,
      this.createBy,
      this.updateTime,
      this.updateBy,
      this.pid,
      this.name,
      this.brandId,
      this.icon,
      this.descr,
      this.statuz,
      this.sort,
      this.pidName,
      this.brandName});

  FileCategorysModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    createTime = json['createTime'];
    createBy = json['createBy'];
    updateTime = json['updateTime'];
    updateBy = json['updateBy'];
    pid = json['pid'];
    name = json['name'];
    brandId = json['brandId'];
    icon = json['icon'];
    descr = json['descr'];
    statuz = json['statuz'];
    sort = json['sort'];
    pidName = json['pidName'];
    brandName = json['brandName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['createTime'] = this.createTime;
    data['createBy'] = this.createBy;
    data['updateTime'] = this.updateTime;
    data['updateBy'] = this.updateBy;
    data['pid'] = this.pid;
    data['name'] = this.name;
    data['brandId'] = this.brandId;
    data['icon'] = this.icon;
    data['descr'] = this.descr;
    data['statuz'] = this.statuz;
    data['sort'] = this.sort;
    data['pidName'] = this.pidName;
    data['brandName'] = this.brandName;
    return data;
  }
}
