forked from gongxuegit/tiku-backend.net
docs: include dto comments in openapi schemas
This commit is contained in:
@@ -2,18 +2,41 @@ using Tiku.Domain.Tenancy;
|
||||
|
||||
namespace Tiku.Application.Auth;
|
||||
|
||||
/// <summary>
|
||||
/// 认证令牌对。
|
||||
/// </summary>
|
||||
/// <param name="AccessToken">用于访问 API 的 JWT access token。</param>
|
||||
/// <param name="RefreshToken">用于刷新会话的 refresh token,服务端只保存哈希。</param>
|
||||
/// <param name="AccessTokenExpiresAt">access token 过期时间。</param>
|
||||
/// <param name="RefreshTokenExpiresAt">refresh token 过期时间。</param>
|
||||
public sealed record AuthTokenPair(
|
||||
string AccessToken,
|
||||
string RefreshToken,
|
||||
DateTimeOffset AccessTokenExpiresAt,
|
||||
DateTimeOffset RefreshTokenExpiresAt);
|
||||
|
||||
/// <summary>
|
||||
/// 当前登录租户成员摘要。
|
||||
/// </summary>
|
||||
/// <param name="TenantId">租户 ID。</param>
|
||||
/// <param name="TenantName">租户名称。</param>
|
||||
/// <param name="Role">当前用户在租户内的角色。</param>
|
||||
/// <param name="Status">租户成员状态。</param>
|
||||
public sealed record TenantMembershipSummary(
|
||||
Guid TenantId,
|
||||
string TenantName,
|
||||
TenantRole Role,
|
||||
MembershipStatus Status);
|
||||
|
||||
/// <summary>
|
||||
/// 登录成功后的应用层用户信息。
|
||||
/// </summary>
|
||||
/// <param name="UserId">用户 ID。</param>
|
||||
/// <param name="Phone">手机号。</param>
|
||||
/// <param name="Email">邮箱。</param>
|
||||
/// <param name="Name">用户显示名称。</param>
|
||||
/// <param name="Tenant">当前登录租户成员摘要。</param>
|
||||
/// <param name="Tokens">认证令牌对。</param>
|
||||
public sealed record AuthenticatedUser(
|
||||
Guid UserId,
|
||||
string? Phone,
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user