This commit is contained in:
many2many 2024-05-28 15:17:46 +08:00
parent 5411e1c408
commit b5cd65fa10
4 changed files with 1 additions and 27 deletions

View File

@ -16,7 +16,6 @@ import java.util.List;
@Index(name = "idx_comment_post_id", columnList = "post_id"), @Index(name = "idx_comment_post_id", columnList = "post_id"),
@Index(name = "idx_comment_user_id", columnList = "user_id") @Index(name = "idx_comment_user_id", columnList = "user_id")
}) })
@EntityListeners(AuditingEntityListener.class)
public class Comment extends BaseAuditingEntity{ public class Comment extends BaseAuditingEntity{
@Version @Version

View File

@ -19,7 +19,6 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener;
@Index(name = "idx_comment_content_type", columnList = "type"), @Index(name = "idx_comment_content_type", columnList = "type"),
@Index(name = "idx_comment_content_sort", columnList = "sort") @Index(name = "idx_comment_content_sort", columnList = "sort")
}) })
@EntityListeners(AuditingEntityListener.class)
public class CommentContent extends BaseAuditingEntity{ public class CommentContent extends BaseAuditingEntity{
@Comment("评论ID") @Comment("评论ID")

View File

@ -14,7 +14,6 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener;
@Table(name = "p_comment_reply", indexes = { @Table(name = "p_comment_reply", indexes = {
@Index(name = "idx_comment_reply_comment_id", columnList = "comment_id") @Index(name = "idx_comment_reply_comment_id", columnList = "comment_id")
}) })
@EntityListeners(AuditingEntityListener.class)
public class CommentReply extends BaseAuditingEntity{ public class CommentReply extends BaseAuditingEntity{
@Version @Version
private Long version; private Long version;

View File

@ -17,12 +17,7 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener;
}, uniqueConstraints = { }, uniqueConstraints = {
@UniqueConstraint(name = "idx_user_username", columnNames = {"username"}) @UniqueConstraint(name = "idx_user_username", columnNames = {"username"})
}) })
@EntityListeners(AuditingEntityListener.class) public class User extends BaseAuditingEntity{
public class User {
@Id
@Comment("用户ID")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Comment("昵称") @Comment("昵称")
@Column(name = "nickname", length = 32) @Column(name = "nickname", length = 32)
@ -52,22 +47,4 @@ public class User {
@Column(name = "is_admin",nullable = false) @Column(name = "is_admin",nullable = false)
private Boolean isAdmin = false; private Boolean isAdmin = false;
@Comment("创建时间")
@CreatedDate
@Column(name = "created_on", nullable = false)
private Long createdOn;
@Comment("修改时间")
@LastModifiedDate
@Column(name = "modified_on", nullable = false)
private Long modifiedOn;
@Comment("删除时间")
@Column(name = "deleted_on")
private Long deletedOn;
@Comment("是否删除 0 为未删除、1 为已删除")
@Column(name = "is_del")
private byte isDel = 0;
} }