category

package
v0.0.0-...-22bdbfd Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the category type in the database.
	Label = "category"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// 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"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldSort holds the string denoting the sort field in the database.
	FieldSort = "sort"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldParentID holds the string denoting the parent_id field in the database.
	FieldParentID = "parent_id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldPicURL holds the string denoting the pic_url field in the database.
	FieldPicURL = "pic_url"
	// FieldBigPicURL holds the string denoting the big_pic_url field in the database.
	FieldBigPicURL = "big_pic_url"
	// EdgeSpus holds the string denoting the spus edge name in mutations.
	EdgeSpus = "spus"
	// EdgeParent holds the string denoting the parent edge name in mutations.
	EdgeParent = "parent"
	// EdgeChildren holds the string denoting the children edge name in mutations.
	EdgeChildren = "children"
	// Table holds the table name of the category in the database.
	Table = "product_category"
	// SpusTable is the table that holds the spus relation/edge.
	SpusTable = "product_spu"
	// SpusInverseTable is the table name for the Spu entity.
	// It exists in this package in order to avoid circular dependency with the "spu" package.
	SpusInverseTable = "product_spu"
	// SpusColumn is the table column denoting the spus relation/edge.
	SpusColumn = "category_id"
	// ParentTable is the table that holds the parent relation/edge.
	ParentTable = "product_category"
	// ParentColumn is the table column denoting the parent relation/edge.
	ParentColumn = "parent_id"
	// ChildrenTable is the table that holds the children relation/edge.
	ChildrenTable = "product_category"
	// ChildrenColumn is the table column denoting the children relation/edge.
	ChildrenColumn = "parent_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
	// DefaultStatus holds the default value on creation for the "status" field.
	DefaultStatus uint8
	// DefaultSort holds the default value on creation for the "sort" field.
	DefaultSort uint32
)

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/agui-coder/simple-admin-product-rpc/ent/runtime"

Columns holds all SQL columns for category fields.

Functions

func And

func And(predicates ...predicate.Category) predicate.Category

And groups predicates with the AND operator between them.

func BigPicURL

func BigPicURL(v string) predicate.Category

BigPicURL applies equality check predicate on the "big_pic_url" field. It's identical to BigPicURLEQ.

func BigPicURLContains

func BigPicURLContains(v string) predicate.Category

BigPicURLContains applies the Contains predicate on the "big_pic_url" field.

func BigPicURLContainsFold

func BigPicURLContainsFold(v string) predicate.Category

BigPicURLContainsFold applies the ContainsFold predicate on the "big_pic_url" field.

func BigPicURLEQ

func BigPicURLEQ(v string) predicate.Category

BigPicURLEQ applies the EQ predicate on the "big_pic_url" field.

func BigPicURLEqualFold

func BigPicURLEqualFold(v string) predicate.Category

BigPicURLEqualFold applies the EqualFold predicate on the "big_pic_url" field.

func BigPicURLGT

func BigPicURLGT(v string) predicate.Category

BigPicURLGT applies the GT predicate on the "big_pic_url" field.

func BigPicURLGTE

func BigPicURLGTE(v string) predicate.Category

BigPicURLGTE applies the GTE predicate on the "big_pic_url" field.

func BigPicURLHasPrefix

func BigPicURLHasPrefix(v string) predicate.Category

BigPicURLHasPrefix applies the HasPrefix predicate on the "big_pic_url" field.

func BigPicURLHasSuffix

func BigPicURLHasSuffix(v string) predicate.Category

BigPicURLHasSuffix applies the HasSuffix predicate on the "big_pic_url" field.

func BigPicURLIn

func BigPicURLIn(vs ...string) predicate.Category

BigPicURLIn applies the In predicate on the "big_pic_url" field.

func BigPicURLIsNil

func BigPicURLIsNil() predicate.Category

BigPicURLIsNil applies the IsNil predicate on the "big_pic_url" field.

func BigPicURLLT

func BigPicURLLT(v string) predicate.Category

BigPicURLLT applies the LT predicate on the "big_pic_url" field.

func BigPicURLLTE

func BigPicURLLTE(v string) predicate.Category

BigPicURLLTE applies the LTE predicate on the "big_pic_url" field.

func BigPicURLNEQ

func BigPicURLNEQ(v string) predicate.Category

