Files
Khwezi Mngoma 70c6e0bfbc
continuous-integration/drone/pr Build is passing
Split Features to create space for more projects
2026-05-24 13:19:09 +02:00

30 lines
1.2 KiB
C#

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);
}
}