# CrEmailConfigDTO.java

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

    import lombok.*;
    import lombok.experimental.Accessors;
    import org.hibernate.validator.constraints.Length;
    import org.hibernate.validator.constraints.Range;

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

    /**
     * @author lichen
     * @description 邮件配置 DTO
     * @date 2023/3/11 9:15
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    @EqualsAndHashCode(callSuper = false)
    @Accessors(chain = true)
    public class CrEmailConfigDTO implements Serializable {

        private static final long serialVersionUID = 1L;

        /**
         * 主键id
         */
        @NotNull(message = "The id cannot be null")
        private Integer id;

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

        /**
         * 邮件
         */
        @NotNull(message = "The subject cannot be null")
        @Length(max = 200, message = "The subject max length is 200 chars.")
        private String subject;

        /**
         * 资产id
         */
        private Integer propertyId;
        /**
         * 邮件配置类型1:免费房入住信息 2:报告缺失 3:审批通知
         */
        @NotNull(message = "the type cannot be null")
        @Range(min = 1, max = 3, message = "The type must be 1:Comp room checked-in 2:Report Missed 3:Approval notify")
        private Integer type;
        /**
         * 收件人集合
         */
        @Valid
        private List<CrEmailTargetDTO> toList;
        /**
         * 抄送人集合
         */
        @Valid
        private List<CrEmailTargetDTO> ccList;

        /**
         * 状态
         */
        @NotNull(message = "The status cannot be null")
        private Boolean status;

    }