Commit Graph

55 Commits

Author SHA1 Message Date
masoodafar-web 2502cbbda2 feat: integrate PYMS payment gateway, add blog/sitepage/image services, local file manager
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 8m44s
Payment Gateway:
- Add PYMSPaymentService: IPaymentGatewayService via gRPC to PYMS microservice
- Add ZarinPalPaymentService: direct ZarinPal integration (backup)
- Register 'pyms' payment provider in DI ConfigureServices
- Add PYMS proto files (pyms_transaction.proto, pyms_public_messages.proto)
- Fix VerifyDiscountWalletCharge: pass 'OK' as status instead of Authority
- Update appsettings: PaymentProvider=pyms, sandbox mode, merchant ID

Blog System:
- Add BlogCategory, BlogPost, BlogPostImage entities and CQRS
- Add proto files and gRPC services for blog management
- Add Mapster profiles for blog responses

Content Management:
- Add SitePage entity and CQRS for static pages
- Add proto and gRPC service for site pages

Image/File Management:
- Add LocalFileManager with disk storage + base64 serving + FMS fallback
- Add ImagePathResolverInterceptor for gRPC responses
- Add ImageResolverService for explicit image resolution
- Add UploadsController for public file serving with FMS fallback
- Add PaymentCallbackController for discount order payment callbacks

