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
+9
View File
@@ -1,5 +1,14 @@
namespace LiteCharms.Models;
public enum QuoteStatus : int
{
Draft = 0,
Sent = 1,
Accepted = 2,
Rejected = 3,
Expired = 4
}
public enum OrderStatus : int
{
Pending = 0,
+2
View File
@@ -23,4 +23,6 @@ public class Notification
public string? CorrelationIdType { get; set; }
public bool IsInternal { get; set; }
public bool Processed { get; set; }
}
+3 -1
View File
@@ -10,7 +10,9 @@ public class Order
public Guid CustomerId { get; set; }
public Guid ProductPriceId { get; set; }
public Guid? QuoteId { get; set; }
public Guid ShoppingCartId { get; set; }
public Guid? RefundId { get; set; }
+20
View File
@@ -0,0 +1,20 @@
namespace LiteCharms.Models;
public class Quote
{
public Guid Id { get; set; }
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset? UpdatedAt { get; set; }
public DateTimeOffset? ExpiredAt { get; set; }
public Guid CustomerId { get; set; }
public Guid ShoppingCartId { get; set; }
public QuoteStatus Status { get; set; }
public string? Reason { get; set; }
}
+16
View File
@@ -0,0 +1,16 @@
namespace LiteCharms.Models;
public class ShoppingCart
{
public Guid Id { get; set; }
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset? UpdatedAt { get; set; }
public Guid? CustomerId { get; set; }
public Guid? OrderId { get; set; }
public Guid? QuoteId { get; set; }
}
+16
View File
@@ -0,0 +1,16 @@
namespace LiteCharms.Models;
public class ShoppingCartItem
{
public Guid Id { get; set; }
public Guid ShoppingCartId { get; set; }
public Guid ProductPriceId { get; set; }
public DateTimeOffset CreatedAt { get; set; }
public DateTimeOffset UpdatedAt { get; set; }
public int Quantity { get; set; }
}