Files
csgowtfd/ent/match/match.go

85 lines
3.0 KiB
Go

// Code generated by entc, DO NOT EDIT.
package match
const (
// Label holds the string label denoting the match type in the database.
Label = "match"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldShareCode holds the string denoting the share_code field in the database.
FieldShareCode = "share_code"
// FieldMap holds the string denoting the map field in the database.
FieldMap = "map"
// FieldDate holds the string denoting the date field in the database.
FieldDate = "date"
// FieldScoreTeamA holds the string denoting the score_team_a field in the database.
FieldScoreTeamA = "score_team_a"
// FieldScoreTeamB holds the string denoting the score_team_b field in the database.
FieldScoreTeamB = "score_team_b"
// FieldReplayURL holds the string denoting the replay_url field in the database.
FieldReplayURL = "replay_url"
// FieldDuration holds the string denoting the duration field in the database.
FieldDuration = "duration"
// FieldMatchResult holds the string denoting the match_result field in the database.
FieldMatchResult = "match_result"
// FieldMaxRounds holds the string denoting the max_rounds field in the database.
FieldMaxRounds = "max_rounds"
// FieldDemoParsed holds the string denoting the demo_parsed field in the database.
FieldDemoParsed = "demo_parsed"
// EdgeStats holds the string denoting the stats edge name in mutations.
EdgeStats = "stats"
// EdgePlayers holds the string denoting the players edge name in mutations.
EdgePlayers = "players"
// Table holds the table name of the match in the database.
Table = "matches"
// StatsTable is the table that holds the stats relation/edge.
StatsTable = "stats"
// StatsInverseTable is the table name for the Stats entity.
// It exists in this package in order to avoid circular dependency with the "stats" package.
StatsInverseTable = "stats"
// StatsColumn is the table column denoting the stats relation/edge.
StatsColumn = "match_stats"
// PlayersTable is the table that holds the players relation/edge. The primary key declared below.
PlayersTable = "player_matches"
// 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"
)
// Columns holds all SQL columns for match fields.
var Columns = []string{
FieldID,
FieldShareCode,
FieldMap,
FieldDate,
FieldScoreTeamA,
FieldScoreTeamB,
FieldReplayURL,
FieldDuration,
FieldMatchResult,
FieldMaxRounds,
FieldDemoParsed,
}
var (
// PlayersPrimaryKey and PlayersColumn2 are the table columns denoting the
// primary key for the players relation (M2M).
PlayersPrimaryKey = []string{"player_id", "match_id"}
)
// 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
}
}
return false
}
var (
// DefaultDemoParsed holds the default value on creation for the "demo_parsed" field.
DefaultDemoParsed bool
)