Database:
- Add blog and content entity migrations
- Remove ImagePath MaxLength constraints
- Remove old FileManagementService (replaced by LocalFileManager)
2026-02-15 23:01:16 +03:30
masoodafar-web b2d676b555 feat: Implement customer profile and referral queries
- Add GetCustomerProfileResponseDto for retrieving customer profile information.
- Create GetCustomerReferralsQuery and GetCustomerReferralsQueryHandler to fetch customer referrals with pagination and filtering options.
- Introduce GetCustomerReferralsResponseDto to structure the response for customer referrals.
- Implement GetCustomerSettingsQuery and GetCustomerSettingsQueryHandler to retrieve user settings.
- Add GetCustomerOrder and GetCustomerOrderQueryHandler for fetching specific customer orders.
- Create GetCustomerOrderHistoryQuery and GetCustomerOrderHistoryQueryHandler to retrieve order history with filtering options.
- Implement GetCustomerOrdersQuery and GetCustomerOrdersQueryHandler for fetching multiple customer orders with filters.
- Add GetCustomerWalletChangeLogQuery and GetCustomerWalletChangeLogQueryHandler for retrieving wallet change logs.
- Implement GetCustomerWithdrawalSettingsQuery and GetCustomerWithdrawalSettingsQueryHandler for fetching withdrawal settings.
- Create GetCustomerWithdrawalsQuery and GetCustomerWithdrawalsQueryHandler to retrieve customer withdrawal requests.
2026-02-05 23:01:50 +03:30
masoodafar-web b41342dcad feat: implement JWT token generation in VerifyOtpTokenCommandHandler and update related configurations 2026-02-03 00:02:04 +03:30
masoodafar-web dde4c68b2f feat: Implement inventory and warehouse management features
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 2m33s
- Add GetLowStockItemsResponseDto and LowStockItemDto for low stock item queries.
- Create CreateStockMovementCommand and its handler for managing stock movements.
- Implement CreateStockMovementCommandValidator for validating stock movement commands.
- Add GetStockMovementsQuery and its handler to retrieve stock movement records.
- Create GetStockMovementsResponseDto and StockMovementListDto for stock movement responses.
- Implement GetStockMovementsByInventoryItemQuery and its handler for fetching movements by inventory item.
- Add CreateWarehouseCommand and its handler for creating new warehouses.
- Implement CreateWarehouseCommandValidator for warehouse creation validation.
- Add DeleteWarehouseCommand and its handler for removing warehouses.
- Implement SetDefaultWarehouseCommand and its handler for setting a default warehouse.
- Create UpdateWarehouseCommand and its handler for updating warehouse details.
- Implement GetAllWarehousesQuery and its handler to retrieve all warehouses.
- Add GetWarehouseQuery and its handler for fetching a specific warehouse by ID.
- Implement SearchWarehousesQuery and its handler for searching warehouses based on criteria.
2026-01-03 11:59:08 +03:30
masoodafar-web d3d021c007 feat(migrations): add ImageDocumentId column to ManualPayments table
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m36s
feat(mappings): implement DiscountCategoryProfile for mapping between application DTOs and protobuf responses
2026-01-03 07:37:45 +03:30
masoodafar-web bea43a0569 Add ImagePath column to ManualPayments table in CMS schema
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m52s
2026-01-02 02:13:57 +03:30
masoodafar-web 1cf501711f Implement Inventory Management Service with CRUD operations for warehouses and inventory items, stock operations, and bulk processing capabilities.
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m48s
2026-01-02 00:45:37 +03:30
masoodafar-web f0117eb1d5 Add migration for DiscountProductImages table
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m53s
- Created a new table `DiscountProductImages` in the CMS schema.
- Added columns for image details including `Title`, `AltText`, `ImagePath`, `ThumbnailPath`, `SortOrder`, `IsActive`, `Created`, `CreatedBy`, `LastModified`, `LastModifiedBy`, and `IsDeleted`.
- Established a foreign key relationship with the `DiscountProducts` table.
- Created indexes on `DiscountProductId` and a composite index on `DiscountProductId` and `SortOrder`.
2026-01-01 02:26:33 +03:30
masoodafar-web 02e2f8111f feat: implement Kavenegar SMS service and refactor system configurations to use static constants
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m38s
2025-12-26 09:04:27 +03:30
masoodafar-web 17c2958b9c feat(AppVersion): Add version tracking system for frontend cache invalidation
Build and Deploy to Production / build-and-deploy (push) Successful in 1m37s
- Add AppVersion entity with CurrentVersion, MinRequiredVersion, RequiresFullCacheClear
- Add GetAppVersion query to check app version and compare with client version
- Add GetAllAppVersions query for admin panel
- Add UpdateAppVersion command to update/create app versions
- Add appversion.proto for gRPC communication
- Add AppVersionService for gRPC endpoints
- Add database migration for AppVersions table
2025-12-25 18:06:12 +03:30
masoodafar-web 5bcf6c9840 feat: add network leg position assignment for new users 2025-12-22 22:39:15 +03:30
masoodafar-web 25476ba120 feat: implement commission calculation strategy with ORM and SP options
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m43s
2025-12-20 03:15:28 +03:30
masoodafar-web 8b784101be feat: refactor week number handling to use WeekDefinitionId across multiple entities and queries 2025-12-19 10:41:22 +03:30
masoodafar-web 3cb95dc349 feat: enhance user club feature management with sorting and creation timestamps 2025-12-19 00:30:47 +03:30
masoodafar-web c7211fb9a7 feat: update entity configurations to specify column types for cities, states, and countries 2025-12-18 03:49:47 +03:30
masoodafar-web ead0cf4235 feat: add geography entities with countries, states and cities 2025-12-18 00:43:55 +03:30
masoodafar-web ff1c1d5d61 feat: add IsActive field to UserClubFeatures for admin management 2025-12-12 01:40:26 +03:30
masoud 69d5ecf0d7 revert: Back to simple MigrateAsync - it's already idempotent
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 2m5s
MigrateAsync is smart enough to:
- Create DB if it doesn't exist
- Apply only pending migrations
- Skip if DB is up to date

