user

package
v0.0.0-...-52a3571 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: MIT Imports: 4 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"
	// FieldNickname holds the string denoting the nickname field in the database.
	FieldNickname = "nickname"
	// FieldEmail holds the string denoting the email field in the database.
	FieldEmail = "email"
	// FieldPassword holds the string denoting the password field in the database.
	FieldPassword = "password"
	// FieldAvatar holds the string denoting the avatar field in the database.
	FieldAvatar = "avatar"
	// FieldCreatedTime holds the string denoting the created_time field in the database.
	FieldCreatedTime = "created_time"
	// EdgeTeams holds the string denoting the teams edge name in mutations.
	EdgeTeams = "teams"
	// EdgeAnnouncements holds the string denoting the announcements edge name in mutations.
	EdgeAnnouncements = "announcements"
	// EdgeRecords holds the string denoting the records edge name in mutations.
	EdgeRecords = "records"
	// EdgeCreatedProblems holds the string denoting the created_problems edge name in mutations.
	EdgeCreatedProblems = "created_problems"
	// EdgeSolvedProblems holds the string denoting the solved_problems edge name in mutations.
	EdgeSolvedProblems = "solved_problems"
	// EdgeManaged holds the string denoting the managed edge name in mutations.
	EdgeManaged = "managed"
	// EdgeOwned holds the string denoting the owned edge name in mutations.
	EdgeOwned = "owned"
	// Table holds the table name of the user in the database.
	Table = "users"
	// TeamsTable is the table that holds the teams relation/edge. The primary key declared below.
	TeamsTable = "team_members"
	// TeamsInverseTable is the table name for the Team entity.
	// It exists in this package in order to avoid circular dependency with the "team" package.
	TeamsInverseTable = "teams"
	// AnnouncementsTable is the table that holds the announcements relation/edge.
	AnnouncementsTable = "users"
	// AnnouncementsInverseTable is the table name for the Announcement entity.
	// It exists in this package in order to avoid circular dependency with the "announcement" package.
	AnnouncementsInverseTable = "announcements"
	// AnnouncementsColumn is the table column denoting the announcements relation/edge.
	AnnouncementsColumn = "announcement_author"
	// RecordsTable is the table that holds the records relation/edge.
	RecordsTable = "users"
	// RecordsInverseTable is the table name for the JudgeRecord entity.
	// It exists in this package in order to avoid circular dependency with the "judgerecord" package.
	RecordsInverseTable = "judge_records"
	// RecordsColumn is the table column denoting the records relation/edge.
	RecordsColumn = "judge_record_user"
	// CreatedProblemsTable is the table that holds the created_problems relation/edge.
	CreatedProblemsTable = "problems"
	// CreatedProblemsInverseTable is the table name for the Problem entity.
	// It exists in this package in order to avoid circular dependency with the "problem" package.
	CreatedProblemsInverseTable = "problems"
	// CreatedProblemsColumn is the table column denoting the created_problems relation/edge.
	CreatedProblemsColumn = "user_created_problems"
	// SolvedProblemsTable is the table that holds the solved_problems relation/edge. The primary key declared below.
	SolvedProblemsTable = "user_solved_problems"
	// SolvedProblemsInverseTable is the table name for the Problem entity.
	// It exists in this package in order to avoid circular dependency with the "problem" package.
	SolvedProblemsInverseTable = "problems"
	// ManagedTable is the table that holds the managed relation/edge. The primary key declared below.
	ManagedTable = "team_admins"
	// ManagedInverseTable is the table name for the Team entity.
	// It exists in this package in order to avoid circular dependency with the "team" package.
	ManagedInverseTable = "teams"
	// OwnedTable is the table that holds the owned relation/edge.
	OwnedTable = "teams"
	// OwnedInverseTable is the table name for the Team entity.
	// It exists in this package in order to avoid circular dependency with the "team" package.
	OwnedInverseTable = "teams"
	// OwnedColumn is the table column denoting the owned relation/edge.
	OwnedColumn = "team_creator"
)

