user

package
v0.0.0-...-c6aefec Latest Latest
Warning

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

Go to latest
Published: Jan 3, 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"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldUsername holds the string denoting the username field in the database.
	FieldUsername = "username"
	// FieldPassword holds the string denoting the password field in the database.
	FieldPassword = "password"
	// FieldNickName holds the string denoting the nick_name field in the database.
	FieldNickName = "nick_name"
	// FieldPhone holds the string denoting the phone field in the database.
	FieldPhone = "phone"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// EdgeRole holds the string denoting the role edge name in mutations.
	EdgeRole = "role"
	// Table holds the table name of the user in the database.
	Table = "user"
	// RoleTable is the table that holds the role relation/edge. The primary key declared below.
	RoleTable = "user_role"
	// RoleInverseTable is the table name for the Role entity.
	// It exists in this package in order to avoid circular dependency with the "role" package.
	RoleInverseTable = "role"
)

Variables

View Source
var (
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// UpdateDefaultDeletedAt holds the default value on update for the "deleted_at" field.
	UpdateDefaultDeletedAt func() time.Time
	// UsernameValidator is a validator for the "username" field. It is called by the builders before save.
	UsernameValidator func(string) error
	// PasswordValidator is a validator for the "password" field. It is called by the builders before save.
	PasswordValidator func(string) error
	// DefaultStatus holds the default value on creation for the "status" field.
	DefaultStatus string
	// IDValidator is a validator for the "id" field. It is called by the builders before save.
	IDValidator func(int) error
)

Columns holds all SQL columns for user fields.

View Source
var (
	// RolePrimaryKey and RoleColumn2 are the table columns denoting the
	// primary key for the role relation (M2M).
	RolePrimaryKey = []string{"user_id", "role_id"}
)

Functions

func And

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

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.User

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.User

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.User

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.User

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

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

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.User

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.User

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.User

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

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

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func DeletedAt

func DeletedAt(v time.Time) predicate.User

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.User

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.User

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.User

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

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

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.User

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.User

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.User

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.User

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

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

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.User

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func HasRole

func HasRole() predicate.User

HasRole applies the HasEdge predicate on the "role" edge.

func HasRoleWith

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

HasRoleWith applies the HasEdge predicate on the "role" 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 NickName

func NickName(v string) predicate.User

NickName applies equality check predicate on the "nick_name" field. It's identical to NickNameEQ.

func NickNameContains

func NickNameContains(v string) predicate.User

NickNameContains applies the Contains predicate on the "nick_name" field.

func NickNameContainsFold

func NickNameContainsFold(v string) predicate.User

NickNameContainsFold applies the ContainsFold predicate on the "nick_name" field.

func NickNameEQ

func NickNameEQ(v string) predicate.User

NickNameEQ applies the EQ predicate on the "nick_name" field.

func NickNameEqualFold

func NickNameEqualFold(v string) predicate.User

NickNameEqualFold applies the EqualFold predicate on the "nick_name" field.

func NickNameGT

func NickNameGT(v string) predicate.User

NickNameGT applies the GT predicate on the "nick_name" field.

func NickNameGTE

func NickNameGTE(v string) predicate.User

NickNameGTE applies the GTE predicate on the "nick_name" field.

func NickNameHasPrefix

func NickNameHasPrefix(v string) predicate.User

NickNameHasPrefix applies the HasPrefix predicate on the "nick_name" field.

func NickNameHasSuffix

func NickNameHasSuffix(v string) predicate.User

NickNameHasSuffix applies the HasSuffix predicate on the "nick_name" field.

func NickNameIn

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

NickNameIn applies the In predicate on the "nick_name" field.

func NickNameIsNil

func NickNameIsNil() predicate.User

NickNameIsNil applies the IsNil predicate on the "nick_name" field.

func NickNameLT

func NickNameLT(v string) predicate.User

NickNameLT applies the LT predicate on the "nick_name" field.

func NickNameLTE

func NickNameLTE(v string) predicate.User

NickNameLTE applies the LTE predicate on the "nick_name" field.

func NickNameNEQ

func NickNameNEQ(v string) predicate.User

NickNameNEQ applies the NEQ predicate on the "nick_name" field.

func NickNameNotIn

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

NickNameNotIn applies the NotIn predicate on the "nick_name" field.

func NickNameNotNil

func NickNameNotNil() predicate.User

NickNameNotNil applies the NotNil predicate on the "nick_name" 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 PasswordIsNil

func PasswordIsNil() predicate.User

PasswordIsNil applies the IsNil 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 PasswordNotNil

func PasswordNotNil() predicate.User

PasswordNotNil applies the NotNil predicate on the "password" field.

func Phone

func Phone(v string) predicate.User

Phone applies equality check predicate on the "phone" field. It's identical to PhoneEQ.

func PhoneContains

func PhoneContains(v string) predicate.User

PhoneContains applies the Contains predicate on the "phone" field.

func PhoneContainsFold

func PhoneContainsFold(v string) predicate.User

PhoneContainsFold applies the ContainsFold predicate on the "phone" field.

func PhoneEQ

func PhoneEQ(v string) predicate.User

PhoneEQ applies the EQ predicate on the "phone" field.

func PhoneEqualFold

func PhoneEqualFold(v string) predicate.User

PhoneEqualFold applies the EqualFold predicate on the "phone" field.

func PhoneGT

func PhoneGT(v string) predicate.User

PhoneGT applies the GT predicate on the "phone" field.

func PhoneGTE

func PhoneGTE(v string) predicate.User

PhoneGTE applies the GTE predicate on the "phone" field.

func PhoneHasPrefix

func PhoneHasPrefix(v string) predicate.User

PhoneHasPrefix applies the HasPrefix predicate on the "phone" field.

func PhoneHasSuffix

func PhoneHasSuffix(v string) predicate.User

PhoneHasSuffix applies the HasSuffix predicate on the "phone" field.

func PhoneIn

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

PhoneIn applies the In predicate on the "phone" field.

func PhoneIsNil

func PhoneIsNil() predicate.User

PhoneIsNil applies the IsNil predicate on the "phone" field.

func PhoneLT

func PhoneLT(v string) predicate.User

PhoneLT applies the LT predicate on the "phone" field.

func PhoneLTE

func PhoneLTE(v string) predicate.User

PhoneLTE applies the LTE predicate on the "phone" field.

func PhoneNEQ

func PhoneNEQ(v string) predicate.User

PhoneNEQ applies the NEQ predicate on the "phone" field.

func PhoneNotIn

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

PhoneNotIn applies the NotIn predicate on the "phone" field.

func PhoneNotNil

func PhoneNotNil() predicate.User

PhoneNotNil applies the NotNil predicate on the "phone" field.

func Status

func Status(v string) predicate.User

Status applies equality check predicate on the "status" field. It's identical to StatusEQ.

func StatusContains

func StatusContains(v string) predicate.User

StatusContains applies the Contains predicate on the "status" field.

func StatusContainsFold

func StatusContainsFold(v string) predicate.User

StatusContainsFold applies the ContainsFold predicate on the "status" field.

func StatusEQ

func StatusEQ(v string) predicate.User

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

func StatusEqualFold

func StatusEqualFold(v string) predicate.User

StatusEqualFold applies the EqualFold predicate on the "status" field.

func StatusGT

func StatusGT(v string) predicate.User

StatusGT applies the GT predicate on the "status" field.

func StatusGTE

func StatusGTE(v string) predicate.User

StatusGTE applies the GTE predicate on the "status" field.

func StatusHasPrefix

func StatusHasPrefix(v string) predicate.User

StatusHasPrefix applies the HasPrefix predicate on the "status" field.

func StatusHasSuffix

func StatusHasSuffix(v string) predicate.User

StatusHasSuffix applies the HasSuffix predicate on the "status" field.

func StatusIn

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

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

func StatusLT

func StatusLT(v string) predicate.User

StatusLT applies the LT predicate on the "status" field.

func StatusLTE

func StatusLTE(v string) predicate.User

StatusLTE applies the LTE predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v string) predicate.User

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

func StatusNotIn

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

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.User

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.User

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.User

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.User

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

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

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.User

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.User

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.User

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

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

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" 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

This section is empty.

Jump to

Keyboard shortcuts

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