This commit is contained in:
2026-08-14 12:20:52 +08:00
parent ce0812211c
commit afd7c9d704
17 changed files with 1641 additions and 0 deletions
@@ -0,0 +1,24 @@
package com.yunhai.bschclassmanage.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 审计日志级别:用于区分重要/次要/一般操作,配合保留期策略。
*/
@Getter
@AllArgsConstructor
public enum LogLevel {
IMPORTANT(1, "重要(删除)"),
SECONDARY(2, "次要(新增/编辑)"),
GENERAL(3, "一般(查询)");
private final int code;
private final String desc;
public static LogLevel fromCode(Integer code) {
if (code == null) return SECONDARY;
for (LogLevel l : values()) if (l.code == code) return l;
return SECONDARY;
}
}