package com.trade.client.enterprise.customer.domain.model;

import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * @description: 登录body
 * @Author: wanglang
 * @Date: 2024/4/1 17:21
 * @Version: 1.0
 */
public class LoginMo {

    @ApiModelProperty(name = "userName", value = "登录名")
    /** 手机号或者客户昵称 */
    @NotEmpty(message = "登录名不能为空")
    @Pattern(regexp = "([a-zA-Z0-9]{6,16})|(\\d{11})", message = "登录名必须是6～16位数字和字母的组合,手机号必须是11位数字")
    /**
     * 用户名
     */
    private String userName;
    /**
     * 用户密码
     */
    @NotEmpty(message = "密码不能为空")
    @Pattern(regexp = "^(?=.*[a-zA-Z])(?=.*\\d)(?=.*[@#$%^&*_+-=]).{8,16}$", message = "密码必须是8～16位数字、字母以及特殊字符的组合")
    private String password;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
