person

package
v0.0.0-...-05e3429 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the person type in the database.
	Label = "person"
	// 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"
	// FieldAvatarURL holds the string denoting the avatar_url field in the database.
	FieldAvatarURL = "avatar_url"
	// FieldEmail holds the string denoting the email field in the database.
	FieldEmail = "email"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldPhone holds the string denoting the phone field in the database.
	FieldPhone = "phone"
	// FieldRole holds the string denoting the role field in the database.
	FieldRole = "role"
	// FieldPasswordHash holds the string denoting the password_hash field in the database.
	FieldPasswordHash = "password_hash"
	// FieldIsEmailVerified holds the string denoting the is_email_verified field in the database.
	FieldIsEmailVerified = "is_email_verified"
	// FieldIsPhoneVerified holds the string denoting the is_phone_verified field in the database.
	FieldIsPhoneVerified = "is_phone_verified"
	// FieldWorkUnitID holds the string denoting the work_unit_id field in the database.
	FieldWorkUnitID = "work_unit_id"
	// EdgeWorkUnit holds the string denoting the work_unit edge name in mutations.
	EdgeWorkUnit = "work_unit"
	// EdgeAddresses holds the string denoting the addresses edge name in mutations.
	EdgeAddresses = "addresses"
	// EdgePersonAddresses holds the string denoting the person_addresses edge name in mutations.
	EdgePersonAddresses = "person_addresses"
	// Table holds the table name of the person in the database.
	Table = "persons"
	// WorkUnitTable is the table that holds the work_unit relation/edge.
	WorkUnitTable = "persons"
	// WorkUnitInverseTable is the table name for the WorkUnitInfo entity.
	// It exists in this package in order to avoid circular dependency with the "workunitinfo" package.
	WorkUnitInverseTable = "work_unit_info"
	// WorkUnitColumn is the table column denoting the work_unit relation/edge.
	WorkUnitColumn = "work_unit_id"
	// AddressesTable is the table that holds the addresses relation/edge. The primary key declared below.
	AddressesTable = "person_addresses"
	// AddressesInverseTable is the table name for the Address entity.
	// It exists in this package in order to avoid circular dependency with the "address" package.
	AddressesInverseTable = "addresses"
	// PersonAddressesTable is the table that holds the person_addresses relation/edge.
	PersonAddressesTable = "person_addresses"
	// PersonAddressesInverseTable is the table name for the PersonAddress entity.
	// It exists in this package in order to avoid circular dependency with the "personaddress" package.
	PersonAddressesInverseTable = "person_addresses"
	// PersonAddressesColumn is the table column denoting the person_addresses relation/edge.
	PersonAddressesColumn = "person_id"
)
View Source
const DefaultRole = RoleCustomer

RoleCustomer is the default value of the Role enum.

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
	// AvatarURLValidator is a validator for the "avatar_url" field. It is called by the builders before save.
	AvatarURLValidator func(string) error
	// EmailValidator is a validator for the "email" field. It is called by the builders before save.
	EmailValidator func(string) error
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// PhoneValidator is a validator for the "phone" field. It is called by the builders before save.
	PhoneValidator func(string) error
	// PasswordHashValidator is a validator for the "password_hash" field. It is called by the builders before save.
	PasswordHashValidator func([]byte) error
	// DefaultIsEmailVerified holds the default value on creation for the "is_email_verified" field.
	DefaultIsEmailVerified bool
	// DefaultIsPhoneVerified holds the default value on creation for the "is_phone_verified" field.
	DefaultIsPhoneVerified bool
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)
View Source
var (
	// AddressesPrimaryKey and AddressesColumn2 are the table columns denoting the
	// primary key for the addresses relation (M2M).
	AddressesPrimaryKey = []string{"person_id", "address_id"}
)

Columns holds all SQL columns for person fields.

Functions

func And

func And(predicates ...predicate.Person) predicate.Person

And groups predicates with the AND operator between them.

func AvatarURL

func AvatarURL(v string) predicate.Person

AvatarURL applies equality check predicate on the "avatar_url" field. It's identical to AvatarURLEQ.

func AvatarURLContains

func AvatarURLContains(v string) predicate.Person

AvatarURLContains applies the Contains predicate on the "avatar_url" field.

func AvatarURLContainsFold

func AvatarURLContainsFold(v string) predicate.Person

