Added package management

This commit is contained in:
Khwezi Mngoma
2026-05-10 14:18:56 +02:00
parent 32d1019eb5
commit 394429677e
29 changed files with 765 additions and 35 deletions
@@ -0,0 +1,25 @@
namespace LiteCharms.Features.ShoppingCarts.Commands;
public class AddPackageToShoppingCartCommand : IRequest<Result>
{
public Guid ShoppingCartId { get; set; }
public Guid PackageId { get; set; }
private AddPackageToShoppingCartCommand(Guid shoppingCartId, Guid packageId)
{
ShoppingCartId = shoppingCartId;
PackageId = packageId;
}
public static AddPackageToShoppingCartCommand Create(Guid shoppingCartId, Guid packageId)
{
if (shoppingCartId == Guid.Empty)
throw new ArgumentException($"Shopping cart ID is required", nameof(shoppingCartId));
if (packageId == Guid.Empty)
throw new ArgumentException($"Package ID is required", nameof(packageId));
return new(shoppingCartId, packageId);
}
}