This commit is contained in:
whz 2024-05-24 09:07:07 +08:00
parent 1c34d98a7c
commit 7f868d2dbe

View File

@ -16,11 +16,7 @@ import org.springframework.data.jpa.domain.support.AuditingEntityListener;
@Table(name = "p_attachment", indexes = { @Table(name = "p_attachment", indexes = {
@Index(name = "idx_attachment_user", columnList = "user_id") @Index(name = "idx_attachment_user", columnList = "user_id")
}) })
@EntityListeners(AuditingEntityListener.class) public class Attachment extends BaseAuditingEntity{
public class Attachment {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(name = "file_size", nullable = false) @Column(name = "file_size", nullable = false)
private Long fileSize = 0L; private Long fileSize = 0L;
@ -40,24 +36,6 @@ public class Attachment {
@Column(name = "content", nullable = false) @Column(name = "content", nullable = false)
private String content; 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) @ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_id") @JoinColumn(name = "user_id")
private User user; private User user;