2a569a024f
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.
94 lines
4.0 KiB
C#
94 lines
4.0 KiB
C#
using CMSMicroservice.Domain.Entities.Blog;
|
|
using CMSMicroservice.Domain.Entities.Content;
|
|
using CMSMicroservice.Domain.Entities.Payment;
|
|
using CMSMicroservice.Domain.Entities.Order;
|
|
using CMSMicroservice.Domain.Entities.DiscountShop;
|
|
using CMSMicroservice.Domain.Entities.Geography;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
namespace CMSMicroservice.Application.Common.Interfaces;
|
|
|
|
public interface IApplicationDbContext
|
|
{
|
|
DbSet<UserAddress> UserAddresses { get; }
|
|
DbSet<Package> Packages { get; }
|
|
DbSet<Role> Roles { get; }
|
|
DbSet<Category> Categories { get; }
|
|
DbSet<UserRole> UserRoles { get; }
|
|
DbSet<UserCart> UserCarts { get; }
|
|
DbSet<ProductGallery> ProductGalleries { get; }
|
|
DbSet<FactorDetails> FactorDetails { get; }
|
|
DbSet<Product> Products { get; }
|
|
DbSet<ProductImage> ProductImages { get; }
|
|
DbSet<User> Users { get; }
|
|
DbSet<OtpToken> OtpTokens { get; }
|
|
DbSet<Contract> Contracts { get; }
|
|
DbSet<UserContract> UserContracts { get; }
|
|
DbSet<Tag> Tags { get; }
|
|
DbSet<ProductCategory> ProductCategories { get; }
|
|
DbSet<ProductTag> ProductTags { get; }
|
|
DbSet<Transaction> Transactions { get; }
|
|
DbSet<UserOrder> UserOrders { get; }
|
|
DbSet<OrderVAT> OrderVATs { get; }
|
|
DbSet<UserPackagePurchase> UserPackagePurchases { get; }
|
|
DbSet<UserWallet> UserWallets { get; }
|
|
DbSet<UserWalletChangeLog> UserWalletChangeLogs { get; }
|
|
DbSet<ManualPayment> ManualPayments { get; }
|
|
DbSet<PaymentTransaction> PaymentTransactions { get; }
|
|
DbSet<PublicMessage> PublicMessages { get; }
|
|
DbSet<ClubMembership> ClubMemberships { get; }
|
|
DbSet<ClubMembershipHistory> ClubMembershipHistories { get; }
|
|
DbSet<ClubMembershipCycle> ClubMembershipCycles { get; }
|
|
DbSet<ClubFeature> ClubFeatures { get; }
|
|
DbSet<UserClubFeature> UserClubFeatures { get; }
|
|
DbSet<NetworkWeeklyBalance> NetworkWeeklyBalances { get; }
|
|
DbSet<NetworkMembershipHistory> NetworkMembershipHistories { get; }
|
|
DbSet<WeekDefinition> WeekDefinitions { get; }
|
|
DbSet<WeeklyCommissionPool> WeeklyCommissionPools { get; }
|
|
DbSet<UserCommissionPayout> UserCommissionPayouts { get; }
|
|
DbSet<CommissionPayoutHistory> CommissionPayoutHistories { get; }
|
|
DbSet<WorkerExecutionLog> WorkerExecutionLogs { get; }
|
|
DbSet<DayaLoanContract> DayaLoanContracts { get; }
|
|
DbSet<AppVersion> AppVersions { get; }
|
|
|
|
// ============= Discount Shop =============
|
|
DbSet<DiscountProduct> DiscountProducts { get; }
|
|
DbSet<DiscountCategory> DiscountCategories { get; }
|
|
DbSet<DiscountProductCategory> DiscountProductCategories { get; }
|
|
DbSet<DiscountProductImage> DiscountProductImages { get; }
|
|
DbSet<DiscountShoppingCart> DiscountShoppingCarts { get; }
|
|
DbSet<DiscountOrder> DiscountOrders { get; }
|
|
DbSet<DiscountOrderDetail> DiscountOrderDetails { get; }
|
|
|
|
// ============= Geography =============
|
|
DbSet<Country> Countries { get; }
|
|
DbSet<State> States { get; }
|
|
DbSet<City> Cities { get; }
|
|
|
|
// ============= Inventory Management =============
|
|
DbSet<Warehouse> Warehouses { get; }
|
|
DbSet<InventoryItem> InventoryItems { get; }
|
|
DbSet<StockMovement> StockMovements { get; }
|
|
|
|
// ============= Blog =============
|
|
DbSet<BlogPost> BlogPosts { get; }
|
|
DbSet<BlogCategory> BlogCategories { get; }
|
|
DbSet<BlogPostCategory> BlogPostCategories { get; }
|
|
DbSet<BlogPostTag> BlogPostTags { get; }
|
|
DbSet<BlogPostImage> BlogPostImages { get; }
|
|
|
|
// ============= Content Management =============
|
|
DbSet<SitePage> SitePages { get; }
|
|
DbSet<SitePageSection> SitePageSections { get; }
|
|
|
|
// ============= Site Page Settings (Simplified) =============
|
|
DbSet<SitePageSettings> SitePageSettingsEntities { get; }
|
|
DbSet<SitePageImage> SitePageImages { get; }
|
|
|
|
/// <summary>
|
|
/// دسترسی به DatabaseFacade برای اجرای raw SQL و Stored Procedures
|
|
/// </summary>
|
|
DatabaseFacade Database { get; }
|
|
|
|
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
|
|
} |