FloorVisualizer/internal/model/engine.go
dindang 94895cbc22 Initial commit: FloorVisualizer backend
- Go API server with PostgreSQL + Redis
- AI floor replacement (OpenRouter Gemini)
- Product database (10 brands, 3539 products)
- Recommendation engine, calculator, articles
- Redis async queue + worker pool
- Hot product caching, brand view tracking
- JWT auth, favorites, projects
- Docker deployment ready

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-16 09:47:11 +08:00

36 lines
756 B
Go

package model
type MatchResult struct {
Product Product `json:"product"`
Score float64 `json:"score"`
Details ScoreDetail `json:"details"`
}
type ScoreDetail struct {
Visual float64 `json:"visual"`
Material float64 `json:"material"`
Price float64 `json:"price"`
Category float64 `json:"category"`
GroupPenalty float64 `json:"group_penalty"`
}
type EngineConfig struct {
MinScore float64
MaxResults int
WeightVisual float64
WeightMaterial float64
WeightPrice float64
WeightCategory float64
}
func DefaultEngineConfig() EngineConfig {
return EngineConfig{
MinScore: 70,
MaxResults: 10,
WeightVisual: 40,
WeightMaterial: 30,
WeightPrice: 20,
WeightCategory: 10,
}
}