feat: add points rule DTOs
This commit is contained in:
parent
1485981d90
commit
a92847530d
11
src/Fengling.Member.Application/Dtos/CodeInfoDto.cs
Normal file
11
src/Fengling.Member.Application/Dtos/CodeInfoDto.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
namespace Fengling.Member.Application.Dtos;
|
||||||
|
|
||||||
|
public record CodeInfoDto(
|
||||||
|
string ProductId,
|
||||||
|
string ProductName,
|
||||||
|
string? ProductPrice,
|
||||||
|
string DealerId,
|
||||||
|
string DistributorId,
|
||||||
|
string StoreId,
|
||||||
|
string CodeId
|
||||||
|
);
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
namespace Fengling.Member.Application.Dtos;
|
||||||
|
|
||||||
|
public record PointsCalculationResultDto(
|
||||||
|
bool Success,
|
||||||
|
int Points,
|
||||||
|
DateTime ExpireAt,
|
||||||
|
Guid? AppliedRuleId,
|
||||||
|
string? Message,
|
||||||
|
List<string> MatchedDimensions
|
||||||
|
);
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
using Fengling.Member.Domain.Aggregates.PointsRuleModel.Enums;
|
||||||
|
|
||||||
|
namespace Fengling.Member.Application.Dtos.PointsRule;
|
||||||
|
|
||||||
|
public record CreateConditionRequest(
|
||||||
|
DimensionType DimensionType,
|
||||||
|
string DimensionValue,
|
||||||
|
string? Operator
|
||||||
|
);
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
using Fengling.Member.Domain.Aggregates.PointsRuleModel.Enums;
|
||||||
|
|
||||||
|
namespace Fengling.Member.Application.Dtos.PointsRule;
|
||||||
|
|
||||||
|
public record CreatePointsRuleRequest(
|
||||||
|
string Name,
|
||||||
|
string Code,
|
||||||
|
RuleType RuleType,
|
||||||
|
int BasePoints,
|
||||||
|
decimal? WeightFactor,
|
||||||
|
int ValidityDays,
|
||||||
|
int Priority,
|
||||||
|
CalculationMode CalculationMode,
|
||||||
|
List<CreateConditionRequest> Conditions
|
||||||
|
);
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
using Fengling.Member.Domain.Aggregates.PointsRuleModel.Enums;
|
||||||
|
|
||||||
|
namespace Fengling.Member.Application.Dtos.PointsRule;
|
||||||
|
|
||||||
|
public record PointsRuleConditionDto(
|
||||||
|
Guid Id,
|
||||||
|
Guid RuleId,
|
||||||
|
DimensionType DimensionType,
|
||||||
|
string DimensionValue,
|
||||||
|
string? Operator
|
||||||
|
);
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
using Fengling.Member.Domain.Aggregates.PointsRuleModel.Enums;
|
||||||
|
|
||||||
|
namespace Fengling.Member.Application.Dtos.PointsRule;
|
||||||
|
|
||||||
|
public record PointsRuleDto(
|
||||||
|
Guid Id,
|
||||||
|
string Name,
|
||||||
|
string Code,
|
||||||
|
RuleType RuleType,
|
||||||
|
int BasePoints,
|
||||||
|
decimal? WeightFactor,
|
||||||
|
int ValidityDays,
|
||||||
|
int Priority,
|
||||||
|
CalculationMode CalculationMode,
|
||||||
|
bool IsActive,
|
||||||
|
DateTime EffectiveFrom,
|
||||||
|
DateTime? EffectiveTo,
|
||||||
|
List<PointsRuleConditionDto> Conditions
|
||||||
|
);
|
||||||
Loading…
Reference in New Issue
Block a user