package com.zhongshu.card.client.model.org;

import com.github.microservice.auth.client.type.DeviceType;
import com.github.microservice.auth.client.type.LoginType;
import com.zhongshu.card.client.type.LoginFromType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Schema(name = "LoginParam", description = "用户登陆参数")
public class LoginParam {

    //用户设备类型
    @Schema(name = "deviceType", required = true, example = "Pc")
    private DeviceType deviceType = DeviceType.Pc;

    //用户设备编码
    @Schema(name = "deviceUUid", required = false, example = "123456")
    private String deviceUUid;

    //登陆类型
    @Schema(name = "loginType", required = true, example = "Phone")
    private LoginType loginType = LoginType.Phone;

    //登陆名
    @Schema(name = "loginValue", required = true, example = "18723497166")
    private String loginValue;

    //密码
    @Schema(name = "passWord", required = true, example = "123abc")
    private String passWord;

    //微信小程序openId
    @Schema(name = "openId", required = false, example = "sss")
    private String openId;

    //访问令牌超时时间 (秒)
    @Schema(name = "accessTokenTimeOut", required = false, example = "259200")
    private Long accessTokenTimeOut = 10 * 60 * 60L;

    //刷新令牌超时时间 (秒)
    @Schema(name = "refreshTokenTimeOut", required = false, example = "31536000")
    private Long refreshTokenTimeOut;

    @Schema(description = "登录端类型 平台  学校  c端  商家小程序 ", required = true)
    private LoginFromType loginFromType;

    @Schema(description = "机构oid，如：平台、学校、商户等的oid")
    private String oid;
}
