You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spring-boot-online-exam/backend/src/main/java/lsgwr/exam/enums/RoleEnum.java

30 lines
673 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/***********************************************************
* @Description : 用户角色的枚举
* @author : 梁山广(Laing Shan Guang)
* @date : 2019-05-18 12:00
* @email : liangshanguang2@gmail.com
***********************************************************/
package lsgwr.exam.enums;
import lombok.Getter;
@Getter
public enum RoleEnum {
/**
* 用户角色和数据库里面的role表相对应
*/
ADMIN(1, "管理员"),
TEACHER(2, "教师"),
STUDENT(3, "学生");
RoleEnum(Integer id, String role) {
this.id = id;
this.role = role;
}
private Integer id;
private String role;
}