55 lines
1.4 KiB
C#
55 lines
1.4 KiB
C#
namespace Netina.Domain.CommandQueries.Commands;
|
|
|
|
public sealed record CreateDiscountCommand(string Code,
|
|
string Description,
|
|
int DiscountPercent,
|
|
long DiscountAmount,
|
|
bool HasCode,
|
|
DiscountAmountType AmountType,
|
|
DiscountType Type,
|
|
int Count,
|
|
DateTime StartDate,
|
|
DateTime ExpireDate,
|
|
bool IsImmortal,
|
|
long PriceFloor,
|
|
bool HasPriceFloor,
|
|
long PriceCeiling,
|
|
bool HasPriceCeiling,
|
|
bool IsInfinity,
|
|
long UseCount,
|
|
bool IsForInvitation,
|
|
bool IsSpecialOffer,
|
|
bool IsForFirstPurchase,
|
|
Guid ProductId,
|
|
Guid CategoryId) : IRequest<DiscountLDto>;
|
|
|
|
public sealed record UpdateDiscountCommand(
|
|
Guid Id,
|
|
string Code,
|
|
string Description,
|
|
int DiscountPercent,
|
|
long DiscountAmount,
|
|
bool HasCode,
|
|
DiscountAmountType AmountType,
|
|
DiscountType Type,
|
|
int Count,
|
|
DateTime StartDate,
|
|
DateTime ExpireDate,
|
|
bool IsImmortal,
|
|
long PriceFloor,
|
|
bool HasPriceFloor,
|
|
long PriceCeiling,
|
|
bool HasPriceCeiling,
|
|
bool IsInfinity,
|
|
long UseCount,
|
|
bool IsForInvitation,
|
|
bool IsSpecialOffer,
|
|
bool IsForFirstPurchase,
|
|
Guid ProductId,
|
|
Guid CategoryId) : IRequest<bool>;
|
|
|
|
|
|
public sealed record DeleteDiscountCommand(Guid Id) : IRequest<bool>;
|
|
|
|
public sealed record CalculateOrderDiscountCommand(string DiscountCode, Order Order) : IRequest<double>;
|
|
public sealed record CheckUserDiscountFirstUseCommand(string DiscountCode) : IRequest<bool>; |