package cn.iocoder.yudao.module.system.controller.admin.auth.vo;

import cn.iocoder.yudao.module.system.dal.dataobject.tenant.TenantDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 登录 Response VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class AuthLoginRespVO {

    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private Long userId;

    @Schema(description = "访问令牌", requiredMode = Schema.RequiredMode.REQUIRED, example = "happy")
    private String accessToken;

    @Schema(description = "刷新令牌", requiredMode = Schema.RequiredMode.REQUIRED, example = "nice")
    private String refreshToken;

    @Schema(description = "过期时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime expiresTime;

    @Schema(description = "租户id")
    private Long tenantId;

    private String tenantName;

    private String username;

    @Schema(description = "登陆平台,0-企业，1-集团", requiredMode = Schema.RequiredMode.REQUIRED, example = "buzhidao")
    private Integer loginPlatform;

    @Schema(description = "登陆设备,1-pc，2-h5", requiredMode = Schema.RequiredMode.REQUIRED, example = "buzhidao")
    private Integer loginDevice;

    @Schema(description = "登陆标识, 0-企业登陆，1-集团登陆，2-企业和集团登陆")
    private Integer loginFlag;

    @Schema(description = "可登陆租户列表")
    private List<TenantDO> tenantDOList;

}
