
package com.tmerclub.cloud.auth.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

import java.io.Serial;
import java.io.Serializable;

/**
 * 用于登陆传递账号密码
 *
 * @author tmerclub
 * @date 2020/7/1
 */
public class AuthenticationDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 用户名
     */
    @NotBlank(message = "userName不能为空")
    @Schema(description = "用户名/邮箱/手机号", requiredMode = Schema.RequiredMode.REQUIRED)
    protected String userName;

    /**
     * 密码
     */
    @NotBlank(message = "passWord不能为空")
    @Schema(description = "一般用作密码", requiredMode = Schema.RequiredMode.REQUIRED)
    protected String passWord;

    /**
     * sysType 参考SysTypeEnum
     */
    @NotNull(message = "sysType不能为空")
    @Schema(description = "系统类型 0.普通用户系统 1.商家端", requiredMode = Schema.RequiredMode.REQUIRED)
    protected Integer sysType;

    @Schema(description = "零时的uid，微信公众号支付需要openid，但用户又不绑定社交账号，所以这个openId是临时的")
    protected String tempUid;

    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;
    }

    public Integer getSysType() {
        return sysType;
    }

    public void setSysType(Integer sysType) {
        this.sysType = sysType;
    }

    public String getTempUid() {
        return tempUid;
    }

    public void setTempUid(String tempUid) {
        this.tempUid = tempUid;
    }

    @Override
    public String toString() {
        return "AuthenticationDTO{" +
                "userName='" + userName + '\'' +
                ", passWord='" + passWord + '\'' +
                ", sysType=" + sysType +
                ", tempUid='" + tempUid + '\'' +
                '}';
    }
}
