shipment

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 shipment type in the database.
	Label = "shipment"
	// 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"
	// FieldOrderID holds the string denoting the order_id field in the database.
	FieldOrderID = "order_id"
	// FieldInvoiceID holds the string denoting the invoice_id field in the database.
	FieldInvoiceID = "invoice_id"
	// FieldStaffID holds the string denoting the staff_id field in the database.
	FieldStaffID = "staff_id"
	// FieldShipmentDate holds the string denoting the shipment_date field in the database.
	FieldShipmentDate = "shipment_date"
	// FieldNote holds the string denoting the note field in the database.
	FieldNote = "note"
	// FieldStatusCode holds the string denoting the status_code field in the database.
	FieldStatusCode = "status_code"
	// EdgeOrder holds the string denoting the order edge name in mutations.
	EdgeOrder = "order"
	// EdgeInvoice holds the string denoting the invoice edge name in mutations.
	EdgeInvoice = "invoice"
	// EdgeStaff holds the string denoting the staff edge name in mutations.
	EdgeStaff = "staff"
	// EdgeShipmentStatus holds the string denoting the shipment_status edge name in mutations.
	EdgeShipmentStatus = "shipment_status"
	// Table holds the table name of the shipment in the database.
	Table = "shipments"
	// OrderTable is the table that holds the order relation/edge.
	OrderTable = "shipments"
	// OrderInverseTable is the table name for the Order entity.
	// It exists in this package in order to avoid circular dependency with the "order" package.
	OrderInverseTable = "orders"
	// OrderColumn is the table column denoting the order relation/edge.
	OrderColumn = "order_id"
	// InvoiceTable is the table that holds the invoice relation/edge.
	InvoiceTable = "shipments"
	// InvoiceInverseTable is the table name for the Invoice entity.
	// It exists in this package in order to avoid circular dependency with the "invoice" package.
	InvoiceInverseTable = "invoices"
	// InvoiceColumn is the table column denoting the invoice relation/edge.
	InvoiceColumn = "invoice_id"
	// StaffTable is the table that holds the staff relation/edge.
	StaffTable = "shipments"
	// StaffInverseTable is the table name for the Person entity.
	// It exists in this package in order to avoid circular dependency with the "person" package.
	StaffInverseTable = "persons"
	// StaffColumn is the table column denoting the staff relation/edge.
	StaffColumn = "staff_id"
	// ShipmentStatusTable is the table that holds the shipment_status relation/edge.
	ShipmentStatusTable = "shipments"
	// ShipmentStatusInverseTable is the table name for the ShipmentStatusCode entity.
	// It exists in this package in order to avoid circular dependency with the "shipmentstatuscode" package.
	ShipmentStatusInverseTable = "shipment_status_codes"
	// ShipmentStatusColumn is the table column denoting the shipment_status relation/edge.
	ShipmentStatusColumn = "status_code"
)

Variables

View Source
var (
	Hooks [1]ent.Hook
	// 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
	// DefaultStatusCode holds the default value on creation for the "status_code" field.
	DefaultStatusCode int
	// IDValidator is a validator for the "id" field. It is called by the builders before save.
	IDValidator func(string) error
)

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/thaiha1607/foursquare_server/ent/runtime"

Columns holds all SQL columns for shipment fields.

Functions

func And

func And(predicates ...predicate.Shipment) predicate.Shipment

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Shipment

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Shipment

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Shipment

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Shipment

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Shipment

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Shipment

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Shipment

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

func CreatedAtNotIn

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

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

func HasInvoice

func HasInvoice() predicate.Shipment

HasInvoice applies the HasEdge predicate on the "invoice" edge.

func HasInvoiceWith

func HasInvoiceWith(preds ...predicate.Invoice) predicate.Shipment

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

func HasOrder

func HasOrder() predicate.Shipment

HasOrder applies the HasEdge predicate on the "order" edge.

func HasOrderWith

func HasOrderWith(preds ...predicate.Order) predicate.Shipment

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

func HasShipmentStatus

func HasShipmentStatus() predicate.Shipment

HasShipmentStatus applies the HasEdge predicate on the "shipment_status" edge.

func HasShipmentStatusWith

func HasShipmentStatusWith(preds ...predicate.ShipmentStatusCode) predicate.Shipment

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

func HasStaff

func HasStaff() predicate.Shipment

HasStaff applies the HasEdge predicate on the "staff" edge.