The orphaned CMS.mdf files were cleaned from SQL Server.
2025-12-07 21:27:46 +00:00
masoud 1dbe90d020 fix: Use EnsureCreatedAsync instead of MigrateAsync for initial db setup
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 2m9s
- EnsureCreatedAsync creates db only if it doesn't exist
- Returns false if db already exists (idempotent)
- Prevents 'CMS.mdf already exists' error
- Still applies pending migrations when needed
2025-12-07 21:21:47 +00:00
masoud 7ec9c4077c fix: Improve database migration strategy - only migrate if needed
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 2m16s
- Check if database exists before creating
- Only apply pending migrations
- Skip migration if database is up to date
- Prevents 'file already exists' error on restart
2025-12-07 21:16:49 +00:00
masoodafar-web 00ba911703 feat: Add archive and schedule fields to PublicMessages 2025-12-06 00:16:30 +03:30
masoud ed642947dc Fix: Suppress EF Core 9 PendingModelChangesWarning 2025-12-05 18:55:12 +00:00
masoodafar-web ee1fa9d064 feat: Enhance withdrawal request handling with additional fields and network level configurations 2025-12-04 19:53:30 +03:30
masoodafar-web ba6d74fe35 feat: Implement Public Message Management Commands and Queries
- Add GetUserPackageStatusQueryValidator for user package status validation.
- Create ArchiveMessageCommand and ArchiveMessageCommandHandler for archiving public messages.
- Implement ArchiveMessageCommandValidator to validate message ID.
- Introduce PublishMessageCommand and PublishMessageCommandHandler for publishing messages.
- Add PublishMessageCommandValidator for validating publish message requests.
- Implement GetPublicMessageQuery and GetPublicMessageQueryHandler for retrieving public messages.
- Create GetPublicMessageQueryValidator for validating public message requests.
- Add ApplyDiscountToOrderCommand and ApplyDiscountToOrderCommandHandler for applying discounts to orders.
- Implement ApplyDiscountToOrderCommandValidator for validating discount application requests.
- Create UpdateOrderStatusCommand and UpdateOrderStatusCommandHandler for changing order statuses.
- Implement UpdateOrderStatusCommandValidator for validating order status updates.
- Add CalculateOrderPVQuery and CalculateOrderPVQueryHandler for calculating order PV.
- Implement CalculateOrderPVQueryValidator for validating PV calculation requests.
- Create GetOrdersByDateRangeQuery and GetOrdersByDateRangeQueryHandler for retrieving orders by date range.
- Implement GetOrdersByDateRangeQueryValidator for validating date range queries.
- Add PublicMessage entity to represent public messages in the system.
- Implement PublicMessageService for handling public message operations via gRPC.
2025-12-04 03:43:19 +03:30
masoodafar-web f0f48118e7 Add validators and services for Product Galleries and Product Tags
- Implemented Create, Delete, Get, and Update validators for Product Galleries.
- Added Create, Delete, Get, and Update validators for Product Tags.
- Created service classes for handling Discount Categories, Discount Orders, Discount Products, Discount Shopping Cart, Product Categories, Product Galleries, and Product Tags.
- Each service class integrates with CQRS for command and query handling.
- Established mapping profiles for Product Galleries.
2025-12-04 02:40:49 +03:30
masoodafar-web 78606cc5cc feat: Add ClearCart command and response, implement CancelOrder command with validation, and enhance DeliveryStatus and User models 2025-12-02 03:30:36 +03:30
masoodafar-web 25fc73ae28 feat: Enhance network membership and withdrawal processing with user tracking and logging 2025-12-01 20:52:18 +03:30
masoodafar-web 0ddf64370d feat: Complete Phase 8 - Migration & Seed Data
Database Migration:
- Applied migration 20251129002222_AddNetworkClubSystemV2
- Created 11 new tables:
  * SystemConfigurations
  * SystemConfigurationHistories
  * ClubMemberships
  * ClubMembershipHistories
  * ClubFeatures
  * UserClubFeatures
  * NetworkWeeklyBalances
  * WeeklyCommissionPools
  * UserCommissionPayouts
  * CommissionPayoutHistories
  * NetworkMembershipHistories
- Updated existing tables:
  * Users: Added NetworkParentId, LegPosition
  * UserWallets: Added DiscountBalance
  * Products: Added IsClubExclusive, ClubDiscountPercent

Seed Data:
- Added 10 default SystemConfigurations:
  * Network settings (MaxDepth, AllowOrphanNodes)
  * Club settings (DefaultDuration, MinimumActivation)
  * Commission settings (PoolPercent, MinimumPayout, WithdrawalMethods)
  * System settings (MaintenanceMode, AuditLog)

