customer

package
v1.0.1-a Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the customer type in the database.
	Label = "customer"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// 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"
	// 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"
	// EdgeOrders holds the string denoting the orders edge name in mutations.
	EdgeOrders = "orders"
	// EdgeBillingAddresses holds the string denoting the billing_addresses edge name in mutations.
	EdgeBillingAddresses = "billing_addresses"
	// EdgeDeliveryAddresses holds the string denoting the delivery_addresses edge name in mutations.
	EdgeDeliveryAddresses = "delivery_addresses"
	// EdgeTels holds the string denoting the tels edge name in mutations.
	EdgeTels = "tels"
	// EdgeCreatedBy holds the string denoting the created_by edge name in mutations.
	EdgeCreatedBy = "created_by"
	// EdgeNotes holds the string denoting the notes edge name in mutations.
	EdgeNotes = "notes"
	// EdgeLogin holds the string denoting the login edge name in mutations.
	EdgeLogin = "login"
	// Table holds the table name of the customer in the database.
	Table = "customers"
	// OrdersTable is the table that holds the orders relation/edge.
	OrdersTable = "orders"
	// OrdersInverseTable is the table name for the Order entity.
	// It exists in this package in order to avoid circular dependency with the "order" package.
	OrdersInverseTable = "orders"
	// OrdersColumn is the table column denoting the orders relation/edge.
	OrdersColumn = "customer_orders"
	// BillingAddressesTable is the table that holds the billing_addresses relation/edge.
	BillingAddressesTable = "billing_addresses"
	// BillingAddressesInverseTable is the table name for the BillingAddress entity.
	// It exists in this package in order to avoid circular dependency with the "billingaddress" package.
	BillingAddressesInverseTable = "billing_addresses"
	// BillingAddressesColumn is the table column denoting the billing_addresses relation/edge.
	BillingAddressesColumn = "customer_billing_addresses"
	// DeliveryAddressesTable is the table that holds the delivery_addresses relation/edge.
	DeliveryAddressesTable = "delivery_addresses"
	// DeliveryAddressesInverseTable is the table name for the DeliveryAddress entity.
	// It exists in this package in order to avoid circular dependency with the "deliveryaddress" package.
	DeliveryAddressesInverseTable = "delivery_addresses"
	// DeliveryAddressesColumn is the table column denoting the delivery_addresses relation/edge.
	DeliveryAddressesColumn = "customer_delivery_addresses"
	// TelsTable is the table that holds the tels relation/edge. The primary key declared below.
	TelsTable = "customer_tels"
	// TelsInverseTable is the table name for the Tel entity.
	// It exists in this package in order to avoid circular dependency with the "tel" package.
	TelsInverseTable = "tels"
	// CreatedByTable is the table that holds the created_by relation/edge.
	CreatedByTable = "customers"
	// CreatedByInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	CreatedByInverseTable = "users"
	// CreatedByColumn is the table column denoting the created_by relation/edge.
	CreatedByColumn = "customer_created_by"
	// NotesTable is the table that holds the notes relation/edge.
	NotesTable = "notes"
	// NotesInverseTable is the table name for the Note entity.
	// It exists in this package in order to avoid circular dependency with the "note" package.
	NotesInverseTable = "notes"
	// NotesColumn is the table column denoting the notes relation/edge.
	NotesColumn = "customer_notes"
	// LoginTable is the table that holds the login relation/edge.
	LoginTable = "customers"
	// LoginInverseTable is the table name for the Login entity.
	// It exists in this package in order to avoid circular dependency with the "login" package.
	LoginInverseTable = "logins"
	// LoginColumn is the table column denoting the login relation/edge.
	LoginColumn = "customer_login"
)

Variables

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// EmailValidator is a validator for the "email" field. It is called by the builders before save.
	EmailValidator func(string) error
	// PasswordValidator is a validator for the "password" field. It is called by the builders before save.
	PasswordValidator func(string) error
	// 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
)

Columns holds all SQL columns for customer fields.

View Source
var ForeignKeys = []string{
	"customer_created_by",
	"customer_login",
}

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

View Source
var (
	// TelsPrimaryKey and TelsColumn2 are the table columns denoting the
	// primary key for the tels relation (M2M).
	TelsPrimaryKey = []string{"customer_id", "tel_id"}
)

Functions

func And

func And(predicates ...predicate.Customer) predicate.Customer

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Customer

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Customer

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Customer

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Customer

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Customer

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Customer

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Customer

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

func CreatedAtNotIn

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

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

func Email

func Email(v string) predicate.Customer

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

func EmailContains

func EmailContains(v string) predicate.Customer

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

func EmailContainsFold

func EmailContainsFold(v string) predicate.Customer

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

func EmailEQ

func EmailEQ(v string) predicate.Customer

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

func EmailEqualFold

func EmailEqualFold(v string) predicate.Customer

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

func EmailGT

func EmailGT(v string) predicate.Customer

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

func EmailGTE

func EmailGTE(v string) predicate.Customer

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

func EmailHasPrefix

func EmailHasPrefix(v string) predicate.Customer

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

func EmailHasSuffix

func EmailHasSuffix(v string) predicate.Customer

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