func HasStaffWith

func HasStaffWith(preds ...predicate.Person) predicate.Shipment

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

func ID

func ID(id string) predicate.Shipment

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.Shipment

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.Shipment

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.Shipment

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Shipment

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Shipment

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.Shipment

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Shipment

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Shipment

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Shipment

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.Shipment

IDNotIn applies the NotIn predicate on the ID field.

func InvoiceID

func InvoiceID(v uuid.UUID) predicate.Shipment

InvoiceID applies equality check predicate on the "invoice_id" field. It's identical to InvoiceIDEQ.

func InvoiceIDEQ

func InvoiceIDEQ(v uuid.UUID) predicate.Shipment

InvoiceIDEQ applies the EQ predicate on the "invoice_id" field.

func InvoiceIDIn

func InvoiceIDIn(vs ...uuid.UUID) predicate.Shipment

InvoiceIDIn applies the In predicate on the "invoice_id" field.

func InvoiceIDNEQ

func InvoiceIDNEQ(v uuid.UUID) predicate.Shipment

InvoiceIDNEQ applies the NEQ predicate on the "invoice_id" field.

func InvoiceIDNotIn

func InvoiceIDNotIn(vs ...uuid.UUID) predicate.Shipment

InvoiceIDNotIn applies the NotIn predicate on the "invoice_id" field.

func Not

Not applies the not operator on the given predicate.

func Note

func Note(v string) predicate.Shipment

Note applies equality check predicate on the "note" field. It's identical to NoteEQ.

func NoteContains

func NoteContains(v string) predicate.Shipment

NoteContains applies the Contains predicate on the "note" field.

func NoteContainsFold

func NoteContainsFold(v string) predicate.Shipment

NoteContainsFold applies the ContainsFold predicate on the "note" field.

func NoteEQ

func NoteEQ(v string) predicate.Shipment

NoteEQ applies the EQ predicate on the "note" field.

func NoteEqualFold

func NoteEqualFold(v string) predicate.Shipment

NoteEqualFold applies the EqualFold predicate on the "note" field.

func NoteGT

func NoteGT(v string) predicate.Shipment

NoteGT applies the GT predicate on the "note" field.

func NoteGTE

func NoteGTE(v string) predicate.Shipment

NoteGTE applies the GTE predicate on the "note" field.

func NoteHasPrefix

func NoteHasPrefix(v string) predicate.Shipment

NoteHasPrefix applies the HasPrefix predicate on the "note" field.

func NoteHasSuffix

func NoteHasSuffix(v string) predicate.Shipment

NoteHasSuffix applies the HasSuffix predicate on the "note" field.

func NoteIn

func NoteIn(vs ...string) predicate.Shipment

NoteIn applies the In predicate on the "note" field.

func NoteIsNil

func NoteIsNil() predicate.Shipment

NoteIsNil applies the IsNil predicate on the "note" field.

func NoteLT

func NoteLT(v string) predicate.Shipment

NoteLT applies the LT predicate on the "note" field.

func NoteLTE

func NoteLTE(v string) predicate.Shipment

NoteLTE applies the LTE predicate on the "note" field.

func NoteNEQ

func NoteNEQ(v string) predicate.Shipment

NoteNEQ applies the NEQ predicate on the "note" field.

func NoteNotIn

func NoteNotIn(vs ...string) predicate.Shipment

NoteNotIn applies the NotIn predicate on the "note" field.

func NoteNotNil

func NoteNotNil() predicate.Shipment

NoteNotNil applies the NotNil predicate on the "note" field.

func Or

func Or(predicates ...predicate.Shipment) predicate.Shipment

Or groups predicates with the OR operator between them.

func OrderID

func OrderID(v uuid.UUID) predicate.Shipment

OrderID applies equality check predicate on the "order_id" field. It's identical to OrderIDEQ.

func OrderIDEQ

func OrderIDEQ(v uuid.UUID) predicate.Shipment

OrderIDEQ applies the EQ predicate on the "order_id" field.

func OrderIDIn

func OrderIDIn(vs ...uuid.UUID) predicate.Shipment

OrderIDIn applies the In predicate on the "order_id" field.

func OrderIDNEQ

func OrderIDNEQ(v uuid.UUID) predicate.Shipment

OrderIDNEQ applies the NEQ predicate on the "order_id" field.

func OrderIDNotIn

