# SaveOutOfOfficeDTO.java

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

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

    /**
     * DTO: Save Out Of Office
     *
     * @author: yyt
     * 2026-03-18
     */
    @Data
    public class SaveOutOfOfficeDTO {

        /**
         * 类型（1:Sales 2:Front Desk 3:Accounting）
         */
        @NotNull(message = "the type can not be null")
        @Range(min = 1, max = 3, message = "the type must in [1:Sales, 2:Front Desk, 3:Accounting]")
        private Integer type;

        /**
         * 开始日期（yyyyMMdd）
         */
        @NotNull(message = "the startDate can not be null")
        @Pattern(regexp = "^\\d{4}\\d{2}\\d{2}$", message = "The startDate format is incorrect, right format is [yyyyMMdd]")
        private String startDate;

        /**
         * 结束日期（yyyyMMdd）
         */
        @NotNull(message = "the endDate can not be null")
        @Pattern(regexp = "^\\d{4}\\d{2}\\d{2}$", message = "The endDate format is incorrect, right format is [yyyyMMdd]")
        private String endDate;

        /**
         * 补位人员 id
         */
        @NotNull(message = "the substitutePersonnelId can not be null")
        private Integer substitutePersonnelId;

    }