AvatarURLContainsFold applies the ContainsFold predicate on the "avatar_url" field.

func AvatarURLEQ

func AvatarURLEQ(v string) predicate.Person

AvatarURLEQ applies the EQ predicate on the "avatar_url" field.

func AvatarURLEqualFold

func AvatarURLEqualFold(v string) predicate.Person

AvatarURLEqualFold applies the EqualFold predicate on the "avatar_url" field.

func AvatarURLGT

func AvatarURLGT(v string) predicate.Person

AvatarURLGT applies the GT predicate on the "avatar_url" field.

func AvatarURLGTE

func AvatarURLGTE(v string) predicate.Person

AvatarURLGTE applies the GTE predicate on the "avatar_url" field.

func AvatarURLHasPrefix

func AvatarURLHasPrefix(v string) predicate.Person

AvatarURLHasPrefix applies the HasPrefix predicate on the "avatar_url" field.

func AvatarURLHasSuffix

func AvatarURLHasSuffix(v string) predicate.Person

AvatarURLHasSuffix applies the HasSuffix predicate on the "avatar_url" field.

func AvatarURLIn

func AvatarURLIn(vs ...string) predicate.Person

AvatarURLIn applies the In predicate on the "avatar_url" field.

func AvatarURLIsNil

func AvatarURLIsNil() predicate.Person

AvatarURLIsNil applies the IsNil predicate on the "avatar_url" field.

func AvatarURLLT

func AvatarURLLT(v string) predicate.Person

AvatarURLLT applies the LT predicate on the "avatar_url" field.

func AvatarURLLTE

func AvatarURLLTE(v string) predicate.Person

AvatarURLLTE applies the LTE predicate on the "avatar_url" field.

func AvatarURLNEQ

func AvatarURLNEQ(v string) predicate.Person

AvatarURLNEQ applies the NEQ predicate on the "avatar_url" field.

func AvatarURLNotIn

func AvatarURLNotIn(vs ...string) predicate.Person

AvatarURLNotIn applies the NotIn predicate on the "avatar_url" field.

func AvatarURLNotNil

func AvatarURLNotNil() predicate.Person

AvatarURLNotNil applies the NotNil predicate on the "avatar_url" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Person

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Person

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Person

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Person

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Person

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Person

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Person

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

func CreatedAtNotIn

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

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

func Email

func Email(v string) predicate.Person

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

func EmailContains

func EmailContains(v string) predicate.Person

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

func EmailContainsFold

func EmailContainsFold(v string) predicate.Person

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

func EmailEQ

func EmailEQ(v string) predicate.Person

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

func EmailEqualFold

func EmailEqualFold(v string) predicate.Person

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

func EmailGT

func EmailGT(v string) predicate.Person

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

func EmailGTE

func EmailGTE(v string) predicate.Person

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

func EmailHasPrefix

func EmailHasPrefix(v string) predicate.Person

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

func EmailHasSuffix

func EmailHasSuffix(v string) predicate.Person

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

func EmailIn

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

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

func EmailLT

func EmailLT(v string) predicate.Person

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

func EmailLTE

func EmailLTE(v string) predicate.Person

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

func EmailNEQ

func EmailNEQ(v string) predicate.Person

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

func EmailNotIn

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

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

func HasAddresses

func HasAddresses() predicate.Person

HasAddresses applies the HasEdge predicate on the "addresses" edge.

func HasAddressesWith

func HasAddressesWith(preds ...predicate.Address) predicate.Person

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

func HasPersonAddresses

func HasPersonAddresses() predicate.Person

HasPersonAddresses applies the HasEdge predicate on the "person_addresses" edge.

func HasPersonAddressesWith

func HasPersonAddressesWith(preds ...predicate.PersonAddress) predicate.Person

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

func HasWorkUnit

func HasWorkUnit() predicate.Person

HasWorkUnit applies the HasEdge predicate on the "work_unit" edge.

func HasWorkUnitWith

func HasWorkUnitWith(preds ...predicate.WorkUnitInfo) predicate.Person

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

func ID

func ID(id uuid.UUID) predicate.Person

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Person

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Person

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Person

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Person

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Person

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Person

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Person

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Person

IDNotIn applies the NotIn predicate on the ID field.

func IsEmailVerified

func IsEmailVerified(v bool) predicate.Person

