Commit Graph
5 Commits
Author SHA1 Message Date
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 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 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 5637b216f2 feat: Add pricing interfaces and types for dynamic pricing rule management
- Add Repository interface with CreateRule, GetRule, UpdateRule, DeleteRule, ListRules, CountRules methods
- Add GetActiveRules, GetRulesByType methods for rule evaluation
- Add Service interface with rule management, pricing calculations, validation, and analytics methods
- Add RuleEngine interface with EvaluateRule, ApplyRule, ValidateConditions, ExecuteActions methods
- Add PricingEventHandler interface for rule lifecycle events
- Add PricingValidator interface for rule and context validation
- Add PricingCache interface for caching pricing data
2026-05-02 04:41:50 +03:00