namespace Fengling.Console.Models.Dtos;

/// <summary>
/// OAuth客户端详细信息DTO
/// </summary>
public class OAuthClientDto
{
    /// <summary>
    /// 客户端唯一标识符
    /// </summary>
    public string Id { get; set; } = string.Empty;

    /// <summary>
    /// 客户端ID，用于OAuth授权流程中的标识
    /// </summary>
    public string ClientId { get; set; } = string.Empty;

    /// <summary>
    /// 客户端显示名称
    /// </summary>
    public string DisplayName { get; set; } = string.Empty;

    /// <summary>
    /// 客户端描述信息
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 回调地址列表，用于OAuth授权回调
    /// </summary>
    public string[] RedirectUris { get; set; } = Array.Empty<string>();

    /// <summary>
    /// 注销回调地址列表
    /// </summary>
    public string[] PostLogoutRedirectUris { get; set; } = Array.Empty<string>();

    /// <summary>
    /// 授权范围列表
    /// </summary>
    public string[] Scopes { get; set; } = Array.Empty<string>();

    /// <summary>
    /// 授权类型列表
    /// </summary>
    public string[] GrantTypes { get; set; } = Array.Empty<string>();

    /// <summary>
    /// 客户端类型：public（公开客户端）或 confidential（机密客户端）
    /// </summary>
    public string? ClientType { get; set; }

    /// <summary>
    /// 授权同意类型：implicit、explicit或system
    /// </summary>
    public string? ConsentType { get; set; }

    /// <summary>
    /// 客户端状态：active、inactive或suspended
    /// </summary>
    public string Status { get; set; } = "active";
}

/// <summary>
/// OAuth客户端列表分页结果DTO
/// </summary>
public class OAuthClientListDto : PagedResultDto<OAuthClientDto>
{
}