IsEmailVerified applies equality check predicate on the "is_email_verified" field. It's identical to IsEmailVerifiedEQ.

func IsEmailVerifiedEQ

func IsEmailVerifiedEQ(v bool) predicate.Person

IsEmailVerifiedEQ applies the EQ predicate on the "is_email_verified" field.

func IsEmailVerifiedNEQ

func IsEmailVerifiedNEQ(v bool) predicate.Person

IsEmailVerifiedNEQ applies the NEQ predicate on the "is_email_verified" field.

func IsPhoneVerified

func IsPhoneVerified(v bool) predicate.Person

IsPhoneVerified applies equality check predicate on the "is_phone_verified" field. It's identical to IsPhoneVerifiedEQ.

func IsPhoneVerifiedEQ

func IsPhoneVerifiedEQ(v bool) predicate.Person

IsPhoneVerifiedEQ applies the EQ predicate on the "is_phone_verified" field.

func IsPhoneVerifiedNEQ

func IsPhoneVerifiedNEQ(v bool) predicate.Person

IsPhoneVerifiedNEQ applies the NEQ predicate on the "is_phone_verified" field.

func Name

func Name(v string) predicate.Person

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Person

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Person

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Person

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Person

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Person

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Person

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Person

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Person

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Person

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Person

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Person

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Person

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Person

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Person) predicate.Person

Or groups predicates with the OR operator between them.

func PasswordHash

func PasswordHash(v []byte) predicate.Person

PasswordHash applies equality check predicate on the "password_hash" field. It's identical to PasswordHashEQ.

func PasswordHashEQ

func PasswordHashEQ(v []byte) predicate.Person

PasswordHashEQ applies the EQ predicate on the "password_hash" field.

func PasswordHashGT

func PasswordHashGT(v []byte) predicate.Person

PasswordHashGT applies the GT predicate on the "password_hash" field.

func PasswordHashGTE

func PasswordHashGTE(v []byte) predicate.Person

PasswordHashGTE applies the GTE predicate on the "password_hash" field.

func PasswordHashIn

func PasswordHashIn(vs ...[]byte) predicate.Person

PasswordHashIn applies the In predicate on the "password_hash" field.

func PasswordHashIsNil

func PasswordHashIsNil() predicate.Person

PasswordHashIsNil applies the IsNil predicate on the "password_hash" field.

func PasswordHashLT

func PasswordHashLT(v []byte) predicate.Person

PasswordHashLT applies the LT predicate on the "password_hash" field.

func PasswordHashLTE

func PasswordHashLTE(v []byte) predicate.Person

PasswordHashLTE applies the LTE predicate on the "password_hash" field.

func PasswordHashNEQ

func PasswordHashNEQ(v []byte) predicate.Person

PasswordHashNEQ applies the NEQ predicate on the "password_hash" field.

func PasswordHashNotIn

func PasswordHashNotIn(vs ...[]byte) predicate.Person

PasswordHashNotIn applies the NotIn predicate on the "password_hash" field.

func PasswordHashNotNil

func PasswordHashNotNil() predicate.Person

PasswordHashNotNil applies the NotNil predicate on the "password_hash" field.

func Phone

func Phone(v string) predicate.Person

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

func PhoneContains

func PhoneContains(v string) predicate.Person

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

func PhoneContainsFold

func PhoneContainsFold(v string) predicate.Person

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

func PhoneEQ

func PhoneEQ(v string) predicate.Person

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

func PhoneEqualFold

func PhoneEqualFold(v string) predicate.Person

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

func PhoneGT

func PhoneGT(v string) predicate.Person

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

func PhoneGTE

func PhoneGTE(v string) predicate.Person

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

func PhoneHasPrefix

func PhoneHasPrefix(v string) predicate.Person

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

func PhoneHasSuffix

func PhoneHasSuffix(v string) predicate.Person

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

func PhoneIn

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

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

func PhoneIsNil

func PhoneIsNil() predicate.Person

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

func PhoneLT

func PhoneLT(v string) predicate.Person

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

func PhoneLTE

func PhoneLTE(v string) predicate.Person

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

func PhoneNEQ

func PhoneNEQ(v string) predicate.Person

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

func PhoneNotIn

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

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

func PhoneNotNil

func PhoneNotNil() predicate.Person

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

func RoleEQ

func RoleEQ(v Role) predicate.Person

RoleEQ applies the EQ predicate on the "role" field.

