mirror of https://github.com/halo-dev/halo
Add status field into Comment entity
parent
58ba745973
commit
dad37121a7
|
@ -2,6 +2,7 @@ package cc.ryanc.halo.model.dto;
|
|||
|
||||
import cc.ryanc.halo.model.dto.base.OutputConverter;
|
||||
import cc.ryanc.halo.model.entity.Comment;
|
||||
import cc.ryanc.halo.model.enums.CommentStatus;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
@ -30,6 +31,8 @@ public class CommentOutputDTO implements OutputConverter<CommentOutputDTO, Comme
|
|||
|
||||
private String content;
|
||||
|
||||
private CommentStatus status;
|
||||
|
||||
private String userAgent;
|
||||
|
||||
private Long parentId;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package cc.ryanc.halo.model.entity;
|
||||
|
||||
import cc.ryanc.halo.model.enums.CommentStatus;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
@ -57,6 +58,12 @@ public class Comment {
|
|||
@Column(name = "content", columnDefinition = "varchar(1024) not null")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* Comment status.
|
||||
*/
|
||||
@Column(name = "status", columnDefinition = "int default 1")
|
||||
private CommentStatus status;
|
||||
|
||||
/**
|
||||
* UA 信息
|
||||
*/
|
||||
|
|
|
@ -13,7 +13,7 @@ public enum CommentStatus implements ValueEnum<Integer> {
|
|||
PUBLISHED(0),
|
||||
|
||||
/**
|
||||
* 草稿
|
||||
* Auditing status.
|
||||
*/
|
||||
AUDITING(1),
|
||||
|
||||
|
|
Loading…
Reference in New Issue