Stable run on Notification creation
This commit is contained in:
@@ -4,12 +4,12 @@ public class LeadConfiguration : IEntityTypeConfiguration<Lead>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Lead> builder)
|
||||
{
|
||||
builder.ToTable(nameof(Lead));
|
||||
builder.ToTable("Leads");
|
||||
|
||||
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.UpdatedAt).IsRequired(false).HasDefaultValueSql(null);
|
||||
builder.Property(f => f.CustomerId);
|
||||
builder.Property(f => f.Source);
|
||||
builder.Property(f => f.ClickId);
|
||||
builder.Property(f => f.WebClickId);
|
||||
@@ -22,5 +22,10 @@ public class LeadConfiguration : IEntityTypeConfiguration<Lead>
|
||||
builder.Property(f => f.ClickLocation);
|
||||
builder.Property(f => f.Status).IsRequired();
|
||||
builder.Property(f => f.AttributionHash).IsRequired(true);
|
||||
|
||||
builder.HasOne(f => f.Customer)
|
||||
.WithMany()
|
||||
.HasForeignKey(f => f.CustomerId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ public class Lead
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public DateTimeOffset CreatedAt { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
public DateTimeOffset? UpdatedAt { get; set; }
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
|
||||
public Guid? CustomerId { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user