func RoleIn

func RoleIn(vs ...Role) predicate.Person

RoleIn applies the In predicate on the "role" field.

func RoleNEQ

func RoleNEQ(v Role) predicate.Person

RoleNEQ applies the NEQ predicate on the "role" field.

func RoleNotIn

func RoleNotIn(vs ...Role) predicate.Person

RoleNotIn applies the NotIn predicate on the "role" field.

func RoleValidator

func RoleValidator(r Role) error

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Person

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Person

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Person

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Person

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Person

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Person

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Person

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

func UpdatedAtNotIn

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

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

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

func WorkUnitID

func WorkUnitID(v uuid.UUID) predicate.Person

WorkUnitID applies equality check predicate on the "work_unit_id" field. It's identical to WorkUnitIDEQ.

func WorkUnitIDEQ

func WorkUnitIDEQ(v uuid.UUID) predicate.Person

WorkUnitIDEQ applies the EQ predicate on the "work_unit_id" field.

func WorkUnitIDIn

func WorkUnitIDIn(vs ...uuid.UUID) predicate.Person

WorkUnitIDIn applies the In predicate on the "work_unit_id" field.

func WorkUnitIDIsNil

func WorkUnitIDIsNil() predicate.Person

WorkUnitIDIsNil applies the IsNil predicate on the "work_unit_id" field.

func WorkUnitIDNEQ

func WorkUnitIDNEQ(v uuid.UUID) predicate.Person

WorkUnitIDNEQ applies the NEQ predicate on the "work_unit_id" field.

func WorkUnitIDNotIn

func WorkUnitIDNotIn(vs ...uuid.UUID) predicate.Person

WorkUnitIDNotIn applies the NotIn predicate on the "work_unit_id" field.

func WorkUnitIDNotNil

func WorkUnitIDNotNil() predicate.Person

WorkUnitIDNotNil applies the NotNil predicate on the "work_unit_id" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Person queries.

func ByAddresses

func ByAddresses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByAddresses orders the results by addresses terms.

func ByAddressesCount

func ByAddressesCount(opts ...sql.OrderTermOption) OrderOption

ByAddressesCount orders the results by addresses count.

func ByAvatarURL

func ByAvatarURL(opts ...sql.OrderTermOption) OrderOption

ByAvatarURL orders the results by the avatar_url field.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByEmail

func ByEmail(opts ...sql.OrderTermOption) OrderOption

ByEmail orders the results by the email field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByIsEmailVerified

func ByIsEmailVerified(opts ...sql.OrderTermOption) OrderOption

ByIsEmailVerified orders the results by the is_email_verified field.

func ByIsPhoneVerified

func ByIsPhoneVerified(opts ...sql.OrderTermOption) OrderOption

ByIsPhoneVerified orders the results by the is_phone_verified field.

func ByName

func ByName(opts ...sql.OrderTermOption) OrderOption

ByName orders the results by the name field.

func ByPersonAddresses

func ByPersonAddresses(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByPersonAddresses orders the results by person_addresses terms.

func ByPersonAddressesCount

func ByPersonAddressesCount(opts ...sql.OrderTermOption) OrderOption

ByPersonAddressesCount orders the results by person_addresses count.

func ByPhone

func ByPhone(opts ...sql.OrderTermOption) OrderOption

ByPhone orders the results by the phone field.

func ByRole

func ByRole(opts ...sql.OrderTermOption) OrderOption

ByRole orders the results by the role field.

func ByUpdatedAt

func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption

ByUpdatedAt orders the results by the updated_at field.

func ByWorkUnitField

func ByWorkUnitField(field string, opts ...sql.OrderTermOption) OrderOption

ByWorkUnitField orders the results by work_unit field.

func ByWorkUnitID

func ByWorkUnitID(opts ...sql.OrderTermOption) OrderOption

ByWorkUnitID orders the results by the work_unit_id field.

type Role

type Role string

Role defines the type for the "role" enum field.

const (
	RoleSalesperson Role = "SALESPERSON"
	RoleCustomer    Role = "CUSTOMER"
	RoleWarehouse   Role = "WAREHOUSE"
	RoleDelivery    Role = "DELIVERY"
	RoleManagement  Role = "MANAGEMENT"
)

Role values.

func (Role) String

func (r Role) String() string

Jump to

Keyboard shortcuts

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