feat: 主键自增改雪花 ID(为分库分表预留)

- 52 个 entity 主键 @TableId 由 IdType.AUTO 改为 IdType.ASSIGN_ID(雪花)
- 双服务 application.yml 的 mybatis-plus id-type 由 auto 改为 assign_id
- schema 脚本主键去掉 GENERATED BY DEFAULT AS IDENTITY
This commit is contained in:
Zhou Weidong committed 2026-10-17 02:26:43 +08:00
1 parent 5f9483a86c
commit bbf46b3445
57 files changed
+115 -115

No files matched your search

@@ -17,7 +17,7 @@ import java.time.LocalDateTime;
@TableName("content_audit_record")
public class ContentAuditRecord {
@TableId(type = IdType.AUTO)
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/** COMMENT/DRAMA/AVATAR/CREATOR */
private String bizType;
@@ -17,7 +17,7 @@ import java.time.LocalDateTime;
@TableName("content_comment")
public class ContentComment {
@TableId(type = IdType.AUTO)
@TableId(type = IdType.ASSIGN_ID)
private Long id;
private Long dramaId;
private Long episodeId;
@@ -15,7 +15,7 @@ import java.time.LocalDateTime;
@TableName("content_like")
public class ContentLike {
@TableId(type = IdType.AUTO)
@TableId(type = IdType.ASSIGN_ID)
private Long id;
private Long userId;
/** DRAMA/EPISODE/COMMENT */
@@ -17,7 +17,7 @@ import java.time.LocalDateTime;
@TableName("content_report")
public class ContentReport {
@TableId(type = IdType.AUTO)
@TableId(type = IdType.ASSIGN_ID)
private Long id;
private Long reporterId;
/** COMMENT/USER/DRAMA */
@@ -14,7 +14,7 @@ import java.time.LocalDateTime;
@TableName("content_share")
public class ContentShare {
@TableId(type = IdType.AUTO)
@TableId(type = IdType.ASSIGN_ID)
private Long id;
private Long userId;
private Long dramaId;
@@ -17,7 +17,7 @@ import java.time.LocalDateTime;
@TableName("sensitive_word")
public class SensitiveWord {
@TableId(type = IdType.AUTO)
@TableId(type = IdType.ASSIGN_ID)
private Long id;
private String word;
/** POLITICS/PORN/ABUSE/AD/RELIGION */
@@ -15,7 +15,7 @@ import java.time.LocalDateTime;
@TableName("user_blocklist")
public class UserBlocklist {
@TableId(type = IdType.AUTO)
@TableId(type = IdType.ASSIGN_ID)
private Long id;
private Long userId;
private Long blockedUserId;