From b5cd65fa102d87d920bdd6decab2d7430d3bc54f Mon Sep 17 00:00:00 2001 From: many2many <6168830@qq.com> Date: Tue, 28 May 2024 15:17:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/lk/paopao/entity/Comment.java | 1 - .../com/lk/paopao/entity/CommentContent.java | 1 - .../com/lk/paopao/entity/CommentReply.java | 1 - src/main/java/com/lk/paopao/entity/User.java | 25 +------------------ 4 files changed, 1 insertion(+), 27 deletions(-) diff --git a/src/main/java/com/lk/paopao/entity/Comment.java b/src/main/java/com/lk/paopao/entity/Comment.java index 6aaf595..8a379e3 100644 --- a/src/main/java/com/lk/paopao/entity/Comment.java +++ b/src/main/java/com/lk/paopao/entity/Comment.java @@ -16,7 +16,6 @@ import java.util.List; @Index(name = "idx_comment_post_id", columnList = "post_id"), @Index(name = "idx_comment_user_id", columnList = "user_id") }) -@EntityListeners(AuditingEntityListener.class) public class Comment extends BaseAuditingEntity{ @Version diff --git a/src/main/java/com/lk/paopao/entity/CommentContent.java b/src/main/java/com/lk/paopao/entity/CommentContent.java index a357cde..d7432a3 100644 --- a/src/main/java/com/lk/paopao/entity/CommentContent.java +++ b/src/main/java/com/lk/paopao/entity/CommentContent.java @@ -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_sort", columnList = "sort") }) -@EntityListeners(AuditingEntityListener.class) public class CommentContent extends BaseAuditingEntity{ @Comment("评论ID") diff --git a/src/main/java/com/lk/paopao/entity/CommentReply.java b/src/main/java/com/lk/paopao/entity/CommentReply.java index 3fdc5ad..8482ed8 100644 --- a/src/main/java/com/lk/paopao/entity/CommentReply.java +++ b/src/main/java/com/lk/paopao/entity/CommentReply.java @@ -14,7 +14,6 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener; @Table(name = "p_comment_reply", indexes = { @Index(name = "idx_comment_reply_comment_id", columnList = "comment_id") }) -@EntityListeners(AuditingEntityListener.class) public class CommentReply extends BaseAuditingEntity{ @Version private Long version; diff --git a/src/main/java/com/lk/paopao/entity/User.java b/src/main/java/com/lk/paopao/entity/User.java index 5ff8812..39c8e51 100644 --- a/src/main/java/com/lk/paopao/entity/User.java +++ b/src/main/java/com/lk/paopao/entity/User.java @@ -17,12 +17,7 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener; }, uniqueConstraints = { @UniqueConstraint(name = "idx_user_username", columnNames = {"username"}) }) -@EntityListeners(AuditingEntityListener.class) -public class User { - @Id - @Comment("用户ID") - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; +public class User extends BaseAuditingEntity{ @Comment("昵称") @Column(name = "nickname", length = 32) @@ -52,22 +47,4 @@ public class User { @Column(name = "is_admin",nullable = 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; - } \ No newline at end of file