BigPicURLNEQ applies the NEQ predicate on the "big_pic_url" field.

func BigPicURLNotIn

func BigPicURLNotIn(vs ...string) predicate.Category

BigPicURLNotIn applies the NotIn predicate on the "big_pic_url" field.

func BigPicURLNotNil

func BigPicURLNotNil() predicate.Category

BigPicURLNotNil applies the NotNil predicate on the "big_pic_url" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Category

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Category

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Category

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Category

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Category

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Category

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Category

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v time.Time) predicate.Category

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

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Category

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

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Category

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

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Category

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

func DeletedAtIn

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

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

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Category

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

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Category

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

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Category

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

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Category

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

func DeletedAtNotIn

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

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

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Category

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

func HasChildren

func HasChildren() predicate.Category

HasChildren applies the HasEdge predicate on the "children" edge.

func HasChildrenWith

func HasChildrenWith(preds ...predicate.Category) predicate.Category

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

func HasParent

func HasParent() predicate.Category

HasParent applies the HasEdge predicate on the "parent" edge.

func HasParentWith

func HasParentWith(preds ...predicate.Category) predicate.Category

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

func HasSpus

func HasSpus() predicate.Category

HasSpus applies the HasEdge predicate on the "spus" edge.

func HasSpusWith

func HasSpusWith(preds ...predicate.Spu) predicate.Category

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

func ID

func ID(id uint64) predicate.Category

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uint64) predicate.Category

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uint64) predicate.Category

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uint64) predicate.Category

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uint64) predicate.Category

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uint64) predicate.Category

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uint64) predicate.Category

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uint64) predicate.Category

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uint64) predicate.Category

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Category

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

func NameContains

func NameContains(v string) predicate.Category

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

func NameContainsFold

func NameContainsFold(v string) predicate.Category

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

func NameEQ

func NameEQ(v string) predicate.Category

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

func NameEqualFold

func NameEqualFold(v string) predicate.Category

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

func NameGT

func NameGT(v string) predicate.Category

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

func NameGTE

func NameGTE(v string) predicate.Category

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Category

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Category

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Category

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

func NameLTE

func NameLTE(v string) predicate.Category

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

func NameNEQ

func NameNEQ(v string) predicate.Category

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

func NameNotIn

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

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.Category) predicate.Category

Or groups predicates with the OR operator between them.

func ParentID

func ParentID(v uint64) predicate.Category

ParentID applies equality check predicate on the "parent_id" field. It's identical to ParentIDEQ.

func ParentIDEQ

func ParentIDEQ(v uint64) predicate.Category

ParentIDEQ applies the EQ predicate on the "parent_id" field.

func ParentIDIn

func ParentIDIn(vs ...uint64) predicate.Category

ParentIDIn applies the In predicate on the "parent_id" field.

func ParentIDIsNil

func ParentIDIsNil() predicate.Category

ParentIDIsNil applies the IsNil predicate on the "parent_id" field.

func ParentIDNEQ

func ParentIDNEQ(v uint64) predicate.Category

ParentIDNEQ applies the NEQ predicate on the "parent_id" field.

func ParentIDNotIn

func ParentIDNotIn(vs ...uint64) predicate.Category

ParentIDNotIn applies the NotIn predicate on the "parent_id" field.

func ParentIDNotNil

func ParentIDNotNil() predicate.Category

ParentIDNotNil applies the NotNil predicate on the "parent_id" field.

func PicURL

func PicURL(v string) predicate.Category

PicURL applies equality check predicate on the "pic_url" field. It's identical to PicURLEQ.

func PicURLContains

func PicURLContains(v string) predicate.Category

PicURLContains applies the Contains predicate on the "pic_url" field.

func PicURLContainsFold

func PicURLContainsFold(v string) predicate.Category

PicURLContainsFold applies the ContainsFold predicate on the "pic_url" field.

func PicURLEQ

func PicURLEQ(v string) predicate.Category

PicURLEQ applies the EQ predicate on the "pic_url" field.

func PicURLEqualFold

func PicURLEqualFold(v string) predicate.Category

PicURLEqualFold applies the EqualFold predicate on the "pic_url" field.

func PicURLGT

func PicURLGT(v string) predicate.Category

PicURLGT applies the GT predicate on the "pic_url" field.

