added roundstats with eco info, switched to avatar hash
This commit is contained in:
59
ent/roundstats/roundstats.go
Normal file
59
ent/roundstats/roundstats.go
Normal file
@@ -0,0 +1,59 @@
|
||||
// Code generated by entc, DO NOT EDIT.
|
||||
|
||||
package roundstats
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the roundstats type in the database.
|
||||
Label = "round_stats"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldRound holds the string denoting the round field in the database.
|
||||
FieldRound = "round"
|
||||
// FieldBank holds the string denoting the bank field in the database.
|
||||
FieldBank = "bank"
|
||||
// FieldEquipment holds the string denoting the equipment field in the database.
|
||||
FieldEquipment = "equipment"
|
||||
// FieldSpent holds the string denoting the spent field in the database.
|
||||
FieldSpent = "spent"
|
||||
// EdgeStat holds the string denoting the stat edge name in mutations.
|
||||
EdgeStat = "stat"
|
||||
// Table holds the table name of the roundstats in the database.
|
||||
Table = "round_stats"
|
||||
// StatTable is the table that holds the stat relation/edge.
|
||||
StatTable = "round_stats"
|
||||
// StatInverseTable is the table name for the Stats entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "stats" package.
|
||||
StatInverseTable = "stats"
|
||||
// StatColumn is the table column denoting the stat relation/edge.
|
||||
StatColumn = "stats_round_stats"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for roundstats fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldRound,
|
||||
FieldBank,
|
||||
FieldEquipment,
|
||||
FieldSpent,
|
||||
}
|
||||
|
||||
// ForeignKeys holds the SQL foreign-keys that are owned by the "round_stats"
|
||||
// table and are not defined as standalone fields in the schema.
|
||||
var ForeignKeys = []string{
|
||||
"stats_round_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
|
||||
}
|
485
ent/roundstats/where.go
Normal file
485
ent/roundstats/where.go
Normal file
@@ -0,0 +1,485 @@
|
||||
// Code generated by entc, DO NOT EDIT.
|
||||
|
||||
package roundstats
|
||||
|
||||
import (
|
||||
"csgowtfd/ent/predicate"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldID), id))
|
||||
})
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldID), id))
|
||||
})
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldID), id))
|
||||
})
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(ids) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
v := make([]interface{}, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
s.Where(sql.In(s.C(FieldID), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(ids) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
v := make([]interface{}, len(ids))
|
||||
for i := range v {
|
||||
v[i] = ids[i]
|
||||
}
|
||||
s.Where(sql.NotIn(s.C(FieldID), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldID), id))
|
||||
})
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldID), id))
|
||||
})
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldID), id))
|
||||
})
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldID), id))
|
||||
})
|
||||
}
|
||||
|
||||
// Round applies equality check predicate on the "round" field. It's identical to RoundEQ.
|
||||
func Round(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldRound), v))
|
||||
})
|
||||
}
|
||||
|
||||
// Bank applies equality check predicate on the "bank" field. It's identical to BankEQ.
|
||||
func Bank(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldBank), v))
|
||||
})
|
||||
}
|
||||
|
||||
// Equipment applies equality check predicate on the "equipment" field. It's identical to EquipmentEQ.
|
||||
func Equipment(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldEquipment), v))
|
||||
})
|
||||
}
|
||||
|
||||
// Spent applies equality check predicate on the "spent" field. It's identical to SpentEQ.
|
||||
func Spent(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldSpent), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RoundEQ applies the EQ predicate on the "round" field.
|
||||
func RoundEQ(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldRound), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RoundNEQ applies the NEQ predicate on the "round" field.
|
||||
func RoundNEQ(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldRound), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RoundIn applies the In predicate on the "round" field.
|
||||
func RoundIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.In(s.C(FieldRound), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// RoundNotIn applies the NotIn predicate on the "round" field.
|
||||
func RoundNotIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.NotIn(s.C(FieldRound), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// RoundGT applies the GT predicate on the "round" field.
|
||||
func RoundGT(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldRound), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RoundGTE applies the GTE predicate on the "round" field.
|
||||
func RoundGTE(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldRound), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RoundLT applies the LT predicate on the "round" field.
|
||||
func RoundLT(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldRound), v))
|
||||
})
|
||||
}
|
||||
|
||||
// RoundLTE applies the LTE predicate on the "round" field.
|
||||
func RoundLTE(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldRound), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BankEQ applies the EQ predicate on the "bank" field.
|
||||
func BankEQ(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldBank), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BankNEQ applies the NEQ predicate on the "bank" field.
|
||||
func BankNEQ(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldBank), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BankIn applies the In predicate on the "bank" field.
|
||||
func BankIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.In(s.C(FieldBank), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// BankNotIn applies the NotIn predicate on the "bank" field.
|
||||
func BankNotIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.NotIn(s.C(FieldBank), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// BankGT applies the GT predicate on the "bank" field.
|
||||
func BankGT(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldBank), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BankGTE applies the GTE predicate on the "bank" field.
|
||||
func BankGTE(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldBank), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BankLT applies the LT predicate on the "bank" field.
|
||||
func BankLT(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldBank), v))
|
||||
})
|
||||
}
|
||||
|
||||
// BankLTE applies the LTE predicate on the "bank" field.
|
||||
func BankLTE(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldBank), v))
|
||||
})
|
||||
}
|
||||
|
||||
// EquipmentEQ applies the EQ predicate on the "equipment" field.
|
||||
func EquipmentEQ(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldEquipment), v))
|
||||
})
|
||||
}
|
||||
|
||||
// EquipmentNEQ applies the NEQ predicate on the "equipment" field.
|
||||
func EquipmentNEQ(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldEquipment), v))
|
||||
})
|
||||
}
|
||||
|
||||
// EquipmentIn applies the In predicate on the "equipment" field.
|
||||
func EquipmentIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.In(s.C(FieldEquipment), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// EquipmentNotIn applies the NotIn predicate on the "equipment" field.
|
||||
func EquipmentNotIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.NotIn(s.C(FieldEquipment), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// EquipmentGT applies the GT predicate on the "equipment" field.
|
||||
func EquipmentGT(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldEquipment), v))
|
||||
})
|
||||
}
|
||||
|
||||
// EquipmentGTE applies the GTE predicate on the "equipment" field.
|
||||
func EquipmentGTE(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldEquipment), v))
|
||||
})
|
||||
}
|
||||
|
||||
// EquipmentLT applies the LT predicate on the "equipment" field.
|
||||
func EquipmentLT(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldEquipment), v))
|
||||
})
|
||||
}
|
||||
|
||||
// EquipmentLTE applies the LTE predicate on the "equipment" field.
|
||||
func EquipmentLTE(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldEquipment), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SpentEQ applies the EQ predicate on the "spent" field.
|
||||
func SpentEQ(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldSpent), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SpentNEQ applies the NEQ predicate on the "spent" field.
|
||||
func SpentNEQ(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldSpent), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SpentIn applies the In predicate on the "spent" field.
|
||||
func SpentIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.In(s.C(FieldSpent), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// SpentNotIn applies the NotIn predicate on the "spent" field.
|
||||
func SpentNotIn(vs ...uint) predicate.RoundStats {
|
||||
v := make([]interface{}, len(vs))
|
||||
for i := range v {
|
||||
v[i] = vs[i]
|
||||
}
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
// if not arguments were provided, append the FALSE constants,
|
||||
// since we can't apply "IN ()". This will make this predicate falsy.
|
||||
if len(v) == 0 {
|
||||
s.Where(sql.False())
|
||||
return
|
||||
}
|
||||
s.Where(sql.NotIn(s.C(FieldSpent), v...))
|
||||
})
|
||||
}
|
||||
|
||||
// SpentGT applies the GT predicate on the "spent" field.
|
||||
func SpentGT(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.GT(s.C(FieldSpent), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SpentGTE applies the GTE predicate on the "spent" field.
|
||||
func SpentGTE(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.GTE(s.C(FieldSpent), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SpentLT applies the LT predicate on the "spent" field.
|
||||
func SpentLT(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.LT(s.C(FieldSpent), v))
|
||||
})
|
||||
}
|
||||
|
||||
// SpentLTE applies the LTE predicate on the "spent" field.
|
||||
func SpentLTE(v uint) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s.Where(sql.LTE(s.C(FieldSpent), v))
|
||||
})
|
||||
}
|
||||
|
||||
// HasStat applies the HasEdge predicate on the "stat" edge.
|
||||
func HasStat() predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(StatTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, StatTable, StatColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasStatWith applies the HasEdge predicate on the "stat" edge with a given conditions (other predicates).
|
||||
func HasStatWith(preds ...predicate.Stats) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(StatInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, StatTable, StatColumn),
|
||||
)
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.RoundStats) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s1 := s.Clone().SetP(nil)
|
||||
for _, p := range predicates {
|
||||
p(s1)
|
||||
}
|
||||
s.Where(s1.P())
|
||||
})
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.RoundStats) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
s1 := s.Clone().SetP(nil)
|
||||
for i, p := range predicates {
|
||||
if i > 0 {
|
||||
s1.Or()
|
||||
}
|
||||
p(s1)
|
||||
}
|
||||
s.Where(s1.P())
|
||||
})
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.RoundStats) predicate.RoundStats {
|
||||
return predicate.RoundStats(func(s *sql.Selector) {
|
||||
p(s.Not())
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user