user

package
v0.0.0-...-11b8a5d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the user type in the database.
	Label = "user"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldUpdateTime holds the string denoting the update_time field in the database.
	FieldUpdateTime = "update_time"
	// FieldAddress holds the string denoting the address field in the database.
	FieldAddress = "address"
	// FieldUsername holds the string denoting the username field in the database.
	FieldUsername = "username"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldLevel holds the string denoting the level field in the database.
	FieldLevel = "level"
	// EdgeInteractions holds the string denoting the interactions edge name in mutations.
	EdgeInteractions = "interactions"
	// EdgePoolPasses holds the string denoting the pool_passes edge name in mutations.
	EdgePoolPasses = "pool_passes"
	// EdgeRoles holds the string denoting the roles edge name in mutations.
	EdgeRoles = "roles"
	// EdgeCreated holds the string denoting the created edge name in mutations.
	EdgeCreated = "created"
	// EdgeOwned holds the string denoting the owned edge name in mutations.
	EdgeOwned = "owned"
	// EdgeFollowers holds the string denoting the followers edge name in mutations.
	EdgeFollowers = "followers"
	// EdgeFollowing holds the string denoting the following edge name in mutations.
	EdgeFollowing = "following"
	// Table holds the table name of the user in the database.
	Table = "users"
	// InteractionsTable is the table that holds the interactions relation/edge.
	InteractionsTable = "interactions"
	// InteractionsInverseTable is the table name for the Interaction entity.
	// It exists in this package in order to avoid circular dependency with the "interaction" package.
	InteractionsInverseTable = "interactions"
	// InteractionsColumn is the table column denoting the interactions relation/edge.
	InteractionsColumn = "user_interactions"
	// PoolPassesTable is the table that holds the pool_passes relation/edge.
	PoolPassesTable = "pool_passes"
	// PoolPassesInverseTable is the table name for the PoolPass entity.
	// It exists in this package in order to avoid circular dependency with the "poolpass" package.
	PoolPassesInverseTable = "pool_passes"
	// PoolPassesColumn is the table column denoting the pool_passes relation/edge.
	PoolPassesColumn = "user_pool_passes"
	// RolesTable is the table that holds the roles relation/edge. The primary key declared below.
	RolesTable = "user_roles"
	// RolesInverseTable is the table name for the Role entity.
	// It exists in this package in order to avoid circular dependency with the "role" package.
	RolesInverseTable = "roles"
	// CreatedTable is the table that holds the created relation/edge.
	CreatedTable = "squeaks"
	// CreatedInverseTable is the table name for the Squeak entity.
	// It exists in this package in order to avoid circular dependency with the "squeak" package.
	CreatedInverseTable = "squeaks"
	// CreatedColumn is the table column denoting the created relation/edge.
	CreatedColumn = "user_created"
	// OwnedTable is the table that holds the owned relation/edge.
	OwnedTable = "squeaks"
	// OwnedInverseTable is the table name for the Squeak entity.
	// It exists in this package in order to avoid circular dependency with the "squeak" package.
	OwnedInverseTable = "squeaks"
	// OwnedColumn is the table column denoting the owned relation/edge.
	OwnedColumn = "user_owned"
	// FollowersTable is the table that holds the followers relation/edge. The primary key declared below.
	FollowersTable = "user_following"
	// FollowingTable is the table that holds the following relation/edge. The primary key declared below.
	FollowingTable = "user_following"
)

Variables

View Source
var (
	// RolesPrimaryKey and RolesColumn2 are the table columns denoting the
	// primary key for the roles relation (M2M).
	RolesPrimaryKey = []string{"user_id", "role_id"}
	// FollowersPrimaryKey and FollowersColumn2 are the table columns denoting the
	// primary key for the followers relation (M2M).
	FollowersPrimaryKey = []string{"user_id", "follower_id"}
	// FollowingPrimaryKey and FollowingColumn2 are the table columns denoting the
	// primary key for the following relation (M2M).
	FollowingPrimaryKey = []string{"user_id", "follower_id"}
)
View Source
var (
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// DefaultUpdateTime holds the default value on creation for the "update_time" field.
	DefaultUpdateTime func() time.Time
	// UpdateDefaultUpdateTime holds the default value on update for the "update_time" field.
	UpdateDefaultUpdateTime func() time.Time
	// AddressValidator is a validator for the "address" field. It is called by the builders before save.
	AddressValidator func(string) error
	// UsernameValidator is a validator for the "username" field. It is called by the builders before save.
	UsernameValidator func(string) error
	// DefaultLevel holds the default value on creation for the "level" field.
	DefaultLevel int8
)

