# BudgetDatabaseEmailConfigDTO.java

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

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

    /**
     * DTO: Email Config
     *
     * @author yyt
     * 2025/8/16
     */
    @Data
    @NoArgsConstructor
    public class BudgetDatabaseEmailConfigDTO {

        /**
         * 数据 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 = 1, message = "the type must in [1: expiration notice]")
        private Integer type;

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

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

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

    }