namespace LiteCharms.Features.Orders.Commands; public class CreateOrderCommand : IRequest> { public Guid CustomerId { get; set; } public Guid ShoppingCartId { get; set; } public Guid? QuoteId { get; set; } private CreateOrderCommand(Guid customerId, Guid shoppingCartId, Guid? quoteId = null) { CustomerId = customerId; ShoppingCartId = shoppingCartId; QuoteId = quoteId; } public static CreateOrderCommand Create(Guid customerId, Guid shoppingCartId, Guid? quoteId = null) { if (customerId == Guid.Empty) throw new ArgumentException("CustomerId is required.", nameof(customerId)); if (shoppingCartId == Guid.Empty) throw new ArgumentException("ShoppingCartId is required.", nameof(shoppingCartId)); return new(customerId, shoppingCartId, quoteId); } }