Columns holds all SQL columns for user fields.

Functions

func Address

func Address(v string) predicate.User

Address applies equality check predicate on the "address" field. It's identical to AddressEQ.

func AddressContains

func AddressContains(v string) predicate.User

AddressContains applies the Contains predicate on the "address" field.

func AddressContainsFold

func AddressContainsFold(v string) predicate.User

AddressContainsFold applies the ContainsFold predicate on the "address" field.

func AddressEQ

func AddressEQ(v string) predicate.User

AddressEQ applies the EQ predicate on the "address" field.

func AddressEqualFold

func AddressEqualFold(v string) predicate.User

AddressEqualFold applies the EqualFold predicate on the "address" field.

func AddressGT

func AddressGT(v string) predicate.User

AddressGT applies the GT predicate on the "address" field.

func AddressGTE

func AddressGTE(v string) predicate.User

AddressGTE applies the GTE predicate on the "address" field.

func AddressHasPrefix

func AddressHasPrefix(v string) predicate.User

AddressHasPrefix applies the HasPrefix predicate on the "address" field.

func AddressHasSuffix

func AddressHasSuffix(v string) predicate.User

AddressHasSuffix applies the HasSuffix predicate on the "address" field.

func AddressIn

func AddressIn(vs ...string) predicate.User

AddressIn applies the In predicate on the "address" field.

func AddressLT

func AddressLT(v string) predicate.User

AddressLT applies the LT predicate on the "address" field.

func AddressLTE

func AddressLTE(v string) predicate.User

AddressLTE applies the LTE predicate on the "address" field.

func AddressNEQ

func AddressNEQ(v string) predicate.User

AddressNEQ applies the NEQ predicate on the "address" field.

func AddressNotIn

func AddressNotIn(vs ...string) predicate.User

AddressNotIn applies the NotIn predicate on the "address" field.

func And

func And(predicates ...predicate.User) predicate.User

And groups predicates with the AND operator between them.

func CreateTime

func CreateTime(v time.Time) predicate.User

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.User

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.User

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.User

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

func CreateTimeIn(vs ...time.Time) predicate.User

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.User

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.User

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.User

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

func CreateTimeNotIn(vs ...time.Time) predicate.User

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func HasCreated

func HasCreated() predicate.User

HasCreated applies the HasEdge predicate on the "created" edge.

func HasCreatedWith

func HasCreatedWith(preds ...predicate.Squeak) predicate.User

HasCreatedWith applies the HasEdge predicate on the "created" edge with a given conditions (other predicates).

func HasFollowers

func HasFollowers() predicate.User

HasFollowers applies the HasEdge predicate on the "followers" edge.

func HasFollowersWith

func HasFollowersWith(preds ...predicate.User) predicate.User

HasFollowersWith applies the HasEdge predicate on the "followers" edge with a given conditions (other predicates).

func HasFollowing

func HasFollowing() predicate.User

HasFollowing applies the HasEdge predicate on the "following" edge.

func HasFollowingWith

func HasFollowingWith(preds ...predicate.User) predicate.User

HasFollowingWith applies the HasEdge predicate on the "following" edge with a given conditions (other predicates).

func HasInteractions

func HasInteractions() predicate.User

HasInteractions applies the HasEdge predicate on the "interactions" edge.

func HasInteractionsWith

func HasInteractionsWith(preds ...predicate.Interaction) predicate.User

HasInteractionsWith applies the HasEdge predicate on the "interactions" edge with a given conditions (other predicates).

func HasOwned

func HasOwned() predicate.User

HasOwned applies the HasEdge predicate on the "owned" edge.

func HasOwnedWith

func HasOwnedWith(preds ...predicate.Squeak) predicate.User

HasOwnedWith applies the HasEdge predicate on the "owned" edge with a given conditions (other predicates).

func HasPoolPasses

func HasPoolPasses() predicate.User

HasPoolPasses applies the HasEdge predicate on the "pool_passes" edge.

func HasPoolPassesWith

