forked from gongxuegit/tiku-backend.net
feat: enforce tenant isolation and shared question bank
This commit is contained in:
22
Tiku.Application/Tenancy/TenantDirectoryModels.cs
Normal file
22
Tiku.Application/Tenancy/TenantDirectoryModels.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Tiku.Domain.Tenancy;
|
||||
|
||||
namespace Tiku.Application.Tenancy;
|
||||
|
||||
public sealed record TenantDirectoryEntry(
|
||||
Guid TenantId,
|
||||
string TenantCode,
|
||||
string Name,
|
||||
TenantStatus Status,
|
||||
TenantMode Mode,
|
||||
string? Host);
|
||||
|
||||
public interface ITenantDirectory
|
||||
{
|
||||
Task<TenantDirectoryEntry?> FindByHostAsync(
|
||||
string host,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
Task<TenantDirectoryEntry?> FindByCodeAsync(
|
||||
string tenantCode,
|
||||
CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user