package model

import "gordenko.dev/dima/qx"

type Model struct {
	qx *qx.Db
}

// TEAM

type TeamZone struct {
	ZoneID  string `json:"zoneID" qx:"table=teamZones; pk"`
	Name    string `json:"name"`
	SportID int    `json:"sportID"`
}

type TeamMatch struct {
	MatchID string `json:"matchID" qx:"table=teamMatches; pk"`
	//SportID     int    `json:"sportID"`
	//StartTime   int64  `json:"startTime"`
	//ChampID     string `json:"champID"`
	//HomeTeamID  string `json:"homeTeamID"`
	//AwayTeamID  string `json:"awayTeamID"`
	HomeGoals              int  `json:"homeGoals"`
	AwayGoals              int  `json:"awayGoals"`
	HasScoreByPeriods      bool `json:"hasScoreByPeriods"`
	P1HomeGoals            int  `json:"p1HomeGoals"`
	P1AwayGoals            int  `json:"p1AwayGoals"`
	P2HomeGoals            int  `json:"p2HomeGoals"`
	P2AwayGoals            int  `json:"p2AwayGoals"`
	IsMatchScoreLoaded     bool `json:"isMatchScoreLoaded"`
	IsScoreByPeriodsLoaded bool `json:"isScoreByPeriodsLoaded"`
}

type Team struct {
	TeamID        string `json:"teamID" qx:"table=teams; pk"`
	ZoneID        string `json:"zoneID"`
	CanonicalName string `json:"canonicalName"`
	WasLinked     bool   `json:"wasLinked"`
}

type TeamAlias struct {
	AliasID int64  `json:"aliasID" qx:"table=teamAliases; pk; seq=auto"`
	Name    string `json:"name"`
	TeamID  string `json:"teamID"`
	SportID int    `json:"sportID"`
}

type TeamChamp struct {
	ChampID string `json:"champID" qx:"table=teamChamps; pk"`
	ZoneID  string `json:"zoneID"`
	Name    string `json:"name"`
}

// FOOTBALL
/*
type FootballZone struct {
	ZoneID string `json:"zoneID" qx:"table=footballZones; pk"`
	Name   string `json:"name"`
}

type FootballMatch struct {
	MatchID     string `json:"matchID" qx:"table=footballMatches; pk"`
	StartTime   int64  `json:"startTime"`
	ChampID     string `json:"champID"`
	HomeTeamID  string `json:"homeTeamID"`
	AwayTeamID  string `json:"awayTeamID"`
	HomeGoals   int    `json:"homeGoals"`
	AwayGoals   int    `json:"awayGoals"`
	HasStats    bool   `json:"hasStats"`
	P1HomeGoals int    `json:"p1HomeGoals"`
	P1AwayGoals int    `json:"p1AwayGoals"`
	P2HomeGoals int    `json:"p2HomeGoals"`
	P2AwayGoals int    `json:"p2AwayGoals"`
}

type FootballTeam struct {
	TeamID        string `json:"teamID" qx:"table=footballTeams; pk"`
	ZoneID        string `json:"zoneID"`
	CanonicalName string `json:"canonicalName"`
	WasLinked     bool   `json:"wasLinked"`
}

type FootballAlias struct {
	AliasID int64  `json:"aliasID" qx:"table=footballTeamAliases; pk; seq=auto"`
	Name    string `json:"name"`
	TeamID  string `json:"teamID"`
}

type FootballChamp struct {
	ChampID string `json:"champID" qx:"table=footballChamps; pk"`
	ZoneID  string `json:"zoneID"`
	Name    string `json:"name"`
}

// HANDBALL

type HandballZone struct {
	ZoneID string `json:"zoneID" qx:"table=handballZones; pk"`
	Name   string `json:"name"`
}

type HandballMatch struct {
	MatchID     string `json:"matchID" qx:"table=handballMatches; pk"`
	StartTime   int64  `json:"startTime"`
	ChampID     string `json:"champID"`
	HomeTeamID  string `json:"homeTeamID"`
	AwayTeamID  string `json:"awayTeamID"`
	HomeGoals   int    `json:"homeGoals"`
	AwayGoals   int    `json:"awayGoals"`
	HasStats    bool   `json:"hasStats"`
	P1HomeGoals int    `json:"p1HomeGoals"`
	P1AwayGoals int    `json:"p1AwayGoals"`
	P2HomeGoals int    `json:"p2HomeGoals"`
	P2AwayGoals int    `json:"p2AwayGoals"`
}

type HandballTeam struct {
	TeamID        string `json:"teamID" qx:"table=handballTeams; pk"`
	ZoneID        string `json:"zoneID"`
	CanonicalName string `json:"canonicalName"`
	WasLinked     bool   `json:"wasLinked"`
}

type HandballAlias struct {
	AliasID int64  `json:"aliasID" qx:"table=handballTeamAliases; pk; seq=auto"`
	Name    string `json:"name"`
	TeamID  string `json:"teamID"`
}

type HandballChamp struct {
	ChampID string `json:"champID" qx:"table=handballChamps; pk"`
	ZoneID  string `json:"zoneID"`
	Name    string `json:"name"`
}
*/
