Menu.java 5.17 KB
Newer Older
liqin's avatar
liqin committed
1
package cn.chnmuseum.party.model;
liqin's avatar
liqin committed
2

liqin's avatar
liqin committed
3 4 5 6 7
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
liqin's avatar
liqin committed
8 9 10
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
liqin's avatar
liqin committed
11
import java.util.Date;
12
import java.util.List;
liqin's avatar
liqin committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

/**
 * <p>
 * 菜单权限表
 * </p>
 *
 * @author 杨智平
 * @since 2018-08-03
 */
@TableName("menu")
public class Menu extends Model<Menu> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.UUID)
    private String id;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", hidden = true)
    @TableField("create_time")
    private Date createTime;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间", hidden = true)
    @TableField("update_time")
    private Date updateTime;
    /**
     * 0:未删除,1:已删除
     */
    @ApiModelProperty(value = "0:未删除,1:已删除", hidden = true)
    @TableField("is_deleted")
    private Integer isDeleted = 0;
    /**
     * 菜单地址
     */
    @ApiModelProperty(value = "菜单地址")
wzp's avatar
wzp committed
51 52
    @TableField("url")
    private String url;
liqin's avatar
liqin committed
53 54 55 56
    /**
     * 菜单名称
     */
    @ApiModelProperty(value = "菜单名称")
wzp's avatar
wzp committed
57 58
    @TableField("name")
    private String name;
liqin's avatar
liqin committed
59 60 61 62 63 64 65 66 67 68 69 70 71 72
    /**
     * 上级菜单ID
     */
    @ApiModelProperty(value = "上级菜单ID")
    @TableField("parent_id")
    private String parentId;
    /**
     * 1:目录菜单 2:基本操作按钮
     */
    @TableField("is_button")
    private Integer isButton;
    /**
     * 排序
     */
73 74
    @TableField("sort")
    @ApiModelProperty(value = "排序")
liqin's avatar
liqin committed
75 76
    private Integer sort;

77 78 79 80 81 82 83
    /**
     * 级别
     */
    @TableField("level")
    @ApiModelProperty(value = "级别")
    private Integer level;

wzp's avatar
wzp committed
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
    /**
     * 图标
     */
    @TableField("icon")
    @ApiModelProperty(value = "图标")
    private String icon;

    /**
     * 页面风格
     */
    @TableField("color")
    @ApiModelProperty(value = "页面风格")
    private String color;

    /**
     * 头像
     */
    @TableField("avatar")
    @ApiModelProperty(value = "头像")
    private String avatar;

105 106 107 108 109 110 111
    /**
     * 下级
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "下级")
    private List<Menu> children;

liqin's avatar
liqin committed
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

wzp's avatar
wzp committed
145 146
    public String getUrl() {
        return url;
liqin's avatar
liqin committed
147 148
    }

wzp's avatar
wzp committed
149 150
    public void setUrl(String url) {
        this.url = url;
liqin's avatar
liqin committed
151 152
    }

wzp's avatar
wzp committed
153 154
    public String getName() {
        return name;
liqin's avatar
liqin committed
155 156
    }

wzp's avatar
wzp committed
157 158
    public void setName(String name) {
        this.name = name;
liqin's avatar
liqin committed
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public Integer getIsButton() {
        return isButton;
    }

    public void setIsButton(Integer isButton) {
        this.isButton = isButton;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public List<Menu> getChildren() {
        return children;
    }

    public void setChildren(List<Menu> children) {
        this.children = children;
    }

wzp's avatar
wzp committed
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222
    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
liqin's avatar
liqin committed
223 224 225 226 227
    }

    @Override
    public String toString() {
        return "Menu{" +
wzp's avatar
wzp committed
228
                "id='" + id + '\'' +
liqin's avatar
liqin committed
229 230 231
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", isDeleted=" + isDeleted +
wzp's avatar
wzp committed
232 233 234 235 236 237 238 239 240 241 242
                ", url='" + url + '\'' +
                ", name='" + name + '\'' +
                ", parentId='" + parentId + '\'' +
                ", isButton=" + isButton +
                ", sort=" + sort +
                ", level=" + level +
                ", icon='" + icon + '\'' +
                ", color='" + color + '\'' +
                ", avatar='" + avatar + '\'' +
                ", children=" + children +
                '}';
liqin's avatar
liqin committed
243
    }
wzp's avatar
wzp committed
244 245 246 247 248 249 250

    @Override
    protected Serializable pkVal() {
        return this.id;
    }


liqin's avatar
liqin committed
251
}