Added shared projects
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
namespace LiteCharms.Features.Orders.Commands;
|
||||
|
||||
public class CreateOrderCommand : IRequest<Result<Guid>>
|
||||
{
|
||||
public Guid CustomerId { get; set; }
|
||||
|
||||
public Guid ProductPriceId { get; set; }
|
||||
|
||||
private CreateOrderCommand(Guid customerId, Guid productPriceId)
|
||||
{
|
||||
CustomerId = customerId;
|
||||
ProductPriceId = productPriceId;
|
||||
}
|
||||
|
||||
public static CreateOrderCommand Create(Guid customerId, Guid productPriceId)
|
||||
{
|
||||
if (customerId == Guid.Empty)
|
||||
throw new ArgumentException("CustomerId is required.", nameof(customerId));
|
||||
|
||||
if (productPriceId == Guid.Empty)
|
||||
throw new ArgumentException("ProductPriceId is required.", nameof(productPriceId));
|
||||
|
||||
return new(customerId, productPriceId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user