user

package
v0.0.0-...-9bd63dd Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT, MIT Imports: 6 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"
	// FieldCreatedBy holds the string denoting the created_by field in the database.
	FieldCreatedBy = "created_by"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldUpdatedBy holds the string denoting the updated_by field in the database.
	FieldUpdatedBy = "updated_by"
	// FieldUID holds the string denoting the uid field in the database.
	FieldUID = "uid"
	// FieldNickname holds the string denoting the nickname field in the database.
	FieldNickname = "nickname"
	// FieldAvatar holds the string denoting the avatar field in the database.
	FieldAvatar = "avatar"
	// FieldGender holds the string denoting the gender field in the database.
	FieldGender = "gender"
	// FieldRemark holds the string denoting the remark field in the database.
	FieldRemark = "remark"
	// EdgeRoles holds the string denoting the roles edge name in mutations.
	EdgeRoles = "roles"
	// Table holds the table name of the user in the database.
	Table = "sys_user"
	// RolesTable is the table that holds the roles relation/edge.
	RolesTable = "sys_role"
	// 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 = "sys_role"
	// RolesColumn is the table column denoting the roles relation/edge.
	RolesColumn = "user_roles"
)
View Source
const DefaultGender = GenderUnknow

GenderUnknow is the default value of the Gender enum.

Variables

View Source
var (
	Hooks [1]ent.Hook
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultCreatedBy holds the default value on creation for the "created_by" field.
	DefaultCreatedBy int64
	// 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
	// DefaultUpdatedBy holds the default value on creation for the "updated_by" field.
	DefaultUpdatedBy int64
	// DefaultUID holds the default value on creation for the "uid" field.
	DefaultUID int64
	// DefaultNickname holds the default value on creation for the "nickname" field.
	DefaultNickname string
	// DefaultAvatar holds the default value on creation for the "avatar" field.
	DefaultAvatar string
	// DefaultRemark holds the default value on creation for the "remark" field.
	DefaultRemark string
)

Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:

import _ "github.com/lalifeier/vvgo-mall/app/shop/admin/internal/data/ent/runtime"

Columns holds all SQL columns for user fields.

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 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 CreatedBy

func CreatedBy(v int64) predicate.User

CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.

func CreatedByEQ

func CreatedByEQ(v int64) predicate.User

CreatedByEQ applies the EQ predicate on the "created_by" field.

func CreatedByGT

func CreatedByGT(v int64) predicate.User

CreatedByGT applies the GT predicate on the "created_by" field.

func CreatedByGTE

func CreatedByGTE(v int64) predicate.User

CreatedByGTE applies the GTE predicate on the "created_by" field.

func CreatedByIn

func CreatedByIn(vs ...int64) predicate.User

CreatedByIn applies the In predicate on the "created_by" field.

func CreatedByLT

func CreatedByLT(v int64) predicate.User

CreatedByLT applies the LT predicate on the "created_by" field.

func CreatedByLTE

func CreatedByLTE(v int64) predicate.User

CreatedByLTE applies the LTE predicate on the "created_by" field.

func CreatedByNEQ

func CreatedByNEQ(v int64) predicate.User

CreatedByNEQ applies the NEQ predicate on the "created_by" field.

func CreatedByNotIn

func CreatedByNotIn(vs ...int64) predicate.User

CreatedByNotIn applies the NotIn predicate on the "created_by" field.

func GenderEQ

func GenderEQ(v Gender) predicate.User

GenderEQ applies the EQ predicate on the "gender" field.

func GenderIn

func GenderIn(vs ...Gender) predicate.User

GenderIn applies the In predicate on the "gender" field.

func GenderNEQ

func GenderNEQ(v Gender) predicate.User

GenderNEQ applies the NEQ predicate on the "gender" field.

func GenderNotIn

func GenderNotIn(vs ...Gender) predicate.User

GenderNotIn applies the NotIn predicate on the "gender" field.

func GenderValidator

func GenderValidator(ge Gender) error

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

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 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 Remark

func Remark(v string) predicate.User

Remark applies equality check predicate on the "remark" field. It's identical to RemarkEQ.

func RemarkContains

func RemarkContains(v string) predicate.User

RemarkContains applies the Contains predicate on the "remark" field.

func RemarkContainsFold

func RemarkContainsFold(v string) predicate.User

