
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 lombok.Data;
import lombok.ToString;

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

/**
 * 用于登陆传递账号密码
 *
 * @author tmerclub
 * @date 2020/7/1
 */
@Data
@ToString
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;

}
