2023-12-20 10:37:44 +03:30
|
|
|
|
namespace NetinaShop.Domain.CommandQueries.Commands;
|
|
|
|
|
|
|
|
|
|
|
|
public sealed record CreateDiscountCommand(string Code,
|
|
|
|
|
|
int DiscountPercent,
|
|
|
|
|
|
long DiscountAmount,
|
|
|
|
|
|
bool HasCode,
|
|
|
|
|
|
DiscountAmountType AmountType,
|
|
|
|
|
|
DiscountType Type,
|
|
|
|
|
|
int Count,
|
|
|
|
|
|
DateTime StartDate,
|
|
|
|
|
|
DateTime ExpireDate,
|
|
|
|
|
|
long PriceFloor,
|
|
|
|
|
|
bool HasPriceFloor,
|
|
|
|
|
|
long PriceCeiling,
|
|
|
|
|
|
bool HasPriceCeiling,
|
|
|
|
|
|
bool IsInfinity,
|
|
|
|
|
|
long UseCount,
|
|
|
|
|
|
bool IsForInvitation,
|
2024-02-03 10:34:48 +03:30
|
|
|
|
bool IsSpecialOffer,
|
2023-12-20 10:37:44 +03:30
|
|
|
|
Guid ProductId,
|
|
|
|
|
|
Guid CategoryId) : IRequest<DiscountLDto>;
|
|
|
|
|
|
|
|
|
|
|
|
public sealed record UpdateDiscountCommand(Guid Id,
|
|
|
|
|
|
string Code,
|
|
|
|
|
|
int DiscountPercent,
|
|
|
|
|
|
long DiscountAmount,
|
|
|
|
|
|
bool HasCode,
|
|
|
|
|
|
DiscountAmountType AmountType,
|
|
|
|
|
|
DiscountType Type,
|
|
|
|
|
|
int Count,
|
|
|
|
|
|
DateTime StartDate,
|
|
|
|
|
|
DateTime ExpireDate,
|
|
|
|
|
|
long PriceFloor,
|
|
|
|
|
|
bool HasPriceFloor,
|
|
|
|
|
|
long PriceCeiling,
|
|
|
|
|
|
bool HasPriceCeiling,
|
|
|
|
|
|
bool IsInfinity,
|
|
|
|
|
|
long UseCount,
|
|
|
|
|
|
bool IsForInvitation,
|
2024-02-03 10:34:48 +03:30
|
|
|
|
bool IsSpecialOffer,
|
2023-12-20 10:37:44 +03:30
|
|
|
|
Guid ProductId,
|
|
|
|
|
|
Guid CategoryId) : IRequest<bool>;
|
|
|
|
|
|
|
2023-12-31 19:55:22 +03:30
|
|
|
|
public sealed record DeleteDiscountCommand(Guid Id) : IRequest<bool>;
|
|
|
|
|
|
|
2024-02-10 14:00:31 +03:30
|
|
|
|
public sealed record CalculateOrderDiscountCommand(string DiscountCode,Order Order) : IRequest<double>;
|