Migration Status:  Applied successfully
Database Schema:  Verified
Build Status:  Success (0 errors)
2025-11-29 04:57:42 +03:30
masoodafar-web 04bc593184 feat: Add EF configurations and migration for network-club system
EF Core Configurations (11 files):
- SystemConfigurationConfiguration with Scope+Key composite index
- ClubMembershipConfiguration with one-to-one User relationship
- ClubFeatureConfiguration with IsActive+SortOrder index
- UserClubFeatureConfiguration with composite unique index
- NetworkWeeklyBalanceConfiguration with UserId+WeekNumber index
- WeeklyCommissionPoolConfiguration with unique WeekNumber
- UserCommissionPayoutConfiguration with multiple indexes
- ClubMembershipHistoryConfiguration for audit trail
- NetworkMembershipHistoryConfiguration for audit trail
- CommissionPayoutHistoryConfiguration for audit trail
- SystemConfigurationHistoryConfiguration for audit trail

Configuration Updates:
- UserConfiguration: Add NetworkParentId, LegPosition with indexes
- UserWalletConfiguration: Add DiscountBalance field
- ProductsConfiguration: Add IsClubExclusive, ClubDiscountPercent with index

Infrastructure Updates:
- ApplicationDbContext: Add 11 new DbSets for network-club entities
- GlobalUsings: Add Domain entity namespaces

Migration:
- AddNetworkClubSystemV2: Complete database schema for network-club system
2025-11-29 03:52:46 +03:30
masoodafar-web 32b7cb3238 Add delivery tracking fields to UserOrder entity 2025-11-27 06:39:47 +03:30
masoodafar-web 8a7d02ce81 Generator Changes at 11/25/2025 2:19:02 AM +03:30 2025-11-25 02:21:08 +03:30
masoodafar-web 1b146b338f update 2025-11-25 02:08:28 +03:30
masoodafar-web 92a9a0e75d Generator Changes at 11/25/2025 1:59:23 AM +03:30 2025-11-25 02:03:51 +03:30
masoodafar-web 87842f0b9b update 2025-11-25 01:58:45 +03:30
masoodafar-web 02fc3f9122 Generator Changes at 11/25/2025 12:39:59 AM +03:30 2025-11-25 00:42:45 +03:30
masoodafar-web 25eee4ede3 Merge branch 'newmain' 2025-11-24 23:22:18 +03:30
masoodafar-web 6cd0a45336 update 2025-11-24 22:55:14 +03:30
masoodafar-web b15ec93aa1 Refactor product filtering logic and add database migration for categories and tags 2025-11-20 20:06:01 +03:30
masoodafar-web 7840f3b463 update 2025-11-20 00:40:28 +03:30
masoodafar-web 8a9cabf7f1 Generator Changes at 11/18/2025 10:39:12 PM +03:30 2025-11-18 22:41:44 +03:30
masoodafar-web f6dcd43346 update 2025-11-18 22:38:50 +03:30
masoodafar-web dba8aecc97 Generator Changes at 11/17/2025 11:53:47 PM +03:30 2025-11-17 23:57:51 +03:30
masoodafar-web 78e461909f update 2025-11-17 23:49:48 +03:30
masoodafar-web 79e5871899 Add contract and user contract entities with relationships; update JWT token claims 2025-11-16 17:17:17 +03:30
masoodafar-web 0a649325f8 Generator Changes at 11/16/2025 12:48:45 AM +03:30 2025-11-16 00:53:15 +03:30
masoodafar-web 0e31384e3b Add HashPassword column to Users table in CMS schema 2025-11-13 21:41:27 +03:30
masoodafar-web 8c4b1ab4f4 Refactor JWT token generation and update password handling logic; add exception handling behavior 2025-11-13 21:40:14 +03:30
masoodafar-web f68b9d7a89 update 2025-11-12 22:13:55 +03:30
masoodafar-web 1fb7e4d374 update 2025-11-12 20:30:53 +03:30
masoodafar-web b27c765731 Generator Changes at 11/12/2025 1:32:03 AM +03:30 2025-11-12 02:24:02 +03:30