Files
components/LiteCharms.Features.TechShop/CartPackages/Entities/PackageConfirguration.cs
T
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

19 lines
811 B
C#

namespace LiteCharms.Features.TechShop.CartPackages.Entities;
public class PackageConfirguration : IEntityTypeConfiguration<Package>
{
public void Configure(EntityTypeBuilder<Package> builder)
{
builder.ToTable(nameof(Package));
builder.HasKey(f => f.Id);
builder.Property(f => f.CreatedAt).IsRequired().ValueGeneratedOnAdd().HasDefaultValueSql("now()");
builder.Property(f => f.UpdatedAt).IsRequired(false).HasDefaultValueSql(null);
builder.Property(f => f.Name).IsRequired();
builder.Property(f => f.Summary).IsRequired().HasMaxLength(512);
builder.Property(f => f.Description).IsRequired().HasMaxLength(2048);
builder.Property(f => f.ImageUrl).IsRequired(false).HasMaxLength(2048);
builder.Property(f => f.Active);
}
}