Files
WinBoLL/positions/src/main/java/cc/winboll/studio/positions/PointLevel.java

44 lines
1.1 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package cc.winboll.studio.positions;
/**
* @Author ZhanGSKen&豆包大模型<zhangsken@qq.com>
* @Date 2025/11/15 15:14
* @Describe 应用入口级别类型枚举
*/
public enum PointLevel {
DORAEMON("doraemon", "叮铛级别"),
WUKONG("wukong", "悟空级别"),
LAOJUN("laojun", "老君级别");
public static final String TAG = "PointLevel";
// 枚举属性
private final String code; // 编码(如 "wukong"
private final String desc; // 描述
// 构造方法Java 7 需显式定义)
PointLevel(String code, String desc) {
this.code = code;
this.desc = desc;
}
// Getter 方法(获取枚举属性)
public String getCode() {
return code;
}
public String getDesc() {
return desc;
}
// 可选:根据 code 获取枚举项(便于业务使用)
public static PointLevel getByCode(String code) {
for (PointLevel level : values()) {
if (level.code.equals(code)) {
return level;
}
}
return null; // 或抛出异常,根据业务需求调整
}
}