func PicURLGTE

func PicURLGTE(v string) predicate.Category

PicURLGTE applies the GTE predicate on the "pic_url" field.

func PicURLHasPrefix

func PicURLHasPrefix(v string) predicate.Category

PicURLHasPrefix applies the HasPrefix predicate on the "pic_url" field.

func PicURLHasSuffix

func PicURLHasSuffix(v string) predicate.Category

PicURLHasSuffix applies the HasSuffix predicate on the "pic_url" field.

func PicURLIn

func PicURLIn(vs ...string) predicate.Category

PicURLIn applies the In predicate on the "pic_url" field.

func PicURLLT

func PicURLLT(v string) predicate.Category

PicURLLT applies the LT predicate on the "pic_url" field.

func PicURLLTE

func PicURLLTE(v string) predicate.Category

PicURLLTE applies the LTE predicate on the "pic_url" field.

func PicURLNEQ

func PicURLNEQ(v string) predicate.Category

PicURLNEQ applies the NEQ predicate on the "pic_url" field.

func PicURLNotIn

func PicURLNotIn(vs ...string) predicate.Category

PicURLNotIn applies the NotIn predicate on the "pic_url" field.

func Sort

func Sort(v uint32) predicate.Category

Sort applies equality check predicate on the "sort" field. It's identical to SortEQ.

func SortEQ

func SortEQ(v uint32) predicate.Category

SortEQ applies the EQ predicate on the "sort" field.

func SortGT

func SortGT(v uint32) predicate.Category

SortGT applies the GT predicate on the "sort" field.

func SortGTE

func SortGTE(v uint32) predicate.Category

SortGTE applies the GTE predicate on the "sort" field.

func SortIn

func SortIn(vs ...uint32) predicate.Category

SortIn applies the In predicate on the "sort" field.

func SortLT

func SortLT(v uint32) predicate.Category

SortLT applies the LT predicate on the "sort" field.

func SortLTE

func SortLTE(v uint32) predicate.Category

SortLTE applies the LTE predicate on the "sort" field.

func SortNEQ

func SortNEQ(v uint32) predicate.Category

SortNEQ applies the NEQ predicate on the "sort" field.

func SortNotIn

func SortNotIn(vs ...uint32) predicate.Category

SortNotIn applies the NotIn predicate on the "sort" field.

func Status

func Status(v uint8) predicate.Category

Status applies equality check predicate on the "status" field. It's identical to StatusEQ.

func StatusEQ

func StatusEQ(v uint8) predicate.Category

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

func StatusGT

func StatusGT(v uint8) predicate.Category

StatusGT applies the GT predicate on the "status" field.

func StatusGTE

func StatusGTE(v uint8) predicate.Category

StatusGTE applies the GTE predicate on the "status" field.

func StatusIn

func StatusIn(vs ...uint8) predicate.Category

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

func StatusIsNil

func StatusIsNil() predicate.Category

StatusIsNil applies the IsNil predicate on the "status" field.

func StatusLT

func StatusLT(v uint8) predicate.Category

StatusLT applies the LT predicate on the "status" field.

func StatusLTE

func StatusLTE(v uint8) predicate.Category

StatusLTE applies the LTE predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v uint8) predicate.Category

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

func StatusNotIn

func StatusNotIn(vs ...uint8) predicate.Category

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

func StatusNotNil

func StatusNotNil() predicate.Category

StatusNotNil applies the NotNil predicate on the "status" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Category

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Category

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Category

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Category

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Category

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Category

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Category

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

func UpdatedAtNotIn

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

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 Category queries.

func ByBigPicURL

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

ByBigPicURL orders the results by the big_pic_url field.

func ByChildren

func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByChildren orders the results by children terms.

func ByChildrenCount

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

ByChildrenCount orders the results by children count.

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 ByName

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

ByName orders the results by the name field.

func ByParentField

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

ByParentField orders the results by parent field.

func ByParentID

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

ByParentID orders the results by the parent_id field.

func ByPicURL

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

ByPicURL orders the results by the pic_url field.

func BySort

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

BySort orders the results by the sort field.

func BySpus

func BySpus(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

BySpus orders the results by spus terms.

func BySpusCount

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

BySpusCount orders the results by spus count.

func ByStatus

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

ByStatus orders the results by the status 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