orderproduct

package
v0.0.0-...-6b1b9c3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the orderproduct type in the database.
	Label = "order_product"
	// 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"
	// FieldProductID holds the string denoting the product_id field in the database.
	FieldProductID = "product_id"
	// FieldAmount holds the string denoting the amount field in the database.
	FieldAmount = "amount"
	// FieldPrice holds the string denoting the price field in the database.
	FieldPrice = "price"
	// EdgeOrders holds the string denoting the orders edge name in mutations.
	EdgeOrders = "orders"
	// EdgeProducts holds the string denoting the products edge name in mutations.
	EdgeProducts = "products"
	// Table holds the table name of the orderproduct in the database.
	Table = "order_products"
	// OrdersTable is the table that holds the orders relation/edge.
	OrdersTable = "order_products"
	// 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 = "order_id"
	// ProductsTable is the table that holds the products relation/edge.
	ProductsTable = "order_products"
	// ProductsInverseTable is the table name for the Product entity.
	// It exists in this package in order to avoid circular dependency with the "product" package.
	ProductsInverseTable = "products"
	// ProductsColumn is the table column denoting the products relation/edge.
	ProductsColumn = "product_id"
)

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
	// DefaultAmount holds the default value on creation for the "amount" field.
	DefaultAmount int64
	// AmountValidator is a validator for the "amount" field. It is called by the builders before save.
	AmountValidator func(int64) error
	// PriceValidator is a validator for the "price" field. It is called by the builders before save.
	PriceValidator func(int64) error
)

Columns holds all SQL columns for orderproduct fields.

Functions

func Amount

func Amount(v int64) predicate.OrderProduct

Amount applies equality check predicate on the "amount" field. It's identical to AmountEQ.

func AmountEQ

func AmountEQ(v int64) predicate.OrderProduct

AmountEQ applies the EQ predicate on the "amount" field.

func AmountGT

func AmountGT(v int64) predicate.OrderProduct

AmountGT applies the GT predicate on the "amount" field.

func AmountGTE

func AmountGTE(v int64) predicate.OrderProduct

AmountGTE applies the GTE predicate on the "amount" field.

func AmountIn

func AmountIn(vs ...int64) predicate.OrderProduct

AmountIn applies the In predicate on the "amount" field.

func AmountLT

func AmountLT(v int64) predicate.OrderProduct

AmountLT applies the LT predicate on the "amount" field.

func AmountLTE

func AmountLTE(v int64) predicate.OrderProduct

AmountLTE applies the LTE predicate on the "amount" field.

func AmountNEQ

func AmountNEQ(v int64) predicate.OrderProduct

AmountNEQ applies the NEQ predicate on the "amount" field.

func AmountNotIn

func AmountNotIn(vs ...int64) predicate.OrderProduct

AmountNotIn applies the NotIn predicate on the "amount" field.

func And

func And(predicates ...predicate.OrderProduct) predicate.OrderProduct

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.OrderProduct

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.OrderProduct

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.OrderProduct

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.OrderProduct

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.OrderProduct

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.OrderProduct

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.OrderProduct

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

func CreatedAtNotIn

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

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

func HasOrders

func HasOrders() predicate.OrderProduct

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

func HasOrdersWith

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

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

func HasProducts

func HasProducts() predicate.OrderProduct

HasProducts applies the HasEdge predicate on the "products" edge.

func HasProductsWith

func HasProductsWith(preds ...predicate.Product) predicate.OrderProduct

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

func ID

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.OrderProduct

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.OrderProduct

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.OrderProduct

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int64) predicate.OrderProduct

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.OrderProduct

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.OrderProduct

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.OrderProduct

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int64) predicate.OrderProduct

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.OrderProduct) predicate.OrderProduct

Or groups predicates with the OR operator between them.

func OrderID

func OrderID(v int64) predicate.OrderProduct

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

func OrderIDEQ

func OrderIDEQ(v int64) predicate.OrderProduct

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

func OrderIDIn

func OrderIDIn(vs ...int64) predicate.OrderProduct

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

func OrderIDNEQ

func OrderIDNEQ(v int64) predicate.OrderProduct

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

func OrderIDNotIn

func OrderIDNotIn(vs ...int64) predicate.OrderProduct

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

func Price

func Price(v int64) predicate.OrderProduct

Price applies equality check predicate on the "price" field. It's identical to PriceEQ.

func PriceEQ

func PriceEQ(v int64) predicate.OrderProduct

PriceEQ applies the EQ predicate on the "price" field.

func PriceGT

func PriceGT(v int64) predicate.OrderProduct

PriceGT applies the GT predicate on the "price" field.

func PriceGTE

func PriceGTE(v int64) predicate.OrderProduct

PriceGTE applies the GTE predicate on the "price" field.

func PriceIn

func PriceIn(vs ...int64) predicate.OrderProduct

PriceIn applies the In predicate on the "price" field.

func PriceLT

func PriceLT(v int64) predicate.OrderProduct

PriceLT applies the LT predicate on the "price" field.

func PriceLTE

func PriceLTE(v int64) predicate.OrderProduct

PriceLTE applies the LTE predicate on the "price" field.

func PriceNEQ

func PriceNEQ(v int64) predicate.OrderProduct

PriceNEQ applies the NEQ predicate on the "price" field.

func PriceNotIn

func PriceNotIn(vs ...int64) predicate.OrderProduct

PriceNotIn applies the NotIn predicate on the "price" field.

func ProductID

func ProductID(v int64) predicate.OrderProduct

ProductID applies equality check predicate on the "product_id" field. It's identical to ProductIDEQ.

func ProductIDEQ

func ProductIDEQ(v int64) predicate.OrderProduct

ProductIDEQ applies the EQ predicate on the "product_id" field.

func ProductIDIn

func ProductIDIn(vs ...int64) predicate.OrderProduct

ProductIDIn applies the In predicate on the "product_id" field.

func ProductIDNEQ

func ProductIDNEQ(v int64) predicate.OrderProduct

ProductIDNEQ applies the NEQ predicate on the "product_id" field.

func ProductIDNotIn

func ProductIDNotIn(vs ...int64) predicate.OrderProduct

ProductIDNotIn applies the NotIn predicate on the "product_id" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.OrderProduct

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.OrderProduct

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.OrderProduct

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.OrderProduct

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.OrderProduct

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.OrderProduct

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.OrderProduct

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

func UpdatedAtNotIn

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

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

func ByAmount

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

ByAmount orders the results by the amount field.

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 ByOrderID

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

ByOrderID orders the results by the order_id field.

func ByOrdersField

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

ByOrdersField orders the results by orders field.

func ByPrice

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

ByPrice orders the results by the price field.

func ByProductID

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

ByProductID orders the results by the product_id field.

func ByProductsField

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

ByProductsField orders the results by products 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