Add Master Data

This commit is contained in:
Thanakarn Klangkasame
2025-10-10 16:22:06 +07:00
parent ad0d9e41ba
commit d4ab1cb592
55 changed files with 16058 additions and 197 deletions

View File

@@ -0,0 +1,22 @@
using AMREZ.EOP.Domain.Entities.Common;
namespace AMREZ.EOP.Domain.Entities.Customers;
public sealed class Address : BaseEntity
{
public string? Line1 { get; set; }
public string? Line2 { get; set; }
public string? Village { get; set; }
public string? Soi { get; set; }
public string? Road { get; set; }
public string? Subdistrict { get; set; }
public string? District { get; set; }
public string? Province { get; set; }
public string? PostalCode { get; set; }
public string CountryCode { get; set; } = "TH";
public bool Verified { get; set; }
public double? GeoLat { get; set; }
public double? GeoLng { get; set; }
public ICollection<CustomerAddress> CustomerLinks { get; set; } = new List<CustomerAddress>();
}

View File

@@ -0,0 +1,15 @@
using AMREZ.EOP.Domain.Entities.Common;
using AMREZ.EOP.Domain.Shared.Customer;
namespace AMREZ.EOP.Domain.Entities.Customers;
public sealed class CustomerAddress : BaseEntity
{
public Guid CustomerProfileId { get; set; }
public Guid AddressId { get; set; }
public AddressLabel Label { get; set; }
public bool IsDefault { get; set; }
public CustomerProfile Customer { get; set; } = default!;
public Address Address { get; set; } = default!;
}

View File

@@ -0,0 +1,15 @@
using AMREZ.EOP.Domain.Entities.Common;
using AMREZ.EOP.Domain.Shared.Customer;
namespace AMREZ.EOP.Domain.Entities.Customers;
public sealed class CustomerContact : BaseEntity
{
public Guid CustomerProfileId { get; set; }
public ContactType Type { get; set; }
public string Value { get; set; } = default!;
public bool IsPrimary { get; set; }
public bool IsVerified { get; set; }
public CustomerProfile Customer { get; set; } = default!;
}

View File

@@ -0,0 +1,18 @@
using AMREZ.EOP.Domain.Entities.Common;
using AMREZ.EOP.Domain.Shared.Customer;
namespace AMREZ.EOP.Domain.Entities.Customers;
public sealed class CustomerProfile : BaseEntity
{
public PartyType Type { get; set; }
public string DisplayName { get; set; } = default!;
public CustomerStatus Status { get; set; } = CustomerStatus.Active;
public PersonProfile? Person { get; set; }
public OrganizationProfile? Organization { get; set; }
public ICollection<CustomerContact> Contacts { get; set; } = new List<CustomerContact>();
public ICollection<CustomerAddress> Addresses { get; set; } = new List<CustomerAddress>();
public ICollection<CustomerTag> Tags { get; set; } = new List<CustomerTag>();
}

View File

@@ -0,0 +1,11 @@
using AMREZ.EOP.Domain.Entities.Common;
namespace AMREZ.EOP.Domain.Entities.Customers;
public sealed class CustomerTag : BaseEntity
{
public Guid CustomerProfileId { get; set; }
public string Tag { get; set; } = default!;
public CustomerProfile Customer { get; set; } = default!;
}

View File

@@ -0,0 +1,17 @@
using AMREZ.EOP.Domain.Entities.Common;
namespace AMREZ.EOP.Domain.Entities.Customers;
public sealed class OrganizationProfile : BaseEntity
{
public Guid CustomerProfileId { get; set; }
public string LegalNameTh { get; set; } = default!;
public string? LegalNameEn { get; set; }
public string? RegistrationNo { get; set; }
public string? TaxId13 { get; set; }
public string? BranchCode { get; set; }
public string? CompanyType { get; set; }
public CustomerProfile Customer { get; set; } = default!;
}

View File

@@ -0,0 +1,19 @@
using AMREZ.EOP.Domain.Entities.Common;
namespace AMREZ.EOP.Domain.Entities.Customers;
public sealed class PersonProfile : BaseEntity
{
public Guid CustomerProfileId { get; set; }
public string? Prefix { get; set; }
public string? FirstNameTh { get; set; }
public string? LastNameTh { get; set; }
public string? FirstNameEn { get; set; }
public string? LastNameEn { get; set; }
public DateTime? BirthDate { get; set; }
public string? NationalId { get; set; }
public string? PassportNo { get; set; }
public CustomerProfile Customer { get; set; } = default!;
}