Fixed Lead->Customer Relationship
continuous-integration/drone/pr Build is passing

This commit is contained in:
Khwezi Mngoma
2026-05-15 07:54:35 +02:00
parent 36b3656886
commit 4523ef6151
6 changed files with 951 additions and 106 deletions
@@ -1,4 +1,4 @@
using LiteCharms.Features.Shop.Customers.Models;
using LiteCharms.Features.Shop.Customers.Entities;
namespace LiteCharms.Features.Shop.Leads.Entities;
@@ -24,7 +24,7 @@ public class LeadConfiguration : IEntityTypeConfiguration<Lead>
builder.Property(f => f.AttributionHash).IsRequired(true);
builder.HasOne(f => f.Customer)
.WithMany()
.WithMany(f => f.Leads)
.HasForeignKey(f => f.CustomerId)
.OnDelete(DeleteBehavior.Restrict);
}