Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Category) predicate.Category
- func BigPicURL(v string) predicate.Category
- func BigPicURLContains(v string) predicate.Category
- func BigPicURLContainsFold(v string) predicate.Category
- func BigPicURLEQ(v string) predicate.Category
- func BigPicURLEqualFold(v string) predicate.Category
- func BigPicURLGT(v string) predicate.Category
- func BigPicURLGTE(v string) predicate.Category
- func BigPicURLHasPrefix(v string) predicate.Category
- func BigPicURLHasSuffix(v string) predicate.Category
- func BigPicURLIn(vs ...string) predicate.Category
- func BigPicURLIsNil() predicate.Category
- func BigPicURLLT(v string) predicate.Category
- func BigPicURLLTE(v string) predicate.Category
- func BigPicURLNEQ(v string) predicate.Category
- func BigPicURLNotIn(vs ...string) predicate.Category
- func BigPicURLNotNil() predicate.Category
- func CreatedAt(v time.Time) predicate.Category
- func CreatedAtEQ(v time.Time) predicate.Category
- func CreatedAtGT(v time.Time) predicate.Category
- func CreatedAtGTE(v time.Time) predicate.Category
- func CreatedAtIn(vs ...time.Time) predicate.Category
- func CreatedAtLT(v time.Time) predicate.Category
- func CreatedAtLTE(v time.Time) predicate.Category
- func CreatedAtNEQ(v time.Time) predicate.Category
- func CreatedAtNotIn(vs ...time.Time) predicate.Category
- func DeletedAt(v time.Time) predicate.Category
- func DeletedAtEQ(v time.Time) predicate.Category
- func DeletedAtGT(v time.Time) predicate.Category
- func DeletedAtGTE(v time.Time) predicate.Category
- func DeletedAtIn(vs ...time.Time) predicate.Category
- func DeletedAtIsNil() predicate.Category
- func DeletedAtLT(v time.Time) predicate.Category
- func DeletedAtLTE(v time.Time) predicate.Category
- func DeletedAtNEQ(v time.Time) predicate.Category
- func DeletedAtNotIn(vs ...time.Time) predicate.Category
- func DeletedAtNotNil() predicate.Category
- func HasChildren() predicate.Category
- func HasChildrenWith(preds ...predicate.Category) predicate.Category
- func HasParent() predicate.Category
- func HasParentWith(preds ...predicate.Category) predicate.Category
- func HasSpus() predicate.Category
- func HasSpusWith(preds ...predicate.Spu) predicate.Category
- func ID(id uint64) predicate.Category
- func IDEQ(id uint64) predicate.Category
- func IDGT(id uint64) predicate.Category
- func IDGTE(id uint64) predicate.Category
- func IDIn(ids ...uint64) predicate.Category
- func IDLT(id uint64) predicate.Category
- func IDLTE(id uint64) predicate.Category
- func IDNEQ(id uint64) predicate.Category
- func IDNotIn(ids ...uint64) predicate.Category
- func Name(v string) predicate.Category
- func NameContains(v string) predicate.Category
- func NameContainsFold(v string) predicate.Category
- func NameEQ(v string) predicate.Category
- func NameEqualFold(v string) predicate.Category
- func NameGT(v string) predicate.Category
- func NameGTE(v string) predicate.Category
- func NameHasPrefix(v string) predicate.Category
- func NameHasSuffix(v string) predicate.Category
- func NameIn(vs ...string) predicate.Category
- func NameLT(v string) predicate.Category
- func NameLTE(v string) predicate.Category
- func NameNEQ(v string) predicate.Category
- func NameNotIn(vs ...string) predicate.Category
- func Not(p predicate.Category) predicate.Category
- func Or(predicates ...predicate.Category) predicate.Category
- func ParentID(v uint64) predicate.Category
- func ParentIDEQ(v uint64) predicate.Category
- func ParentIDIn(vs ...uint64) predicate.Category
- func ParentIDIsNil() predicate.Category
- func ParentIDNEQ(v uint64) predicate.Category
- func ParentIDNotIn(vs ...uint64) predicate.Category
- func ParentIDNotNil() predicate.Category
- func PicURL(v string) predicate.Category
- func PicURLContains(v string) predicate.Category
- func PicURLContainsFold(v string) predicate.Category
- func PicURLEQ(v string) predicate.Category
- func PicURLEqualFold(v string) predicate.Category
- func PicURLGT(v string) predicate.Category
- func PicURLGTE(v string) predicate.Category
- func PicURLHasPrefix(v string) predicate.Category
- func PicURLHasSuffix(v string) predicate.Category
- func PicURLIn(vs ...string) predicate.Category
- func PicURLLT(v string) predicate.Category
- func PicURLLTE(v string) predicate.Category
- func PicURLNEQ(v string) predicate.Category
- func PicURLNotIn(vs ...string) predicate.Category
- func Sort(v uint32) predicate.Category
- func SortEQ(v uint32) predicate.Category
- func SortGT(v uint32) predicate.Category
- func SortGTE(v uint32) predicate.Category
- func SortIn(vs ...uint32) predicate.Category
- func SortLT(v uint32) predicate.Category
- func SortLTE(v uint32) predicate.Category
- func SortNEQ(v uint32) predicate.Category
- func SortNotIn(vs ...uint32) predicate.Category
- func Status(v uint8) predicate.Category
- func StatusEQ(v uint8) predicate.Category
- func StatusGT(v uint8) predicate.Category
- func StatusGTE(v uint8) predicate.Category
- func StatusIn(vs ...uint8) predicate.Category
- func StatusIsNil() predicate.Category
- func StatusLT(v uint8) predicate.Category
- func StatusLTE(v uint8) predicate.Category
- func StatusNEQ(v uint8) predicate.Category
- func StatusNotIn(vs ...uint8) predicate.Category
- func StatusNotNil() predicate.Category
- func UpdatedAt(v time.Time) predicate.Category
- func UpdatedAtEQ(v time.Time) predicate.Category
- func UpdatedAtGT(v time.Time) predicate.Category
- func UpdatedAtGTE(v time.Time) predicate.Category
- func UpdatedAtIn(vs ...time.Time) predicate.Category
- func UpdatedAtLT(v time.Time) predicate.Category
- func UpdatedAtLTE(v time.Time) predicate.Category
- func UpdatedAtNEQ(v time.Time) predicate.Category
- func UpdatedAtNotIn(vs ...time.Time) predicate.Category
- func ValidColumn(column string) bool
- type OrderOption
- func ByBigPicURL(opts ...sql.OrderTermOption) OrderOption
- func ByChildren(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func ByChildrenCount(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByName(opts ...sql.OrderTermOption) OrderOption
- func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption
- func ByParentID(opts ...sql.OrderTermOption) OrderOption
- func ByPicURL(opts ...sql.OrderTermOption) OrderOption
- func BySort(opts ...sql.OrderTermOption) OrderOption
- func BySpus(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption
- func BySpusCount(opts ...sql.OrderTermOption) OrderOption
- func ByStatus(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
Constants ¶
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 ¶
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"
var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldStatus, FieldSort, FieldDeletedAt, FieldParentID, FieldName, FieldPicURL, FieldBigPicURL, }
Columns holds all SQL columns for category fields.
Functions ¶
func BigPicURL ¶
BigPicURL applies equality check predicate on the "big_pic_url" field. It's identical to BigPicURLEQ.
func BigPicURLContains ¶
BigPicURLContains applies the Contains predicate on the "big_pic_url" field.
func BigPicURLContainsFold ¶
BigPicURLContainsFold applies the ContainsFold predicate on the "big_pic_url" field.
func BigPicURLEQ ¶
BigPicURLEQ applies the EQ predicate on the "big_pic_url" field.
func BigPicURLEqualFold ¶
BigPicURLEqualFold applies the EqualFold predicate on the "big_pic_url" field.
func BigPicURLGT ¶
BigPicURLGT applies the GT predicate on the "big_pic_url" field.
func BigPicURLGTE ¶
BigPicURLGTE applies the GTE predicate on the "big_pic_url" field.
func BigPicURLHasPrefix ¶
BigPicURLHasPrefix applies the HasPrefix predicate on the "big_pic_url" field.
func BigPicURLHasSuffix ¶
BigPicURLHasSuffix applies the HasSuffix predicate on the "big_pic_url" field.
func BigPicURLIn ¶
BigPicURLIn applies the In predicate on the "big_pic_url" field.
func BigPicURLIsNil ¶
BigPicURLIsNil applies the IsNil predicate on the "big_pic_url" field.
func BigPicURLLT ¶
BigPicURLLT applies the LT predicate on the "big_pic_url" field.
func BigPicURLLTE ¶
BigPicURLLTE applies the LTE predicate on the "big_pic_url" field.
func BigPicURLNEQ ¶
BigPicURLNEQ applies the NEQ predicate on the "big_pic_url" field.
func BigPicURLNotIn ¶
BigPicURLNotIn applies the NotIn predicate on the "big_pic_url" field.
func BigPicURLNotNil ¶
BigPicURLNotNil applies the NotNil predicate on the "big_pic_url" 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 HasChildren ¶
HasChildren applies the HasEdge predicate on the "children" edge.
func HasChildrenWith ¶
HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates).
func HasParentWith ¶
HasParentWith applies the HasEdge predicate on the "parent" edge with a given conditions (other predicates).
func HasSpusWith ¶
HasSpusWith applies the HasEdge predicate on the "spus" edge with a given conditions (other predicates).
func NameContains ¶
NameContains applies the Contains predicate on the "name" field.
func NameContainsFold ¶
NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameEqualFold ¶
NameEqualFold applies the EqualFold predicate on the "name" field.
func NameHasPrefix ¶
NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasSuffix ¶
NameHasSuffix applies the HasSuffix predicate on the "name" field.
func ParentID ¶
ParentID applies equality check predicate on the "parent_id" field. It's identical to ParentIDEQ.
func ParentIDEQ ¶
ParentIDEQ applies the EQ predicate on the "parent_id" field.
func ParentIDIn ¶
ParentIDIn applies the In predicate on the "parent_id" field.
func ParentIDIsNil ¶
ParentIDIsNil applies the IsNil predicate on the "parent_id" field.
func ParentIDNEQ ¶
ParentIDNEQ applies the NEQ predicate on the "parent_id" field.
func ParentIDNotIn ¶
ParentIDNotIn applies the NotIn predicate on the "parent_id" field.
func ParentIDNotNil ¶
ParentIDNotNil applies the NotNil predicate on the "parent_id" field.
func PicURL ¶
PicURL applies equality check predicate on the "pic_url" field. It's identical to PicURLEQ.
func PicURLContains ¶
PicURLContains applies the Contains predicate on the "pic_url" field.
func PicURLContainsFold ¶
PicURLContainsFold applies the ContainsFold predicate on the "pic_url" field.
func PicURLEqualFold ¶
PicURLEqualFold applies the EqualFold predicate on the "pic_url" field.
func PicURLHasPrefix ¶
PicURLHasPrefix applies the HasPrefix predicate on the "pic_url" field.
func PicURLHasSuffix ¶
PicURLHasSuffix applies the HasSuffix predicate on the "pic_url" field.
func PicURLNotIn ¶
PicURLNotIn applies the NotIn predicate on the "pic_url" field.
func Status ¶
Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
func StatusIsNil ¶
StatusIsNil applies the IsNil predicate on the "status" field.
func StatusNotIn ¶
StatusNotIn applies the NotIn predicate on the "status" field.
func StatusNotNil ¶
StatusNotNil applies the NotNil predicate on the "status" 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 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.