feat: Implement Magic Wallet functionality
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m36s
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m36s
- Added ClubMembershipCycle entity and DbSet to IApplicationDbContext. - Updated VAT rate from 9% to 10% in VatCalculator and related areas. - Introduced Magic Wallet settings in SystemConstants. - Enhanced UserWallet entity to support Magic Wallet features. - Updated TransactionType enum to include Magic Wallet transactions. - Configured UserWallet to handle Magic Wallet properties in ApplicationDbContext. - Implemented OrmCommissionCalculationStrategy to exclude Magic Wallet users from commission calculations. - Added Protobuf definitions for Magic Wallet methods and responses. - Created PaymentCallbackController endpoint for handling Magic Wallet charge callbacks. - Updated UserOrderService to manage Magic Wallet state transitions. - Developed UserWalletService to support Magic Wallet operations. - Created ChargeMagicWalletCommand and its handler for initiating Magic Wallet charges. - Implemented VerifyMagicWalletChargeCommand and handler for payment verification. - Added validation for ChargeMagicWalletCommand. - Established ClubMembershipCycle configuration for EF Core. - Introduced WalletMode enum to differentiate between Normal and Magic modes.
This commit is contained in:
+14
@@ -1,4 +1,5 @@
|
||||
using CMSMicroservice.Domain.Entities;
|
||||
using CMSMicroservice.Domain.Enums;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
namespace CMSMicroservice.Infrastructure.Persistence.Configurations;
|
||||
@@ -20,5 +21,18 @@ public class UserWalletConfiguration : IEntityTypeConfiguration<UserWallet>
|
||||
builder.Property(entity => entity.NetworkBalance).IsRequired(true);
|
||||
builder.Property(entity => entity.DiscountBalance).IsRequired(true);
|
||||
|
||||
// Magic Wallet
|
||||
builder.Property(entity => entity.WalletMode)
|
||||
.IsRequired()
|
||||
.HasDefaultValue(WalletMode.Normal);
|
||||
builder.Property(entity => entity.MagicTotalDeposited)
|
||||
.IsRequired()
|
||||
.HasDefaultValue(0L);
|
||||
builder.Property(entity => entity.MagicTotalCredited)
|
||||
.IsRequired()
|
||||
.HasDefaultValue(0L);
|
||||
builder.Property(entity => entity.MagicActivatedAt).IsRequired(false);
|
||||
builder.Property(entity => entity.MagicCompletedAt).IsRequired(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user