Variables

View Source
var (
	// TeamsPrimaryKey and TeamsColumn2 are the table columns denoting the
	// primary key for the teams relation (M2M).
	TeamsPrimaryKey = []string{"team_id", "user_id"}
	// SolvedProblemsPrimaryKey and SolvedProblemsColumn2 are the table columns denoting the
	// primary key for the solved_problems relation (M2M).
	SolvedProblemsPrimaryKey = []string{"user_id", "problem_id"}
	// ManagedPrimaryKey and ManagedColumn2 are the table columns denoting the
	// primary key for the managed relation (M2M).
	ManagedPrimaryKey = []string{"team_id", "user_id"}
)
View Source
var (
	// NicknameValidator is a validator for the "nickname" field. It is called by the builders before save.
	NicknameValidator func(string) error
	// PasswordValidator is a validator for the "password" field. It is called by the builders before save.
	PasswordValidator func(string) error
	// DefaultAvatar holds the default value on creation for the "avatar" field.
	DefaultAvatar string
	// AvatarValidator is a validator for the "avatar" field. It is called by the builders before save.
	AvatarValidator func(string) error
	// DefaultCreatedTime holds the default value on creation for the "created_time" field.
	DefaultCreatedTime time.Time
)

Columns holds all SQL columns for user fields.

