Files
csgowtfd/ent/stats/stats.go

82 lines
2.7 KiB
Go

// Code generated by entc, DO NOT EDIT.
package stats
const (
// Label holds the string label denoting the stats type in the database.
Label = "stats"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldTeamID holds the string denoting the team_id field in the database.
FieldTeamID = "team_id"
// FieldKills holds the string denoting the kills field in the database.
FieldKills = "kills"
// FieldDeaths holds the string denoting the deaths field in the database.
FieldDeaths = "deaths"
// FieldAssists holds the string denoting the assists field in the database.
FieldAssists = "assists"
// FieldHeadshot holds the string denoting the headshot field in the database.
FieldHeadshot = "headshot"
// FieldMvp holds the string denoting the mvp field in the database.
FieldMvp = "mvp"
// FieldScore holds the string denoting the score field in the database.
FieldScore = "score"
// FieldExtended holds the string denoting the extended field in the database.
FieldExtended = "extended"
// EdgeMatches holds the string denoting the matches edge name in mutations.
EdgeMatches = "matches"
// EdgePlayers holds the string denoting the players edge name in mutations.
EdgePlayers = "players"
// Table holds the table name of the stats in the database.
Table = "stats"
// MatchesTable is the table that holds the matches relation/edge.
MatchesTable = "stats"
// MatchesInverseTable is the table name for the Match entity.
// It exists in this package in order to avoid circular dependency with the "match" package.
MatchesInverseTable = "matches"
// MatchesColumn is the table column denoting the matches relation/edge.
MatchesColumn = "match_stats"
// PlayersTable is the table that holds the players relation/edge.
PlayersTable = "stats"
// PlayersInverseTable is the table name for the Player entity.
// It exists in this package in order to avoid circular dependency with the "player" package.
PlayersInverseTable = "players"
// PlayersColumn is the table column denoting the players relation/edge.
PlayersColumn = "player_stats"
)
// Columns holds all SQL columns for stats fields.
var Columns = []string{
FieldID,
FieldTeamID,
FieldKills,
FieldDeaths,
FieldAssists,
FieldHeadshot,
FieldMvp,
FieldScore,
FieldExtended,
}
// ForeignKeys holds the SQL foreign-keys that are owned by the "stats"
// table and are not defined as standalone fields in the schema.
var ForeignKeys = []string{
"match_stats",
"player_stats",
}
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
for i := range ForeignKeys {
if column == ForeignKeys[i] {
return true
}
}
return false
}