This commit is contained in:
Thanakarn Klangkasame
2025-09-30 11:01:02 +07:00
commit 92e614674c
182 changed files with 9596 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
namespace AMREZ.EOP.Abstractions.Applications.Tenancy;
public interface ITenantContext
{
string TenantKey { get; }
string Id { get; }
string? Schema { get; }
string? ConnectionString { get; }
}

View File

@@ -0,0 +1,6 @@
namespace AMREZ.EOP.Abstractions.Applications.Tenancy;
public interface ITenantDbContextFactory
{
TContext Create<TContext>(ITenantContext tenant) where TContext : class;
}

View File

@@ -0,0 +1,8 @@
using Microsoft.AspNetCore.Http;
namespace AMREZ.EOP.Abstractions.Applications.Tenancy;
public interface ITenantResolver
{
ITenantContext? Resolve(HttpContext http, object? hint = null);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Authentications.AddEmailIdentity;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Authentications;
public interface IAddEmailIdentityUseCase
{
Task<bool> ExecuteAsync(AddEmailIdentityRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Authentications.ChangePassword;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Authentications;
public interface IChangePasswordUseCase
{
Task<bool> ExecuteAsync(ChangePasswordRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Authentications.DisableMfa;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Authentications;
public interface IDisableMfaUseCase
{
Task<bool> ExecuteAsync(DisableMfaRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Authentications.EnableTotp;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Authentications;
public interface IEnableTotpUseCase
{
Task<EnableTotpResponse?> ExecuteAsync(EnableTotpRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Authentications.Login;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Authentications;
public interface ILoginUseCase
{
Task<LoginResponse?> ExecuteAsync(LoginRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Authentications.LogoutAll;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Authentications;
public interface ILogoutAllUseCase
{
Task<int> ExecuteAsync(LogoutAllRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Authentications.Logout;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Authentications;
public interface ILogoutUseCase
{
Task<bool> ExecuteAsync(LogoutRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Authentications.Register;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Authentications;
public interface IRegisterUseCase
{
Task<RegisterResponse?> ExecuteAsync(RegisterRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Authentications.VerifyEmail;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Authentications;
public interface IVerifyEmailUseCase
{
Task<bool> ExecuteAsync(VerifyEmailRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,9 @@
using AMREZ.EOP.Contracts.DTOs.HumanResources.EmergencyContact;
using AMREZ.EOP.Contracts.DTOs.HumanResources.EmergencyContactAdd;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.HumanResources;
public interface IAddEmergencyContactUseCase
{
Task<EmergencyContactResponse?> ExecuteAsync(EmergencyContactAddRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,9 @@
using AMREZ.EOP.Contracts.DTOs.HumanResources.EmployeeAddress;
using AMREZ.EOP.Contracts.DTOs.HumanResources.EmployeeAddressAdd;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.HumanResources;
public interface IAddEmployeeAddressUseCase
{
Task<EmployeeAddressResponse?> ExecuteAsync(EmployeeAddressAddRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,9 @@
using AMREZ.EOP.Contracts.DTOs.HumanResources.EmployeeBankAccount;
using AMREZ.EOP.Contracts.DTOs.HumanResources.EmployeeBankAccountAdd;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.HumanResources;
public interface IAddEmployeeBankAccountUseCase
{
Task<EmployeeBankAccountResponse?> ExecuteAsync(EmployeeBankAccountAddRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,9 @@
using AMREZ.EOP.Contracts.DTOs.HumanResources.Employment;
using AMREZ.EOP.Contracts.DTOs.HumanResources.EmploymentAdd;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.HumanResources;
public interface IAddEmploymentUseCase
{
Task<EmploymentResponse?> ExecuteAsync(EmploymentAddRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.HumanResources.EmploymentEnd;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.HumanResources;
public interface IEndEmploymentUseCase
{
Task<bool> ExecuteAsync(EmploymentEndRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.HumanResources.SetPrimaryAddress;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.HumanResources;
public interface ISetPrimaryAddressUseCase
{
Task<bool> ExecuteAsync(SetPrimaryAddressRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.HumanResources.SetPrimaryBankAccount;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.HumanResources;
public interface ISetPrimaryBankAccountUseCase
{
Task<bool> ExecuteAsync(SetPrimaryBankAccountRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.HumanResources.SetPrimaryEmergencyContact;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.HumanResources;
public interface ISetPrimaryEmergencyContactUseCase
{
Task<bool> ExecuteAsync(SetPrimaryEmergencyContactRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,9 @@
using AMREZ.EOP.Contracts.DTOs.HumanResources.UserProfile;
using AMREZ.EOP.Contracts.DTOs.HumanResources.UserProfileUpsert;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.HumanResources;
public interface IUpsertUserProfileUseCase
{
Task<UserProfileResponse?> ExecuteAsync(UserProfileUpsertRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Tenancy.AddBaseDomain;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Tenancy;
public interface IAddBaseDomainUseCase
{
Task<AddBaseDomainResponse?> ExecuteAsync(AddBaseDomainRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Tenancy.CreateTenant;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Tenancy;
public interface ICreateTenantUseCase
{
Task<CreateTenantResponse?> ExecuteAsync(CreateTenantRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,6 @@
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Tenancy;
public interface IDeleteTenantUseCase
{
Task<bool> ExecuteAsync(string tenantKey, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Tenancy.ListDomains;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Tenancy;
public interface IListDomainsUseCase
{
Task<ListDomainsResponse?> ExecuteAsync(ListDomainsRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Tenancy.ListTenants;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Tenancy;
public interface IListTenantsUseCase
{
Task<ListTenantsResponse?> ExecuteAsync(ListTenantsRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Tenancy.MapDomain;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Tenancy;
public interface IMapDomainUseCase
{
Task<MapDomainResponse?> ExecuteAsync(MapDomainRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Tenancy.RemoveBaseDomain;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Tenancy;
public interface IRemoveBaseDomainUseCase
{
Task<RemoveBaseDomainResponse?> ExecuteAsync(RemoveBaseDomainRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,6 @@
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Tenancy;
public interface ITenantProvisioner
{
Task ProvisionAsync(string tenantKey, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Tenancy.UnmapDomain;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Tenancy;
public interface IUnmapDomainUseCase
{
Task<UnmapDomainResponse?> ExecuteAsync(UnmapDomainRequest request, CancellationToken ct = default);
}

View File

@@ -0,0 +1,8 @@
using AMREZ.EOP.Contracts.DTOs.Tenancy.UpdateTenant;
namespace AMREZ.EOP.Abstractions.Applications.UseCases.Tenancy;
public interface IUpdateTenantUseCase
{
Task<UpdateTenantResponse?> ExecuteAsync(UpdateTenantRequest request, CancellationToken ct = default);
}