# ScheduleDataPermissionEmailTargetDTO.java

    package cloud.wconnect.workperformance.pojo.dto.schedule;

    import lombok.AllArgsConstructor;
    import lombok.Data;
    import lombok.NoArgsConstructor;
    import org.hibernate.validator.constraints.Length;
    import org.hibernate.validator.constraints.Range;

    import jakarta.validation.constraints.Min;
    import jakarta.validation.constraints.NotNull;

    /**
     * DTO: 数据权限邮件配置
     *
     * @author yyt
     * @date 2023/7/15
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public class ScheduleDataPermissionEmailTargetDTO {

        /**
         * 来源（1：w-connect 2: manual 3: 用户组）
         */
        @NotNull(message = "The source must not be null.")
        @Range(min = 1, max = 3, message = "The source must in [1:user 2:manual 3:user group]")
        private Integer source;

        /**
         * id
         */
        @NotNull(message = "The identityId must not be null.")
        @Min(value = 0, message = "The identityId must >= 0.")
        private Integer identityId;

        /**
         * 用户姓名
         */
        @Length(max = 60, message = "The identityName is limited 60 characters")
        private String identityName;

        /**
         * 邮箱地址
         */
        @NotNull(message = "The email can not be null.")
        @Length(max = 60, message = "The email is limited 60 characters")
        private String email;

    }