func HasPoolPassesWith(preds ...predicate.PoolPass) predicate.User

HasPoolPassesWith applies the HasEdge predicate on the "pool_passes" edge with a given conditions (other predicates).

func HasRoles

func HasRoles() predicate.User

HasRoles applies the HasEdge predicate on the "roles" edge.

func HasRolesWith

func HasRolesWith(preds ...predicate.Role) predicate.User

HasRolesWith applies the HasEdge predicate on the "roles" edge with a given conditions (other predicates).

func ID

func ID(id int) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.User

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.User

IDNotIn applies the NotIn predicate on the ID field.

func Level

func Level(v int8) predicate.User

Level applies equality check predicate on the "level" field. It's identical to LevelEQ.

func LevelEQ

func LevelEQ(v int8) predicate.User

LevelEQ applies the EQ predicate on the "level" field.

func LevelGT

func LevelGT(v int8) predicate.User

LevelGT applies the GT predicate on the "level" field.

func LevelGTE

func LevelGTE(v int8) predicate.User

LevelGTE applies the GTE predicate on the "level" field.

func LevelIn

func LevelIn(vs ...int8) predicate.User

LevelIn applies the In predicate on the "level" field.

func LevelLT

func LevelLT(v int8) predicate.User

LevelLT applies the LT predicate on the "level" field.

func LevelLTE

func LevelLTE(v int8) predicate.User

LevelLTE applies the LTE predicate on the "level" field.

func LevelNEQ

func LevelNEQ(v int8) predicate.User

LevelNEQ applies the NEQ predicate on the "level" field.

func LevelNotIn

func LevelNotIn(vs ...int8) predicate.User

LevelNotIn applies the NotIn predicate on the "level" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.User) predicate.User

Or groups predicates with the OR operator between them.

func StatusEQ

func StatusEQ(v Status) predicate.User

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.User

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.User

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.User

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.

func UpdateTime

func UpdateTime(v time.Time) predicate.User

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.User

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.User

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.User

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

func UpdateTimeIn(vs ...time.Time) predicate.User

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.User

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.User

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.User

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

func UpdateTimeNotIn(vs ...time.Time) predicate.User

UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.

func Username

func Username(v string) predicate.User

Username applies equality check predicate on the "username" field. It's identical to UsernameEQ.

func UsernameContains

func UsernameContains(v string) predicate.User

UsernameContains applies the Contains predicate on the "username" field.

func UsernameContainsFold

func UsernameContainsFold(v string) predicate.User

UsernameContainsFold applies the ContainsFold predicate on the "username" field.

func UsernameEQ

func UsernameEQ(v string) predicate.User

UsernameEQ applies the EQ predicate on the "username" field.

func UsernameEqualFold

func UsernameEqualFold(v string) predicate.User

UsernameEqualFold applies the EqualFold predicate on the "username" field.

func UsernameGT

func UsernameGT(v string) predicate.User

UsernameGT applies the GT predicate on the "username" field.

func UsernameGTE

func UsernameGTE(v string) predicate.User

UsernameGTE applies the GTE predicate on the "username" field.

func UsernameHasPrefix

func UsernameHasPrefix(v string) predicate.User

UsernameHasPrefix applies the HasPrefix predicate on the "username" field.

func UsernameHasSuffix

func UsernameHasSuffix(v string) predicate.User

UsernameHasSuffix applies the HasSuffix predicate on the "username" field.

func UsernameIn

func UsernameIn(vs ...string) predicate.User

UsernameIn applies the In predicate on the "username" field.

func UsernameLT

func UsernameLT(v string) predicate.User

UsernameLT applies the LT predicate on the "username" field.

func UsernameLTE

func UsernameLTE(v string) predicate.User

UsernameLTE applies the LTE predicate on the "username" field.

func UsernameNEQ

func UsernameNEQ(v string) predicate.User

UsernameNEQ applies the NEQ predicate on the "username" field.

func UsernameNotIn

func UsernameNotIn(vs ...string) predicate.User

UsernameNotIn applies the NotIn predicate on the "username" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusUNKNOWN   Status = "UNKNOWN"
	StatusACTIVE    Status = "ACTIVE"
	StatusSUSPENDED Status = "SUSPENDED"
	StatusBANNED    Status = "BANNED"
)

Status values.

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL