107 lines
3.9 KiB
Go
107 lines
3.9 KiB
Go
// Code generated by entc, DO NOT EDIT.
|
|
|
|
package player
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the player type in the database.
|
|
Label = "player"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldName holds the string denoting the name field in the database.
|
|
FieldName = "name"
|
|
// FieldAvatar holds the string denoting the avatar field in the database.
|
|
FieldAvatar = "avatar"
|
|
// FieldVanityURL holds the string denoting the vanity_url field in the database.
|
|
FieldVanityURL = "vanity_url"
|
|
// FieldVanityURLReal holds the string denoting the vanity_url_real field in the database.
|
|
FieldVanityURLReal = "vanity_url_real"
|
|
// FieldVacDate holds the string denoting the vac_date field in the database.
|
|
FieldVacDate = "vac_date"
|
|
// FieldVacCount holds the string denoting the vac_count field in the database.
|
|
FieldVacCount = "vac_count"
|
|
// FieldGameBanDate holds the string denoting the game_ban_date field in the database.
|
|
FieldGameBanDate = "game_ban_date"
|
|
// FieldGameBanCount holds the string denoting the game_ban_count field in the database.
|
|
FieldGameBanCount = "game_ban_count"
|
|
// FieldSteamUpdated holds the string denoting the steam_updated field in the database.
|
|
FieldSteamUpdated = "steam_updated"
|
|
// FieldSharecodeUpdated holds the string denoting the sharecode_updated field in the database.
|
|
FieldSharecodeUpdated = "sharecode_updated"
|
|
// FieldAuthCode holds the string denoting the auth_code field in the database.
|
|
FieldAuthCode = "auth_code"
|
|
// FieldProfileCreated holds the string denoting the profile_created field in the database.
|
|
FieldProfileCreated = "profile_created"
|
|
// FieldOldestSharecodeSeen holds the string denoting the oldest_sharecode_seen field in the database.
|
|
FieldOldestSharecodeSeen = "oldest_sharecode_seen"
|
|
// FieldWins holds the string denoting the wins field in the database.
|
|
FieldWins = "wins"
|
|
// FieldLooses holds the string denoting the looses field in the database.
|
|
FieldLooses = "looses"
|
|
// FieldTies holds the string denoting the ties field in the database.
|
|
FieldTies = "ties"
|
|
// EdgeStats holds the string denoting the stats edge name in mutations.
|
|
EdgeStats = "stats"
|
|
// EdgeMatches holds the string denoting the matches edge name in mutations.
|
|
EdgeMatches = "matches"
|
|
// Table holds the table name of the player in the database.
|
|
Table = "players"
|
|
// 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 = "player_stats"
|
|
// MatchesTable is the table that holds the matches relation/edge. The primary key declared below.
|
|
MatchesTable = "player_matches"
|
|
// 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"
|
|
)
|
|
|
|
// Columns holds all SQL columns for player fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldName,
|
|
FieldAvatar,
|
|
FieldVanityURL,
|
|
FieldVanityURLReal,
|
|
FieldVacDate,
|
|
FieldVacCount,
|
|
FieldGameBanDate,
|
|
FieldGameBanCount,
|
|
FieldSteamUpdated,
|
|
FieldSharecodeUpdated,
|
|
FieldAuthCode,
|
|
FieldProfileCreated,
|
|
FieldOldestSharecodeSeen,
|
|
FieldWins,
|
|
FieldLooses,
|
|
FieldTies,
|
|
}
|
|
|
|
var (
|
|
// MatchesPrimaryKey and MatchesColumn2 are the table columns denoting the
|
|
// primary key for the matches relation (M2M).
|
|
MatchesPrimaryKey = []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 (
|
|
// DefaultSteamUpdated holds the default value on creation for the "steam_updated" field.
|
|
DefaultSteamUpdated func() time.Time
|
|
)
|