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,8 @@
namespace AMREZ.EOP.Contracts.DTOs.Authentications.AddEmailIdentity;
public sealed class AddEmailIdentityRequest
{
public Guid UserId { get; set; }
public string Email { get; set; } = default!;
public bool IsPrimary { get; set; } = true;
}

View File

@@ -0,0 +1,8 @@
namespace AMREZ.EOP.Contracts.DTOs.Authentications.ChangePassword;
public sealed class ChangePasswordRequest
{
public Guid UserId { get; set; }
public string OldPassword { get; set; } = default!;
public string NewPassword { get; set; } = default!;
}

View File

@@ -0,0 +1,6 @@
namespace AMREZ.EOP.Contracts.DTOs.Authentications.DisableMfa;
public sealed class DisableMfaRequest
{
public Guid FactorId { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace AMREZ.EOP.Contracts.DTOs.Authentications.EnableTotp;
public sealed class EnableTotpRequest
{
public Guid UserId { get; set; }
public string Label { get; set; } = default!;
public string Secret { get; set; } = default!;
}

View File

@@ -0,0 +1,6 @@
namespace AMREZ.EOP.Contracts.DTOs.Authentications.EnableTotp;
public sealed record EnableTotpResponse(
Guid FactorId,
string Label
);

View File

@@ -0,0 +1,8 @@
namespace AMREZ.EOP.Contracts.DTOs.Authentications.Login;
public sealed class LoginRequest
{
public string? Tenant { get; set; }
public string Email { get; set; } = default!;
public string Password { get; set; } = default!;
}

View File

@@ -0,0 +1,8 @@
namespace AMREZ.EOP.Contracts.DTOs.Authentications.Login;
public sealed record LoginResponse(
Guid UserId,
string DisplayName,
string Email,
string TenantId
);

View File

@@ -0,0 +1,7 @@
namespace AMREZ.EOP.Contracts.DTOs.Authentications.Logout;
public sealed class LogoutRequest
{
public Guid UserId { get; set; }
public Guid SessionId { get; set; }
}

View File

@@ -0,0 +1,6 @@
namespace AMREZ.EOP.Contracts.DTOs.Authentications.LogoutAll;
public sealed class LogoutAllRequest
{
public Guid UserId { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace AMREZ.EOP.Contracts.DTOs.Authentications.Register;
public sealed class RegisterRequest
{
public string? Tenant { get; set; }
public string Email { get; set; } = default!;
public string Password{ get; set; } = default!;
public string Name { get; set; } = default!;
}

View File

@@ -0,0 +1,3 @@
namespace AMREZ.EOP.Contracts.DTOs.Authentications.Register;
public sealed record RegisterResponse(Guid UserId, string Name, string Email, string Tenant);

View File

@@ -0,0 +1,7 @@
namespace AMREZ.EOP.Contracts.DTOs.Authentications.VerifyEmail;
public sealed class VerifyEmailRequest
{
public Guid UserId { get; set; }
public string Email { get; set; } = default!;
}

View File

@@ -0,0 +1,7 @@
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.EmergencyContact;
public sealed record EmergencyContactResponse(
Guid Id,
Guid UserProfileId,
bool IsPrimary
);

View File

@@ -0,0 +1,11 @@
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.EmergencyContactAdd;
public sealed class EmergencyContactAddRequest
{
public Guid UserProfileId { get; set; }
public string Name { get; set; } = default!;
public string Relationship { get; set; } = default!;
public string? Phone { get; set; }
public string? Email { get; set; }
public bool IsPrimary { get; set; } = false;
}

View File

@@ -0,0 +1,7 @@
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.EmployeeAddress;
public sealed record EmployeeAddressResponse(
Guid Id,
Guid UserProfileId,
bool IsPrimary
);

View File

@@ -0,0 +1,18 @@
using AMREZ.EOP.Domain.Shared.HumanResources;
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.EmployeeAddressAdd;
public sealed class EmployeeAddressAddRequest
{
public Guid UserProfileId { get; set; }
public AddressType Type { get; set; } = AddressType.Home;
public string Line1 { get; set; } = default!;
public string? Line2 { get; set; }
public string City { get; set; } = default!;
public string? State { get; set; }
public string PostalCode{ get; set; } = default!;
public string Country { get; set; } = default!;
public bool IsPrimary { get; set; } = false;
}

View File

@@ -0,0 +1,7 @@
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.EmployeeBankAccount;
public sealed record EmployeeBankAccountResponse(
Guid Id,
Guid UserProfileId,
bool IsPrimary
);

View File

@@ -0,0 +1,12 @@
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.EmployeeBankAccountAdd;
public sealed class EmployeeBankAccountAddRequest
{
public Guid UserProfileId { get; set; }
public string BankName { get; set; } = default!;
public string AccountNumber { get; set; } = default!;
public string AccountHolder { get; set; } = default!;
public string? Branch { get; set; }
public string? Note { get; set; }
public bool IsPrimary { get; set; } = false;
}

View File

@@ -0,0 +1,8 @@
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.Employment;
public sealed record EmploymentResponse(
Guid Id,
Guid UserProfileId,
DateTime StartDate,
DateTime? EndDate
);

View File

@@ -0,0 +1,15 @@
using AMREZ.EOP.Domain.Shared.HumanResources;
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.EmploymentAdd;
public sealed class EmploymentAddRequest
{
public Guid UserProfileId { get; set; }
public EmploymentType EmploymentType { get; set; } = EmploymentType.Permanent;
public DateTime StartDate { get; set; }
public Guid? DepartmentId { get; set; }
public Guid? PositionId { get; set; }
public Guid? ManagerUserId{ get; set; }
public string? WorkEmail { get; set; }
public string? WorkPhone { get; set; }
}

View File

@@ -0,0 +1,7 @@
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.EmploymentEnd;
public sealed class EmploymentEndRequest
{
public Guid EmploymentId { get; set; }
public DateTime EndDate { get; set; }
}

View File

@@ -0,0 +1,7 @@
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.SetPrimaryAddress;
public sealed class SetPrimaryAddressRequest
{
public Guid UserProfileId { get; set; }
public Guid AddressId { get; set; }
}

View File

@@ -0,0 +1,7 @@
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.SetPrimaryBankAccount;
public sealed class SetPrimaryBankAccountRequest
{
public Guid UserProfileId { get; set; }
public Guid BankAccountId { get; set; }
}

View File

@@ -0,0 +1,7 @@
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.SetPrimaryEmergencyContact;
public sealed class SetPrimaryEmergencyContactRequest
{
public Guid UserProfileId { get; set; }
public Guid ContactId { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.UserProfile;
public sealed record UserProfileResponse(
Guid Id,
Guid UserId,
string FirstName,
string LastName
);

View File

@@ -0,0 +1,14 @@
using AMREZ.EOP.Domain.Shared.HumanResources;
namespace AMREZ.EOP.Contracts.DTOs.HumanResources.UserProfileUpsert;
public sealed class UserProfileUpsertRequest
{
public Guid UserId { get; set; }
public string FirstName { get; set; } = default!;
public string LastName { get; set; } = default!;
public string? MiddleName { get; set; }
public string? Nickname { get; set; }
public DateTime? DateOfBirth { get; set; }
public Gender? Gender { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.AddBaseDomain;
public sealed class AddBaseDomainRequest
{
public string TenantKey { get; set; } = default!;
public string BaseDomain { get; set; } = default!;
public string? Tenant { get; set; }
}

View File

@@ -0,0 +1,5 @@
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.AddBaseDomain;
public sealed record AddBaseDomainResponse(
string BaseDomain
);

View File

@@ -0,0 +1,14 @@
using AMREZ.EOP.Domain.Shared.Tenancy;
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.CreateTenant;
public sealed class CreateTenantRequest
{
public string TenantKey { get; set; } = default!;
public string? Schema { get; set; }
public string? ConnectionString { get; set; }
public TenantMode Mode { get; set; } = TenantMode.Rls;
public bool IsActive { get; set; } = true;
public string? Tenant { get; set; }
}

View File

@@ -0,0 +1,5 @@
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.CreateTenant;
public sealed record CreateTenantResponse(
string TenantKey
);

View File

@@ -0,0 +1,7 @@
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.ListDomains;
public sealed class ListDomainsRequest
{
public string? TenantKey { get; set; }
public string? Tenant { get; set; }
}

View File

@@ -0,0 +1,12 @@
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.ListDomains;
public sealed record DomainDto(
string Domain,
string? TenantKey,
bool IsPlatformBaseDomain,
bool IsActive,
DateTimeOffset UpdatedAtUtc);
public sealed record ListDomainsResponse(
IReadOnlyList<DomainDto> Items
);

View File

@@ -0,0 +1,7 @@
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.ListTenants;
public sealed class ListTenantsRequest
{
public string TenantKey { get; set; } = default!;
public string? Tenant { get; set; }
}

View File

@@ -0,0 +1,15 @@
using AMREZ.EOP.Domain.Shared.Tenancy;
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.ListTenants;
public sealed record TenantDto(
string TenantKey,
string? Schema,
string? ConnectionString,
TenantMode Mode,
bool IsActive,
DateTimeOffset UpdatedAtUtc);
public sealed record ListTenantsResponse(
IReadOnlyList<TenantDto> Items
);

View File

@@ -0,0 +1,8 @@
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.MapDomain;
public sealed class MapDomainRequest
{
public string TenantKey { get; set; } = default!;
public string Domain { get; set; } = default!;
public string? Tenant { get; set; }
}

View File

@@ -0,0 +1,6 @@
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.MapDomain;
public sealed record MapDomainResponse(
string Domain,
string TenantKey
);

View File

@@ -0,0 +1,8 @@
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.RemoveBaseDomain;
public sealed class RemoveBaseDomainRequest
{
public string TenantKey { get; set; } = default!;
public string BaseDomain { get; set; } = default!;
public string? Tenant { get; set; }
}

View File

@@ -0,0 +1,5 @@
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.RemoveBaseDomain;
public sealed record RemoveBaseDomainResponse(
string BaseDomain
);

View File

@@ -0,0 +1,8 @@
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.UnmapDomain;
public sealed class UnmapDomainRequest
{
public string TenantKey { get; set; } = default!;
public string Domain { get; set; } = default!;
public string? Tenant { get; set; }
}

View File

@@ -0,0 +1,5 @@
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.UnmapDomain;
public sealed record UnmapDomainResponse(
string Domain
);

View File

@@ -0,0 +1,14 @@
using AMREZ.EOP.Domain.Shared.Tenancy;
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.UpdateTenant;
public sealed class UpdateTenantRequest
{
public string TenantKey { get; set; } = default!;
public string? Schema { get; set; }
public string? ConnectionString { get; set; }
public TenantMode? Mode { get; set; }
public bool? IsActive { get; set; }
public DateTimeOffset? IfUnmodifiedSince { get; set; }
public string? Tenant { get; set; }
}

View File

@@ -0,0 +1,6 @@
namespace AMREZ.EOP.Contracts.DTOs.Tenancy.UpdateTenant;
public sealed record UpdateTenantResponse(
string TenantKey,
DateTimeOffset UpdatedAtUtc
);