From 7f868d2dbebde587a7d7783d3aa2f9a185ab841f Mon Sep 17 00:00:00 2001 From: whz <303054730@qq.com> Date: Fri, 24 May 2024 09:07:07 +0800 Subject: [PATCH] ref --- .../java/com/lk/paopao/entity/Attachment.java | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/main/java/com/lk/paopao/entity/Attachment.java b/src/main/java/com/lk/paopao/entity/Attachment.java index cbc26a2..2c620bc 100644 --- a/src/main/java/com/lk/paopao/entity/Attachment.java +++ b/src/main/java/com/lk/paopao/entity/Attachment.java @@ -16,11 +16,7 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener; @Table(name = "p_attachment", indexes = { @Index(name = "idx_attachment_user", columnList = "user_id") }) -@EntityListeners(AuditingEntityListener.class) -public class Attachment { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; +public class Attachment extends BaseAuditingEntity{ @Column(name = "file_size", nullable = false) private Long fileSize = 0L; @@ -40,24 +36,6 @@ public class Attachment { @Column(name = "content", nullable = false) private String content; - @Comment("创建时间") - @CreatedDate - @Column(name = "created_on", nullable = false) - private Long createdOn; - - @Comment("修改时间") - @LastModifiedDate - @Column(name = "modified_on", nullable = false) - private Long modifiedOn; - - @Comment("删除时间") - @Column() - private Long deletedOn = 0L; - - @Comment("是否删除 0 为未删除、1 为已删除") - @Column(name = "is_del", nullable = false) - private byte isDel = 0; - @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "user_id") private User user;