Documentation
¶
Index ¶
- Constants
- Variables
- func Amount(v float64) predicate.Bundle
- func AmountEQ(v float64) predicate.Bundle
- func AmountGT(v float64) predicate.Bundle
- func AmountGTE(v float64) predicate.Bundle
- func AmountIn(vs ...float64) predicate.Bundle
- func AmountLT(v float64) predicate.Bundle
- func AmountLTE(v float64) predicate.Bundle
- func AmountNEQ(v float64) predicate.Bundle
- func AmountNotIn(vs ...float64) predicate.Bundle
- func And(predicates ...predicate.Bundle) predicate.Bundle
- func CreatedAt(v time.Time) predicate.Bundle
- func CreatedAtEQ(v time.Time) predicate.Bundle
- func CreatedAtGT(v time.Time) predicate.Bundle
- func CreatedAtGTE(v time.Time) predicate.Bundle
- func CreatedAtIn(vs ...time.Time) predicate.Bundle
- func CreatedAtLT(v time.Time) predicate.Bundle
- func CreatedAtLTE(v time.Time) predicate.Bundle
- func CreatedAtNEQ(v time.Time) predicate.Bundle
- func CreatedAtNotIn(vs ...time.Time) predicate.Bundle
- func DeletedAt(v time.Time) predicate.Bundle
- func DeletedAtEQ(v time.Time) predicate.Bundle
- func DeletedAtGT(v time.Time) predicate.Bundle
- func DeletedAtGTE(v time.Time) predicate.Bundle
- func DeletedAtIn(vs ...time.Time) predicate.Bundle
- func DeletedAtIsNil() predicate.Bundle
- func DeletedAtLT(v time.Time) predicate.Bundle
- func DeletedAtLTE(v time.Time) predicate.Bundle
- func DeletedAtNEQ(v time.Time) predicate.Bundle
- func DeletedAtNotIn(vs ...time.Time) predicate.Bundle
- func DeletedAtNotNil() predicate.Bundle
- func HasItem() predicate.Bundle
- func HasItemWith(preds ...predicate.Item) predicate.Bundle
- func HasProduct() predicate.Bundle
- func HasProductWith(preds ...predicate.Product) predicate.Bundle
- func ID(id int64) predicate.Bundle
- func IDEQ(id int64) predicate.Bundle
- func IDGT(id int64) predicate.Bundle
- func IDGTE(id int64) predicate.Bundle
- func IDIn(ids ...int64) predicate.Bundle
- func IDLT(id int64) predicate.Bundle
- func IDLTE(id int64) predicate.Bundle
- func IDNEQ(id int64) predicate.Bundle
- func IDNotIn(ids ...int64) predicate.Bundle
- func ItemID(v int64) predicate.Bundle
- func ItemIDEQ(v int64) predicate.Bundle
- func ItemIDIn(vs ...int64) predicate.Bundle
- func ItemIDNEQ(v int64) predicate.Bundle
- func ItemIDNotIn(vs ...int64) predicate.Bundle
- func Not(p predicate.Bundle) predicate.Bundle
- func Or(predicates ...predicate.Bundle) predicate.Bundle
- func ProductID(v int64) predicate.Bundle
- func ProductIDEQ(v int64) predicate.Bundle
- func ProductIDIn(vs ...int64) predicate.Bundle
- func ProductIDNEQ(v int64) predicate.Bundle
- func ProductIDNotIn(vs ...int64) predicate.Bundle
- func UpdatedAt(v time.Time) predicate.Bundle
- func UpdatedAtEQ(v time.Time) predicate.Bundle
- func UpdatedAtGT(v time.Time) predicate.Bundle
- func UpdatedAtGTE(v time.Time) predicate.Bundle
- func UpdatedAtIn(vs ...time.Time) predicate.Bundle
- func UpdatedAtLT(v time.Time) predicate.Bundle
- func UpdatedAtLTE(v time.Time) predicate.Bundle
- func UpdatedAtNEQ(v time.Time) predicate.Bundle
- func UpdatedAtNotIn(vs ...time.Time) predicate.Bundle
- func ValidColumn(column string) bool
- type OrderOption
- func ByAmount(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByItemField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByItemID(opts ...sql.OrderTermOption) OrderOption
- func ByProductField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByProductID(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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"
var Columns = []string{ FieldID, FieldDeletedAt, FieldCreatedAt, FieldUpdatedAt, FieldProductID, FieldItemID, FieldAmount, }
Columns holds all SQL columns for bundle fields.
Functions ¶
func Amount ¶
Amount applies equality check predicate on the "amount" field. It's identical to AmountEQ.
func AmountNotIn ¶
AmountNotIn applies the NotIn predicate on the "amount" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func DeletedAt ¶
DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAtEQ ¶
DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtGT ¶
DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGTE ¶
DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtIn ¶
DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIsNil ¶
DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtLT ¶
DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLTE ¶
DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtNEQ ¶
DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNotIn ¶
DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotNil ¶
DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func HasItemWith ¶
HasItemWith applies the HasEdge predicate on the "item" edge with a given conditions (other predicates).
func HasProduct ¶
HasProduct applies the HasEdge predicate on the "product" edge.
func HasProductWith ¶
HasProductWith applies the HasEdge predicate on the "product" edge with a given conditions (other predicates).
func ItemID ¶
ItemID applies equality check predicate on the "item_id" field. It's identical to ItemIDEQ.
func ItemIDNotIn ¶
ItemIDNotIn applies the NotIn predicate on the "item_id" field.
func ProductID ¶
ProductID applies equality check predicate on the "product_id" field. It's identical to ProductIDEQ.
func ProductIDEQ ¶
ProductIDEQ applies the EQ predicate on the "product_id" field.
func ProductIDIn ¶
ProductIDIn applies the In predicate on the "product_id" field.
func ProductIDNEQ ¶
ProductIDNEQ applies the NEQ predicate on the "product_id" field.
func ProductIDNotIn ¶
ProductIDNotIn applies the NotIn predicate on the "product_id" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
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.