# RevenueEmailConfigDTO.java

    package cloud.wconnect.rateshop.pojo.dto.revenue;

    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: Revenue Email Config
     *
     * @author yyt
     * 2023/10/28
     */
    @Data
    @NoArgsConstructor
    public class RevenueEmailConfigDTO {

        /**
         * 数据 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;

        /**
         * 类型
         */
        @NotNull(message = "the type must not be null")
        @Range(min = 1, max = 27, message = "the type must in [1: history and forecast report missing, 2: business block report missing, 3: reservation statistics report missing," +
                " 4: reservation forecast report missing, 5: reservation forecast next month report missing, 6: history forecast next month report missing," +
                " 8: Reservations Forecast Next 14 days,9:History and Forecast Next 90 days,10:Market Code,11:Occ Jump Alert, " +
                "12：History and Forecast this month，13：History and Forecast next month，14：History and Forecast the month after next，" +
                "16：Reservation Forecast next 90 days，17：History and Forecast Business Block next 90 days," +
                "19：Manager flash,20：Detailed Availability Next 14 days,21：Rate Review notify," +
                "22：Group Pickup, 23:History and Forecast from thirty days ago to yesterday," +
                "24: reservation forecast this month," +
                "25：Occupancy Summary yesterday," +
                "26：Market Segment Summary yesterday," +
                "27：Market Segment Summary history 30 days]")
        private Integer type;

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

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

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

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

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

    }