Role.java 3.79 KB
Newer Older
liqin's avatar
liqin committed
1 2 3 4 5 6 7 8 9
package cn.wisenergy.chnmuseum.party.model;

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;

import java.io.Serializable;
liqin's avatar
liqin committed
10
import java.util.Date;
liqin's avatar
liqin committed
11 12 13 14 15 16 17 18 19 20
import java.util.List;

/**
 * <p>
 * 角色
 * </p>
 *
 * @author 杨智平
 * @since 2018-08-02
 */
21
@TableName("t_role")
liqin's avatar
liqin committed
22 23 24 25
public class Role extends Model<Role> {

    private static final long serialVersionUID = 1L;

liqin's avatar
liqin committed
26
    @TableId(value = "id", type = IdType.ASSIGN_ID)
liqin's avatar
liqin committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
    private String id;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 角色名称
     */
    private String name;
    /**
     * 角色简写
     */
    private String alias;
    /**
     * 角色状态 1-true启用 0-false停用
     */
    private Boolean status;

    /**
     * 登录权限 1-true允许 0-false禁止
     */
    @TableField("is_allow_login")
    private Boolean allowLogin;
    /**
     * 角色说明
     */
    private String instruction;
    /**
     * 0:未删除,1:已删除
     */
    @TableField("is_deleted")
    private Integer isDeleted;

liqin's avatar
liqin committed
66 67
    @TableField("sortorder")
    private Integer sortorder; // 排序
liqin's avatar
liqin committed
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 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 145 146 147 148 149 150 151

    @TableField(exist = false)
    private List<RolePermission> rolePermissionList;

    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 String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    public String getInstruction() {
        return instruction;
    }

    public Boolean getAllowLogin() {
        return allowLogin;
    }

    public void setAllowLogin(Boolean allowLogin) {
        this.allowLogin = allowLogin;
    }

    public void setInstruction(String instruction) {
        this.instruction = instruction;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

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

    public List<RolePermission> getRolePermissionList() {
        return rolePermissionList;
    }

    public void setRolePermissionList(List<RolePermission> rolePermissionList) {
        this.rolePermissionList = rolePermissionList;
    }

liqin's avatar
liqin committed
152 153
    public Integer getSortorder() {
        return sortorder;
liqin's avatar
liqin committed
154 155
    }

liqin's avatar
liqin committed
156 157
    public void setSortorder(Integer sortorder) {
        this.sortorder = sortorder;
liqin's avatar
liqin committed
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
    }

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

    @Override
    public String toString() {
        return "Role{" +
                "id='" + id + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", name='" + name + '\'' +
                ", alias='" + alias + '\'' +
                ", status=" + status +
                ", allowLogin=" + allowLogin +
                ", instruction='" + instruction + '\'' +
                ", isDeleted=" + isDeleted +
                '}';
    }
}