product

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the product type in the database.
	Label = "product"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldImage holds the string denoting the image field in the database.
	FieldImage = "image"
	// FieldURL holds the string denoting the url field in the database.
	FieldURL = "url"
	// FieldLastSell holds the string denoting the last_sell field in the database.
	FieldLastSell = "last_sell"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldBuildStatus holds the string denoting the build_status field in the database.
	FieldBuildStatus = "build_status"
	// EdgeWarehouse holds the string denoting the warehouse edge name in mutations.
	EdgeWarehouse = "warehouse"
	// EdgeVendor holds the string denoting the vendor edge name in mutations.
	EdgeVendor = "vendor"
	// Table holds the table name of the product in the database.
	Table = "products"
	// WarehouseTable is the table that holds the warehouse relation/edge.
	WarehouseTable = "products"
	// WarehouseInverseTable is the table name for the Warehouse entity.
	// It exists in this package in order to avoid circular dependency with the "warehouse" package.
	WarehouseInverseTable = "warehouses"
	// WarehouseColumn is the table column denoting the warehouse relation/edge.
	WarehouseColumn = "warehouse_products"
	// VendorTable is the table that holds the vendor relation/edge.
	VendorTable = "products"
	// VendorInverseTable is the table name for the Vendor entity.
	// It exists in this package in order to avoid circular dependency with the "vendor" package.
	VendorInverseTable = "vendors"
	// VendorColumn is the table column denoting the vendor relation/edge.
	VendorColumn = "vendor_products"
)
View Source
const DefaultBuildStatus enums.ProcessStatus = "none"
View Source
const DefaultStatus enums.ProcessStatus = "none"

Variables

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DescriptionValidator is a validator for the "description" field. It is called by the builders before save.
	DescriptionValidator func(string) error
	// ImageValidator is a validator for the "image" field. It is called by the builders before save.
	ImageValidator func(string) error
	// URLValidator is a validator for the "url" field. It is called by the builders before save.
	URLValidator func(string) error
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for product fields.

View Source
var ForeignKeys = []string{
	"vendor_products",
	"warehouse_products",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "products" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Product) predicate.Product

And groups predicates with the AND operator between them.

func BuildStatusEQ

func BuildStatusEQ(v enums.ProcessStatus) predicate.Product

BuildStatusEQ applies the EQ predicate on the "build_status" field.

func BuildStatusIn

func BuildStatusIn(vs ...enums.ProcessStatus) predicate.Product

BuildStatusIn applies the In predicate on the "build_status" field.

func BuildStatusNEQ

func BuildStatusNEQ(v enums.ProcessStatus) predicate.Product

BuildStatusNEQ applies the NEQ predicate on the "build_status" field.

func BuildStatusNotIn

func BuildStatusNotIn(vs ...enums.ProcessStatus) predicate.Product

BuildStatusNotIn applies the NotIn predicate on the "build_status" field.

func BuildStatusValidator

func BuildStatusValidator(bs enums.ProcessStatus) error

BuildStatusValidator is a validator for the "build_status" field enum values. It is called by the builders before save.

func CreatedAt

func CreatedAt(v time.Time) predicate.Product

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Product

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Product

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Product

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

func CreatedAtIn

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

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

func CreatedAtIsNil

func CreatedAtIsNil() predicate.Product

CreatedAtIsNil applies the IsNil predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Product

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Product

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Product

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

func CreatedAtNotIn

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

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

func CreatedAtNotNil

func CreatedAtNotNil() predicate.Product

CreatedAtNotNil applies the NotNil predicate on the "created_at" field.

func Description

func Description(v string) predicate.Product

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Product

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Product

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Product

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Product

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Product

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Product

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Product

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Product

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Product

DescriptionIn applies the In predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Product

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Product

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Product

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Product

DescriptionNotIn applies the NotIn predicate on the "description" field.

func HasVendor

func HasVendor() predicate.Product

HasVendor applies the HasEdge predicate on the "vendor" edge.

func HasVendorWith

func HasVendorWith(preds ...predicate.Vendor) predicate.Product

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

func HasWarehouse

func HasWarehouse() predicate.Product

HasWarehouse applies the HasEdge predicate on the "warehouse" edge.

func HasWarehouseWith

func HasWarehouseWith(preds ...predicate.Warehouse) predicate.Product

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

func ID

func ID(id uuid.UUID) predicate.Product

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Product

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Product

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Product

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Product

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Product

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Product

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Product

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Product

IDNotIn applies the NotIn predicate on the ID field.

func Image

func Image(v string) predicate.Product

Image applies equality check predicate on the "image" field. It's identical to ImageEQ.

func ImageContains

func ImageContains(v string) predicate.Product

ImageContains applies the Contains predicate on the "image" field.

func ImageContainsFold

func ImageContainsFold(v string) predicate.Product

ImageContainsFold applies the ContainsFold predicate on the "image" field.

func ImageEQ

func ImageEQ(v string) predicate.Product

ImageEQ applies the EQ predicate on the "image" field.

func ImageEqualFold

