diff --git a/src/Fengling.Member.Application/Dtos/CodeInfoDto.cs b/src/Fengling.Member.Application/Dtos/CodeInfoDto.cs new file mode 100644 index 0000000..522f5ea --- /dev/null +++ b/src/Fengling.Member.Application/Dtos/CodeInfoDto.cs @@ -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 +); diff --git a/src/Fengling.Member.Application/Dtos/PointsCalculationResultDto.cs b/src/Fengling.Member.Application/Dtos/PointsCalculationResultDto.cs new file mode 100644 index 0000000..2153208 --- /dev/null +++ b/src/Fengling.Member.Application/Dtos/PointsCalculationResultDto.cs @@ -0,0 +1,10 @@ +namespace Fengling.Member.Application.Dtos; + +public record PointsCalculationResultDto( + bool Success, + int Points, + DateTime ExpireAt, + Guid? AppliedRuleId, + string? Message, + List MatchedDimensions +); diff --git a/src/Fengling.Member.Application/Dtos/PointsRule/CreateConditionRequest.cs b/src/Fengling.Member.Application/Dtos/PointsRule/CreateConditionRequest.cs new file mode 100644 index 0000000..397cbf4 --- /dev/null +++ b/src/Fengling.Member.Application/Dtos/PointsRule/CreateConditionRequest.cs @@ -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 +); diff --git a/src/Fengling.Member.Application/Dtos/PointsRule/CreatePointsRuleRequest.cs b/src/Fengling.Member.Application/Dtos/PointsRule/CreatePointsRuleRequest.cs new file mode 100644 index 0000000..f7c84a7 --- /dev/null +++ b/src/Fengling.Member.Application/Dtos/PointsRule/CreatePointsRuleRequest.cs @@ -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 Conditions +); diff --git a/src/Fengling.Member.Application/Dtos/PointsRule/PointsRuleConditionDto.cs b/src/Fengling.Member.Application/Dtos/PointsRule/PointsRuleConditionDto.cs new file mode 100644 index 0000000..c1ad8ae --- /dev/null +++ b/src/Fengling.Member.Application/Dtos/PointsRule/PointsRuleConditionDto.cs @@ -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 +); diff --git a/src/Fengling.Member.Application/Dtos/PointsRule/PointsRuleDto.cs b/src/Fengling.Member.Application/Dtos/PointsRule/PointsRuleDto.cs new file mode 100644 index 0000000..6c67ac5 --- /dev/null +++ b/src/Fengling.Member.Application/Dtos/PointsRule/PointsRuleDto.cs @@ -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 Conditions +);