Add Master Data
This commit is contained in:
@@ -4,7 +4,7 @@ namespace AMREZ.EOP.Domain.Entities.Authentications;
|
||||
|
||||
public sealed class Role : BaseEntity
|
||||
{
|
||||
public string Code { get; set; } = default!; // system code, unique per tenant
|
||||
public string Code { get; set; } = default!;
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
public ICollection<UserRole> UserRoles { get; set; } = new List<UserRole>();
|
||||
|
||||
25
AMREZ.EOP.Domain/Entities/Common/MasterBase.cs
Normal file
25
AMREZ.EOP.Domain/Entities/Common/MasterBase.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using AMREZ.EOP.Domain.Entities.Common;
|
||||
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public abstract class MasterBase : BaseEntity
|
||||
{
|
||||
|
||||
public string Scope { get; set; } = "global";
|
||||
|
||||
public string Code { get; set; } = null!;
|
||||
public string Name { get; set; } = null!;
|
||||
public Dictionary<string, string>? NameI18n { get; set; }
|
||||
|
||||
public Guid? OverridesGlobalId { get; set; }
|
||||
|
||||
public bool IsActive { get; set; } = true;
|
||||
public bool IsSystem { get; set; } = false;
|
||||
|
||||
public Dictionary<string, object>? Meta { get; set; }
|
||||
}
|
||||
|
||||
public abstract class MasterBlockBase : BaseEntity
|
||||
{
|
||||
public Guid GlobalId { get; set; }
|
||||
}
|
||||
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!;
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/Allergen.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/Allergen.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class Allergen : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class AllergenBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
10
AMREZ.EOP.Domain/Entities/MasterData/Brand.cs
Normal file
10
AMREZ.EOP.Domain/Entities/MasterData/Brand.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class Brand : MasterBase
|
||||
{
|
||||
public string? ExternalRef { get; set; }
|
||||
}
|
||||
|
||||
public class BrandBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
26
AMREZ.EOP.Domain/Entities/MasterData/Category.cs
Normal file
26
AMREZ.EOP.Domain/Entities/MasterData/Category.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class Category : MasterBase
|
||||
{
|
||||
public Guid? ParentId { get; set; }
|
||||
public Category? Parent { get; set; }
|
||||
public ICollection<Category> Children { get; set; } = new List<Category>();
|
||||
public string? Path { get; set; }
|
||||
public int SortOrder { get; set; } = 0;
|
||||
}
|
||||
|
||||
public class CategoryBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
|
||||
public class CategoryExt
|
||||
{
|
||||
public Guid CategoryId { get; set; }
|
||||
public Category Category { get; set; } = null!;
|
||||
public string? Slug { get; set; }
|
||||
public string? SeoTitle { get; set; }
|
||||
public string? SeoDescription { get; set; }
|
||||
public string? ImageUrl { get; set; }
|
||||
public Dictionary<string, object>? ChannelVisibility { get; set; }
|
||||
public Dictionary<string, object>? FacetSchema { get; set; }
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/ComplianceStatus.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/ComplianceStatus.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class ComplianceStatus : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class ComplianceStatusBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/Country.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/Country.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class Country : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class CountryBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
10
AMREZ.EOP.Domain/Entities/MasterData/Currency.cs
Normal file
10
AMREZ.EOP.Domain/Entities/MasterData/Currency.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class Currency : MasterBase
|
||||
{
|
||||
public byte Exponent { get; set; } = 2;
|
||||
}
|
||||
|
||||
public class CurrencyBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/DocControlStatus.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/DocControlStatus.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class DocControlStatus : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class DocControlStatusBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/FuncTest.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/FuncTest.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class FuncTest : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class FuncTestBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/HazardClass.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/HazardClass.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class HazardClass : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class HazardClassBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/Language.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/Language.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class Language : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class LanguageBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
10
AMREZ.EOP.Domain/Entities/MasterData/Manufacturer.cs
Normal file
10
AMREZ.EOP.Domain/Entities/MasterData/Manufacturer.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class Manufacturer : MasterBase
|
||||
{
|
||||
public string? CountryCode { get; set; }
|
||||
}
|
||||
|
||||
public class ManufacturerBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/Market.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/Market.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class Market : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class MarketBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/PackingGroup.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/PackingGroup.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class PackingGroup : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class PackingGroupBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/QaStage.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/QaStage.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class QaStage : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class QaStageBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/QcStatus.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/QcStatus.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class QcStatus : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class QcStatusBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/RecallClass.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/RecallClass.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class RecallClass : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class RecallClassBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/RiskClass.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/RiskClass.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class RiskClass : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class RiskClassBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/Route.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/Route.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class Route : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class RouteBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/RxSchedule.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/RxSchedule.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class RxSchedule : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class RxScheduleBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/Species.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/Species.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class Species : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class SpeciesBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/StabilityStatus.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/StabilityStatus.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class StabilityStatus : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class StabilityStatusBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class SterilizationMethod : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class SterilizationMethodBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
11
AMREZ.EOP.Domain/Entities/MasterData/Uom.cs
Normal file
11
AMREZ.EOP.Domain/Entities/MasterData/Uom.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class Uom : MasterBase
|
||||
{
|
||||
public string? BaseCode { get; set; }
|
||||
public decimal? SiFactor { get; set; }
|
||||
}
|
||||
|
||||
public class UomBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Entities/MasterData/Vvm.cs
Normal file
9
AMREZ.EOP.Domain/Entities/MasterData/Vvm.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Entities.MasterData;
|
||||
|
||||
public class Vvm : MasterBase
|
||||
{
|
||||
}
|
||||
|
||||
public class VvmBlock : MasterBlockBase
|
||||
{
|
||||
}
|
||||
9
AMREZ.EOP.Domain/Shared/Customer/AddressLabel.cs
Normal file
9
AMREZ.EOP.Domain/Shared/Customer/AddressLabel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace AMREZ.EOP.Domain.Shared.Customer;
|
||||
|
||||
public enum AddressLabel
|
||||
{
|
||||
Billing,
|
||||
Shipping,
|
||||
Registered,
|
||||
Other
|
||||
}
|
||||
11
AMREZ.EOP.Domain/Shared/Customer/ContactType.cs
Normal file
11
AMREZ.EOP.Domain/Shared/Customer/ContactType.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace AMREZ.EOP.Domain.Shared.Customer;
|
||||
|
||||
public enum ContactType
|
||||
{
|
||||
Email,
|
||||
Phone,
|
||||
Line,
|
||||
Whatsapp,
|
||||
WeChat,
|
||||
Other
|
||||
}
|
||||
8
AMREZ.EOP.Domain/Shared/Customer/CustomerStatus.cs
Normal file
8
AMREZ.EOP.Domain/Shared/Customer/CustomerStatus.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace AMREZ.EOP.Domain.Shared.Customer;
|
||||
|
||||
public enum CustomerStatus
|
||||
{
|
||||
Active,
|
||||
Inactive,
|
||||
Blacklisted
|
||||
}
|
||||
7
AMREZ.EOP.Domain/Shared/Customer/PartyType.cs
Normal file
7
AMREZ.EOP.Domain/Shared/Customer/PartyType.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace AMREZ.EOP.Domain.Shared.Customer;
|
||||
|
||||
public enum PartyType
|
||||
{
|
||||
Person,
|
||||
Organization
|
||||
}
|
||||
Reference in New Issue
Block a user