package com.chinaweal.aiccs.org.entity.dto;

import lombok.Data;

/**
 * 统一认证平台相关DTO
 *
 * @author lroyia
 * @since 2025/03/02
 */
@Data
public class UnifiedAuthDTO {

    /**
     * 授权码
     */
    private String code;

    /**
     * 访问令牌
     */
    private String accessToken;

    /**
     * 令牌有效期（秒）
     */
    private Integer expiresIn;

    /**
     * 状态参数
     */
    private String state;

    /**
     * 错误码
     */
    private String error;

    /**
     * 错误描述
     */
    private String errorDescription;

    /**
     * 用户ID
     */
    private String userId;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 姓名
     */
    private String name;

    /**
     * 登录返回对象
     */
    @Data
    public static class TokenResponse {
        private String access_token;
        private Integer expires_in;
        private String error;
        private String error_description;
    }

    /**
     * 用户信息返回对象
     */
    @Data
    public static class UserInfoResponse {
        private String userId;
        private String idCard;
        private String userName;
        private String name;
        private String code;
        private String message;
        private String error;
        private String error_description;
    }

    /**
     * 登出返回对象
     */
    @Data
    public static class LogoutResponse {
        private String code;
        private String message;
    }
}