package com.m2pool.auth.entity;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @Description 用户注册对象
 * @Date 2024/6/12 16:16
 * @Author dy
 */
@Data
public class RegisterBody{

    //todo 添加注册详细信息
    /** 手机号码 */
    private String phone;

    @Email(message = "邮箱格式错误")
    private String email;

    private String emailCode;

    /** 密码 */
    @NotNull(message = "密码不能为空")
    //@Size(min=8, max=32,message="密码长度必须在 8 ~ 32 字符之间！")
    //@Pattern(regexp="^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\\W_]+$)(?![a-z0-9]+$)(?![a-z\\W_]+$)(?![0-9\\W_]+$)[a-zA-Z0-9\\W_]{8,32}$",message="密码格式错误,密码应包含大写字母、小写字母、数字以及特殊字符，8到32位")
    private String password;
}
