added gameban as separate thing

This commit is contained in:
2021-10-23 00:14:24 +02:00
parent 2c9dc3870f
commit cd6cd6bf58
13 changed files with 652 additions and 50 deletions

View File

@@ -23,6 +23,10 @@ const (
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.
@@ -62,6 +66,8 @@ var Columns = []string{
FieldVanityURLReal,
FieldVacDate,
FieldVacCount,
FieldGameBanDate,
FieldGameBanCount,
FieldSteamUpdated,
FieldSharecodeUpdated,
FieldAuthCode,

View File

@@ -135,6 +135,20 @@ func VacCount(v int) predicate.Player {
})
}
// GameBanDate applies equality check predicate on the "game_ban_date" field. It's identical to GameBanDateEQ.
func GameBanDate(v time.Time) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldGameBanDate), v))
})
}
// GameBanCount applies equality check predicate on the "game_ban_count" field. It's identical to GameBanCountEQ.
func GameBanCount(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldGameBanCount), v))
})
}
// SteamUpdated applies equality check predicate on the "steam_updated" field. It's identical to SteamUpdatedEQ.
func SteamUpdated(v time.Time) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
@@ -850,6 +864,186 @@ func VacCountNotNil() predicate.Player {
})
}
// GameBanDateEQ applies the EQ predicate on the "game_ban_date" field.
func GameBanDateEQ(v time.Time) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldGameBanDate), v))
})
}
// GameBanDateNEQ applies the NEQ predicate on the "game_ban_date" field.
func GameBanDateNEQ(v time.Time) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldGameBanDate), v))
})
}
// GameBanDateIn applies the In predicate on the "game_ban_date" field.
func GameBanDateIn(vs ...time.Time) predicate.Player {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Player(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(FieldGameBanDate), v...))
})
}
// GameBanDateNotIn applies the NotIn predicate on the "game_ban_date" field.
func GameBanDateNotIn(vs ...time.Time) predicate.Player {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Player(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(FieldGameBanDate), v...))
})
}
// GameBanDateGT applies the GT predicate on the "game_ban_date" field.
func GameBanDateGT(v time.Time) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldGameBanDate), v))
})
}
// GameBanDateGTE applies the GTE predicate on the "game_ban_date" field.
func GameBanDateGTE(v time.Time) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldGameBanDate), v))
})
}
// GameBanDateLT applies the LT predicate on the "game_ban_date" field.
func GameBanDateLT(v time.Time) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldGameBanDate), v))
})
}
// GameBanDateLTE applies the LTE predicate on the "game_ban_date" field.
func GameBanDateLTE(v time.Time) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldGameBanDate), v))
})
}
// GameBanDateIsNil applies the IsNil predicate on the "game_ban_date" field.
func GameBanDateIsNil() predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldGameBanDate)))
})
}
// GameBanDateNotNil applies the NotNil predicate on the "game_ban_date" field.
func GameBanDateNotNil() predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldGameBanDate)))
})
}
// GameBanCountEQ applies the EQ predicate on the "game_ban_count" field.
func GameBanCountEQ(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.EQ(s.C(FieldGameBanCount), v))
})
}
// GameBanCountNEQ applies the NEQ predicate on the "game_ban_count" field.
func GameBanCountNEQ(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.NEQ(s.C(FieldGameBanCount), v))
})
}
// GameBanCountIn applies the In predicate on the "game_ban_count" field.
func GameBanCountIn(vs ...int) predicate.Player {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Player(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(FieldGameBanCount), v...))
})
}
// GameBanCountNotIn applies the NotIn predicate on the "game_ban_count" field.
func GameBanCountNotIn(vs ...int) predicate.Player {
v := make([]interface{}, len(vs))
for i := range v {
v[i] = vs[i]
}
return predicate.Player(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(FieldGameBanCount), v...))
})
}
// GameBanCountGT applies the GT predicate on the "game_ban_count" field.
func GameBanCountGT(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.GT(s.C(FieldGameBanCount), v))
})
}
// GameBanCountGTE applies the GTE predicate on the "game_ban_count" field.
func GameBanCountGTE(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.GTE(s.C(FieldGameBanCount), v))
})
}
// GameBanCountLT applies the LT predicate on the "game_ban_count" field.
func GameBanCountLT(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.LT(s.C(FieldGameBanCount), v))
})
}
// GameBanCountLTE applies the LTE predicate on the "game_ban_count" field.
func GameBanCountLTE(v int) predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.LTE(s.C(FieldGameBanCount), v))
})
}
// GameBanCountIsNil applies the IsNil predicate on the "game_ban_count" field.
func GameBanCountIsNil() predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.IsNull(s.C(FieldGameBanCount)))
})
}
// GameBanCountNotNil applies the NotNil predicate on the "game_ban_count" field.
func GameBanCountNotNil() predicate.Player {
return predicate.Player(func(s *sql.Selector) {
s.Where(sql.NotNull(s.C(FieldGameBanCount)))
})
}
// SteamUpdatedEQ applies the EQ predicate on the "steam_updated" field.
func SteamUpdatedEQ(v time.Time) predicate.Player {
return predicate.Player(func(s *sql.Selector) {