RemarkContainsFold applies the ContainsFold predicate on the "remark" field.

func RemarkEQ

func RemarkEQ(v string) predicate.User

RemarkEQ applies the EQ predicate on the "remark" field.

func RemarkEqualFold

func RemarkEqualFold(v string) predicate.User

RemarkEqualFold applies the EqualFold predicate on the "remark" field.

func RemarkGT

func RemarkGT(v string) predicate.User

RemarkGT applies the GT predicate on the "remark" field.

func RemarkGTE

func RemarkGTE(v string) predicate.User

RemarkGTE applies the GTE predicate on the "remark" field.

func RemarkHasPrefix

func RemarkHasPrefix(v string) predicate.User

RemarkHasPrefix applies the HasPrefix predicate on the "remark" field.

func RemarkHasSuffix

func RemarkHasSuffix(v string) predicate.User

RemarkHasSuffix applies the HasSuffix predicate on the "remark" field.

func RemarkIn

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

RemarkIn applies the In predicate on the "remark" field.

func RemarkLT

func RemarkLT(v string) predicate.User

RemarkLT applies the LT predicate on the "remark" field.

func RemarkLTE

func RemarkLTE(v string) predicate.User

RemarkLTE applies the LTE predicate on the "remark" field.

func RemarkNEQ

func RemarkNEQ(v string) predicate.User

RemarkNEQ applies the NEQ predicate on the "remark" field.

func RemarkNotIn

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

RemarkNotIn applies the NotIn predicate on the "remark" field.

func UID

func UID(v int64) predicate.User

UID applies equality check predicate on the "uid" field. It's identical to UIDEQ.

func UIDEQ

func UIDEQ(v int64) predicate.User

UIDEQ applies the EQ predicate on the "uid" field.

func UIDGT

func UIDGT(v int64) predicate.User

UIDGT applies the GT predicate on the "uid" field.

func UIDGTE

func UIDGTE(v int64) predicate.User

UIDGTE applies the GTE predicate on the "uid" field.

func UIDIn

func UIDIn(vs ...int64) predicate.User

UIDIn applies the In predicate on the "uid" field.

func UIDLT

func UIDLT(v int64) predicate.User

UIDLT applies the LT predicate on the "uid" field.

func UIDLTE

func UIDLTE(v int64) predicate.User

UIDLTE applies the LTE predicate on the "uid" field.

func UIDNEQ

func UIDNEQ(v int64) predicate.User

UIDNEQ applies the NEQ predicate on the "uid" field.

func UIDNotIn

func UIDNotIn(vs ...int64) predicate.User

UIDNotIn applies the NotIn predicate on the "uid" 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 UpdatedBy

func UpdatedBy(v int64) predicate.User

UpdatedBy applies equality check predicate on the "updated_by" field. It's identical to UpdatedByEQ.

func UpdatedByEQ

func UpdatedByEQ(v int64) predicate.User

UpdatedByEQ applies the EQ predicate on the "updated_by" field.

func UpdatedByGT

func UpdatedByGT(v int64) predicate.User

UpdatedByGT applies the GT predicate on the "updated_by" field.

func UpdatedByGTE

func UpdatedByGTE(v int64) predicate.User

UpdatedByGTE applies the GTE predicate on the "updated_by" field.

func UpdatedByIn

func UpdatedByIn(vs ...int64) predicate.User

UpdatedByIn applies the In predicate on the "updated_by" field.

func UpdatedByLT

func UpdatedByLT(v int64) predicate.User

UpdatedByLT applies the LT predicate on the "updated_by" field.

func UpdatedByLTE

func UpdatedByLTE(v int64) predicate.User

UpdatedByLTE applies the LTE predicate on the "updated_by" field.

func UpdatedByNEQ

func UpdatedByNEQ(v int64) predicate.User

UpdatedByNEQ applies the NEQ predicate on the "updated_by" field.

func UpdatedByNotIn

func UpdatedByNotIn(vs ...int64) predicate.User

UpdatedByNotIn applies the NotIn predicate on the "updated_by" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type Gender

type Gender string

Gender defines the type for the "gender" enum field.

const (
	GenderMale   Gender = "male"
	GenderFemale Gender = "female"
	GenderUnknow Gender = "unknow"
)

Gender values.

func (Gender) String

func (ge Gender) String() string

Jump to

Keyboard shortcuts

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