View Source
var ForeignKeys = []string{
	"announcement_author",
	"judge_record_user",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "users" table and are not defined as standalone fields in the schema.

Functions

func And

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

And groups predicates with the AND operator between them.

func Avatar

func Avatar(v string) predicate.User

Avatar applies equality check predicate on the "avatar" field. It's identical to AvatarEQ.

func AvatarContains

func AvatarContains(v string) predicate.User

AvatarContains applies the Contains predicate on the "avatar" field.

func AvatarContainsFold

func AvatarContainsFold(v string) predicate.User

AvatarContainsFold applies the ContainsFold predicate on the "avatar" field.

func AvatarEQ

func AvatarEQ(v string) predicate.User

AvatarEQ applies the EQ predicate on the "avatar" field.

func AvatarEqualFold

func AvatarEqualFold(v string) predicate.User

AvatarEqualFold applies the EqualFold predicate on the "avatar" field.

func AvatarGT

func AvatarGT(v string) predicate.User

AvatarGT applies the GT predicate on the "avatar" field.

func AvatarGTE

func AvatarGTE(v string) predicate.User

AvatarGTE applies the GTE predicate on the "avatar" field.

func AvatarHasPrefix

func AvatarHasPrefix(v string) predicate.User

AvatarHasPrefix applies the HasPrefix predicate on the "avatar" field.

func AvatarHasSuffix

func AvatarHasSuffix(v string) predicate.User

AvatarHasSuffix applies the HasSuffix predicate on the "avatar" field.

func AvatarIn

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

AvatarIn applies the In predicate on the "avatar" field.

func AvatarLT

func AvatarLT(v string) predicate.User

AvatarLT applies the LT predicate on the "avatar" field.

func AvatarLTE

func AvatarLTE(v string) predicate.User

AvatarLTE applies the LTE predicate on the "avatar" field.

func AvatarNEQ

func AvatarNEQ(v string) predicate.User

AvatarNEQ applies the NEQ predicate on the "avatar" field.

func AvatarNotIn

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

AvatarNotIn applies the NotIn predicate on the "avatar" field.

func CreatedTime

func CreatedTime(v time.Time) predicate.User

CreatedTime applies equality check predicate on the "created_time" field. It's identical to CreatedTimeEQ.

func CreatedTimeEQ

func CreatedTimeEQ(v time.Time) predicate.User

CreatedTimeEQ applies the EQ predicate on the "created_time" field.

func CreatedTimeGT

func CreatedTimeGT(v time.Time) predicate.User

CreatedTimeGT applies the GT predicate on the "created_time" field.

func CreatedTimeGTE

func CreatedTimeGTE(v time.Time) predicate.User

CreatedTimeGTE applies the GTE predicate on the "created_time" field.

func CreatedTimeIn

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

CreatedTimeIn applies the In predicate on the "created_time" field.

func CreatedTimeLT

func CreatedTimeLT(v time.Time) predicate.User

CreatedTimeLT applies the LT predicate on the "created_time" field.

func CreatedTimeLTE

func CreatedTimeLTE(v time.Time) predicate.User

CreatedTimeLTE applies the LTE predicate on the "created_time" field.

func CreatedTimeNEQ

func CreatedTimeNEQ(v time.Time) predicate.User

CreatedTimeNEQ applies the NEQ predicate on the "created_time" field.

func CreatedTimeNotIn

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

CreatedTimeNotIn applies the NotIn predicate on the "created_time" field.

func Email

func Email(v string) predicate.User

Email applies equality check predicate on the "email" field. It's identical to EmailEQ.

func EmailContains

func EmailContains(v string) predicate.User

EmailContains applies the Contains predicate on the "email" field.

func EmailContainsFold

func EmailContainsFold(v string) predicate.User

EmailContainsFold applies the ContainsFold predicate on the "email" field.

func EmailEQ

func EmailEQ(v string) predicate.User

EmailEQ applies the EQ predicate on the "email" field.

func EmailEqualFold

func EmailEqualFold(v string) predicate.User

EmailEqualFold applies the EqualFold predicate on the "email" field.

func EmailGT

func EmailGT(v string) predicate.User

EmailGT applies the GT predicate on the "email" field.

func EmailGTE

func EmailGTE(v string) predicate.User

EmailGTE applies the GTE predicate on the "email" field.

func EmailHasPrefix

func EmailHasPrefix(v string) predicate.User

EmailHasPrefix applies the HasPrefix predicate on the "email" field.

func EmailHasSuffix

func EmailHasSuffix(v string) predicate.User

EmailHasSuffix applies the HasSuffix predicate on the "email" field.

func EmailIn

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

EmailIn applies the In predicate on the "email" field.

func EmailLT

func EmailLT(v string) predicate.User

EmailLT applies the LT predicate on the "email" field.

func EmailLTE

func EmailLTE(v string) predicate.User

EmailLTE applies the LTE predicate on the "email" field.

func EmailNEQ

func EmailNEQ(v string) predicate.User

EmailNEQ applies the NEQ predicate on the "email" field.

func EmailNotIn

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

EmailNotIn applies the NotIn predicate on the "email" field.

func HasAnnouncements

func HasAnnouncements() predicate.User

HasAnnouncements applies the HasEdge predicate on the "announcements" edge.

func HasAnnouncementsWith

func HasAnnouncementsWith(preds ...predicate.Announcement) predicate.User

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

func HasCreatedProblems

func HasCreatedProblems() predicate.User

HasCreatedProblems applies the HasEdge predicate on the "created_problems" edge.

func HasCreatedProblemsWith

func HasCreatedProblemsWith(preds ...predicate.Problem) predicate.User

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

func HasManaged

func HasManaged() predicate.User

HasManaged applies the HasEdge predicate on the "managed" edge.

func HasManagedWith

func HasManagedWith(preds ...predicate.Team) predicate.User

HasManagedWith applies the HasEdge predicate on the "managed" 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.Team) predicate.User

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

func HasRecords

func HasRecords() predicate.User

HasRecords applies the HasEdge predicate on the "records" edge.

func HasRecordsWith

func HasRecordsWith(preds ...predicate.JudgeRecord) predicate.User

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

func HasSolvedProblems

func HasSolvedProblems() predicate.User

HasSolvedProblems applies the HasEdge predicate on the "solved_problems" edge.

func HasSolvedProblemsWith

