refactor(system): 根据规范调整日志实体类代码结构

- 移除 DictData 类中的冗余主键注释- 为 Log 类的字段添加必要的注释
This commit is contained in:
stackcn
2024-12-09 09:06:44 +08:00
parent 4bce8732ba
commit cee6066d41
2 changed files with 49 additions and 22 deletions

View File

@@ -18,11 +18,6 @@ import lombok.EqualsAndHashCode;
@TableName("sys_dict_data") @TableName("sys_dict_data")
@Data @Data
public class DictData extends BaseEntity { public class DictData extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.AUTO)
private Long id;
/** /**
* 字典编码 * 字典编码

View File

@@ -14,60 +14,92 @@ import java.time.LocalDateTime;
* @author Ray * @author Ray
* @since 2.10.0 * @since 2.10.0
*/ */
@TableName("sys_log")
@Data @Data
@TableName("sys_log")
public class Log implements Serializable { public class Log implements Serializable {
@Schema(description = "主键") /**
* 主键
*/
@TableId(type = IdType.AUTO) @TableId(type = IdType.AUTO)
private Long id; private Long id;
@Schema(description = "日志模块") /**
* 日志模块
*/
private LogModuleEnum module; private LogModuleEnum module;
@Schema(description = "请求方式") /**
* 请求方式
*/
@TableField(value = "request_method") @TableField(value = "request_method")
private String requestMethod; private String requestMethod;
@Schema(description = "请求参数") /**
* 请求参数
*/
@TableField(value = "request_params") @TableField(value = "request_params")
private String requestParams; private String requestParams;
@Schema(description = "响应参数") /**
* 响应参数
*/
@TableField(value = "response_content") @TableField(value = "response_content")
private String responseContent; private String responseContent;
@Schema(description = "日志内容") /**
* 日志内容
*/
private String content; private String content;
@Schema(description = "请求路径") /**
* 请求路径
*/
private String requestUri; private String requestUri;
@Schema(description = "IP 地址") /**
* IP 地址
*/
private String ip; private String ip;
@Schema(description = "省份") /**
* 省份
*/
private String province; private String province;
@Schema(description = "城市") /**
* 城市
*/
private String city; private String city;
@Schema(description = "浏览器") /**
* 浏览器
*/
private String browser; private String browser;
@Schema(description = "浏览器版本") /**
* 浏览器版本
*/
private String browserVersion; private String browserVersion;
@Schema(description = "终端系统") /**
* 终端系统
*/
private String os; private String os;
@Schema(description = "执行时间(毫秒)") /**
* 执行时间(毫秒)
*/
private Long executionTime; private Long executionTime;
@Schema(description = "创建人ID") /**
* 创建人ID
*/
private Long createBy; private Long createBy;
@Schema(description = "创建时间") /**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
private LocalDateTime createTime; private LocalDateTime createTime;