60 lines
1.8 KiB
Go
60 lines
1.8 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package weapon
|
|
|
|
const (
|
|
// Label holds the string label denoting the weapon type in the database.
|
|
Label = "weapon"
|
|
// FieldID holds the string denoting the id field in the database.
|
|
FieldID = "id"
|
|
// FieldVictim holds the string denoting the victim field in the database.
|
|
FieldVictim = "victim"
|
|
// FieldDmg holds the string denoting the dmg field in the database.
|
|
FieldDmg = "dmg"
|
|
// FieldEqType holds the string denoting the eq_type field in the database.
|
|
FieldEqType = "eq_type"
|
|
// FieldHitGroup holds the string denoting the hit_group field in the database.
|
|
FieldHitGroup = "hit_group"
|
|
// EdgeStat holds the string denoting the stat edge name in mutations.
|
|
EdgeStat = "stat"
|
|
// Table holds the table name of the weapon in the database.
|
|
Table = "weapons"
|
|
// StatTable is the table that holds the stat relation/edge.
|
|
StatTable = "weapons"
|
|
// StatInverseTable is the table name for the MatchPlayer entity.
|
|
// It exists in this package in order to avoid circular dependency with the "matchplayer" package.
|
|
StatInverseTable = "match_players"
|
|
// StatColumn is the table column denoting the stat relation/edge.
|
|
StatColumn = "match_player_weapon_stats"
|
|
)
|
|
|
|
// Columns holds all SQL columns for weapon fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldVictim,
|
|
FieldDmg,
|
|
FieldEqType,
|
|
FieldHitGroup,
|
|
}
|
|
|
|
// ForeignKeys holds the SQL foreign-keys that are owned by the "weapons"
|
|
// table and are not defined as standalone fields in the schema.
|
|
var ForeignKeys = []string{
|
|
"match_player_weapon_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
|
|
}
|