namespace LiteCharms.Features.Shop.Notifications.Entities; public class NotificationConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.ToTable(nameof(Notification)); builder.HasKey(f => f.Id); builder.Property(f => f.CreatedAt).IsRequired().ValueGeneratedOnAdd().HasDefaultValueSql("now()"); builder.Property(f => f.UpdatedAt).IsRequired(false); builder.Property(f => f.Direction).IsRequired().HasConversion(); builder.Property(f => f.Platform).IsRequired().HasConversion(); builder.Property(f => f.Priority).IsRequired().HasConversion(); builder.Property(f => f.CorrelationIdType).IsRequired().HasConversion(); builder.Property(f => f.Sender).IsRequired(); builder.Property(f => f.Subject).IsRequired(); builder.Property(f => f.Message).IsRequired(); builder.Property(f => f.Recipient).IsRequired(); builder.Property(f => f.RecipientAddress).IsRequired(); builder.Property(f => f.CorrelationId).IsRequired(); builder.Property(f => f.IsHtml).HasDefaultValue(false); builder.Property(f => f.IsInternal).HasDefaultValue(true); builder.Property(f => f.Processed).HasDefaultValue(false); builder.Property(f => f.HasError).HasDefaultValue(false); builder.Property(f => f.Errors).HasColumnType("jsonb").IsRequired(false); } }