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

19 lines
519 B
C#

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