# LogbookCommentDTO.java

    package cloud.wconnect.frontoffice.pojo.dto.logbook;

    import lombok.Data;
    import org.hibernate.validator.constraints.Range;

    import jakarta.validation.constraints.NotBlank;
    import jakarta.validation.constraints.NotNull;

    /**
     * DTO: Logbook Comment
     *
     * @author yyt
     * 2023/3/21
     */
    @Data
    public class LogbookCommentDTO {

        /**
         * id
         */
        private Integer id;

        /**
         * 操作人
         */
        private Integer createId;

        /**
         * 操作人
         */
        private String createName;

        /**
         * 头像
         */
        private String avatar;

        /**
         * 创建时间
         */
        private Long createTime;

        /**
         * 内容
         */
        @NotBlank(message = "the content must not be blank")
        private String content;

        /**
         * 0:文字评论 1：图片评论，content为图片地址
         */
        @NotNull(message = "the commentType must not be null")
        @Range(min = 0, max = 1, message = "the commentType must in [0:text, 1:image]")
        private Integer commentType;

    }