Add Master Data
This commit is contained in:
22
AMREZ.EOP.Domain/Entities/Customers/Address.cs
Normal file
22
AMREZ.EOP.Domain/Entities/Customers/Address.cs
Normal 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>();
|
||||
}
|
||||
15
AMREZ.EOP.Domain/Entities/Customers/CustomerAddress.cs
Normal file
15
AMREZ.EOP.Domain/Entities/Customers/CustomerAddress.cs
Normal 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!;
|
||||
}
|
||||
15
AMREZ.EOP.Domain/Entities/Customers/CustomerContact.cs
Normal file
15
AMREZ.EOP.Domain/Entities/Customers/CustomerContact.cs
Normal 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!;
|
||||
}
|
||||
18
AMREZ.EOP.Domain/Entities/Customers/CustomerProfile.cs
Normal file
18
AMREZ.EOP.Domain/Entities/Customers/CustomerProfile.cs
Normal 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>();
|
||||
}
|
||||
11
AMREZ.EOP.Domain/Entities/Customers/CustomerTag.cs
Normal file
11
AMREZ.EOP.Domain/Entities/Customers/CustomerTag.cs
Normal 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!;
|
||||
}
|
||||
17
AMREZ.EOP.Domain/Entities/Customers/OrganizationProfile.cs
Normal file
17
AMREZ.EOP.Domain/Entities/Customers/OrganizationProfile.cs
Normal 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!;
|
||||
}
|
||||
19
AMREZ.EOP.Domain/Entities/Customers/PersonProfile.cs
Normal file
19
AMREZ.EOP.Domain/Entities/Customers/PersonProfile.cs
Normal 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!;
|
||||
}
|
||||
Reference in New Issue
Block a user