package models

import (
	"time"

	"github.com/google/uuid"
)

type EloConfig struct {
	ID                   int        `gorm:"primaryKey" json:"id"`
	KFactorBase          int        `gorm:"not null;default:32" json:"k_factor_base"`
	KFactorNewPlayer     int        `gorm:"not null;default:48" json:"k_factor_new_player"`
	NewPlayerThreshold   int        `gorm:"not null;default:20" json:"new_player_threshold"`
	KFactorHighMMR       int        `gorm:"not null;default:24" json:"k_factor_high_mmr"`
	HighMMRThreshold     int        `gorm:"not null;default:2200" json:"high_mmr_threshold"`
	PlacementMatches     int        `gorm:"not null;default:10" json:"placement_matches"`
	PlacementKFactor     int        `gorm:"not null;default:64" json:"placement_k_factor"`
	MinMMR               int        `gorm:"not null;default:100" json:"min_mmr"`
	MaxMMR               int        `gorm:"not null;default:3500" json:"max_mmr"`
	DefaultMMR           int        `gorm:"not null;default:1000" json:"default_mmr"`
	RoundScoreWeight     float64    `gorm:"type:real;not null;default:0.15" json:"round_score_weight"`
	IndividualPerfWeight float64    `gorm:"type:real;not null;default:0.10" json:"individual_perf_weight"`
	StreakBonus          float64    `gorm:"type:real;not null;default:0.05" json:"streak_bonus"`
	StreakCap            int        `gorm:"not null;default:5" json:"streak_cap"`
	DecayEnabled         bool       `gorm:"not null;default:true" json:"decay_enabled"`
	DecayDays            int        `gorm:"not null;default:14" json:"decay_days"`
	DecayPerDay          int        `gorm:"not null;default:5" json:"decay_per_day"`
	DecayFloor           int        `gorm:"not null;default:800" json:"decay_floor"`
	UpdatedAt            *time.Time `json:"updated_at,omitempty"`
	UpdatedBy            *uuid.UUID `gorm:"type:uuid" json:"updated_by,omitempty"`
}
