35 lines
862 B
C#
35 lines
862 B
C#
using Tiku.Domain.Tenancy;
|
|
|
|
namespace Tiku.Application.Auth;
|
|
|
|
public sealed record CurrentUserTenant(
|
|
Guid TenantId,
|
|
string TenantName,
|
|
string TenantSlug,
|
|
TenantRole Role,
|
|
MembershipStatus Status);
|
|
|
|
public sealed record CurrentUserProfile(
|
|
Guid UserId,
|
|
string? Phone,
|
|
string? Email,
|
|
string? Name,
|
|
IReadOnlyCollection<CurrentUserTenant> Tenants);
|
|
|
|
public sealed record CurrentTenantMembership(
|
|
Guid TenantId,
|
|
string TenantName,
|
|
string TenantSlug,
|
|
TenantStatus Status,
|
|
TenantRole Role);
|
|
|
|
public interface ICurrentIdentityQueryService
|
|
{
|
|
Task<CurrentUserProfile?> GetUserAsync(Guid userId, CancellationToken cancellationToken = default);
|
|
|
|
Task<CurrentTenantMembership?> GetTenantMembershipAsync(
|
|
Guid userId,
|
|
Guid tenantId,
|
|
CancellationToken cancellationToken = default);
|
|
}
|