优化
This commit is contained in:
parent
5411e1c408
commit
b5cd65fa10
@ -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
|
||||
|
@ -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")
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user