synclog
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
package com.yunhai.bschclassmanage.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.hibernate.annotations.CreationTimestamp;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户同步调用日志实体。
|
||||
* 专用于记录 SyncUserBaseService 对基础平台 OpenAPI 的同步/推送调用,
|
||||
* 与 operation_log(业务日志)、sys_operation_log(审计日志)物理隔离。
|
||||
* 索引由 sqlscript/sync_log.sql 负责创建,本实体不含 @Table(indexes),
|
||||
* 避免 ddl-auto=update 启动时重复建索引告警。
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name = "sync_log")
|
||||
public class SyncLog implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
/** SyncDataType.key,如 Sync-AddGroup */
|
||||
@Column(name = "sync_data_type_key", length = 64)
|
||||
private String syncDataTypeKey;
|
||||
|
||||
/** SyncDataType.name,如 添加组 */
|
||||
@Column(name = "sync_data_type_name", length = 64)
|
||||
private String syncDataTypeName;
|
||||
|
||||
/** 大类:Sync / Send */
|
||||
@Column(name = "sync_type", nullable = false, length = 16)
|
||||
private String syncType;
|
||||
|
||||
/** 大类 key:Sync / Send */
|
||||
@Column(name = "sync_type_key", nullable = false, length = 16)
|
||||
private String syncTypeKey;
|
||||
|
||||
/** 大类名称:同步 / 推送 */
|
||||
@Column(name = "sync_type_name", length = 32)
|
||||
private String syncTypeName;
|
||||
|
||||
/** 类名.方法名 */
|
||||
@Column(name = "class_method", nullable = false, length = 512)
|
||||
private String classMethod;
|
||||
|
||||
/** 操作人ID(来自 UserContext) */
|
||||
@Column(name = "user_id")
|
||||
private Integer userId;
|
||||
|
||||
/** 操作人姓名(来自 UserContext) */
|
||||
@Column(name = "user_name", length = 64)
|
||||
private String userName;
|
||||
|
||||
/** 学校ID(多校隔离,来自 UserContext) */
|
||||
@Column(name = "sch_id")
|
||||
private Integer schId;
|
||||
|
||||
/** 客户端IP */
|
||||
@Column(name = "request_ip", length = 64)
|
||||
private String requestIp;
|
||||
|
||||
/** 请求入参(参数名->值,已脱敏),TEXT */
|
||||
@Column(name = "json_data", columnDefinition = "TEXT")
|
||||
private String jsonData;
|
||||
|
||||
/** 异常信息,成功为 NULL */
|
||||
@Column(name = "error_msg", columnDefinition = "TEXT")
|
||||
private String errorMsg;
|
||||
|
||||
@CreationTimestamp
|
||||
@Column(name = "create_time", nullable = false, updatable = false, columnDefinition = "DATETIME(3)")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
Reference in New Issue
Block a user