24 lines
1.3 KiB
C#
24 lines
1.3 KiB
C#
using AMREZ.EOP.Domain.Entities.Tenancy;
|
|
|
|
namespace AMREZ.EOP.Abstractions.Infrastructures.Repositories;
|
|
|
|
public interface ITenantRepository
|
|
{
|
|
Task<bool> TenantExistsAsync(string tenantKey, CancellationToken ct = default);
|
|
Task<TenantConfig?> GetAsync(string tenantKey, CancellationToken ct = default);
|
|
Task<IReadOnlyList<TenantConfig>> ListTenantsAsync(CancellationToken ct = default);
|
|
|
|
Task<bool> CreateAsync(TenantConfig row, CancellationToken ct = default);
|
|
Task<bool> UpdateAsync(TenantConfig row, DateTimeOffset? ifUnmodifiedSince, CancellationToken ct = default);
|
|
Task<bool> DeleteAsync(string tenantKey, CancellationToken ct = default);
|
|
|
|
Task<bool> MapDomainAsync(string domain, string tenantKey, CancellationToken ct = default);
|
|
Task<bool> UnmapDomainAsync(string domain, CancellationToken ct = default);
|
|
Task<IReadOnlyList<TenantDomain>> ListDomainsAsync(string? tenantKey, CancellationToken ct = default);
|
|
|
|
Task<bool> AddBaseDomainAsync(string baseDomain, CancellationToken ct = default);
|
|
Task<bool> RemoveBaseDomainAsync(string baseDomain, CancellationToken ct = default);
|
|
|
|
Task<string?> GetTenantKeyByTenantIdAsync(Guid tenantId, CancellationToken ct = default);
|
|
Task<Dictionary<Guid, string>> MapTenantKeysAsync(IEnumerable<Guid> tenantIds, CancellationToken ct = default);
|
|
} |