import from unified repo
This commit is contained in:
95
ent/match/match.go
Normal file
95
ent/match/match.go
Normal file
@@ -0,0 +1,95 @@
|
||||
// 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"
|
||||
// FieldMatchID holds the string denoting the match_id field in the database.
|
||||
FieldMatchID = "match_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"
|
||||
// FieldDemoExpired holds the string denoting the demo_expired field in the database.
|
||||
FieldDemoExpired = "demo_expired"
|
||||
// FieldDemoParsed holds the string denoting the demo_parsed field in the database.
|
||||
FieldDemoParsed = "demo_parsed"
|
||||
// FieldEco holds the string denoting the eco field in the database.
|
||||
FieldEco = "eco"
|
||||
// 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,
|
||||
FieldMatchID,
|
||||
FieldShareCode,
|
||||
FieldMap,
|
||||
FieldDate,
|
||||
FieldScoreTeamA,
|
||||
FieldScoreTeamB,
|
||||
FieldReplayURL,
|
||||
FieldDuration,
|
||||
FieldMatchResult,
|
||||
FieldMaxRounds,
|
||||
FieldDemoExpired,
|
||||
FieldDemoParsed,
|
||||
FieldEco,
|
||||
}
|
||||
|
||||
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 (
|
||||
// DefaultDemoExpired holds the default value on creation for the "demo_expired" field.
|
||||
DefaultDemoExpired bool
|
||||
// DefaultDemoParsed holds the default value on creation for the "demo_parsed" field.
|
||||
DefaultDemoParsed bool
|
||||
)
|
1201
ent/match/where.go
Normal file
1201
ent/match/where.go
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user