package org.dromara.common.core.domain.model;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户注册对象
 *
 * @author Lion Li
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class RegisterBody extends LoginBody {

    /**
     * 用户名
     */
    //@NotBlank(message = "{user.username.not.blank}")
    //@Length(min = 2, max = 20, message = "{user.username.length.valid}")
    private String username;

    /**
     * 用户密码
     */
    //@NotBlank(message = "{user.password.not.blank}")
    //@Length(min = 5, max = 20, message = "{user.password.length.valid}")
    private String password;

    private String userType;
    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phonenumber;

}
