Added notifications

Added shopping cart and items
Added quotes
Refactored relatinoships
Migrated changes
Refactored cqrs commands and queries
Refactored mappings
This commit is contained in:
Khwezi Mngoma
2026-05-05 23:59:31 +02:00
parent 4b822c63b2
commit 83f51c6a23
67 changed files with 3051 additions and 42 deletions
@@ -10,14 +10,15 @@ public class OrderConfiguration : IEntityTypeConfiguration<Order>
builder.Property(f => f.CreatedAt).ValueGeneratedOnAdd();
builder.Property(f => f.UpdatedAt).IsRequired(false).ValueGeneratedOnUpdate();
builder.Property(f => f.CustomerId).IsRequired();
builder.Property(f => f.QuoteId).IsRequired(false);
builder.Property(f => f.RefundId).IsRequired(false);
builder.Property(f => f.ProductPriceId).IsRequired();
builder.Property(f => f.ShoppingCartId).IsRequired();
builder.Property(f => f.Status).HasConversion<int>().IsRequired();
builder.Property(f => f.Notes).HasColumnType("jsonb").IsRequired(false);
builder.HasOne(f => f.ProductPrice)
.WithMany()
.HasForeignKey(f => f.ProductPriceId)
builder.HasOne(f => f.Quote)
.WithOne(f => f.Order)
.HasForeignKey<Order>(f => f.QuoteId)
.OnDelete(DeleteBehavior.Restrict);
builder.HasOne(f => f.Customer)