welfare-api/src/main/java/com/org/system/entity/SysRole.java

54 lines
1.2 KiB
Java

package com.org.system.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.org.system.config.validation.Update;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/** 系统角色表 **/
@Data
public class SysRole extends BaseEntity {
public static final Long PLATFORM_MANAGER_ROLE = 2L;
// 服务人员
public static final Long SERVICE_ROLE = 3L;
// 供养人员
public static final Long SUPPORT_ROLE = 4L;
// 医养结合护理人员
public static final Long TEND_ROLE = 5L;
public static final String STUDENT_ROLE_CODE = "student";
/** 角色ID **/
@NotNull(message = "角色ID不能为空", groups = {Update.class})
@TableId(type = IdType.AUTO)
private Long id;
/** 角色名称 **/
@NotEmpty(message = "角色名称不能为空")
private String name;
/**
* 编码
*/
private String code;
/**
* 排序
*/
private Integer sort;
/** 角色所属组织ID **/
private Long orgCode;
/** 父级角色ID **/
private Long parentId;
}