package cn.reghao.tnb.search.esapp.blog.model.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * @author reghao
 * @date 2023-04-11 11:39:36
 */
@Setter
@Getter
public class ArticleDto {
    private String articleId;
    private String editor;
    @NotBlank
    private String title;
    @NotBlank
    private String content;
    @NotNull
    private Integer categoryId;
    @Size(min = 1, max = 10, message = "文章必须有标签, 且最多为 10 个")
    private List<String> tags;
    @NotNull
    private Boolean published;
    @NotNull
    private Integer postType;
}
