Files
components/LiteCharms.Features/Shop/Leads/Entities/LeadConfiguration.cs
T
2026-05-13 20:06:24 +02:00

27 lines
1.0 KiB
C#

namespace LiteCharms.Features.Shop.Leads.Entities;
public class LeadConfiguration : IEntityTypeConfiguration<Lead>
{
public void Configure(EntityTypeBuilder<Lead> builder)
{
builder.ToTable(nameof(Lead));
builder.HasKey(f => f.Id);
builder.Property(f => f.CreatedAt).ValueGeneratedOnAdd().HasDefaultValueSql("now()");
builder.Property(f => f.UpdatedAt).IsRequired(false);
builder.Property(f => f.CustomerId).IsRequired(false);
builder.Property(f => f.Source);
builder.Property(f => f.ClickId);
builder.Property(f => f.WebClickId);
builder.Property(f => f.AppClickId);
builder.Property(f => f.CampaignId);
builder.Property(f => f.AdGroupId);
builder.Property(f => f.AdName);
builder.Property(f => f.TargetId);
builder.Property(f => f.FeedItemId);
builder.Property(f => f.ClickLocation);
builder.Property(f => f.Status).IsRequired();
builder.Property(f => f.AttributionHash).IsRequired(true);
}
}