Commit Graph
456 Commits
Author SHA1 Message Date
NutcaseandGitHub 79b99e1d98 Merge branch 'main' into new-features 2026-05-03 13:35:41 +03:00
nutcas3 12887765de feat: Add analytics and churn dashboard pages with metrics visualization, risk analysis, and multi-tab interfaces
- Add analytics page with overview, churn, market, maintenance, and pricing tabs
- Add churn page with predictions table, risk filtering, and retention recommendations
- Add metrics cards for subscribers, churn rate, market share, and system uptime
- Add risk distribution visualization with progress bars and color-coded badges
- Add market metrics with country breakdown and penetration rates
- Add maintenance metrics with asset health, MTTF, MTTR
2026-05-03 13:28:44 +03:00
nutcas3 b7a9b9f09e feat: Add analytics CLI commands with churn, fraud, market, pricing, and maintenance subcommands
- Add NewAnalyticsCmd with churn, fraud, market, pricing, and maintenance command groups
- Add churn commands: predict, metrics, at-risk with risk-level, period, and limit flags
- Add fraud commands: alerts, metrics, patterns with severity and type filtering
- Add market commands: metrics, competitors, opportunities for market analytics
- Add pricing commands: metrics, optimize with strategy-based optimization
- Add maintenance commands: metrics, assets, predict for predictive maintenance
- Add spf
2026-05-03 13:28:13 +03:00
nutcas3 5f36ffe5b5 feat: Add analytics handler with revenue metrics, usage analytics, billing analytics, churn risk, and pricing recommendations
- Add RevenueMetrics with total revenue, ARPU, MRR, ARR, growth percentage, and breakdowns by plan and region
- Add UsageAnalytics with data/voice/SMS totals, average per user, peak usage hour, and trend tracking
- Add BillingAnalytics with invoiced/collected amounts, collection rate, outstanding balance, payment days, and payment method breakdown
- Add ChurnRiskScore with risk level, score, contributing
2026-05-03 13:27:06 +03:00
nutcas3 dcf6089918 feat: Mark unused context parameters with underscore and refactor fraud metrics status handling
- Mark unused context parameters with underscore in analyzeCompetitors, identifyOpportunities, and PredictFailure
- Replace if-else chain with switch statement for fraud alert status handling in GetFraudMetrics
- Add OptimizationResult, PricingMetrics, RatePlan, and HistoricalDataPoint types to pricing/types.go
2026-05-03 13:26:28 +03:00
nutcas3 11fbbfb16b feat: Add analytics, security, and currency route handlers with comprehensive endpoint registration
- Add registerAnalyticsRoutes with churn analysis (predict, metrics, at-risk), market analytics (metrics, competitors, opportunities), predictive maintenance (metrics, assets, alerts, predict), and pricing optimization (metrics, optimize, elasticity) endpoints
- Add registerSecurityRoutes with fraud detection (analyze, alerts, update status, metrics, patterns) and SIM swap protection (verify, history) endpoints
2026-05-03 13:26:11 +03:00
nutcas3 4a84193526 feat: Add currency handler with conversion, exchange rates, billing, and analytics endpoints
- Add CurrencyHandler with NewCurrencyHandler constructor
- Add ConvertCurrency with multi-currency support (USD, EUR, GBP, JPY, CAD, AUD, CHF)
- Add GetExchangeRate, GetExchangeRateHistory with 30-day historical data, and RefreshExchangeRates endpoints
- Add GetSupportedCurrencies returning code, name, and symbol for 10 currencies
- Add ProcessBilling with charge/credit/refund types and transaction creation
2026-05-03 13:25:42 +03:00
nutcas3 d011945ec2 feat: Add analytics handler with churn prediction, market metrics, and analytics types
- Add AnalyticsHandler with NewAnalyticsHandler constructor
- Add PredictChurn endpoint returning risk level, score, predicted date, reasons, and recommendations
- Add GetAtRiskCustomers with risk level filtering and configurable limit (max 1000)
- Add GetMarketMetrics returning market size, subscribers, share, growth rate, and country breakdown
- Add ChurnPrediction struct with ProfileID, RiskLevel, RiskScore
2026-05-03 13:25:31 +03:00
nutcas3 2c6643e228 feat: Add analytics handlers for market analysis, maintenance metrics, and pricing optimization
- Add GetChurnMetrics with period-based churn rate, subscriber counts, and risk distribution
- Add GetCompetitors with market share, strengths, weaknesses, and threat levels
- Add GetMarketOpportunities with potential subscribers, ROI, and confidence scores
- Add GetMaintenanceMetrics with asset health, uptime, MTTR, and MTTF tracking
- Add GetAssetsHealth returning health scores and status for servers
2026-05-03 13:22:28 +03:00
nutcas3 347698be10 feat: Add security handler with fraud detection, SIM swap verification, and alert management
- Add SecurityHandler with fraud analysis, alert filtering, and metrics endpoints
- Add FraudAlert struct with ID, Type, Severity, ProfileID, RiskScore, Evidence, IPAddress, Status, and ActionsTaken fields
- Add FraudMetrics struct with Period, TotalAlerts, ResolvedAlerts, ResolutionRate, FalsePositiveRate, ByType, and BySeverity fields
- Add AnalyzeTransaction with risk scoring based on transaction amount and suspicious
2026-05-03 13:19:40 +03:00
nutcas3 ef374ce122 feat: Refactor pricing optimization service by extracting helper functions to separate file
- Move calculateElasticity, calculateCompetitiveIndex, and calculateOptimizationROI to optimization_opt_service.go
- Move generateAnalysis, calculateConfidence, and calculateChurnRate to optimization_opt_service.go
- Simplify calculatePriceElasticity by removing comments and consolidating logic
- Simplify optimizeForRevenue, optimizeForMarketShare, optimizeForProfitMargin, optimizeForCompetitive, and optimizeForChurn
2026-05-03 13:06:57 +03:00
nutcas3 045dd6904b feat: Add pricing optimization service with elasticity calculations, strategy-based pricing, and demand prediction
- Add calculatePriceElasticity using log-linear regression with realistic telecom bounds (-2.0 to -0.3)
- Add optimizeForRevenue using revenue optimization formula with elasticity-based pricing
- Add optimizeForMarketShare with penetration strategy and aggressive pricing based on elasticity
- Add optimizeForProfitMargin using cost-plus analysis with 40% target margin
- Add optimizeForComp
2026-05-03 12:54:36 +03:00
nutcas3 40e87b1c97 feat: Mark unused parameters with underscore, remove unused file, and add subscriber journey E2E tests
- Mark unused context and filter parameters with underscore in getCarrierMetrics, getGeoMetrics, and getPerformanceStats
- Remove unused RatePlanCurrencyIntegrator service from currency/services/rateplan_core.go
- Simplify ML model weight comparison in selection_test_ml.go by using literal values instead of originalWeights variable
- Add comprehensive subscriber_journey_test.go with full lifecycle
2026-05-03 11:53:45 +03:00
nutcas3 b76a9a33ce feat: Refactor rate plan currency integrator to simplify subscription creation and remove unused helper
- Simplify SubscribeToPlanWithCurrency by creating SubscribeRequest directly instead of intermediate RatePlanSubscription struct
- Remove redundant Status, StartedAt, CreatedAt, and UpdatedAt field assignments
- Mark unused context parameters with underscore in calculateOverageCost and generateReason
- Remove unused getHighestPriorityCarrier helper function from selection_algorithm.go
2026-05-03 11:52:33 +03:00
nutcas3 27e4594a35 feat: Add churn analysis types with risk levels, predictions, metrics, and helper functions
- Add ChurnRiskLevel type with Low, Medium, High, and Critical constants
- Add ChurnPrediction struct with ProfileID, RiskLevel, RiskScore, PredictedChurnDate, Reasons, Recommendations, and LastUpdated fields
- Add ChurnMetrics struct with Period, TotalSubscribers, ChurnedSubscribers, ChurnRate, MonthlyChurnRate, AnnualChurnRate, AverageTenure, and RiskDistribution fields
- Add ChurnFactor struct with Factor, Impact, Description, and Weight fields
2026-05-03 11:51:59 +03:00
nutcas3 7618bb27d4 feat: Refactor churn analysis service to simplify logic and extract reusable components
- Remove ChurnRiskLevel, ChurnPrediction, ChurnMetrics, and ChurnFactor type definitions from churn_service.go
- Simplify NewChurnAnalysisService constructor to single-line initialization
- Refactor PredictChurn to use analyzeFactors, calculateScore, RiskLevelFromScore, generateReasons, and RecommendationsForRisk helper functions
- Simplify GetChurnMetrics by using periodDates helper and inline database queries
- Replace GetChurnFactors implementation with DefaultChurnFactors helper
2026-05-03 11:50:12 +03:00
nutcas3 4a834a175a feat: Remove fraud detection service and move to dedicated security module
- Remove FraudDetectionService with pattern matching, ML models, risk scoring, and automated blocking
- Remove FraudType constants for account_takeover, subscription_fraud, payment_fraud, usage_anomaly, identity_fraud, and sim_swap
- Remove FraudSeverity type with Low, Medium, High, and Critical levels
- Remove FraudAlert struct with ID, Type, Severity, ProfileID, RiskScore, Evidence, IPAddress, UserAgent, Location, Status
2026-05-03 11:36:33 +03:00
nutcas3 06661ca0ad feat: Add pricing optimization service with strategy-based pricing, demand prediction, and performance metrics
- Add OptimizationStrategy constants for revenue_maximization, market_share, profit_margin, competitive, and churn_reduction
- Add OptimizationResult struct with RatePlanID, Strategy, CurrentPrice, OptimalPrice, PriceChange, ExpectedRevenue, ExpectedDemand, Confidence, Reasoning, Risks, and Recommendations fields
- Add PricingMetrics struct with Period, TotalRevenue, TotalSubscribers, AR
2026-05-03 11:22:31 +03:00
nutcas3 fa7c4a1bf6 feat: Add predictive maintenance service with asset monitoring, failure prediction, ML models, and health scoring
- Add MaintenanceType constants for preventive, corrective, predictive, and emergency maintenance
- Add AssetType constants for server, database, network, storage, application, and load_balancer
- Add Asset struct with ID, Name, Type, Status, Location, HealthScore, LastMaintenance, NextMaintenance, and Metadata fields
- Add MaintenanceAlert struct with ID, AssetID, Type, Severity, Title, Description, RiskScore,
2026-05-03 11:22:16 +03:00
nutcas3 7ce809084d feat: Add fraud detection service with pattern matching, ML models, risk scoring, and automated blocking
- Add FraudType constants for account_takeover, subscription_fraud, payment_fraud, usage_anomaly, identity_fraud, and sim_swap
- Add FraudSeverity type with Low, Medium, High, and Critical levels
- Add FraudAlert struct with ID, Type, Severity, ProfileID, RiskScore, Evidence, IPAddress, UserAgent, Location, Status, Actions, and Metadata fields
- Add FraudPattern struct with pattern configuration and weight-based scoring
- Add FraudDetectionService with patterns, alerts
2026-05-03 11:22:01 +03:00
nutcas3 9239198027 feat: Add market analysis service with penetration metrics, competitor analysis, and opportunity identification
- Add MarketMetrics struct with Period, TotalMarketSize, OurSubscribers, MarketShare, GrowthRate, ByCountry, ByCarrier, ByDemographic, CompetitorAnalysis, and PenetrationOpportunities fields
- Add CountryMetrics struct with Country, TotalPopulation, ActiveSubscribers, PenetrationRate, GrowthRate, ARPU, and MarketPotential fields
- Add MarketCarrierMetrics struct with CarrierName, Subscribers
2026-05-03 11:21:26 +03:00
nutcas3 42d7f4ac86 feat: Add churn analysis service with risk prediction, metrics calculation, and retention recommendations
- Add ChurnRiskLevel type with Low, Medium, High, and Critical constants
- Add ChurnPrediction struct with ProfileID, RiskLevel, RiskScore, PredictedChurnDate, Reasons, Recommendations, and LastUpdated fields
- Add ChurnMetrics struct with Period, TotalSubscribers, ChurnedSubscribers, ChurnRate, MonthlyChurnRate, AnnualChurnRate, AverageTenure, and RiskDistribution fields
- Add ChurnFactor struct with Factor
2026-05-03 11:21:14 +03:00
nutcas3 f4780a5562 feat: Add platform routes with analytics, whitelabel, compliance, exchange rate, and infrastructure endpoints
- Add registerAnalyticsRoutes, registerWhitelabelRoutes, registerComplianceRoutes, registerExchangeRateRoutes, and registerInfraRoutes to setupRoutes
- Add routes_platform.go with analytics dashboard, revenue analytics, and scheduled report endpoints
- Add whitelabel branding, partner config, and email template endpoints
- Add compliance DSR, consent management, audit logging, and data residency endpoints
2026-05-03 10:53:26 +03:00
nutcas3 c6fccc893d feat: Fix type conversions, rename ExchangeRateProvider to RateProviderType, and improve currency integration
- Fix GetRevenueAnalytics return type by dereferencing metrics struct
- Fix getCarrierMetrics to use int64 for Count and convert to int for ActiveCarriers
- Rename ExchangeRateProvider to RateProviderType for consistency
- Change RatePlanCurrencyIntegrator.exchangeService from pointer to interface type
- Add function documentation comments for NewRatePlanCurrencyIntegrator, SubscribeToPlanWith
2026-05-03 10:52:29 +03:00
nutcas3 79fa56f25d feat: Add encryption service with AES-GCM, field-level encryption, and PBKDF2 key derivation
- Add EncryptionService struct with masterKey and gcm cipher fields
- Add EncryptionConfig with MasterKey and KeyDerivationSalt fields
- Add NewEncryptionService constructor with PBKDF2 key derivation, 100000 iterations, and AES-GCM cipher initialization
- Add Encrypt and Decrypt methods with nonce generation and validation
- Add EncryptString and DecryptString methods with base64 encoding
- Add FieldEncryptor struct
2026-05-03 10:51:47 +03:00
nutcas3 772c564a18 feat: Add whitelabel handler with branding, partner config, and email template endpoints
- Add WhitelabelHandler struct with service and logger dependencies and NewWhitelabelHandler constructor
- Add CreateBranding, GetBranding, GetBrandingByDomain, and UpdateBranding methods for branding configuration management
- Add CreatePartnerConfig and GetPartnerConfig methods for partner-specific settings
- Add CreateEmailTemplate, GetEmailTemplate, and ListEmailTemplates methods for email template management
2026-05-03 10:51:31 +03:00
nutcas3 9914ee5955 feat: Add geographic routing service with region management, IP-based routing, and endpoint selection
- Add GeoRouter struct with regions map, defaultReg, and mutex fields
- Add Region struct with ID, Name, Endpoints, Priority, IsActive, and Latency fields
- Add GeoRoutingConfig with DefaultRegion and Regions fields
- Add NewGeoRouter constructor with region initialization
- Add GetRegionForIP method with IP parsing and geo lookup
- Add lookupRegion helper with simplified IP range-based region detection
2026-05-03 10:51:11 +03:00
nutcas3 7be483dbd5 feat: Add compliance handler with DSR management, consent tracking, audit logging, and data residency endpoints
- Add ComplianceHandler struct with service and logger dependencies and NewComplianceHandler constructor
- Add CreateDSR, GetDSR, ListDSRs, and ProcessDSR methods for data subject request management
- Add RecordConsent, RevokeConsent, and GetConsents methods for consent tracking with IP and user agent capture
- Add QueryAuditLogs method with jurisdiction, actor, and action filtering
- Add SetDataRes
2026-05-03 10:50:50 +03:00
nutcas3 b2f92cc8f4 feat: Add threat detection service with brute force, rate limit abuse, SQL injection detection, and IP tracking
- Add ThreatLevel type with Low, Medium, High, and Critical constants
- Add ThreatType type with BruteForce, RateLimitAbuse, SQLInjection, XSS, Unauthorized, DataExfil, and Anomalous constants
- Add ThreatEvent struct with ID, TenantID, Type, Level, Source, Target, Description, Metadata, DetectedAt, Mitigated, and MitigatedAt fields
- Add ThreatDetector struct with logger, rules, events, ip
2026-05-03 10:50:34 +03:00
nutcas3 1e2b38d463 feat: Add analytics handler with dashboard, revenue analytics, and scheduled report endpoints
- Add AnalyticsHandler struct with service and logger dependencies and NewAnalyticsHandler constructor
- Add GetDashboard method with tenant ID extraction, date range filtering, and dashboard metrics retrieval
- Add GetRevenueAnalytics method with tenant filtering and group-by support
- Add CreateScheduledReport and ListScheduledReports methods for report management
- Add date parsing for start_date and end_date query
2026-05-03 10:50:19 +03:00
nutcas3 26bb4f97b5 feat: Add real-time exchange rate service with multi-provider support, caching, and automatic refresh
- Add ExchangeRateProvider type with OpenExchange, Fixer, XE, and Internal constants
- Add RealTimeExchangeService struct with provider, apiKey, baseCurrency, rates cache, lastUpdate, cacheTTL, mutex, logger, and httpClient fields
- Add ExchangeRateConfig with Provider, APIKey, BaseCurrency, and CacheTTL fields
- Add NewRealTimeExchangeService constructor with default 15-minute cache TTL and USD
2026-05-03 10:50:06 +03:00
nutcas3 4d0eb13cee feat: Add whitelabel service with branding, partner config, and email template management
- Add Service struct with db and logger dependencies and NewService constructor
- Add CreateBranding, GetBranding, GetBrandingByDomain, and UpdateBranding methods for branding configuration management
- Add CreatePartnerConfig and GetPartnerConfig methods for partner-specific settings
- Add CreateEmailTemplate, GetEmailTemplate, and ListEmailTemplates methods for custom email template management
- Add BrandingConfig with
2026-05-03 10:48:26 +03:00
nutcas3 52797e54fc feat: Add circuit breaker with state management, failure tracking, fallback support, and statistics
- Add CircuitState type with StateClosed, StateOpen, and StateHalfOpen constants and String method
- Add CircuitBreaker struct with name, state, failureCount, successCount, lastFailure, config, mutex, and onStateChange fields
- Add CircuitBreakerConfig with FailureThreshold, SuccessThreshold, Timeout, and HalfOpenMaxCalls fields
- Add NewCircuitBreaker constructor and DefaultCircuitBreakerConfig with
2026-05-03 10:43:06 +03:00
nutcas3 625bfb5671 feat: Add in-memory cache with TTL, LRU eviction, JSON serialization, and statistics tracking
- Add Cache struct with entries map, mutex, maxSize, defaultTTL, strategy, and stats fields
- Add CacheStrategy type with LRU, TTL, write-through, write-back, and read-through constants
- Add CacheEntry struct with Key, Value, ExpiresAt, CreatedAt, and HitCount fields
- Add NewCache constructor with CacheConfig parameter and automatic cleanup goroutine
- Add Get, Set, Delete, and Clear methods with hit
2026-05-03 10:41:33 +03:00
nutcas3 d9c2026cb9 feat: Add compliance service with DSR management, consent tracking, audit logging, and data residency
- Add Service struct with db and logger dependencies and NewService constructor
- Add CreateDSR, GetDSR, ListDSRs, and ProcessDSR methods for data subject request lifecycle management
- Add processAccessRequest, processErasureRequest, processRectificationRequest, and calculateDueDate helper methods
- Add RecordConsent, RevokeConsent, and GetConsents methods for consent management
- Add LogAudit
2026-05-03 10:41:09 +03:00
nutcas3 58e36d63ca feat: Add analytics service with dashboard metrics, revenue tracking, and scheduled reporting
- Add Service struct with GetDashboard, GetRevenueAnalytics, CreateScheduledReport, and ListScheduledReports methods
- Add getRevenueMetrics, getSubscriberStats, getUsageMetrics, getCarrierMetrics, getGeoMetrics, and getPerformanceStats helper methods
- Add DashboardMetrics, RevenueMetrics, SubscriberStats, UsageMetrics, CarrierMetrics, GeoMetrics, and PerformanceStats types
- Add CarrierStat, CountryStat, RegionStat
2026-05-03 10:40:51 +03:00
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 7a80fb9aeb feat: Extract domain route registration from setupRoutes into separate functions in routes_domain.go
- Move rate plan, pricing, currency, tenant, and SMDP route registration from routes.go to new routes_domain.go file
- Add registerMVNORoutes, registerRatePlanRoutes, registerPricingRoutes, registerCurrencyRoutes, registerTenantRoutes, and registerSMDPRoutes functions
- Simplify setupRoutes to call domain-specific registration functions with required dependencies
- Remove nested route group blocks in favor
2026-05-03 10:22:08 +03:00
nutcas3 82ecbff62a feat: Add RatePlanAdapter with CRUD operations, subscription management, usage tracking, and analytics
- Add RatePlanAdapter struct wrapping Service to implement rateplan.Service interface
- Add NewRatePlanAdapter constructor returning rateplan.Service
- Add CreateRatePlan, GetRatePlan, UpdateRatePlan, DeleteRatePlan, ListRatePlans, SearchRatePlans, and GetPopularPlans methods with type conversions
- Add SubscribeToPlan, GetSubscription, UpdateSubscription, CancelSubscription, GetActiveSubscription
2026-05-03 10:21:46 +03:00
nutcas3 e5ccb62277 feat: Add comprehensive routing for rate plans, pricing, currency, tenants, SMDP, and selection endpoints
- Add db parameter to setupRoutes function signature and pass from main.go
- Add rate plan routes with CRUD, search, subscription, and management endpoints using RatePlanAdapter
- Add pricing routes with rule management endpoints using PricingService
- Add currency routes with conversion, exchange rates, billing operations, and analytics placeholder endpoints
- Add tenant routes with management
2026-05-03 10:14:02 +03:00
nutcas3 b69d73ade7 feat: Wire MVNO handlers with repository and service dependencies in carrier-connector routes
- Add logrus and gorm imports to main.go for MVNO infrastructure setup
- Create logger instance and separate database connection for MVNO repository in main
- Initialize GormRepository with database connection and logger
- Pass repo and logger to setupRoutes for MVNO handler initialization
- Replace placeholder MVNO endpoints with actual handler methods in routes.go
- Create OnboardingService, MVNOHandler, and ManagementHandler instances
2026-05-03 09:55:29 +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 2344ef0710 feat: Add logger dependency to SelectionService and refactor handler initialization
- Add logrus import and logger initialization in NewSelectionIntegration
- Pass logger instance to NewSelectionService constructor
- Replace selectionService.GetHandler() with direct handlers.NewSelectionHandler(manager) call
2026-05-03 09:50:51 +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 5cb2904c36 feat: Add MVNO repository with CRUD operations, filtering, and statistics aggregation
- Add MVNORepository implementation with CreateMVNO, GetMVNO, UpdateMVNO, ListMVNOs, DeleteMVNO, and UpdateMVNOStatus methods
- 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 building, filter application, and descending created_at ordering
- Add GetMVNOStats with total count, status distribution, and plan distribution aggregation
2026-05-03 09:50:26 +03:00
nutcas3 c7ddd3c5d7 feat: Extract repository interfaces from types.go into separate interfaces.go file
- Move TenantRepository and Repository interfaces from types.go to new interfaces.go file
- Add mvno package import for MVNO-related repository methods
- Add CreateMVNO, GetMVNO, GetMVNOByBusinessID, UpdateMVNO, ListMVNOs, DeleteMVNO, UpdateMVNOStatus, and GetMVNOStats methods to Repository interface
- Remove context import from types.go after interface extraction
2026-05-03 09:49:56 +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 9296bc567b feat: Add MVNO onboarding service with step-based workflow execution and progress tracking
- Add OnboardingService struct with validator, provisioner, and monitor dependencies
- Add NewOnboardingService constructor with logger dependency injection
- 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
2026-05-02 19:50:28 +03:00
nutcas3 bf46ecda02 feat: Refactor MVNO handlers to use domain types and interface-based service dependency
- Rename Handler to MVNOHandler for clarity in handler_mvno.go
- Replace services.OnboardingService with OnboardingService interface for dependency injection
- Change monitor.OnboardingRequest, monitor.MVNOStatus, monitor.MVNOFilter, and monitor.MVNOPlan to mvno package types
- Remove monitor package import from handler_management.go and handler_mvno.go
- Add context.Context import for service method signatures
2026-05-02 19:49:39 +03:00