bundle

package
v1.99.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the bundle type in the database.
	Label = "bundle"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// 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"
	// FieldProductID holds the string denoting the product_id field in the database.
	FieldProductID = "product_id"
	// FieldItemID holds the string denoting the item_id field in the database.
	FieldItemID = "item_id"
	// FieldAmount holds the string denoting the amount field in the database.
	FieldAmount = "amount"
	// EdgeProduct holds the string denoting the product edge name in mutations.
	EdgeProduct = "product"
	// EdgeItem holds the string denoting the item edge name in mutations.
	EdgeItem = "item"
	// Table holds the table name of the bundle in the database.
	Table = "bundles"
	// ProductTable is the table that holds the product relation/edge.
	ProductTable = "bundles"
	// ProductInverseTable is the table name for the Product entity.
	// It exists in this package in order to avoid circular dependency with the "product" package.
	ProductInverseTable = "products"
	// ProductColumn is the table column denoting the product relation/edge.
	ProductColumn = "product_id"
	// ItemTable is the table that holds the item relation/edge.
	ItemTable = "bundles"
	// ItemInverseTable is the table name for the Item entity.
	// It exists in this package in order to avoid circular dependency with the "item" package.
	ItemInverseTable = "items"
	// ItemColumn is the table column denoting the item relation/edge.
	ItemColumn = "item_id"
)

Variables

View Source
var (
	Hooks        [1]ent.Hook
	Interceptors [1]ent.Interceptor
	// 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 float64
)

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/makesalekz/billing/ent/runtime"

Columns holds all SQL columns for bundle fields.

Functions

func Amount

func Amount(v float64) predicate.Bundle

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

func AmountEQ

func AmountEQ(v float64) predicate.Bundle

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

func AmountGT

func AmountGT(v float64) predicate.Bundle

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

func AmountGTE

func AmountGTE(v float64) predicate.Bundle

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

func AmountIn

func AmountIn(vs ...float64) predicate.Bundle

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

func AmountLT

func AmountLT(v float64) predicate.Bundle

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

func AmountLTE

func AmountLTE(v float64) predicate.Bundle

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

func AmountNEQ

func AmountNEQ(v float64) predicate.Bundle

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

func AmountNotIn

func AmountNotIn(vs ...float64) predicate.Bundle

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

func And

func And(predicates ...predicate.Bundle) predicate.Bundle

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Bundle

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Bundle

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Bundle

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Bundle

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Bundle

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Bundle

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Bundle

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v time.Time) predicate.Bundle

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Bundle

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Bundle

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Bundle

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...time.Time) predicate.Bundle

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Bundle

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Bundle

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Bundle

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Bundle

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...time.Time) predicate.Bundle

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Bundle

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func HasItem

func HasItem() predicate.Bundle

HasItem applies the HasEdge predicate on the "item" edge.

func HasItemWith

func HasItemWith(preds ...predicate.Item) predicate.Bundle

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

func HasProduct

func HasProduct() predicate.Bundle

HasProduct applies the HasEdge predicate on the "product" edge.

func HasProductWith

func HasProductWith(preds ...predicate.Product) predicate.Bundle

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

func ID

func ID(id int64) predicate.Bundle

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int64) predicate.Bundle

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int64) predicate.Bundle

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int64) predicate.Bundle

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int64) predicate.Bundle

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int64) predicate.Bundle

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int64) predicate.Bundle

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func ItemID

func ItemID(v int64) predicate.Bundle

ItemID applies equality check predicate on the "item_id" field. It's identical to ItemIDEQ.

func ItemIDEQ

func ItemIDEQ(v int64) predicate.Bundle

ItemIDEQ applies the EQ predicate on the "item_id" field.

func ItemIDIn

func ItemIDIn(vs ...int64) predicate.Bundle

ItemIDIn applies the In predicate on the "item_id" field.

func ItemIDNEQ

func ItemIDNEQ(v int64) predicate.Bundle

ItemIDNEQ applies the NEQ predicate on the "item_id" field.

func ItemIDNotIn

func ItemIDNotIn(vs ...int64) predicate.Bundle

ItemIDNotIn applies the NotIn predicate on the "item_id" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Bundle) predicate.Bundle

Or groups predicates with the OR operator between them.

func ProductID

func ProductID(v int64) predicate.Bundle

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

func ProductIDEQ

func ProductIDEQ(v int64) predicate.Bundle

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

func ProductIDIn

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

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

func ProductIDNEQ

func ProductIDNEQ(v int64) predicate.Bundle

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

func ProductIDNotIn

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

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Bundle

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Bundle

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Bundle

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Bundle

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Bundle

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Bundle

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Bundle

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

func UpdatedAtNotIn

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

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 Bundle 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 ByDeletedAt

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

ByDeletedAt orders the results by the deleted_at field.

func ByID

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

ByID orders the results by the id field.

func ByItemField

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

ByItemField orders the results by item field.

func ByItemID

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

ByItemID orders the results by the item_id field.

func ByProductField

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

ByProductField orders the results by product field.

func ByProductID

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

ByProductID orders the results by the product_id 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