func OrderIDNotIn(vs ...uuid.UUID) predicate.Shipment

OrderIDNotIn applies the NotIn predicate on the "order_id" field.

func ShipmentDate

func ShipmentDate(v time.Time) predicate.Shipment

ShipmentDate applies equality check predicate on the "shipment_date" field. It's identical to ShipmentDateEQ.

func ShipmentDateEQ

func ShipmentDateEQ(v time.Time) predicate.Shipment

ShipmentDateEQ applies the EQ predicate on the "shipment_date" field.

func ShipmentDateGT

func ShipmentDateGT(v time.Time) predicate.Shipment

ShipmentDateGT applies the GT predicate on the "shipment_date" field.

func ShipmentDateGTE

func ShipmentDateGTE(v time.Time) predicate.Shipment

ShipmentDateGTE applies the GTE predicate on the "shipment_date" field.

func ShipmentDateIn

func ShipmentDateIn(vs ...time.Time) predicate.Shipment

ShipmentDateIn applies the In predicate on the "shipment_date" field.

func ShipmentDateLT

func ShipmentDateLT(v time.Time) predicate.Shipment

ShipmentDateLT applies the LT predicate on the "shipment_date" field.

func ShipmentDateLTE

func ShipmentDateLTE(v time.Time) predicate.Shipment

ShipmentDateLTE applies the LTE predicate on the "shipment_date" field.

func ShipmentDateNEQ

func ShipmentDateNEQ(v time.Time) predicate.Shipment

ShipmentDateNEQ applies the NEQ predicate on the "shipment_date" field.

func ShipmentDateNotIn

func ShipmentDateNotIn(vs ...time.Time) predicate.Shipment

ShipmentDateNotIn applies the NotIn predicate on the "shipment_date" field.

func StaffID

func StaffID(v uuid.UUID) predicate.Shipment

StaffID applies equality check predicate on the "staff_id" field. It's identical to StaffIDEQ.

func StaffIDEQ

func StaffIDEQ(v uuid.UUID) predicate.Shipment

StaffIDEQ applies the EQ predicate on the "staff_id" field.

func StaffIDIn

func StaffIDIn(vs ...uuid.UUID) predicate.Shipment

StaffIDIn applies the In predicate on the "staff_id" field.

func StaffIDNEQ

func StaffIDNEQ(v uuid.UUID) predicate.Shipment

StaffIDNEQ applies the NEQ predicate on the "staff_id" field.

func StaffIDNotIn

func StaffIDNotIn(vs ...uuid.UUID) predicate.Shipment

StaffIDNotIn applies the NotIn predicate on the "staff_id" field.

func StatusCode

func StatusCode(v int) predicate.Shipment

StatusCode applies equality check predicate on the "status_code" field. It's identical to StatusCodeEQ.

func StatusCodeEQ

func StatusCodeEQ(v int) predicate.Shipment

StatusCodeEQ applies the EQ predicate on the "status_code" field.

func StatusCodeIn

func StatusCodeIn(vs ...int) predicate.Shipment

StatusCodeIn applies the In predicate on the "status_code" field.

func StatusCodeNEQ

func StatusCodeNEQ(v int) predicate.Shipment

StatusCodeNEQ applies the NEQ predicate on the "status_code" field.

func StatusCodeNotIn

func StatusCodeNotIn(vs ...int) predicate.Shipment

StatusCodeNotIn applies the NotIn predicate on the "status_code" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Shipment

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Shipment

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Shipment

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Shipment

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Shipment

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Shipment

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Shipment

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

func UpdatedAtNotIn

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

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 Shipment queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByID

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

ByID orders the results by the id field.

func ByInvoiceField

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

ByInvoiceField orders the results by invoice field.

func ByInvoiceID

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

ByInvoiceID orders the results by the invoice_id field.

func ByNote

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

ByNote orders the results by the note field.

func ByOrderField

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

ByOrderField orders the results by order field.

func ByOrderID

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

ByOrderID orders the results by the order_id field.

func ByShipmentDate

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

ByShipmentDate orders the results by the shipment_date field.

func ByShipmentStatusField

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

ByShipmentStatusField orders the results by shipment_status field.

func ByStaffField

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

ByStaffField orders the results by staff field.

func ByStaffID

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

ByStaffID orders the results by the staff_id field.

func ByStatusCode

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

ByStatusCode orders the results by the status_code field.

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