101 lines
3.8 KiB
Go
101 lines
3.8 KiB
Go
// Code generated by ent, 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"
|
|
// FieldVacPresent holds the string denoting the vac_present field in the database.
|
|
FieldVacPresent = "vac_present"
|
|
// FieldGamebanPresent holds the string denoting the gameban_present field in the database.
|
|
FieldGamebanPresent = "gameban_present"
|
|
// FieldDecryptionKey holds the string denoting the decryption_key field in the database.
|
|
FieldDecryptionKey = "decryption_key"
|
|
// FieldTickRate holds the string denoting the tick_rate field in the database.
|
|
FieldTickRate = "tick_rate"
|
|
// 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 = "match_players"
|
|
// StatsInverseTable is the table name for the MatchPlayer entity.
|
|
// It exists in this package in order to avoid circular dependency with the "matchplayer" package.
|
|
StatsInverseTable = "match_players"
|
|
// 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,
|
|
FieldVacPresent,
|
|
FieldGamebanPresent,
|
|
FieldDecryptionKey,
|
|
FieldTickRate,
|
|
}
|
|
|
|
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
|
|
// DefaultVacPresent holds the default value on creation for the "vac_present" field.
|
|
DefaultVacPresent bool
|
|
// DefaultGamebanPresent holds the default value on creation for the "gameban_present" field.
|
|
DefaultGamebanPresent bool
|
|
)
|