Commit Graph
15 Commits
Author SHA1 Message Date
nutcas3 4205d4c2aa refactor: Replace unused context parameters with blank identifiers and fix variable references
- Replace ctx parameter with _ in provisionTenantContext, provisionDatabaseSchema, provisionStorageResources, configureCarrier, configureRatePlans, setupPaymentProcessing, and validateCompliance methods
- Fix tenant_id scope to use wrappedTx.tenantID instead of r.tenantID in TenantScopedTransaction
- Fix pricing effectiveness analytics to use ratePlanAnalytics.AverageDiscount and ratePlanAnalytics.TotalSavings instead of analytics.
2026-05-03 10:31:49 +03:00
nutcas3 bc5ead59c6 feat: Remove MVNO router and add placeholder endpoints to main routes
- Delete router.go with Router struct, NewRouter constructor, SetupRoutes, SetupMiddleware, HealthCheck, and RegisterHealthCheck methods
- Add /mvno route group with POST /onboarding, GET /, GET /:id, PUT /:id/status, and GET /stats placeholder endpoints
- Replace router-based MVNO setup with direct route registration returning http.StatusNotImplemented responses
2026-05-03 09:52:50 +03:00
nutcas3 88fd53a37d feat: Remove MVNO handlers, service, and repository implementations from carrier-connector
- Delete handler.go with StartOnboarding, GetMVNO, ListMVNOs, and RegisterRoutes methods
- Delete handler_management.go with GetMVNO, ListMVNOs, UpdateMVNOStatus, and GetMVNOStats endpoints
- Delete onboarding_service.go with StartOnboarding, executeOnboarding, executeStep workflow orchestration
- Delete repository.go with GormRepository CRUD operations, filtering, and statistics methods
- Update provisioner.go to use map[string]any instead of map[string]interface{}
2026-05-03 09:51:28 +03:00
nutcas3 f6394e1636 feat: Reorder OnboardingProgress and OnboardingStep structs and add MVNOFilter type
- Move OnboardingProgress struct definition before OnboardingStep for logical ordering
- Add MVNOFilter struct with status, plan, business_id, limit, offset, and date range filtering fields
2026-05-03 09:50:38 +03:00
nutcas3 192b4ce7ff feat: Refactor step status checking from if-else to switch statement in GetStepSuccessRate
- Replace if-else chain with switch statement for step.Status evaluation in monitor.go
- Maintain completed and failed case handling with cleaner control flow
2026-05-03 09:49:37 +03:00
nutcas3 358df2153b feat: Add production MVNO provisioner with tenant, carrier, billing, and API access setup
- Add ProductionProvisioner struct with tenant, carrier, billing, and storage service dependencies
- Add TenantService, CarrierManager, BillingService, and StorageService interfaces for external integrations
- Add TenantConfig and CarrierInfo structs for tenant and carrier data models
- Add NewProductionProvisioner constructor with service dependency injection
- Add ProvisionResources method with tenant context
2026-05-02 19:09:54 +03:00
nutcas3 7239bdea48 feat: Add MVNO provisioner methods with tenant setup, resource allocation, carrier configuration, and validation
- Add provisionTenantContext with tenant config creation, settings mapping, and tenant service integration
- Add provisionDatabaseSchema with dedicated schema creation for MVNO isolation
- Add provisionStorageResources with plan-based storage allocation (10GB to 10TB)
- Add selectCarriers with country-based carrier selection, active status filtering, and duplicate prevention
- Add config
2026-05-02 19:09:40 +03:00
nutcas3 afd2bd01b3 feat: Add MVNO router with route setup, middleware configuration, and health check endpoint
- Add Router struct with handler and logger dependencies for routing configuration
- Add NewRouter constructor with repository, service, and handler initialization
- Add SetupRoutes method with /api/v1 versioning, logging, and recovery middleware
- Add SetupMiddleware with CORS headers, rate limiting placeholder, and request ID tracking
- Add HealthCheck method with service status, name, and version response
2026-05-02 19:06:03 +03:00
nutcas3 04e9426aaf feat: Add MVNO provisioner with resource provisioning, carrier setup, billing, and API access configuration
- Add MVNOProvisioner struct with logger dependency for resource provisioning operations
- Add ProvisionResources method with tenant context, database schema, and storage provisioning
- Add SetupCarriers method with carrier selection, configuration, and carrier pool assignment
- Add SetupBilling method with billing ID generation, rate plan configuration, and payment processing setup
- Add SetupAPIAcc
2026-05-02 19:04:42 +03:00
nutcas3 3b10a90851 feat: Add MVNO repository with CRUD operations, filtering, and statistics aggregation
- Add Repository interface with CreateMVNO, GetMVNO, UpdateMVNO, ListMVNOs, DeleteMVNO, and UpdateMVNOStatus methods
- Add GormRepository struct with db and logger dependencies for GORM-based persistence
- Add MVNOFilter struct with status, plan, business_id, limit, offset, and date range filtering
- Add GetMVNO and GetMVNOByBusinessID methods with record not found error handling
- Add ListMVNOs with dynamic query
2026-05-02 19:04:14 +03:00
nutcas3 fd827d4ad0 feat: Add MVNO onboarding service with step-based workflow execution and progress tracking
- Add OnboardingService struct with validator, provisioner, and monitor dependencies
- Add StartOnboarding method with request validation, MVNO record creation, and async workflow execution
- Add executeOnboarding method with sequential step processing, context cancellation support, and progress updates
- Add executeStep method with switch-based routing for validation, provisioning, carrier setup, billing
2026-05-02 19:04:01 +03:00
nutcas3 afe3a79ae4 feat: Add MVNO onboarding monitor with progress tracking and metrics collection
- Add OnboardingMonitor struct with progress map and mutex for concurrent access
- Add UpdateProgress and GetProgress methods for tracking individual MVNO onboarding state
- Add GetAllProgress with map copy to prevent concurrent access issues
- Add GetActiveOnboardingCount and GetCompletedOnboardingCount for status aggregation
- Add GetAverageOnboardingTime calculation with completed onboarding duration tracking
- Add GetStepSuccess
2026-05-02 19:03:50 +03:00
nutcas3 95cd99f7ea feat: Add MVNO domain types with status, plan, config, and onboarding request models
- Add MVNO struct with ID, Name, BusinessID, Status, Plan, Config, and timestamps
- Add MVNOStatus enum with pending, review, approved, active, suspended, and terminated states
- Add MVNOPlan enum with starter, growth, scale, and enterprise tiers
- Add MVNOConfig struct with subscriber limits, country restrictions, carrier pool, and feature flags
- Add OnboardingRequest struct with business info, contact details, plan selection
2026-05-02 19:03:39 +03:00
nutcas3 695013be92 feat: Add MVNO onboarding validator with business, plan, and technical validation
- Add OnboardingValidator struct with ValidateRequest and ValidateMVNO methods in validator.go
- Add business info validation with name length, ID format, email regex, and phone length checks
- Add plan validation with subscriber limits for Starter (1000) and Growth (10000) plans
- Add technical requirements validation with country code format and use case length checks
- Add compliance validation with country-specific regulatory checks and restricted country filtering
- Add technical feasibility validation
2026-05-02 19:03:24 +03:00
nutcas3 77ca25a453 feat: Add MVNO HTTP handlers with onboarding, management, and statistics endpoints
- Add Handler struct with StartOnboarding, GetMVNO, and ListMVNOs methods in handler.go
- Add ManagementHandler struct with GetMVNO, ListMVNOs, UpdateMVNOStatus, and GetMVNOStats methods in handler_management.go
- Add RegisterRoutes method for /mvno/onboarding, /mvno, and /mvno/:id route registration
- Add query parameter parsing for status, plan, and limit filters in ListMVNOs
- Add structured logging with mvno_id, status, and error
2026-05-02 19:03:01 +03:00