/*
 * @Author: XianKaiQun
 * @Date: 2020-05-12 10:40:19
 * @LastEditors  : WuWei
 * @LastEditTime : 2021-12-16 10:54:37
 * @Description: 
 */
///绘服务首页菜单列表项

class HgjMenuModel {
  String? id;
  String? name;
  String? route;
  String? mtype;
  num? sort;
  String? icon;
  String? applicationType;
  String? ownershipPage;
  bool? relationCommunity;
  bool get exist => route != 'menu/closed';
  HgjMenuModel({
    this.id,
    this.name,
    this.route,
    this.mtype,
    this.sort,
    this.icon,
    this.applicationType,
    this.ownershipPage,
    this.relationCommunity,
  });

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

    id = map['id'];
    name = map['name'];
    route = map['route'];
    mtype = map['mtype'];
    sort = map['sort'];
    icon = map['icon'];
    applicationType = map['applicationType'];
    ownershipPage = map['ownershipPage'];
    relationCommunity = map['relationCommunity'];
  }

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

    json['id'] = this.id;
    json['name'] = this.name;
    json['route'] = this.route;
    json['mtype'] = this.mtype;
    json['sort'] = this.sort;
    json['icon'] = this.icon;
    json['applicationType'] = this.applicationType;
    json['ownershipPage'] = this.ownershipPage;
    json['relationCommunity'] = this.relationCommunity;

    return json;
  }
}
