Documentation
¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Discount) predicate.Discount
- func DiscountPercentage(v float64) predicate.Discount
- func DiscountPercentageEQ(v float64) predicate.Discount
- func DiscountPercentageGT(v float64) predicate.Discount
- func DiscountPercentageGTE(v float64) predicate.Discount
- func DiscountPercentageIn(vs ...float64) predicate.Discount
- func DiscountPercentageLT(v float64) predicate.Discount
- func DiscountPercentageLTE(v float64) predicate.Discount
- func DiscountPercentageNEQ(v float64) predicate.Discount
- func DiscountPercentageNotIn(vs ...float64) predicate.Discount
- func DiscountPrice(v int) predicate.Discount
- func DiscountPriceEQ(v int) predicate.Discount
- func DiscountPriceGT(v int) predicate.Discount
- func DiscountPriceGTE(v int) predicate.Discount
- func DiscountPriceIn(vs ...int) predicate.Discount
- func DiscountPriceLT(v int) predicate.Discount
- func DiscountPriceLTE(v int) predicate.Discount
- func DiscountPriceNEQ(v int) predicate.Discount
- func DiscountPriceNotIn(vs ...int) predicate.Discount
- func HasOrders() predicate.Discount
- func HasOrdersWith(preds ...predicate.Order) predicate.Discount
- func ID(id uuid.UUID) predicate.Discount
- func IDEQ(id uuid.UUID) predicate.Discount
- func IDGT(id uuid.UUID) predicate.Discount
- func IDGTE(id uuid.UUID) predicate.Discount
- func IDIn(ids ...uuid.UUID) predicate.Discount
- func IDLT(id uuid.UUID) predicate.Discount
- func IDLTE(id uuid.UUID) predicate.Discount
- func IDNEQ(id uuid.UUID) predicate.Discount
- func IDNotIn(ids ...uuid.UUID) predicate.Discount
- func MethodEQ(v Method) predicate.Discount
- func MethodIn(vs ...Method) predicate.Discount
- func MethodNEQ(v Method) predicate.Discount
- func MethodNotIn(vs ...Method) predicate.Discount
- func MethodValidator(m Method) error
- func Not(p predicate.Discount) predicate.Discount
- func Or(predicates ...predicate.Discount) predicate.Discount
- func PeriodEnd(v time.Time) predicate.Discount
- func PeriodEndEQ(v time.Time) predicate.Discount
- func PeriodEndGT(v time.Time) predicate.Discount
- func PeriodEndGTE(v time.Time) predicate.Discount
- func PeriodEndIn(vs ...time.Time) predicate.Discount
- func PeriodEndIsNil() predicate.Discount
- func PeriodEndLT(v time.Time) predicate.Discount
- func PeriodEndLTE(v time.Time) predicate.Discount
- func PeriodEndNEQ(v time.Time) predicate.Discount
- func PeriodEndNotIn(vs ...time.Time) predicate.Discount
- func PeriodEndNotNil() predicate.Discount
- func PeriodStart(v time.Time) predicate.Discount
- func PeriodStartEQ(v time.Time) predicate.Discount
- func PeriodStartGT(v time.Time) predicate.Discount
- func PeriodStartGTE(v time.Time) predicate.Discount
- func PeriodStartIn(vs ...time.Time) predicate.Discount
- func PeriodStartIsNil() predicate.Discount
- func PeriodStartLT(v time.Time) predicate.Discount
- func PeriodStartLTE(v time.Time) predicate.Discount
- func PeriodStartNEQ(v time.Time) predicate.Discount
- func PeriodStartNotIn(vs ...time.Time) predicate.Discount
- func PeriodStartNotNil() predicate.Discount
- func ValidColumn(column string) bool
- type Method
Constants ¶
const ( // Label holds the string label denoting the discount type in the database. Label = "discount" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldPeriodStart holds the string denoting the period_start field in the database. FieldPeriodStart = "period_start" // FieldPeriodEnd holds the string denoting the period_end field in the database. FieldPeriodEnd = "period_end" // FieldMethod holds the string denoting the method field in the database. FieldMethod = "method" // FieldDiscountPrice holds the string denoting the discount_price field in the database. FieldDiscountPrice = "discount_price" // FieldDiscountPercentage holds the string denoting the discount_percentage field in the database. FieldDiscountPercentage = "discount_percentage" // EdgeOrders holds the string denoting the orders edge name in mutations. EdgeOrders = "orders" // Table holds the table name of the discount in the database. Table = "discounts" // OrdersTable is the table that holds the orders relation/edge. The primary key declared below. OrdersTable = "order_discounts" // 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" )
Variables ¶
var Columns = []string{ FieldID, FieldPeriodStart, FieldPeriodEnd, FieldMethod, FieldDiscountPrice, FieldDiscountPercentage, }
Columns holds all SQL columns for discount fields.
var ( // OrdersPrimaryKey and OrdersColumn2 are the table columns denoting the // primary key for the orders relation (M2M). OrdersPrimaryKey = []string{"order_id", "discount_id"} )
Functions ¶
func DiscountPercentage ¶
DiscountPercentage applies equality check predicate on the "discount_percentage" field. It's identical to DiscountPercentageEQ.
func DiscountPercentageEQ ¶
DiscountPercentageEQ applies the EQ predicate on the "discount_percentage" field.
func DiscountPercentageGT ¶
DiscountPercentageGT applies the GT predicate on the "discount_percentage" field.
func DiscountPercentageGTE ¶
DiscountPercentageGTE applies the GTE predicate on the "discount_percentage" field.
func DiscountPercentageIn ¶
DiscountPercentageIn applies the In predicate on the "discount_percentage" field.
func DiscountPercentageLT ¶
DiscountPercentageLT applies the LT predicate on the "discount_percentage" field.
func DiscountPercentageLTE ¶
DiscountPercentageLTE applies the LTE predicate on the "discount_percentage" field.
func DiscountPercentageNEQ ¶
DiscountPercentageNEQ applies the NEQ predicate on the "discount_percentage" field.
func DiscountPercentageNotIn ¶
DiscountPercentageNotIn applies the NotIn predicate on the "discount_percentage" field.
func DiscountPrice ¶
DiscountPrice applies equality check predicate on the "discount_price" field. It's identical to DiscountPriceEQ.
func DiscountPriceEQ ¶
DiscountPriceEQ applies the EQ predicate on the "discount_price" field.
func DiscountPriceGT ¶
DiscountPriceGT applies the GT predicate on the "discount_price" field.
func DiscountPriceGTE ¶
DiscountPriceGTE applies the GTE predicate on the "discount_price" field.
func DiscountPriceIn ¶
DiscountPriceIn applies the In predicate on the "discount_price" field.
func DiscountPriceLT ¶
DiscountPriceLT applies the LT predicate on the "discount_price" field.
func DiscountPriceLTE ¶
DiscountPriceLTE applies the LTE predicate on the "discount_price" field.
func DiscountPriceNEQ ¶
DiscountPriceNEQ applies the NEQ predicate on the "discount_price" field.
func DiscountPriceNotIn ¶
DiscountPriceNotIn applies the NotIn predicate on the "discount_price" field.
func HasOrdersWith ¶
HasOrdersWith applies the HasEdge predicate on the "orders" edge with a given conditions (other predicates).
func MethodNotIn ¶
MethodNotIn applies the NotIn predicate on the "method" field.
func MethodValidator ¶
MethodValidator is a validator for the "method" field enum values. It is called by the builders before save.
func PeriodEnd ¶
PeriodEnd applies equality check predicate on the "period_end" field. It's identical to PeriodEndEQ.
func PeriodEndEQ ¶
PeriodEndEQ applies the EQ predicate on the "period_end" field.
func PeriodEndGT ¶
PeriodEndGT applies the GT predicate on the "period_end" field.
func PeriodEndGTE ¶
PeriodEndGTE applies the GTE predicate on the "period_end" field.
func PeriodEndIn ¶
PeriodEndIn applies the In predicate on the "period_end" field.
func PeriodEndIsNil ¶
PeriodEndIsNil applies the IsNil predicate on the "period_end" field.
func PeriodEndLT ¶
PeriodEndLT applies the LT predicate on the "period_end" field.
func PeriodEndLTE ¶
PeriodEndLTE applies the LTE predicate on the "period_end" field.
func PeriodEndNEQ ¶
PeriodEndNEQ applies the NEQ predicate on the "period_end" field.
func PeriodEndNotIn ¶
PeriodEndNotIn applies the NotIn predicate on the "period_end" field.
func PeriodEndNotNil ¶
PeriodEndNotNil applies the NotNil predicate on the "period_end" field.
func PeriodStart ¶
PeriodStart applies equality check predicate on the "period_start" field. It's identical to PeriodStartEQ.
func PeriodStartEQ ¶
PeriodStartEQ applies the EQ predicate on the "period_start" field.
func PeriodStartGT ¶
PeriodStartGT applies the GT predicate on the "period_start" field.
func PeriodStartGTE ¶
PeriodStartGTE applies the GTE predicate on the "period_start" field.
func PeriodStartIn ¶
PeriodStartIn applies the In predicate on the "period_start" field.
func PeriodStartIsNil ¶
PeriodStartIsNil applies the IsNil predicate on the "period_start" field.
func PeriodStartLT ¶
PeriodStartLT applies the LT predicate on the "period_start" field.
func PeriodStartLTE ¶
PeriodStartLTE applies the LTE predicate on the "period_start" field.
func PeriodStartNEQ ¶
PeriodStartNEQ applies the NEQ predicate on the "period_start" field.
func PeriodStartNotIn ¶
PeriodStartNotIn applies the NotIn predicate on the "period_start" field.
func PeriodStartNotNil ¶
PeriodStartNotNil applies the NotNil predicate on the "period_start" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).