Split Features to create space for more projects
continuous-integration/drone/pr Build is passing

This commit is contained in:
Khwezi Mngoma
2026-05-24 13:19:09 +02:00
parent 032b9e1818
commit 70c6e0bfbc
95 changed files with 621 additions and 314 deletions
@@ -0,0 +1,18 @@
using LiteCharms.Features.TechShop.Leads.Entities;
using LiteCharms.Features.TechShop.Orders.Entities;
using LiteCharms.Features.TechShop.Quotes.Entities;
using LiteCharms.Features.TechShop.ShoppingCarts.Entities;
namespace LiteCharms.Features.TechShop.Customers.Entities;
[EntityTypeConfiguration<CustomerConfiguration, Customer>]
public class Customer : Models.Customer
{
public virtual ICollection<Lead>? Leads { get; set; }
public virtual ICollection<Order>? Orders { get; set; }
public virtual ICollection<Quote>? Quotes { get; set; }
public virtual ICollection<ShoppingCart>? ShoppingCarts { get; set; }
}
@@ -0,0 +1,30 @@
namespace LiteCharms.Features.TechShop.Customers.Entities;
public class CustomerConfiguration : IEntityTypeConfiguration<Customer>
{
public void Configure(EntityTypeBuilder<Customer> builder)
{
builder.ToTable("Customers");
builder.HasKey(f => f.Id);
builder.Property(f => f.CreatedAt).ValueGeneratedOnAdd().HasDefaultValueSql("now()");
builder.Property(f => f.UpdatedAt).IsRequired(false).HasDefaultValueSql(null);
builder.Property(f => f.Company);
builder.Property(f => f.Name).IsRequired();
builder.Property(f => f.LastName).IsRequired();
builder.Property(f => f.Email).IsRequired();
builder.Property(f => f.Tax);
builder.Property(f => f.Discord);
builder.Property(f => f.Slack);
builder.Property(f => f.LinkedIn);
builder.Property(f => f.Whatsapp);
builder.Property(f => f.Website);
builder.Property(f => f.Phone);
builder.Property(f => f.Address);
builder.Property(f => f.City);
builder.Property(f => f.Region);
builder.Property(f => f.Country);
builder.Property(f => f.PostalCode);
builder.Property(f => f.Active).HasDefaultValue(true);
}
}