func HasSolvedProblemsWith(preds ...predicate.Problem) predicate.User

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

func HasTeams

func HasTeams() predicate.User

HasTeams applies the HasEdge predicate on the "teams" edge.

func HasTeamsWith

func HasTeamsWith(preds ...predicate.Team) predicate.User

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

func ID

func ID(id int64) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Nickname

func Nickname(v string) predicate.User

Nickname applies equality check predicate on the "nickname" field. It's identical to NicknameEQ.

func NicknameContains

func NicknameContains(v string) predicate.User

NicknameContains applies the Contains predicate on the "nickname" field.

func NicknameContainsFold

func NicknameContainsFold(v string) predicate.User

NicknameContainsFold applies the ContainsFold predicate on the "nickname" field.

func NicknameEQ

func NicknameEQ(v string) predicate.User

NicknameEQ applies the EQ predicate on the "nickname" field.

func NicknameEqualFold

func NicknameEqualFold(v string) predicate.User

NicknameEqualFold applies the EqualFold predicate on the "nickname" field.

func NicknameGT

func NicknameGT(v string) predicate.User

NicknameGT applies the GT predicate on the "nickname" field.

func NicknameGTE

func NicknameGTE(v string) predicate.User

NicknameGTE applies the GTE predicate on the "nickname" field.

func NicknameHasPrefix

func NicknameHasPrefix(v string) predicate.User

NicknameHasPrefix applies the HasPrefix predicate on the "nickname" field.

func NicknameHasSuffix

func NicknameHasSuffix(v string) predicate.User

NicknameHasSuffix applies the HasSuffix predicate on the "nickname" field.

func NicknameIn

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

NicknameIn applies the In predicate on the "nickname" field.

func NicknameLT

func NicknameLT(v string) predicate.User

NicknameLT applies the LT predicate on the "nickname" field.

func NicknameLTE

func NicknameLTE(v string) predicate.User

NicknameLTE applies the LTE predicate on the "nickname" field.

func NicknameNEQ

func NicknameNEQ(v string) predicate.User

NicknameNEQ applies the NEQ predicate on the "nickname" field.

func NicknameNotIn

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

NicknameNotIn applies the NotIn predicate on the "nickname" 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 Password

func Password(v string) predicate.User

Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.

func PasswordContains

func PasswordContains(v string) predicate.User

PasswordContains applies the Contains predicate on the "password" field.

func PasswordContainsFold

func PasswordContainsFold(v string) predicate.User

PasswordContainsFold applies the ContainsFold predicate on the "password" field.

func PasswordEQ

func PasswordEQ(v string) predicate.User

PasswordEQ applies the EQ predicate on the "password" field.

func PasswordEqualFold

func PasswordEqualFold(v string) predicate.User

PasswordEqualFold applies the EqualFold predicate on the "password" field.

func PasswordGT

func PasswordGT(v string) predicate.User

PasswordGT applies the GT predicate on the "password" field.

func PasswordGTE

func PasswordGTE(v string) predicate.User

PasswordGTE applies the GTE predicate on the "password" field.

func PasswordHasPrefix

func PasswordHasPrefix(v string) predicate.User

PasswordHasPrefix applies the HasPrefix predicate on the "password" field.

func PasswordHasSuffix

func PasswordHasSuffix(v string) predicate.User

PasswordHasSuffix applies the HasSuffix predicate on the "password" field.

func PasswordIn

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

PasswordIn applies the In predicate on the "password" field.

func PasswordLT

func PasswordLT(v string) predicate.User

PasswordLT applies the LT predicate on the "password" field.

func PasswordLTE

func PasswordLTE(v string) predicate.User

PasswordLTE applies the LTE predicate on the "password" field.

func PasswordNEQ

func PasswordNEQ(v string) predicate.User

PasswordNEQ applies the NEQ predicate on the "password" field.

func PasswordNotIn

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

PasswordNotIn applies the NotIn predicate on the "password" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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