Stable run on Notification creation

This commit is contained in:
Khwezi Mngoma
2026-05-14 02:46:07 +02:00
parent 134d8429c0
commit 2610275bef
34 changed files with 2199 additions and 223 deletions
@@ -4,11 +4,11 @@ public class ShoppingCartConfiguration : IEntityTypeConfiguration<ShoppingCart>
{
public void Configure(EntityTypeBuilder<ShoppingCart> builder)
{
builder.ToTable(nameof(ShoppingCart));
builder.ToTable("ShoppingCarts");
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.UpdatedAt).IsRequired(false).HasDefaultValueSql(null);
builder.Property(f => f.CustomerId).IsRequired();
builder.Property(f => f.OrderId);
@@ -2,6 +2,7 @@
namespace LiteCharms.Features.Shop.ShoppingCarts.Entities;
[EntityTypeConfiguration<ShoppingCartItemConfiguration, ShoppingCartItem>]
public class ShoppingCartItem : Models.ShoppingCartItem
{
public virtual ShoppingCart? ShoppingCart { get; set; }
@@ -6,11 +6,11 @@ public class ShoppingCartItemConfiguration : IEntityTypeConfiguration<ShoppingCa
{
public void Configure(EntityTypeBuilder<ShoppingCartItem> builder)
{
builder.ToTable(nameof(ShoppingCartItem));
builder.ToTable("ShoppingCartItems");
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.UpdatedAt).IsRequired(false).HasDefaultValueSql(null);
builder.Property(f => f.Quantity).IsRequired().HasDefaultValue(1);
builder.Property(f => f.ShoppingCartId).IsRequired();
builder.Property(f => f.ProductPriceId).IsRequired();
@@ -4,7 +4,7 @@ public class ShoppingCartPackageConfiguration : IEntityTypeConfiguration<Shoppin
{
public void Configure(EntityTypeBuilder<ShoppingCartPackage> builder)
{
builder.ToTable(nameof(ShoppingCartPackage));
builder.ToTable("ShoppingCartPackages");
builder.HasKey(f => f.Id);
builder.Property(f => f.CreatedAt).IsRequired().ValueGeneratedOnAdd().HasDefaultValueSql("now()");
@@ -4,9 +4,9 @@ public class ShoppingCart
{
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; }
@@ -8,9 +8,9 @@ public class ShoppingCartItem
public Guid ProductPriceId { get; set; }
public DateTimeOffset CreatedAt { get; set; }
public DateTime CreatedAt { get; set; }
public DateTimeOffset UpdatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public int Quantity { get; set; }
}
@@ -4,7 +4,7 @@ public class ShoppingCartPackage
{
public Guid Id { get; set; }
public DateTimeOffset CreatedAt { get; set; }
public DateTime CreatedAt { get; set; }
public Guid ShoppingCartId { get; set; }