brand

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 brand type in the database.
	Label = "brand"
	// 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"
	// 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"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// EdgeSpus holds the string denoting the spus edge name in mutations.
	EdgeSpus = "spus"
	// Table holds the table name of the brand in the database.
	Table = "product_brand"
	// 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 = "brand_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 brand fields.

Functions

func And

func And(predicates ...predicate.Brand) predicate.Brand

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Brand

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Brand

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Brand

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Brand

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Brand

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Brand

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Brand

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

func CreatedAtNotIn

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

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

func DeletedAt

func DeletedAt(v time.Time) predicate.Brand

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

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Brand

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

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Brand

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

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Brand

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

func DeletedAtIn

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

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

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Brand

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

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Brand

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

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Brand

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

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Brand

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

func DeletedAtNotIn

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

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

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Brand

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

func Description

func Description(v string) predicate.Brand

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

func DescriptionContains

func DescriptionContains(v string) predicate.Brand

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

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Brand

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

func DescriptionEQ

func DescriptionEQ(v string) predicate.Brand

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

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Brand

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

func DescriptionGT

func DescriptionGT(v string) predicate.Brand

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

func DescriptionGTE

func DescriptionGTE(v string) predicate.Brand

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

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Brand

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

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Brand

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

func DescriptionIn

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

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

func DescriptionIsNil

func DescriptionIsNil() predicate.Brand

DescriptionIsNil applies the IsNil predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Brand

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

func DescriptionLTE

func DescriptionLTE(v string) predicate.Brand

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

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Brand

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

func DescriptionNotIn

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

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

func DescriptionNotNil

func DescriptionNotNil() predicate.Brand

DescriptionNotNil applies the NotNil predicate on the "description" field.

func HasSpus

func HasSpus() predicate.Brand

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

func HasSpusWith

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

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

func ID

func ID(id uint64) predicate.Brand

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uint64) predicate.Brand

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uint64) predicate.Brand

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uint64) predicate.Brand

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uint64) predicate.Brand

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uint64) predicate.Brand

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uint64) predicate.Brand

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Brand

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

func NameContains

func NameContains(v string) predicate.Brand

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

func NameContainsFold

func NameContainsFold(v string) predicate.Brand

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

func NameEQ

func NameEQ(v string) predicate.Brand

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

func NameEqualFold

func NameEqualFold(v string) predicate.Brand

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

func NameGT

func NameGT(v string) predicate.Brand

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

func NameGTE

func NameGTE(v string) predicate.Brand

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Brand

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Brand

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Brand

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

func NameLTE

func NameLTE(v string) predicate.Brand

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

func NameNEQ

func NameNEQ(v string) predicate.Brand

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

func NameNotIn

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

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

Or groups predicates with the OR operator between them.

func PicURL

func PicURL(v string) predicate.Brand

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

func PicURLContains

func PicURLContains(v string) predicate.Brand

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

func PicURLContainsFold

func PicURLContainsFold(v string) predicate.Brand

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

func PicURLEQ

func PicURLEQ(v string) predicate.Brand

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

func PicURLEqualFold

func PicURLEqualFold(v string) predicate.Brand

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

func PicURLGT

func PicURLGT(v string) predicate.Brand

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

func PicURLGTE

func PicURLGTE(v string) predicate.Brand

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

func PicURLHasPrefix

func PicURLHasPrefix(v string) predicate.Brand

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

func PicURLHasSuffix

func PicURLHasSuffix(v string) predicate.Brand

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

func PicURLIn

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

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

func PicURLLT

func PicURLLT(v string) predicate.Brand

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

func PicURLLTE

func PicURLLTE(v string) predicate.Brand

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

func PicURLNEQ

func PicURLNEQ(v string) predicate.Brand

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

func PicURLNotIn

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

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

func Sort

func Sort(v uint32) predicate.Brand

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

func SortEQ

func SortEQ(v uint32) predicate.Brand

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

func SortGT

func SortGT(v uint32) predicate.Brand

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

func SortGTE

func SortGTE(v uint32) predicate.Brand

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

func SortIn

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

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

func SortLT

func SortLT(v uint32) predicate.Brand

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

func SortLTE

func SortLTE(v uint32) predicate.Brand

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

func SortNEQ

func SortNEQ(v uint32) predicate.Brand

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

func SortNotIn

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

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

func Status

func Status(v uint8) predicate.Brand

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

func StatusEQ

func StatusEQ(v uint8) predicate.Brand

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

func StatusGT

func StatusGT(v uint8) predicate.Brand

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

func StatusGTE

func StatusGTE(v uint8) predicate.Brand

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

func StatusIn

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

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

func StatusIsNil

func StatusIsNil() predicate.Brand

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

func StatusLT

func StatusLT(v uint8) predicate.Brand

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

func StatusLTE

func StatusLTE(v uint8) predicate.Brand

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

func StatusNEQ

func StatusNEQ(v uint8) predicate.Brand

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

func StatusNotIn

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

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

func StatusNotNil

func StatusNotNil() predicate.Brand

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

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Brand

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Brand

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Brand

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Brand

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Brand

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Brand

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Brand

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

func UpdatedAtNotIn

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

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

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 ByDescription

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

ByDescription orders the results by the description 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 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