package com.ruoyi.hezhi.domain.dto;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 学员对象 tb_student
 *
 * @author ruoyi
 * @date 2024-10-21
 */
@Getter
@Setter
@ToString
public class StudentDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 学员认证 */
    public interface authenticationStudent{}
    /** 手机号登录 */
    public interface userPhoneLogin{}
    /** 身份证号码登录 */
    public interface userIdentityCardLogin{}
    /** 找回密码 */
    public interface userRetrievePassword{}
    /** 用户修改个人资料 */
    public interface updateMemberInfo{}
    /** 扫码登录轮询 */
    public interface userCodeLogin{}

    /** 学员主键ID */
    private Long studentId;

    /** 用户ID */
    @NotNull(message = "请先登录", groups = {updateMemberInfo.class})
    private Long memberUserId;

    /** 邀请人ID */
    private Long parentId;

    /** 邀请人编号 */
    private String parentNumber;

    /** 头像 */
    private String headPortrait;

    /** 昵称 */
    @NotBlank(message = "缺少昵称", groups = {updateMemberInfo.class})
    private String nickName;

    /** 姓名 */
    @NotBlank(message = "缺少姓名", groups = {authenticationStudent.class})
    private String studentName;

    /** 性别（0-男，1-女，2-未知） */
    @NotNull(message = "缺少性别", groups = {authenticationStudent.class, updateMemberInfo.class})
    private Integer sex;

    /** 出生日期 */
    @NotBlank(message = "缺少出生日期", groups = {authenticationStudent.class})
    private String birthday;

    /** 电话/手机 */
    @NotBlank(message = "缺少电话/手机", groups = {authenticationStudent.class, userPhoneLogin.class, userRetrievePassword.class, updateMemberInfo.class})
    private String phone;

    /** 身份证号 */
    @NotBlank(message = "缺少身份证号", groups = {userIdentityCardLogin.class, userRetrievePassword.class})
    private String identityCard;

    /** 身份证国徽面（正面） */
    @NotBlank(message = "缺少身份证国徽面（正面）", groups = {authenticationStudent.class})
    private String identityCardBadge;

    /** 身份证人像面（反面） */
    @NotBlank(message = "缺少身份证人像面（反面）", groups = {authenticationStudent.class})
    private String identityCardPortrait;

    /** 毕业证书（多个用英文逗号隔开） */
    // @NotBlank(message = "缺少毕业证书", groups = {authenticationStudent.class})
    private String graduationCertificate;

    /** 学历（0-无，1-小学，2-初中，3-高中，4-中专，5-专科，6-本科，7-研究生） */
    @NotNull(message = "缺少学历", groups = {updateMemberInfo.class})
    private String education;

    /** 验证码uuid */
    @NotBlank(message = "验证码uuid不能为空", groups = {userPhoneLogin.class})
    private String uuid;

    /** 图形验证码 */
    @NotBlank(message = "图形验证码不能为空", groups = {userPhoneLogin.class, userRetrievePassword.class})
    private String code;

    /** 短信验证码 */
    @NotBlank(message = "短信验验证码不能为空", groups = {userPhoneLogin.class, updateMemberInfo.class})
    private String smsCode;

    /** 密码未加密 */
    @NotBlank(message = "缺少密码", groups = {userIdentityCardLogin.class, userRetrievePassword.class})
    private String passwordUnencrypted;

    /** 确认密码未加密 */
    @NotBlank(message = "缺少确认密码", groups = {userRetrievePassword.class})
    private String passwordUnencryptedConfirm;

    /** 毕业院校 */
    @NotBlank(message = "缺少毕业院校", groups = {updateMemberInfo.class})
    private String graduationSchool;

    /** 毕业时间 */
    @NotBlank(message = "缺少毕业时间", groups = {updateMemberInfo.class})
    private String graduationTime;

    /** 扫码登录uuid */
    @NotBlank(message = "扫码不能为空", groups = {userCodeLogin.class})
    private String scanUuid;

}
