diff --git a/src/CMSMicroservice.Application/PackageCQ/Commands/CreateNewPackage/CreateNewPackageCommand.cs b/src/CMSMicroservice.Application/PackageCQ/Commands/CreateNewPackage/CreateNewPackageCommand.cs index 5d8b6e6..c0fd523 100644 --- a/src/CMSMicroservice.Application/PackageCQ/Commands/CreateNewPackage/CreateNewPackageCommand.cs +++ b/src/CMSMicroservice.Application/PackageCQ/Commands/CreateNewPackage/CreateNewPackageCommand.cs @@ -9,5 +9,17 @@ public record CreateNewPackageCommand : IRequest public string ImagePath { get; init; } //قیمت public long Price { get; init; } - + // فیلدهای جدید پکیج + public int SortOrder { get; init; } + public bool IsActive { get; init; } = true; + public bool IsBasePackage { get; init; } + public bool SupportsDayaPurchase { get; init; } = true; + public bool SupportsDirectPurchase { get; init; } = true; + public long ActivationFee { get; init; } + public double DiscountMultiplier { get; init; } = 2.0; + public double MagicWalletMultiplier { get; init; } = 2.5; + public int MaxBalancesPerLeg { get; init; } = 300; + public int MaxNetworkLevel { get; init; } = 15; + public long MagicWalletMaxDeposit { get; init; } = 1_000_000_000; + public long MagicWalletMaxCredit { get; init; } = 2_500_000_000; } \ No newline at end of file diff --git a/src/CMSMicroservice.Application/PackageCQ/Commands/PurchaseGoldenPackage/PurchaseGoldenPackageCommandHandler.cs b/src/CMSMicroservice.Application/PackageCQ/Commands/PurchaseGoldenPackage/PurchaseGoldenPackageCommandHandler.cs index 8d2aae5..667daf2 100644 --- a/src/CMSMicroservice.Application/PackageCQ/Commands/PurchaseGoldenPackage/PurchaseGoldenPackageCommandHandler.cs +++ b/src/CMSMicroservice.Application/PackageCQ/Commands/PurchaseGoldenPackage/PurchaseGoldenPackageCommandHandler.cs @@ -65,16 +65,21 @@ public class PurchaseGoldenPackageCommandHandler : IRequestHandler {NewBalance}", @@ -132,7 +134,7 @@ public class VerifyPackagePurchaseCommandHandler ChangeValue = order.Amount, CurrentNetworkBalance = wallet.NetworkBalance, ChangeNerworkValue = 0, - CurrentDiscountBalance = wallet.DiscountBalance - (order.Amount * 2), // قبل از شارژ DiscountBalance + CurrentDiscountBalance = wallet.DiscountBalance - discountAmount, // قبل از شارژ DiscountBalance ChangeDiscountValue = 0, IsIncrease = true, RefrenceId = transaction.Id @@ -148,7 +150,7 @@ public class VerifyPackagePurchaseCommandHandler CurrentNetworkBalance = wallet.NetworkBalance, ChangeNerworkValue = 0, CurrentDiscountBalance = wallet.DiscountBalance, - ChangeDiscountValue = order.Amount * 2, + ChangeDiscountValue = discountAmount, IsIncrease = true, RefrenceId = transaction.Id }; diff --git a/src/CMSMicroservice.Application/PackageCQ/Queries/GetAllPackageByFilter/GetAllPackageByFilterResponseDto.cs b/src/CMSMicroservice.Application/PackageCQ/Queries/GetAllPackageByFilter/GetAllPackageByFilterResponseDto.cs index f8d3b39..76eb16d 100644 --- a/src/CMSMicroservice.Application/PackageCQ/Queries/GetAllPackageByFilter/GetAllPackageByFilterResponseDto.cs +++ b/src/CMSMicroservice.Application/PackageCQ/Queries/GetAllPackageByFilter/GetAllPackageByFilterResponseDto.cs @@ -18,4 +18,17 @@ public class GetAllPackageByFilterResponseDto public string ImagePath { get; set; } //قیمت public long Price { get; set; } + // فیلدهای جدید پکیج + public int SortOrder { get; set; } + public bool IsActive { get; set; } + public bool IsBasePackage { get; set; } + public bool SupportsDayaPurchase { get; set; } + public bool SupportsDirectPurchase { get; set; } + public long ActivationFee { get; set; } + public decimal DiscountMultiplier { get; set; } + public decimal MagicWalletMultiplier { get; set; } + public int MaxBalancesPerLeg { get; set; } + public int MaxNetworkLevel { get; set; } + public long MagicWalletMaxDeposit { get; set; } + public long MagicWalletMaxCredit { get; set; } } diff --git a/src/CMSMicroservice.Application/PackageCQ/Queries/GetPackage/GetPackageResponseDto.cs b/src/CMSMicroservice.Application/PackageCQ/Queries/GetPackage/GetPackageResponseDto.cs index 04c3252..ec118f5 100644 --- a/src/CMSMicroservice.Application/PackageCQ/Queries/GetPackage/GetPackageResponseDto.cs +++ b/src/CMSMicroservice.Application/PackageCQ/Queries/GetPackage/GetPackageResponseDto.cs @@ -11,5 +11,17 @@ public class GetPackageResponseDto public string ImagePath { get; set; } //قیمت public long Price { get; set; } - + // فیلدهای جدید پکیج + public int SortOrder { get; set; } + public bool IsActive { get; set; } + public bool IsBasePackage { get; set; } + public bool SupportsDayaPurchase { get; set; } + public bool SupportsDirectPurchase { get; set; } + public long ActivationFee { get; set; } + public decimal DiscountMultiplier { get; set; } + public decimal MagicWalletMultiplier { get; set; } + public int MaxBalancesPerLeg { get; set; } + public int MaxNetworkLevel { get; set; } + public long MagicWalletMaxDeposit { get; set; } + public long MagicWalletMaxCredit { get; set; } } \ No newline at end of file