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,6 +1,4 @@
using LiteCharms.Features.Shop.Products.Entities;
namespace LiteCharms.Features.Shop.ShoppingCarts.Entities;
namespace LiteCharms.Features.Shop.ShoppingCarts.Entities;
public class ShoppingCartItemConfiguration : IEntityTypeConfiguration<ShoppingCartItem>
{
@@ -15,13 +13,13 @@ public class ShoppingCartItemConfiguration : IEntityTypeConfiguration<ShoppingCa
builder.Property(f => f.ShoppingCartId).IsRequired();
builder.Property(f => f.ProductPriceId).IsRequired();
builder.HasOne<ShoppingCart>()
builder.HasOne(f => f.ShoppingCart)
.WithMany(s => s.ShoppingCartItems)
.HasForeignKey(f => f.ShoppingCartId)
.IsRequired()
.OnDelete(DeleteBehavior.Cascade);
builder.HasOne<ProductPrice>()
builder.HasOne(f => f.ProductPrice)
.WithMany()
.HasForeignKey(f => f.ProductPriceId)
.IsRequired()