online-order/ent/product/where.go

716 lines
25 KiB
Go
Raw Permalink Normal View History

2023-10-27 09:51:58 +00:00
// Code generated by ent, DO NOT EDIT.
package product
import (
"online-order/ent/predicate"
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.Product {
return predicate.Product(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.Product {
return predicate.Product(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.Product {
return predicate.Product(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.Product {
return predicate.Product(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.Product {
return predicate.Product(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.Product {
return predicate.Product(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.Product {
return predicate.Product(sql.FieldLTE(FieldID, id))
}
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
func Name(v string) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldName, v))
}
2023-10-28 23:12:07 +00:00
// Summary applies equality check predicate on the "summary" field. It's identical to SummaryEQ.
func Summary(v string) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldSummary, v))
}
2023-10-27 09:51:58 +00:00
// Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
func Description(v string) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldDescription, v))
}
// Price applies equality check predicate on the "price" field. It's identical to PriceEQ.
func Price(v float64) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldPrice, v))
}
// OriginalPrice applies equality check predicate on the "original_price" field. It's identical to OriginalPriceEQ.
func OriginalPrice(v float64) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldOriginalPrice, v))
}
// Quantity applies equality check predicate on the "quantity" field. It's identical to QuantityEQ.
func Quantity(v int) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldQuantity, v))
}
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
func Status(v bool) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldStatus, v))
}
2023-10-28 23:12:07 +00:00
// ProductCategoryID applies equality check predicate on the "product_category_id" field. It's identical to ProductCategoryIDEQ.
func ProductCategoryID(v int) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldProductCategoryID, v))
}
// BusinessID applies equality check predicate on the "business_id" field. It's identical to BusinessIDEQ.
func BusinessID(v int) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldBusinessID, v))
}
// UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
func UserID(v int) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldUserID, v))
}
2023-10-27 09:51:58 +00:00
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldCreatedAt, v))
}
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAt(v time.Time) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldUpdatedAt, v))
}
// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldName, v))
}
// NameNEQ applies the NEQ predicate on the "name" field.
func NameNEQ(v string) predicate.Product {
return predicate.Product(sql.FieldNEQ(FieldName, v))
}
// NameIn applies the In predicate on the "name" field.
func NameIn(vs ...string) predicate.Product {
return predicate.Product(sql.FieldIn(FieldName, vs...))
}
// NameNotIn applies the NotIn predicate on the "name" field.
func NameNotIn(vs ...string) predicate.Product {
return predicate.Product(sql.FieldNotIn(FieldName, vs...))
}
// NameGT applies the GT predicate on the "name" field.
func NameGT(v string) predicate.Product {
return predicate.Product(sql.FieldGT(FieldName, v))
}
// NameGTE applies the GTE predicate on the "name" field.
func NameGTE(v string) predicate.Product {
return predicate.Product(sql.FieldGTE(FieldName, v))
}
// NameLT applies the LT predicate on the "name" field.
func NameLT(v string) predicate.Product {
return predicate.Product(sql.FieldLT(FieldName, v))
}
// NameLTE applies the LTE predicate on the "name" field.
func NameLTE(v string) predicate.Product {
return predicate.Product(sql.FieldLTE(FieldName, v))
}
// NameContains applies the Contains predicate on the "name" field.
func NameContains(v string) predicate.Product {
return predicate.Product(sql.FieldContains(FieldName, v))
}
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasPrefix(v string) predicate.Product {
return predicate.Product(sql.FieldHasPrefix(FieldName, v))
}
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
func NameHasSuffix(v string) predicate.Product {
return predicate.Product(sql.FieldHasSuffix(FieldName, v))
}
// NameEqualFold applies the EqualFold predicate on the "name" field.
func NameEqualFold(v string) predicate.Product {
return predicate.Product(sql.FieldEqualFold(FieldName, v))
}
// NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameContainsFold(v string) predicate.Product {
return predicate.Product(sql.FieldContainsFold(FieldName, v))
}
2023-10-28 23:12:07 +00:00
// SummaryEQ applies the EQ predicate on the "summary" field.
func SummaryEQ(v string) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldSummary, v))
}
// SummaryNEQ applies the NEQ predicate on the "summary" field.
func SummaryNEQ(v string) predicate.Product {
return predicate.Product(sql.FieldNEQ(FieldSummary, v))
}
// SummaryIn applies the In predicate on the "summary" field.
func SummaryIn(vs ...string) predicate.Product {
return predicate.Product(sql.FieldIn(FieldSummary, vs...))
}
// SummaryNotIn applies the NotIn predicate on the "summary" field.
func SummaryNotIn(vs ...string) predicate.Product {
return predicate.Product(sql.FieldNotIn(FieldSummary, vs...))
}
// SummaryGT applies the GT predicate on the "summary" field.
func SummaryGT(v string) predicate.Product {
return predicate.Product(sql.FieldGT(FieldSummary, v))
}
// SummaryGTE applies the GTE predicate on the "summary" field.
func SummaryGTE(v string) predicate.Product {
return predicate.Product(sql.FieldGTE(FieldSummary, v))
}
// SummaryLT applies the LT predicate on the "summary" field.
func SummaryLT(v string) predicate.Product {
return predicate.Product(sql.FieldLT(FieldSummary, v))
}
// SummaryLTE applies the LTE predicate on the "summary" field.
func SummaryLTE(v string) predicate.Product {
return predicate.Product(sql.FieldLTE(FieldSummary, v))
}
// SummaryContains applies the Contains predicate on the "summary" field.
func SummaryContains(v string) predicate.Product {
return predicate.Product(sql.FieldContains(FieldSummary, v))
}
// SummaryHasPrefix applies the HasPrefix predicate on the "summary" field.
func SummaryHasPrefix(v string) predicate.Product {
return predicate.Product(sql.FieldHasPrefix(FieldSummary, v))
}
// SummaryHasSuffix applies the HasSuffix predicate on the "summary" field.
func SummaryHasSuffix(v string) predicate.Product {
return predicate.Product(sql.FieldHasSuffix(FieldSummary, v))
}
// SummaryIsNil applies the IsNil predicate on the "summary" field.
func SummaryIsNil() predicate.Product {
return predicate.Product(sql.FieldIsNull(FieldSummary))
}
// SummaryNotNil applies the NotNil predicate on the "summary" field.
func SummaryNotNil() predicate.Product {
return predicate.Product(sql.FieldNotNull(FieldSummary))
}
// SummaryEqualFold applies the EqualFold predicate on the "summary" field.
func SummaryEqualFold(v string) predicate.Product {
return predicate.Product(sql.FieldEqualFold(FieldSummary, v))
}
// SummaryContainsFold applies the ContainsFold predicate on the "summary" field.
func SummaryContainsFold(v string) predicate.Product {
return predicate.Product(sql.FieldContainsFold(FieldSummary, v))
}
2023-10-27 09:51:58 +00:00
// DescriptionEQ applies the EQ predicate on the "description" field.
func DescriptionEQ(v string) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldDescription, v))
}
// DescriptionNEQ applies the NEQ predicate on the "description" field.
func DescriptionNEQ(v string) predicate.Product {
return predicate.Product(sql.FieldNEQ(FieldDescription, v))
}
// DescriptionIn applies the In predicate on the "description" field.
func DescriptionIn(vs ...string) predicate.Product {
return predicate.Product(sql.FieldIn(FieldDescription, vs...))
}
// DescriptionNotIn applies the NotIn predicate on the "description" field.
func DescriptionNotIn(vs ...string) predicate.Product {
return predicate.Product(sql.FieldNotIn(FieldDescription, vs...))
}
// DescriptionGT applies the GT predicate on the "description" field.
func DescriptionGT(v string) predicate.Product {
return predicate.Product(sql.FieldGT(FieldDescription, v))
}
// DescriptionGTE applies the GTE predicate on the "description" field.
func DescriptionGTE(v string) predicate.Product {
return predicate.Product(sql.FieldGTE(FieldDescription, v))
}
// DescriptionLT applies the LT predicate on the "description" field.
func DescriptionLT(v string) predicate.Product {
return predicate.Product(sql.FieldLT(FieldDescription, v))
}
// DescriptionLTE applies the LTE predicate on the "description" field.
func DescriptionLTE(v string) predicate.Product {
return predicate.Product(sql.FieldLTE(FieldDescription, v))
}
// DescriptionContains applies the Contains predicate on the "description" field.
func DescriptionContains(v string) predicate.Product {
return predicate.Product(sql.FieldContains(FieldDescription, v))
}
// DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
func DescriptionHasPrefix(v string) predicate.Product {
return predicate.Product(sql.FieldHasPrefix(FieldDescription, v))
}
// DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
func DescriptionHasSuffix(v string) predicate.Product {
return predicate.Product(sql.FieldHasSuffix(FieldDescription, v))
}
// DescriptionIsNil applies the IsNil predicate on the "description" field.
func DescriptionIsNil() predicate.Product {
return predicate.Product(sql.FieldIsNull(FieldDescription))
}
// DescriptionNotNil applies the NotNil predicate on the "description" field.
func DescriptionNotNil() predicate.Product {
return predicate.Product(sql.FieldNotNull(FieldDescription))
}
// DescriptionEqualFold applies the EqualFold predicate on the "description" field.
func DescriptionEqualFold(v string) predicate.Product {
return predicate.Product(sql.FieldEqualFold(FieldDescription, v))
}
// DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
func DescriptionContainsFold(v string) predicate.Product {
return predicate.Product(sql.FieldContainsFold(FieldDescription, v))
}
// PriceEQ applies the EQ predicate on the "price" field.
func PriceEQ(v float64) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldPrice, v))
}
// PriceNEQ applies the NEQ predicate on the "price" field.
func PriceNEQ(v float64) predicate.Product {
return predicate.Product(sql.FieldNEQ(FieldPrice, v))
}
// PriceIn applies the In predicate on the "price" field.
func PriceIn(vs ...float64) predicate.Product {
return predicate.Product(sql.FieldIn(FieldPrice, vs...))
}
// PriceNotIn applies the NotIn predicate on the "price" field.
func PriceNotIn(vs ...float64) predicate.Product {
return predicate.Product(sql.FieldNotIn(FieldPrice, vs...))
}
// PriceGT applies the GT predicate on the "price" field.
func PriceGT(v float64) predicate.Product {
return predicate.Product(sql.FieldGT(FieldPrice, v))
}
// PriceGTE applies the GTE predicate on the "price" field.
func PriceGTE(v float64) predicate.Product {
return predicate.Product(sql.FieldGTE(FieldPrice, v))
}
// PriceLT applies the LT predicate on the "price" field.
func PriceLT(v float64) predicate.Product {
return predicate.Product(sql.FieldLT(FieldPrice, v))
}
// PriceLTE applies the LTE predicate on the "price" field.
func PriceLTE(v float64) predicate.Product {
return predicate.Product(sql.FieldLTE(FieldPrice, v))
}
// OriginalPriceEQ applies the EQ predicate on the "original_price" field.
func OriginalPriceEQ(v float64) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldOriginalPrice, v))
}
// OriginalPriceNEQ applies the NEQ predicate on the "original_price" field.
func OriginalPriceNEQ(v float64) predicate.Product {
return predicate.Product(sql.FieldNEQ(FieldOriginalPrice, v))
}
// OriginalPriceIn applies the In predicate on the "original_price" field.
func OriginalPriceIn(vs ...float64) predicate.Product {
return predicate.Product(sql.FieldIn(FieldOriginalPrice, vs...))
}
// OriginalPriceNotIn applies the NotIn predicate on the "original_price" field.
func OriginalPriceNotIn(vs ...float64) predicate.Product {
return predicate.Product(sql.FieldNotIn(FieldOriginalPrice, vs...))
}
// OriginalPriceGT applies the GT predicate on the "original_price" field.
func OriginalPriceGT(v float64) predicate.Product {
return predicate.Product(sql.FieldGT(FieldOriginalPrice, v))
}
// OriginalPriceGTE applies the GTE predicate on the "original_price" field.
func OriginalPriceGTE(v float64) predicate.Product {
return predicate.Product(sql.FieldGTE(FieldOriginalPrice, v))
}
// OriginalPriceLT applies the LT predicate on the "original_price" field.
func OriginalPriceLT(v float64) predicate.Product {
return predicate.Product(sql.FieldLT(FieldOriginalPrice, v))
}
// OriginalPriceLTE applies the LTE predicate on the "original_price" field.
func OriginalPriceLTE(v float64) predicate.Product {
return predicate.Product(sql.FieldLTE(FieldOriginalPrice, v))
}
// QuantityEQ applies the EQ predicate on the "quantity" field.
func QuantityEQ(v int) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldQuantity, v))
}
// QuantityNEQ applies the NEQ predicate on the "quantity" field.
func QuantityNEQ(v int) predicate.Product {
return predicate.Product(sql.FieldNEQ(FieldQuantity, v))
}
// QuantityIn applies the In predicate on the "quantity" field.
func QuantityIn(vs ...int) predicate.Product {
return predicate.Product(sql.FieldIn(FieldQuantity, vs...))
}
// QuantityNotIn applies the NotIn predicate on the "quantity" field.
func QuantityNotIn(vs ...int) predicate.Product {
return predicate.Product(sql.FieldNotIn(FieldQuantity, vs...))
}
// QuantityGT applies the GT predicate on the "quantity" field.
func QuantityGT(v int) predicate.Product {
return predicate.Product(sql.FieldGT(FieldQuantity, v))
}
// QuantityGTE applies the GTE predicate on the "quantity" field.
func QuantityGTE(v int) predicate.Product {
return predicate.Product(sql.FieldGTE(FieldQuantity, v))
}
// QuantityLT applies the LT predicate on the "quantity" field.
func QuantityLT(v int) predicate.Product {
return predicate.Product(sql.FieldLT(FieldQuantity, v))
}
// QuantityLTE applies the LTE predicate on the "quantity" field.
func QuantityLTE(v int) predicate.Product {
return predicate.Product(sql.FieldLTE(FieldQuantity, v))
}
// StatusEQ applies the EQ predicate on the "status" field.
func StatusEQ(v bool) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldStatus, v))
}
// StatusNEQ applies the NEQ predicate on the "status" field.
func StatusNEQ(v bool) predicate.Product {
return predicate.Product(sql.FieldNEQ(FieldStatus, v))
}
2023-10-28 23:12:07 +00:00
// ProductCategoryIDEQ applies the EQ predicate on the "product_category_id" field.
func ProductCategoryIDEQ(v int) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldProductCategoryID, v))
}
// ProductCategoryIDNEQ applies the NEQ predicate on the "product_category_id" field.
func ProductCategoryIDNEQ(v int) predicate.Product {
return predicate.Product(sql.FieldNEQ(FieldProductCategoryID, v))
}
// ProductCategoryIDIn applies the In predicate on the "product_category_id" field.
func ProductCategoryIDIn(vs ...int) predicate.Product {
return predicate.Product(sql.FieldIn(FieldProductCategoryID, vs...))
}
// ProductCategoryIDNotIn applies the NotIn predicate on the "product_category_id" field.
func ProductCategoryIDNotIn(vs ...int) predicate.Product {
return predicate.Product(sql.FieldNotIn(FieldProductCategoryID, vs...))
}
// ProductCategoryIDIsNil applies the IsNil predicate on the "product_category_id" field.
func ProductCategoryIDIsNil() predicate.Product {
return predicate.Product(sql.FieldIsNull(FieldProductCategoryID))
}
// ProductCategoryIDNotNil applies the NotNil predicate on the "product_category_id" field.
func ProductCategoryIDNotNil() predicate.Product {
return predicate.Product(sql.FieldNotNull(FieldProductCategoryID))
}
// BusinessIDEQ applies the EQ predicate on the "business_id" field.
func BusinessIDEQ(v int) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldBusinessID, v))
}
// BusinessIDNEQ applies the NEQ predicate on the "business_id" field.
func BusinessIDNEQ(v int) predicate.Product {
return predicate.Product(sql.FieldNEQ(FieldBusinessID, v))
}
// BusinessIDIn applies the In predicate on the "business_id" field.
func BusinessIDIn(vs ...int) predicate.Product {
return predicate.Product(sql.FieldIn(FieldBusinessID, vs...))
}
// BusinessIDNotIn applies the NotIn predicate on the "business_id" field.
func BusinessIDNotIn(vs ...int) predicate.Product {
return predicate.Product(sql.FieldNotIn(FieldBusinessID, vs...))
}
// BusinessIDIsNil applies the IsNil predicate on the "business_id" field.
func BusinessIDIsNil() predicate.Product {
return predicate.Product(sql.FieldIsNull(FieldBusinessID))
}
// BusinessIDNotNil applies the NotNil predicate on the "business_id" field.
func BusinessIDNotNil() predicate.Product {
return predicate.Product(sql.FieldNotNull(FieldBusinessID))
}
// UserIDEQ applies the EQ predicate on the "user_id" field.
func UserIDEQ(v int) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldUserID, v))
}
// UserIDNEQ applies the NEQ predicate on the "user_id" field.
func UserIDNEQ(v int) predicate.Product {
return predicate.Product(sql.FieldNEQ(FieldUserID, v))
}
// UserIDIn applies the In predicate on the "user_id" field.
func UserIDIn(vs ...int) predicate.Product {
return predicate.Product(sql.FieldIn(FieldUserID, vs...))
}
// UserIDNotIn applies the NotIn predicate on the "user_id" field.
func UserIDNotIn(vs ...int) predicate.Product {
return predicate.Product(sql.FieldNotIn(FieldUserID, vs...))
}
// UserIDIsNil applies the IsNil predicate on the "user_id" field.
func UserIDIsNil() predicate.Product {
return predicate.Product(sql.FieldIsNull(FieldUserID))
}
// UserIDNotNil applies the NotNil predicate on the "user_id" field.
func UserIDNotNil() predicate.Product {
return predicate.Product(sql.FieldNotNull(FieldUserID))
}
2023-10-27 09:51:58 +00:00
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.Product {
return predicate.Product(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.Product {
return predicate.Product(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.Product {
return predicate.Product(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.Product {
return predicate.Product(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.Product {
return predicate.Product(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.Product {
return predicate.Product(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.Product {
return predicate.Product(sql.FieldLTE(FieldCreatedAt, v))
}
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtEQ(v time.Time) predicate.Product {
return predicate.Product(sql.FieldEQ(FieldUpdatedAt, v))
}
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNEQ(v time.Time) predicate.Product {
return predicate.Product(sql.FieldNEQ(FieldUpdatedAt, v))
}
// UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIn(vs ...time.Time) predicate.Product {
return predicate.Product(sql.FieldIn(FieldUpdatedAt, vs...))
}
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotIn(vs ...time.Time) predicate.Product {
return predicate.Product(sql.FieldNotIn(FieldUpdatedAt, vs...))
}
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGT(v time.Time) predicate.Product {
return predicate.Product(sql.FieldGT(FieldUpdatedAt, v))
}
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtGTE(v time.Time) predicate.Product {
return predicate.Product(sql.FieldGTE(FieldUpdatedAt, v))
}
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLT(v time.Time) predicate.Product {
return predicate.Product(sql.FieldLT(FieldUpdatedAt, v))
}
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtLTE(v time.Time) predicate.Product {
return predicate.Product(sql.FieldLTE(FieldUpdatedAt, v))
}
2023-10-28 23:12:07 +00:00
// HasProductCategories applies the HasEdge predicate on the "product_categories" edge.
func HasProductCategories() predicate.Product {
return predicate.Product(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, ProductCategoriesTable, ProductCategoriesColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasProductCategoriesWith applies the HasEdge predicate on the "product_categories" edge with a given conditions (other predicates).
func HasProductCategoriesWith(preds ...predicate.ProductCategory) predicate.Product {
return predicate.Product(func(s *sql.Selector) {
step := newProductCategoriesStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasBusinesses applies the HasEdge predicate on the "businesses" edge.
func HasBusinesses() predicate.Product {
return predicate.Product(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, BusinessesTable, BusinessesColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasBusinessesWith applies the HasEdge predicate on the "businesses" edge with a given conditions (other predicates).
func HasBusinessesWith(preds ...predicate.Business) predicate.Product {
return predicate.Product(func(s *sql.Selector) {
step := newBusinessesStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasUsers applies the HasEdge predicate on the "users" edge.
func HasUsers() predicate.Product {
2023-10-27 09:51:58 +00:00
return predicate.Product(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
2023-10-28 23:12:07 +00:00
sqlgraph.Edge(sqlgraph.M2O, true, UsersTable, UsersColumn),
2023-10-27 09:51:58 +00:00
)
sqlgraph.HasNeighbors(s, step)
})
}
2023-10-28 23:12:07 +00:00
// HasUsersWith applies the HasEdge predicate on the "users" edge with a given conditions (other predicates).
func HasUsersWith(preds ...predicate.User) predicate.Product {
2023-10-27 09:51:58 +00:00
return predicate.Product(func(s *sql.Selector) {
2023-10-28 23:12:07 +00:00
step := newUsersStep()
2023-10-27 09:51:58 +00:00
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.Product) predicate.Product {
return predicate.Product(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.Product) predicate.Product {
return predicate.Product(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.Product) predicate.Product {
return predicate.Product(sql.NotPredicates(p))
}