# HkEfficiencyEmailTargetDTO.java

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

    import lombok.AllArgsConstructor;
    import lombok.Builder;
    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 zc
     * @date 2023/3/24
     */
    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public class HkEfficiencyEmailTargetDTO {

        /**
         * 目标类型(1:To,2:CC)
         */
        private Integer targetType;

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

        /**
         * 身份ID。用户来源是manual时，此值为0
         */
        @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;

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

    }