代码拉取完成,页面将自动刷新
package com.yuanlrc.campus_market.entity.admin;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import com.yuanlrc.campus_market.annotion.ValidateEntity;
import com.yuanlrc.campus_market.entity.common.BaseEntity;
/**
* 后台角色实体类
* @author Administrator
*
*/
@Entity
@Table(name="ylrc_role")
@EntityListeners(AuditingEntityListener.class)
public class Role extends BaseEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
public static final int ADMIN_ROLE_STATUS_ENABLE = 1;//角色状态正常可用
public static final int ADMIN_ROLE_STATUS_UNABLE = 0;//角色状态不可用
@ValidateEntity(required=true,requiredLeng=true,minLength=1,maxLength=18,errorRequiredMsg="角色名称不能为空!",errorMinLengthMsg="角色名称长度需大于1!",errorMaxLengthMsg="角色名称长度不能大于18!")
@Column(name="name",nullable=false,length=18)
private String name;//角色名称
@ValidateEntity(required=false)
@Column(name="authorities")
@ManyToMany
private List<Menu> authorities;//角色所对应的权限(菜单)列表
@ValidateEntity(required=false)
@Column(name="status",length=1)
private int status = ADMIN_ROLE_STATUS_ENABLE;//角色状态,默认可用
@ValidateEntity(required=false)
@Column(name="remark",length=128)
private String remark;//角色备注
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<Menu> getAuthorities() {
return authorities;
}
public void setAuthorities(List<Menu> authorities) {
this.authorities = authorities;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Override
public String toString() {
return "Role [name=" + name + ", authorities=" + authorities
+ ", status=" + status + ", remark=" + remark + "]";
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。