Files
components/LiteCharms.Features/Shop/ShoppingCarts/Queries/GetCustomerShoppingCartsQuery.cs
T
2026-05-13 20:06:24 +02:00

19 lines
566 B
C#

using LiteCharms.Features.Shop.ShoppingCarts.Models;
namespace LiteCharms.Features.ShoppingCarts.Queries;
public class GetCustomerShoppingCartsQuery : IRequest<Result<ShoppingCart[]>>
{
public Guid CustomerId { get; set; }
private GetCustomerShoppingCartsQuery(Guid customerId) => CustomerId = customerId;
public static GetCustomerShoppingCartsQuery Create(Guid customerId)
{
if(customerId == Guid.Empty)
throw new ArgumentException("Customer ID is required.", nameof(customerId));
return new(customerId);
}
}