func EmailIn

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

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

func EmailLT

func EmailLT(v string) predicate.Customer

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

func EmailLTE

func EmailLTE(v string) predicate.Customer

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

func EmailNEQ

func EmailNEQ(v string) predicate.Customer

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

func EmailNotIn

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

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

func HasBillingAddresses

func HasBillingAddresses() predicate.Customer

HasBillingAddresses applies the HasEdge predicate on the "billing_addresses" edge.

func HasBillingAddressesWith

func HasBillingAddressesWith(preds ...predicate.BillingAddress) predicate.Customer

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

func HasCreatedBy

func HasCreatedBy() predicate.Customer

HasCreatedBy applies the HasEdge predicate on the "created_by" edge.

func HasCreatedByWith

func HasCreatedByWith(preds ...predicate.User) predicate.Customer

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

func HasDeliveryAddresses

func HasDeliveryAddresses() predicate.Customer

HasDeliveryAddresses applies the HasEdge predicate on the "delivery_addresses" edge.

func HasDeliveryAddressesWith

func HasDeliveryAddressesWith(preds ...predicate.DeliveryAddress) predicate.Customer

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

func HasLogin

func HasLogin() predicate.Customer

HasLogin applies the HasEdge predicate on the "login" edge.

func HasLoginWith

func HasLoginWith(preds ...predicate.Login) predicate.Customer

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

func HasNotes

func HasNotes() predicate.Customer

HasNotes applies the HasEdge predicate on the "notes" edge.

func HasNotesWith

func HasNotesWith(preds ...predicate.Note) predicate.Customer

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

func HasOrders

func HasOrders() predicate.Customer

HasOrders applies the HasEdge predicate on the "orders" edge.

func HasOrdersWith

func HasOrdersWith(preds ...predicate.Order) predicate.Customer

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

func HasTels

func HasTels() predicate.Customer

HasTels applies the HasEdge predicate on the "tels" edge.

func HasTelsWith

func HasTelsWith(preds ...predicate.Tel) predicate.Customer

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

func ID

func ID(id int) predicate.Customer

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Customer

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Customer

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Customer

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Customer

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Customer

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Customer

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Customer

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

func NameContains

func NameContains(v string) predicate.Customer

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

func NameContainsFold

func NameContainsFold(v string) predicate.Customer

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

func NameEQ

func NameEQ(v string) predicate.Customer

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

func NameEqualFold

func NameEqualFold(v string) predicate.Customer

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

func NameGT

func NameGT(v string) predicate.Customer

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

func NameGTE

func NameGTE(v string) predicate.Customer

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Customer

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Customer

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Customer

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

func NameLTE

func NameLTE(v string) predicate.Customer

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

func NameNEQ

func NameNEQ(v string) predicate.Customer

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

func NameNotIn

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

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.Customer) predicate.Customer

Or groups predicates with the OR operator between them.

func Password

func Password(v string) predicate.Customer

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

func PasswordContains

func PasswordContains(v string) predicate.Customer

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

func PasswordContainsFold

func PasswordContainsFold(v string) predicate.Customer

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

func PasswordEQ

func PasswordEQ(v string) predicate.Customer

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

func PasswordEqualFold

func PasswordEqualFold(v string) predicate.Customer

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

func PasswordGT

func PasswordGT(v string) predicate.Customer

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

func PasswordGTE

func PasswordGTE(v string) predicate.Customer

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

func PasswordHasPrefix

func PasswordHasPrefix(v string) predicate.Customer

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

func PasswordHasSuffix

func PasswordHasSuffix(v string) predicate.Customer

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

func PasswordIn

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

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

func PasswordLT

func PasswordLT(v string) predicate.Customer

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

func PasswordLTE

func PasswordLTE(v string) predicate.Customer

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

func PasswordNEQ

func PasswordNEQ(v string) predicate.Customer

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

func PasswordNotIn

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

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Customer

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Customer

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Customer

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Customer

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Customer

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Customer

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Customer

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

func UpdatedAtNotIn

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

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).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Customer queries.

func ByBillingAddresses

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

ByBillingAddresses orders the results by billing_addresses terms.

func ByBillingAddressesCount

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

ByBillingAddressesCount orders the results by billing_addresses count.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCreatedByField

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

ByCreatedByField orders the results by created_by field.

func ByDeliveryAddresses

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

ByDeliveryAddresses orders the results by delivery_addresses terms.

func ByDeliveryAddressesCount

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

ByDeliveryAddressesCount orders the results by delivery_addresses count.

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 ByLoginField

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

ByLoginField orders the results by login field.

func ByName

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

ByName orders the results by the name field.

func ByNotes

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

ByNotes orders the results by notes terms.

func ByNotesCount

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

ByNotesCount orders the results by notes count.

func ByOrders

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

ByOrders orders the results by orders terms.

func ByOrdersCount

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

ByOrdersCount orders the results by orders count.

func ByPassword

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

ByPassword orders the results by the password field.

func ByTels

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

ByTels orders the results by tels terms.

func ByTelsCount

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

ByTelsCount orders the results by tels count.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

Jump to

Keyboard shortcuts

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