You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
628 lines
21 KiB
Go
628 lines
21 KiB
Go
1 year ago
|
// Code generated by ent, DO NOT EDIT.
|
||
|
|
||
|
package token
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
|
||
|
"entgo.io/ent/dialect/sql"
|
||
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
||
|
"git.noahlan.cn/n-admin/n-admin-server/rpc/core/ent/predicate"
|
||
|
"git.noahlan.cn/noahlan/ntool-biz/core/orm/nent/types"
|
||
|
)
|
||
|
|
||
|
// ID filters vertices based on their ID field.
|
||
|
func ID(id int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// IDEQ applies the EQ predicate on the ID field.
|
||
|
func IDEQ(id int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// IDNEQ applies the NEQ predicate on the ID field.
|
||
|
func IDNEQ(id int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNEQ(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// IDIn applies the In predicate on the ID field.
|
||
|
func IDIn(ids ...int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldIn(FieldID, ids...))
|
||
|
}
|
||
|
|
||
|
// IDNotIn applies the NotIn predicate on the ID field.
|
||
|
func IDNotIn(ids ...int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNotIn(FieldID, ids...))
|
||
|
}
|
||
|
|
||
|
// IDGT applies the GT predicate on the ID field.
|
||
|
func IDGT(id int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGT(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// IDGTE applies the GTE predicate on the ID field.
|
||
|
func IDGTE(id int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGTE(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// IDLT applies the LT predicate on the ID field.
|
||
|
func IDLT(id int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLT(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// IDLTE applies the LTE predicate on the ID field.
|
||
|
func IDLTE(id int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLTE(FieldID, id))
|
||
|
}
|
||
|
|
||
|
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||
|
func CreatedAt(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldCreatedAt, v))
|
||
|
}
|
||
|
|
||
|
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||
|
func UpdatedAt(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldUpdatedAt, v))
|
||
|
}
|
||
|
|
||
|
// Version applies equality check predicate on the "version" field. It's identical to VersionEQ.
|
||
|
func Version(v int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldVersion, v))
|
||
|
}
|
||
|
|
||
|
// UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
|
||
|
func UserID(v int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldUserID, v))
|
||
|
}
|
||
|
|
||
|
// TokenType applies equality check predicate on the "token_type" field. It's identical to TokenTypeEQ.
|
||
|
func TokenType(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldTokenType, v))
|
||
|
}
|
||
|
|
||
|
// AccessToken applies equality check predicate on the "access_token" field. It's identical to AccessTokenEQ.
|
||
|
func AccessToken(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldAccessToken, v))
|
||
|
}
|
||
|
|
||
|
// RefreshToken applies equality check predicate on the "refresh_token" field. It's identical to RefreshTokenEQ.
|
||
|
func RefreshToken(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldRefreshToken, v))
|
||
|
}
|
||
|
|
||
|
// Source applies equality check predicate on the "source" field. It's identical to SourceEQ.
|
||
|
func Source(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldSource, v))
|
||
|
}
|
||
|
|
||
|
// ExpiredAt applies equality check predicate on the "expired_at" field. It's identical to ExpiredAtEQ.
|
||
|
func ExpiredAt(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldExpiredAt, v))
|
||
|
}
|
||
|
|
||
|
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||
|
func CreatedAtEQ(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldCreatedAt, v))
|
||
|
}
|
||
|
|
||
|
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||
|
func CreatedAtNEQ(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNEQ(FieldCreatedAt, v))
|
||
|
}
|
||
|
|
||
|
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||
|
func CreatedAtIn(vs ...time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldIn(FieldCreatedAt, vs...))
|
||
|
}
|
||
|
|
||
|
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||
|
func CreatedAtNotIn(vs ...time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||
|
}
|
||
|
|
||
|
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||
|
func CreatedAtGT(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGT(FieldCreatedAt, v))
|
||
|
}
|
||
|
|
||
|
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||
|
func CreatedAtGTE(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGTE(FieldCreatedAt, v))
|
||
|
}
|
||
|
|
||
|
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||
|
func CreatedAtLT(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLT(FieldCreatedAt, v))
|
||
|
}
|
||
|
|
||
|
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||
|
func CreatedAtLTE(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLTE(FieldCreatedAt, v))
|
||
|
}
|
||
|
|
||
|
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||
|
func UpdatedAtEQ(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldUpdatedAt, v))
|
||
|
}
|
||
|
|
||
|
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||
|
func UpdatedAtNEQ(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNEQ(FieldUpdatedAt, v))
|
||
|
}
|
||
|
|
||
|
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||
|
func UpdatedAtIn(vs ...time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldIn(FieldUpdatedAt, vs...))
|
||
|
}
|
||
|
|
||
|
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||
|
func UpdatedAtNotIn(vs ...time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||
|
}
|
||
|
|
||
|
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||
|
func UpdatedAtGT(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGT(FieldUpdatedAt, v))
|
||
|
}
|
||
|
|
||
|
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||
|
func UpdatedAtGTE(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGTE(FieldUpdatedAt, v))
|
||
|
}
|
||
|
|
||
|
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||
|
func UpdatedAtLT(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLT(FieldUpdatedAt, v))
|
||
|
}
|
||
|
|
||
|
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||
|
func UpdatedAtLTE(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLTE(FieldUpdatedAt, v))
|
||
|
}
|
||
|
|
||
|
// StatusEQ applies the EQ predicate on the "status" field.
|
||
|
func StatusEQ(v types.Status) predicate.Token {
|
||
|
vc := v
|
||
|
return predicate.Token(sql.FieldEQ(FieldStatus, vc))
|
||
|
}
|
||
|
|
||
|
// StatusNEQ applies the NEQ predicate on the "status" field.
|
||
|
func StatusNEQ(v types.Status) predicate.Token {
|
||
|
vc := v
|
||
|
return predicate.Token(sql.FieldNEQ(FieldStatus, vc))
|
||
|
}
|
||
|
|
||
|
// StatusIn applies the In predicate on the "status" field.
|
||
|
func StatusIn(vs ...types.Status) predicate.Token {
|
||
|
v := make([]any, len(vs))
|
||
|
for i := range v {
|
||
|
v[i] = vs[i]
|
||
|
}
|
||
|
return predicate.Token(sql.FieldIn(FieldStatus, v...))
|
||
|
}
|
||
|
|
||
|
// StatusNotIn applies the NotIn predicate on the "status" field.
|
||
|
func StatusNotIn(vs ...types.Status) predicate.Token {
|
||
|
v := make([]any, len(vs))
|
||
|
for i := range v {
|
||
|
v[i] = vs[i]
|
||
|
}
|
||
|
return predicate.Token(sql.FieldNotIn(FieldStatus, v...))
|
||
|
}
|
||
|
|
||
|
// VersionEQ applies the EQ predicate on the "version" field.
|
||
|
func VersionEQ(v int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldVersion, v))
|
||
|
}
|
||
|
|
||
|
// VersionNEQ applies the NEQ predicate on the "version" field.
|
||
|
func VersionNEQ(v int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNEQ(FieldVersion, v))
|
||
|
}
|
||
|
|
||
|
// VersionIn applies the In predicate on the "version" field.
|
||
|
func VersionIn(vs ...int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldIn(FieldVersion, vs...))
|
||
|
}
|
||
|
|
||
|
// VersionNotIn applies the NotIn predicate on the "version" field.
|
||
|
func VersionNotIn(vs ...int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNotIn(FieldVersion, vs...))
|
||
|
}
|
||
|
|
||
|
// VersionGT applies the GT predicate on the "version" field.
|
||
|
func VersionGT(v int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGT(FieldVersion, v))
|
||
|
}
|
||
|
|
||
|
// VersionGTE applies the GTE predicate on the "version" field.
|
||
|
func VersionGTE(v int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGTE(FieldVersion, v))
|
||
|
}
|
||
|
|
||
|
// VersionLT applies the LT predicate on the "version" field.
|
||
|
func VersionLT(v int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLT(FieldVersion, v))
|
||
|
}
|
||
|
|
||
|
// VersionLTE applies the LTE predicate on the "version" field.
|
||
|
func VersionLTE(v int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLTE(FieldVersion, v))
|
||
|
}
|
||
|
|
||
|
// UserIDEQ applies the EQ predicate on the "user_id" field.
|
||
|
func UserIDEQ(v int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldUserID, v))
|
||
|
}
|
||
|
|
||
|
// UserIDNEQ applies the NEQ predicate on the "user_id" field.
|
||
|
func UserIDNEQ(v int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNEQ(FieldUserID, v))
|
||
|
}
|
||
|
|
||
|
// UserIDIn applies the In predicate on the "user_id" field.
|
||
|
func UserIDIn(vs ...int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldIn(FieldUserID, vs...))
|
||
|
}
|
||
|
|
||
|
// UserIDNotIn applies the NotIn predicate on the "user_id" field.
|
||
|
func UserIDNotIn(vs ...int64) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNotIn(FieldUserID, vs...))
|
||
|
}
|
||
|
|
||
|
// TokenTypeEQ applies the EQ predicate on the "token_type" field.
|
||
|
func TokenTypeEQ(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldTokenType, v))
|
||
|
}
|
||
|
|
||
|
// TokenTypeNEQ applies the NEQ predicate on the "token_type" field.
|
||
|
func TokenTypeNEQ(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNEQ(FieldTokenType, v))
|
||
|
}
|
||
|
|
||
|
// TokenTypeIn applies the In predicate on the "token_type" field.
|
||
|
func TokenTypeIn(vs ...string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldIn(FieldTokenType, vs...))
|
||
|
}
|
||
|
|
||
|
// TokenTypeNotIn applies the NotIn predicate on the "token_type" field.
|
||
|
func TokenTypeNotIn(vs ...string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNotIn(FieldTokenType, vs...))
|
||
|
}
|
||
|
|
||
|
// TokenTypeGT applies the GT predicate on the "token_type" field.
|
||
|
func TokenTypeGT(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGT(FieldTokenType, v))
|
||
|
}
|
||
|
|
||
|
// TokenTypeGTE applies the GTE predicate on the "token_type" field.
|
||
|
func TokenTypeGTE(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGTE(FieldTokenType, v))
|
||
|
}
|
||
|
|
||
|
// TokenTypeLT applies the LT predicate on the "token_type" field.
|
||
|
func TokenTypeLT(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLT(FieldTokenType, v))
|
||
|
}
|
||
|
|
||
|
// TokenTypeLTE applies the LTE predicate on the "token_type" field.
|
||
|
func TokenTypeLTE(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLTE(FieldTokenType, v))
|
||
|
}
|
||
|
|
||
|
// TokenTypeContains applies the Contains predicate on the "token_type" field.
|
||
|
func TokenTypeContains(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldContains(FieldTokenType, v))
|
||
|
}
|
||
|
|
||
|
// TokenTypeHasPrefix applies the HasPrefix predicate on the "token_type" field.
|
||
|
func TokenTypeHasPrefix(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldHasPrefix(FieldTokenType, v))
|
||
|
}
|
||
|
|
||
|
// TokenTypeHasSuffix applies the HasSuffix predicate on the "token_type" field.
|
||
|
func TokenTypeHasSuffix(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldHasSuffix(FieldTokenType, v))
|
||
|
}
|
||
|
|
||
|
// TokenTypeEqualFold applies the EqualFold predicate on the "token_type" field.
|
||
|
func TokenTypeEqualFold(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEqualFold(FieldTokenType, v))
|
||
|
}
|
||
|
|
||
|
// TokenTypeContainsFold applies the ContainsFold predicate on the "token_type" field.
|
||
|
func TokenTypeContainsFold(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldContainsFold(FieldTokenType, v))
|
||
|
}
|
||
|
|
||
|
// AccessTokenEQ applies the EQ predicate on the "access_token" field.
|
||
|
func AccessTokenEQ(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldAccessToken, v))
|
||
|
}
|
||
|
|
||
|
// AccessTokenNEQ applies the NEQ predicate on the "access_token" field.
|
||
|
func AccessTokenNEQ(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNEQ(FieldAccessToken, v))
|
||
|
}
|
||
|
|
||
|
// AccessTokenIn applies the In predicate on the "access_token" field.
|
||
|
func AccessTokenIn(vs ...string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldIn(FieldAccessToken, vs...))
|
||
|
}
|
||
|
|
||
|
// AccessTokenNotIn applies the NotIn predicate on the "access_token" field.
|
||
|
func AccessTokenNotIn(vs ...string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNotIn(FieldAccessToken, vs...))
|
||
|
}
|
||
|
|
||
|
// AccessTokenGT applies the GT predicate on the "access_token" field.
|
||
|
func AccessTokenGT(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGT(FieldAccessToken, v))
|
||
|
}
|
||
|
|
||
|
// AccessTokenGTE applies the GTE predicate on the "access_token" field.
|
||
|
func AccessTokenGTE(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGTE(FieldAccessToken, v))
|
||
|
}
|
||
|
|
||
|
// AccessTokenLT applies the LT predicate on the "access_token" field.
|
||
|
func AccessTokenLT(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLT(FieldAccessToken, v))
|
||
|
}
|
||
|
|
||
|
// AccessTokenLTE applies the LTE predicate on the "access_token" field.
|
||
|
func AccessTokenLTE(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLTE(FieldAccessToken, v))
|
||
|
}
|
||
|
|
||
|
// AccessTokenContains applies the Contains predicate on the "access_token" field.
|
||
|
func AccessTokenContains(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldContains(FieldAccessToken, v))
|
||
|
}
|
||
|
|
||
|
// AccessTokenHasPrefix applies the HasPrefix predicate on the "access_token" field.
|
||
|
func AccessTokenHasPrefix(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldHasPrefix(FieldAccessToken, v))
|
||
|
}
|
||
|
|
||
|
// AccessTokenHasSuffix applies the HasSuffix predicate on the "access_token" field.
|
||
|
func AccessTokenHasSuffix(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldHasSuffix(FieldAccessToken, v))
|
||
|
}
|
||
|
|
||
|
// AccessTokenEqualFold applies the EqualFold predicate on the "access_token" field.
|
||
|
func AccessTokenEqualFold(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEqualFold(FieldAccessToken, v))
|
||
|
}
|
||
|
|
||
|
// AccessTokenContainsFold applies the ContainsFold predicate on the "access_token" field.
|
||
|
func AccessTokenContainsFold(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldContainsFold(FieldAccessToken, v))
|
||
|
}
|
||
|
|
||
|
// RefreshTokenEQ applies the EQ predicate on the "refresh_token" field.
|
||
|
func RefreshTokenEQ(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldRefreshToken, v))
|
||
|
}
|
||
|
|
||
|
// RefreshTokenNEQ applies the NEQ predicate on the "refresh_token" field.
|
||
|
func RefreshTokenNEQ(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNEQ(FieldRefreshToken, v))
|
||
|
}
|
||
|
|
||
|
// RefreshTokenIn applies the In predicate on the "refresh_token" field.
|
||
|
func RefreshTokenIn(vs ...string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldIn(FieldRefreshToken, vs...))
|
||
|
}
|
||
|
|
||
|
// RefreshTokenNotIn applies the NotIn predicate on the "refresh_token" field.
|
||
|
func RefreshTokenNotIn(vs ...string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNotIn(FieldRefreshToken, vs...))
|
||
|
}
|
||
|
|
||
|
// RefreshTokenGT applies the GT predicate on the "refresh_token" field.
|
||
|
func RefreshTokenGT(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGT(FieldRefreshToken, v))
|
||
|
}
|
||
|
|
||
|
// RefreshTokenGTE applies the GTE predicate on the "refresh_token" field.
|
||
|
func RefreshTokenGTE(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGTE(FieldRefreshToken, v))
|
||
|
}
|
||
|
|
||
|
// RefreshTokenLT applies the LT predicate on the "refresh_token" field.
|
||
|
func RefreshTokenLT(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLT(FieldRefreshToken, v))
|
||
|
}
|
||
|
|
||
|
// RefreshTokenLTE applies the LTE predicate on the "refresh_token" field.
|
||
|
func RefreshTokenLTE(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLTE(FieldRefreshToken, v))
|
||
|
}
|
||
|
|
||
|
// RefreshTokenContains applies the Contains predicate on the "refresh_token" field.
|
||
|
func RefreshTokenContains(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldContains(FieldRefreshToken, v))
|
||
|
}
|
||
|
|
||
|
// RefreshTokenHasPrefix applies the HasPrefix predicate on the "refresh_token" field.
|
||
|
func RefreshTokenHasPrefix(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldHasPrefix(FieldRefreshToken, v))
|
||
|
}
|
||
|
|
||
|
// RefreshTokenHasSuffix applies the HasSuffix predicate on the "refresh_token" field.
|
||
|
func RefreshTokenHasSuffix(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldHasSuffix(FieldRefreshToken, v))
|
||
|
}
|
||
|
|
||
|
// RefreshTokenEqualFold applies the EqualFold predicate on the "refresh_token" field.
|
||
|
func RefreshTokenEqualFold(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEqualFold(FieldRefreshToken, v))
|
||
|
}
|
||
|
|
||
|
// RefreshTokenContainsFold applies the ContainsFold predicate on the "refresh_token" field.
|
||
|
func RefreshTokenContainsFold(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldContainsFold(FieldRefreshToken, v))
|
||
|
}
|
||
|
|
||
|
// SourceEQ applies the EQ predicate on the "source" field.
|
||
|
func SourceEQ(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldSource, v))
|
||
|
}
|
||
|
|
||
|
// SourceNEQ applies the NEQ predicate on the "source" field.
|
||
|
func SourceNEQ(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNEQ(FieldSource, v))
|
||
|
}
|
||
|
|
||
|
// SourceIn applies the In predicate on the "source" field.
|
||
|
func SourceIn(vs ...string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldIn(FieldSource, vs...))
|
||
|
}
|
||
|
|
||
|
// SourceNotIn applies the NotIn predicate on the "source" field.
|
||
|
func SourceNotIn(vs ...string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNotIn(FieldSource, vs...))
|
||
|
}
|
||
|
|
||
|
// SourceGT applies the GT predicate on the "source" field.
|
||
|
func SourceGT(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGT(FieldSource, v))
|
||
|
}
|
||
|
|
||
|
// SourceGTE applies the GTE predicate on the "source" field.
|
||
|
func SourceGTE(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGTE(FieldSource, v))
|
||
|
}
|
||
|
|
||
|
// SourceLT applies the LT predicate on the "source" field.
|
||
|
func SourceLT(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLT(FieldSource, v))
|
||
|
}
|
||
|
|
||
|
// SourceLTE applies the LTE predicate on the "source" field.
|
||
|
func SourceLTE(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLTE(FieldSource, v))
|
||
|
}
|
||
|
|
||
|
// SourceContains applies the Contains predicate on the "source" field.
|
||
|
func SourceContains(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldContains(FieldSource, v))
|
||
|
}
|
||
|
|
||
|
// SourceHasPrefix applies the HasPrefix predicate on the "source" field.
|
||
|
func SourceHasPrefix(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldHasPrefix(FieldSource, v))
|
||
|
}
|
||
|
|
||
|
// SourceHasSuffix applies the HasSuffix predicate on the "source" field.
|
||
|
func SourceHasSuffix(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldHasSuffix(FieldSource, v))
|
||
|
}
|
||
|
|
||
|
// SourceEqualFold applies the EqualFold predicate on the "source" field.
|
||
|
func SourceEqualFold(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEqualFold(FieldSource, v))
|
||
|
}
|
||
|
|
||
|
// SourceContainsFold applies the ContainsFold predicate on the "source" field.
|
||
|
func SourceContainsFold(v string) predicate.Token {
|
||
|
return predicate.Token(sql.FieldContainsFold(FieldSource, v))
|
||
|
}
|
||
|
|
||
|
// ExpiredAtEQ applies the EQ predicate on the "expired_at" field.
|
||
|
func ExpiredAtEQ(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldEQ(FieldExpiredAt, v))
|
||
|
}
|
||
|
|
||
|
// ExpiredAtNEQ applies the NEQ predicate on the "expired_at" field.
|
||
|
func ExpiredAtNEQ(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNEQ(FieldExpiredAt, v))
|
||
|
}
|
||
|
|
||
|
// ExpiredAtIn applies the In predicate on the "expired_at" field.
|
||
|
func ExpiredAtIn(vs ...time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldIn(FieldExpiredAt, vs...))
|
||
|
}
|
||
|
|
||
|
// ExpiredAtNotIn applies the NotIn predicate on the "expired_at" field.
|
||
|
func ExpiredAtNotIn(vs ...time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldNotIn(FieldExpiredAt, vs...))
|
||
|
}
|
||
|
|
||
|
// ExpiredAtGT applies the GT predicate on the "expired_at" field.
|
||
|
func ExpiredAtGT(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGT(FieldExpiredAt, v))
|
||
|
}
|
||
|
|
||
|
// ExpiredAtGTE applies the GTE predicate on the "expired_at" field.
|
||
|
func ExpiredAtGTE(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldGTE(FieldExpiredAt, v))
|
||
|
}
|
||
|
|
||
|
// ExpiredAtLT applies the LT predicate on the "expired_at" field.
|
||
|
func ExpiredAtLT(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLT(FieldExpiredAt, v))
|
||
|
}
|
||
|
|
||
|
// ExpiredAtLTE applies the LTE predicate on the "expired_at" field.
|
||
|
func ExpiredAtLTE(v time.Time) predicate.Token {
|
||
|
return predicate.Token(sql.FieldLTE(FieldExpiredAt, v))
|
||
|
}
|
||
|
|
||
|
// HasUser applies the HasEdge predicate on the "user" edge.
|
||
|
func HasUser() predicate.Token {
|
||
|
return predicate.Token(func(s *sql.Selector) {
|
||
|
step := sqlgraph.NewStep(
|
||
|
sqlgraph.From(Table, FieldID),
|
||
|
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
|
||
|
)
|
||
|
sqlgraph.HasNeighbors(s, step)
|
||
|
})
|
||
|
}
|
||
|
|
||
|
// HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
|
||
|
func HasUserWith(preds ...predicate.User) predicate.Token {
|
||
|
return predicate.Token(func(s *sql.Selector) {
|
||
|
step := newUserStep()
|
||
|
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.Token) predicate.Token {
|
||
|
return predicate.Token(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.Token) predicate.Token {
|
||
|
return predicate.Token(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.Token) predicate.Token {
|
||
|
return predicate.Token(func(s *sql.Selector) {
|
||
|
p(s.Not())
|
||
|
})
|
||
|
}
|