71 lines
1.4 KiB
Java
71 lines
1.4 KiB
Java
package com.kaidi.oa.domain;
|
|
|
|
import jakarta.persistence.Column;
|
|
import jakarta.persistence.Entity;
|
|
import jakarta.persistence.GeneratedValue;
|
|
import jakarta.persistence.GenerationType;
|
|
import jakarta.persistence.Id;
|
|
import jakarta.persistence.Table;
|
|
|
|
/** Security role. */
|
|
@Entity
|
|
@Table(name = "sys_role")
|
|
public class SysRole {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
|
|
@Column(nullable = false)
|
|
private String name;
|
|
|
|
@Column(nullable = false, unique = true)
|
|
private String code;
|
|
|
|
/** 角色说明(角色管理 UI 用)。 */
|
|
private String description;
|
|
|
|
/** 系统内置角色(ADMIN/APPROVER/USER)不可删;自定义部门角色为 false。 */
|
|
private boolean system = false;
|
|
|
|
public Long getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Long id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getName() {
|
|
return name;
|
|
}
|
|
|
|
public void setName(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
public String getCode() {
|
|
return code;
|
|
}
|
|
|
|
public void setCode(String code) {
|
|
this.code = code;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
public boolean isSystem() {
|
|
return system;
|
|
}
|
|
|
|
public void setSystem(boolean system) {
|
|
this.system = system;
|
|
}
|
|
}
|