# EngineeringRequestNotificationDTO.java

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

    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: Engineering Request Notification
     *
     * @author yyt
     * 2023/3/30
     */
    @Data
    @NoArgsConstructor
    public class EngineeringRequestNotificationDTO {

        /**
         * 通知 id
         */
        private Integer id;

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

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

        /**
         * 通知类型（0：邮件）
         */
        @NotNull(message = "the type must not be null")
        @Range(min = 0, max = 0, message = "the type must is [0:email]")
        private Integer type;

        /**
         * 推送人
         */
        @Valid
        private List<EngineeringRequestNotificationTargetDTO> toList;

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

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

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

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

    }