func ImageEqualFold(v string) predicate.Product

ImageEqualFold applies the EqualFold predicate on the "image" field.

func ImageGT

func ImageGT(v string) predicate.Product

ImageGT applies the GT predicate on the "image" field.

func ImageGTE

func ImageGTE(v string) predicate.Product

ImageGTE applies the GTE predicate on the "image" field.

func ImageHasPrefix

func ImageHasPrefix(v string) predicate.Product

ImageHasPrefix applies the HasPrefix predicate on the "image" field.

func ImageHasSuffix

func ImageHasSuffix(v string) predicate.Product

ImageHasSuffix applies the HasSuffix predicate on the "image" field.

func ImageIn

func ImageIn(vs ...string) predicate.Product

ImageIn applies the In predicate on the "image" field.

func ImageLT

func ImageLT(v string) predicate.Product

ImageLT applies the LT predicate on the "image" field.

func ImageLTE

func ImageLTE(v string) predicate.Product

ImageLTE applies the LTE predicate on the "image" field.

func ImageNEQ

func ImageNEQ(v string) predicate.Product

ImageNEQ applies the NEQ predicate on the "image" field.

func ImageNotIn

func ImageNotIn(vs ...string) predicate.Product

ImageNotIn applies the NotIn predicate on the "image" field.

func LastSell

func LastSell(v time.Time) predicate.Product

LastSell applies equality check predicate on the "last_sell" field. It's identical to LastSellEQ.

func LastSellEQ

func LastSellEQ(v time.Time) predicate.Product

LastSellEQ applies the EQ predicate on the "last_sell" field.

func LastSellGT

func LastSellGT(v time.Time) predicate.Product

LastSellGT applies the GT predicate on the "last_sell" field.

func LastSellGTE

func LastSellGTE(v time.Time) predicate.Product

LastSellGTE applies the GTE predicate on the "last_sell" field.

func LastSellIn

func LastSellIn(vs ...time.Time) predicate.Product

LastSellIn applies the In predicate on the "last_sell" field.

func LastSellIsNil

func LastSellIsNil() predicate.Product

LastSellIsNil applies the IsNil predicate on the "last_sell" field.

func LastSellLT

func LastSellLT(v time.Time) predicate.Product

LastSellLT applies the LT predicate on the "last_sell" field.

func LastSellLTE

func LastSellLTE(v time.Time) predicate.Product

LastSellLTE applies the LTE predicate on the "last_sell" field.

func LastSellNEQ

func LastSellNEQ(v time.Time) predicate.Product

LastSellNEQ applies the NEQ predicate on the "last_sell" field.

func LastSellNotIn

func LastSellNotIn(vs ...time.Time) predicate.Product

LastSellNotIn applies the NotIn predicate on the "last_sell" field.

func LastSellNotNil

func LastSellNotNil() predicate.Product

LastSellNotNil applies the NotNil predicate on the "last_sell" field.

func Name

func Name(v string) predicate.Product

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Product

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Product

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Product

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Product

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Product

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Product

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Product

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Product

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Product

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Product

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Product

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Product

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Product

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Product) predicate.Product

Or groups predicates with the OR operator between them.

func StatusEQ

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...enums.ProcessStatus) predicate.Product

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v enums.ProcessStatus) predicate.Product

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...enums.ProcessStatus) predicate.Product

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s enums.ProcessStatus) error

StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.

func URL

func URL(v string) predicate.Product

URL applies equality check predicate on the "url" field. It's identical to URLEQ.

func URLContains

func URLContains(v string) predicate.Product

URLContains applies the Contains predicate on the "url" field.

func URLContainsFold

func URLContainsFold(v string) predicate.Product

URLContainsFold applies the ContainsFold predicate on the "url" field.

func URLEQ

func URLEQ(v string) predicate.Product

URLEQ applies the EQ predicate on the "url" field.

func URLEqualFold

func URLEqualFold(v string) predicate.Product

URLEqualFold applies the EqualFold predicate on the "url" field.

func URLGT

func URLGT(v string) predicate.Product

URLGT applies the GT predicate on the "url" field.

func URLGTE

func URLGTE(v string) predicate.Product

URLGTE applies the GTE predicate on the "url" field.

func URLHasPrefix

func URLHasPrefix(v string) predicate.Product

URLHasPrefix applies the HasPrefix predicate on the "url" field.

func URLHasSuffix

func URLHasSuffix(v string) predicate.Product

URLHasSuffix applies the HasSuffix predicate on the "url" field.

func URLIn

func URLIn(vs ...string) predicate.Product

URLIn applies the In predicate on the "url" field.

func URLLT

func URLLT(v string) predicate.Product

URLLT applies the LT predicate on the "url" field.

func URLLTE

func URLLTE(v string) predicate.Product

URLLTE applies the LTE predicate on the "url" field.

func URLNEQ

func URLNEQ(v string) predicate.Product

URLNEQ applies the NEQ predicate on the "url" field.

func URLNotIn

func URLNotIn(vs ...string) predicate.Product

URLNotIn applies the NotIn predicate on the "url" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL