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

import javax.validation.constraints.NotBlank;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


/**
 * OAuth令牌请求DTO
 *
 * @author lroyia
 * @since 2025/11/21
 */
@Data
@ApiModel(value = "OAuth令牌请求DTO")
public class TokenRequestDTO {

    @NotBlank(message = "授权类型不能为空")
    @ApiModelProperty(value = "授权类型", example = "authorization_code")
    private String grantType;

    @ApiModelProperty(value = "授权码（授权码模式使用）", example = "SplxlOBeZQQYbYS6WxSbIA")
    private String code;

    @ApiModelProperty(value = "重定向URI（授权码模式使用）", example = "https://client.example.com/callback")
    private String redirectUri;

    @ApiModelProperty(value = "刷新令牌（刷新令牌模式使用）", example = "refresh_token_67890")
    private String refreshToken;

    @ApiModelProperty(value = "用户名（密码模式使用）", example = "john.doe")
    private String username;

    @ApiModelProperty(value = "密码（密码模式使用）", example = "password123")
    private String password;

    @ApiModelProperty(value = "授权范围", example = "read write")
    private String scope;

    @NotBlank(message = "客户端ID不能为空")
    @ApiModelProperty(value = "客户端ID", example = "client123")
    private String clientId;

    @ApiModelProperty(value = "客户端密钥", example = "secret-key-abc123")
    private String clientSecret;
}