ref
This commit is contained in:
parent
1c34d98a7c
commit
7f868d2dbe
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user