# ClcEmailConfigDTO.java

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

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

    import jakarta.validation.Valid;
    import jakarta.validation.constraints.NotNull;
    import java.util.List;

    /**
     * DTO: Clc Email Config
     *
     * @author yyt
     * 2023/7/25
     */
    @Data
    @NoArgsConstructor
    public class ClcEmailConfigDTO {

        /**
         * 数据 id
         */
        private Integer id;

        /**
         * 资产 id
         */
        private Integer propertyId;

        /**
         * 邮件主题
         */
        @NotNull(message = "the subject must not be null")
        @Length(max = 200, message = "the subject max length is 200")
        private String subject;

        /**
         * 默认主题
         */
        private String defaultSubject;

        /**
         * 类型（类型 1：arrival 报告缺失，2：missing 状态通知，3：通知酒店处理 clc 平台顾客退房，4：guest in house 报告缺失）
         */
        @NotNull(message = "the type must not be null")
        @Range(min = 1, max = 4, message = "the type must in [1: arrival report missing, 2: notify missing opera arrival, 3: notify handle check out 4: guest in house report missing]")
        private Integer type;

        /**
         * 收件人
         */
        @Valid
        private List<ClcEmailTargetDTO> toList;

        /**
         * 抄送人
         */
        @Valid
        private List<ClcEmailTargetDTO> ccList;

        /**
         * 状态（false：关闭，true：开启）
         */
        @NotNull(message = "the status must not be null")
        private Boolean status;

        public void setSubject(String subject) {
            this.subject = subject.trim();
        }

        public ClcEmailConfigDTO(String defaultSubject) {
            this.defaultSubject = defaultSubject;
        }

    }