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

import com.zhongshu.card.client.model.org.OrganizationSimpleModel;
import com.zhongshu.card.client.model.org.OrganizationUserModel;
import com.zhongshu.card.client.model.org.UserCountModel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Set;

/**
 * 通用登录返回的数据模型
 *
 * @author TRX
 * @date 2024/9/24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LoginCommonModel {

    @Schema(description = "token")
    private String access_token;

    private String token_type;

    @Schema(description = "刷新token的token")
    private String refresh_token;

    private Integer expires_in;

    private String scope;

    @Schema(description = "用户基本信息")
    private UserCountModel userInfo;

    @Schema(description = "平台的oid")
    private String platformOid;

    @Schema(description = "平台机构信息")
    private OrganizationSimpleModel platformInfo;

    @Schema(description = "用户权限列表")
    private Set<String> auths;

    @Schema(description = "权限字符串")
    private String permiss;
}
