Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Brand
- type BrandClient
- func (c *BrandClient) Create() *BrandCreate
- func (c *BrandClient) CreateBulk(builders ...*BrandCreate) *BrandCreateBulk
- func (c *BrandClient) Delete() *BrandDelete
- func (c *BrandClient) DeleteOne(b *Brand) *BrandDeleteOne
- func (c *BrandClient) DeleteOneID(id uint64) *BrandDeleteOne
- func (c *BrandClient) Get(ctx context.Context, id uint64) (*Brand, error)
- func (c *BrandClient) GetX(ctx context.Context, id uint64) *Brand
- func (c *BrandClient) Hooks() []Hook
- func (c *BrandClient) Intercept(interceptors ...Interceptor)
- func (c *BrandClient) Interceptors() []Interceptor
- func (c *BrandClient) MapCreateBulk(slice any, setFunc func(*BrandCreate, int)) *BrandCreateBulk
- func (c *BrandClient) Query() *BrandQuery
- func (c *BrandClient) QuerySpus(b *Brand) *SpuQuery
- func (c *BrandClient) Update() *BrandUpdate
- func (c *BrandClient) UpdateOne(b *Brand) *BrandUpdateOne
- func (c *BrandClient) UpdateOneID(id uint64) *BrandUpdateOne
- func (c *BrandClient) Use(hooks ...Hook)
- type BrandCreate
- func (bc *BrandCreate) AddSpuIDs(ids ...uint64) *BrandCreate
- func (bc *BrandCreate) AddSpus(s ...*Spu) *BrandCreate
- func (bc *BrandCreate) Exec(ctx context.Context) error
- func (bc *BrandCreate) ExecX(ctx context.Context)
- func (bc *BrandCreate) Mutation() *BrandMutation
- func (bc *BrandCreate) Save(ctx context.Context) (*Brand, error)
- func (bc *BrandCreate) SaveX(ctx context.Context) *Brand
- func (bc *BrandCreate) SetCreatedAt(t time.Time) *BrandCreate
- func (bc *BrandCreate) SetDeletedAt(t time.Time) *BrandCreate
- func (bc *BrandCreate) SetDescription(s string) *BrandCreate
- func (bc *BrandCreate) SetID(u uint64) *BrandCreate
- func (bc *BrandCreate) SetName(s string) *BrandCreate
- func (bc *BrandCreate) SetNillableCreatedAt(t *time.Time) *BrandCreate
- func (bc *BrandCreate) SetNillableDeletedAt(t *time.Time) *BrandCreate
- func (bc *BrandCreate) SetNillableDescription(s *string) *BrandCreate
- func (bc *BrandCreate) SetNillableSort(u *uint32) *BrandCreate
- func (bc *BrandCreate) SetNillableStatus(u *uint8) *BrandCreate
- func (bc *BrandCreate) SetNillableUpdatedAt(t *time.Time) *BrandCreate
- func (b *BrandCreate) SetNotNilDeletedAt(value *time.Time) *BrandCreate
- func (b *BrandCreate) SetNotNilDescription(value *string) *BrandCreate
- func (b *BrandCreate) SetNotNilName(value *string) *BrandCreate
- func (b *BrandCreate) SetNotNilPicURL(value *string) *BrandCreate
- func (b *BrandCreate) SetNotNilSort(value *uint32) *BrandCreate
- func (b *BrandCreate) SetNotNilStatus(value *uint8) *BrandCreate
- func (b *BrandCreate) SetNotNilUpdatedAt(value *time.Time) *BrandCreate
- func (bc *BrandCreate) SetPicURL(s string) *BrandCreate
- func (bc *BrandCreate) SetSort(u uint32) *BrandCreate
- func (bc *BrandCreate) SetStatus(u uint8) *BrandCreate
- func (bc *BrandCreate) SetUpdatedAt(t time.Time) *BrandCreate
- type BrandCreateBulk
- type BrandDelete
- type BrandDeleteOne
- type BrandEdges
- type BrandGroupBy
- func (bgb *BrandGroupBy) Aggregate(fns ...AggregateFunc) *BrandGroupBy
- func (s *BrandGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BrandGroupBy) BoolX(ctx context.Context) bool
- func (s *BrandGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BrandGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BrandGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BrandGroupBy) Float64X(ctx context.Context) float64
- func (s *BrandGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BrandGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BrandGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BrandGroupBy) IntX(ctx context.Context) int
- func (s *BrandGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BrandGroupBy) IntsX(ctx context.Context) []int
- func (bgb *BrandGroupBy) Scan(ctx context.Context, v any) error
- func (s *BrandGroupBy) ScanX(ctx context.Context, v any)
- func (s *BrandGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BrandGroupBy) StringX(ctx context.Context) string
- func (s *BrandGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BrandGroupBy) StringsX(ctx context.Context) []string
- type BrandMutation
- func (m *BrandMutation) AddField(name string, value ent.Value) error
- func (m *BrandMutation) AddSort(u int32)
- func (m *BrandMutation) AddSpuIDs(ids ...uint64)
- func (m *BrandMutation) AddStatus(u int8)
- func (m *BrandMutation) AddedEdges() []string
- func (m *BrandMutation) AddedField(name string) (ent.Value, bool)
- func (m *BrandMutation) AddedFields() []string
- func (m *BrandMutation) AddedIDs(name string) []ent.Value
- func (m *BrandMutation) AddedSort() (r int32, exists bool)
- func (m *BrandMutation) AddedStatus() (r int8, exists bool)
- func (m *BrandMutation) ClearDeletedAt()
- func (m *BrandMutation) ClearDescription()
- func (m *BrandMutation) ClearEdge(name string) error
- func (m *BrandMutation) ClearField(name string) error
- func (m *BrandMutation) ClearSpus()
- func (m *BrandMutation) ClearStatus()
- func (m *BrandMutation) ClearedEdges() []string
- func (m *BrandMutation) ClearedFields() []string
- func (m BrandMutation) Client() *Client
- func (m *BrandMutation) CreatedAt() (r time.Time, exists bool)
- func (m *BrandMutation) DeletedAt() (r time.Time, exists bool)
- func (m *BrandMutation) DeletedAtCleared() bool
- func (m *BrandMutation) Description() (r string, exists bool)
- func (m *BrandMutation) DescriptionCleared() bool
- func (m *BrandMutation) EdgeCleared(name string) bool
- func (m *BrandMutation) Field(name string) (ent.Value, bool)
- func (m *BrandMutation) FieldCleared(name string) bool
- func (m *BrandMutation) Fields() []string
- func (m *BrandMutation) ID() (id uint64, exists bool)
- func (m *BrandMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *BrandMutation) Name() (r string, exists bool)
- func (m *BrandMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *BrandMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *BrandMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *BrandMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BrandMutation) OldName(ctx context.Context) (v string, err error)
- func (m *BrandMutation) OldPicURL(ctx context.Context) (v string, err error)
- func (m *BrandMutation) OldSort(ctx context.Context) (v uint32, err error)
- func (m *BrandMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *BrandMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *BrandMutation) Op() Op
- func (m *BrandMutation) PicURL() (r string, exists bool)
- func (m *BrandMutation) RemoveSpuIDs(ids ...uint64)
- func (m *BrandMutation) RemovedEdges() []string
- func (m *BrandMutation) RemovedIDs(name string) []ent.Value
- func (m *BrandMutation) RemovedSpusIDs() (ids []uint64)
- func (m *BrandMutation) ResetCreatedAt()
- func (m *BrandMutation) ResetDeletedAt()
- func (m *BrandMutation) ResetDescription()
- func (m *BrandMutation) ResetEdge(name string) error
- func (m *BrandMutation) ResetField(name string) error
- func (m *BrandMutation) ResetName()
- func (m *BrandMutation) ResetPicURL()
- func (m *BrandMutation) ResetSort()
- func (m *BrandMutation) ResetSpus()
- func (m *BrandMutation) ResetStatus()
- func (m *BrandMutation) ResetUpdatedAt()
- func (m *BrandMutation) SetCreatedAt(t time.Time)
- func (m *BrandMutation) SetDeletedAt(t time.Time)
- func (m *BrandMutation) SetDescription(s string)
- func (m *BrandMutation) SetField(name string, value ent.Value) error
- func (m *BrandMutation) SetID(id uint64)
- func (m *BrandMutation) SetName(s string)
- func (m *BrandMutation) SetOp(op Op)
- func (m *BrandMutation) SetPicURL(s string)
- func (m *BrandMutation) SetSort(u uint32)
- func (m *BrandMutation) SetStatus(u uint8)
- func (m *BrandMutation) SetUpdatedAt(t time.Time)
- func (m *BrandMutation) Sort() (r uint32, exists bool)
- func (m *BrandMutation) SpusCleared() bool
- func (m *BrandMutation) SpusIDs() (ids []uint64)
- func (m *BrandMutation) Status() (r uint8, exists bool)
- func (m *BrandMutation) StatusCleared() bool
- func (m BrandMutation) Tx() (*Tx, error)
- func (m *BrandMutation) Type() string
- func (m *BrandMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *BrandMutation) Where(ps ...predicate.Brand)
- func (m *BrandMutation) WhereP(ps ...func(*sql.Selector))
- type BrandPageList
- type BrandPager
- type BrandPaginateOption
- type BrandQuery
- func (bq *BrandQuery) Aggregate(fns ...AggregateFunc) *BrandSelect
- func (bq *BrandQuery) All(ctx context.Context) ([]*Brand, error)
- func (bq *BrandQuery) AllX(ctx context.Context) []*Brand
- func (bq *BrandQuery) Clone() *BrandQuery
- func (bq *BrandQuery) Count(ctx context.Context) (int, error)
- func (bq *BrandQuery) CountX(ctx context.Context) int
- func (bq *BrandQuery) Exist(ctx context.Context) (bool, error)
- func (bq *BrandQuery) ExistX(ctx context.Context) bool
- func (bq *BrandQuery) First(ctx context.Context) (*Brand, error)
- func (bq *BrandQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (bq *BrandQuery) FirstIDX(ctx context.Context) uint64
- func (bq *BrandQuery) FirstX(ctx context.Context) *Brand
- func (bq *BrandQuery) GroupBy(field string, fields ...string) *BrandGroupBy
- func (bq *BrandQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (bq *BrandQuery) IDsX(ctx context.Context) []uint64
- func (bq *BrandQuery) Limit(limit int) *BrandQuery
- func (bq *BrandQuery) Offset(offset int) *BrandQuery
- func (bq *BrandQuery) Only(ctx context.Context) (*Brand, error)
- func (bq *BrandQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (bq *BrandQuery) OnlyIDX(ctx context.Context) uint64
- func (bq *BrandQuery) OnlyX(ctx context.Context) *Brand
- func (bq *BrandQuery) Order(o ...brand.OrderOption) *BrandQuery
- func (b *BrandQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*BrandPageList, error)
- func (bq *BrandQuery) QuerySpus() *SpuQuery
- func (bq *BrandQuery) Select(fields ...string) *BrandSelect
- func (bq *BrandQuery) Unique(unique bool) *BrandQuery
- func (bq *BrandQuery) Where(ps ...predicate.Brand) *BrandQuery
- func (bq *BrandQuery) WithSpus(opts ...func(*SpuQuery)) *BrandQuery
- type BrandSelect
- func (bs *BrandSelect) Aggregate(fns ...AggregateFunc) *BrandSelect
- func (s *BrandSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BrandSelect) BoolX(ctx context.Context) bool
- func (s *BrandSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BrandSelect) BoolsX(ctx context.Context) []bool
- func (s *BrandSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BrandSelect) Float64X(ctx context.Context) float64
- func (s *BrandSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BrandSelect) Float64sX(ctx context.Context) []float64
- func (s *BrandSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BrandSelect) IntX(ctx context.Context) int
- func (s *BrandSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BrandSelect) IntsX(ctx context.Context) []int
- func (bs *BrandSelect) Scan(ctx context.Context, v any) error
- func (s *BrandSelect) ScanX(ctx context.Context, v any)
- func (s *BrandSelect) String(ctx context.Context) (_ string, err error)
- func (s *BrandSelect) StringX(ctx context.Context) string
- func (s *BrandSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BrandSelect) StringsX(ctx context.Context) []string
- type BrandUpdate
- func (bu *BrandUpdate) AddSort(u int32) *BrandUpdate
- func (bu *BrandUpdate) AddSpuIDs(ids ...uint64) *BrandUpdate
- func (bu *BrandUpdate) AddSpus(s ...*Spu) *BrandUpdate
- func (bu *BrandUpdate) AddStatus(u int8) *BrandUpdate
- func (bu *BrandUpdate) ClearDeletedAt() *BrandUpdate
- func (bu *BrandUpdate) ClearDescription() *BrandUpdate
- func (bu *BrandUpdate) ClearSpus() *BrandUpdate
- func (bu *BrandUpdate) ClearStatus() *BrandUpdate
- func (bu *BrandUpdate) Exec(ctx context.Context) error
- func (bu *BrandUpdate) ExecX(ctx context.Context)
- func (bu *BrandUpdate) Mutation() *BrandMutation
- func (bu *BrandUpdate) RemoveSpuIDs(ids ...uint64) *BrandUpdate
- func (bu *BrandUpdate) RemoveSpus(s ...*Spu) *BrandUpdate
- func (bu *BrandUpdate) Save(ctx context.Context) (int, error)
- func (bu *BrandUpdate) SaveX(ctx context.Context) int
- func (bu *BrandUpdate) SetDeletedAt(t time.Time) *BrandUpdate
- func (bu *BrandUpdate) SetDescription(s string) *BrandUpdate
- func (bu *BrandUpdate) SetName(s string) *BrandUpdate
- func (bu *BrandUpdate) SetNillableDeletedAt(t *time.Time) *BrandUpdate
- func (bu *BrandUpdate) SetNillableDescription(s *string) *BrandUpdate
- func (bu *BrandUpdate) SetNillableSort(u *uint32) *BrandUpdate
- func (bu *BrandUpdate) SetNillableStatus(u *uint8) *BrandUpdate
- func (b *BrandUpdate) SetNotNilDeletedAt(value *time.Time) *BrandUpdate
- func (b *BrandUpdate) SetNotNilDescription(value *string) *BrandUpdate
- func (b *BrandUpdate) SetNotNilName(value *string) *BrandUpdate
- func (b *BrandUpdate) SetNotNilPicURL(value *string) *BrandUpdate
- func (b *BrandUpdate) SetNotNilSort(value *uint32) *BrandUpdate
- func (b *BrandUpdate) SetNotNilStatus(value *uint8) *BrandUpdate
- func (b *BrandUpdate) SetNotNilUpdatedAt(value *time.Time) *BrandUpdate
- func (bu *BrandUpdate) SetPicURL(s string) *BrandUpdate
- func (bu *BrandUpdate) SetSort(u uint32) *BrandUpdate
- func (bu *BrandUpdate) SetStatus(u uint8) *BrandUpdate
- func (bu *BrandUpdate) SetUpdatedAt(t time.Time) *BrandUpdate
- func (bu *BrandUpdate) Where(ps ...predicate.Brand) *BrandUpdate
- type BrandUpdateOne
- func (buo *BrandUpdateOne) AddSort(u int32) *BrandUpdateOne
- func (buo *BrandUpdateOne) AddSpuIDs(ids ...uint64) *BrandUpdateOne
- func (buo *BrandUpdateOne) AddSpus(s ...*Spu) *BrandUpdateOne
- func (buo *BrandUpdateOne) AddStatus(u int8) *BrandUpdateOne
- func (buo *BrandUpdateOne) ClearDeletedAt() *BrandUpdateOne
- func (buo *BrandUpdateOne) ClearDescription() *BrandUpdateOne
- func (buo *BrandUpdateOne) ClearSpus() *BrandUpdateOne
- func (buo *BrandUpdateOne) ClearStatus() *BrandUpdateOne
- func (buo *BrandUpdateOne) Exec(ctx context.Context) error
- func (buo *BrandUpdateOne) ExecX(ctx context.Context)
- func (buo *BrandUpdateOne) Mutation() *BrandMutation
- func (buo *BrandUpdateOne) RemoveSpuIDs(ids ...uint64) *BrandUpdateOne
- func (buo *BrandUpdateOne) RemoveSpus(s ...*Spu) *BrandUpdateOne
- func (buo *BrandUpdateOne) Save(ctx context.Context) (*Brand, error)
- func (buo *BrandUpdateOne) SaveX(ctx context.Context) *Brand
- func (buo *BrandUpdateOne) Select(field string, fields ...string) *BrandUpdateOne
- func (buo *BrandUpdateOne) SetDeletedAt(t time.Time) *BrandUpdateOne
- func (buo *BrandUpdateOne) SetDescription(s string) *BrandUpdateOne
- func (buo *BrandUpdateOne) SetName(s string) *BrandUpdateOne
- func (buo *BrandUpdateOne) SetNillableDeletedAt(t *time.Time) *BrandUpdateOne
- func (buo *BrandUpdateOne) SetNillableDescription(s *string) *BrandUpdateOne
- func (buo *BrandUpdateOne) SetNillableSort(u *uint32) *BrandUpdateOne
- func (buo *BrandUpdateOne) SetNillableStatus(u *uint8) *BrandUpdateOne
- func (b *BrandUpdateOne) SetNotNilDeletedAt(value *time.Time) *BrandUpdateOne
- func (b *BrandUpdateOne) SetNotNilDescription(value *string) *BrandUpdateOne
- func (b *BrandUpdateOne) SetNotNilName(value *string) *BrandUpdateOne
- func (b *BrandUpdateOne) SetNotNilPicURL(value *string) *BrandUpdateOne
- func (b *BrandUpdateOne) SetNotNilSort(value *uint32) *BrandUpdateOne
- func (b *BrandUpdateOne) SetNotNilStatus(value *uint8) *BrandUpdateOne
- func (b *BrandUpdateOne) SetNotNilUpdatedAt(value *time.Time) *BrandUpdateOne
- func (buo *BrandUpdateOne) SetPicURL(s string) *BrandUpdateOne
- func (buo *BrandUpdateOne) SetSort(u uint32) *BrandUpdateOne
- func (buo *BrandUpdateOne) SetStatus(u uint8) *BrandUpdateOne
- func (buo *BrandUpdateOne) SetUpdatedAt(t time.Time) *BrandUpdateOne
- func (buo *BrandUpdateOne) Where(ps ...predicate.Brand) *BrandUpdateOne
- type Brands
- type Categories
- type Category
- func (c *Category) QueryChildren() *CategoryQuery
- func (c *Category) QueryParent() *CategoryQuery
- func (c *Category) QuerySpus() *SpuQuery
- func (c *Category) String() string
- func (c *Category) Unwrap() *Category
- func (c *Category) Update() *CategoryUpdateOne
- func (c *Category) Value(name string) (ent.Value, error)
- type CategoryClient
- func (c *CategoryClient) Create() *CategoryCreate
- func (c *CategoryClient) CreateBulk(builders ...*CategoryCreate) *CategoryCreateBulk
- func (c *CategoryClient) Delete() *CategoryDelete
- func (c *CategoryClient) DeleteOne(ca *Category) *CategoryDeleteOne
- func (c *CategoryClient) DeleteOneID(id uint64) *CategoryDeleteOne
- func (c *CategoryClient) Get(ctx context.Context, id uint64) (*Category, error)
- func (c *CategoryClient) GetX(ctx context.Context, id uint64) *Category
- func (c *CategoryClient) Hooks() []Hook
- func (c *CategoryClient) Intercept(interceptors ...Interceptor)
- func (c *CategoryClient) Interceptors() []Interceptor
- func (c *CategoryClient) MapCreateBulk(slice any, setFunc func(*CategoryCreate, int)) *CategoryCreateBulk
- func (c *CategoryClient) Query() *CategoryQuery
- func (c *CategoryClient) QueryChildren(ca *Category) *CategoryQuery
- func (c *CategoryClient) QueryParent(ca *Category) *CategoryQuery
- func (c *CategoryClient) QuerySpus(ca *Category) *SpuQuery
- func (c *CategoryClient) Update() *CategoryUpdate
- func (c *CategoryClient) UpdateOne(ca *Category) *CategoryUpdateOne
- func (c *CategoryClient) UpdateOneID(id uint64) *CategoryUpdateOne
- func (c *CategoryClient) Use(hooks ...Hook)
- type CategoryCreate
- func (cc *CategoryCreate) AddChildIDs(ids ...uint64) *CategoryCreate
- func (cc *CategoryCreate) AddChildren(c ...*Category) *CategoryCreate
- func (cc *CategoryCreate) AddSpuIDs(ids ...uint64) *CategoryCreate
- func (cc *CategoryCreate) AddSpus(s ...*Spu) *CategoryCreate
- func (cc *CategoryCreate) Exec(ctx context.Context) error
- func (cc *CategoryCreate) ExecX(ctx context.Context)
- func (cc *CategoryCreate) Mutation() *CategoryMutation
- func (cc *CategoryCreate) Save(ctx context.Context) (*Category, error)
- func (cc *CategoryCreate) SaveX(ctx context.Context) *Category
- func (cc *CategoryCreate) SetBigPicURL(s string) *CategoryCreate
- func (cc *CategoryCreate) SetCreatedAt(t time.Time) *CategoryCreate
- func (cc *CategoryCreate) SetDeletedAt(t time.Time) *CategoryCreate
- func (cc *CategoryCreate) SetID(u uint64) *CategoryCreate
- func (cc *CategoryCreate) SetName(s string) *CategoryCreate
- func (cc *CategoryCreate) SetNillableBigPicURL(s *string) *CategoryCreate
- func (cc *CategoryCreate) SetNillableCreatedAt(t *time.Time) *CategoryCreate
- func (cc *CategoryCreate) SetNillableDeletedAt(t *time.Time) *CategoryCreate
- func (cc *CategoryCreate) SetNillableParentID(u *uint64) *CategoryCreate
- func (cc *CategoryCreate) SetNillableSort(u *uint32) *CategoryCreate
- func (cc *CategoryCreate) SetNillableStatus(u *uint8) *CategoryCreate
- func (cc *CategoryCreate) SetNillableUpdatedAt(t *time.Time) *CategoryCreate
- func (c *CategoryCreate) SetNotNilBigPicURL(value *string) *CategoryCreate
- func (c *CategoryCreate) SetNotNilDeletedAt(value *time.Time) *CategoryCreate
- func (c *CategoryCreate) SetNotNilName(value *string) *CategoryCreate
- func (c *CategoryCreate) SetNotNilParentID(value *uint64) *CategoryCreate
- func (c *CategoryCreate) SetNotNilPicURL(value *string) *CategoryCreate
- func (c *CategoryCreate) SetNotNilSort(value *uint32) *CategoryCreate
- func (c *CategoryCreate) SetNotNilStatus(value *uint8) *CategoryCreate
- func (c *CategoryCreate) SetNotNilUpdatedAt(value *time.Time) *CategoryCreate
- func (cc *CategoryCreate) SetParent(c *Category) *CategoryCreate
- func (cc *CategoryCreate) SetParentID(u uint64) *CategoryCreate
- func (cc *CategoryCreate) SetPicURL(s string) *CategoryCreate
- func (cc *CategoryCreate) SetSort(u uint32) *CategoryCreate
- func (cc *CategoryCreate) SetStatus(u uint8) *CategoryCreate
- func (cc *CategoryCreate) SetUpdatedAt(t time.Time) *CategoryCreate
- type CategoryCreateBulk
- type CategoryDelete
- type CategoryDeleteOne
- type CategoryEdges
- type CategoryGroupBy
- func (cgb *CategoryGroupBy) Aggregate(fns ...AggregateFunc) *CategoryGroupBy
- func (s *CategoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CategoryGroupBy) BoolX(ctx context.Context) bool
- func (s *CategoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CategoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CategoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CategoryGroupBy) Float64X(ctx context.Context) float64
- func (s *CategoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CategoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CategoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CategoryGroupBy) IntX(ctx context.Context) int
- func (s *CategoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CategoryGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CategoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *CategoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *CategoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CategoryGroupBy) StringX(ctx context.Context) string
- func (s *CategoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CategoryGroupBy) StringsX(ctx context.Context) []string
- type CategoryMutation
- func (m *CategoryMutation) AddChildIDs(ids ...uint64)
- func (m *CategoryMutation) AddField(name string, value ent.Value) error
- func (m *CategoryMutation) AddSort(u int32)
- func (m *CategoryMutation) AddSpuIDs(ids ...uint64)
- func (m *CategoryMutation) AddStatus(u int8)
- func (m *CategoryMutation) AddedEdges() []string
- func (m *CategoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *CategoryMutation) AddedFields() []string
- func (m *CategoryMutation) AddedIDs(name string) []ent.Value
- func (m *CategoryMutation) AddedSort() (r int32, exists bool)
- func (m *CategoryMutation) AddedStatus() (r int8, exists bool)
- func (m *CategoryMutation) BigPicURL() (r string, exists bool)
- func (m *CategoryMutation) BigPicURLCleared() bool
- func (m *CategoryMutation) ChildrenCleared() bool
- func (m *CategoryMutation) ChildrenIDs() (ids []uint64)
- func (m *CategoryMutation) ClearBigPicURL()
- func (m *CategoryMutation) ClearChildren()
- func (m *CategoryMutation) ClearDeletedAt()
- func (m *CategoryMutation) ClearEdge(name string) error
- func (m *CategoryMutation) ClearField(name string) error
- func (m *CategoryMutation) ClearParent()
- func (m *CategoryMutation) ClearParentID()
- func (m *CategoryMutation) ClearSpus()
- func (m *CategoryMutation) ClearStatus()
- func (m *CategoryMutation) ClearedEdges() []string
- func (m *CategoryMutation) ClearedFields() []string
- func (m CategoryMutation) Client() *Client
- func (m *CategoryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CategoryMutation) DeletedAt() (r time.Time, exists bool)
- func (m *CategoryMutation) DeletedAtCleared() bool
- func (m *CategoryMutation) EdgeCleared(name string) bool
- func (m *CategoryMutation) Field(name string) (ent.Value, bool)
- func (m *CategoryMutation) FieldCleared(name string) bool
- func (m *CategoryMutation) Fields() []string
- func (m *CategoryMutation) ID() (id uint64, exists bool)
- func (m *CategoryMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *CategoryMutation) Name() (r string, exists bool)
- func (m *CategoryMutation) OldBigPicURL(ctx context.Context) (v string, err error)
- func (m *CategoryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CategoryMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *CategoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CategoryMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CategoryMutation) OldParentID(ctx context.Context) (v uint64, err error)
- func (m *CategoryMutation) OldPicURL(ctx context.Context) (v string, err error)
- func (m *CategoryMutation) OldSort(ctx context.Context) (v uint32, err error)
- func (m *CategoryMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *CategoryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CategoryMutation) Op() Op
- func (m *CategoryMutation) ParentCleared() bool
- func (m *CategoryMutation) ParentID() (r uint64, exists bool)
- func (m *CategoryMutation) ParentIDCleared() bool
- func (m *CategoryMutation) ParentIDs() (ids []uint64)
- func (m *CategoryMutation) PicURL() (r string, exists bool)
- func (m *CategoryMutation) RemoveChildIDs(ids ...uint64)
- func (m *CategoryMutation) RemoveSpuIDs(ids ...uint64)
- func (m *CategoryMutation) RemovedChildrenIDs() (ids []uint64)
- func (m *CategoryMutation) RemovedEdges() []string
- func (m *CategoryMutation) RemovedIDs(name string) []ent.Value
- func (m *CategoryMutation) RemovedSpusIDs() (ids []uint64)
- func (m *CategoryMutation) ResetBigPicURL()
- func (m *CategoryMutation) ResetChildren()
- func (m *CategoryMutation) ResetCreatedAt()
- func (m *CategoryMutation) ResetDeletedAt()
- func (m *CategoryMutation) ResetEdge(name string) error
- func (m *CategoryMutation) ResetField(name string) error
- func (m *CategoryMutation) ResetName()
- func (m *CategoryMutation) ResetParent()
- func (m *CategoryMutation) ResetParentID()
- func (m *CategoryMutation) ResetPicURL()
- func (m *CategoryMutation) ResetSort()
- func (m *CategoryMutation) ResetSpus()
- func (m *CategoryMutation) ResetStatus()
- func (m *CategoryMutation) ResetUpdatedAt()
- func (m *CategoryMutation) SetBigPicURL(s string)
- func (m *CategoryMutation) SetCreatedAt(t time.Time)
- func (m *CategoryMutation) SetDeletedAt(t time.Time)
- func (m *CategoryMutation) SetField(name string, value ent.Value) error
- func (m *CategoryMutation) SetID(id uint64)
- func (m *CategoryMutation) SetName(s string)
- func (m *CategoryMutation) SetOp(op Op)
- func (m *CategoryMutation) SetParentID(u uint64)
- func (m *CategoryMutation) SetPicURL(s string)
- func (m *CategoryMutation) SetSort(u uint32)
- func (m *CategoryMutation) SetStatus(u uint8)
- func (m *CategoryMutation) SetUpdatedAt(t time.Time)
- func (m *CategoryMutation) Sort() (r uint32, exists bool)
- func (m *CategoryMutation) SpusCleared() bool
- func (m *CategoryMutation) SpusIDs() (ids []uint64)
- func (m *CategoryMutation) Status() (r uint8, exists bool)
- func (m *CategoryMutation) StatusCleared() bool
- func (m CategoryMutation) Tx() (*Tx, error)
- func (m *CategoryMutation) Type() string
- func (m *CategoryMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CategoryMutation) Where(ps ...predicate.Category)
- func (m *CategoryMutation) WhereP(ps ...func(*sql.Selector))
- type CategoryPageList
- type CategoryPager
- type CategoryPaginateOption
- type CategoryQuery
- func (cq *CategoryQuery) Aggregate(fns ...AggregateFunc) *CategorySelect
- func (cq *CategoryQuery) All(ctx context.Context) ([]*Category, error)
- func (cq *CategoryQuery) AllX(ctx context.Context) []*Category
- func (cq *CategoryQuery) Clone() *CategoryQuery
- func (cq *CategoryQuery) Count(ctx context.Context) (int, error)
- func (cq *CategoryQuery) CountX(ctx context.Context) int
- func (cq *CategoryQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CategoryQuery) ExistX(ctx context.Context) bool
- func (cq *CategoryQuery) First(ctx context.Context) (*Category, error)
- func (cq *CategoryQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (cq *CategoryQuery) FirstIDX(ctx context.Context) uint64
- func (cq *CategoryQuery) FirstX(ctx context.Context) *Category
- func (cq *CategoryQuery) GroupBy(field string, fields ...string) *CategoryGroupBy
- func (cq *CategoryQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (cq *CategoryQuery) IDsX(ctx context.Context) []uint64
- func (cq *CategoryQuery) Limit(limit int) *CategoryQuery
- func (cq *CategoryQuery) Offset(offset int) *CategoryQuery
- func (cq *CategoryQuery) Only(ctx context.Context) (*Category, error)
- func (cq *CategoryQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (cq *CategoryQuery) OnlyIDX(ctx context.Context) uint64
- func (cq *CategoryQuery) OnlyX(ctx context.Context) *Category
- func (cq *CategoryQuery) Order(o ...category.OrderOption) *CategoryQuery
- func (c *CategoryQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*CategoryPageList, error)
- func (cq *CategoryQuery) QueryChildren() *CategoryQuery
- func (cq *CategoryQuery) QueryParent() *CategoryQuery
- func (cq *CategoryQuery) QuerySpus() *SpuQuery
- func (cq *CategoryQuery) Select(fields ...string) *CategorySelect
- func (cq *CategoryQuery) Unique(unique bool) *CategoryQuery
- func (cq *CategoryQuery) Where(ps ...predicate.Category) *CategoryQuery
- func (cq *CategoryQuery) WithChildren(opts ...func(*CategoryQuery)) *CategoryQuery
- func (cq *CategoryQuery) WithParent(opts ...func(*CategoryQuery)) *CategoryQuery
- func (cq *CategoryQuery) WithSpus(opts ...func(*SpuQuery)) *CategoryQuery
- type CategorySelect
- func (cs *CategorySelect) Aggregate(fns ...AggregateFunc) *CategorySelect
- func (s *CategorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CategorySelect) BoolX(ctx context.Context) bool
- func (s *CategorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CategorySelect) BoolsX(ctx context.Context) []bool
- func (s *CategorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CategorySelect) Float64X(ctx context.Context) float64
- func (s *CategorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CategorySelect) Float64sX(ctx context.Context) []float64
- func (s *CategorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *CategorySelect) IntX(ctx context.Context) int
- func (s *CategorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *CategorySelect) IntsX(ctx context.Context) []int
- func (cs *CategorySelect) Scan(ctx context.Context, v any) error
- func (s *CategorySelect) ScanX(ctx context.Context, v any)
- func (s *CategorySelect) String(ctx context.Context) (_ string, err error)
- func (s *CategorySelect) StringX(ctx context.Context) string
- func (s *CategorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *CategorySelect) StringsX(ctx context.Context) []string
- type CategoryUpdate
- func (cu *CategoryUpdate) AddChildIDs(ids ...uint64) *CategoryUpdate
- func (cu *CategoryUpdate) AddChildren(c ...*Category) *CategoryUpdate
- func (cu *CategoryUpdate) AddSort(u int32) *CategoryUpdate
- func (cu *CategoryUpdate) AddSpuIDs(ids ...uint64) *CategoryUpdate
- func (cu *CategoryUpdate) AddSpus(s ...*Spu) *CategoryUpdate
- func (cu *CategoryUpdate) AddStatus(u int8) *CategoryUpdate
- func (cu *CategoryUpdate) ClearBigPicURL() *CategoryUpdate
- func (cu *CategoryUpdate) ClearChildren() *CategoryUpdate
- func (cu *CategoryUpdate) ClearDeletedAt() *CategoryUpdate
- func (cu *CategoryUpdate) ClearParent() *CategoryUpdate
- func (cu *CategoryUpdate) ClearParentID() *CategoryUpdate
- func (cu *CategoryUpdate) ClearSpus() *CategoryUpdate
- func (cu *CategoryUpdate) ClearStatus() *CategoryUpdate
- func (cu *CategoryUpdate) Exec(ctx context.Context) error
- func (cu *CategoryUpdate) ExecX(ctx context.Context)
- func (cu *CategoryUpdate) Mutation() *CategoryMutation
- func (cu *CategoryUpdate) RemoveChildIDs(ids ...uint64) *CategoryUpdate
- func (cu *CategoryUpdate) RemoveChildren(c ...*Category) *CategoryUpdate
- func (cu *CategoryUpdate) RemoveSpuIDs(ids ...uint64) *CategoryUpdate
- func (cu *CategoryUpdate) RemoveSpus(s ...*Spu) *CategoryUpdate
- func (cu *CategoryUpdate) Save(ctx context.Context) (int, error)
- func (cu *CategoryUpdate) SaveX(ctx context.Context) int
- func (cu *CategoryUpdate) SetBigPicURL(s string) *CategoryUpdate
- func (cu *CategoryUpdate) SetDeletedAt(t time.Time) *CategoryUpdate
- func (cu *CategoryUpdate) SetName(s string) *CategoryUpdate
- func (cu *CategoryUpdate) SetNillableBigPicURL(s *string) *CategoryUpdate
- func (cu *CategoryUpdate) SetNillableDeletedAt(t *time.Time) *CategoryUpdate
- func (cu *CategoryUpdate) SetNillableParentID(u *uint64) *CategoryUpdate
- func (cu *CategoryUpdate) SetNillableSort(u *uint32) *CategoryUpdate
- func (cu *CategoryUpdate) SetNillableStatus(u *uint8) *CategoryUpdate
- func (c *CategoryUpdate) SetNotNilBigPicURL(value *string) *CategoryUpdate
- func (c *CategoryUpdate) SetNotNilDeletedAt(value *time.Time) *CategoryUpdate
- func (c *CategoryUpdate) SetNotNilName(value *string) *CategoryUpdate
- func (c *CategoryUpdate) SetNotNilParentID(value *uint64) *CategoryUpdate
- func (c *CategoryUpdate) SetNotNilPicURL(value *string) *CategoryUpdate
- func (c *CategoryUpdate) SetNotNilSort(value *uint32) *CategoryUpdate
- func (c *CategoryUpdate) SetNotNilStatus(value *uint8) *CategoryUpdate
- func (c *CategoryUpdate) SetNotNilUpdatedAt(value *time.Time) *CategoryUpdate
- func (cu *CategoryUpdate) SetParent(c *Category) *CategoryUpdate
- func (cu *CategoryUpdate) SetParentID(u uint64) *CategoryUpdate
- func (cu *CategoryUpdate) SetPicURL(s string) *CategoryUpdate
- func (cu *CategoryUpdate) SetSort(u uint32) *CategoryUpdate
- func (cu *CategoryUpdate) SetStatus(u uint8) *CategoryUpdate
- func (cu *CategoryUpdate) SetUpdatedAt(t time.Time) *CategoryUpdate
- func (cu *CategoryUpdate) Where(ps ...predicate.Category) *CategoryUpdate
- type CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddChildIDs(ids ...uint64) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddChildren(c ...*Category) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddSort(u int32) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddSpuIDs(ids ...uint64) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddSpus(s ...*Spu) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) AddStatus(u int8) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearBigPicURL() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearChildren() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearDeletedAt() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearParent() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearParentID() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearSpus() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) ClearStatus() *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) Exec(ctx context.Context) error
- func (cuo *CategoryUpdateOne) ExecX(ctx context.Context)
- func (cuo *CategoryUpdateOne) Mutation() *CategoryMutation
- func (cuo *CategoryUpdateOne) RemoveChildIDs(ids ...uint64) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) RemoveChildren(c ...*Category) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) RemoveSpuIDs(ids ...uint64) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) RemoveSpus(s ...*Spu) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) Save(ctx context.Context) (*Category, error)
- func (cuo *CategoryUpdateOne) SaveX(ctx context.Context) *Category
- func (cuo *CategoryUpdateOne) Select(field string, fields ...string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetBigPicURL(s string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetDeletedAt(t time.Time) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetName(s string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNillableBigPicURL(s *string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNillableDeletedAt(t *time.Time) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNillableParentID(u *uint64) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNillableSort(u *uint32) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetNillableStatus(u *uint8) *CategoryUpdateOne
- func (c *CategoryUpdateOne) SetNotNilBigPicURL(value *string) *CategoryUpdateOne
- func (c *CategoryUpdateOne) SetNotNilDeletedAt(value *time.Time) *CategoryUpdateOne
- func (c *CategoryUpdateOne) SetNotNilName(value *string) *CategoryUpdateOne
- func (c *CategoryUpdateOne) SetNotNilParentID(value *uint64) *CategoryUpdateOne
- func (c *CategoryUpdateOne) SetNotNilPicURL(value *string) *CategoryUpdateOne
- func (c *CategoryUpdateOne) SetNotNilSort(value *uint32) *CategoryUpdateOne
- func (c *CategoryUpdateOne) SetNotNilStatus(value *uint8) *CategoryUpdateOne
- func (c *CategoryUpdateOne) SetNotNilUpdatedAt(value *time.Time) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetParent(c *Category) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetParentID(u uint64) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetPicURL(s string) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetSort(u uint32) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetStatus(u uint8) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) SetUpdatedAt(t time.Time) *CategoryUpdateOne
- func (cuo *CategoryUpdateOne) Where(ps ...predicate.Category) *CategoryUpdateOne
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type Comment
- type CommentClient
- func (c *CommentClient) Create() *CommentCreate
- func (c *CommentClient) CreateBulk(builders ...*CommentCreate) *CommentCreateBulk
- func (c *CommentClient) Delete() *CommentDelete
- func (c *CommentClient) DeleteOne(co *Comment) *CommentDeleteOne
- func (c *CommentClient) DeleteOneID(id uint64) *CommentDeleteOne
- func (c *CommentClient) Get(ctx context.Context, id uint64) (*Comment, error)
- func (c *CommentClient) GetX(ctx context.Context, id uint64) *Comment
- func (c *CommentClient) Hooks() []Hook
- func (c *CommentClient) Intercept(interceptors ...Interceptor)
- func (c *CommentClient) Interceptors() []Interceptor
- func (c *CommentClient) MapCreateBulk(slice any, setFunc func(*CommentCreate, int)) *CommentCreateBulk
- func (c *CommentClient) Query() *CommentQuery
- func (c *CommentClient) QuerySkus(co *Comment) *SkuQuery
- func (c *CommentClient) Update() *CommentUpdate
- func (c *CommentClient) UpdateOne(co *Comment) *CommentUpdateOne
- func (c *CommentClient) UpdateOneID(id uint64) *CommentUpdateOne
- func (c *CommentClient) Use(hooks ...Hook)
- type CommentCreate
- func (cc *CommentCreate) Exec(ctx context.Context) error
- func (cc *CommentCreate) ExecX(ctx context.Context)
- func (cc *CommentCreate) Mutation() *CommentMutation
- func (cc *CommentCreate) Save(ctx context.Context) (*Comment, error)
- func (cc *CommentCreate) SaveX(ctx context.Context) *Comment
- func (cc *CommentCreate) SetAnonymous(b bool) *CommentCreate
- func (cc *CommentCreate) SetBenefitScores(i int8) *CommentCreate
- func (cc *CommentCreate) SetContent(s string) *CommentCreate
- func (cc *CommentCreate) SetCreatedAt(t time.Time) *CommentCreate
- func (cc *CommentCreate) SetDeletedAt(t time.Time) *CommentCreate
- func (cc *CommentCreate) SetDescriptionScores(i int8) *CommentCreate
- func (cc *CommentCreate) SetID(u uint64) *CommentCreate
- func (cc *CommentCreate) SetNillableAnonymous(b *bool) *CommentCreate
- func (cc *CommentCreate) SetNillableBenefitScores(i *int8) *CommentCreate
- func (cc *CommentCreate) SetNillableContent(s *string) *CommentCreate
- func (cc *CommentCreate) SetNillableCreatedAt(t *time.Time) *CommentCreate
- func (cc *CommentCreate) SetNillableDeletedAt(t *time.Time) *CommentCreate
- func (cc *CommentCreate) SetNillableDescriptionScores(i *int8) *CommentCreate
- func (cc *CommentCreate) SetNillableOrderID(u *uint64) *CommentCreate
- func (cc *CommentCreate) SetNillableOrderItemID(u *uint64) *CommentCreate
- func (cc *CommentCreate) SetNillablePicUrls(s *string) *CommentCreate
- func (cc *CommentCreate) SetNillableReplyContent(s *string) *CommentCreate
- func (cc *CommentCreate) SetNillableReplyStatus(b *bool) *CommentCreate
- func (cc *CommentCreate) SetNillableReplyTime(t *time.Time) *CommentCreate
- func (cc *CommentCreate) SetNillableReplyUserID(i *int) *CommentCreate
- func (cc *CommentCreate) SetNillableScores(i *int8) *CommentCreate
- func (cc *CommentCreate) SetNillableSkuID(u *uint64) *CommentCreate
- func (cc *CommentCreate) SetNillableSkusID(id *uint64) *CommentCreate
- func (cc *CommentCreate) SetNillableSpuID(u *uint64) *CommentCreate
- func (cc *CommentCreate) SetNillableSpuName(s *string) *CommentCreate
- func (cc *CommentCreate) SetNillableUpdatedAt(t *time.Time) *CommentCreate
- func (cc *CommentCreate) SetNillableUserAvatar(s *string) *CommentCreate
- func (cc *CommentCreate) SetNillableUserID(u *uint64) *CommentCreate
- func (cc *CommentCreate) SetNillableUserNickname(s *string) *CommentCreate
- func (cc *CommentCreate) SetNillableVisible(b *bool) *CommentCreate
- func (c *CommentCreate) SetNotNilAnonymous(value *bool) *CommentCreate
- func (c *CommentCreate) SetNotNilBenefitScores(value *int8) *CommentCreate
- func (c *CommentCreate) SetNotNilContent(value *string) *CommentCreate
- func (c *CommentCreate) SetNotNilDeletedAt(value *time.Time) *CommentCreate
- func (c *CommentCreate) SetNotNilDescriptionScores(value *int8) *CommentCreate
- func (c *CommentCreate) SetNotNilOrderID(value *uint64) *CommentCreate
- func (c *CommentCreate) SetNotNilOrderItemID(value *uint64) *CommentCreate
- func (c *CommentCreate) SetNotNilPicUrls(value *string) *CommentCreate
- func (c *CommentCreate) SetNotNilReplyContent(value *string) *CommentCreate
- func (c *CommentCreate) SetNotNilReplyStatus(value *bool) *CommentCreate
- func (c *CommentCreate) SetNotNilReplyTime(value *time.Time) *CommentCreate
- func (c *CommentCreate) SetNotNilReplyUserID(value *int) *CommentCreate
- func (c *CommentCreate) SetNotNilScores(value *int8) *CommentCreate
- func (c *CommentCreate) SetNotNilSkuID(value *uint64) *CommentCreate
- func (c *CommentCreate) SetNotNilSkuPicURL(value *string) *CommentCreate
- func (c *CommentCreate) SetNotNilSkuProperties(value *[]entType.SkuProperty) *CommentCreate
- func (c *CommentCreate) SetNotNilSpuID(value *uint64) *CommentCreate
- func (c *CommentCreate) SetNotNilSpuName(value *string) *CommentCreate
- func (c *CommentCreate) SetNotNilUpdatedAt(value *time.Time) *CommentCreate
- func (c *CommentCreate) SetNotNilUserAvatar(value *string) *CommentCreate
- func (c *CommentCreate) SetNotNilUserID(value *uint64) *CommentCreate
- func (c *CommentCreate) SetNotNilUserNickname(value *string) *CommentCreate
- func (c *CommentCreate) SetNotNilVisible(value *bool) *CommentCreate
- func (cc *CommentCreate) SetOrderID(u uint64) *CommentCreate
- func (cc *CommentCreate) SetOrderItemID(u uint64) *CommentCreate
- func (cc *CommentCreate) SetPicUrls(s string) *CommentCreate
- func (cc *CommentCreate) SetReplyContent(s string) *CommentCreate
- func (cc *CommentCreate) SetReplyStatus(b bool) *CommentCreate
- func (cc *CommentCreate) SetReplyTime(t time.Time) *CommentCreate
- func (cc *CommentCreate) SetReplyUserID(i int) *CommentCreate
- func (cc *CommentCreate) SetScores(i int8) *CommentCreate
- func (cc *CommentCreate) SetSkuID(u uint64) *CommentCreate
- func (cc *CommentCreate) SetSkuPicURL(s string) *CommentCreate
- func (cc *CommentCreate) SetSkuProperties(etp []entType.SkuProperty) *CommentCreate
- func (cc *CommentCreate) SetSkus(s *Sku) *CommentCreate
- func (cc *CommentCreate) SetSkusID(id uint64) *CommentCreate
- func (cc *CommentCreate) SetSpuID(u uint64) *CommentCreate
- func (cc *CommentCreate) SetSpuName(s string) *CommentCreate
- func (cc *CommentCreate) SetUpdatedAt(t time.Time) *CommentCreate
- func (cc *CommentCreate) SetUserAvatar(s string) *CommentCreate
- func (cc *CommentCreate) SetUserID(u uint64) *CommentCreate
- func (cc *CommentCreate) SetUserNickname(s string) *CommentCreate
- func (cc *CommentCreate) SetVisible(b bool) *CommentCreate
- type CommentCreateBulk
- type CommentDelete
- type CommentDeleteOne
- type CommentEdges
- type CommentGroupBy
- func (cgb *CommentGroupBy) Aggregate(fns ...AggregateFunc) *CommentGroupBy
- func (s *CommentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CommentGroupBy) BoolX(ctx context.Context) bool
- func (s *CommentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CommentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CommentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CommentGroupBy) Float64X(ctx context.Context) float64
- func (s *CommentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CommentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CommentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CommentGroupBy) IntX(ctx context.Context) int
- func (s *CommentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CommentGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CommentGroupBy) Scan(ctx context.Context, v any) error
- func (s *CommentGroupBy) ScanX(ctx context.Context, v any)
- func (s *CommentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CommentGroupBy) StringX(ctx context.Context) string
- func (s *CommentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CommentGroupBy) StringsX(ctx context.Context) []string
- type CommentMutation
- func (m *CommentMutation) AddBenefitScores(i int8)
- func (m *CommentMutation) AddDescriptionScores(i int8)
- func (m *CommentMutation) AddField(name string, value ent.Value) error
- func (m *CommentMutation) AddOrderID(u int64)
- func (m *CommentMutation) AddOrderItemID(u int64)
- func (m *CommentMutation) AddReplyUserID(i int)
- func (m *CommentMutation) AddScores(i int8)
- func (m *CommentMutation) AddSpuID(u int64)
- func (m *CommentMutation) AddUserID(u int64)
- func (m *CommentMutation) AddedBenefitScores() (r int8, exists bool)
- func (m *CommentMutation) AddedDescriptionScores() (r int8, exists bool)
- func (m *CommentMutation) AddedEdges() []string
- func (m *CommentMutation) AddedField(name string) (ent.Value, bool)
- func (m *CommentMutation) AddedFields() []string
- func (m *CommentMutation) AddedIDs(name string) []ent.Value
- func (m *CommentMutation) AddedOrderID() (r int64, exists bool)
- func (m *CommentMutation) AddedOrderItemID() (r int64, exists bool)
- func (m *CommentMutation) AddedReplyUserID() (r int, exists bool)
- func (m *CommentMutation) AddedScores() (r int8, exists bool)
- func (m *CommentMutation) AddedSpuID() (r int64, exists bool)
- func (m *CommentMutation) AddedUserID() (r int64, exists bool)
- func (m *CommentMutation) Anonymous() (r bool, exists bool)
- func (m *CommentMutation) AnonymousCleared() bool
- func (m *CommentMutation) AppendSkuProperties(etp []entType.SkuProperty)
- func (m *CommentMutation) AppendedSkuProperties() ([]entType.SkuProperty, bool)
- func (m *CommentMutation) BenefitScores() (r int8, exists bool)
- func (m *CommentMutation) BenefitScoresCleared() bool
- func (m *CommentMutation) ClearAnonymous()
- func (m *CommentMutation) ClearBenefitScores()
- func (m *CommentMutation) ClearContent()
- func (m *CommentMutation) ClearDeletedAt()
- func (m *CommentMutation) ClearDescriptionScores()
- func (m *CommentMutation) ClearEdge(name string) error
- func (m *CommentMutation) ClearField(name string) error
- func (m *CommentMutation) ClearOrderID()
- func (m *CommentMutation) ClearOrderItemID()
- func (m *CommentMutation) ClearPicUrls()
- func (m *CommentMutation) ClearReplyContent()
- func (m *CommentMutation) ClearReplyStatus()
- func (m *CommentMutation) ClearReplyTime()
- func (m *CommentMutation) ClearReplyUserID()
- func (m *CommentMutation) ClearScores()
- func (m *CommentMutation) ClearSkuID()
- func (m *CommentMutation) ClearSkuProperties()
- func (m *CommentMutation) ClearSkus()
- func (m *CommentMutation) ClearSpuID()
- func (m *CommentMutation) ClearSpuName()
- func (m *CommentMutation) ClearUserAvatar()
- func (m *CommentMutation) ClearUserID()
- func (m *CommentMutation) ClearUserNickname()
- func (m *CommentMutation) ClearVisible()
- func (m *CommentMutation) ClearedEdges() []string
- func (m *CommentMutation) ClearedFields() []string
- func (m CommentMutation) Client() *Client
- func (m *CommentMutation) Content() (r string, exists bool)
- func (m *CommentMutation) ContentCleared() bool
- func (m *CommentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CommentMutation) DeletedAt() (r time.Time, exists bool)
- func (m *CommentMutation) DeletedAtCleared() bool
- func (m *CommentMutation) DescriptionScores() (r int8, exists bool)
- func (m *CommentMutation) DescriptionScoresCleared() bool
- func (m *CommentMutation) EdgeCleared(name string) bool
- func (m *CommentMutation) Field(name string) (ent.Value, bool)
- func (m *CommentMutation) FieldCleared(name string) bool
- func (m *CommentMutation) Fields() []string
- func (m *CommentMutation) ID() (id uint64, exists bool)
- func (m *CommentMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *CommentMutation) OldAnonymous(ctx context.Context) (v bool, err error)
- func (m *CommentMutation) OldBenefitScores(ctx context.Context) (v int8, err error)
- func (m *CommentMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CommentMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *CommentMutation) OldDescriptionScores(ctx context.Context) (v int8, err error)
- func (m *CommentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CommentMutation) OldOrderID(ctx context.Context) (v uint64, err error)
- func (m *CommentMutation) OldOrderItemID(ctx context.Context) (v uint64, err error)
- func (m *CommentMutation) OldPicUrls(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldReplyContent(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldReplyStatus(ctx context.Context) (v bool, err error)
- func (m *CommentMutation) OldReplyTime(ctx context.Context) (v time.Time, err error)
- func (m *CommentMutation) OldReplyUserID(ctx context.Context) (v int, err error)
- func (m *CommentMutation) OldScores(ctx context.Context) (v int8, err error)
- func (m *CommentMutation) OldSkuID(ctx context.Context) (v uint64, err error)
- func (m *CommentMutation) OldSkuPicURL(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldSkuProperties(ctx context.Context) (v []entType.SkuProperty, err error)
- func (m *CommentMutation) OldSpuID(ctx context.Context) (v uint64, err error)
- func (m *CommentMutation) OldSpuName(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CommentMutation) OldUserAvatar(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldUserID(ctx context.Context) (v uint64, err error)
- func (m *CommentMutation) OldUserNickname(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldVisible(ctx context.Context) (v bool, err error)
- func (m *CommentMutation) Op() Op
- func (m *CommentMutation) OrderID() (r uint64, exists bool)
- func (m *CommentMutation) OrderIDCleared() bool
- func (m *CommentMutation) OrderItemID() (r uint64, exists bool)
- func (m *CommentMutation) OrderItemIDCleared() bool
- func (m *CommentMutation) PicUrls() (r string, exists bool)
- func (m *CommentMutation) PicUrlsCleared() bool
- func (m *CommentMutation) RemovedEdges() []string
- func (m *CommentMutation) RemovedIDs(name string) []ent.Value
- func (m *CommentMutation) ReplyContent() (r string, exists bool)
- func (m *CommentMutation) ReplyContentCleared() bool
- func (m *CommentMutation) ReplyStatus() (r bool, exists bool)
- func (m *CommentMutation) ReplyStatusCleared() bool
- func (m *CommentMutation) ReplyTime() (r time.Time, exists bool)
- func (m *CommentMutation) ReplyTimeCleared() bool
- func (m *CommentMutation) ReplyUserID() (r int, exists bool)
- func (m *CommentMutation) ReplyUserIDCleared() bool
- func (m *CommentMutation) ResetAnonymous()
- func (m *CommentMutation) ResetBenefitScores()
- func (m *CommentMutation) ResetContent()
- func (m *CommentMutation) ResetCreatedAt()
- func (m *CommentMutation) ResetDeletedAt()
- func (m *CommentMutation) ResetDescriptionScores()
- func (m *CommentMutation) ResetEdge(name string) error
- func (m *CommentMutation) ResetField(name string) error
- func (m *CommentMutation) ResetOrderID()
- func (m *CommentMutation) ResetOrderItemID()
- func (m *CommentMutation) ResetPicUrls()
- func (m *CommentMutation) ResetReplyContent()
- func (m *CommentMutation) ResetReplyStatus()
- func (m *CommentMutation) ResetReplyTime()
- func (m *CommentMutation) ResetReplyUserID()
- func (m *CommentMutation) ResetScores()
- func (m *CommentMutation) ResetSkuID()
- func (m *CommentMutation) ResetSkuPicURL()
- func (m *CommentMutation) ResetSkuProperties()
- func (m *CommentMutation) ResetSkus()
- func (m *CommentMutation) ResetSpuID()
- func (m *CommentMutation) ResetSpuName()
- func (m *CommentMutation) ResetUpdatedAt()
- func (m *CommentMutation) ResetUserAvatar()
- func (m *CommentMutation) ResetUserID()
- func (m *CommentMutation) ResetUserNickname()
- func (m *CommentMutation) ResetVisible()
- func (m *CommentMutation) Scores() (r int8, exists bool)
- func (m *CommentMutation) ScoresCleared() bool
- func (m *CommentMutation) SetAnonymous(b bool)
- func (m *CommentMutation) SetBenefitScores(i int8)
- func (m *CommentMutation) SetContent(s string)
- func (m *CommentMutation) SetCreatedAt(t time.Time)
- func (m *CommentMutation) SetDeletedAt(t time.Time)
- func (m *CommentMutation) SetDescriptionScores(i int8)
- func (m *CommentMutation) SetField(name string, value ent.Value) error
- func (m *CommentMutation) SetID(id uint64)
- func (m *CommentMutation) SetOp(op Op)
- func (m *CommentMutation) SetOrderID(u uint64)
- func (m *CommentMutation) SetOrderItemID(u uint64)
- func (m *CommentMutation) SetPicUrls(s string)
- func (m *CommentMutation) SetReplyContent(s string)
- func (m *CommentMutation) SetReplyStatus(b bool)
- func (m *CommentMutation) SetReplyTime(t time.Time)
- func (m *CommentMutation) SetReplyUserID(i int)
- func (m *CommentMutation) SetScores(i int8)
- func (m *CommentMutation) SetSkuID(u uint64)
- func (m *CommentMutation) SetSkuPicURL(s string)
- func (m *CommentMutation) SetSkuProperties(etp []entType.SkuProperty)
- func (m *CommentMutation) SetSkusID(id uint64)
- func (m *CommentMutation) SetSpuID(u uint64)
- func (m *CommentMutation) SetSpuName(s string)
- func (m *CommentMutation) SetUpdatedAt(t time.Time)
- func (m *CommentMutation) SetUserAvatar(s string)
- func (m *CommentMutation) SetUserID(u uint64)
- func (m *CommentMutation) SetUserNickname(s string)
- func (m *CommentMutation) SetVisible(b bool)
- func (m *CommentMutation) SkuID() (r uint64, exists bool)
- func (m *CommentMutation) SkuIDCleared() bool
- func (m *CommentMutation) SkuPicURL() (r string, exists bool)
- func (m *CommentMutation) SkuProperties() (r []entType.SkuProperty, exists bool)
- func (m *CommentMutation) SkuPropertiesCleared() bool
- func (m *CommentMutation) SkusCleared() bool
- func (m *CommentMutation) SkusID() (id uint64, exists bool)
- func (m *CommentMutation) SkusIDs() (ids []uint64)
- func (m *CommentMutation) SpuID() (r uint64, exists bool)
- func (m *CommentMutation) SpuIDCleared() bool
- func (m *CommentMutation) SpuName() (r string, exists bool)
- func (m *CommentMutation) SpuNameCleared() bool
- func (m CommentMutation) Tx() (*Tx, error)
- func (m *CommentMutation) Type() string
- func (m *CommentMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CommentMutation) UserAvatar() (r string, exists bool)
- func (m *CommentMutation) UserAvatarCleared() bool
- func (m *CommentMutation) UserID() (r uint64, exists bool)
- func (m *CommentMutation) UserIDCleared() bool
- func (m *CommentMutation) UserNickname() (r string, exists bool)
- func (m *CommentMutation) UserNicknameCleared() bool
- func (m *CommentMutation) Visible() (r bool, exists bool)
- func (m *CommentMutation) VisibleCleared() bool
- func (m *CommentMutation) Where(ps ...predicate.Comment)
- func (m *CommentMutation) WhereP(ps ...func(*sql.Selector))
- type CommentPageList
- type CommentPager
- type CommentPaginateOption
- type CommentQuery
- func (cq *CommentQuery) Aggregate(fns ...AggregateFunc) *CommentSelect
- func (cq *CommentQuery) All(ctx context.Context) ([]*Comment, error)
- func (cq *CommentQuery) AllX(ctx context.Context) []*Comment
- func (cq *CommentQuery) Clone() *CommentQuery
- func (cq *CommentQuery) Count(ctx context.Context) (int, error)
- func (cq *CommentQuery) CountX(ctx context.Context) int
- func (cq *CommentQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CommentQuery) ExistX(ctx context.Context) bool
- func (cq *CommentQuery) First(ctx context.Context) (*Comment, error)
- func (cq *CommentQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (cq *CommentQuery) FirstIDX(ctx context.Context) uint64
- func (cq *CommentQuery) FirstX(ctx context.Context) *Comment
- func (cq *CommentQuery) GroupBy(field string, fields ...string) *CommentGroupBy
- func (cq *CommentQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (cq *CommentQuery) IDsX(ctx context.Context) []uint64
- func (cq *CommentQuery) Limit(limit int) *CommentQuery
- func (cq *CommentQuery) Offset(offset int) *CommentQuery
- func (cq *CommentQuery) Only(ctx context.Context) (*Comment, error)
- func (cq *CommentQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (cq *CommentQuery) OnlyIDX(ctx context.Context) uint64
- func (cq *CommentQuery) OnlyX(ctx context.Context) *Comment
- func (cq *CommentQuery) Order(o ...comment.OrderOption) *CommentQuery
- func (c *CommentQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*CommentPageList, error)
- func (cq *CommentQuery) QuerySkus() *SkuQuery
- func (cq *CommentQuery) Select(fields ...string) *CommentSelect
- func (cq *CommentQuery) Unique(unique bool) *CommentQuery
- func (cq *CommentQuery) Where(ps ...predicate.Comment) *CommentQuery
- func (cq *CommentQuery) WithSkus(opts ...func(*SkuQuery)) *CommentQuery
- type CommentSelect
- func (cs *CommentSelect) Aggregate(fns ...AggregateFunc) *CommentSelect
- func (s *CommentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CommentSelect) BoolX(ctx context.Context) bool
- func (s *CommentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CommentSelect) BoolsX(ctx context.Context) []bool
- func (s *CommentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CommentSelect) Float64X(ctx context.Context) float64
- func (s *CommentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CommentSelect) Float64sX(ctx context.Context) []float64
- func (s *CommentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CommentSelect) IntX(ctx context.Context) int
- func (s *CommentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CommentSelect) IntsX(ctx context.Context) []int
- func (cs *CommentSelect) Scan(ctx context.Context, v any) error
- func (s *CommentSelect) ScanX(ctx context.Context, v any)
- func (s *CommentSelect) String(ctx context.Context) (_ string, err error)
- func (s *CommentSelect) StringX(ctx context.Context) string
- func (s *CommentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CommentSelect) StringsX(ctx context.Context) []string
- type CommentUpdate
- func (cu *CommentUpdate) AddBenefitScores(i int8) *CommentUpdate
- func (cu *CommentUpdate) AddDescriptionScores(i int8) *CommentUpdate
- func (cu *CommentUpdate) AddOrderID(u int64) *CommentUpdate
- func (cu *CommentUpdate) AddOrderItemID(u int64) *CommentUpdate
- func (cu *CommentUpdate) AddReplyUserID(i int) *CommentUpdate
- func (cu *CommentUpdate) AddScores(i int8) *CommentUpdate
- func (cu *CommentUpdate) AddSpuID(u int64) *CommentUpdate
- func (cu *CommentUpdate) AddUserID(u int64) *CommentUpdate
- func (cu *CommentUpdate) AppendSkuProperties(etp []entType.SkuProperty) *CommentUpdate
- func (cu *CommentUpdate) ClearAnonymous() *CommentUpdate
- func (cu *CommentUpdate) ClearBenefitScores() *CommentUpdate
- func (cu *CommentUpdate) ClearContent() *CommentUpdate
- func (cu *CommentUpdate) ClearDeletedAt() *CommentUpdate
- func (cu *CommentUpdate) ClearDescriptionScores() *CommentUpdate
- func (cu *CommentUpdate) ClearOrderID() *CommentUpdate
- func (cu *CommentUpdate) ClearOrderItemID() *CommentUpdate
- func (cu *CommentUpdate) ClearPicUrls() *CommentUpdate
- func (cu *CommentUpdate) ClearReplyContent() *CommentUpdate
- func (cu *CommentUpdate) ClearReplyStatus() *CommentUpdate
- func (cu *CommentUpdate) ClearReplyTime() *CommentUpdate
- func (cu *CommentUpdate) ClearReplyUserID() *CommentUpdate
- func (cu *CommentUpdate) ClearScores() *CommentUpdate
- func (cu *CommentUpdate) ClearSkuID() *CommentUpdate
- func (cu *CommentUpdate) ClearSkuProperties() *CommentUpdate
- func (cu *CommentUpdate) ClearSkus() *CommentUpdate
- func (cu *CommentUpdate) ClearSpuID() *CommentUpdate
- func (cu *CommentUpdate) ClearSpuName() *CommentUpdate
- func (cu *CommentUpdate) ClearUserAvatar() *CommentUpdate
- func (cu *CommentUpdate) ClearUserID() *CommentUpdate
- func (cu *CommentUpdate) ClearUserNickname() *CommentUpdate
- func (cu *CommentUpdate) ClearVisible() *CommentUpdate
- func (cu *CommentUpdate) Exec(ctx context.Context) error
- func (cu *CommentUpdate) ExecX(ctx context.Context)
- func (cu *CommentUpdate) Mutation() *CommentMutation
- func (cu *CommentUpdate) Save(ctx context.Context) (int, error)
- func (cu *CommentUpdate) SaveX(ctx context.Context) int
- func (cu *CommentUpdate) SetAnonymous(b bool) *CommentUpdate
- func (cu *CommentUpdate) SetBenefitScores(i int8) *CommentUpdate
- func (cu *CommentUpdate) SetContent(s string) *CommentUpdate
- func (cu *CommentUpdate) SetDeletedAt(t time.Time) *CommentUpdate
- func (cu *CommentUpdate) SetDescriptionScores(i int8) *CommentUpdate
- func (cu *CommentUpdate) SetNillableAnonymous(b *bool) *CommentUpdate
- func (cu *CommentUpdate) SetNillableBenefitScores(i *int8) *CommentUpdate
- func (cu *CommentUpdate) SetNillableContent(s *string) *CommentUpdate
- func (cu *CommentUpdate) SetNillableDeletedAt(t *time.Time) *CommentUpdate
- func (cu *CommentUpdate) SetNillableDescriptionScores(i *int8) *CommentUpdate
- func (cu *CommentUpdate) SetNillableOrderID(u *uint64) *CommentUpdate
- func (cu *CommentUpdate) SetNillableOrderItemID(u *uint64) *CommentUpdate
- func (cu *CommentUpdate) SetNillablePicUrls(s *string) *CommentUpdate
- func (cu *CommentUpdate) SetNillableReplyContent(s *string) *CommentUpdate
- func (cu *CommentUpdate) SetNillableReplyStatus(b *bool) *CommentUpdate
- func (cu *CommentUpdate) SetNillableReplyTime(t *time.Time) *CommentUpdate
- func (cu *CommentUpdate) SetNillableReplyUserID(i *int) *CommentUpdate
- func (cu *CommentUpdate) SetNillableScores(i *int8) *CommentUpdate
- func (cu *CommentUpdate) SetNillableSkuID(u *uint64) *CommentUpdate
- func (cu *CommentUpdate) SetNillableSkusID(id *uint64) *CommentUpdate
- func (cu *CommentUpdate) SetNillableSpuID(u *uint64) *CommentUpdate
- func (cu *CommentUpdate) SetNillableSpuName(s *string) *CommentUpdate
- func (cu *CommentUpdate) SetNillableUserAvatar(s *string) *CommentUpdate
- func (cu *CommentUpdate) SetNillableUserID(u *uint64) *CommentUpdate
- func (cu *CommentUpdate) SetNillableUserNickname(s *string) *CommentUpdate
- func (cu *CommentUpdate) SetNillableVisible(b *bool) *CommentUpdate
- func (c *CommentUpdate) SetNotNilAnonymous(value *bool) *CommentUpdate
- func (c *CommentUpdate) SetNotNilBenefitScores(value *int8) *CommentUpdate
- func (c *CommentUpdate) SetNotNilContent(value *string) *CommentUpdate
- func (c *CommentUpdate) SetNotNilDeletedAt(value *time.Time) *CommentUpdate
- func (c *CommentUpdate) SetNotNilDescriptionScores(value *int8) *CommentUpdate
- func (c *CommentUpdate) SetNotNilOrderID(value *uint64) *CommentUpdate
- func (c *CommentUpdate) SetNotNilOrderItemID(value *uint64) *CommentUpdate
- func (c *CommentUpdate) SetNotNilPicUrls(value *string) *CommentUpdate
- func (c *CommentUpdate) SetNotNilReplyContent(value *string) *CommentUpdate
- func (c *CommentUpdate) SetNotNilReplyStatus(value *bool) *CommentUpdate
- func (c *CommentUpdate) SetNotNilReplyTime(value *time.Time) *CommentUpdate
- func (c *CommentUpdate) SetNotNilReplyUserID(value *int) *CommentUpdate
- func (c *CommentUpdate) SetNotNilScores(value *int8) *CommentUpdate
- func (c *CommentUpdate) SetNotNilSkuID(value *uint64) *CommentUpdate
- func (c *CommentUpdate) SetNotNilSkuPicURL(value *string) *CommentUpdate
- func (c *CommentUpdate) SetNotNilSkuProperties(value *[]entType.SkuProperty) *CommentUpdate
- func (c *CommentUpdate) SetNotNilSpuID(value *uint64) *CommentUpdate
- func (c *CommentUpdate) SetNotNilSpuName(value *string) *CommentUpdate
- func (c *CommentUpdate) SetNotNilUpdatedAt(value *time.Time) *CommentUpdate
- func (c *CommentUpdate) SetNotNilUserAvatar(value *string) *CommentUpdate
- func (c *CommentUpdate) SetNotNilUserID(value *uint64) *CommentUpdate
- func (c *CommentUpdate) SetNotNilUserNickname(value *string) *CommentUpdate
- func (c *CommentUpdate) SetNotNilVisible(value *bool) *CommentUpdate
- func (cu *CommentUpdate) SetOrderID(u uint64) *CommentUpdate
- func (cu *CommentUpdate) SetOrderItemID(u uint64) *CommentUpdate
- func (cu *CommentUpdate) SetPicUrls(s string) *CommentUpdate
- func (cu *CommentUpdate) SetReplyContent(s string) *CommentUpdate
- func (cu *CommentUpdate) SetReplyStatus(b bool) *CommentUpdate
- func (cu *CommentUpdate) SetReplyTime(t time.Time) *CommentUpdate
- func (cu *CommentUpdate) SetReplyUserID(i int) *CommentUpdate
- func (cu *CommentUpdate) SetScores(i int8) *CommentUpdate
- func (cu *CommentUpdate) SetSkuID(u uint64) *CommentUpdate
- func (cu *CommentUpdate) SetSkuPicURL(s string) *CommentUpdate
- func (cu *CommentUpdate) SetSkuProperties(etp []entType.SkuProperty) *CommentUpdate
- func (cu *CommentUpdate) SetSkus(s *Sku) *CommentUpdate
- func (cu *CommentUpdate) SetSkusID(id uint64) *CommentUpdate
- func (cu *CommentUpdate) SetSpuID(u uint64) *CommentUpdate
- func (cu *CommentUpdate) SetSpuName(s string) *CommentUpdate
- func (cu *CommentUpdate) SetUpdatedAt(t time.Time) *CommentUpdate
- func (cu *CommentUpdate) SetUserAvatar(s string) *CommentUpdate
- func (cu *CommentUpdate) SetUserID(u uint64) *CommentUpdate
- func (cu *CommentUpdate) SetUserNickname(s string) *CommentUpdate
- func (cu *CommentUpdate) SetVisible(b bool) *CommentUpdate
- func (cu *CommentUpdate) Where(ps ...predicate.Comment) *CommentUpdate
- type CommentUpdateOne
- func (cuo *CommentUpdateOne) AddBenefitScores(i int8) *CommentUpdateOne
- func (cuo *CommentUpdateOne) AddDescriptionScores(i int8) *CommentUpdateOne
- func (cuo *CommentUpdateOne) AddOrderID(u int64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) AddOrderItemID(u int64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) AddReplyUserID(i int) *CommentUpdateOne
- func (cuo *CommentUpdateOne) AddScores(i int8) *CommentUpdateOne
- func (cuo *CommentUpdateOne) AddSpuID(u int64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) AddUserID(u int64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) AppendSkuProperties(etp []entType.SkuProperty) *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearAnonymous() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearBenefitScores() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearContent() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearDeletedAt() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearDescriptionScores() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearOrderID() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearOrderItemID() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearPicUrls() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearReplyContent() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearReplyStatus() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearReplyTime() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearReplyUserID() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearScores() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearSkuID() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearSkuProperties() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearSkus() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearSpuID() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearSpuName() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearUserAvatar() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearUserID() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearUserNickname() *CommentUpdateOne
- func (cuo *CommentUpdateOne) ClearVisible() *CommentUpdateOne
- func (cuo *CommentUpdateOne) Exec(ctx context.Context) error
- func (cuo *CommentUpdateOne) ExecX(ctx context.Context)
- func (cuo *CommentUpdateOne) Mutation() *CommentMutation
- func (cuo *CommentUpdateOne) Save(ctx context.Context) (*Comment, error)
- func (cuo *CommentUpdateOne) SaveX(ctx context.Context) *Comment
- func (cuo *CommentUpdateOne) Select(field string, fields ...string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetAnonymous(b bool) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetBenefitScores(i int8) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetContent(s string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetDeletedAt(t time.Time) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetDescriptionScores(i int8) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableAnonymous(b *bool) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableBenefitScores(i *int8) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableContent(s *string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableDeletedAt(t *time.Time) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableDescriptionScores(i *int8) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableOrderID(u *uint64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableOrderItemID(u *uint64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillablePicUrls(s *string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableReplyContent(s *string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableReplyStatus(b *bool) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableReplyTime(t *time.Time) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableReplyUserID(i *int) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableScores(i *int8) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableSkuID(u *uint64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableSkusID(id *uint64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableSpuID(u *uint64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableSpuName(s *string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableUserAvatar(s *string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableUserID(u *uint64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableUserNickname(s *string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetNillableVisible(b *bool) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilAnonymous(value *bool) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilBenefitScores(value *int8) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilContent(value *string) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilDeletedAt(value *time.Time) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilDescriptionScores(value *int8) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilOrderID(value *uint64) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilOrderItemID(value *uint64) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilPicUrls(value *string) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilReplyContent(value *string) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilReplyStatus(value *bool) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilReplyTime(value *time.Time) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilReplyUserID(value *int) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilScores(value *int8) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilSkuID(value *uint64) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilSkuPicURL(value *string) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilSkuProperties(value *[]entType.SkuProperty) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilSpuID(value *uint64) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilSpuName(value *string) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilUpdatedAt(value *time.Time) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilUserAvatar(value *string) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilUserID(value *uint64) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilUserNickname(value *string) *CommentUpdateOne
- func (c *CommentUpdateOne) SetNotNilVisible(value *bool) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetOrderID(u uint64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetOrderItemID(u uint64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetPicUrls(s string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetReplyContent(s string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetReplyStatus(b bool) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetReplyTime(t time.Time) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetReplyUserID(i int) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetScores(i int8) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetSkuID(u uint64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetSkuPicURL(s string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetSkuProperties(etp []entType.SkuProperty) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetSkus(s *Sku) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetSkusID(id uint64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetSpuID(u uint64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetSpuName(s string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetUpdatedAt(t time.Time) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetUserAvatar(s string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetUserID(u uint64) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetUserNickname(s string) *CommentUpdateOne
- func (cuo *CommentUpdateOne) SetVisible(b bool) *CommentUpdateOne
- func (cuo *CommentUpdateOne) Where(ps ...predicate.Comment) *CommentUpdateOne
- type Comments
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageDetails
- type Policy
- type Properties
- type Property
- type PropertyClient
- func (c *PropertyClient) Create() *PropertyCreate
- func (c *PropertyClient) CreateBulk(builders ...*PropertyCreate) *PropertyCreateBulk
- func (c *PropertyClient) Delete() *PropertyDelete
- func (c *PropertyClient) DeleteOne(pr *Property) *PropertyDeleteOne
- func (c *PropertyClient) DeleteOneID(id uint64) *PropertyDeleteOne
- func (c *PropertyClient) Get(ctx context.Context, id uint64) (*Property, error)
- func (c *PropertyClient) GetX(ctx context.Context, id uint64) *Property
- func (c *PropertyClient) Hooks() []Hook
- func (c *PropertyClient) Intercept(interceptors ...Interceptor)
- func (c *PropertyClient) Interceptors() []Interceptor
- func (c *PropertyClient) MapCreateBulk(slice any, setFunc func(*PropertyCreate, int)) *PropertyCreateBulk
- func (c *PropertyClient) Query() *PropertyQuery
- func (c *PropertyClient) QueryPropertyValues(pr *Property) *PropertyValueQuery
- func (c *PropertyClient) Update() *PropertyUpdate
- func (c *PropertyClient) UpdateOne(pr *Property) *PropertyUpdateOne
- func (c *PropertyClient) UpdateOneID(id uint64) *PropertyUpdateOne
- func (c *PropertyClient) Use(hooks ...Hook)
- type PropertyCreate
- func (pc *PropertyCreate) AddPropertyValueIDs(ids ...uint64) *PropertyCreate
- func (pc *PropertyCreate) AddPropertyValues(p ...*PropertyValue) *PropertyCreate
- func (pc *PropertyCreate) Exec(ctx context.Context) error
- func (pc *PropertyCreate) ExecX(ctx context.Context)
- func (pc *PropertyCreate) Mutation() *PropertyMutation
- func (pc *PropertyCreate) Save(ctx context.Context) (*Property, error)
- func (pc *PropertyCreate) SaveX(ctx context.Context) *Property
- func (pc *PropertyCreate) SetCreatedAt(t time.Time) *PropertyCreate
- func (pc *PropertyCreate) SetDeletedAt(t time.Time) *PropertyCreate
- func (pc *PropertyCreate) SetID(u uint64) *PropertyCreate
- func (pc *PropertyCreate) SetName(s string) *PropertyCreate
- func (pc *PropertyCreate) SetNillableCreatedAt(t *time.Time) *PropertyCreate
- func (pc *PropertyCreate) SetNillableDeletedAt(t *time.Time) *PropertyCreate
- func (pc *PropertyCreate) SetNillableName(s *string) *PropertyCreate
- func (pc *PropertyCreate) SetNillableRemark(s *string) *PropertyCreate
- func (pc *PropertyCreate) SetNillableStatus(u *uint8) *PropertyCreate
- func (pc *PropertyCreate) SetNillableUpdatedAt(t *time.Time) *PropertyCreate
- func (pr *PropertyCreate) SetNotNilDeletedAt(value *time.Time) *PropertyCreate
- func (pr *PropertyCreate) SetNotNilName(value *string) *PropertyCreate
- func (pr *PropertyCreate) SetNotNilRemark(value *string) *PropertyCreate
- func (pr *PropertyCreate) SetNotNilStatus(value *uint8) *PropertyCreate
- func (pr *PropertyCreate) SetNotNilUpdatedAt(value *time.Time) *PropertyCreate
- func (pc *PropertyCreate) SetRemark(s string) *PropertyCreate
- func (pc *PropertyCreate) SetStatus(u uint8) *PropertyCreate
- func (pc *PropertyCreate) SetUpdatedAt(t time.Time) *PropertyCreate
- type PropertyCreateBulk
- type PropertyDelete
- type PropertyDeleteOne
- type PropertyEdges
- type PropertyGroupBy
- func (pgb *PropertyGroupBy) Aggregate(fns ...AggregateFunc) *PropertyGroupBy
- func (s *PropertyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PropertyGroupBy) BoolX(ctx context.Context) bool
- func (s *PropertyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PropertyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PropertyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PropertyGroupBy) Float64X(ctx context.Context) float64
- func (s *PropertyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PropertyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PropertyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PropertyGroupBy) IntX(ctx context.Context) int
- func (s *PropertyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PropertyGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PropertyGroupBy) Scan(ctx context.Context, v any) error
- func (s *PropertyGroupBy) ScanX(ctx context.Context, v any)
- func (s *PropertyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PropertyGroupBy) StringX(ctx context.Context) string
- func (s *PropertyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PropertyGroupBy) StringsX(ctx context.Context) []string
- type PropertyMutation
- func (m *PropertyMutation) AddField(name string, value ent.Value) error
- func (m *PropertyMutation) AddPropertyValueIDs(ids ...uint64)
- func (m *PropertyMutation) AddStatus(u int8)
- func (m *PropertyMutation) AddedEdges() []string
- func (m *PropertyMutation) AddedField(name string) (ent.Value, bool)
- func (m *PropertyMutation) AddedFields() []string
- func (m *PropertyMutation) AddedIDs(name string) []ent.Value
- func (m *PropertyMutation) AddedStatus() (r int8, exists bool)
- func (m *PropertyMutation) ClearDeletedAt()
- func (m *PropertyMutation) ClearEdge(name string) error
- func (m *PropertyMutation) ClearField(name string) error
- func (m *PropertyMutation) ClearName()
- func (m *PropertyMutation) ClearPropertyValues()
- func (m *PropertyMutation) ClearRemark()
- func (m *PropertyMutation) ClearStatus()
- func (m *PropertyMutation) ClearedEdges() []string
- func (m *PropertyMutation) ClearedFields() []string
- func (m PropertyMutation) Client() *Client
- func (m *PropertyMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PropertyMutation) DeletedAt() (r time.Time, exists bool)
- func (m *PropertyMutation) DeletedAtCleared() bool
- func (m *PropertyMutation) EdgeCleared(name string) bool
- func (m *PropertyMutation) Field(name string) (ent.Value, bool)
- func (m *PropertyMutation) FieldCleared(name string) bool
- func (m *PropertyMutation) Fields() []string
- func (m *PropertyMutation) ID() (id uint64, exists bool)
- func (m *PropertyMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *PropertyMutation) Name() (r string, exists bool)
- func (m *PropertyMutation) NameCleared() bool
- func (m *PropertyMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PropertyMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *PropertyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PropertyMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PropertyMutation) OldRemark(ctx context.Context) (v string, err error)
- func (m *PropertyMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *PropertyMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PropertyMutation) Op() Op
- func (m *PropertyMutation) PropertyValuesCleared() bool
- func (m *PropertyMutation) PropertyValuesIDs() (ids []uint64)
- func (m *PropertyMutation) Remark() (r string, exists bool)
- func (m *PropertyMutation) RemarkCleared() bool
- func (m *PropertyMutation) RemovePropertyValueIDs(ids ...uint64)
- func (m *PropertyMutation) RemovedEdges() []string
- func (m *PropertyMutation) RemovedIDs(name string) []ent.Value
- func (m *PropertyMutation) RemovedPropertyValuesIDs() (ids []uint64)
- func (m *PropertyMutation) ResetCreatedAt()
- func (m *PropertyMutation) ResetDeletedAt()
- func (m *PropertyMutation) ResetEdge(name string) error
- func (m *PropertyMutation) ResetField(name string) error
- func (m *PropertyMutation) ResetName()
- func (m *PropertyMutation) ResetPropertyValues()
- func (m *PropertyMutation) ResetRemark()
- func (m *PropertyMutation) ResetStatus()
- func (m *PropertyMutation) ResetUpdatedAt()
- func (m *PropertyMutation) SetCreatedAt(t time.Time)
- func (m *PropertyMutation) SetDeletedAt(t time.Time)
- func (m *PropertyMutation) SetField(name string, value ent.Value) error
- func (m *PropertyMutation) SetID(id uint64)
- func (m *PropertyMutation) SetName(s string)
- func (m *PropertyMutation) SetOp(op Op)
- func (m *PropertyMutation) SetRemark(s string)
- func (m *PropertyMutation) SetStatus(u uint8)
- func (m *PropertyMutation) SetUpdatedAt(t time.Time)
- func (m *PropertyMutation) Status() (r uint8, exists bool)
- func (m *PropertyMutation) StatusCleared() bool
- func (m PropertyMutation) Tx() (*Tx, error)
- func (m *PropertyMutation) Type() string
- func (m *PropertyMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PropertyMutation) Where(ps ...predicate.Property)
- func (m *PropertyMutation) WhereP(ps ...func(*sql.Selector))
- type PropertyPageList
- type PropertyPager
- type PropertyPaginateOption
- type PropertyQuery
- func (pq *PropertyQuery) Aggregate(fns ...AggregateFunc) *PropertySelect
- func (pq *PropertyQuery) All(ctx context.Context) ([]*Property, error)
- func (pq *PropertyQuery) AllX(ctx context.Context) []*Property
- func (pq *PropertyQuery) Clone() *PropertyQuery
- func (pq *PropertyQuery) Count(ctx context.Context) (int, error)
- func (pq *PropertyQuery) CountX(ctx context.Context) int
- func (pq *PropertyQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PropertyQuery) ExistX(ctx context.Context) bool
- func (pq *PropertyQuery) First(ctx context.Context) (*Property, error)
- func (pq *PropertyQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (pq *PropertyQuery) FirstIDX(ctx context.Context) uint64
- func (pq *PropertyQuery) FirstX(ctx context.Context) *Property
- func (pq *PropertyQuery) GroupBy(field string, fields ...string) *PropertyGroupBy
- func (pq *PropertyQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (pq *PropertyQuery) IDsX(ctx context.Context) []uint64
- func (pq *PropertyQuery) Limit(limit int) *PropertyQuery
- func (pq *PropertyQuery) Offset(offset int) *PropertyQuery
- func (pq *PropertyQuery) Only(ctx context.Context) (*Property, error)
- func (pq *PropertyQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (pq *PropertyQuery) OnlyIDX(ctx context.Context) uint64
- func (pq *PropertyQuery) OnlyX(ctx context.Context) *Property
- func (pq *PropertyQuery) Order(o ...property.OrderOption) *PropertyQuery
- func (pr *PropertyQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*PropertyPageList, error)
- func (pq *PropertyQuery) QueryPropertyValues() *PropertyValueQuery
- func (pq *PropertyQuery) Select(fields ...string) *PropertySelect
- func (pq *PropertyQuery) Unique(unique bool) *PropertyQuery
- func (pq *PropertyQuery) Where(ps ...predicate.Property) *PropertyQuery
- func (pq *PropertyQuery) WithPropertyValues(opts ...func(*PropertyValueQuery)) *PropertyQuery
- type PropertySelect
- func (ps *PropertySelect) Aggregate(fns ...AggregateFunc) *PropertySelect
- func (s *PropertySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PropertySelect) BoolX(ctx context.Context) bool
- func (s *PropertySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PropertySelect) BoolsX(ctx context.Context) []bool
- func (s *PropertySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PropertySelect) Float64X(ctx context.Context) float64
- func (s *PropertySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PropertySelect) Float64sX(ctx context.Context) []float64
- func (s *PropertySelect) Int(ctx context.Context) (_ int, err error)
- func (s *PropertySelect) IntX(ctx context.Context) int
- func (s *PropertySelect) Ints(ctx context.Context) ([]int, error)
- func (s *PropertySelect) IntsX(ctx context.Context) []int
- func (ps *PropertySelect) Scan(ctx context.Context, v any) error
- func (s *PropertySelect) ScanX(ctx context.Context, v any)
- func (s *PropertySelect) String(ctx context.Context) (_ string, err error)
- func (s *PropertySelect) StringX(ctx context.Context) string
- func (s *PropertySelect) Strings(ctx context.Context) ([]string, error)
- func (s *PropertySelect) StringsX(ctx context.Context) []string
- type PropertyUpdate
- func (pu *PropertyUpdate) AddPropertyValueIDs(ids ...uint64) *PropertyUpdate
- func (pu *PropertyUpdate) AddPropertyValues(p ...*PropertyValue) *PropertyUpdate
- func (pu *PropertyUpdate) AddStatus(u int8) *PropertyUpdate
- func (pu *PropertyUpdate) ClearDeletedAt() *PropertyUpdate
- func (pu *PropertyUpdate) ClearName() *PropertyUpdate
- func (pu *PropertyUpdate) ClearPropertyValues() *PropertyUpdate
- func (pu *PropertyUpdate) ClearRemark() *PropertyUpdate
- func (pu *PropertyUpdate) ClearStatus() *PropertyUpdate
- func (pu *PropertyUpdate) Exec(ctx context.Context) error
- func (pu *PropertyUpdate) ExecX(ctx context.Context)
- func (pu *PropertyUpdate) Mutation() *PropertyMutation
- func (pu *PropertyUpdate) RemovePropertyValueIDs(ids ...uint64) *PropertyUpdate
- func (pu *PropertyUpdate) RemovePropertyValues(p ...*PropertyValue) *PropertyUpdate
- func (pu *PropertyUpdate) Save(ctx context.Context) (int, error)
- func (pu *PropertyUpdate) SaveX(ctx context.Context) int
- func (pu *PropertyUpdate) SetDeletedAt(t time.Time) *PropertyUpdate
- func (pu *PropertyUpdate) SetName(s string) *PropertyUpdate
- func (pu *PropertyUpdate) SetNillableDeletedAt(t *time.Time) *PropertyUpdate
- func (pu *PropertyUpdate) SetNillableName(s *string) *PropertyUpdate
- func (pu *PropertyUpdate) SetNillableRemark(s *string) *PropertyUpdate
- func (pu *PropertyUpdate) SetNillableStatus(u *uint8) *PropertyUpdate
- func (pr *PropertyUpdate) SetNotNilDeletedAt(value *time.Time) *PropertyUpdate
- func (pr *PropertyUpdate) SetNotNilName(value *string) *PropertyUpdate
- func (pr *PropertyUpdate) SetNotNilRemark(value *string) *PropertyUpdate
- func (pr *PropertyUpdate) SetNotNilStatus(value *uint8) *PropertyUpdate
- func (pr *PropertyUpdate) SetNotNilUpdatedAt(value *time.Time) *PropertyUpdate
- func (pu *PropertyUpdate) SetRemark(s string) *PropertyUpdate
- func (pu *PropertyUpdate) SetStatus(u uint8) *PropertyUpdate
- func (pu *PropertyUpdate) SetUpdatedAt(t time.Time) *PropertyUpdate
- func (pu *PropertyUpdate) Where(ps ...predicate.Property) *PropertyUpdate
- type PropertyUpdateOne
- func (puo *PropertyUpdateOne) AddPropertyValueIDs(ids ...uint64) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) AddPropertyValues(p ...*PropertyValue) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) AddStatus(u int8) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) ClearDeletedAt() *PropertyUpdateOne
- func (puo *PropertyUpdateOne) ClearName() *PropertyUpdateOne
- func (puo *PropertyUpdateOne) ClearPropertyValues() *PropertyUpdateOne
- func (puo *PropertyUpdateOne) ClearRemark() *PropertyUpdateOne
- func (puo *PropertyUpdateOne) ClearStatus() *PropertyUpdateOne
- func (puo *PropertyUpdateOne) Exec(ctx context.Context) error
- func (puo *PropertyUpdateOne) ExecX(ctx context.Context)
- func (puo *PropertyUpdateOne) Mutation() *PropertyMutation
- func (puo *PropertyUpdateOne) RemovePropertyValueIDs(ids ...uint64) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) RemovePropertyValues(p ...*PropertyValue) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) Save(ctx context.Context) (*Property, error)
- func (puo *PropertyUpdateOne) SaveX(ctx context.Context) *Property
- func (puo *PropertyUpdateOne) Select(field string, fields ...string) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) SetDeletedAt(t time.Time) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) SetName(s string) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) SetNillableDeletedAt(t *time.Time) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) SetNillableName(s *string) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) SetNillableRemark(s *string) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) SetNillableStatus(u *uint8) *PropertyUpdateOne
- func (pr *PropertyUpdateOne) SetNotNilDeletedAt(value *time.Time) *PropertyUpdateOne
- func (pr *PropertyUpdateOne) SetNotNilName(value *string) *PropertyUpdateOne
- func (pr *PropertyUpdateOne) SetNotNilRemark(value *string) *PropertyUpdateOne
- func (pr *PropertyUpdateOne) SetNotNilStatus(value *uint8) *PropertyUpdateOne
- func (pr *PropertyUpdateOne) SetNotNilUpdatedAt(value *time.Time) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) SetRemark(s string) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) SetStatus(u uint8) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) SetUpdatedAt(t time.Time) *PropertyUpdateOne
- func (puo *PropertyUpdateOne) Where(ps ...predicate.Property) *PropertyUpdateOne
- type PropertyValue
- type PropertyValueClient
- func (c *PropertyValueClient) Create() *PropertyValueCreate
- func (c *PropertyValueClient) CreateBulk(builders ...*PropertyValueCreate) *PropertyValueCreateBulk
- func (c *PropertyValueClient) Delete() *PropertyValueDelete
- func (c *PropertyValueClient) DeleteOne(pv *PropertyValue) *PropertyValueDeleteOne
- func (c *PropertyValueClient) DeleteOneID(id uint64) *PropertyValueDeleteOne
- func (c *PropertyValueClient) Get(ctx context.Context, id uint64) (*PropertyValue, error)
- func (c *PropertyValueClient) GetX(ctx context.Context, id uint64) *PropertyValue
- func (c *PropertyValueClient) Hooks() []Hook
- func (c *PropertyValueClient) Intercept(interceptors ...Interceptor)
- func (c *PropertyValueClient) Interceptors() []Interceptor
- func (c *PropertyValueClient) MapCreateBulk(slice any, setFunc func(*PropertyValueCreate, int)) *PropertyValueCreateBulk
- func (c *PropertyValueClient) Query() *PropertyValueQuery
- func (c *PropertyValueClient) QueryPropertys(pv *PropertyValue) *PropertyQuery
- func (c *PropertyValueClient) Update() *PropertyValueUpdate
- func (c *PropertyValueClient) UpdateOne(pv *PropertyValue) *PropertyValueUpdateOne
- func (c *PropertyValueClient) UpdateOneID(id uint64) *PropertyValueUpdateOne
- func (c *PropertyValueClient) Use(hooks ...Hook)
- type PropertyValueCreate
- func (pvc *PropertyValueCreate) Exec(ctx context.Context) error
- func (pvc *PropertyValueCreate) ExecX(ctx context.Context)
- func (pvc *PropertyValueCreate) Mutation() *PropertyValueMutation
- func (pvc *PropertyValueCreate) Save(ctx context.Context) (*PropertyValue, error)
- func (pvc *PropertyValueCreate) SaveX(ctx context.Context) *PropertyValue
- func (pvc *PropertyValueCreate) SetCreatedAt(t time.Time) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetDeletedAt(t time.Time) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetID(u uint64) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetName(s string) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetNillableCreatedAt(t *time.Time) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetNillableDeletedAt(t *time.Time) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetNillableName(s *string) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetNillablePropertyID(u *uint64) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetNillablePropertysID(id *uint64) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetNillableRemark(s *string) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetNillableUpdatedAt(t *time.Time) *PropertyValueCreate
- func (pv *PropertyValueCreate) SetNotNilDeletedAt(value *time.Time) *PropertyValueCreate
- func (pv *PropertyValueCreate) SetNotNilName(value *string) *PropertyValueCreate
- func (pv *PropertyValueCreate) SetNotNilPropertyID(value *uint64) *PropertyValueCreate
- func (pv *PropertyValueCreate) SetNotNilRemark(value *string) *PropertyValueCreate
- func (pv *PropertyValueCreate) SetNotNilUpdatedAt(value *time.Time) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetPropertyID(u uint64) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetPropertys(p *Property) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetPropertysID(id uint64) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetRemark(s string) *PropertyValueCreate
- func (pvc *PropertyValueCreate) SetUpdatedAt(t time.Time) *PropertyValueCreate
- type PropertyValueCreateBulk
- func (pvcb *PropertyValueCreateBulk) Exec(ctx context.Context) error
- func (pvcb *PropertyValueCreateBulk) ExecX(ctx context.Context)
- func (pvcb *PropertyValueCreateBulk) Save(ctx context.Context) ([]*PropertyValue, error)
- func (pvcb *PropertyValueCreateBulk) SaveX(ctx context.Context) []*PropertyValue
- type PropertyValueDelete
- type PropertyValueDeleteOne
- type PropertyValueEdges
- type PropertyValueGroupBy
- func (pvgb *PropertyValueGroupBy) Aggregate(fns ...AggregateFunc) *PropertyValueGroupBy
- func (s *PropertyValueGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PropertyValueGroupBy) BoolX(ctx context.Context) bool
- func (s *PropertyValueGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PropertyValueGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PropertyValueGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PropertyValueGroupBy) Float64X(ctx context.Context) float64
- func (s *PropertyValueGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PropertyValueGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PropertyValueGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PropertyValueGroupBy) IntX(ctx context.Context) int
- func (s *PropertyValueGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PropertyValueGroupBy) IntsX(ctx context.Context) []int
- func (pvgb *PropertyValueGroupBy) Scan(ctx context.Context, v any) error
- func (s *PropertyValueGroupBy) ScanX(ctx context.Context, v any)
- func (s *PropertyValueGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PropertyValueGroupBy) StringX(ctx context.Context) string
- func (s *PropertyValueGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PropertyValueGroupBy) StringsX(ctx context.Context) []string
- type PropertyValueMutation
- func (m *PropertyValueMutation) AddField(name string, value ent.Value) error
- func (m *PropertyValueMutation) AddedEdges() []string
- func (m *PropertyValueMutation) AddedField(name string) (ent.Value, bool)
- func (m *PropertyValueMutation) AddedFields() []string
- func (m *PropertyValueMutation) AddedIDs(name string) []ent.Value
- func (m *PropertyValueMutation) ClearDeletedAt()
- func (m *PropertyValueMutation) ClearEdge(name string) error
- func (m *PropertyValueMutation) ClearField(name string) error
- func (m *PropertyValueMutation) ClearName()
- func (m *PropertyValueMutation) ClearPropertyID()
- func (m *PropertyValueMutation) ClearPropertys()
- func (m *PropertyValueMutation) ClearRemark()
- func (m *PropertyValueMutation) ClearedEdges() []string
- func (m *PropertyValueMutation) ClearedFields() []string
- func (m PropertyValueMutation) Client() *Client
- func (m *PropertyValueMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PropertyValueMutation) DeletedAt() (r time.Time, exists bool)
- func (m *PropertyValueMutation) DeletedAtCleared() bool
- func (m *PropertyValueMutation) EdgeCleared(name string) bool
- func (m *PropertyValueMutation) Field(name string) (ent.Value, bool)
- func (m *PropertyValueMutation) FieldCleared(name string) bool
- func (m *PropertyValueMutation) Fields() []string
- func (m *PropertyValueMutation) ID() (id uint64, exists bool)
- func (m *PropertyValueMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *PropertyValueMutation) Name() (r string, exists bool)
- func (m *PropertyValueMutation) NameCleared() bool
- func (m *PropertyValueMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PropertyValueMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *PropertyValueMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PropertyValueMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PropertyValueMutation) OldPropertyID(ctx context.Context) (v uint64, err error)
- func (m *PropertyValueMutation) OldRemark(ctx context.Context) (v string, err error)
- func (m *PropertyValueMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PropertyValueMutation) Op() Op
- func (m *PropertyValueMutation) PropertyID() (r uint64, exists bool)
- func (m *PropertyValueMutation) PropertyIDCleared() bool
- func (m *PropertyValueMutation) PropertysCleared() bool
- func (m *PropertyValueMutation) PropertysID() (id uint64, exists bool)
- func (m *PropertyValueMutation) PropertysIDs() (ids []uint64)
- func (m *PropertyValueMutation) Remark() (r string, exists bool)
- func (m *PropertyValueMutation) RemarkCleared() bool
- func (m *PropertyValueMutation) RemovedEdges() []string
- func (m *PropertyValueMutation) RemovedIDs(name string) []ent.Value
- func (m *PropertyValueMutation) ResetCreatedAt()
- func (m *PropertyValueMutation) ResetDeletedAt()
- func (m *PropertyValueMutation) ResetEdge(name string) error
- func (m *PropertyValueMutation) ResetField(name string) error
- func (m *PropertyValueMutation) ResetName()
- func (m *PropertyValueMutation) ResetPropertyID()
- func (m *PropertyValueMutation) ResetPropertys()
- func (m *PropertyValueMutation) ResetRemark()
- func (m *PropertyValueMutation) ResetUpdatedAt()
- func (m *PropertyValueMutation) SetCreatedAt(t time.Time)
- func (m *PropertyValueMutation) SetDeletedAt(t time.Time)
- func (m *PropertyValueMutation) SetField(name string, value ent.Value) error
- func (m *PropertyValueMutation) SetID(id uint64)
- func (m *PropertyValueMutation) SetName(s string)
- func (m *PropertyValueMutation) SetOp(op Op)
- func (m *PropertyValueMutation) SetPropertyID(u uint64)
- func (m *PropertyValueMutation) SetPropertysID(id uint64)
- func (m *PropertyValueMutation) SetRemark(s string)
- func (m *PropertyValueMutation) SetUpdatedAt(t time.Time)
- func (m PropertyValueMutation) Tx() (*Tx, error)
- func (m *PropertyValueMutation) Type() string
- func (m *PropertyValueMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PropertyValueMutation) Where(ps ...predicate.PropertyValue)
- func (m *PropertyValueMutation) WhereP(ps ...func(*sql.Selector))
- type PropertyValuePageList
- type PropertyValuePager
- type PropertyValuePaginateOption
- type PropertyValueQuery
- func (pvq *PropertyValueQuery) Aggregate(fns ...AggregateFunc) *PropertyValueSelect
- func (pvq *PropertyValueQuery) All(ctx context.Context) ([]*PropertyValue, error)
- func (pvq *PropertyValueQuery) AllX(ctx context.Context) []*PropertyValue
- func (pvq *PropertyValueQuery) Clone() *PropertyValueQuery
- func (pvq *PropertyValueQuery) Count(ctx context.Context) (int, error)
- func (pvq *PropertyValueQuery) CountX(ctx context.Context) int
- func (pvq *PropertyValueQuery) Exist(ctx context.Context) (bool, error)
- func (pvq *PropertyValueQuery) ExistX(ctx context.Context) bool
- func (pvq *PropertyValueQuery) First(ctx context.Context) (*PropertyValue, error)
- func (pvq *PropertyValueQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (pvq *PropertyValueQuery) FirstIDX(ctx context.Context) uint64
- func (pvq *PropertyValueQuery) FirstX(ctx context.Context) *PropertyValue
- func (pvq *PropertyValueQuery) GroupBy(field string, fields ...string) *PropertyValueGroupBy
- func (pvq *PropertyValueQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (pvq *PropertyValueQuery) IDsX(ctx context.Context) []uint64
- func (pvq *PropertyValueQuery) Limit(limit int) *PropertyValueQuery
- func (pvq *PropertyValueQuery) Offset(offset int) *PropertyValueQuery
- func (pvq *PropertyValueQuery) Only(ctx context.Context) (*PropertyValue, error)
- func (pvq *PropertyValueQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (pvq *PropertyValueQuery) OnlyIDX(ctx context.Context) uint64
- func (pvq *PropertyValueQuery) OnlyX(ctx context.Context) *PropertyValue
- func (pvq *PropertyValueQuery) Order(o ...propertyvalue.OrderOption) *PropertyValueQuery
- func (pv *PropertyValueQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*PropertyValuePageList, error)
- func (pvq *PropertyValueQuery) QueryPropertys() *PropertyQuery
- func (pvq *PropertyValueQuery) Select(fields ...string) *PropertyValueSelect
- func (pvq *PropertyValueQuery) Unique(unique bool) *PropertyValueQuery
- func (pvq *PropertyValueQuery) Where(ps ...predicate.PropertyValue) *PropertyValueQuery
- func (pvq *PropertyValueQuery) WithPropertys(opts ...func(*PropertyQuery)) *PropertyValueQuery
- type PropertyValueSelect
- func (pvs *PropertyValueSelect) Aggregate(fns ...AggregateFunc) *PropertyValueSelect
- func (s *PropertyValueSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PropertyValueSelect) BoolX(ctx context.Context) bool
- func (s *PropertyValueSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PropertyValueSelect) BoolsX(ctx context.Context) []bool
- func (s *PropertyValueSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PropertyValueSelect) Float64X(ctx context.Context) float64
- func (s *PropertyValueSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PropertyValueSelect) Float64sX(ctx context.Context) []float64
- func (s *PropertyValueSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PropertyValueSelect) IntX(ctx context.Context) int
- func (s *PropertyValueSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PropertyValueSelect) IntsX(ctx context.Context) []int
- func (pvs *PropertyValueSelect) Scan(ctx context.Context, v any) error
- func (s *PropertyValueSelect) ScanX(ctx context.Context, v any)
- func (s *PropertyValueSelect) String(ctx context.Context) (_ string, err error)
- func (s *PropertyValueSelect) StringX(ctx context.Context) string
- func (s *PropertyValueSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PropertyValueSelect) StringsX(ctx context.Context) []string
- type PropertyValueUpdate
- func (pvu *PropertyValueUpdate) ClearDeletedAt() *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) ClearName() *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) ClearPropertyID() *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) ClearPropertys() *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) ClearRemark() *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) Exec(ctx context.Context) error
- func (pvu *PropertyValueUpdate) ExecX(ctx context.Context)
- func (pvu *PropertyValueUpdate) Mutation() *PropertyValueMutation
- func (pvu *PropertyValueUpdate) Save(ctx context.Context) (int, error)
- func (pvu *PropertyValueUpdate) SaveX(ctx context.Context) int
- func (pvu *PropertyValueUpdate) SetDeletedAt(t time.Time) *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) SetName(s string) *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) SetNillableDeletedAt(t *time.Time) *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) SetNillableName(s *string) *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) SetNillablePropertyID(u *uint64) *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) SetNillablePropertysID(id *uint64) *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) SetNillableRemark(s *string) *PropertyValueUpdate
- func (pv *PropertyValueUpdate) SetNotNilDeletedAt(value *time.Time) *PropertyValueUpdate
- func (pv *PropertyValueUpdate) SetNotNilName(value *string) *PropertyValueUpdate
- func (pv *PropertyValueUpdate) SetNotNilPropertyID(value *uint64) *PropertyValueUpdate
- func (pv *PropertyValueUpdate) SetNotNilRemark(value *string) *PropertyValueUpdate
- func (pv *PropertyValueUpdate) SetNotNilUpdatedAt(value *time.Time) *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) SetPropertyID(u uint64) *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) SetPropertys(p *Property) *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) SetPropertysID(id uint64) *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) SetRemark(s string) *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) SetUpdatedAt(t time.Time) *PropertyValueUpdate
- func (pvu *PropertyValueUpdate) Where(ps ...predicate.PropertyValue) *PropertyValueUpdate
- type PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) ClearDeletedAt() *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) ClearName() *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) ClearPropertyID() *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) ClearPropertys() *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) ClearRemark() *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) Exec(ctx context.Context) error
- func (pvuo *PropertyValueUpdateOne) ExecX(ctx context.Context)
- func (pvuo *PropertyValueUpdateOne) Mutation() *PropertyValueMutation
- func (pvuo *PropertyValueUpdateOne) Save(ctx context.Context) (*PropertyValue, error)
- func (pvuo *PropertyValueUpdateOne) SaveX(ctx context.Context) *PropertyValue
- func (pvuo *PropertyValueUpdateOne) Select(field string, fields ...string) *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) SetDeletedAt(t time.Time) *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) SetName(s string) *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) SetNillableDeletedAt(t *time.Time) *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) SetNillableName(s *string) *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) SetNillablePropertyID(u *uint64) *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) SetNillablePropertysID(id *uint64) *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) SetNillableRemark(s *string) *PropertyValueUpdateOne
- func (pv *PropertyValueUpdateOne) SetNotNilDeletedAt(value *time.Time) *PropertyValueUpdateOne
- func (pv *PropertyValueUpdateOne) SetNotNilName(value *string) *PropertyValueUpdateOne
- func (pv *PropertyValueUpdateOne) SetNotNilPropertyID(value *uint64) *PropertyValueUpdateOne
- func (pv *PropertyValueUpdateOne) SetNotNilRemark(value *string) *PropertyValueUpdateOne
- func (pv *PropertyValueUpdateOne) SetNotNilUpdatedAt(value *time.Time) *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) SetPropertyID(u uint64) *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) SetPropertys(p *Property) *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) SetPropertysID(id uint64) *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) SetRemark(s string) *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) SetUpdatedAt(t time.Time) *PropertyValueUpdateOne
- func (pvuo *PropertyValueUpdateOne) Where(ps ...predicate.PropertyValue) *PropertyValueUpdateOne
- type PropertyValues
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Sku
- type SkuClient
- func (c *SkuClient) Create() *SkuCreate
- func (c *SkuClient) CreateBulk(builders ...*SkuCreate) *SkuCreateBulk
- func (c *SkuClient) Delete() *SkuDelete
- func (c *SkuClient) DeleteOne(s *Sku) *SkuDeleteOne
- func (c *SkuClient) DeleteOneID(id uint64) *SkuDeleteOne
- func (c *SkuClient) Get(ctx context.Context, id uint64) (*Sku, error)
- func (c *SkuClient) GetX(ctx context.Context, id uint64) *Sku
- func (c *SkuClient) Hooks() []Hook
- func (c *SkuClient) Intercept(interceptors ...Interceptor)
- func (c *SkuClient) Interceptors() []Interceptor
- func (c *SkuClient) MapCreateBulk(slice any, setFunc func(*SkuCreate, int)) *SkuCreateBulk
- func (c *SkuClient) Query() *SkuQuery
- func (c *SkuClient) QueryComments(s *Sku) *CommentQuery
- func (c *SkuClient) QuerySpus(s *Sku) *SpuQuery
- func (c *SkuClient) Update() *SkuUpdate
- func (c *SkuClient) UpdateOne(s *Sku) *SkuUpdateOne
- func (c *SkuClient) UpdateOneID(id uint64) *SkuUpdateOne
- func (c *SkuClient) Use(hooks ...Hook)
- type SkuCreate
- func (sc *SkuCreate) AddCommentIDs(ids ...uint64) *SkuCreate
- func (sc *SkuCreate) AddComments(c ...*Comment) *SkuCreate
- func (sc *SkuCreate) Exec(ctx context.Context) error
- func (sc *SkuCreate) ExecX(ctx context.Context)
- func (sc *SkuCreate) Mutation() *SkuMutation
- func (sc *SkuCreate) Save(ctx context.Context) (*Sku, error)
- func (sc *SkuCreate) SaveX(ctx context.Context) *Sku
- func (sc *SkuCreate) SetBarCode(s string) *SkuCreate
- func (sc *SkuCreate) SetCostPrice(i int32) *SkuCreate
- func (sc *SkuCreate) SetCreatedAt(t time.Time) *SkuCreate
- func (sc *SkuCreate) SetDeletedAt(t time.Time) *SkuCreate
- func (sc *SkuCreate) SetFirstBrokeragePrice(i int32) *SkuCreate
- func (sc *SkuCreate) SetID(u uint64) *SkuCreate
- func (sc *SkuCreate) SetMarketPrice(i int32) *SkuCreate
- func (sc *SkuCreate) SetNillableBarCode(s *string) *SkuCreate
- func (sc *SkuCreate) SetNillableCreatedAt(t *time.Time) *SkuCreate
- func (sc *SkuCreate) SetNillableDeletedAt(t *time.Time) *SkuCreate
- func (sc *SkuCreate) SetNillableFirstBrokeragePrice(i *int32) *SkuCreate
- func (sc *SkuCreate) SetNillableMarketPrice(i *int32) *SkuCreate
- func (sc *SkuCreate) SetNillableSalesCount(i *int32) *SkuCreate
- func (sc *SkuCreate) SetNillableSecondBrokeragePrice(f *float64) *SkuCreate
- func (sc *SkuCreate) SetNillableSpuID(u *uint64) *SkuCreate
- func (sc *SkuCreate) SetNillableSpusID(id *uint64) *SkuCreate
- func (sc *SkuCreate) SetNillableStock(i *int32) *SkuCreate
- func (sc *SkuCreate) SetNillableUpdatedAt(t *time.Time) *SkuCreate
- func (sc *SkuCreate) SetNillableVolume(f *float64) *SkuCreate
- func (sc *SkuCreate) SetNillableWeight(f *float64) *SkuCreate
- func (s *SkuCreate) SetNotNilBarCode(value *string) *SkuCreate
- func (s *SkuCreate) SetNotNilCostPrice(value *int32) *SkuCreate
- func (s *SkuCreate) SetNotNilDeletedAt(value *time.Time) *SkuCreate
- func (s *SkuCreate) SetNotNilFirstBrokeragePrice(value *int32) *SkuCreate
- func (s *SkuCreate) SetNotNilMarketPrice(value *int32) *SkuCreate
- func (s *SkuCreate) SetNotNilPicURL(value *string) *SkuCreate
- func (s *SkuCreate) SetNotNilPrice(value *int32) *SkuCreate
- func (s *SkuCreate) SetNotNilProperties(value *[]entType.SkuProperty) *SkuCreate
- func (s *SkuCreate) SetNotNilSalesCount(value *int32) *SkuCreate
- func (s *SkuCreate) SetNotNilSecondBrokeragePrice(value *float64) *SkuCreate
- func (s *SkuCreate) SetNotNilSpuID(value *uint64) *SkuCreate
- func (s *SkuCreate) SetNotNilStock(value *int32) *SkuCreate
- func (s *SkuCreate) SetNotNilUpdatedAt(value *time.Time) *SkuCreate
- func (s *SkuCreate) SetNotNilVolume(value *float64) *SkuCreate
- func (s *SkuCreate) SetNotNilWeight(value *float64) *SkuCreate
- func (sc *SkuCreate) SetPicURL(s string) *SkuCreate
- func (sc *SkuCreate) SetPrice(i int32) *SkuCreate
- func (sc *SkuCreate) SetProperties(etp []entType.SkuProperty) *SkuCreate
- func (sc *SkuCreate) SetSalesCount(i int32) *SkuCreate
- func (sc *SkuCreate) SetSecondBrokeragePrice(f float64) *SkuCreate
- func (sc *SkuCreate) SetSpuID(u uint64) *SkuCreate
- func (sc *SkuCreate) SetSpus(s *Spu) *SkuCreate
- func (sc *SkuCreate) SetSpusID(id uint64) *SkuCreate
- func (sc *SkuCreate) SetStock(i int32) *SkuCreate
- func (sc *SkuCreate) SetUpdatedAt(t time.Time) *SkuCreate
- func (sc *SkuCreate) SetVolume(f float64) *SkuCreate
- func (sc *SkuCreate) SetWeight(f float64) *SkuCreate
- type SkuCreateBulk
- type SkuDelete
- type SkuDeleteOne
- type SkuEdges
- type SkuGroupBy
- func (sgb *SkuGroupBy) Aggregate(fns ...AggregateFunc) *SkuGroupBy
- func (s *SkuGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SkuGroupBy) BoolX(ctx context.Context) bool
- func (s *SkuGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SkuGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SkuGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SkuGroupBy) Float64X(ctx context.Context) float64
- func (s *SkuGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SkuGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SkuGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SkuGroupBy) IntX(ctx context.Context) int
- func (s *SkuGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SkuGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SkuGroupBy) Scan(ctx context.Context, v any) error
- func (s *SkuGroupBy) ScanX(ctx context.Context, v any)
- func (s *SkuGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SkuGroupBy) StringX(ctx context.Context) string
- func (s *SkuGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SkuGroupBy) StringsX(ctx context.Context) []string
- type SkuMutation
- func (m *SkuMutation) AddCommentIDs(ids ...uint64)
- func (m *SkuMutation) AddCostPrice(i int32)
- func (m *SkuMutation) AddField(name string, value ent.Value) error
- func (m *SkuMutation) AddFirstBrokeragePrice(i int32)
- func (m *SkuMutation) AddMarketPrice(i int32)
- func (m *SkuMutation) AddPrice(i int32)
- func (m *SkuMutation) AddSalesCount(i int32)
- func (m *SkuMutation) AddSecondBrokeragePrice(f float64)
- func (m *SkuMutation) AddStock(i int32)
- func (m *SkuMutation) AddVolume(f float64)
- func (m *SkuMutation) AddWeight(f float64)
- func (m *SkuMutation) AddedCostPrice() (r int32, exists bool)
- func (m *SkuMutation) AddedEdges() []string
- func (m *SkuMutation) AddedField(name string) (ent.Value, bool)
- func (m *SkuMutation) AddedFields() []string
- func (m *SkuMutation) AddedFirstBrokeragePrice() (r int32, exists bool)
- func (m *SkuMutation) AddedIDs(name string) []ent.Value
- func (m *SkuMutation) AddedMarketPrice() (r int32, exists bool)
- func (m *SkuMutation) AddedPrice() (r int32, exists bool)
- func (m *SkuMutation) AddedSalesCount() (r int32, exists bool)
- func (m *SkuMutation) AddedSecondBrokeragePrice() (r float64, exists bool)
- func (m *SkuMutation) AddedStock() (r int32, exists bool)
- func (m *SkuMutation) AddedVolume() (r float64, exists bool)
- func (m *SkuMutation) AddedWeight() (r float64, exists bool)
- func (m *SkuMutation) AppendProperties(etp []entType.SkuProperty)
- func (m *SkuMutation) AppendedProperties() ([]entType.SkuProperty, bool)
- func (m *SkuMutation) BarCode() (r string, exists bool)
- func (m *SkuMutation) BarCodeCleared() bool
- func (m *SkuMutation) ClearBarCode()
- func (m *SkuMutation) ClearComments()
- func (m *SkuMutation) ClearDeletedAt()
- func (m *SkuMutation) ClearEdge(name string) error
- func (m *SkuMutation) ClearField(name string) error
- func (m *SkuMutation) ClearFirstBrokeragePrice()
- func (m *SkuMutation) ClearMarketPrice()
- func (m *SkuMutation) ClearProperties()
- func (m *SkuMutation) ClearSalesCount()
- func (m *SkuMutation) ClearSecondBrokeragePrice()
- func (m *SkuMutation) ClearSpuID()
- func (m *SkuMutation) ClearSpus()
- func (m *SkuMutation) ClearStock()
- func (m *SkuMutation) ClearVolume()
- func (m *SkuMutation) ClearWeight()
- func (m *SkuMutation) ClearedEdges() []string
- func (m *SkuMutation) ClearedFields() []string
- func (m SkuMutation) Client() *Client
- func (m *SkuMutation) CommentsCleared() bool
- func (m *SkuMutation) CommentsIDs() (ids []uint64)
- func (m *SkuMutation) CostPrice() (r int32, exists bool)
- func (m *SkuMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SkuMutation) DeletedAt() (r time.Time, exists bool)
- func (m *SkuMutation) DeletedAtCleared() bool
- func (m *SkuMutation) EdgeCleared(name string) bool
- func (m *SkuMutation) Field(name string) (ent.Value, bool)
- func (m *SkuMutation) FieldCleared(name string) bool
- func (m *SkuMutation) Fields() []string
- func (m *SkuMutation) FirstBrokeragePrice() (r int32, exists bool)
- func (m *SkuMutation) FirstBrokeragePriceCleared() bool
- func (m *SkuMutation) ID() (id uint64, exists bool)
- func (m *SkuMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *SkuMutation) MarketPrice() (r int32, exists bool)
- func (m *SkuMutation) MarketPriceCleared() bool
- func (m *SkuMutation) OldBarCode(ctx context.Context) (v string, err error)
- func (m *SkuMutation) OldCostPrice(ctx context.Context) (v int32, err error)
- func (m *SkuMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SkuMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *SkuMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SkuMutation) OldFirstBrokeragePrice(ctx context.Context) (v int32, err error)
- func (m *SkuMutation) OldMarketPrice(ctx context.Context) (v int32, err error)
- func (m *SkuMutation) OldPicURL(ctx context.Context) (v string, err error)
- func (m *SkuMutation) OldPrice(ctx context.Context) (v int32, err error)
- func (m *SkuMutation) OldProperties(ctx context.Context) (v []entType.SkuProperty, err error)
- func (m *SkuMutation) OldSalesCount(ctx context.Context) (v int32, err error)
- func (m *SkuMutation) OldSecondBrokeragePrice(ctx context.Context) (v float64, err error)
- func (m *SkuMutation) OldSpuID(ctx context.Context) (v uint64, err error)
- func (m *SkuMutation) OldStock(ctx context.Context) (v int32, err error)
- func (m *SkuMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SkuMutation) OldVolume(ctx context.Context) (v float64, err error)
- func (m *SkuMutation) OldWeight(ctx context.Context) (v float64, err error)
- func (m *SkuMutation) Op() Op
- func (m *SkuMutation) PicURL() (r string, exists bool)
- func (m *SkuMutation) Price() (r int32, exists bool)
- func (m *SkuMutation) Properties() (r []entType.SkuProperty, exists bool)
- func (m *SkuMutation) PropertiesCleared() bool
- func (m *SkuMutation) RemoveCommentIDs(ids ...uint64)
- func (m *SkuMutation) RemovedCommentsIDs() (ids []uint64)
- func (m *SkuMutation) RemovedEdges() []string
- func (m *SkuMutation) RemovedIDs(name string) []ent.Value
- func (m *SkuMutation) ResetBarCode()
- func (m *SkuMutation) ResetComments()
- func (m *SkuMutation) ResetCostPrice()
- func (m *SkuMutation) ResetCreatedAt()
- func (m *SkuMutation) ResetDeletedAt()
- func (m *SkuMutation) ResetEdge(name string) error
- func (m *SkuMutation) ResetField(name string) error
- func (m *SkuMutation) ResetFirstBrokeragePrice()
- func (m *SkuMutation) ResetMarketPrice()
- func (m *SkuMutation) ResetPicURL()
- func (m *SkuMutation) ResetPrice()
- func (m *SkuMutation) ResetProperties()
- func (m *SkuMutation) ResetSalesCount()
- func (m *SkuMutation) ResetSecondBrokeragePrice()
- func (m *SkuMutation) ResetSpuID()
- func (m *SkuMutation) ResetSpus()
- func (m *SkuMutation) ResetStock()
- func (m *SkuMutation) ResetUpdatedAt()
- func (m *SkuMutation) ResetVolume()
- func (m *SkuMutation) ResetWeight()
- func (m *SkuMutation) SalesCount() (r int32, exists bool)
- func (m *SkuMutation) SalesCountCleared() bool
- func (m *SkuMutation) SecondBrokeragePrice() (r float64, exists bool)
- func (m *SkuMutation) SecondBrokeragePriceCleared() bool
- func (m *SkuMutation) SetBarCode(s string)
- func (m *SkuMutation) SetCostPrice(i int32)
- func (m *SkuMutation) SetCreatedAt(t time.Time)
- func (m *SkuMutation) SetDeletedAt(t time.Time)
- func (m *SkuMutation) SetField(name string, value ent.Value) error
- func (m *SkuMutation) SetFirstBrokeragePrice(i int32)
- func (m *SkuMutation) SetID(id uint64)
- func (m *SkuMutation) SetMarketPrice(i int32)
- func (m *SkuMutation) SetOp(op Op)
- func (m *SkuMutation) SetPicURL(s string)
- func (m *SkuMutation) SetPrice(i int32)
- func (m *SkuMutation) SetProperties(etp []entType.SkuProperty)
- func (m *SkuMutation) SetSalesCount(i int32)
- func (m *SkuMutation) SetSecondBrokeragePrice(f float64)
- func (m *SkuMutation) SetSpuID(u uint64)
- func (m *SkuMutation) SetSpusID(id uint64)
- func (m *SkuMutation) SetStock(i int32)
- func (m *SkuMutation) SetUpdatedAt(t time.Time)
- func (m *SkuMutation) SetVolume(f float64)
- func (m *SkuMutation) SetWeight(f float64)
- func (m *SkuMutation) SpuID() (r uint64, exists bool)
- func (m *SkuMutation) SpuIDCleared() bool
- func (m *SkuMutation) SpusCleared() bool
- func (m *SkuMutation) SpusID() (id uint64, exists bool)
- func (m *SkuMutation) SpusIDs() (ids []uint64)
- func (m *SkuMutation) Stock() (r int32, exists bool)
- func (m *SkuMutation) StockCleared() bool
- func (m SkuMutation) Tx() (*Tx, error)
- func (m *SkuMutation) Type() string
- func (m *SkuMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *SkuMutation) Volume() (r float64, exists bool)
- func (m *SkuMutation) VolumeCleared() bool
- func (m *SkuMutation) Weight() (r float64, exists bool)
- func (m *SkuMutation) WeightCleared() bool
- func (m *SkuMutation) Where(ps ...predicate.Sku)
- func (m *SkuMutation) WhereP(ps ...func(*sql.Selector))
- type SkuPageList
- type SkuPager
- type SkuPaginateOption
- type SkuQuery
- func (sq *SkuQuery) Aggregate(fns ...AggregateFunc) *SkuSelect
- func (sq *SkuQuery) All(ctx context.Context) ([]*Sku, error)
- func (sq *SkuQuery) AllX(ctx context.Context) []*Sku
- func (sq *SkuQuery) Clone() *SkuQuery
- func (sq *SkuQuery) Count(ctx context.Context) (int, error)
- func (sq *SkuQuery) CountX(ctx context.Context) int
- func (sq *SkuQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SkuQuery) ExistX(ctx context.Context) bool
- func (sq *SkuQuery) First(ctx context.Context) (*Sku, error)
- func (sq *SkuQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (sq *SkuQuery) FirstIDX(ctx context.Context) uint64
- func (sq *SkuQuery) FirstX(ctx context.Context) *Sku
- func (sq *SkuQuery) GroupBy(field string, fields ...string) *SkuGroupBy
- func (sq *SkuQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (sq *SkuQuery) IDsX(ctx context.Context) []uint64
- func (sq *SkuQuery) Limit(limit int) *SkuQuery
- func (sq *SkuQuery) Offset(offset int) *SkuQuery
- func (sq *SkuQuery) Only(ctx context.Context) (*Sku, error)
- func (sq *SkuQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (sq *SkuQuery) OnlyIDX(ctx context.Context) uint64
- func (sq *SkuQuery) OnlyX(ctx context.Context) *Sku
- func (sq *SkuQuery) Order(o ...sku.OrderOption) *SkuQuery
- func (s *SkuQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*SkuPageList, error)
- func (sq *SkuQuery) QueryComments() *CommentQuery
- func (sq *SkuQuery) QuerySpus() *SpuQuery
- func (sq *SkuQuery) Select(fields ...string) *SkuSelect
- func (sq *SkuQuery) Unique(unique bool) *SkuQuery
- func (sq *SkuQuery) Where(ps ...predicate.Sku) *SkuQuery
- func (sq *SkuQuery) WithComments(opts ...func(*CommentQuery)) *SkuQuery
- func (sq *SkuQuery) WithSpus(opts ...func(*SpuQuery)) *SkuQuery
- type SkuSelect
- func (ss *SkuSelect) Aggregate(fns ...AggregateFunc) *SkuSelect
- func (s *SkuSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SkuSelect) BoolX(ctx context.Context) bool
- func (s *SkuSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SkuSelect) BoolsX(ctx context.Context) []bool
- func (s *SkuSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SkuSelect) Float64X(ctx context.Context) float64
- func (s *SkuSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SkuSelect) Float64sX(ctx context.Context) []float64
- func (s *SkuSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SkuSelect) IntX(ctx context.Context) int
- func (s *SkuSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SkuSelect) IntsX(ctx context.Context) []int
- func (ss *SkuSelect) Scan(ctx context.Context, v any) error
- func (s *SkuSelect) ScanX(ctx context.Context, v any)
- func (s *SkuSelect) String(ctx context.Context) (_ string, err error)
- func (s *SkuSelect) StringX(ctx context.Context) string
- func (s *SkuSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SkuSelect) StringsX(ctx context.Context) []string
- type SkuUpdate
- func (su *SkuUpdate) AddCommentIDs(ids ...uint64) *SkuUpdate
- func (su *SkuUpdate) AddComments(c ...*Comment) *SkuUpdate
- func (su *SkuUpdate) AddCostPrice(i int32) *SkuUpdate
- func (su *SkuUpdate) AddFirstBrokeragePrice(i int32) *SkuUpdate
- func (su *SkuUpdate) AddMarketPrice(i int32) *SkuUpdate
- func (su *SkuUpdate) AddPrice(i int32) *SkuUpdate
- func (su *SkuUpdate) AddSalesCount(i int32) *SkuUpdate
- func (su *SkuUpdate) AddSecondBrokeragePrice(f float64) *SkuUpdate
- func (su *SkuUpdate) AddStock(i int32) *SkuUpdate
- func (su *SkuUpdate) AddVolume(f float64) *SkuUpdate
- func (su *SkuUpdate) AddWeight(f float64) *SkuUpdate
- func (su *SkuUpdate) AppendProperties(etp []entType.SkuProperty) *SkuUpdate
- func (su *SkuUpdate) ClearBarCode() *SkuUpdate
- func (su *SkuUpdate) ClearComments() *SkuUpdate
- func (su *SkuUpdate) ClearDeletedAt() *SkuUpdate
- func (su *SkuUpdate) ClearFirstBrokeragePrice() *SkuUpdate
- func (su *SkuUpdate) ClearMarketPrice() *SkuUpdate
- func (su *SkuUpdate) ClearProperties() *SkuUpdate
- func (su *SkuUpdate) ClearSalesCount() *SkuUpdate
- func (su *SkuUpdate) ClearSecondBrokeragePrice() *SkuUpdate
- func (su *SkuUpdate) ClearSpuID() *SkuUpdate
- func (su *SkuUpdate) ClearSpus() *SkuUpdate
- func (su *SkuUpdate) ClearStock() *SkuUpdate
- func (su *SkuUpdate) ClearVolume() *SkuUpdate
- func (su *SkuUpdate) ClearWeight() *SkuUpdate
- func (su *SkuUpdate) Exec(ctx context.Context) error
- func (su *SkuUpdate) ExecX(ctx context.Context)
- func (su *SkuUpdate) Mutation() *SkuMutation
- func (su *SkuUpdate) RemoveCommentIDs(ids ...uint64) *SkuUpdate
- func (su *SkuUpdate) RemoveComments(c ...*Comment) *SkuUpdate
- func (su *SkuUpdate) Save(ctx context.Context) (int, error)
- func (su *SkuUpdate) SaveX(ctx context.Context) int
- func (su *SkuUpdate) SetBarCode(s string) *SkuUpdate
- func (su *SkuUpdate) SetCostPrice(i int32) *SkuUpdate
- func (su *SkuUpdate) SetDeletedAt(t time.Time) *SkuUpdate
- func (su *SkuUpdate) SetFirstBrokeragePrice(i int32) *SkuUpdate
- func (su *SkuUpdate) SetMarketPrice(i int32) *SkuUpdate
- func (su *SkuUpdate) SetNillableBarCode(s *string) *SkuUpdate
- func (su *SkuUpdate) SetNillableDeletedAt(t *time.Time) *SkuUpdate
- func (su *SkuUpdate) SetNillableFirstBrokeragePrice(i *int32) *SkuUpdate
- func (su *SkuUpdate) SetNillableMarketPrice(i *int32) *SkuUpdate
- func (su *SkuUpdate) SetNillableSalesCount(i *int32) *SkuUpdate
- func (su *SkuUpdate) SetNillableSecondBrokeragePrice(f *float64) *SkuUpdate
- func (su *SkuUpdate) SetNillableSpuID(u *uint64) *SkuUpdate
- func (su *SkuUpdate) SetNillableSpusID(id *uint64) *SkuUpdate
- func (su *SkuUpdate) SetNillableStock(i *int32) *SkuUpdate
- func (su *SkuUpdate) SetNillableVolume(f *float64) *SkuUpdate
- func (su *SkuUpdate) SetNillableWeight(f *float64) *SkuUpdate
- func (s *SkuUpdate) SetNotNilBarCode(value *string) *SkuUpdate
- func (s *SkuUpdate) SetNotNilCostPrice(value *int32) *SkuUpdate
- func (s *SkuUpdate) SetNotNilDeletedAt(value *time.Time) *SkuUpdate
- func (s *SkuUpdate) SetNotNilFirstBrokeragePrice(value *int32) *SkuUpdate
- func (s *SkuUpdate) SetNotNilMarketPrice(value *int32) *SkuUpdate
- func (s *SkuUpdate) SetNotNilPicURL(value *string) *SkuUpdate
- func (s *SkuUpdate) SetNotNilPrice(value *int32) *SkuUpdate
- func (s *SkuUpdate) SetNotNilProperties(value *[]entType.SkuProperty) *SkuUpdate
- func (s *SkuUpdate) SetNotNilSalesCount(value *int32) *SkuUpdate
- func (s *SkuUpdate) SetNotNilSecondBrokeragePrice(value *float64) *SkuUpdate
- func (s *SkuUpdate) SetNotNilSpuID(value *uint64) *SkuUpdate
- func (s *SkuUpdate) SetNotNilStock(value *int32) *SkuUpdate
- func (s *SkuUpdate) SetNotNilUpdatedAt(value *time.Time) *SkuUpdate
- func (s *SkuUpdate) SetNotNilVolume(value *float64) *SkuUpdate
- func (s *SkuUpdate) SetNotNilWeight(value *float64) *SkuUpdate
- func (su *SkuUpdate) SetPicURL(s string) *SkuUpdate
- func (su *SkuUpdate) SetPrice(i int32) *SkuUpdate
- func (su *SkuUpdate) SetProperties(etp []entType.SkuProperty) *SkuUpdate
- func (su *SkuUpdate) SetSalesCount(i int32) *SkuUpdate
- func (su *SkuUpdate) SetSecondBrokeragePrice(f float64) *SkuUpdate
- func (su *SkuUpdate) SetSpuID(u uint64) *SkuUpdate
- func (su *SkuUpdate) SetSpus(s *Spu) *SkuUpdate
- func (su *SkuUpdate) SetSpusID(id uint64) *SkuUpdate
- func (su *SkuUpdate) SetStock(i int32) *SkuUpdate
- func (su *SkuUpdate) SetUpdatedAt(t time.Time) *SkuUpdate
- func (su *SkuUpdate) SetVolume(f float64) *SkuUpdate
- func (su *SkuUpdate) SetWeight(f float64) *SkuUpdate
- func (su *SkuUpdate) Where(ps ...predicate.Sku) *SkuUpdate
- type SkuUpdateOne
- func (suo *SkuUpdateOne) AddCommentIDs(ids ...uint64) *SkuUpdateOne
- func (suo *SkuUpdateOne) AddComments(c ...*Comment) *SkuUpdateOne
- func (suo *SkuUpdateOne) AddCostPrice(i int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) AddFirstBrokeragePrice(i int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) AddMarketPrice(i int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) AddPrice(i int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) AddSalesCount(i int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) AddSecondBrokeragePrice(f float64) *SkuUpdateOne
- func (suo *SkuUpdateOne) AddStock(i int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) AddVolume(f float64) *SkuUpdateOne
- func (suo *SkuUpdateOne) AddWeight(f float64) *SkuUpdateOne
- func (suo *SkuUpdateOne) AppendProperties(etp []entType.SkuProperty) *SkuUpdateOne
- func (suo *SkuUpdateOne) ClearBarCode() *SkuUpdateOne
- func (suo *SkuUpdateOne) ClearComments() *SkuUpdateOne
- func (suo *SkuUpdateOne) ClearDeletedAt() *SkuUpdateOne
- func (suo *SkuUpdateOne) ClearFirstBrokeragePrice() *SkuUpdateOne
- func (suo *SkuUpdateOne) ClearMarketPrice() *SkuUpdateOne
- func (suo *SkuUpdateOne) ClearProperties() *SkuUpdateOne
- func (suo *SkuUpdateOne) ClearSalesCount() *SkuUpdateOne
- func (suo *SkuUpdateOne) ClearSecondBrokeragePrice() *SkuUpdateOne
- func (suo *SkuUpdateOne) ClearSpuID() *SkuUpdateOne
- func (suo *SkuUpdateOne) ClearSpus() *SkuUpdateOne
- func (suo *SkuUpdateOne) ClearStock() *SkuUpdateOne
- func (suo *SkuUpdateOne) ClearVolume() *SkuUpdateOne
- func (suo *SkuUpdateOne) ClearWeight() *SkuUpdateOne
- func (suo *SkuUpdateOne) Exec(ctx context.Context) error
- func (suo *SkuUpdateOne) ExecX(ctx context.Context)
- func (suo *SkuUpdateOne) Mutation() *SkuMutation
- func (suo *SkuUpdateOne) RemoveCommentIDs(ids ...uint64) *SkuUpdateOne
- func (suo *SkuUpdateOne) RemoveComments(c ...*Comment) *SkuUpdateOne
- func (suo *SkuUpdateOne) Save(ctx context.Context) (*Sku, error)
- func (suo *SkuUpdateOne) SaveX(ctx context.Context) *Sku
- func (suo *SkuUpdateOne) Select(field string, fields ...string) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetBarCode(s string) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetCostPrice(i int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetDeletedAt(t time.Time) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetFirstBrokeragePrice(i int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetMarketPrice(i int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetNillableBarCode(s *string) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetNillableDeletedAt(t *time.Time) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetNillableFirstBrokeragePrice(i *int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetNillableMarketPrice(i *int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetNillableSalesCount(i *int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetNillableSecondBrokeragePrice(f *float64) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetNillableSpuID(u *uint64) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetNillableSpusID(id *uint64) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetNillableStock(i *int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetNillableVolume(f *float64) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetNillableWeight(f *float64) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilBarCode(value *string) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilCostPrice(value *int32) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilDeletedAt(value *time.Time) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilFirstBrokeragePrice(value *int32) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilMarketPrice(value *int32) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilPicURL(value *string) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilPrice(value *int32) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilProperties(value *[]entType.SkuProperty) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilSalesCount(value *int32) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilSecondBrokeragePrice(value *float64) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilSpuID(value *uint64) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilStock(value *int32) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilUpdatedAt(value *time.Time) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilVolume(value *float64) *SkuUpdateOne
- func (s *SkuUpdateOne) SetNotNilWeight(value *float64) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetPicURL(s string) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetPrice(i int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetProperties(etp []entType.SkuProperty) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetSalesCount(i int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetSecondBrokeragePrice(f float64) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetSpuID(u uint64) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetSpus(s *Spu) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetSpusID(id uint64) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetStock(i int32) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetUpdatedAt(t time.Time) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetVolume(f float64) *SkuUpdateOne
- func (suo *SkuUpdateOne) SetWeight(f float64) *SkuUpdateOne
- func (suo *SkuUpdateOne) Where(ps ...predicate.Sku) *SkuUpdateOne
- type Skus
- type Spu
- type SpuClient
- func (c *SpuClient) Create() *SpuCreate
- func (c *SpuClient) CreateBulk(builders ...*SpuCreate) *SpuCreateBulk
- func (c *SpuClient) Delete() *SpuDelete
- func (c *SpuClient) DeleteOne(s *Spu) *SpuDeleteOne
- func (c *SpuClient) DeleteOneID(id uint64) *SpuDeleteOne
- func (c *SpuClient) Get(ctx context.Context, id uint64) (*Spu, error)
- func (c *SpuClient) GetX(ctx context.Context, id uint64) *Spu
- func (c *SpuClient) Hooks() []Hook
- func (c *SpuClient) Intercept(interceptors ...Interceptor)
- func (c *SpuClient) Interceptors() []Interceptor
- func (c *SpuClient) MapCreateBulk(slice any, setFunc func(*SpuCreate, int)) *SpuCreateBulk
- func (c *SpuClient) Query() *SpuQuery
- func (c *SpuClient) QueryBrands(s *Spu) *BrandQuery
- func (c *SpuClient) QueryCategorys(s *Spu) *CategoryQuery
- func (c *SpuClient) QuerySkus(s *Spu) *SkuQuery
- func (c *SpuClient) Update() *SpuUpdate
- func (c *SpuClient) UpdateOne(s *Spu) *SpuUpdateOne
- func (c *SpuClient) UpdateOneID(id uint64) *SpuUpdateOne
- func (c *SpuClient) Use(hooks ...Hook)
- type SpuCreate
- func (sc *SpuCreate) AddSkuIDs(ids ...uint64) *SpuCreate
- func (sc *SpuCreate) AddSkus(s ...*Sku) *SpuCreate
- func (sc *SpuCreate) Exec(ctx context.Context) error
- func (sc *SpuCreate) ExecX(ctx context.Context)
- func (sc *SpuCreate) Mutation() *SpuMutation
- func (sc *SpuCreate) Save(ctx context.Context) (*Spu, error)
- func (sc *SpuCreate) SaveX(ctx context.Context) *Spu
- func (sc *SpuCreate) SetActivityOrders(i []int32) *SpuCreate
- func (sc *SpuCreate) SetBarCode(s string) *SpuCreate
- func (sc *SpuCreate) SetBrandID(u uint64) *SpuCreate
- func (sc *SpuCreate) SetBrands(b *Brand) *SpuCreate
- func (sc *SpuCreate) SetBrandsID(id uint64) *SpuCreate
- func (sc *SpuCreate) SetBrowseCount(i int32) *SpuCreate
- func (sc *SpuCreate) SetCategoryID(u uint64) *SpuCreate
- func (sc *SpuCreate) SetCategorys(c *Category) *SpuCreate
- func (sc *SpuCreate) SetCategorysID(id uint64) *SpuCreate
- func (sc *SpuCreate) SetCostPrice(i int32) *SpuCreate
- func (sc *SpuCreate) SetCreatedAt(t time.Time) *SpuCreate
- func (sc *SpuCreate) SetDeletedAt(t time.Time) *SpuCreate
- func (sc *SpuCreate) SetDeliveryTemplateID(u uint64) *SpuCreate
- func (sc *SpuCreate) SetDescription(s string) *SpuCreate
- func (sc *SpuCreate) SetGiveCouponTemplateIds(u []uint64) *SpuCreate
- func (sc *SpuCreate) SetGiveIntegral(i int32) *SpuCreate
- func (sc *SpuCreate) SetID(u uint64) *SpuCreate
- func (sc *SpuCreate) SetIntroduction(s string) *SpuCreate
- func (sc *SpuCreate) SetKeyword(s string) *SpuCreate
- func (sc *SpuCreate) SetMarketPrice(i int32) *SpuCreate
- func (sc *SpuCreate) SetName(s string) *SpuCreate
- func (sc *SpuCreate) SetNillableBarCode(s *string) *SpuCreate
- func (sc *SpuCreate) SetNillableBrandID(u *uint64) *SpuCreate
- func (sc *SpuCreate) SetNillableBrandsID(id *uint64) *SpuCreate
- func (sc *SpuCreate) SetNillableBrowseCount(i *int32) *SpuCreate
- func (sc *SpuCreate) SetNillableCategoryID(u *uint64) *SpuCreate
- func (sc *SpuCreate) SetNillableCategorysID(id *uint64) *SpuCreate
- func (sc *SpuCreate) SetNillableCreatedAt(t *time.Time) *SpuCreate
- func (sc *SpuCreate) SetNillableDeletedAt(t *time.Time) *SpuCreate
- func (sc *SpuCreate) SetNillableDeliveryTemplateID(u *uint64) *SpuCreate
- func (sc *SpuCreate) SetNillableDescription(s *string) *SpuCreate
- func (sc *SpuCreate) SetNillableGiveIntegral(i *int32) *SpuCreate
- func (sc *SpuCreate) SetNillableIntroduction(s *string) *SpuCreate
- func (sc *SpuCreate) SetNillableKeyword(s *string) *SpuCreate
- func (sc *SpuCreate) SetNillableMarketPrice(i *int32) *SpuCreate
- func (sc *SpuCreate) SetNillableRecommendBenefit(b *bool) *SpuCreate
- func (sc *SpuCreate) SetNillableRecommendBest(b *bool) *SpuCreate
- func (sc *SpuCreate) SetNillableRecommendGood(b *bool) *SpuCreate
- func (sc *SpuCreate) SetNillableRecommendHot(b *bool) *SpuCreate
- func (sc *SpuCreate) SetNillableRecommendNew(b *bool) *SpuCreate
- func (sc *SpuCreate) SetNillableSalesCount(i *int32) *SpuCreate
- func (sc *SpuCreate) SetNillableSort(u *uint32) *SpuCreate
- func (sc *SpuCreate) SetNillableSpecType(b *bool) *SpuCreate
- func (sc *SpuCreate) SetNillableStatus(u *uint8) *SpuCreate
- func (sc *SpuCreate) SetNillableSubCommissionType(b *bool) *SpuCreate
- func (sc *SpuCreate) SetNillableUpdatedAt(t *time.Time) *SpuCreate
- func (sc *SpuCreate) SetNillableVideoURL(s *string) *SpuCreate
- func (sc *SpuCreate) SetNillableVirtualSalesCount(i *int32) *SpuCreate
- func (s *SpuCreate) SetNotNilActivityOrders(value *[]int32) *SpuCreate
- func (s *SpuCreate) SetNotNilBarCode(value *string) *SpuCreate
- func (s *SpuCreate) SetNotNilBrandID(value *uint64) *SpuCreate
- func (s *SpuCreate) SetNotNilBrowseCount(value *int32) *SpuCreate
- func (s *SpuCreate) SetNotNilCategoryID(value *uint64) *SpuCreate
- func (s *SpuCreate) SetNotNilCostPrice(value *int32) *SpuCreate
- func (s *SpuCreate) SetNotNilDeletedAt(value *time.Time) *SpuCreate
- func (s *SpuCreate) SetNotNilDeliveryTemplateID(value *uint64) *SpuCreate
- func (s *SpuCreate) SetNotNilDescription(value *string) *SpuCreate
- func (s *SpuCreate) SetNotNilGiveCouponTemplateIds(value *[]uint64) *SpuCreate
- func (s *SpuCreate) SetNotNilGiveIntegral(value *int32) *SpuCreate
- func (s *SpuCreate) SetNotNilIntroduction(value *string) *SpuCreate
- func (s *SpuCreate) SetNotNilKeyword(value *string) *SpuCreate
- func (s *SpuCreate) SetNotNilMarketPrice(value *int32) *SpuCreate
- func (s *SpuCreate) SetNotNilName(value *string) *SpuCreate
- func (s *SpuCreate) SetNotNilPicURL(value *string) *SpuCreate
- func (s *SpuCreate) SetNotNilPrice(value *int32) *SpuCreate
- func (s *SpuCreate) SetNotNilRecommendBenefit(value *bool) *SpuCreate
- func (s *SpuCreate) SetNotNilRecommendBest(value *bool) *SpuCreate
- func (s *SpuCreate) SetNotNilRecommendGood(value *bool) *SpuCreate
- func (s *SpuCreate) SetNotNilRecommendHot(value *bool) *SpuCreate
- func (s *SpuCreate) SetNotNilRecommendNew(value *bool) *SpuCreate
- func (s *SpuCreate) SetNotNilSalesCount(value *int32) *SpuCreate
- func (s *SpuCreate) SetNotNilSliderPicUrls(value *[]string) *SpuCreate
- func (s *SpuCreate) SetNotNilSort(value *uint32) *SpuCreate
- func (s *SpuCreate) SetNotNilSpecType(value *bool) *SpuCreate
- func (s *SpuCreate) SetNotNilStatus(value *uint8) *SpuCreate
- func (s *SpuCreate) SetNotNilStock(value *int32) *SpuCreate
- func (s *SpuCreate) SetNotNilSubCommissionType(value *bool) *SpuCreate
- func (s *SpuCreate) SetNotNilUnit(value *uint8) *SpuCreate
- func (s *SpuCreate) SetNotNilUpdatedAt(value *time.Time) *SpuCreate
- func (s *SpuCreate) SetNotNilVideoURL(value *string) *SpuCreate
- func (s *SpuCreate) SetNotNilVirtualSalesCount(value *int32) *SpuCreate
- func (sc *SpuCreate) SetPicURL(s string) *SpuCreate
- func (sc *SpuCreate) SetPrice(i int32) *SpuCreate
- func (sc *SpuCreate) SetRecommendBenefit(b bool) *SpuCreate
- func (sc *SpuCreate) SetRecommendBest(b bool) *SpuCreate
- func (sc *SpuCreate) SetRecommendGood(b bool) *SpuCreate
- func (sc *SpuCreate) SetRecommendHot(b bool) *SpuCreate
- func (sc *SpuCreate) SetRecommendNew(b bool) *SpuCreate
- func (sc *SpuCreate) SetSalesCount(i int32) *SpuCreate
- func (sc *SpuCreate) SetSliderPicUrls(s []string) *SpuCreate
- func (sc *SpuCreate) SetSort(u uint32) *SpuCreate
- func (sc *SpuCreate) SetSpecType(b bool) *SpuCreate
- func (sc *SpuCreate) SetStatus(u uint8) *SpuCreate
- func (sc *SpuCreate) SetStock(i int32) *SpuCreate
- func (sc *SpuCreate) SetSubCommissionType(b bool) *SpuCreate
- func (sc *SpuCreate) SetUnit(u uint8) *SpuCreate
- func (sc *SpuCreate) SetUpdatedAt(t time.Time) *SpuCreate
- func (sc *SpuCreate) SetVideoURL(s string) *SpuCreate
- func (sc *SpuCreate) SetVirtualSalesCount(i int32) *SpuCreate
- type SpuCreateBulk
- type SpuDelete
- type SpuDeleteOne
- type SpuEdges
- type SpuGroupBy
- func (sgb *SpuGroupBy) Aggregate(fns ...AggregateFunc) *SpuGroupBy
- func (s *SpuGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SpuGroupBy) BoolX(ctx context.Context) bool
- func (s *SpuGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SpuGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SpuGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SpuGroupBy) Float64X(ctx context.Context) float64
- func (s *SpuGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SpuGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SpuGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SpuGroupBy) IntX(ctx context.Context) int
- func (s *SpuGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SpuGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SpuGroupBy) Scan(ctx context.Context, v any) error
- func (s *SpuGroupBy) ScanX(ctx context.Context, v any)
- func (s *SpuGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SpuGroupBy) StringX(ctx context.Context) string
- func (s *SpuGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SpuGroupBy) StringsX(ctx context.Context) []string
- type SpuMutation
- func (m *SpuMutation) ActivityOrders() (r []int32, exists bool)
- func (m *SpuMutation) ActivityOrdersCleared() bool
- func (m *SpuMutation) AddBrowseCount(i int32)
- func (m *SpuMutation) AddCostPrice(i int32)
- func (m *SpuMutation) AddDeliveryTemplateID(u int64)
- func (m *SpuMutation) AddField(name string, value ent.Value) error
- func (m *SpuMutation) AddGiveIntegral(i int32)
- func (m *SpuMutation) AddMarketPrice(i int32)
- func (m *SpuMutation) AddPrice(i int32)
- func (m *SpuMutation) AddSalesCount(i int32)
- func (m *SpuMutation) AddSkuIDs(ids ...uint64)
- func (m *SpuMutation) AddSort(u int32)
- func (m *SpuMutation) AddStatus(u int8)
- func (m *SpuMutation) AddStock(i int32)
- func (m *SpuMutation) AddUnit(u int8)
- func (m *SpuMutation) AddVirtualSalesCount(i int32)
- func (m *SpuMutation) AddedBrowseCount() (r int32, exists bool)
- func (m *SpuMutation) AddedCostPrice() (r int32, exists bool)
- func (m *SpuMutation) AddedDeliveryTemplateID() (r int64, exists bool)
- func (m *SpuMutation) AddedEdges() []string
- func (m *SpuMutation) AddedField(name string) (ent.Value, bool)
- func (m *SpuMutation) AddedFields() []string
- func (m *SpuMutation) AddedGiveIntegral() (r int32, exists bool)
- func (m *SpuMutation) AddedIDs(name string) []ent.Value
- func (m *SpuMutation) AddedMarketPrice() (r int32, exists bool)
- func (m *SpuMutation) AddedPrice() (r int32, exists bool)
- func (m *SpuMutation) AddedSalesCount() (r int32, exists bool)
- func (m *SpuMutation) AddedSort() (r int32, exists bool)
- func (m *SpuMutation) AddedStatus() (r int8, exists bool)
- func (m *SpuMutation) AddedStock() (r int32, exists bool)
- func (m *SpuMutation) AddedUnit() (r int8, exists bool)
- func (m *SpuMutation) AddedVirtualSalesCount() (r int32, exists bool)
- func (m *SpuMutation) AppendActivityOrders(i []int32)
- func (m *SpuMutation) AppendGiveCouponTemplateIds(u []uint64)
- func (m *SpuMutation) AppendSliderPicUrls(s []string)
- func (m *SpuMutation) AppendedActivityOrders() ([]int32, bool)
- func (m *SpuMutation) AppendedGiveCouponTemplateIds() ([]uint64, bool)
- func (m *SpuMutation) AppendedSliderPicUrls() ([]string, bool)
- func (m *SpuMutation) BarCode() (r string, exists bool)
- func (m *SpuMutation) BarCodeCleared() bool
- func (m *SpuMutation) BrandID() (r uint64, exists bool)
- func (m *SpuMutation) BrandIDCleared() bool
- func (m *SpuMutation) BrandsCleared() bool
- func (m *SpuMutation) BrandsID() (id uint64, exists bool)
- func (m *SpuMutation) BrandsIDs() (ids []uint64)
- func (m *SpuMutation) BrowseCount() (r int32, exists bool)
- func (m *SpuMutation) BrowseCountCleared() bool
- func (m *SpuMutation) CategoryID() (r uint64, exists bool)
- func (m *SpuMutation) CategoryIDCleared() bool
- func (m *SpuMutation) CategorysCleared() bool
- func (m *SpuMutation) CategorysID() (id uint64, exists bool)
- func (m *SpuMutation) CategorysIDs() (ids []uint64)
- func (m *SpuMutation) ClearActivityOrders()
- func (m *SpuMutation) ClearBarCode()
- func (m *SpuMutation) ClearBrandID()
- func (m *SpuMutation) ClearBrands()
- func (m *SpuMutation) ClearBrowseCount()
- func (m *SpuMutation) ClearCategoryID()
- func (m *SpuMutation) ClearCategorys()
- func (m *SpuMutation) ClearDeletedAt()
- func (m *SpuMutation) ClearDeliveryTemplateID()
- func (m *SpuMutation) ClearDescription()
- func (m *SpuMutation) ClearEdge(name string) error
- func (m *SpuMutation) ClearField(name string) error
- func (m *SpuMutation) ClearGiveCouponTemplateIds()
- func (m *SpuMutation) ClearGiveIntegral()
- func (m *SpuMutation) ClearIntroduction()
- func (m *SpuMutation) ClearKeyword()
- func (m *SpuMutation) ClearMarketPrice()
- func (m *SpuMutation) ClearRecommendBenefit()
- func (m *SpuMutation) ClearRecommendBest()
- func (m *SpuMutation) ClearRecommendGood()
- func (m *SpuMutation) ClearRecommendHot()
- func (m *SpuMutation) ClearRecommendNew()
- func (m *SpuMutation) ClearSalesCount()
- func (m *SpuMutation) ClearSkus()
- func (m *SpuMutation) ClearSliderPicUrls()
- func (m *SpuMutation) ClearSpecType()
- func (m *SpuMutation) ClearStatus()
- func (m *SpuMutation) ClearSubCommissionType()
- func (m *SpuMutation) ClearVideoURL()
- func (m *SpuMutation) ClearVirtualSalesCount()
- func (m *SpuMutation) ClearedEdges() []string
- func (m *SpuMutation) ClearedFields() []string
- func (m SpuMutation) Client() *Client
- func (m *SpuMutation) CostPrice() (r int32, exists bool)
- func (m *SpuMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SpuMutation) DeletedAt() (r time.Time, exists bool)
- func (m *SpuMutation) DeletedAtCleared() bool
- func (m *SpuMutation) DeliveryTemplateID() (r uint64, exists bool)
- func (m *SpuMutation) DeliveryTemplateIDCleared() bool
- func (m *SpuMutation) Description() (r string, exists bool)
- func (m *SpuMutation) DescriptionCleared() bool
- func (m *SpuMutation) EdgeCleared(name string) bool
- func (m *SpuMutation) Field(name string) (ent.Value, bool)
- func (m *SpuMutation) FieldCleared(name string) bool
- func (m *SpuMutation) Fields() []string
- func (m *SpuMutation) GiveCouponTemplateIds() (r []uint64, exists bool)
- func (m *SpuMutation) GiveCouponTemplateIdsCleared() bool
- func (m *SpuMutation) GiveIntegral() (r int32, exists bool)
- func (m *SpuMutation) GiveIntegralCleared() bool
- func (m *SpuMutation) ID() (id uint64, exists bool)
- func (m *SpuMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *SpuMutation) Introduction() (r string, exists bool)
- func (m *SpuMutation) IntroductionCleared() bool
- func (m *SpuMutation) Keyword() (r string, exists bool)
- func (m *SpuMutation) KeywordCleared() bool
- func (m *SpuMutation) MarketPrice() (r int32, exists bool)
- func (m *SpuMutation) MarketPriceCleared() bool
- func (m *SpuMutation) Name() (r string, exists bool)
- func (m *SpuMutation) OldActivityOrders(ctx context.Context) (v []int32, err error)
- func (m *SpuMutation) OldBarCode(ctx context.Context) (v string, err error)
- func (m *SpuMutation) OldBrandID(ctx context.Context) (v uint64, err error)
- func (m *SpuMutation) OldBrowseCount(ctx context.Context) (v int32, err error)
- func (m *SpuMutation) OldCategoryID(ctx context.Context) (v uint64, err error)
- func (m *SpuMutation) OldCostPrice(ctx context.Context) (v int32, err error)
- func (m *SpuMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SpuMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *SpuMutation) OldDeliveryTemplateID(ctx context.Context) (v uint64, err error)
- func (m *SpuMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *SpuMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SpuMutation) OldGiveCouponTemplateIds(ctx context.Context) (v []uint64, err error)
- func (m *SpuMutation) OldGiveIntegral(ctx context.Context) (v int32, err error)
- func (m *SpuMutation) OldIntroduction(ctx context.Context) (v string, err error)
- func (m *SpuMutation) OldKeyword(ctx context.Context) (v string, err error)
- func (m *SpuMutation) OldMarketPrice(ctx context.Context) (v int32, err error)
- func (m *SpuMutation) OldName(ctx context.Context) (v string, err error)
- func (m *SpuMutation) OldPicURL(ctx context.Context) (v string, err error)
- func (m *SpuMutation) OldPrice(ctx context.Context) (v int32, err error)
- func (m *SpuMutation) OldRecommendBenefit(ctx context.Context) (v bool, err error)
- func (m *SpuMutation) OldRecommendBest(ctx context.Context) (v bool, err error)
- func (m *SpuMutation) OldRecommendGood(ctx context.Context) (v bool, err error)
- func (m *SpuMutation) OldRecommendHot(ctx context.Context) (v bool, err error)
- func (m *SpuMutation) OldRecommendNew(ctx context.Context) (v bool, err error)
- func (m *SpuMutation) OldSalesCount(ctx context.Context) (v int32, err error)
- func (m *SpuMutation) OldSliderPicUrls(ctx context.Context) (v []string, err error)
- func (m *SpuMutation) OldSort(ctx context.Context) (v uint32, err error)
- func (m *SpuMutation) OldSpecType(ctx context.Context) (v bool, err error)
- func (m *SpuMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *SpuMutation) OldStock(ctx context.Context) (v int32, err error)
- func (m *SpuMutation) OldSubCommissionType(ctx context.Context) (v bool, err error)
- func (m *SpuMutation) OldUnit(ctx context.Context) (v uint8, err error)
- func (m *SpuMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SpuMutation) OldVideoURL(ctx context.Context) (v string, err error)
- func (m *SpuMutation) OldVirtualSalesCount(ctx context.Context) (v int32, err error)
- func (m *SpuMutation) Op() Op
- func (m *SpuMutation) PicURL() (r string, exists bool)
- func (m *SpuMutation) Price() (r int32, exists bool)
- func (m *SpuMutation) RecommendBenefit() (r bool, exists bool)
- func (m *SpuMutation) RecommendBenefitCleared() bool
- func (m *SpuMutation) RecommendBest() (r bool, exists bool)
- func (m *SpuMutation) RecommendBestCleared() bool
- func (m *SpuMutation) RecommendGood() (r bool, exists bool)
- func (m *SpuMutation) RecommendGoodCleared() bool
- func (m *SpuMutation) RecommendHot() (r bool, exists bool)
- func (m *SpuMutation) RecommendHotCleared() bool
- func (m *SpuMutation) RecommendNew() (r bool, exists bool)
- func (m *SpuMutation) RecommendNewCleared() bool
- func (m *SpuMutation) RemoveSkuIDs(ids ...uint64)
- func (m *SpuMutation) RemovedEdges() []string
- func (m *SpuMutation) RemovedIDs(name string) []ent.Value
- func (m *SpuMutation) RemovedSkusIDs() (ids []uint64)
- func (m *SpuMutation) ResetActivityOrders()
- func (m *SpuMutation) ResetBarCode()
- func (m *SpuMutation) ResetBrandID()
- func (m *SpuMutation) ResetBrands()
- func (m *SpuMutation) ResetBrowseCount()
- func (m *SpuMutation) ResetCategoryID()
- func (m *SpuMutation) ResetCategorys()
- func (m *SpuMutation) ResetCostPrice()
- func (m *SpuMutation) ResetCreatedAt()
- func (m *SpuMutation) ResetDeletedAt()
- func (m *SpuMutation) ResetDeliveryTemplateID()
- func (m *SpuMutation) ResetDescription()
- func (m *SpuMutation) ResetEdge(name string) error
- func (m *SpuMutation) ResetField(name string) error
- func (m *SpuMutation) ResetGiveCouponTemplateIds()
- func (m *SpuMutation) ResetGiveIntegral()
- func (m *SpuMutation) ResetIntroduction()
- func (m *SpuMutation) ResetKeyword()
- func (m *SpuMutation) ResetMarketPrice()
- func (m *SpuMutation) ResetName()
- func (m *SpuMutation) ResetPicURL()
- func (m *SpuMutation) ResetPrice()
- func (m *SpuMutation) ResetRecommendBenefit()
- func (m *SpuMutation) ResetRecommendBest()
- func (m *SpuMutation) ResetRecommendGood()
- func (m *SpuMutation) ResetRecommendHot()
- func (m *SpuMutation) ResetRecommendNew()
- func (m *SpuMutation) ResetSalesCount()
- func (m *SpuMutation) ResetSkus()
- func (m *SpuMutation) ResetSliderPicUrls()
- func (m *SpuMutation) ResetSort()
- func (m *SpuMutation) ResetSpecType()
- func (m *SpuMutation) ResetStatus()
- func (m *SpuMutation) ResetStock()
- func (m *SpuMutation) ResetSubCommissionType()
- func (m *SpuMutation) ResetUnit()
- func (m *SpuMutation) ResetUpdatedAt()
- func (m *SpuMutation) ResetVideoURL()
- func (m *SpuMutation) ResetVirtualSalesCount()
- func (m *SpuMutation) SalesCount() (r int32, exists bool)
- func (m *SpuMutation) SalesCountCleared() bool
- func (m *SpuMutation) SetActivityOrders(i []int32)
- func (m *SpuMutation) SetBarCode(s string)
- func (m *SpuMutation) SetBrandID(u uint64)
- func (m *SpuMutation) SetBrandsID(id uint64)
- func (m *SpuMutation) SetBrowseCount(i int32)
- func (m *SpuMutation) SetCategoryID(u uint64)
- func (m *SpuMutation) SetCategorysID(id uint64)
- func (m *SpuMutation) SetCostPrice(i int32)
- func (m *SpuMutation) SetCreatedAt(t time.Time)
- func (m *SpuMutation) SetDeletedAt(t time.Time)
- func (m *SpuMutation) SetDeliveryTemplateID(u uint64)
- func (m *SpuMutation) SetDescription(s string)
- func (m *SpuMutation) SetField(name string, value ent.Value) error
- func (m *SpuMutation) SetGiveCouponTemplateIds(u []uint64)
- func (m *SpuMutation) SetGiveIntegral(i int32)
- func (m *SpuMutation) SetID(id uint64)
- func (m *SpuMutation) SetIntroduction(s string)
- func (m *SpuMutation) SetKeyword(s string)
- func (m *SpuMutation) SetMarketPrice(i int32)
- func (m *SpuMutation) SetName(s string)
- func (m *SpuMutation) SetOp(op Op)
- func (m *SpuMutation) SetPicURL(s string)
- func (m *SpuMutation) SetPrice(i int32)
- func (m *SpuMutation) SetRecommendBenefit(b bool)
- func (m *SpuMutation) SetRecommendBest(b bool)
- func (m *SpuMutation) SetRecommendGood(b bool)
- func (m *SpuMutation) SetRecommendHot(b bool)
- func (m *SpuMutation) SetRecommendNew(b bool)
- func (m *SpuMutation) SetSalesCount(i int32)
- func (m *SpuMutation) SetSliderPicUrls(s []string)
- func (m *SpuMutation) SetSort(u uint32)
- func (m *SpuMutation) SetSpecType(b bool)
- func (m *SpuMutation) SetStatus(u uint8)
- func (m *SpuMutation) SetStock(i int32)
- func (m *SpuMutation) SetSubCommissionType(b bool)
- func (m *SpuMutation) SetUnit(u uint8)
- func (m *SpuMutation) SetUpdatedAt(t time.Time)
- func (m *SpuMutation) SetVideoURL(s string)
- func (m *SpuMutation) SetVirtualSalesCount(i int32)
- func (m *SpuMutation) SkusCleared() bool
- func (m *SpuMutation) SkusIDs() (ids []uint64)
- func (m *SpuMutation) SliderPicUrls() (r []string, exists bool)
- func (m *SpuMutation) SliderPicUrlsCleared() bool
- func (m *SpuMutation) Sort() (r uint32, exists bool)
- func (m *SpuMutation) SpecType() (r bool, exists bool)
- func (m *SpuMutation) SpecTypeCleared() bool
- func (m *SpuMutation) Status() (r uint8, exists bool)
- func (m *SpuMutation) StatusCleared() bool
- func (m *SpuMutation) Stock() (r int32, exists bool)
- func (m *SpuMutation) SubCommissionType() (r bool, exists bool)
- func (m *SpuMutation) SubCommissionTypeCleared() bool
- func (m SpuMutation) Tx() (*Tx, error)
- func (m *SpuMutation) Type() string
- func (m *SpuMutation) Unit() (r uint8, exists bool)
- func (m *SpuMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *SpuMutation) VideoURL() (r string, exists bool)
- func (m *SpuMutation) VideoURLCleared() bool
- func (m *SpuMutation) VirtualSalesCount() (r int32, exists bool)
- func (m *SpuMutation) VirtualSalesCountCleared() bool
- func (m *SpuMutation) Where(ps ...predicate.Spu)
- func (m *SpuMutation) WhereP(ps ...func(*sql.Selector))
- type SpuPageList
- type SpuPager
- type SpuPaginateOption
- type SpuQuery
- func (sq *SpuQuery) Aggregate(fns ...AggregateFunc) *SpuSelect
- func (sq *SpuQuery) All(ctx context.Context) ([]*Spu, error)
- func (sq *SpuQuery) AllX(ctx context.Context) []*Spu
- func (sq *SpuQuery) Clone() *SpuQuery
- func (sq *SpuQuery) Count(ctx context.Context) (int, error)
- func (sq *SpuQuery) CountX(ctx context.Context) int
- func (sq *SpuQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SpuQuery) ExistX(ctx context.Context) bool
- func (sq *SpuQuery) First(ctx context.Context) (*Spu, error)
- func (sq *SpuQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (sq *SpuQuery) FirstIDX(ctx context.Context) uint64
- func (sq *SpuQuery) FirstX(ctx context.Context) *Spu
- func (sq *SpuQuery) GroupBy(field string, fields ...string) *SpuGroupBy
- func (sq *SpuQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (sq *SpuQuery) IDsX(ctx context.Context) []uint64
- func (sq *SpuQuery) Limit(limit int) *SpuQuery
- func (sq *SpuQuery) Offset(offset int) *SpuQuery
- func (sq *SpuQuery) Only(ctx context.Context) (*Spu, error)
- func (sq *SpuQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (sq *SpuQuery) OnlyIDX(ctx context.Context) uint64
- func (sq *SpuQuery) OnlyX(ctx context.Context) *Spu
- func (sq *SpuQuery) Order(o ...spu.OrderOption) *SpuQuery
- func (s *SpuQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*SpuPageList, error)
- func (sq *SpuQuery) QueryBrands() *BrandQuery
- func (sq *SpuQuery) QueryCategorys() *CategoryQuery
- func (sq *SpuQuery) QuerySkus() *SkuQuery
- func (sq *SpuQuery) Select(fields ...string) *SpuSelect
- func (sq *SpuQuery) Unique(unique bool) *SpuQuery
- func (sq *SpuQuery) Where(ps ...predicate.Spu) *SpuQuery
- func (sq *SpuQuery) WithBrands(opts ...func(*BrandQuery)) *SpuQuery
- func (sq *SpuQuery) WithCategorys(opts ...func(*CategoryQuery)) *SpuQuery
- func (sq *SpuQuery) WithSkus(opts ...func(*SkuQuery)) *SpuQuery
- type SpuSelect
- func (ss *SpuSelect) Aggregate(fns ...AggregateFunc) *SpuSelect
- func (s *SpuSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SpuSelect) BoolX(ctx context.Context) bool
- func (s *SpuSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SpuSelect) BoolsX(ctx context.Context) []bool
- func (s *SpuSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SpuSelect) Float64X(ctx context.Context) float64
- func (s *SpuSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SpuSelect) Float64sX(ctx context.Context) []float64
- func (s *SpuSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SpuSelect) IntX(ctx context.Context) int
- func (s *SpuSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SpuSelect) IntsX(ctx context.Context) []int
- func (ss *SpuSelect) Scan(ctx context.Context, v any) error
- func (s *SpuSelect) ScanX(ctx context.Context, v any)
- func (s *SpuSelect) String(ctx context.Context) (_ string, err error)
- func (s *SpuSelect) StringX(ctx context.Context) string
- func (s *SpuSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SpuSelect) StringsX(ctx context.Context) []string
- type SpuUpdate
- func (su *SpuUpdate) AddBrowseCount(i int32) *SpuUpdate
- func (su *SpuUpdate) AddCostPrice(i int32) *SpuUpdate
- func (su *SpuUpdate) AddDeliveryTemplateID(u int64) *SpuUpdate
- func (su *SpuUpdate) AddGiveIntegral(i int32) *SpuUpdate
- func (su *SpuUpdate) AddMarketPrice(i int32) *SpuUpdate
- func (su *SpuUpdate) AddPrice(i int32) *SpuUpdate
- func (su *SpuUpdate) AddSalesCount(i int32) *SpuUpdate
- func (su *SpuUpdate) AddSkuIDs(ids ...uint64) *SpuUpdate
- func (su *SpuUpdate) AddSkus(s ...*Sku) *SpuUpdate
- func (su *SpuUpdate) AddSort(u int32) *SpuUpdate
- func (su *SpuUpdate) AddStatus(u int8) *SpuUpdate
- func (su *SpuUpdate) AddStock(i int32) *SpuUpdate
- func (su *SpuUpdate) AddUnit(u int8) *SpuUpdate
- func (su *SpuUpdate) AddVirtualSalesCount(i int32) *SpuUpdate
- func (su *SpuUpdate) AppendActivityOrders(i []int32) *SpuUpdate
- func (su *SpuUpdate) AppendGiveCouponTemplateIds(u []uint64) *SpuUpdate
- func (su *SpuUpdate) AppendSliderPicUrls(s []string) *SpuUpdate
- func (su *SpuUpdate) ClearActivityOrders() *SpuUpdate
- func (su *SpuUpdate) ClearBarCode() *SpuUpdate
- func (su *SpuUpdate) ClearBrandID() *SpuUpdate
- func (su *SpuUpdate) ClearBrands() *SpuUpdate
- func (su *SpuUpdate) ClearBrowseCount() *SpuUpdate
- func (su *SpuUpdate) ClearCategoryID() *SpuUpdate
- func (su *SpuUpdate) ClearCategorys() *SpuUpdate
- func (su *SpuUpdate) ClearDeletedAt() *SpuUpdate
- func (su *SpuUpdate) ClearDeliveryTemplateID() *SpuUpdate
- func (su *SpuUpdate) ClearDescription() *SpuUpdate
- func (su *SpuUpdate) ClearGiveCouponTemplateIds() *SpuUpdate
- func (su *SpuUpdate) ClearGiveIntegral() *SpuUpdate
- func (su *SpuUpdate) ClearIntroduction() *SpuUpdate
- func (su *SpuUpdate) ClearKeyword() *SpuUpdate
- func (su *SpuUpdate) ClearMarketPrice() *SpuUpdate
- func (su *SpuUpdate) ClearRecommendBenefit() *SpuUpdate
- func (su *SpuUpdate) ClearRecommendBest() *SpuUpdate
- func (su *SpuUpdate) ClearRecommendGood() *SpuUpdate
- func (su *SpuUpdate) ClearRecommendHot() *SpuUpdate
- func (su *SpuUpdate) ClearRecommendNew() *SpuUpdate
- func (su *SpuUpdate) ClearSalesCount() *SpuUpdate
- func (su *SpuUpdate) ClearSkus() *SpuUpdate
- func (su *SpuUpdate) ClearSliderPicUrls() *SpuUpdate
- func (su *SpuUpdate) ClearSpecType() *SpuUpdate
- func (su *SpuUpdate) ClearStatus() *SpuUpdate
- func (su *SpuUpdate) ClearSubCommissionType() *SpuUpdate
- func (su *SpuUpdate) ClearVideoURL() *SpuUpdate
- func (su *SpuUpdate) ClearVirtualSalesCount() *SpuUpdate
- func (su *SpuUpdate) Exec(ctx context.Context) error
- func (su *SpuUpdate) ExecX(ctx context.Context)
- func (su *SpuUpdate) Mutation() *SpuMutation
- func (su *SpuUpdate) RemoveSkuIDs(ids ...uint64) *SpuUpdate
- func (su *SpuUpdate) RemoveSkus(s ...*Sku) *SpuUpdate
- func (su *SpuUpdate) Save(ctx context.Context) (int, error)
- func (su *SpuUpdate) SaveX(ctx context.Context) int
- func (su *SpuUpdate) SetActivityOrders(i []int32) *SpuUpdate
- func (su *SpuUpdate) SetBarCode(s string) *SpuUpdate
- func (su *SpuUpdate) SetBrandID(u uint64) *SpuUpdate
- func (su *SpuUpdate) SetBrands(b *Brand) *SpuUpdate
- func (su *SpuUpdate) SetBrandsID(id uint64) *SpuUpdate
- func (su *SpuUpdate) SetBrowseCount(i int32) *SpuUpdate
- func (su *SpuUpdate) SetCategoryID(u uint64) *SpuUpdate
- func (su *SpuUpdate) SetCategorys(c *Category) *SpuUpdate
- func (su *SpuUpdate) SetCategorysID(id uint64) *SpuUpdate
- func (su *SpuUpdate) SetCostPrice(i int32) *SpuUpdate
- func (su *SpuUpdate) SetDeletedAt(t time.Time) *SpuUpdate
- func (su *SpuUpdate) SetDeliveryTemplateID(u uint64) *SpuUpdate
- func (su *SpuUpdate) SetDescription(s string) *SpuUpdate
- func (su *SpuUpdate) SetGiveCouponTemplateIds(u []uint64) *SpuUpdate
- func (su *SpuUpdate) SetGiveIntegral(i int32) *SpuUpdate
- func (su *SpuUpdate) SetIntroduction(s string) *SpuUpdate
- func (su *SpuUpdate) SetKeyword(s string) *SpuUpdate
- func (su *SpuUpdate) SetMarketPrice(i int32) *SpuUpdate
- func (su *SpuUpdate) SetName(s string) *SpuUpdate
- func (su *SpuUpdate) SetNillableBarCode(s *string) *SpuUpdate
- func (su *SpuUpdate) SetNillableBrandID(u *uint64) *SpuUpdate
- func (su *SpuUpdate) SetNillableBrandsID(id *uint64) *SpuUpdate
- func (su *SpuUpdate) SetNillableBrowseCount(i *int32) *SpuUpdate
- func (su *SpuUpdate) SetNillableCategoryID(u *uint64) *SpuUpdate
- func (su *SpuUpdate) SetNillableCategorysID(id *uint64) *SpuUpdate
- func (su *SpuUpdate) SetNillableDeletedAt(t *time.Time) *SpuUpdate
- func (su *SpuUpdate) SetNillableDeliveryTemplateID(u *uint64) *SpuUpdate
- func (su *SpuUpdate) SetNillableDescription(s *string) *SpuUpdate
- func (su *SpuUpdate) SetNillableGiveIntegral(i *int32) *SpuUpdate
- func (su *SpuUpdate) SetNillableIntroduction(s *string) *SpuUpdate
- func (su *SpuUpdate) SetNillableKeyword(s *string) *SpuUpdate
- func (su *SpuUpdate) SetNillableMarketPrice(i *int32) *SpuUpdate
- func (su *SpuUpdate) SetNillableRecommendBenefit(b *bool) *SpuUpdate
- func (su *SpuUpdate) SetNillableRecommendBest(b *bool) *SpuUpdate
- func (su *SpuUpdate) SetNillableRecommendGood(b *bool) *SpuUpdate
- func (su *SpuUpdate) SetNillableRecommendHot(b *bool) *SpuUpdate
- func (su *SpuUpdate) SetNillableRecommendNew(b *bool) *SpuUpdate
- func (su *SpuUpdate) SetNillableSalesCount(i *int32) *SpuUpdate
- func (su *SpuUpdate) SetNillableSort(u *uint32) *SpuUpdate
- func (su *SpuUpdate) SetNillableSpecType(b *bool) *SpuUpdate
- func (su *SpuUpdate) SetNillableStatus(u *uint8) *SpuUpdate
- func (su *SpuUpdate) SetNillableSubCommissionType(b *bool) *SpuUpdate
- func (su *SpuUpdate) SetNillableVideoURL(s *string) *SpuUpdate
- func (su *SpuUpdate) SetNillableVirtualSalesCount(i *int32) *SpuUpdate
- func (s *SpuUpdate) SetNotNilActivityOrders(value *[]int32) *SpuUpdate
- func (s *SpuUpdate) SetNotNilBarCode(value *string) *SpuUpdate
- func (s *SpuUpdate) SetNotNilBrandID(value *uint64) *SpuUpdate
- func (s *SpuUpdate) SetNotNilBrowseCount(value *int32) *SpuUpdate
- func (s *SpuUpdate) SetNotNilCategoryID(value *uint64) *SpuUpdate
- func (s *SpuUpdate) SetNotNilCostPrice(value *int32) *SpuUpdate
- func (s *SpuUpdate) SetNotNilDeletedAt(value *time.Time) *SpuUpdate
- func (s *SpuUpdate) SetNotNilDeliveryTemplateID(value *uint64) *SpuUpdate
- func (s *SpuUpdate) SetNotNilDescription(value *string) *SpuUpdate
- func (s *SpuUpdate) SetNotNilGiveCouponTemplateIds(value *[]uint64) *SpuUpdate
- func (s *SpuUpdate) SetNotNilGiveIntegral(value *int32) *SpuUpdate
- func (s *SpuUpdate) SetNotNilIntroduction(value *string) *SpuUpdate
- func (s *SpuUpdate) SetNotNilKeyword(value *string) *SpuUpdate
- func (s *SpuUpdate) SetNotNilMarketPrice(value *int32) *SpuUpdate
- func (s *SpuUpdate) SetNotNilName(value *string) *SpuUpdate
- func (s *SpuUpdate) SetNotNilPicURL(value *string) *SpuUpdate
- func (s *SpuUpdate) SetNotNilPrice(value *int32) *SpuUpdate
- func (s *SpuUpdate) SetNotNilRecommendBenefit(value *bool) *SpuUpdate
- func (s *SpuUpdate) SetNotNilRecommendBest(value *bool) *SpuUpdate
- func (s *SpuUpdate) SetNotNilRecommendGood(value *bool) *SpuUpdate
- func (s *SpuUpdate) SetNotNilRecommendHot(value *bool) *SpuUpdate
- func (s *SpuUpdate) SetNotNilRecommendNew(value *bool) *SpuUpdate
- func (s *SpuUpdate) SetNotNilSalesCount(value *int32) *SpuUpdate
- func (s *SpuUpdate) SetNotNilSliderPicUrls(value *[]string) *SpuUpdate
- func (s *SpuUpdate) SetNotNilSort(value *uint32) *SpuUpdate
- func (s *SpuUpdate) SetNotNilSpecType(value *bool) *SpuUpdate
- func (s *SpuUpdate) SetNotNilStatus(value *uint8) *SpuUpdate
- func (s *SpuUpdate) SetNotNilStock(value *int32) *SpuUpdate
- func (s *SpuUpdate) SetNotNilSubCommissionType(value *bool) *SpuUpdate
- func (s *SpuUpdate) SetNotNilUnit(value *uint8) *SpuUpdate
- func (s *SpuUpdate) SetNotNilUpdatedAt(value *time.Time) *SpuUpdate
- func (s *SpuUpdate) SetNotNilVideoURL(value *string) *SpuUpdate
- func (s *SpuUpdate) SetNotNilVirtualSalesCount(value *int32) *SpuUpdate
- func (su *SpuUpdate) SetPicURL(s string) *SpuUpdate
- func (su *SpuUpdate) SetPrice(i int32) *SpuUpdate
- func (su *SpuUpdate) SetRecommendBenefit(b bool) *SpuUpdate
- func (su *SpuUpdate) SetRecommendBest(b bool) *SpuUpdate
- func (su *SpuUpdate) SetRecommendGood(b bool) *SpuUpdate
- func (su *SpuUpdate) SetRecommendHot(b bool) *SpuUpdate
- func (su *SpuUpdate) SetRecommendNew(b bool) *SpuUpdate
- func (su *SpuUpdate) SetSalesCount(i int32) *SpuUpdate
- func (su *SpuUpdate) SetSliderPicUrls(s []string) *SpuUpdate
- func (su *SpuUpdate) SetSort(u uint32) *SpuUpdate
- func (su *SpuUpdate) SetSpecType(b bool) *SpuUpdate
- func (su *SpuUpdate) SetStatus(u uint8) *SpuUpdate
- func (su *SpuUpdate) SetStock(i int32) *SpuUpdate
- func (su *SpuUpdate) SetSubCommissionType(b bool) *SpuUpdate
- func (su *SpuUpdate) SetUnit(u uint8) *SpuUpdate
- func (su *SpuUpdate) SetUpdatedAt(t time.Time) *SpuUpdate
- func (su *SpuUpdate) SetVideoURL(s string) *SpuUpdate
- func (su *SpuUpdate) SetVirtualSalesCount(i int32) *SpuUpdate
- func (su *SpuUpdate) Where(ps ...predicate.Spu) *SpuUpdate
- type SpuUpdateOne
- func (suo *SpuUpdateOne) AddBrowseCount(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) AddCostPrice(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) AddDeliveryTemplateID(u int64) *SpuUpdateOne
- func (suo *SpuUpdateOne) AddGiveIntegral(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) AddMarketPrice(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) AddPrice(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) AddSalesCount(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) AddSkuIDs(ids ...uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) AddSkus(s ...*Sku) *SpuUpdateOne
- func (suo *SpuUpdateOne) AddSort(u int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) AddStatus(u int8) *SpuUpdateOne
- func (suo *SpuUpdateOne) AddStock(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) AddUnit(u int8) *SpuUpdateOne
- func (suo *SpuUpdateOne) AddVirtualSalesCount(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) AppendActivityOrders(i []int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) AppendGiveCouponTemplateIds(u []uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) AppendSliderPicUrls(s []string) *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearActivityOrders() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearBarCode() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearBrandID() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearBrands() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearBrowseCount() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearCategoryID() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearCategorys() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearDeletedAt() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearDeliveryTemplateID() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearDescription() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearGiveCouponTemplateIds() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearGiveIntegral() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearIntroduction() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearKeyword() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearMarketPrice() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearRecommendBenefit() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearRecommendBest() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearRecommendGood() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearRecommendHot() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearRecommendNew() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearSalesCount() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearSkus() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearSliderPicUrls() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearSpecType() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearStatus() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearSubCommissionType() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearVideoURL() *SpuUpdateOne
- func (suo *SpuUpdateOne) ClearVirtualSalesCount() *SpuUpdateOne
- func (suo *SpuUpdateOne) Exec(ctx context.Context) error
- func (suo *SpuUpdateOne) ExecX(ctx context.Context)
- func (suo *SpuUpdateOne) Mutation() *SpuMutation
- func (suo *SpuUpdateOne) RemoveSkuIDs(ids ...uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) RemoveSkus(s ...*Sku) *SpuUpdateOne
- func (suo *SpuUpdateOne) Save(ctx context.Context) (*Spu, error)
- func (suo *SpuUpdateOne) SaveX(ctx context.Context) *Spu
- func (suo *SpuUpdateOne) Select(field string, fields ...string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetActivityOrders(i []int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetBarCode(s string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetBrandID(u uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetBrands(b *Brand) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetBrandsID(id uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetBrowseCount(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetCategoryID(u uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetCategorys(c *Category) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetCategorysID(id uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetCostPrice(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetDeletedAt(t time.Time) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetDeliveryTemplateID(u uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetDescription(s string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetGiveCouponTemplateIds(u []uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetGiveIntegral(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetIntroduction(s string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetKeyword(s string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetMarketPrice(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetName(s string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableBarCode(s *string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableBrandID(u *uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableBrandsID(id *uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableBrowseCount(i *int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableCategoryID(u *uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableCategorysID(id *uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableDeletedAt(t *time.Time) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableDeliveryTemplateID(u *uint64) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableDescription(s *string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableGiveIntegral(i *int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableIntroduction(s *string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableKeyword(s *string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableMarketPrice(i *int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableRecommendBenefit(b *bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableRecommendBest(b *bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableRecommendGood(b *bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableRecommendHot(b *bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableRecommendNew(b *bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableSalesCount(i *int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableSort(u *uint32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableSpecType(b *bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableStatus(u *uint8) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableSubCommissionType(b *bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableVideoURL(s *string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetNillableVirtualSalesCount(i *int32) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilActivityOrders(value *[]int32) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilBarCode(value *string) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilBrandID(value *uint64) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilBrowseCount(value *int32) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilCategoryID(value *uint64) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilCostPrice(value *int32) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilDeletedAt(value *time.Time) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilDeliveryTemplateID(value *uint64) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilDescription(value *string) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilGiveCouponTemplateIds(value *[]uint64) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilGiveIntegral(value *int32) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilIntroduction(value *string) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilKeyword(value *string) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilMarketPrice(value *int32) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilName(value *string) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilPicURL(value *string) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilPrice(value *int32) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilRecommendBenefit(value *bool) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilRecommendBest(value *bool) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilRecommendGood(value *bool) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilRecommendHot(value *bool) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilRecommendNew(value *bool) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilSalesCount(value *int32) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilSliderPicUrls(value *[]string) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilSort(value *uint32) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilSpecType(value *bool) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilStatus(value *uint8) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilStock(value *int32) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilSubCommissionType(value *bool) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilUnit(value *uint8) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilUpdatedAt(value *time.Time) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilVideoURL(value *string) *SpuUpdateOne
- func (s *SpuUpdateOne) SetNotNilVirtualSalesCount(value *int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetPicURL(s string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetPrice(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetRecommendBenefit(b bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetRecommendBest(b bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetRecommendGood(b bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetRecommendHot(b bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetRecommendNew(b bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetSalesCount(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetSliderPicUrls(s []string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetSort(u uint32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetSpecType(b bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetStatus(u uint8) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetStock(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetSubCommissionType(b bool) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetUnit(u uint8) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetUpdatedAt(t time.Time) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetVideoURL(s string) *SpuUpdateOne
- func (suo *SpuUpdateOne) SetVirtualSalesCount(i int32) *SpuUpdateOne
- func (suo *SpuUpdateOne) Where(ps ...predicate.Spu) *SpuUpdateOne
- type Spus
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeBrand = "Brand" TypeCategory = "Category" TypeComment = "Comment" TypeProperty = "Property" TypePropertyValue = "PropertyValue" TypeSku = "Sku" TypeSpu = "Spu" )
Variables ¶
var DefaultBrandOrder = Desc(brand.FieldID)
DefaultBrandOrder is the default ordering of Brand.
var DefaultCategoryOrder = Desc(category.FieldID)
DefaultCategoryOrder is the default ordering of Category.
var DefaultCommentOrder = Desc(comment.FieldID)
DefaultCommentOrder is the default ordering of Comment.
var DefaultPropertyOrder = Desc(property.FieldID)
DefaultPropertyOrder is the default ordering of Property.
var DefaultPropertyValueOrder = Desc(propertyvalue.FieldID)
DefaultPropertyValueOrder is the default ordering of PropertyValue.
var DefaultSkuOrder = Desc(sku.FieldID)
DefaultSkuOrder is the default ordering of Sku.
var DefaultSpuOrder = Desc(spu.FieldID)
DefaultSpuOrder is the default ordering of Spu.
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Brand ¶
type Brand struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1: normal 2: ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // Sort Number | 排序编号 Sort uint32 `json:"sort,omitempty"` // Delete Time | 删除日期 DeletedAt time.Time `json:"deleted_at,omitempty"` // 品牌名称 Name string `json:"name,omitempty"` // 品牌图片 PicURL string `json:"pic_url,omitempty"` // 品牌描述 Description string `json:"description,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the BrandQuery when eager-loading is set. Edges BrandEdges `json:"edges"` // contains filtered or unexported fields }
Brand is the model entity for the Brand schema.
func (*Brand) Unwrap ¶
Unwrap unwraps the Brand entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Brand) Update ¶
func (b *Brand) Update() *BrandUpdateOne
Update returns a builder for updating this Brand. Note that you need to call Brand.Unwrap() before calling this method if this Brand was returned from a transaction, and the transaction was committed or rolled back.
type BrandClient ¶
type BrandClient struct {
// contains filtered or unexported fields
}
BrandClient is a client for the Brand schema.
func NewBrandClient ¶
func NewBrandClient(c config) *BrandClient
NewBrandClient returns a client for the Brand from the given config.
func (*BrandClient) Create ¶
func (c *BrandClient) Create() *BrandCreate
Create returns a builder for creating a Brand entity.
func (*BrandClient) CreateBulk ¶
func (c *BrandClient) CreateBulk(builders ...*BrandCreate) *BrandCreateBulk
CreateBulk returns a builder for creating a bulk of Brand entities.
func (*BrandClient) Delete ¶
func (c *BrandClient) Delete() *BrandDelete
Delete returns a delete builder for Brand.
func (*BrandClient) DeleteOne ¶
func (c *BrandClient) DeleteOne(b *Brand) *BrandDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BrandClient) DeleteOneID ¶
func (c *BrandClient) DeleteOneID(id uint64) *BrandDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*BrandClient) GetX ¶
func (c *BrandClient) GetX(ctx context.Context, id uint64) *Brand
GetX is like Get, but panics if an error occurs.
func (*BrandClient) Intercept ¶
func (c *BrandClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `brand.Intercept(f(g(h())))`.
func (*BrandClient) Interceptors ¶
func (c *BrandClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*BrandClient) MapCreateBulk ¶
func (c *BrandClient) MapCreateBulk(slice any, setFunc func(*BrandCreate, int)) *BrandCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*BrandClient) Query ¶
func (c *BrandClient) Query() *BrandQuery
Query returns a query builder for Brand.
func (*BrandClient) QuerySpus ¶
func (c *BrandClient) QuerySpus(b *Brand) *SpuQuery
QuerySpus queries the spus edge of a Brand.
func (*BrandClient) Update ¶
func (c *BrandClient) Update() *BrandUpdate
Update returns an update builder for Brand.
func (*BrandClient) UpdateOne ¶
func (c *BrandClient) UpdateOne(b *Brand) *BrandUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BrandClient) UpdateOneID ¶
func (c *BrandClient) UpdateOneID(id uint64) *BrandUpdateOne
UpdateOneID returns an update builder for the given id.
func (*BrandClient) Use ¶
func (c *BrandClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `brand.Hooks(f(g(h())))`.
type BrandCreate ¶
type BrandCreate struct {
// contains filtered or unexported fields
}
BrandCreate is the builder for creating a Brand entity.
func (*BrandCreate) AddSpuIDs ¶
func (bc *BrandCreate) AddSpuIDs(ids ...uint64) *BrandCreate
AddSpuIDs adds the "spus" edge to the Spu entity by IDs.
func (*BrandCreate) AddSpus ¶
func (bc *BrandCreate) AddSpus(s ...*Spu) *BrandCreate
AddSpus adds the "spus" edges to the Spu entity.
func (*BrandCreate) Exec ¶
func (bc *BrandCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*BrandCreate) ExecX ¶
func (bc *BrandCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BrandCreate) Mutation ¶
func (bc *BrandCreate) Mutation() *BrandMutation
Mutation returns the BrandMutation object of the builder.
func (*BrandCreate) Save ¶
func (bc *BrandCreate) Save(ctx context.Context) (*Brand, error)
Save creates the Brand in the database.
func (*BrandCreate) SaveX ¶
func (bc *BrandCreate) SaveX(ctx context.Context) *Brand
SaveX calls Save and panics if Save returns an error.
func (*BrandCreate) SetCreatedAt ¶
func (bc *BrandCreate) SetCreatedAt(t time.Time) *BrandCreate
SetCreatedAt sets the "created_at" field.
func (*BrandCreate) SetDeletedAt ¶
func (bc *BrandCreate) SetDeletedAt(t time.Time) *BrandCreate
SetDeletedAt sets the "deleted_at" field.
func (*BrandCreate) SetDescription ¶
func (bc *BrandCreate) SetDescription(s string) *BrandCreate
SetDescription sets the "description" field.
func (*BrandCreate) SetID ¶
func (bc *BrandCreate) SetID(u uint64) *BrandCreate
SetID sets the "id" field.
func (*BrandCreate) SetName ¶
func (bc *BrandCreate) SetName(s string) *BrandCreate
SetName sets the "name" field.
func (*BrandCreate) SetNillableCreatedAt ¶
func (bc *BrandCreate) SetNillableCreatedAt(t *time.Time) *BrandCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*BrandCreate) SetNillableDeletedAt ¶
func (bc *BrandCreate) SetNillableDeletedAt(t *time.Time) *BrandCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*BrandCreate) SetNillableDescription ¶
func (bc *BrandCreate) SetNillableDescription(s *string) *BrandCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*BrandCreate) SetNillableSort ¶
func (bc *BrandCreate) SetNillableSort(u *uint32) *BrandCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*BrandCreate) SetNillableStatus ¶
func (bc *BrandCreate) SetNillableStatus(u *uint8) *BrandCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*BrandCreate) SetNillableUpdatedAt ¶
func (bc *BrandCreate) SetNillableUpdatedAt(t *time.Time) *BrandCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*BrandCreate) SetNotNilDeletedAt ¶
func (b *BrandCreate) SetNotNilDeletedAt(value *time.Time) *BrandCreate
set field if value's pointer is not nil.
func (*BrandCreate) SetNotNilDescription ¶
func (b *BrandCreate) SetNotNilDescription(value *string) *BrandCreate
set field if value's pointer is not nil.
func (*BrandCreate) SetNotNilName ¶
func (b *BrandCreate) SetNotNilName(value *string) *BrandCreate
set field if value's pointer is not nil.
func (*BrandCreate) SetNotNilPicURL ¶
func (b *BrandCreate) SetNotNilPicURL(value *string) *BrandCreate
set field if value's pointer is not nil.
func (*BrandCreate) SetNotNilSort ¶
func (b *BrandCreate) SetNotNilSort(value *uint32) *BrandCreate
set field if value's pointer is not nil.
func (*BrandCreate) SetNotNilStatus ¶
func (b *BrandCreate) SetNotNilStatus(value *uint8) *BrandCreate
set field if value's pointer is not nil.
func (*BrandCreate) SetNotNilUpdatedAt ¶
func (b *BrandCreate) SetNotNilUpdatedAt(value *time.Time) *BrandCreate
set field if value's pointer is not nil.
func (*BrandCreate) SetPicURL ¶
func (bc *BrandCreate) SetPicURL(s string) *BrandCreate
SetPicURL sets the "pic_url" field.
func (*BrandCreate) SetSort ¶
func (bc *BrandCreate) SetSort(u uint32) *BrandCreate
SetSort sets the "sort" field.
func (*BrandCreate) SetStatus ¶
func (bc *BrandCreate) SetStatus(u uint8) *BrandCreate
SetStatus sets the "status" field.
func (*BrandCreate) SetUpdatedAt ¶
func (bc *BrandCreate) SetUpdatedAt(t time.Time) *BrandCreate
SetUpdatedAt sets the "updated_at" field.
type BrandCreateBulk ¶
type BrandCreateBulk struct {
// contains filtered or unexported fields
}
BrandCreateBulk is the builder for creating many Brand entities in bulk.
func (*BrandCreateBulk) Exec ¶
func (bcb *BrandCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BrandCreateBulk) ExecX ¶
func (bcb *BrandCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type BrandDelete ¶
type BrandDelete struct {
// contains filtered or unexported fields
}
BrandDelete is the builder for deleting a Brand entity.
func (*BrandDelete) Exec ¶
func (bd *BrandDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BrandDelete) ExecX ¶
func (bd *BrandDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BrandDelete) Where ¶
func (bd *BrandDelete) Where(ps ...predicate.Brand) *BrandDelete
Where appends a list predicates to the BrandDelete builder.
type BrandDeleteOne ¶
type BrandDeleteOne struct {
// contains filtered or unexported fields
}
BrandDeleteOne is the builder for deleting a single Brand entity.
func (*BrandDeleteOne) Exec ¶
func (bdo *BrandDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BrandDeleteOne) ExecX ¶
func (bdo *BrandDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BrandDeleteOne) Where ¶
func (bdo *BrandDeleteOne) Where(ps ...predicate.Brand) *BrandDeleteOne
Where appends a list predicates to the BrandDelete builder.
type BrandEdges ¶
type BrandEdges struct { // Spus holds the value of the spus edge. Spus []*Spu `json:"spus,omitempty"` // contains filtered or unexported fields }
BrandEdges holds the relations/edges for other nodes in the graph.
func (BrandEdges) SpusOrErr ¶
func (e BrandEdges) SpusOrErr() ([]*Spu, error)
SpusOrErr returns the Spus value or an error if the edge was not loaded in eager-loading.
type BrandGroupBy ¶
type BrandGroupBy struct {
// contains filtered or unexported fields
}
BrandGroupBy is the group-by builder for Brand entities.
func (*BrandGroupBy) Aggregate ¶
func (bgb *BrandGroupBy) Aggregate(fns ...AggregateFunc) *BrandGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BrandGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BrandGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BrandGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BrandGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BrandGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BrandGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BrandGroupBy) Scan ¶
func (bgb *BrandGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BrandGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BrandMutation ¶
type BrandMutation struct {
// contains filtered or unexported fields
}
BrandMutation represents an operation that mutates the Brand nodes in the graph.
func (*BrandMutation) AddField ¶
func (m *BrandMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*BrandMutation) AddSort ¶
func (m *BrandMutation) AddSort(u int32)
AddSort adds u to the "sort" field.
func (*BrandMutation) AddSpuIDs ¶
func (m *BrandMutation) AddSpuIDs(ids ...uint64)
AddSpuIDs adds the "spus" edge to the Spu entity by ids.
func (*BrandMutation) AddStatus ¶
func (m *BrandMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*BrandMutation) AddedEdges ¶
func (m *BrandMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*BrandMutation) AddedField ¶
func (m *BrandMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*BrandMutation) AddedFields ¶
func (m *BrandMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*BrandMutation) AddedIDs ¶
func (m *BrandMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*BrandMutation) AddedSort ¶
func (m *BrandMutation) AddedSort() (r int32, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*BrandMutation) AddedStatus ¶
func (m *BrandMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*BrandMutation) ClearDeletedAt ¶
func (m *BrandMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BrandMutation) ClearDescription ¶
func (m *BrandMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*BrandMutation) ClearEdge ¶
func (m *BrandMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*BrandMutation) ClearField ¶
func (m *BrandMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*BrandMutation) ClearSpus ¶
func (m *BrandMutation) ClearSpus()
ClearSpus clears the "spus" edge to the Spu entity.
func (*BrandMutation) ClearStatus ¶
func (m *BrandMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*BrandMutation) ClearedEdges ¶
func (m *BrandMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*BrandMutation) ClearedFields ¶
func (m *BrandMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (BrandMutation) Client ¶
func (m BrandMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*BrandMutation) CreatedAt ¶
func (m *BrandMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*BrandMutation) DeletedAt ¶
func (m *BrandMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*BrandMutation) DeletedAtCleared ¶
func (m *BrandMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*BrandMutation) Description ¶
func (m *BrandMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*BrandMutation) DescriptionCleared ¶
func (m *BrandMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*BrandMutation) EdgeCleared ¶
func (m *BrandMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*BrandMutation) Field ¶
func (m *BrandMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*BrandMutation) FieldCleared ¶
func (m *BrandMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*BrandMutation) Fields ¶
func (m *BrandMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*BrandMutation) ID ¶
func (m *BrandMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*BrandMutation) IDs ¶
func (m *BrandMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*BrandMutation) Name ¶
func (m *BrandMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*BrandMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Brand entity. If the Brand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BrandMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Brand entity. If the Brand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BrandMutation) OldDescription ¶
func (m *BrandMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Brand entity. If the Brand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BrandMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*BrandMutation) OldName ¶
func (m *BrandMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Brand entity. If the Brand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BrandMutation) OldPicURL ¶
func (m *BrandMutation) OldPicURL(ctx context.Context) (v string, err error)
OldPicURL returns the old "pic_url" field's value of the Brand entity. If the Brand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BrandMutation) OldSort ¶
func (m *BrandMutation) OldSort(ctx context.Context) (v uint32, err error)
OldSort returns the old "sort" field's value of the Brand entity. If the Brand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BrandMutation) OldStatus ¶
func (m *BrandMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the Brand entity. If the Brand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BrandMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Brand entity. If the Brand object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BrandMutation) PicURL ¶
func (m *BrandMutation) PicURL() (r string, exists bool)
PicURL returns the value of the "pic_url" field in the mutation.
func (*BrandMutation) RemoveSpuIDs ¶
func (m *BrandMutation) RemoveSpuIDs(ids ...uint64)
RemoveSpuIDs removes the "spus" edge to the Spu entity by IDs.
func (*BrandMutation) RemovedEdges ¶
func (m *BrandMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*BrandMutation) RemovedIDs ¶
func (m *BrandMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*BrandMutation) RemovedSpusIDs ¶
func (m *BrandMutation) RemovedSpusIDs() (ids []uint64)
RemovedSpus returns the removed IDs of the "spus" edge to the Spu entity.
func (*BrandMutation) ResetCreatedAt ¶
func (m *BrandMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*BrandMutation) ResetDeletedAt ¶
func (m *BrandMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*BrandMutation) ResetDescription ¶
func (m *BrandMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*BrandMutation) ResetEdge ¶
func (m *BrandMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*BrandMutation) ResetField ¶
func (m *BrandMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*BrandMutation) ResetName ¶
func (m *BrandMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*BrandMutation) ResetPicURL ¶
func (m *BrandMutation) ResetPicURL()
ResetPicURL resets all changes to the "pic_url" field.
func (*BrandMutation) ResetSort ¶
func (m *BrandMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*BrandMutation) ResetSpus ¶
func (m *BrandMutation) ResetSpus()
ResetSpus resets all changes to the "spus" edge.
func (*BrandMutation) ResetStatus ¶
func (m *BrandMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*BrandMutation) ResetUpdatedAt ¶
func (m *BrandMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*BrandMutation) SetCreatedAt ¶
func (m *BrandMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*BrandMutation) SetDeletedAt ¶
func (m *BrandMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*BrandMutation) SetDescription ¶
func (m *BrandMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*BrandMutation) SetField ¶
func (m *BrandMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*BrandMutation) SetID ¶
func (m *BrandMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Brand entities.
func (*BrandMutation) SetName ¶
func (m *BrandMutation) SetName(s string)
SetName sets the "name" field.
func (*BrandMutation) SetOp ¶
func (m *BrandMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*BrandMutation) SetPicURL ¶
func (m *BrandMutation) SetPicURL(s string)
SetPicURL sets the "pic_url" field.
func (*BrandMutation) SetSort ¶
func (m *BrandMutation) SetSort(u uint32)
SetSort sets the "sort" field.
func (*BrandMutation) SetStatus ¶
func (m *BrandMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*BrandMutation) SetUpdatedAt ¶
func (m *BrandMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*BrandMutation) Sort ¶
func (m *BrandMutation) Sort() (r uint32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*BrandMutation) SpusCleared ¶
func (m *BrandMutation) SpusCleared() bool
SpusCleared reports if the "spus" edge to the Spu entity was cleared.
func (*BrandMutation) SpusIDs ¶
func (m *BrandMutation) SpusIDs() (ids []uint64)
SpusIDs returns the "spus" edge IDs in the mutation.
func (*BrandMutation) Status ¶
func (m *BrandMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*BrandMutation) StatusCleared ¶
func (m *BrandMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (BrandMutation) Tx ¶
func (m BrandMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BrandMutation) Type ¶
func (m *BrandMutation) Type() string
Type returns the node type of this mutation (Brand).
func (*BrandMutation) UpdatedAt ¶
func (m *BrandMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*BrandMutation) Where ¶
func (m *BrandMutation) Where(ps ...predicate.Brand)
Where appends a list predicates to the BrandMutation builder.
func (*BrandMutation) WhereP ¶
func (m *BrandMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the BrandMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type BrandPageList ¶
type BrandPageList struct { List []*Brand `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
BrandPageList is Brand PageList result.
type BrandPager ¶
type BrandPager struct { Order brand.OrderOption Filter func(*BrandQuery) (*BrandQuery, error) }
func (*BrandPager) ApplyFilter ¶
func (p *BrandPager) ApplyFilter(query *BrandQuery) (*BrandQuery, error)
type BrandPaginateOption ¶
type BrandPaginateOption func(*BrandPager)
BrandPaginateOption enables pagination customization.
type BrandQuery ¶
type BrandQuery struct {
// contains filtered or unexported fields
}
BrandQuery is the builder for querying Brand entities.
func (*BrandQuery) Aggregate ¶
func (bq *BrandQuery) Aggregate(fns ...AggregateFunc) *BrandSelect
Aggregate returns a BrandSelect configured with the given aggregations.
func (*BrandQuery) All ¶
func (bq *BrandQuery) All(ctx context.Context) ([]*Brand, error)
All executes the query and returns a list of Brands.
func (*BrandQuery) AllX ¶
func (bq *BrandQuery) AllX(ctx context.Context) []*Brand
AllX is like All, but panics if an error occurs.
func (*BrandQuery) Clone ¶
func (bq *BrandQuery) Clone() *BrandQuery
Clone returns a duplicate of the BrandQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BrandQuery) Count ¶
func (bq *BrandQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*BrandQuery) CountX ¶
func (bq *BrandQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*BrandQuery) Exist ¶
func (bq *BrandQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*BrandQuery) ExistX ¶
func (bq *BrandQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*BrandQuery) First ¶
func (bq *BrandQuery) First(ctx context.Context) (*Brand, error)
First returns the first Brand entity from the query. Returns a *NotFoundError when no Brand was found.
func (*BrandQuery) FirstID ¶
func (bq *BrandQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Brand ID from the query. Returns a *NotFoundError when no Brand ID was found.
func (*BrandQuery) FirstIDX ¶
func (bq *BrandQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*BrandQuery) FirstX ¶
func (bq *BrandQuery) FirstX(ctx context.Context) *Brand
FirstX is like First, but panics if an error occurs.
func (*BrandQuery) GroupBy ¶
func (bq *BrandQuery) GroupBy(field string, fields ...string) *BrandGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Brand.Query(). GroupBy(brand.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BrandQuery) IDs ¶
func (bq *BrandQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Brand IDs.
func (*BrandQuery) IDsX ¶
func (bq *BrandQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*BrandQuery) Limit ¶
func (bq *BrandQuery) Limit(limit int) *BrandQuery
Limit the number of records to be returned by this query.
func (*BrandQuery) Offset ¶
func (bq *BrandQuery) Offset(offset int) *BrandQuery
Offset to start from.
func (*BrandQuery) Only ¶
func (bq *BrandQuery) Only(ctx context.Context) (*Brand, error)
Only returns a single Brand entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Brand entity is found. Returns a *NotFoundError when no Brand entities are found.
func (*BrandQuery) OnlyID ¶
func (bq *BrandQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Brand ID in the query. Returns a *NotSingularError when more than one Brand ID is found. Returns a *NotFoundError when no entities are found.
func (*BrandQuery) OnlyIDX ¶
func (bq *BrandQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*BrandQuery) OnlyX ¶
func (bq *BrandQuery) OnlyX(ctx context.Context) *Brand
OnlyX is like Only, but panics if an error occurs.
func (*BrandQuery) Order ¶
func (bq *BrandQuery) Order(o ...brand.OrderOption) *BrandQuery
Order specifies how the records should be ordered.
func (*BrandQuery) Page ¶
func (b *BrandQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...BrandPaginateOption, ) (*BrandPageList, error)
func (*BrandQuery) QuerySpus ¶
func (bq *BrandQuery) QuerySpus() *SpuQuery
QuerySpus chains the current query on the "spus" edge.
func (*BrandQuery) Select ¶
func (bq *BrandQuery) Select(fields ...string) *BrandSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Brand.Query(). Select(brand.FieldCreatedAt). Scan(ctx, &v)
func (*BrandQuery) Unique ¶
func (bq *BrandQuery) Unique(unique bool) *BrandQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*BrandQuery) Where ¶
func (bq *BrandQuery) Where(ps ...predicate.Brand) *BrandQuery
Where adds a new predicate for the BrandQuery builder.
func (*BrandQuery) WithSpus ¶
func (bq *BrandQuery) WithSpus(opts ...func(*SpuQuery)) *BrandQuery
WithSpus tells the query-builder to eager-load the nodes that are connected to the "spus" edge. The optional arguments are used to configure the query builder of the edge.
type BrandSelect ¶
type BrandSelect struct { *BrandQuery // contains filtered or unexported fields }
BrandSelect is the builder for selecting fields of Brand entities.
func (*BrandSelect) Aggregate ¶
func (bs *BrandSelect) Aggregate(fns ...AggregateFunc) *BrandSelect
Aggregate adds the given aggregation functions to the selector query.
func (*BrandSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BrandSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BrandSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BrandSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BrandSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BrandSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BrandSelect) Scan ¶
func (bs *BrandSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BrandSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BrandUpdate ¶
type BrandUpdate struct {
// contains filtered or unexported fields
}
BrandUpdate is the builder for updating Brand entities.
func (*BrandUpdate) AddSort ¶
func (bu *BrandUpdate) AddSort(u int32) *BrandUpdate
AddSort adds u to the "sort" field.
func (*BrandUpdate) AddSpuIDs ¶
func (bu *BrandUpdate) AddSpuIDs(ids ...uint64) *BrandUpdate
AddSpuIDs adds the "spus" edge to the Spu entity by IDs.
func (*BrandUpdate) AddSpus ¶
func (bu *BrandUpdate) AddSpus(s ...*Spu) *BrandUpdate
AddSpus adds the "spus" edges to the Spu entity.
func (*BrandUpdate) AddStatus ¶
func (bu *BrandUpdate) AddStatus(u int8) *BrandUpdate
AddStatus adds u to the "status" field.
func (*BrandUpdate) ClearDeletedAt ¶
func (bu *BrandUpdate) ClearDeletedAt() *BrandUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BrandUpdate) ClearDescription ¶
func (bu *BrandUpdate) ClearDescription() *BrandUpdate
ClearDescription clears the value of the "description" field.
func (*BrandUpdate) ClearSpus ¶
func (bu *BrandUpdate) ClearSpus() *BrandUpdate
ClearSpus clears all "spus" edges to the Spu entity.
func (*BrandUpdate) ClearStatus ¶
func (bu *BrandUpdate) ClearStatus() *BrandUpdate
ClearStatus clears the value of the "status" field.
func (*BrandUpdate) Exec ¶
func (bu *BrandUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BrandUpdate) ExecX ¶
func (bu *BrandUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BrandUpdate) Mutation ¶
func (bu *BrandUpdate) Mutation() *BrandMutation
Mutation returns the BrandMutation object of the builder.
func (*BrandUpdate) RemoveSpuIDs ¶
func (bu *BrandUpdate) RemoveSpuIDs(ids ...uint64) *BrandUpdate
RemoveSpuIDs removes the "spus" edge to Spu entities by IDs.
func (*BrandUpdate) RemoveSpus ¶
func (bu *BrandUpdate) RemoveSpus(s ...*Spu) *BrandUpdate
RemoveSpus removes "spus" edges to Spu entities.
func (*BrandUpdate) Save ¶
func (bu *BrandUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*BrandUpdate) SaveX ¶
func (bu *BrandUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BrandUpdate) SetDeletedAt ¶
func (bu *BrandUpdate) SetDeletedAt(t time.Time) *BrandUpdate
SetDeletedAt sets the "deleted_at" field.
func (*BrandUpdate) SetDescription ¶
func (bu *BrandUpdate) SetDescription(s string) *BrandUpdate
SetDescription sets the "description" field.
func (*BrandUpdate) SetName ¶
func (bu *BrandUpdate) SetName(s string) *BrandUpdate
SetName sets the "name" field.
func (*BrandUpdate) SetNillableDeletedAt ¶
func (bu *BrandUpdate) SetNillableDeletedAt(t *time.Time) *BrandUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*BrandUpdate) SetNillableDescription ¶
func (bu *BrandUpdate) SetNillableDescription(s *string) *BrandUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*BrandUpdate) SetNillableSort ¶
func (bu *BrandUpdate) SetNillableSort(u *uint32) *BrandUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*BrandUpdate) SetNillableStatus ¶
func (bu *BrandUpdate) SetNillableStatus(u *uint8) *BrandUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*BrandUpdate) SetNotNilDeletedAt ¶
func (b *BrandUpdate) SetNotNilDeletedAt(value *time.Time) *BrandUpdate
set field if value's pointer is not nil.
func (*BrandUpdate) SetNotNilDescription ¶
func (b *BrandUpdate) SetNotNilDescription(value *string) *BrandUpdate
set field if value's pointer is not nil.
func (*BrandUpdate) SetNotNilName ¶
func (b *BrandUpdate) SetNotNilName(value *string) *BrandUpdate
set field if value's pointer is not nil.
func (*BrandUpdate) SetNotNilPicURL ¶
func (b *BrandUpdate) SetNotNilPicURL(value *string) *BrandUpdate
set field if value's pointer is not nil.
func (*BrandUpdate) SetNotNilSort ¶
func (b *BrandUpdate) SetNotNilSort(value *uint32) *BrandUpdate
set field if value's pointer is not nil.
func (*BrandUpdate) SetNotNilStatus ¶
func (b *BrandUpdate) SetNotNilStatus(value *uint8) *BrandUpdate
set field if value's pointer is not nil.
func (*BrandUpdate) SetNotNilUpdatedAt ¶
func (b *BrandUpdate) SetNotNilUpdatedAt(value *time.Time) *BrandUpdate
set field if value's pointer is not nil.
func (*BrandUpdate) SetPicURL ¶
func (bu *BrandUpdate) SetPicURL(s string) *BrandUpdate
SetPicURL sets the "pic_url" field.
func (*BrandUpdate) SetSort ¶
func (bu *BrandUpdate) SetSort(u uint32) *BrandUpdate
SetSort sets the "sort" field.
func (*BrandUpdate) SetStatus ¶
func (bu *BrandUpdate) SetStatus(u uint8) *BrandUpdate
SetStatus sets the "status" field.
func (*BrandUpdate) SetUpdatedAt ¶
func (bu *BrandUpdate) SetUpdatedAt(t time.Time) *BrandUpdate
SetUpdatedAt sets the "updated_at" field.
func (*BrandUpdate) Where ¶
func (bu *BrandUpdate) Where(ps ...predicate.Brand) *BrandUpdate
Where appends a list predicates to the BrandUpdate builder.
type BrandUpdateOne ¶
type BrandUpdateOne struct {
// contains filtered or unexported fields
}
BrandUpdateOne is the builder for updating a single Brand entity.
func (*BrandUpdateOne) AddSort ¶
func (buo *BrandUpdateOne) AddSort(u int32) *BrandUpdateOne
AddSort adds u to the "sort" field.
func (*BrandUpdateOne) AddSpuIDs ¶
func (buo *BrandUpdateOne) AddSpuIDs(ids ...uint64) *BrandUpdateOne
AddSpuIDs adds the "spus" edge to the Spu entity by IDs.
func (*BrandUpdateOne) AddSpus ¶
func (buo *BrandUpdateOne) AddSpus(s ...*Spu) *BrandUpdateOne
AddSpus adds the "spus" edges to the Spu entity.
func (*BrandUpdateOne) AddStatus ¶
func (buo *BrandUpdateOne) AddStatus(u int8) *BrandUpdateOne
AddStatus adds u to the "status" field.
func (*BrandUpdateOne) ClearDeletedAt ¶
func (buo *BrandUpdateOne) ClearDeletedAt() *BrandUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BrandUpdateOne) ClearDescription ¶
func (buo *BrandUpdateOne) ClearDescription() *BrandUpdateOne
ClearDescription clears the value of the "description" field.
func (*BrandUpdateOne) ClearSpus ¶
func (buo *BrandUpdateOne) ClearSpus() *BrandUpdateOne
ClearSpus clears all "spus" edges to the Spu entity.
func (*BrandUpdateOne) ClearStatus ¶
func (buo *BrandUpdateOne) ClearStatus() *BrandUpdateOne
ClearStatus clears the value of the "status" field.
func (*BrandUpdateOne) Exec ¶
func (buo *BrandUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BrandUpdateOne) ExecX ¶
func (buo *BrandUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BrandUpdateOne) Mutation ¶
func (buo *BrandUpdateOne) Mutation() *BrandMutation
Mutation returns the BrandMutation object of the builder.
func (*BrandUpdateOne) RemoveSpuIDs ¶
func (buo *BrandUpdateOne) RemoveSpuIDs(ids ...uint64) *BrandUpdateOne
RemoveSpuIDs removes the "spus" edge to Spu entities by IDs.
func (*BrandUpdateOne) RemoveSpus ¶
func (buo *BrandUpdateOne) RemoveSpus(s ...*Spu) *BrandUpdateOne
RemoveSpus removes "spus" edges to Spu entities.
func (*BrandUpdateOne) Save ¶
func (buo *BrandUpdateOne) Save(ctx context.Context) (*Brand, error)
Save executes the query and returns the updated Brand entity.
func (*BrandUpdateOne) SaveX ¶
func (buo *BrandUpdateOne) SaveX(ctx context.Context) *Brand
SaveX is like Save, but panics if an error occurs.
func (*BrandUpdateOne) Select ¶
func (buo *BrandUpdateOne) Select(field string, fields ...string) *BrandUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*BrandUpdateOne) SetDeletedAt ¶
func (buo *BrandUpdateOne) SetDeletedAt(t time.Time) *BrandUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*BrandUpdateOne) SetDescription ¶
func (buo *BrandUpdateOne) SetDescription(s string) *BrandUpdateOne
SetDescription sets the "description" field.
func (*BrandUpdateOne) SetName ¶
func (buo *BrandUpdateOne) SetName(s string) *BrandUpdateOne
SetName sets the "name" field.
func (*BrandUpdateOne) SetNillableDeletedAt ¶
func (buo *BrandUpdateOne) SetNillableDeletedAt(t *time.Time) *BrandUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*BrandUpdateOne) SetNillableDescription ¶
func (buo *BrandUpdateOne) SetNillableDescription(s *string) *BrandUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*BrandUpdateOne) SetNillableSort ¶
func (buo *BrandUpdateOne) SetNillableSort(u *uint32) *BrandUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*BrandUpdateOne) SetNillableStatus ¶
func (buo *BrandUpdateOne) SetNillableStatus(u *uint8) *BrandUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*BrandUpdateOne) SetNotNilDeletedAt ¶
func (b *BrandUpdateOne) SetNotNilDeletedAt(value *time.Time) *BrandUpdateOne
set field if value's pointer is not nil.
func (*BrandUpdateOne) SetNotNilDescription ¶
func (b *BrandUpdateOne) SetNotNilDescription(value *string) *BrandUpdateOne
set field if value's pointer is not nil.
func (*BrandUpdateOne) SetNotNilName ¶
func (b *BrandUpdateOne) SetNotNilName(value *string) *BrandUpdateOne
set field if value's pointer is not nil.
func (*BrandUpdateOne) SetNotNilPicURL ¶
func (b *BrandUpdateOne) SetNotNilPicURL(value *string) *BrandUpdateOne
set field if value's pointer is not nil.
func (*BrandUpdateOne) SetNotNilSort ¶
func (b *BrandUpdateOne) SetNotNilSort(value *uint32) *BrandUpdateOne
set field if value's pointer is not nil.
func (*BrandUpdateOne) SetNotNilStatus ¶
func (b *BrandUpdateOne) SetNotNilStatus(value *uint8) *BrandUpdateOne
set field if value's pointer is not nil.
func (*BrandUpdateOne) SetNotNilUpdatedAt ¶
func (b *BrandUpdateOne) SetNotNilUpdatedAt(value *time.Time) *BrandUpdateOne
set field if value's pointer is not nil.
func (*BrandUpdateOne) SetPicURL ¶
func (buo *BrandUpdateOne) SetPicURL(s string) *BrandUpdateOne
SetPicURL sets the "pic_url" field.
func (*BrandUpdateOne) SetSort ¶
func (buo *BrandUpdateOne) SetSort(u uint32) *BrandUpdateOne
SetSort sets the "sort" field.
func (*BrandUpdateOne) SetStatus ¶
func (buo *BrandUpdateOne) SetStatus(u uint8) *BrandUpdateOne
SetStatus sets the "status" field.
func (*BrandUpdateOne) SetUpdatedAt ¶
func (buo *BrandUpdateOne) SetUpdatedAt(t time.Time) *BrandUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*BrandUpdateOne) Where ¶
func (buo *BrandUpdateOne) Where(ps ...predicate.Brand) *BrandUpdateOne
Where appends a list predicates to the BrandUpdate builder.
type Category ¶
type Category struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1: normal 2: ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // Sort Number | 排序编号 Sort uint32 `json:"sort,omitempty"` // Delete Time | 删除日期 DeletedAt time.Time `json:"deleted_at,omitempty"` // 父分类编号 ParentID uint64 `json:"parent_id,omitempty"` // 分类名称 Name string `json:"name,omitempty"` // 移动端分类图 PicURL string `json:"pic_url,omitempty"` // PC 端分类图 BigPicURL string `json:"big_pic_url,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CategoryQuery when eager-loading is set. Edges CategoryEdges `json:"edges"` // contains filtered or unexported fields }
Category is the model entity for the Category schema.
func (*Category) QueryChildren ¶
func (c *Category) QueryChildren() *CategoryQuery
QueryChildren queries the "children" edge of the Category entity.
func (*Category) QueryParent ¶
func (c *Category) QueryParent() *CategoryQuery
QueryParent queries the "parent" edge of the Category entity.
func (*Category) Unwrap ¶
Unwrap unwraps the Category entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Category) Update ¶
func (c *Category) Update() *CategoryUpdateOne
Update returns a builder for updating this Category. Note that you need to call Category.Unwrap() before calling this method if this Category was returned from a transaction, and the transaction was committed or rolled back.
type CategoryClient ¶
type CategoryClient struct {
// contains filtered or unexported fields
}
CategoryClient is a client for the Category schema.
func NewCategoryClient ¶
func NewCategoryClient(c config) *CategoryClient
NewCategoryClient returns a client for the Category from the given config.
func (*CategoryClient) Create ¶
func (c *CategoryClient) Create() *CategoryCreate
Create returns a builder for creating a Category entity.
func (*CategoryClient) CreateBulk ¶
func (c *CategoryClient) CreateBulk(builders ...*CategoryCreate) *CategoryCreateBulk
CreateBulk returns a builder for creating a bulk of Category entities.
func (*CategoryClient) Delete ¶
func (c *CategoryClient) Delete() *CategoryDelete
Delete returns a delete builder for Category.
func (*CategoryClient) DeleteOne ¶
func (c *CategoryClient) DeleteOne(ca *Category) *CategoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CategoryClient) DeleteOneID ¶
func (c *CategoryClient) DeleteOneID(id uint64) *CategoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CategoryClient) GetX ¶
func (c *CategoryClient) GetX(ctx context.Context, id uint64) *Category
GetX is like Get, but panics if an error occurs.
func (*CategoryClient) Hooks ¶
func (c *CategoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CategoryClient) Intercept ¶
func (c *CategoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `category.Intercept(f(g(h())))`.
func (*CategoryClient) Interceptors ¶
func (c *CategoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CategoryClient) MapCreateBulk ¶
func (c *CategoryClient) MapCreateBulk(slice any, setFunc func(*CategoryCreate, int)) *CategoryCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CategoryClient) Query ¶
func (c *CategoryClient) Query() *CategoryQuery
Query returns a query builder for Category.
func (*CategoryClient) QueryChildren ¶
func (c *CategoryClient) QueryChildren(ca *Category) *CategoryQuery
QueryChildren queries the children edge of a Category.
func (*CategoryClient) QueryParent ¶
func (c *CategoryClient) QueryParent(ca *Category) *CategoryQuery
QueryParent queries the parent edge of a Category.
func (*CategoryClient) QuerySpus ¶
func (c *CategoryClient) QuerySpus(ca *Category) *SpuQuery
QuerySpus queries the spus edge of a Category.
func (*CategoryClient) Update ¶
func (c *CategoryClient) Update() *CategoryUpdate
Update returns an update builder for Category.
func (*CategoryClient) UpdateOne ¶
func (c *CategoryClient) UpdateOne(ca *Category) *CategoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CategoryClient) UpdateOneID ¶
func (c *CategoryClient) UpdateOneID(id uint64) *CategoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CategoryClient) Use ¶
func (c *CategoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `category.Hooks(f(g(h())))`.
type CategoryCreate ¶
type CategoryCreate struct {
// contains filtered or unexported fields
}
CategoryCreate is the builder for creating a Category entity.
func (*CategoryCreate) AddChildIDs ¶
func (cc *CategoryCreate) AddChildIDs(ids ...uint64) *CategoryCreate
AddChildIDs adds the "children" edge to the Category entity by IDs.
func (*CategoryCreate) AddChildren ¶
func (cc *CategoryCreate) AddChildren(c ...*Category) *CategoryCreate
AddChildren adds the "children" edges to the Category entity.
func (*CategoryCreate) AddSpuIDs ¶
func (cc *CategoryCreate) AddSpuIDs(ids ...uint64) *CategoryCreate
AddSpuIDs adds the "spus" edge to the Spu entity by IDs.
func (*CategoryCreate) AddSpus ¶
func (cc *CategoryCreate) AddSpus(s ...*Spu) *CategoryCreate
AddSpus adds the "spus" edges to the Spu entity.
func (*CategoryCreate) Exec ¶
func (cc *CategoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryCreate) ExecX ¶
func (cc *CategoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryCreate) Mutation ¶
func (cc *CategoryCreate) Mutation() *CategoryMutation
Mutation returns the CategoryMutation object of the builder.
func (*CategoryCreate) Save ¶
func (cc *CategoryCreate) Save(ctx context.Context) (*Category, error)
Save creates the Category in the database.
func (*CategoryCreate) SaveX ¶
func (cc *CategoryCreate) SaveX(ctx context.Context) *Category
SaveX calls Save and panics if Save returns an error.
func (*CategoryCreate) SetBigPicURL ¶
func (cc *CategoryCreate) SetBigPicURL(s string) *CategoryCreate
SetBigPicURL sets the "big_pic_url" field.
func (*CategoryCreate) SetCreatedAt ¶
func (cc *CategoryCreate) SetCreatedAt(t time.Time) *CategoryCreate
SetCreatedAt sets the "created_at" field.
func (*CategoryCreate) SetDeletedAt ¶
func (cc *CategoryCreate) SetDeletedAt(t time.Time) *CategoryCreate
SetDeletedAt sets the "deleted_at" field.
func (*CategoryCreate) SetID ¶
func (cc *CategoryCreate) SetID(u uint64) *CategoryCreate
SetID sets the "id" field.
func (*CategoryCreate) SetName ¶
func (cc *CategoryCreate) SetName(s string) *CategoryCreate
SetName sets the "name" field.
func (*CategoryCreate) SetNillableBigPicURL ¶
func (cc *CategoryCreate) SetNillableBigPicURL(s *string) *CategoryCreate
SetNillableBigPicURL sets the "big_pic_url" field if the given value is not nil.
func (*CategoryCreate) SetNillableCreatedAt ¶
func (cc *CategoryCreate) SetNillableCreatedAt(t *time.Time) *CategoryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CategoryCreate) SetNillableDeletedAt ¶
func (cc *CategoryCreate) SetNillableDeletedAt(t *time.Time) *CategoryCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CategoryCreate) SetNillableParentID ¶
func (cc *CategoryCreate) SetNillableParentID(u *uint64) *CategoryCreate
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*CategoryCreate) SetNillableSort ¶
func (cc *CategoryCreate) SetNillableSort(u *uint32) *CategoryCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*CategoryCreate) SetNillableStatus ¶
func (cc *CategoryCreate) SetNillableStatus(u *uint8) *CategoryCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*CategoryCreate) SetNillableUpdatedAt ¶
func (cc *CategoryCreate) SetNillableUpdatedAt(t *time.Time) *CategoryCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*CategoryCreate) SetNotNilBigPicURL ¶
func (c *CategoryCreate) SetNotNilBigPicURL(value *string) *CategoryCreate
set field if value's pointer is not nil.
func (*CategoryCreate) SetNotNilDeletedAt ¶
func (c *CategoryCreate) SetNotNilDeletedAt(value *time.Time) *CategoryCreate
set field if value's pointer is not nil.
func (*CategoryCreate) SetNotNilName ¶
func (c *CategoryCreate) SetNotNilName(value *string) *CategoryCreate
set field if value's pointer is not nil.
func (*CategoryCreate) SetNotNilParentID ¶
func (c *CategoryCreate) SetNotNilParentID(value *uint64) *CategoryCreate
set field if value's pointer is not nil.
func (*CategoryCreate) SetNotNilPicURL ¶
func (c *CategoryCreate) SetNotNilPicURL(value *string) *CategoryCreate
set field if value's pointer is not nil.
func (*CategoryCreate) SetNotNilSort ¶
func (c *CategoryCreate) SetNotNilSort(value *uint32) *CategoryCreate
set field if value's pointer is not nil.
func (*CategoryCreate) SetNotNilStatus ¶
func (c *CategoryCreate) SetNotNilStatus(value *uint8) *CategoryCreate
set field if value's pointer is not nil.
func (*CategoryCreate) SetNotNilUpdatedAt ¶
func (c *CategoryCreate) SetNotNilUpdatedAt(value *time.Time) *CategoryCreate
set field if value's pointer is not nil.
func (*CategoryCreate) SetParent ¶
func (cc *CategoryCreate) SetParent(c *Category) *CategoryCreate
SetParent sets the "parent" edge to the Category entity.
func (*CategoryCreate) SetParentID ¶
func (cc *CategoryCreate) SetParentID(u uint64) *CategoryCreate
SetParentID sets the "parent_id" field.
func (*CategoryCreate) SetPicURL ¶
func (cc *CategoryCreate) SetPicURL(s string) *CategoryCreate
SetPicURL sets the "pic_url" field.
func (*CategoryCreate) SetSort ¶
func (cc *CategoryCreate) SetSort(u uint32) *CategoryCreate
SetSort sets the "sort" field.
func (*CategoryCreate) SetStatus ¶
func (cc *CategoryCreate) SetStatus(u uint8) *CategoryCreate
SetStatus sets the "status" field.
func (*CategoryCreate) SetUpdatedAt ¶
func (cc *CategoryCreate) SetUpdatedAt(t time.Time) *CategoryCreate
SetUpdatedAt sets the "updated_at" field.
type CategoryCreateBulk ¶
type CategoryCreateBulk struct {
// contains filtered or unexported fields
}
CategoryCreateBulk is the builder for creating many Category entities in bulk.
func (*CategoryCreateBulk) Exec ¶
func (ccb *CategoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryCreateBulk) ExecX ¶
func (ccb *CategoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CategoryDelete ¶
type CategoryDelete struct {
// contains filtered or unexported fields
}
CategoryDelete is the builder for deleting a Category entity.
func (*CategoryDelete) Exec ¶
func (cd *CategoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CategoryDelete) ExecX ¶
func (cd *CategoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CategoryDelete) Where ¶
func (cd *CategoryDelete) Where(ps ...predicate.Category) *CategoryDelete
Where appends a list predicates to the CategoryDelete builder.
type CategoryDeleteOne ¶
type CategoryDeleteOne struct {
// contains filtered or unexported fields
}
CategoryDeleteOne is the builder for deleting a single Category entity.
func (*CategoryDeleteOne) Exec ¶
func (cdo *CategoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CategoryDeleteOne) ExecX ¶
func (cdo *CategoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryDeleteOne) Where ¶
func (cdo *CategoryDeleteOne) Where(ps ...predicate.Category) *CategoryDeleteOne
Where appends a list predicates to the CategoryDelete builder.
type CategoryEdges ¶
type CategoryEdges struct { // Spus holds the value of the spus edge. Spus []*Spu `json:"spus,omitempty"` // Parent holds the value of the parent edge. Parent *Category `json:"parent,omitempty"` // Children holds the value of the children edge. Children []*Category `json:"children,omitempty"` // contains filtered or unexported fields }
CategoryEdges holds the relations/edges for other nodes in the graph.
func (CategoryEdges) ChildrenOrErr ¶
func (e CategoryEdges) ChildrenOrErr() ([]*Category, error)
ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.
func (CategoryEdges) ParentOrErr ¶
func (e CategoryEdges) ParentOrErr() (*Category, error)
ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (CategoryEdges) SpusOrErr ¶
func (e CategoryEdges) SpusOrErr() ([]*Spu, error)
SpusOrErr returns the Spus value or an error if the edge was not loaded in eager-loading.
type CategoryGroupBy ¶
type CategoryGroupBy struct {
// contains filtered or unexported fields
}
CategoryGroupBy is the group-by builder for Category entities.
func (*CategoryGroupBy) Aggregate ¶
func (cgb *CategoryGroupBy) Aggregate(fns ...AggregateFunc) *CategoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CategoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CategoryGroupBy) Scan ¶
func (cgb *CategoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CategoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CategoryMutation ¶
type CategoryMutation struct {
// contains filtered or unexported fields
}
CategoryMutation represents an operation that mutates the Category nodes in the graph.
func (*CategoryMutation) AddChildIDs ¶
func (m *CategoryMutation) AddChildIDs(ids ...uint64)
AddChildIDs adds the "children" edge to the Category entity by ids.
func (*CategoryMutation) AddField ¶
func (m *CategoryMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*CategoryMutation) AddSort ¶
func (m *CategoryMutation) AddSort(u int32)
AddSort adds u to the "sort" field.
func (*CategoryMutation) AddSpuIDs ¶
func (m *CategoryMutation) AddSpuIDs(ids ...uint64)
AddSpuIDs adds the "spus" edge to the Spu entity by ids.
func (*CategoryMutation) AddStatus ¶
func (m *CategoryMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*CategoryMutation) AddedEdges ¶
func (m *CategoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CategoryMutation) AddedField ¶
func (m *CategoryMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*CategoryMutation) AddedFields ¶
func (m *CategoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CategoryMutation) AddedIDs ¶
func (m *CategoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CategoryMutation) AddedSort ¶
func (m *CategoryMutation) AddedSort() (r int32, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*CategoryMutation) AddedStatus ¶
func (m *CategoryMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*CategoryMutation) BigPicURL ¶
func (m *CategoryMutation) BigPicURL() (r string, exists bool)
BigPicURL returns the value of the "big_pic_url" field in the mutation.
func (*CategoryMutation) BigPicURLCleared ¶
func (m *CategoryMutation) BigPicURLCleared() bool
BigPicURLCleared returns if the "big_pic_url" field was cleared in this mutation.
func (*CategoryMutation) ChildrenCleared ¶
func (m *CategoryMutation) ChildrenCleared() bool
ChildrenCleared reports if the "children" edge to the Category entity was cleared.
func (*CategoryMutation) ChildrenIDs ¶
func (m *CategoryMutation) ChildrenIDs() (ids []uint64)
ChildrenIDs returns the "children" edge IDs in the mutation.
func (*CategoryMutation) ClearBigPicURL ¶
func (m *CategoryMutation) ClearBigPicURL()
ClearBigPicURL clears the value of the "big_pic_url" field.
func (*CategoryMutation) ClearChildren ¶
func (m *CategoryMutation) ClearChildren()
ClearChildren clears the "children" edge to the Category entity.
func (*CategoryMutation) ClearDeletedAt ¶
func (m *CategoryMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CategoryMutation) ClearEdge ¶
func (m *CategoryMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*CategoryMutation) ClearField ¶
func (m *CategoryMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*CategoryMutation) ClearParent ¶
func (m *CategoryMutation) ClearParent()
ClearParent clears the "parent" edge to the Category entity.
func (*CategoryMutation) ClearParentID ¶
func (m *CategoryMutation) ClearParentID()
ClearParentID clears the value of the "parent_id" field.
func (*CategoryMutation) ClearSpus ¶
func (m *CategoryMutation) ClearSpus()
ClearSpus clears the "spus" edge to the Spu entity.
func (*CategoryMutation) ClearStatus ¶
func (m *CategoryMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*CategoryMutation) ClearedEdges ¶
func (m *CategoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CategoryMutation) ClearedFields ¶
func (m *CategoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CategoryMutation) Client ¶
func (m CategoryMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*CategoryMutation) CreatedAt ¶
func (m *CategoryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CategoryMutation) DeletedAt ¶
func (m *CategoryMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*CategoryMutation) DeletedAtCleared ¶
func (m *CategoryMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*CategoryMutation) EdgeCleared ¶
func (m *CategoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CategoryMutation) Field ¶
func (m *CategoryMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*CategoryMutation) FieldCleared ¶
func (m *CategoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CategoryMutation) Fields ¶
func (m *CategoryMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*CategoryMutation) ID ¶
func (m *CategoryMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CategoryMutation) IDs ¶
func (m *CategoryMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CategoryMutation) Name ¶
func (m *CategoryMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CategoryMutation) OldBigPicURL ¶
func (m *CategoryMutation) OldBigPicURL(ctx context.Context) (v string, err error)
OldBigPicURL returns the old "big_pic_url" field's value of the Category entity. If the Category object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CategoryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Category entity. If the Category object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CategoryMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Category entity. If the Category object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CategoryMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*CategoryMutation) OldName ¶
func (m *CategoryMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Category entity. If the Category object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CategoryMutation) OldParentID ¶
func (m *CategoryMutation) OldParentID(ctx context.Context) (v uint64, err error)
OldParentID returns the old "parent_id" field's value of the Category entity. If the Category object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CategoryMutation) OldPicURL ¶
func (m *CategoryMutation) OldPicURL(ctx context.Context) (v string, err error)
OldPicURL returns the old "pic_url" field's value of the Category entity. If the Category object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CategoryMutation) OldSort ¶
func (m *CategoryMutation) OldSort(ctx context.Context) (v uint32, err error)
OldSort returns the old "sort" field's value of the Category entity. If the Category object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CategoryMutation) OldStatus ¶
func (m *CategoryMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the Category entity. If the Category object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CategoryMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Category entity. If the Category object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CategoryMutation) ParentCleared ¶
func (m *CategoryMutation) ParentCleared() bool
ParentCleared reports if the "parent" edge to the Category entity was cleared.
func (*CategoryMutation) ParentID ¶
func (m *CategoryMutation) ParentID() (r uint64, exists bool)
ParentID returns the value of the "parent_id" field in the mutation.
func (*CategoryMutation) ParentIDCleared ¶
func (m *CategoryMutation) ParentIDCleared() bool
ParentIDCleared returns if the "parent_id" field was cleared in this mutation.
func (*CategoryMutation) ParentIDs ¶
func (m *CategoryMutation) ParentIDs() (ids []uint64)
ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.
func (*CategoryMutation) PicURL ¶
func (m *CategoryMutation) PicURL() (r string, exists bool)
PicURL returns the value of the "pic_url" field in the mutation.
func (*CategoryMutation) RemoveChildIDs ¶
func (m *CategoryMutation) RemoveChildIDs(ids ...uint64)
RemoveChildIDs removes the "children" edge to the Category entity by IDs.
func (*CategoryMutation) RemoveSpuIDs ¶
func (m *CategoryMutation) RemoveSpuIDs(ids ...uint64)
RemoveSpuIDs removes the "spus" edge to the Spu entity by IDs.
func (*CategoryMutation) RemovedChildrenIDs ¶
func (m *CategoryMutation) RemovedChildrenIDs() (ids []uint64)
RemovedChildren returns the removed IDs of the "children" edge to the Category entity.
func (*CategoryMutation) RemovedEdges ¶
func (m *CategoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CategoryMutation) RemovedIDs ¶
func (m *CategoryMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*CategoryMutation) RemovedSpusIDs ¶
func (m *CategoryMutation) RemovedSpusIDs() (ids []uint64)
RemovedSpus returns the removed IDs of the "spus" edge to the Spu entity.
func (*CategoryMutation) ResetBigPicURL ¶
func (m *CategoryMutation) ResetBigPicURL()
ResetBigPicURL resets all changes to the "big_pic_url" field.
func (*CategoryMutation) ResetChildren ¶
func (m *CategoryMutation) ResetChildren()
ResetChildren resets all changes to the "children" edge.
func (*CategoryMutation) ResetCreatedAt ¶
func (m *CategoryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CategoryMutation) ResetDeletedAt ¶
func (m *CategoryMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*CategoryMutation) ResetEdge ¶
func (m *CategoryMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*CategoryMutation) ResetField ¶
func (m *CategoryMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*CategoryMutation) ResetName ¶
func (m *CategoryMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CategoryMutation) ResetParent ¶
func (m *CategoryMutation) ResetParent()
ResetParent resets all changes to the "parent" edge.
func (*CategoryMutation) ResetParentID ¶
func (m *CategoryMutation) ResetParentID()
ResetParentID resets all changes to the "parent_id" field.
func (*CategoryMutation) ResetPicURL ¶
func (m *CategoryMutation) ResetPicURL()
ResetPicURL resets all changes to the "pic_url" field.
func (*CategoryMutation) ResetSort ¶
func (m *CategoryMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*CategoryMutation) ResetSpus ¶
func (m *CategoryMutation) ResetSpus()
ResetSpus resets all changes to the "spus" edge.
func (*CategoryMutation) ResetStatus ¶
func (m *CategoryMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*CategoryMutation) ResetUpdatedAt ¶
func (m *CategoryMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CategoryMutation) SetBigPicURL ¶
func (m *CategoryMutation) SetBigPicURL(s string)
SetBigPicURL sets the "big_pic_url" field.
func (*CategoryMutation) SetCreatedAt ¶
func (m *CategoryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CategoryMutation) SetDeletedAt ¶
func (m *CategoryMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*CategoryMutation) SetField ¶
func (m *CategoryMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*CategoryMutation) SetID ¶
func (m *CategoryMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Category entities.
func (*CategoryMutation) SetName ¶
func (m *CategoryMutation) SetName(s string)
SetName sets the "name" field.
func (*CategoryMutation) SetOp ¶
func (m *CategoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CategoryMutation) SetParentID ¶
func (m *CategoryMutation) SetParentID(u uint64)
SetParentID sets the "parent_id" field.
func (*CategoryMutation) SetPicURL ¶
func (m *CategoryMutation) SetPicURL(s string)
SetPicURL sets the "pic_url" field.
func (*CategoryMutation) SetSort ¶
func (m *CategoryMutation) SetSort(u uint32)
SetSort sets the "sort" field.
func (*CategoryMutation) SetStatus ¶
func (m *CategoryMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*CategoryMutation) SetUpdatedAt ¶
func (m *CategoryMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*CategoryMutation) Sort ¶
func (m *CategoryMutation) Sort() (r uint32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*CategoryMutation) SpusCleared ¶
func (m *CategoryMutation) SpusCleared() bool
SpusCleared reports if the "spus" edge to the Spu entity was cleared.
func (*CategoryMutation) SpusIDs ¶
func (m *CategoryMutation) SpusIDs() (ids []uint64)
SpusIDs returns the "spus" edge IDs in the mutation.
func (*CategoryMutation) Status ¶
func (m *CategoryMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*CategoryMutation) StatusCleared ¶
func (m *CategoryMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (CategoryMutation) Tx ¶
func (m CategoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CategoryMutation) Type ¶
func (m *CategoryMutation) Type() string
Type returns the node type of this mutation (Category).
func (*CategoryMutation) UpdatedAt ¶
func (m *CategoryMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CategoryMutation) Where ¶
func (m *CategoryMutation) Where(ps ...predicate.Category)
Where appends a list predicates to the CategoryMutation builder.
func (*CategoryMutation) WhereP ¶
func (m *CategoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CategoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CategoryPageList ¶
type CategoryPageList struct { List []*Category `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
CategoryPageList is Category PageList result.
type CategoryPager ¶
type CategoryPager struct { Order category.OrderOption Filter func(*CategoryQuery) (*CategoryQuery, error) }
func (*CategoryPager) ApplyFilter ¶
func (p *CategoryPager) ApplyFilter(query *CategoryQuery) (*CategoryQuery, error)
type CategoryPaginateOption ¶
type CategoryPaginateOption func(*CategoryPager)
CategoryPaginateOption enables pagination customization.
type CategoryQuery ¶
type CategoryQuery struct {
// contains filtered or unexported fields
}
CategoryQuery is the builder for querying Category entities.
func (*CategoryQuery) Aggregate ¶
func (cq *CategoryQuery) Aggregate(fns ...AggregateFunc) *CategorySelect
Aggregate returns a CategorySelect configured with the given aggregations.
func (*CategoryQuery) All ¶
func (cq *CategoryQuery) All(ctx context.Context) ([]*Category, error)
All executes the query and returns a list of Categories.
func (*CategoryQuery) AllX ¶
func (cq *CategoryQuery) AllX(ctx context.Context) []*Category
AllX is like All, but panics if an error occurs.
func (*CategoryQuery) Clone ¶
func (cq *CategoryQuery) Clone() *CategoryQuery
Clone returns a duplicate of the CategoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CategoryQuery) Count ¶
func (cq *CategoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CategoryQuery) CountX ¶
func (cq *CategoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CategoryQuery) Exist ¶
func (cq *CategoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CategoryQuery) ExistX ¶
func (cq *CategoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CategoryQuery) First ¶
func (cq *CategoryQuery) First(ctx context.Context) (*Category, error)
First returns the first Category entity from the query. Returns a *NotFoundError when no Category was found.
func (*CategoryQuery) FirstID ¶
func (cq *CategoryQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Category ID from the query. Returns a *NotFoundError when no Category ID was found.
func (*CategoryQuery) FirstIDX ¶
func (cq *CategoryQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*CategoryQuery) FirstX ¶
func (cq *CategoryQuery) FirstX(ctx context.Context) *Category
FirstX is like First, but panics if an error occurs.
func (*CategoryQuery) GroupBy ¶
func (cq *CategoryQuery) GroupBy(field string, fields ...string) *CategoryGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Category.Query(). GroupBy(category.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CategoryQuery) IDs ¶
func (cq *CategoryQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Category IDs.
func (*CategoryQuery) IDsX ¶
func (cq *CategoryQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*CategoryQuery) Limit ¶
func (cq *CategoryQuery) Limit(limit int) *CategoryQuery
Limit the number of records to be returned by this query.
func (*CategoryQuery) Offset ¶
func (cq *CategoryQuery) Offset(offset int) *CategoryQuery
Offset to start from.
func (*CategoryQuery) Only ¶
func (cq *CategoryQuery) Only(ctx context.Context) (*Category, error)
Only returns a single Category entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Category entity is found. Returns a *NotFoundError when no Category entities are found.
func (*CategoryQuery) OnlyID ¶
func (cq *CategoryQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Category ID in the query. Returns a *NotSingularError when more than one Category ID is found. Returns a *NotFoundError when no entities are found.
func (*CategoryQuery) OnlyIDX ¶
func (cq *CategoryQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CategoryQuery) OnlyX ¶
func (cq *CategoryQuery) OnlyX(ctx context.Context) *Category
OnlyX is like Only, but panics if an error occurs.
func (*CategoryQuery) Order ¶
func (cq *CategoryQuery) Order(o ...category.OrderOption) *CategoryQuery
Order specifies how the records should be ordered.
func (*CategoryQuery) Page ¶
func (c *CategoryQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...CategoryPaginateOption, ) (*CategoryPageList, error)
func (*CategoryQuery) QueryChildren ¶
func (cq *CategoryQuery) QueryChildren() *CategoryQuery
QueryChildren chains the current query on the "children" edge.
func (*CategoryQuery) QueryParent ¶
func (cq *CategoryQuery) QueryParent() *CategoryQuery
QueryParent chains the current query on the "parent" edge.
func (*CategoryQuery) QuerySpus ¶
func (cq *CategoryQuery) QuerySpus() *SpuQuery
QuerySpus chains the current query on the "spus" edge.
func (*CategoryQuery) Select ¶
func (cq *CategoryQuery) Select(fields ...string) *CategorySelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Category.Query(). Select(category.FieldCreatedAt). Scan(ctx, &v)
func (*CategoryQuery) Unique ¶
func (cq *CategoryQuery) Unique(unique bool) *CategoryQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*CategoryQuery) Where ¶
func (cq *CategoryQuery) Where(ps ...predicate.Category) *CategoryQuery
Where adds a new predicate for the CategoryQuery builder.
func (*CategoryQuery) WithChildren ¶
func (cq *CategoryQuery) WithChildren(opts ...func(*CategoryQuery)) *CategoryQuery
WithChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge. The optional arguments are used to configure the query builder of the edge.
func (*CategoryQuery) WithParent ¶
func (cq *CategoryQuery) WithParent(opts ...func(*CategoryQuery)) *CategoryQuery
WithParent tells the query-builder to eager-load the nodes that are connected to the "parent" edge. The optional arguments are used to configure the query builder of the edge.
func (*CategoryQuery) WithSpus ¶
func (cq *CategoryQuery) WithSpus(opts ...func(*SpuQuery)) *CategoryQuery
WithSpus tells the query-builder to eager-load the nodes that are connected to the "spus" edge. The optional arguments are used to configure the query builder of the edge.
type CategorySelect ¶
type CategorySelect struct { *CategoryQuery // contains filtered or unexported fields }
CategorySelect is the builder for selecting fields of Category entities.
func (*CategorySelect) Aggregate ¶
func (cs *CategorySelect) Aggregate(fns ...AggregateFunc) *CategorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*CategorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CategorySelect) Scan ¶
func (cs *CategorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CategorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CategoryUpdate ¶
type CategoryUpdate struct {
// contains filtered or unexported fields
}
CategoryUpdate is the builder for updating Category entities.
func (*CategoryUpdate) AddChildIDs ¶
func (cu *CategoryUpdate) AddChildIDs(ids ...uint64) *CategoryUpdate
AddChildIDs adds the "children" edge to the Category entity by IDs.
func (*CategoryUpdate) AddChildren ¶
func (cu *CategoryUpdate) AddChildren(c ...*Category) *CategoryUpdate
AddChildren adds the "children" edges to the Category entity.
func (*CategoryUpdate) AddSort ¶
func (cu *CategoryUpdate) AddSort(u int32) *CategoryUpdate
AddSort adds u to the "sort" field.
func (*CategoryUpdate) AddSpuIDs ¶
func (cu *CategoryUpdate) AddSpuIDs(ids ...uint64) *CategoryUpdate
AddSpuIDs adds the "spus" edge to the Spu entity by IDs.
func (*CategoryUpdate) AddSpus ¶
func (cu *CategoryUpdate) AddSpus(s ...*Spu) *CategoryUpdate
AddSpus adds the "spus" edges to the Spu entity.
func (*CategoryUpdate) AddStatus ¶
func (cu *CategoryUpdate) AddStatus(u int8) *CategoryUpdate
AddStatus adds u to the "status" field.
func (*CategoryUpdate) ClearBigPicURL ¶
func (cu *CategoryUpdate) ClearBigPicURL() *CategoryUpdate
ClearBigPicURL clears the value of the "big_pic_url" field.
func (*CategoryUpdate) ClearChildren ¶
func (cu *CategoryUpdate) ClearChildren() *CategoryUpdate
ClearChildren clears all "children" edges to the Category entity.
func (*CategoryUpdate) ClearDeletedAt ¶
func (cu *CategoryUpdate) ClearDeletedAt() *CategoryUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CategoryUpdate) ClearParent ¶
func (cu *CategoryUpdate) ClearParent() *CategoryUpdate
ClearParent clears the "parent" edge to the Category entity.
func (*CategoryUpdate) ClearParentID ¶
func (cu *CategoryUpdate) ClearParentID() *CategoryUpdate
ClearParentID clears the value of the "parent_id" field.
func (*CategoryUpdate) ClearSpus ¶
func (cu *CategoryUpdate) ClearSpus() *CategoryUpdate
ClearSpus clears all "spus" edges to the Spu entity.
func (*CategoryUpdate) ClearStatus ¶
func (cu *CategoryUpdate) ClearStatus() *CategoryUpdate
ClearStatus clears the value of the "status" field.
func (*CategoryUpdate) Exec ¶
func (cu *CategoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CategoryUpdate) ExecX ¶
func (cu *CategoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryUpdate) Mutation ¶
func (cu *CategoryUpdate) Mutation() *CategoryMutation
Mutation returns the CategoryMutation object of the builder.
func (*CategoryUpdate) RemoveChildIDs ¶
func (cu *CategoryUpdate) RemoveChildIDs(ids ...uint64) *CategoryUpdate
RemoveChildIDs removes the "children" edge to Category entities by IDs.
func (*CategoryUpdate) RemoveChildren ¶
func (cu *CategoryUpdate) RemoveChildren(c ...*Category) *CategoryUpdate
RemoveChildren removes "children" edges to Category entities.
func (*CategoryUpdate) RemoveSpuIDs ¶
func (cu *CategoryUpdate) RemoveSpuIDs(ids ...uint64) *CategoryUpdate
RemoveSpuIDs removes the "spus" edge to Spu entities by IDs.
func (*CategoryUpdate) RemoveSpus ¶
func (cu *CategoryUpdate) RemoveSpus(s ...*Spu) *CategoryUpdate
RemoveSpus removes "spus" edges to Spu entities.
func (*CategoryUpdate) Save ¶
func (cu *CategoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CategoryUpdate) SaveX ¶
func (cu *CategoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CategoryUpdate) SetBigPicURL ¶
func (cu *CategoryUpdate) SetBigPicURL(s string) *CategoryUpdate
SetBigPicURL sets the "big_pic_url" field.
func (*CategoryUpdate) SetDeletedAt ¶
func (cu *CategoryUpdate) SetDeletedAt(t time.Time) *CategoryUpdate
SetDeletedAt sets the "deleted_at" field.
func (*CategoryUpdate) SetName ¶
func (cu *CategoryUpdate) SetName(s string) *CategoryUpdate
SetName sets the "name" field.
func (*CategoryUpdate) SetNillableBigPicURL ¶
func (cu *CategoryUpdate) SetNillableBigPicURL(s *string) *CategoryUpdate
SetNillableBigPicURL sets the "big_pic_url" field if the given value is not nil.
func (*CategoryUpdate) SetNillableDeletedAt ¶
func (cu *CategoryUpdate) SetNillableDeletedAt(t *time.Time) *CategoryUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CategoryUpdate) SetNillableParentID ¶
func (cu *CategoryUpdate) SetNillableParentID(u *uint64) *CategoryUpdate
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*CategoryUpdate) SetNillableSort ¶
func (cu *CategoryUpdate) SetNillableSort(u *uint32) *CategoryUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*CategoryUpdate) SetNillableStatus ¶
func (cu *CategoryUpdate) SetNillableStatus(u *uint8) *CategoryUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*CategoryUpdate) SetNotNilBigPicURL ¶
func (c *CategoryUpdate) SetNotNilBigPicURL(value *string) *CategoryUpdate
set field if value's pointer is not nil.
func (*CategoryUpdate) SetNotNilDeletedAt ¶
func (c *CategoryUpdate) SetNotNilDeletedAt(value *time.Time) *CategoryUpdate
set field if value's pointer is not nil.
func (*CategoryUpdate) SetNotNilName ¶
func (c *CategoryUpdate) SetNotNilName(value *string) *CategoryUpdate
set field if value's pointer is not nil.
func (*CategoryUpdate) SetNotNilParentID ¶
func (c *CategoryUpdate) SetNotNilParentID(value *uint64) *CategoryUpdate
set field if value's pointer is not nil.
func (*CategoryUpdate) SetNotNilPicURL ¶
func (c *CategoryUpdate) SetNotNilPicURL(value *string) *CategoryUpdate
set field if value's pointer is not nil.
func (*CategoryUpdate) SetNotNilSort ¶
func (c *CategoryUpdate) SetNotNilSort(value *uint32) *CategoryUpdate
set field if value's pointer is not nil.
func (*CategoryUpdate) SetNotNilStatus ¶
func (c *CategoryUpdate) SetNotNilStatus(value *uint8) *CategoryUpdate
set field if value's pointer is not nil.
func (*CategoryUpdate) SetNotNilUpdatedAt ¶
func (c *CategoryUpdate) SetNotNilUpdatedAt(value *time.Time) *CategoryUpdate
set field if value's pointer is not nil.
func (*CategoryUpdate) SetParent ¶
func (cu *CategoryUpdate) SetParent(c *Category) *CategoryUpdate
SetParent sets the "parent" edge to the Category entity.
func (*CategoryUpdate) SetParentID ¶
func (cu *CategoryUpdate) SetParentID(u uint64) *CategoryUpdate
SetParentID sets the "parent_id" field.
func (*CategoryUpdate) SetPicURL ¶
func (cu *CategoryUpdate) SetPicURL(s string) *CategoryUpdate
SetPicURL sets the "pic_url" field.
func (*CategoryUpdate) SetSort ¶
func (cu *CategoryUpdate) SetSort(u uint32) *CategoryUpdate
SetSort sets the "sort" field.
func (*CategoryUpdate) SetStatus ¶
func (cu *CategoryUpdate) SetStatus(u uint8) *CategoryUpdate
SetStatus sets the "status" field.
func (*CategoryUpdate) SetUpdatedAt ¶
func (cu *CategoryUpdate) SetUpdatedAt(t time.Time) *CategoryUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CategoryUpdate) Where ¶
func (cu *CategoryUpdate) Where(ps ...predicate.Category) *CategoryUpdate
Where appends a list predicates to the CategoryUpdate builder.
type CategoryUpdateOne ¶
type CategoryUpdateOne struct {
// contains filtered or unexported fields
}
CategoryUpdateOne is the builder for updating a single Category entity.
func (*CategoryUpdateOne) AddChildIDs ¶
func (cuo *CategoryUpdateOne) AddChildIDs(ids ...uint64) *CategoryUpdateOne
AddChildIDs adds the "children" edge to the Category entity by IDs.
func (*CategoryUpdateOne) AddChildren ¶
func (cuo *CategoryUpdateOne) AddChildren(c ...*Category) *CategoryUpdateOne
AddChildren adds the "children" edges to the Category entity.
func (*CategoryUpdateOne) AddSort ¶
func (cuo *CategoryUpdateOne) AddSort(u int32) *CategoryUpdateOne
AddSort adds u to the "sort" field.
func (*CategoryUpdateOne) AddSpuIDs ¶
func (cuo *CategoryUpdateOne) AddSpuIDs(ids ...uint64) *CategoryUpdateOne
AddSpuIDs adds the "spus" edge to the Spu entity by IDs.
func (*CategoryUpdateOne) AddSpus ¶
func (cuo *CategoryUpdateOne) AddSpus(s ...*Spu) *CategoryUpdateOne
AddSpus adds the "spus" edges to the Spu entity.
func (*CategoryUpdateOne) AddStatus ¶
func (cuo *CategoryUpdateOne) AddStatus(u int8) *CategoryUpdateOne
AddStatus adds u to the "status" field.
func (*CategoryUpdateOne) ClearBigPicURL ¶
func (cuo *CategoryUpdateOne) ClearBigPicURL() *CategoryUpdateOne
ClearBigPicURL clears the value of the "big_pic_url" field.
func (*CategoryUpdateOne) ClearChildren ¶
func (cuo *CategoryUpdateOne) ClearChildren() *CategoryUpdateOne
ClearChildren clears all "children" edges to the Category entity.
func (*CategoryUpdateOne) ClearDeletedAt ¶
func (cuo *CategoryUpdateOne) ClearDeletedAt() *CategoryUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CategoryUpdateOne) ClearParent ¶
func (cuo *CategoryUpdateOne) ClearParent() *CategoryUpdateOne
ClearParent clears the "parent" edge to the Category entity.
func (*CategoryUpdateOne) ClearParentID ¶
func (cuo *CategoryUpdateOne) ClearParentID() *CategoryUpdateOne
ClearParentID clears the value of the "parent_id" field.
func (*CategoryUpdateOne) ClearSpus ¶
func (cuo *CategoryUpdateOne) ClearSpus() *CategoryUpdateOne
ClearSpus clears all "spus" edges to the Spu entity.
func (*CategoryUpdateOne) ClearStatus ¶
func (cuo *CategoryUpdateOne) ClearStatus() *CategoryUpdateOne
ClearStatus clears the value of the "status" field.
func (*CategoryUpdateOne) Exec ¶
func (cuo *CategoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CategoryUpdateOne) ExecX ¶
func (cuo *CategoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CategoryUpdateOne) Mutation ¶
func (cuo *CategoryUpdateOne) Mutation() *CategoryMutation
Mutation returns the CategoryMutation object of the builder.
func (*CategoryUpdateOne) RemoveChildIDs ¶
func (cuo *CategoryUpdateOne) RemoveChildIDs(ids ...uint64) *CategoryUpdateOne
RemoveChildIDs removes the "children" edge to Category entities by IDs.
func (*CategoryUpdateOne) RemoveChildren ¶
func (cuo *CategoryUpdateOne) RemoveChildren(c ...*Category) *CategoryUpdateOne
RemoveChildren removes "children" edges to Category entities.
func (*CategoryUpdateOne) RemoveSpuIDs ¶
func (cuo *CategoryUpdateOne) RemoveSpuIDs(ids ...uint64) *CategoryUpdateOne
RemoveSpuIDs removes the "spus" edge to Spu entities by IDs.
func (*CategoryUpdateOne) RemoveSpus ¶
func (cuo *CategoryUpdateOne) RemoveSpus(s ...*Spu) *CategoryUpdateOne
RemoveSpus removes "spus" edges to Spu entities.
func (*CategoryUpdateOne) Save ¶
func (cuo *CategoryUpdateOne) Save(ctx context.Context) (*Category, error)
Save executes the query and returns the updated Category entity.
func (*CategoryUpdateOne) SaveX ¶
func (cuo *CategoryUpdateOne) SaveX(ctx context.Context) *Category
SaveX is like Save, but panics if an error occurs.
func (*CategoryUpdateOne) Select ¶
func (cuo *CategoryUpdateOne) Select(field string, fields ...string) *CategoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CategoryUpdateOne) SetBigPicURL ¶
func (cuo *CategoryUpdateOne) SetBigPicURL(s string) *CategoryUpdateOne
SetBigPicURL sets the "big_pic_url" field.
func (*CategoryUpdateOne) SetDeletedAt ¶
func (cuo *CategoryUpdateOne) SetDeletedAt(t time.Time) *CategoryUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*CategoryUpdateOne) SetName ¶
func (cuo *CategoryUpdateOne) SetName(s string) *CategoryUpdateOne
SetName sets the "name" field.
func (*CategoryUpdateOne) SetNillableBigPicURL ¶
func (cuo *CategoryUpdateOne) SetNillableBigPicURL(s *string) *CategoryUpdateOne
SetNillableBigPicURL sets the "big_pic_url" field if the given value is not nil.
func (*CategoryUpdateOne) SetNillableDeletedAt ¶
func (cuo *CategoryUpdateOne) SetNillableDeletedAt(t *time.Time) *CategoryUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CategoryUpdateOne) SetNillableParentID ¶
func (cuo *CategoryUpdateOne) SetNillableParentID(u *uint64) *CategoryUpdateOne
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*CategoryUpdateOne) SetNillableSort ¶
func (cuo *CategoryUpdateOne) SetNillableSort(u *uint32) *CategoryUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*CategoryUpdateOne) SetNillableStatus ¶
func (cuo *CategoryUpdateOne) SetNillableStatus(u *uint8) *CategoryUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*CategoryUpdateOne) SetNotNilBigPicURL ¶
func (c *CategoryUpdateOne) SetNotNilBigPicURL(value *string) *CategoryUpdateOne
set field if value's pointer is not nil.
func (*CategoryUpdateOne) SetNotNilDeletedAt ¶
func (c *CategoryUpdateOne) SetNotNilDeletedAt(value *time.Time) *CategoryUpdateOne
set field if value's pointer is not nil.
func (*CategoryUpdateOne) SetNotNilName ¶
func (c *CategoryUpdateOne) SetNotNilName(value *string) *CategoryUpdateOne
set field if value's pointer is not nil.
func (*CategoryUpdateOne) SetNotNilParentID ¶
func (c *CategoryUpdateOne) SetNotNilParentID(value *uint64) *CategoryUpdateOne
set field if value's pointer is not nil.
func (*CategoryUpdateOne) SetNotNilPicURL ¶
func (c *CategoryUpdateOne) SetNotNilPicURL(value *string) *CategoryUpdateOne
set field if value's pointer is not nil.
func (*CategoryUpdateOne) SetNotNilSort ¶
func (c *CategoryUpdateOne) SetNotNilSort(value *uint32) *CategoryUpdateOne
set field if value's pointer is not nil.
func (*CategoryUpdateOne) SetNotNilStatus ¶
func (c *CategoryUpdateOne) SetNotNilStatus(value *uint8) *CategoryUpdateOne
set field if value's pointer is not nil.
func (*CategoryUpdateOne) SetNotNilUpdatedAt ¶
func (c *CategoryUpdateOne) SetNotNilUpdatedAt(value *time.Time) *CategoryUpdateOne
set field if value's pointer is not nil.
func (*CategoryUpdateOne) SetParent ¶
func (cuo *CategoryUpdateOne) SetParent(c *Category) *CategoryUpdateOne
SetParent sets the "parent" edge to the Category entity.
func (*CategoryUpdateOne) SetParentID ¶
func (cuo *CategoryUpdateOne) SetParentID(u uint64) *CategoryUpdateOne
SetParentID sets the "parent_id" field.
func (*CategoryUpdateOne) SetPicURL ¶
func (cuo *CategoryUpdateOne) SetPicURL(s string) *CategoryUpdateOne
SetPicURL sets the "pic_url" field.
func (*CategoryUpdateOne) SetSort ¶
func (cuo *CategoryUpdateOne) SetSort(u uint32) *CategoryUpdateOne
SetSort sets the "sort" field.
func (*CategoryUpdateOne) SetStatus ¶
func (cuo *CategoryUpdateOne) SetStatus(u uint8) *CategoryUpdateOne
SetStatus sets the "status" field.
func (*CategoryUpdateOne) SetUpdatedAt ¶
func (cuo *CategoryUpdateOne) SetUpdatedAt(t time.Time) *CategoryUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*CategoryUpdateOne) Where ¶
func (cuo *CategoryUpdateOne) Where(ps ...predicate.Category) *CategoryUpdateOne
Where appends a list predicates to the CategoryUpdate builder.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Brand is the client for interacting with the Brand builders. Brand *BrandClient // Category is the client for interacting with the Category builders. Category *CategoryClient // Comment is the client for interacting with the Comment builders. Comment *CommentClient // Property is the client for interacting with the Property builders. Property *PropertyClient // PropertyValue is the client for interacting with the PropertyValue builders. PropertyValue *PropertyValueClient // Sku is the client for interacting with the Sku builders. Sku *SkuClient // Spu is the client for interacting with the Spu builders. Spu *SpuClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Brand. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type Comment ¶
type Comment struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Delete Time | 删除日期 DeletedAt time.Time `json:"deleted_at,omitempty"` // 评价人的用户编号,关联 MemberUserDO 的 id 编号 UserID uint64 `json:"user_id,omitempty"` // 评价人名称 UserNickname string `json:"user_nickname,omitempty"` // 评价人头像 UserAvatar string `json:"user_avatar,omitempty"` // 是否匿名 Anonymous bool `json:"anonymous,omitempty"` // 交易订单编号,关联 TradeOrderDO 的 id 编号 OrderID uint64 `json:"order_id,omitempty"` // 交易订单项编号,关联 TradeOrderItemDO 的 id 编号 OrderItemID uint64 `json:"order_item_id,omitempty"` // 商品 SPU 编号,关联 ProductSpuDO 的 id SpuID uint64 `json:"spu_id,omitempty"` // 商品 SPU 名称 SpuName string `json:"spu_name,omitempty"` // 商品 SKU 编号,关联 ProductSkuDO 的 id 编号 SkuID uint64 `json:"sku_id,omitempty"` // 图片地址 SkuPicURL string `json:"sku_pic_url,omitempty"` // 属性数组,JSON 格式 [{propertId: , valueId: }, {propertId: , valueId: }] SkuProperties []entType.SkuProperty `json:"sku_properties,omitempty"` // 是否可见,true:显示false:隐藏 Visible bool `json:"visible,omitempty"` // 评分星级1-5分 Scores int8 `json:"scores,omitempty"` // 描述星级 1-5 星 DescriptionScores int8 `json:"description_scores,omitempty"` // 服务星级 1-5 星 BenefitScores int8 `json:"benefit_scores,omitempty"` // 评论内容 Content string `json:"content,omitempty"` // 评论图片地址数组 PicUrls string `json:"pic_urls,omitempty"` // 商家是否回复 ReplyStatus bool `json:"reply_status,omitempty"` // 回复管理员编号,关联 AdminUserDO 的 id 编号 ReplyUserID int `json:"reply_user_id,omitempty"` // 商家回复内容 ReplyContent string `json:"reply_content,omitempty"` // 商家回复时间 ReplyTime time.Time `json:"reply_time,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CommentQuery when eager-loading is set. Edges CommentEdges `json:"edges"` // contains filtered or unexported fields }
Comment is the model entity for the Comment schema.
func (*Comment) Unwrap ¶
Unwrap unwraps the Comment entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Comment) Update ¶
func (c *Comment) Update() *CommentUpdateOne
Update returns a builder for updating this Comment. Note that you need to call Comment.Unwrap() before calling this method if this Comment was returned from a transaction, and the transaction was committed or rolled back.
type CommentClient ¶
type CommentClient struct {
// contains filtered or unexported fields
}
CommentClient is a client for the Comment schema.
func NewCommentClient ¶
func NewCommentClient(c config) *CommentClient
NewCommentClient returns a client for the Comment from the given config.
func (*CommentClient) Create ¶
func (c *CommentClient) Create() *CommentCreate
Create returns a builder for creating a Comment entity.
func (*CommentClient) CreateBulk ¶
func (c *CommentClient) CreateBulk(builders ...*CommentCreate) *CommentCreateBulk
CreateBulk returns a builder for creating a bulk of Comment entities.
func (*CommentClient) Delete ¶
func (c *CommentClient) Delete() *CommentDelete
Delete returns a delete builder for Comment.
func (*CommentClient) DeleteOne ¶
func (c *CommentClient) DeleteOne(co *Comment) *CommentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CommentClient) DeleteOneID ¶
func (c *CommentClient) DeleteOneID(id uint64) *CommentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CommentClient) GetX ¶
func (c *CommentClient) GetX(ctx context.Context, id uint64) *Comment
GetX is like Get, but panics if an error occurs.
func (*CommentClient) Hooks ¶
func (c *CommentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CommentClient) Intercept ¶
func (c *CommentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `comment.Intercept(f(g(h())))`.
func (*CommentClient) Interceptors ¶
func (c *CommentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CommentClient) MapCreateBulk ¶
func (c *CommentClient) MapCreateBulk(slice any, setFunc func(*CommentCreate, int)) *CommentCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CommentClient) Query ¶
func (c *CommentClient) Query() *CommentQuery
Query returns a query builder for Comment.
func (*CommentClient) QuerySkus ¶
func (c *CommentClient) QuerySkus(co *Comment) *SkuQuery
QuerySkus queries the skus edge of a Comment.
func (*CommentClient) Update ¶
func (c *CommentClient) Update() *CommentUpdate
Update returns an update builder for Comment.
func (*CommentClient) UpdateOne ¶
func (c *CommentClient) UpdateOne(co *Comment) *CommentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CommentClient) UpdateOneID ¶
func (c *CommentClient) UpdateOneID(id uint64) *CommentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CommentClient) Use ¶
func (c *CommentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `comment.Hooks(f(g(h())))`.
type CommentCreate ¶
type CommentCreate struct {
// contains filtered or unexported fields
}
CommentCreate is the builder for creating a Comment entity.
func (*CommentCreate) Exec ¶
func (cc *CommentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CommentCreate) ExecX ¶
func (cc *CommentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CommentCreate) Mutation ¶
func (cc *CommentCreate) Mutation() *CommentMutation
Mutation returns the CommentMutation object of the builder.
func (*CommentCreate) Save ¶
func (cc *CommentCreate) Save(ctx context.Context) (*Comment, error)
Save creates the Comment in the database.
func (*CommentCreate) SaveX ¶
func (cc *CommentCreate) SaveX(ctx context.Context) *Comment
SaveX calls Save and panics if Save returns an error.
func (*CommentCreate) SetAnonymous ¶
func (cc *CommentCreate) SetAnonymous(b bool) *CommentCreate
SetAnonymous sets the "anonymous" field.
func (*CommentCreate) SetBenefitScores ¶
func (cc *CommentCreate) SetBenefitScores(i int8) *CommentCreate
SetBenefitScores sets the "benefit_scores" field.
func (*CommentCreate) SetContent ¶
func (cc *CommentCreate) SetContent(s string) *CommentCreate
SetContent sets the "content" field.
func (*CommentCreate) SetCreatedAt ¶
func (cc *CommentCreate) SetCreatedAt(t time.Time) *CommentCreate
SetCreatedAt sets the "created_at" field.
func (*CommentCreate) SetDeletedAt ¶
func (cc *CommentCreate) SetDeletedAt(t time.Time) *CommentCreate
SetDeletedAt sets the "deleted_at" field.
func (*CommentCreate) SetDescriptionScores ¶
func (cc *CommentCreate) SetDescriptionScores(i int8) *CommentCreate
SetDescriptionScores sets the "description_scores" field.
func (*CommentCreate) SetID ¶
func (cc *CommentCreate) SetID(u uint64) *CommentCreate
SetID sets the "id" field.
func (*CommentCreate) SetNillableAnonymous ¶
func (cc *CommentCreate) SetNillableAnonymous(b *bool) *CommentCreate
SetNillableAnonymous sets the "anonymous" field if the given value is not nil.
func (*CommentCreate) SetNillableBenefitScores ¶
func (cc *CommentCreate) SetNillableBenefitScores(i *int8) *CommentCreate
SetNillableBenefitScores sets the "benefit_scores" field if the given value is not nil.
func (*CommentCreate) SetNillableContent ¶
func (cc *CommentCreate) SetNillableContent(s *string) *CommentCreate
SetNillableContent sets the "content" field if the given value is not nil.
func (*CommentCreate) SetNillableCreatedAt ¶
func (cc *CommentCreate) SetNillableCreatedAt(t *time.Time) *CommentCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CommentCreate) SetNillableDeletedAt ¶
func (cc *CommentCreate) SetNillableDeletedAt(t *time.Time) *CommentCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CommentCreate) SetNillableDescriptionScores ¶
func (cc *CommentCreate) SetNillableDescriptionScores(i *int8) *CommentCreate
SetNillableDescriptionScores sets the "description_scores" field if the given value is not nil.
func (*CommentCreate) SetNillableOrderID ¶
func (cc *CommentCreate) SetNillableOrderID(u *uint64) *CommentCreate
SetNillableOrderID sets the "order_id" field if the given value is not nil.
func (*CommentCreate) SetNillableOrderItemID ¶
func (cc *CommentCreate) SetNillableOrderItemID(u *uint64) *CommentCreate
SetNillableOrderItemID sets the "order_item_id" field if the given value is not nil.
func (*CommentCreate) SetNillablePicUrls ¶
func (cc *CommentCreate) SetNillablePicUrls(s *string) *CommentCreate
SetNillablePicUrls sets the "pic_urls" field if the given value is not nil.
func (*CommentCreate) SetNillableReplyContent ¶
func (cc *CommentCreate) SetNillableReplyContent(s *string) *CommentCreate
SetNillableReplyContent sets the "reply_content" field if the given value is not nil.
func (*CommentCreate) SetNillableReplyStatus ¶
func (cc *CommentCreate) SetNillableReplyStatus(b *bool) *CommentCreate
SetNillableReplyStatus sets the "reply_status" field if the given value is not nil.
func (*CommentCreate) SetNillableReplyTime ¶
func (cc *CommentCreate) SetNillableReplyTime(t *time.Time) *CommentCreate
SetNillableReplyTime sets the "reply_time" field if the given value is not nil.
func (*CommentCreate) SetNillableReplyUserID ¶
func (cc *CommentCreate) SetNillableReplyUserID(i *int) *CommentCreate
SetNillableReplyUserID sets the "reply_user_id" field if the given value is not nil.
func (*CommentCreate) SetNillableScores ¶
func (cc *CommentCreate) SetNillableScores(i *int8) *CommentCreate
SetNillableScores sets the "scores" field if the given value is not nil.
func (*CommentCreate) SetNillableSkuID ¶
func (cc *CommentCreate) SetNillableSkuID(u *uint64) *CommentCreate
SetNillableSkuID sets the "sku_id" field if the given value is not nil.
func (*CommentCreate) SetNillableSkusID ¶
func (cc *CommentCreate) SetNillableSkusID(id *uint64) *CommentCreate
SetNillableSkusID sets the "skus" edge to the Sku entity by ID if the given value is not nil.
func (*CommentCreate) SetNillableSpuID ¶
func (cc *CommentCreate) SetNillableSpuID(u *uint64) *CommentCreate
SetNillableSpuID sets the "spu_id" field if the given value is not nil.
func (*CommentCreate) SetNillableSpuName ¶
func (cc *CommentCreate) SetNillableSpuName(s *string) *CommentCreate
SetNillableSpuName sets the "spu_name" field if the given value is not nil.
func (*CommentCreate) SetNillableUpdatedAt ¶
func (cc *CommentCreate) SetNillableUpdatedAt(t *time.Time) *CommentCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*CommentCreate) SetNillableUserAvatar ¶
func (cc *CommentCreate) SetNillableUserAvatar(s *string) *CommentCreate
SetNillableUserAvatar sets the "user_avatar" field if the given value is not nil.
func (*CommentCreate) SetNillableUserID ¶
func (cc *CommentCreate) SetNillableUserID(u *uint64) *CommentCreate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*CommentCreate) SetNillableUserNickname ¶
func (cc *CommentCreate) SetNillableUserNickname(s *string) *CommentCreate
SetNillableUserNickname sets the "user_nickname" field if the given value is not nil.
func (*CommentCreate) SetNillableVisible ¶
func (cc *CommentCreate) SetNillableVisible(b *bool) *CommentCreate
SetNillableVisible sets the "visible" field if the given value is not nil.
func (*CommentCreate) SetNotNilAnonymous ¶
func (c *CommentCreate) SetNotNilAnonymous(value *bool) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilBenefitScores ¶
func (c *CommentCreate) SetNotNilBenefitScores(value *int8) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilContent ¶
func (c *CommentCreate) SetNotNilContent(value *string) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilDeletedAt ¶
func (c *CommentCreate) SetNotNilDeletedAt(value *time.Time) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilDescriptionScores ¶
func (c *CommentCreate) SetNotNilDescriptionScores(value *int8) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilOrderID ¶
func (c *CommentCreate) SetNotNilOrderID(value *uint64) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilOrderItemID ¶
func (c *CommentCreate) SetNotNilOrderItemID(value *uint64) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilPicUrls ¶
func (c *CommentCreate) SetNotNilPicUrls(value *string) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilReplyContent ¶
func (c *CommentCreate) SetNotNilReplyContent(value *string) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilReplyStatus ¶
func (c *CommentCreate) SetNotNilReplyStatus(value *bool) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilReplyTime ¶
func (c *CommentCreate) SetNotNilReplyTime(value *time.Time) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilReplyUserID ¶
func (c *CommentCreate) SetNotNilReplyUserID(value *int) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilScores ¶
func (c *CommentCreate) SetNotNilScores(value *int8) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilSkuID ¶
func (c *CommentCreate) SetNotNilSkuID(value *uint64) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilSkuPicURL ¶
func (c *CommentCreate) SetNotNilSkuPicURL(value *string) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilSkuProperties ¶
func (c *CommentCreate) SetNotNilSkuProperties(value *[]entType.SkuProperty) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilSpuID ¶
func (c *CommentCreate) SetNotNilSpuID(value *uint64) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilSpuName ¶
func (c *CommentCreate) SetNotNilSpuName(value *string) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilUpdatedAt ¶
func (c *CommentCreate) SetNotNilUpdatedAt(value *time.Time) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilUserAvatar ¶
func (c *CommentCreate) SetNotNilUserAvatar(value *string) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilUserID ¶
func (c *CommentCreate) SetNotNilUserID(value *uint64) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilUserNickname ¶
func (c *CommentCreate) SetNotNilUserNickname(value *string) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetNotNilVisible ¶
func (c *CommentCreate) SetNotNilVisible(value *bool) *CommentCreate
set field if value's pointer is not nil.
func (*CommentCreate) SetOrderID ¶
func (cc *CommentCreate) SetOrderID(u uint64) *CommentCreate
SetOrderID sets the "order_id" field.
func (*CommentCreate) SetOrderItemID ¶
func (cc *CommentCreate) SetOrderItemID(u uint64) *CommentCreate
SetOrderItemID sets the "order_item_id" field.
func (*CommentCreate) SetPicUrls ¶
func (cc *CommentCreate) SetPicUrls(s string) *CommentCreate
SetPicUrls sets the "pic_urls" field.
func (*CommentCreate) SetReplyContent ¶
func (cc *CommentCreate) SetReplyContent(s string) *CommentCreate
SetReplyContent sets the "reply_content" field.
func (*CommentCreate) SetReplyStatus ¶
func (cc *CommentCreate) SetReplyStatus(b bool) *CommentCreate
SetReplyStatus sets the "reply_status" field.
func (*CommentCreate) SetReplyTime ¶
func (cc *CommentCreate) SetReplyTime(t time.Time) *CommentCreate
SetReplyTime sets the "reply_time" field.
func (*CommentCreate) SetReplyUserID ¶
func (cc *CommentCreate) SetReplyUserID(i int) *CommentCreate
SetReplyUserID sets the "reply_user_id" field.
func (*CommentCreate) SetScores ¶
func (cc *CommentCreate) SetScores(i int8) *CommentCreate
SetScores sets the "scores" field.
func (*CommentCreate) SetSkuID ¶
func (cc *CommentCreate) SetSkuID(u uint64) *CommentCreate
SetSkuID sets the "sku_id" field.
func (*CommentCreate) SetSkuPicURL ¶
func (cc *CommentCreate) SetSkuPicURL(s string) *CommentCreate
SetSkuPicURL sets the "sku_pic_url" field.
func (*CommentCreate) SetSkuProperties ¶
func (cc *CommentCreate) SetSkuProperties(etp []entType.SkuProperty) *CommentCreate
SetSkuProperties sets the "sku_properties" field.
func (*CommentCreate) SetSkus ¶
func (cc *CommentCreate) SetSkus(s *Sku) *CommentCreate
SetSkus sets the "skus" edge to the Sku entity.
func (*CommentCreate) SetSkusID ¶
func (cc *CommentCreate) SetSkusID(id uint64) *CommentCreate
SetSkusID sets the "skus" edge to the Sku entity by ID.
func (*CommentCreate) SetSpuID ¶
func (cc *CommentCreate) SetSpuID(u uint64) *CommentCreate
SetSpuID sets the "spu_id" field.
func (*CommentCreate) SetSpuName ¶
func (cc *CommentCreate) SetSpuName(s string) *CommentCreate
SetSpuName sets the "spu_name" field.
func (*CommentCreate) SetUpdatedAt ¶
func (cc *CommentCreate) SetUpdatedAt(t time.Time) *CommentCreate
SetUpdatedAt sets the "updated_at" field.
func (*CommentCreate) SetUserAvatar ¶
func (cc *CommentCreate) SetUserAvatar(s string) *CommentCreate
SetUserAvatar sets the "user_avatar" field.
func (*CommentCreate) SetUserID ¶
func (cc *CommentCreate) SetUserID(u uint64) *CommentCreate
SetUserID sets the "user_id" field.
func (*CommentCreate) SetUserNickname ¶
func (cc *CommentCreate) SetUserNickname(s string) *CommentCreate
SetUserNickname sets the "user_nickname" field.
func (*CommentCreate) SetVisible ¶
func (cc *CommentCreate) SetVisible(b bool) *CommentCreate
SetVisible sets the "visible" field.
type CommentCreateBulk ¶
type CommentCreateBulk struct {
// contains filtered or unexported fields
}
CommentCreateBulk is the builder for creating many Comment entities in bulk.
func (*CommentCreateBulk) Exec ¶
func (ccb *CommentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CommentCreateBulk) ExecX ¶
func (ccb *CommentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CommentDelete ¶
type CommentDelete struct {
// contains filtered or unexported fields
}
CommentDelete is the builder for deleting a Comment entity.
func (*CommentDelete) Exec ¶
func (cd *CommentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CommentDelete) ExecX ¶
func (cd *CommentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CommentDelete) Where ¶
func (cd *CommentDelete) Where(ps ...predicate.Comment) *CommentDelete
Where appends a list predicates to the CommentDelete builder.
type CommentDeleteOne ¶
type CommentDeleteOne struct {
// contains filtered or unexported fields
}
CommentDeleteOne is the builder for deleting a single Comment entity.
func (*CommentDeleteOne) Exec ¶
func (cdo *CommentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CommentDeleteOne) ExecX ¶
func (cdo *CommentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CommentDeleteOne) Where ¶
func (cdo *CommentDeleteOne) Where(ps ...predicate.Comment) *CommentDeleteOne
Where appends a list predicates to the CommentDelete builder.
type CommentEdges ¶
type CommentEdges struct { // Skus holds the value of the skus edge. Skus *Sku `json:"skus,omitempty"` // contains filtered or unexported fields }
CommentEdges holds the relations/edges for other nodes in the graph.
func (CommentEdges) SkusOrErr ¶
func (e CommentEdges) SkusOrErr() (*Sku, error)
SkusOrErr returns the Skus value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type CommentGroupBy ¶
type CommentGroupBy struct {
// contains filtered or unexported fields
}
CommentGroupBy is the group-by builder for Comment entities.
func (*CommentGroupBy) Aggregate ¶
func (cgb *CommentGroupBy) Aggregate(fns ...AggregateFunc) *CommentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CommentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Scan ¶
func (cgb *CommentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CommentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CommentMutation ¶
type CommentMutation struct {
// contains filtered or unexported fields
}
CommentMutation represents an operation that mutates the Comment nodes in the graph.
func (*CommentMutation) AddBenefitScores ¶
func (m *CommentMutation) AddBenefitScores(i int8)
AddBenefitScores adds i to the "benefit_scores" field.
func (*CommentMutation) AddDescriptionScores ¶
func (m *CommentMutation) AddDescriptionScores(i int8)
AddDescriptionScores adds i to the "description_scores" field.
func (*CommentMutation) AddField ¶
func (m *CommentMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*CommentMutation) AddOrderID ¶
func (m *CommentMutation) AddOrderID(u int64)
AddOrderID adds u to the "order_id" field.
func (*CommentMutation) AddOrderItemID ¶
func (m *CommentMutation) AddOrderItemID(u int64)
AddOrderItemID adds u to the "order_item_id" field.
func (*CommentMutation) AddReplyUserID ¶
func (m *CommentMutation) AddReplyUserID(i int)
AddReplyUserID adds i to the "reply_user_id" field.
func (*CommentMutation) AddScores ¶
func (m *CommentMutation) AddScores(i int8)
AddScores adds i to the "scores" field.
func (*CommentMutation) AddSpuID ¶
func (m *CommentMutation) AddSpuID(u int64)
AddSpuID adds u to the "spu_id" field.
func (*CommentMutation) AddUserID ¶
func (m *CommentMutation) AddUserID(u int64)
AddUserID adds u to the "user_id" field.
func (*CommentMutation) AddedBenefitScores ¶
func (m *CommentMutation) AddedBenefitScores() (r int8, exists bool)
AddedBenefitScores returns the value that was added to the "benefit_scores" field in this mutation.
func (*CommentMutation) AddedDescriptionScores ¶
func (m *CommentMutation) AddedDescriptionScores() (r int8, exists bool)
AddedDescriptionScores returns the value that was added to the "description_scores" field in this mutation.
func (*CommentMutation) AddedEdges ¶
func (m *CommentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CommentMutation) AddedField ¶
func (m *CommentMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*CommentMutation) AddedFields ¶
func (m *CommentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CommentMutation) AddedIDs ¶
func (m *CommentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CommentMutation) AddedOrderID ¶
func (m *CommentMutation) AddedOrderID() (r int64, exists bool)
AddedOrderID returns the value that was added to the "order_id" field in this mutation.
func (*CommentMutation) AddedOrderItemID ¶
func (m *CommentMutation) AddedOrderItemID() (r int64, exists bool)
AddedOrderItemID returns the value that was added to the "order_item_id" field in this mutation.
func (*CommentMutation) AddedReplyUserID ¶
func (m *CommentMutation) AddedReplyUserID() (r int, exists bool)
AddedReplyUserID returns the value that was added to the "reply_user_id" field in this mutation.
func (*CommentMutation) AddedScores ¶
func (m *CommentMutation) AddedScores() (r int8, exists bool)
AddedScores returns the value that was added to the "scores" field in this mutation.
func (*CommentMutation) AddedSpuID ¶
func (m *CommentMutation) AddedSpuID() (r int64, exists bool)
AddedSpuID returns the value that was added to the "spu_id" field in this mutation.
func (*CommentMutation) AddedUserID ¶
func (m *CommentMutation) AddedUserID() (r int64, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*CommentMutation) Anonymous ¶
func (m *CommentMutation) Anonymous() (r bool, exists bool)
Anonymous returns the value of the "anonymous" field in the mutation.
func (*CommentMutation) AnonymousCleared ¶
func (m *CommentMutation) AnonymousCleared() bool
AnonymousCleared returns if the "anonymous" field was cleared in this mutation.
func (*CommentMutation) AppendSkuProperties ¶
func (m *CommentMutation) AppendSkuProperties(etp []entType.SkuProperty)
AppendSkuProperties adds etp to the "sku_properties" field.
func (*CommentMutation) AppendedSkuProperties ¶
func (m *CommentMutation) AppendedSkuProperties() ([]entType.SkuProperty, bool)
AppendedSkuProperties returns the list of values that were appended to the "sku_properties" field in this mutation.
func (*CommentMutation) BenefitScores ¶
func (m *CommentMutation) BenefitScores() (r int8, exists bool)
BenefitScores returns the value of the "benefit_scores" field in the mutation.
func (*CommentMutation) BenefitScoresCleared ¶
func (m *CommentMutation) BenefitScoresCleared() bool
BenefitScoresCleared returns if the "benefit_scores" field was cleared in this mutation.
func (*CommentMutation) ClearAnonymous ¶
func (m *CommentMutation) ClearAnonymous()
ClearAnonymous clears the value of the "anonymous" field.
func (*CommentMutation) ClearBenefitScores ¶
func (m *CommentMutation) ClearBenefitScores()
ClearBenefitScores clears the value of the "benefit_scores" field.
func (*CommentMutation) ClearContent ¶
func (m *CommentMutation) ClearContent()
ClearContent clears the value of the "content" field.
func (*CommentMutation) ClearDeletedAt ¶
func (m *CommentMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CommentMutation) ClearDescriptionScores ¶
func (m *CommentMutation) ClearDescriptionScores()
ClearDescriptionScores clears the value of the "description_scores" field.
func (*CommentMutation) ClearEdge ¶
func (m *CommentMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*CommentMutation) ClearField ¶
func (m *CommentMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*CommentMutation) ClearOrderID ¶
func (m *CommentMutation) ClearOrderID()
ClearOrderID clears the value of the "order_id" field.
func (*CommentMutation) ClearOrderItemID ¶
func (m *CommentMutation) ClearOrderItemID()
ClearOrderItemID clears the value of the "order_item_id" field.
func (*CommentMutation) ClearPicUrls ¶
func (m *CommentMutation) ClearPicUrls()
ClearPicUrls clears the value of the "pic_urls" field.
func (*CommentMutation) ClearReplyContent ¶
func (m *CommentMutation) ClearReplyContent()
ClearReplyContent clears the value of the "reply_content" field.
func (*CommentMutation) ClearReplyStatus ¶
func (m *CommentMutation) ClearReplyStatus()
ClearReplyStatus clears the value of the "reply_status" field.
func (*CommentMutation) ClearReplyTime ¶
func (m *CommentMutation) ClearReplyTime()
ClearReplyTime clears the value of the "reply_time" field.
func (*CommentMutation) ClearReplyUserID ¶
func (m *CommentMutation) ClearReplyUserID()
ClearReplyUserID clears the value of the "reply_user_id" field.
func (*CommentMutation) ClearScores ¶
func (m *CommentMutation) ClearScores()
ClearScores clears the value of the "scores" field.
func (*CommentMutation) ClearSkuID ¶
func (m *CommentMutation) ClearSkuID()
ClearSkuID clears the value of the "sku_id" field.
func (*CommentMutation) ClearSkuProperties ¶
func (m *CommentMutation) ClearSkuProperties()
ClearSkuProperties clears the value of the "sku_properties" field.
func (*CommentMutation) ClearSkus ¶
func (m *CommentMutation) ClearSkus()
ClearSkus clears the "skus" edge to the Sku entity.
func (*CommentMutation) ClearSpuID ¶
func (m *CommentMutation) ClearSpuID()
ClearSpuID clears the value of the "spu_id" field.
func (*CommentMutation) ClearSpuName ¶
func (m *CommentMutation) ClearSpuName()
ClearSpuName clears the value of the "spu_name" field.
func (*CommentMutation) ClearUserAvatar ¶
func (m *CommentMutation) ClearUserAvatar()
ClearUserAvatar clears the value of the "user_avatar" field.
func (*CommentMutation) ClearUserID ¶
func (m *CommentMutation) ClearUserID()
ClearUserID clears the value of the "user_id" field.
func (*CommentMutation) ClearUserNickname ¶
func (m *CommentMutation) ClearUserNickname()
ClearUserNickname clears the value of the "user_nickname" field.
func (*CommentMutation) ClearVisible ¶
func (m *CommentMutation) ClearVisible()
ClearVisible clears the value of the "visible" field.
func (*CommentMutation) ClearedEdges ¶
func (m *CommentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CommentMutation) ClearedFields ¶
func (m *CommentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CommentMutation) Client ¶
func (m CommentMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*CommentMutation) Content ¶
func (m *CommentMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*CommentMutation) ContentCleared ¶
func (m *CommentMutation) ContentCleared() bool
ContentCleared returns if the "content" field was cleared in this mutation.
func (*CommentMutation) CreatedAt ¶
func (m *CommentMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CommentMutation) DeletedAt ¶
func (m *CommentMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*CommentMutation) DeletedAtCleared ¶
func (m *CommentMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*CommentMutation) DescriptionScores ¶
func (m *CommentMutation) DescriptionScores() (r int8, exists bool)
DescriptionScores returns the value of the "description_scores" field in the mutation.
func (*CommentMutation) DescriptionScoresCleared ¶
func (m *CommentMutation) DescriptionScoresCleared() bool
DescriptionScoresCleared returns if the "description_scores" field was cleared in this mutation.
func (*CommentMutation) EdgeCleared ¶
func (m *CommentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CommentMutation) Field ¶
func (m *CommentMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*CommentMutation) FieldCleared ¶
func (m *CommentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CommentMutation) Fields ¶
func (m *CommentMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*CommentMutation) ID ¶
func (m *CommentMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CommentMutation) IDs ¶
func (m *CommentMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CommentMutation) OldAnonymous ¶
func (m *CommentMutation) OldAnonymous(ctx context.Context) (v bool, err error)
OldAnonymous returns the old "anonymous" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldBenefitScores ¶
func (m *CommentMutation) OldBenefitScores(ctx context.Context) (v int8, err error)
OldBenefitScores returns the old "benefit_scores" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldContent ¶
func (m *CommentMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldDescriptionScores ¶
func (m *CommentMutation) OldDescriptionScores(ctx context.Context) (v int8, err error)
OldDescriptionScores returns the old "description_scores" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*CommentMutation) OldOrderID ¶
func (m *CommentMutation) OldOrderID(ctx context.Context) (v uint64, err error)
OldOrderID returns the old "order_id" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldOrderItemID ¶
func (m *CommentMutation) OldOrderItemID(ctx context.Context) (v uint64, err error)
OldOrderItemID returns the old "order_item_id" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldPicUrls ¶
func (m *CommentMutation) OldPicUrls(ctx context.Context) (v string, err error)
OldPicUrls returns the old "pic_urls" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldReplyContent ¶
func (m *CommentMutation) OldReplyContent(ctx context.Context) (v string, err error)
OldReplyContent returns the old "reply_content" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldReplyStatus ¶
func (m *CommentMutation) OldReplyStatus(ctx context.Context) (v bool, err error)
OldReplyStatus returns the old "reply_status" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldReplyTime ¶
OldReplyTime returns the old "reply_time" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldReplyUserID ¶
func (m *CommentMutation) OldReplyUserID(ctx context.Context) (v int, err error)
OldReplyUserID returns the old "reply_user_id" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldScores ¶
func (m *CommentMutation) OldScores(ctx context.Context) (v int8, err error)
OldScores returns the old "scores" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldSkuID ¶
func (m *CommentMutation) OldSkuID(ctx context.Context) (v uint64, err error)
OldSkuID returns the old "sku_id" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldSkuPicURL ¶
func (m *CommentMutation) OldSkuPicURL(ctx context.Context) (v string, err error)
OldSkuPicURL returns the old "sku_pic_url" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldSkuProperties ¶
func (m *CommentMutation) OldSkuProperties(ctx context.Context) (v []entType.SkuProperty, err error)
OldSkuProperties returns the old "sku_properties" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldSpuID ¶
func (m *CommentMutation) OldSpuID(ctx context.Context) (v uint64, err error)
OldSpuID returns the old "spu_id" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldSpuName ¶
func (m *CommentMutation) OldSpuName(ctx context.Context) (v string, err error)
OldSpuName returns the old "spu_name" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldUserAvatar ¶
func (m *CommentMutation) OldUserAvatar(ctx context.Context) (v string, err error)
OldUserAvatar returns the old "user_avatar" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldUserID ¶
func (m *CommentMutation) OldUserID(ctx context.Context) (v uint64, err error)
OldUserID returns the old "user_id" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldUserNickname ¶
func (m *CommentMutation) OldUserNickname(ctx context.Context) (v string, err error)
OldUserNickname returns the old "user_nickname" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldVisible ¶
func (m *CommentMutation) OldVisible(ctx context.Context) (v bool, err error)
OldVisible returns the old "visible" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OrderID ¶
func (m *CommentMutation) OrderID() (r uint64, exists bool)
OrderID returns the value of the "order_id" field in the mutation.
func (*CommentMutation) OrderIDCleared ¶
func (m *CommentMutation) OrderIDCleared() bool
OrderIDCleared returns if the "order_id" field was cleared in this mutation.
func (*CommentMutation) OrderItemID ¶
func (m *CommentMutation) OrderItemID() (r uint64, exists bool)
OrderItemID returns the value of the "order_item_id" field in the mutation.
func (*CommentMutation) OrderItemIDCleared ¶
func (m *CommentMutation) OrderItemIDCleared() bool
OrderItemIDCleared returns if the "order_item_id" field was cleared in this mutation.
func (*CommentMutation) PicUrls ¶
func (m *CommentMutation) PicUrls() (r string, exists bool)
PicUrls returns the value of the "pic_urls" field in the mutation.
func (*CommentMutation) PicUrlsCleared ¶
func (m *CommentMutation) PicUrlsCleared() bool
PicUrlsCleared returns if the "pic_urls" field was cleared in this mutation.
func (*CommentMutation) RemovedEdges ¶
func (m *CommentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CommentMutation) RemovedIDs ¶
func (m *CommentMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*CommentMutation) ReplyContent ¶
func (m *CommentMutation) ReplyContent() (r string, exists bool)
ReplyContent returns the value of the "reply_content" field in the mutation.
func (*CommentMutation) ReplyContentCleared ¶
func (m *CommentMutation) ReplyContentCleared() bool
ReplyContentCleared returns if the "reply_content" field was cleared in this mutation.
func (*CommentMutation) ReplyStatus ¶
func (m *CommentMutation) ReplyStatus() (r bool, exists bool)
ReplyStatus returns the value of the "reply_status" field in the mutation.
func (*CommentMutation) ReplyStatusCleared ¶
func (m *CommentMutation) ReplyStatusCleared() bool
ReplyStatusCleared returns if the "reply_status" field was cleared in this mutation.
func (*CommentMutation) ReplyTime ¶
func (m *CommentMutation) ReplyTime() (r time.Time, exists bool)
ReplyTime returns the value of the "reply_time" field in the mutation.
func (*CommentMutation) ReplyTimeCleared ¶
func (m *CommentMutation) ReplyTimeCleared() bool
ReplyTimeCleared returns if the "reply_time" field was cleared in this mutation.
func (*CommentMutation) ReplyUserID ¶
func (m *CommentMutation) ReplyUserID() (r int, exists bool)
ReplyUserID returns the value of the "reply_user_id" field in the mutation.
func (*CommentMutation) ReplyUserIDCleared ¶
func (m *CommentMutation) ReplyUserIDCleared() bool
ReplyUserIDCleared returns if the "reply_user_id" field was cleared in this mutation.
func (*CommentMutation) ResetAnonymous ¶
func (m *CommentMutation) ResetAnonymous()
ResetAnonymous resets all changes to the "anonymous" field.
func (*CommentMutation) ResetBenefitScores ¶
func (m *CommentMutation) ResetBenefitScores()
ResetBenefitScores resets all changes to the "benefit_scores" field.
func (*CommentMutation) ResetContent ¶
func (m *CommentMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*CommentMutation) ResetCreatedAt ¶
func (m *CommentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CommentMutation) ResetDeletedAt ¶
func (m *CommentMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*CommentMutation) ResetDescriptionScores ¶
func (m *CommentMutation) ResetDescriptionScores()
ResetDescriptionScores resets all changes to the "description_scores" field.
func (*CommentMutation) ResetEdge ¶
func (m *CommentMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*CommentMutation) ResetField ¶
func (m *CommentMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*CommentMutation) ResetOrderID ¶
func (m *CommentMutation) ResetOrderID()
ResetOrderID resets all changes to the "order_id" field.
func (*CommentMutation) ResetOrderItemID ¶
func (m *CommentMutation) ResetOrderItemID()
ResetOrderItemID resets all changes to the "order_item_id" field.
func (*CommentMutation) ResetPicUrls ¶
func (m *CommentMutation) ResetPicUrls()
ResetPicUrls resets all changes to the "pic_urls" field.
func (*CommentMutation) ResetReplyContent ¶
func (m *CommentMutation) ResetReplyContent()
ResetReplyContent resets all changes to the "reply_content" field.
func (*CommentMutation) ResetReplyStatus ¶
func (m *CommentMutation) ResetReplyStatus()
ResetReplyStatus resets all changes to the "reply_status" field.
func (*CommentMutation) ResetReplyTime ¶
func (m *CommentMutation) ResetReplyTime()
ResetReplyTime resets all changes to the "reply_time" field.
func (*CommentMutation) ResetReplyUserID ¶
func (m *CommentMutation) ResetReplyUserID()
ResetReplyUserID resets all changes to the "reply_user_id" field.
func (*CommentMutation) ResetScores ¶
func (m *CommentMutation) ResetScores()
ResetScores resets all changes to the "scores" field.
func (*CommentMutation) ResetSkuID ¶
func (m *CommentMutation) ResetSkuID()
ResetSkuID resets all changes to the "sku_id" field.
func (*CommentMutation) ResetSkuPicURL ¶
func (m *CommentMutation) ResetSkuPicURL()
ResetSkuPicURL resets all changes to the "sku_pic_url" field.
func (*CommentMutation) ResetSkuProperties ¶
func (m *CommentMutation) ResetSkuProperties()
ResetSkuProperties resets all changes to the "sku_properties" field.
func (*CommentMutation) ResetSkus ¶
func (m *CommentMutation) ResetSkus()
ResetSkus resets all changes to the "skus" edge.
func (*CommentMutation) ResetSpuID ¶
func (m *CommentMutation) ResetSpuID()
ResetSpuID resets all changes to the "spu_id" field.
func (*CommentMutation) ResetSpuName ¶
func (m *CommentMutation) ResetSpuName()
ResetSpuName resets all changes to the "spu_name" field.
func (*CommentMutation) ResetUpdatedAt ¶
func (m *CommentMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CommentMutation) ResetUserAvatar ¶
func (m *CommentMutation) ResetUserAvatar()
ResetUserAvatar resets all changes to the "user_avatar" field.
func (*CommentMutation) ResetUserID ¶
func (m *CommentMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*CommentMutation) ResetUserNickname ¶
func (m *CommentMutation) ResetUserNickname()
ResetUserNickname resets all changes to the "user_nickname" field.
func (*CommentMutation) ResetVisible ¶
func (m *CommentMutation) ResetVisible()
ResetVisible resets all changes to the "visible" field.
func (*CommentMutation) Scores ¶
func (m *CommentMutation) Scores() (r int8, exists bool)
Scores returns the value of the "scores" field in the mutation.
func (*CommentMutation) ScoresCleared ¶
func (m *CommentMutation) ScoresCleared() bool
ScoresCleared returns if the "scores" field was cleared in this mutation.
func (*CommentMutation) SetAnonymous ¶
func (m *CommentMutation) SetAnonymous(b bool)
SetAnonymous sets the "anonymous" field.
func (*CommentMutation) SetBenefitScores ¶
func (m *CommentMutation) SetBenefitScores(i int8)
SetBenefitScores sets the "benefit_scores" field.
func (*CommentMutation) SetContent ¶
func (m *CommentMutation) SetContent(s string)
SetContent sets the "content" field.
func (*CommentMutation) SetCreatedAt ¶
func (m *CommentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CommentMutation) SetDeletedAt ¶
func (m *CommentMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*CommentMutation) SetDescriptionScores ¶
func (m *CommentMutation) SetDescriptionScores(i int8)
SetDescriptionScores sets the "description_scores" field.
func (*CommentMutation) SetField ¶
func (m *CommentMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*CommentMutation) SetID ¶
func (m *CommentMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Comment entities.
func (*CommentMutation) SetOp ¶
func (m *CommentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CommentMutation) SetOrderID ¶
func (m *CommentMutation) SetOrderID(u uint64)
SetOrderID sets the "order_id" field.
func (*CommentMutation) SetOrderItemID ¶
func (m *CommentMutation) SetOrderItemID(u uint64)
SetOrderItemID sets the "order_item_id" field.
func (*CommentMutation) SetPicUrls ¶
func (m *CommentMutation) SetPicUrls(s string)
SetPicUrls sets the "pic_urls" field.
func (*CommentMutation) SetReplyContent ¶
func (m *CommentMutation) SetReplyContent(s string)
SetReplyContent sets the "reply_content" field.
func (*CommentMutation) SetReplyStatus ¶
func (m *CommentMutation) SetReplyStatus(b bool)
SetReplyStatus sets the "reply_status" field.
func (*CommentMutation) SetReplyTime ¶
func (m *CommentMutation) SetReplyTime(t time.Time)
SetReplyTime sets the "reply_time" field.
func (*CommentMutation) SetReplyUserID ¶
func (m *CommentMutation) SetReplyUserID(i int)
SetReplyUserID sets the "reply_user_id" field.
func (*CommentMutation) SetScores ¶
func (m *CommentMutation) SetScores(i int8)
SetScores sets the "scores" field.
func (*CommentMutation) SetSkuID ¶
func (m *CommentMutation) SetSkuID(u uint64)
SetSkuID sets the "sku_id" field.
func (*CommentMutation) SetSkuPicURL ¶
func (m *CommentMutation) SetSkuPicURL(s string)
SetSkuPicURL sets the "sku_pic_url" field.
func (*CommentMutation) SetSkuProperties ¶
func (m *CommentMutation) SetSkuProperties(etp []entType.SkuProperty)
SetSkuProperties sets the "sku_properties" field.
func (*CommentMutation) SetSkusID ¶
func (m *CommentMutation) SetSkusID(id uint64)
SetSkusID sets the "skus" edge to the Sku entity by id.
func (*CommentMutation) SetSpuID ¶
func (m *CommentMutation) SetSpuID(u uint64)
SetSpuID sets the "spu_id" field.
func (*CommentMutation) SetSpuName ¶
func (m *CommentMutation) SetSpuName(s string)
SetSpuName sets the "spu_name" field.
func (*CommentMutation) SetUpdatedAt ¶
func (m *CommentMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*CommentMutation) SetUserAvatar ¶
func (m *CommentMutation) SetUserAvatar(s string)
SetUserAvatar sets the "user_avatar" field.
func (*CommentMutation) SetUserID ¶
func (m *CommentMutation) SetUserID(u uint64)
SetUserID sets the "user_id" field.
func (*CommentMutation) SetUserNickname ¶
func (m *CommentMutation) SetUserNickname(s string)
SetUserNickname sets the "user_nickname" field.
func (*CommentMutation) SetVisible ¶
func (m *CommentMutation) SetVisible(b bool)
SetVisible sets the "visible" field.
func (*CommentMutation) SkuID ¶
func (m *CommentMutation) SkuID() (r uint64, exists bool)
SkuID returns the value of the "sku_id" field in the mutation.
func (*CommentMutation) SkuIDCleared ¶
func (m *CommentMutation) SkuIDCleared() bool
SkuIDCleared returns if the "sku_id" field was cleared in this mutation.
func (*CommentMutation) SkuPicURL ¶
func (m *CommentMutation) SkuPicURL() (r string, exists bool)
SkuPicURL returns the value of the "sku_pic_url" field in the mutation.
func (*CommentMutation) SkuProperties ¶
func (m *CommentMutation) SkuProperties() (r []entType.SkuProperty, exists bool)
SkuProperties returns the value of the "sku_properties" field in the mutation.
func (*CommentMutation) SkuPropertiesCleared ¶
func (m *CommentMutation) SkuPropertiesCleared() bool
SkuPropertiesCleared returns if the "sku_properties" field was cleared in this mutation.
func (*CommentMutation) SkusCleared ¶
func (m *CommentMutation) SkusCleared() bool
SkusCleared reports if the "skus" edge to the Sku entity was cleared.
func (*CommentMutation) SkusID ¶
func (m *CommentMutation) SkusID() (id uint64, exists bool)
SkusID returns the "skus" edge ID in the mutation.
func (*CommentMutation) SkusIDs ¶
func (m *CommentMutation) SkusIDs() (ids []uint64)
SkusIDs returns the "skus" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SkusID instead. It exists only for internal usage by the builders.
func (*CommentMutation) SpuID ¶
func (m *CommentMutation) SpuID() (r uint64, exists bool)
SpuID returns the value of the "spu_id" field in the mutation.
func (*CommentMutation) SpuIDCleared ¶
func (m *CommentMutation) SpuIDCleared() bool
SpuIDCleared returns if the "spu_id" field was cleared in this mutation.
func (*CommentMutation) SpuName ¶
func (m *CommentMutation) SpuName() (r string, exists bool)
SpuName returns the value of the "spu_name" field in the mutation.
func (*CommentMutation) SpuNameCleared ¶
func (m *CommentMutation) SpuNameCleared() bool
SpuNameCleared returns if the "spu_name" field was cleared in this mutation.
func (CommentMutation) Tx ¶
func (m CommentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CommentMutation) Type ¶
func (m *CommentMutation) Type() string
Type returns the node type of this mutation (Comment).
func (*CommentMutation) UpdatedAt ¶
func (m *CommentMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CommentMutation) UserAvatar ¶
func (m *CommentMutation) UserAvatar() (r string, exists bool)
UserAvatar returns the value of the "user_avatar" field in the mutation.
func (*CommentMutation) UserAvatarCleared ¶
func (m *CommentMutation) UserAvatarCleared() bool
UserAvatarCleared returns if the "user_avatar" field was cleared in this mutation.
func (*CommentMutation) UserID ¶
func (m *CommentMutation) UserID() (r uint64, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*CommentMutation) UserIDCleared ¶
func (m *CommentMutation) UserIDCleared() bool
UserIDCleared returns if the "user_id" field was cleared in this mutation.
func (*CommentMutation) UserNickname ¶
func (m *CommentMutation) UserNickname() (r string, exists bool)
UserNickname returns the value of the "user_nickname" field in the mutation.
func (*CommentMutation) UserNicknameCleared ¶
func (m *CommentMutation) UserNicknameCleared() bool
UserNicknameCleared returns if the "user_nickname" field was cleared in this mutation.
func (*CommentMutation) Visible ¶
func (m *CommentMutation) Visible() (r bool, exists bool)
Visible returns the value of the "visible" field in the mutation.
func (*CommentMutation) VisibleCleared ¶
func (m *CommentMutation) VisibleCleared() bool
VisibleCleared returns if the "visible" field was cleared in this mutation.
func (*CommentMutation) Where ¶
func (m *CommentMutation) Where(ps ...predicate.Comment)
Where appends a list predicates to the CommentMutation builder.
func (*CommentMutation) WhereP ¶
func (m *CommentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CommentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CommentPageList ¶
type CommentPageList struct { List []*Comment `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
CommentPageList is Comment PageList result.
type CommentPager ¶
type CommentPager struct { Order comment.OrderOption Filter func(*CommentQuery) (*CommentQuery, error) }
func (*CommentPager) ApplyFilter ¶
func (p *CommentPager) ApplyFilter(query *CommentQuery) (*CommentQuery, error)
type CommentPaginateOption ¶
type CommentPaginateOption func(*CommentPager)
CommentPaginateOption enables pagination customization.
type CommentQuery ¶
type CommentQuery struct {
// contains filtered or unexported fields
}
CommentQuery is the builder for querying Comment entities.
func (*CommentQuery) Aggregate ¶
func (cq *CommentQuery) Aggregate(fns ...AggregateFunc) *CommentSelect
Aggregate returns a CommentSelect configured with the given aggregations.
func (*CommentQuery) All ¶
func (cq *CommentQuery) All(ctx context.Context) ([]*Comment, error)
All executes the query and returns a list of Comments.
func (*CommentQuery) AllX ¶
func (cq *CommentQuery) AllX(ctx context.Context) []*Comment
AllX is like All, but panics if an error occurs.
func (*CommentQuery) Clone ¶
func (cq *CommentQuery) Clone() *CommentQuery
Clone returns a duplicate of the CommentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CommentQuery) Count ¶
func (cq *CommentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CommentQuery) CountX ¶
func (cq *CommentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CommentQuery) Exist ¶
func (cq *CommentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CommentQuery) ExistX ¶
func (cq *CommentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CommentQuery) First ¶
func (cq *CommentQuery) First(ctx context.Context) (*Comment, error)
First returns the first Comment entity from the query. Returns a *NotFoundError when no Comment was found.
func (*CommentQuery) FirstID ¶
func (cq *CommentQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Comment ID from the query. Returns a *NotFoundError when no Comment ID was found.
func (*CommentQuery) FirstIDX ¶
func (cq *CommentQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*CommentQuery) FirstX ¶
func (cq *CommentQuery) FirstX(ctx context.Context) *Comment
FirstX is like First, but panics if an error occurs.
func (*CommentQuery) GroupBy ¶
func (cq *CommentQuery) GroupBy(field string, fields ...string) *CommentGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Comment.Query(). GroupBy(comment.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CommentQuery) IDs ¶
func (cq *CommentQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Comment IDs.
func (*CommentQuery) IDsX ¶
func (cq *CommentQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*CommentQuery) Limit ¶
func (cq *CommentQuery) Limit(limit int) *CommentQuery
Limit the number of records to be returned by this query.
func (*CommentQuery) Offset ¶
func (cq *CommentQuery) Offset(offset int) *CommentQuery
Offset to start from.
func (*CommentQuery) Only ¶
func (cq *CommentQuery) Only(ctx context.Context) (*Comment, error)
Only returns a single Comment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Comment entity is found. Returns a *NotFoundError when no Comment entities are found.
func (*CommentQuery) OnlyID ¶
func (cq *CommentQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Comment ID in the query. Returns a *NotSingularError when more than one Comment ID is found. Returns a *NotFoundError when no entities are found.
func (*CommentQuery) OnlyIDX ¶
func (cq *CommentQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CommentQuery) OnlyX ¶
func (cq *CommentQuery) OnlyX(ctx context.Context) *Comment
OnlyX is like Only, but panics if an error occurs.
func (*CommentQuery) Order ¶
func (cq *CommentQuery) Order(o ...comment.OrderOption) *CommentQuery
Order specifies how the records should be ordered.
func (*CommentQuery) Page ¶
func (c *CommentQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...CommentPaginateOption, ) (*CommentPageList, error)
func (*CommentQuery) QuerySkus ¶
func (cq *CommentQuery) QuerySkus() *SkuQuery
QuerySkus chains the current query on the "skus" edge.
func (*CommentQuery) Select ¶
func (cq *CommentQuery) Select(fields ...string) *CommentSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Comment.Query(). Select(comment.FieldCreatedAt). Scan(ctx, &v)
func (*CommentQuery) Unique ¶
func (cq *CommentQuery) Unique(unique bool) *CommentQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*CommentQuery) Where ¶
func (cq *CommentQuery) Where(ps ...predicate.Comment) *CommentQuery
Where adds a new predicate for the CommentQuery builder.
func (*CommentQuery) WithSkus ¶
func (cq *CommentQuery) WithSkus(opts ...func(*SkuQuery)) *CommentQuery
WithSkus tells the query-builder to eager-load the nodes that are connected to the "skus" edge. The optional arguments are used to configure the query builder of the edge.
type CommentSelect ¶
type CommentSelect struct { *CommentQuery // contains filtered or unexported fields }
CommentSelect is the builder for selecting fields of Comment entities.
func (*CommentSelect) Aggregate ¶
func (cs *CommentSelect) Aggregate(fns ...AggregateFunc) *CommentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CommentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Scan ¶
func (cs *CommentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CommentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CommentUpdate ¶
type CommentUpdate struct {
// contains filtered or unexported fields
}
CommentUpdate is the builder for updating Comment entities.
func (*CommentUpdate) AddBenefitScores ¶
func (cu *CommentUpdate) AddBenefitScores(i int8) *CommentUpdate
AddBenefitScores adds i to the "benefit_scores" field.
func (*CommentUpdate) AddDescriptionScores ¶
func (cu *CommentUpdate) AddDescriptionScores(i int8) *CommentUpdate
AddDescriptionScores adds i to the "description_scores" field.
func (*CommentUpdate) AddOrderID ¶
func (cu *CommentUpdate) AddOrderID(u int64) *CommentUpdate
AddOrderID adds u to the "order_id" field.
func (*CommentUpdate) AddOrderItemID ¶
func (cu *CommentUpdate) AddOrderItemID(u int64) *CommentUpdate
AddOrderItemID adds u to the "order_item_id" field.
func (*CommentUpdate) AddReplyUserID ¶
func (cu *CommentUpdate) AddReplyUserID(i int) *CommentUpdate
AddReplyUserID adds i to the "reply_user_id" field.
func (*CommentUpdate) AddScores ¶
func (cu *CommentUpdate) AddScores(i int8) *CommentUpdate
AddScores adds i to the "scores" field.
func (*CommentUpdate) AddSpuID ¶
func (cu *CommentUpdate) AddSpuID(u int64) *CommentUpdate
AddSpuID adds u to the "spu_id" field.
func (*CommentUpdate) AddUserID ¶
func (cu *CommentUpdate) AddUserID(u int64) *CommentUpdate
AddUserID adds u to the "user_id" field.
func (*CommentUpdate) AppendSkuProperties ¶
func (cu *CommentUpdate) AppendSkuProperties(etp []entType.SkuProperty) *CommentUpdate
AppendSkuProperties appends etp to the "sku_properties" field.
func (*CommentUpdate) ClearAnonymous ¶
func (cu *CommentUpdate) ClearAnonymous() *CommentUpdate
ClearAnonymous clears the value of the "anonymous" field.
func (*CommentUpdate) ClearBenefitScores ¶
func (cu *CommentUpdate) ClearBenefitScores() *CommentUpdate
ClearBenefitScores clears the value of the "benefit_scores" field.
func (*CommentUpdate) ClearContent ¶
func (cu *CommentUpdate) ClearContent() *CommentUpdate
ClearContent clears the value of the "content" field.
func (*CommentUpdate) ClearDeletedAt ¶
func (cu *CommentUpdate) ClearDeletedAt() *CommentUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CommentUpdate) ClearDescriptionScores ¶
func (cu *CommentUpdate) ClearDescriptionScores() *CommentUpdate
ClearDescriptionScores clears the value of the "description_scores" field.
func (*CommentUpdate) ClearOrderID ¶
func (cu *CommentUpdate) ClearOrderID() *CommentUpdate
ClearOrderID clears the value of the "order_id" field.
func (*CommentUpdate) ClearOrderItemID ¶
func (cu *CommentUpdate) ClearOrderItemID() *CommentUpdate
ClearOrderItemID clears the value of the "order_item_id" field.
func (*CommentUpdate) ClearPicUrls ¶
func (cu *CommentUpdate) ClearPicUrls() *CommentUpdate
ClearPicUrls clears the value of the "pic_urls" field.
func (*CommentUpdate) ClearReplyContent ¶
func (cu *CommentUpdate) ClearReplyContent() *CommentUpdate
ClearReplyContent clears the value of the "reply_content" field.
func (*CommentUpdate) ClearReplyStatus ¶
func (cu *CommentUpdate) ClearReplyStatus() *CommentUpdate
ClearReplyStatus clears the value of the "reply_status" field.
func (*CommentUpdate) ClearReplyTime ¶
func (cu *CommentUpdate) ClearReplyTime() *CommentUpdate
ClearReplyTime clears the value of the "reply_time" field.
func (*CommentUpdate) ClearReplyUserID ¶
func (cu *CommentUpdate) ClearReplyUserID() *CommentUpdate
ClearReplyUserID clears the value of the "reply_user_id" field.
func (*CommentUpdate) ClearScores ¶
func (cu *CommentUpdate) ClearScores() *CommentUpdate
ClearScores clears the value of the "scores" field.
func (*CommentUpdate) ClearSkuID ¶
func (cu *CommentUpdate) ClearSkuID() *CommentUpdate
ClearSkuID clears the value of the "sku_id" field.
func (*CommentUpdate) ClearSkuProperties ¶
func (cu *CommentUpdate) ClearSkuProperties() *CommentUpdate
ClearSkuProperties clears the value of the "sku_properties" field.
func (*CommentUpdate) ClearSkus ¶
func (cu *CommentUpdate) ClearSkus() *CommentUpdate
ClearSkus clears the "skus" edge to the Sku entity.
func (*CommentUpdate) ClearSpuID ¶
func (cu *CommentUpdate) ClearSpuID() *CommentUpdate
ClearSpuID clears the value of the "spu_id" field.
func (*CommentUpdate) ClearSpuName ¶
func (cu *CommentUpdate) ClearSpuName() *CommentUpdate
ClearSpuName clears the value of the "spu_name" field.
func (*CommentUpdate) ClearUserAvatar ¶
func (cu *CommentUpdate) ClearUserAvatar() *CommentUpdate
ClearUserAvatar clears the value of the "user_avatar" field.
func (*CommentUpdate) ClearUserID ¶
func (cu *CommentUpdate) ClearUserID() *CommentUpdate
ClearUserID clears the value of the "user_id" field.
func (*CommentUpdate) ClearUserNickname ¶
func (cu *CommentUpdate) ClearUserNickname() *CommentUpdate
ClearUserNickname clears the value of the "user_nickname" field.
func (*CommentUpdate) ClearVisible ¶
func (cu *CommentUpdate) ClearVisible() *CommentUpdate
ClearVisible clears the value of the "visible" field.
func (*CommentUpdate) Exec ¶
func (cu *CommentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CommentUpdate) ExecX ¶
func (cu *CommentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CommentUpdate) Mutation ¶
func (cu *CommentUpdate) Mutation() *CommentMutation
Mutation returns the CommentMutation object of the builder.
func (*CommentUpdate) Save ¶
func (cu *CommentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CommentUpdate) SaveX ¶
func (cu *CommentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CommentUpdate) SetAnonymous ¶
func (cu *CommentUpdate) SetAnonymous(b bool) *CommentUpdate
SetAnonymous sets the "anonymous" field.
func (*CommentUpdate) SetBenefitScores ¶
func (cu *CommentUpdate) SetBenefitScores(i int8) *CommentUpdate
SetBenefitScores sets the "benefit_scores" field.
func (*CommentUpdate) SetContent ¶
func (cu *CommentUpdate) SetContent(s string) *CommentUpdate
SetContent sets the "content" field.
func (*CommentUpdate) SetDeletedAt ¶
func (cu *CommentUpdate) SetDeletedAt(t time.Time) *CommentUpdate
SetDeletedAt sets the "deleted_at" field.
func (*CommentUpdate) SetDescriptionScores ¶
func (cu *CommentUpdate) SetDescriptionScores(i int8) *CommentUpdate
SetDescriptionScores sets the "description_scores" field.
func (*CommentUpdate) SetNillableAnonymous ¶
func (cu *CommentUpdate) SetNillableAnonymous(b *bool) *CommentUpdate
SetNillableAnonymous sets the "anonymous" field if the given value is not nil.
func (*CommentUpdate) SetNillableBenefitScores ¶
func (cu *CommentUpdate) SetNillableBenefitScores(i *int8) *CommentUpdate
SetNillableBenefitScores sets the "benefit_scores" field if the given value is not nil.
func (*CommentUpdate) SetNillableContent ¶
func (cu *CommentUpdate) SetNillableContent(s *string) *CommentUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*CommentUpdate) SetNillableDeletedAt ¶
func (cu *CommentUpdate) SetNillableDeletedAt(t *time.Time) *CommentUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CommentUpdate) SetNillableDescriptionScores ¶
func (cu *CommentUpdate) SetNillableDescriptionScores(i *int8) *CommentUpdate
SetNillableDescriptionScores sets the "description_scores" field if the given value is not nil.
func (*CommentUpdate) SetNillableOrderID ¶
func (cu *CommentUpdate) SetNillableOrderID(u *uint64) *CommentUpdate
SetNillableOrderID sets the "order_id" field if the given value is not nil.
func (*CommentUpdate) SetNillableOrderItemID ¶
func (cu *CommentUpdate) SetNillableOrderItemID(u *uint64) *CommentUpdate
SetNillableOrderItemID sets the "order_item_id" field if the given value is not nil.
func (*CommentUpdate) SetNillablePicUrls ¶
func (cu *CommentUpdate) SetNillablePicUrls(s *string) *CommentUpdate
SetNillablePicUrls sets the "pic_urls" field if the given value is not nil.
func (*CommentUpdate) SetNillableReplyContent ¶
func (cu *CommentUpdate) SetNillableReplyContent(s *string) *CommentUpdate
SetNillableReplyContent sets the "reply_content" field if the given value is not nil.
func (*CommentUpdate) SetNillableReplyStatus ¶
func (cu *CommentUpdate) SetNillableReplyStatus(b *bool) *CommentUpdate
SetNillableReplyStatus sets the "reply_status" field if the given value is not nil.
func (*CommentUpdate) SetNillableReplyTime ¶
func (cu *CommentUpdate) SetNillableReplyTime(t *time.Time) *CommentUpdate
SetNillableReplyTime sets the "reply_time" field if the given value is not nil.
func (*CommentUpdate) SetNillableReplyUserID ¶
func (cu *CommentUpdate) SetNillableReplyUserID(i *int) *CommentUpdate
SetNillableReplyUserID sets the "reply_user_id" field if the given value is not nil.
func (*CommentUpdate) SetNillableScores ¶
func (cu *CommentUpdate) SetNillableScores(i *int8) *CommentUpdate
SetNillableScores sets the "scores" field if the given value is not nil.
func (*CommentUpdate) SetNillableSkuID ¶
func (cu *CommentUpdate) SetNillableSkuID(u *uint64) *CommentUpdate
SetNillableSkuID sets the "sku_id" field if the given value is not nil.
func (*CommentUpdate) SetNillableSkusID ¶
func (cu *CommentUpdate) SetNillableSkusID(id *uint64) *CommentUpdate
SetNillableSkusID sets the "skus" edge to the Sku entity by ID if the given value is not nil.
func (*CommentUpdate) SetNillableSpuID ¶
func (cu *CommentUpdate) SetNillableSpuID(u *uint64) *CommentUpdate
SetNillableSpuID sets the "spu_id" field if the given value is not nil.
func (*CommentUpdate) SetNillableSpuName ¶
func (cu *CommentUpdate) SetNillableSpuName(s *string) *CommentUpdate
SetNillableSpuName sets the "spu_name" field if the given value is not nil.
func (*CommentUpdate) SetNillableUserAvatar ¶
func (cu *CommentUpdate) SetNillableUserAvatar(s *string) *CommentUpdate
SetNillableUserAvatar sets the "user_avatar" field if the given value is not nil.
func (*CommentUpdate) SetNillableUserID ¶
func (cu *CommentUpdate) SetNillableUserID(u *uint64) *CommentUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*CommentUpdate) SetNillableUserNickname ¶
func (cu *CommentUpdate) SetNillableUserNickname(s *string) *CommentUpdate
SetNillableUserNickname sets the "user_nickname" field if the given value is not nil.
func (*CommentUpdate) SetNillableVisible ¶
func (cu *CommentUpdate) SetNillableVisible(b *bool) *CommentUpdate
SetNillableVisible sets the "visible" field if the given value is not nil.
func (*CommentUpdate) SetNotNilAnonymous ¶
func (c *CommentUpdate) SetNotNilAnonymous(value *bool) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilBenefitScores ¶
func (c *CommentUpdate) SetNotNilBenefitScores(value *int8) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilContent ¶
func (c *CommentUpdate) SetNotNilContent(value *string) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilDeletedAt ¶
func (c *CommentUpdate) SetNotNilDeletedAt(value *time.Time) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilDescriptionScores ¶
func (c *CommentUpdate) SetNotNilDescriptionScores(value *int8) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilOrderID ¶
func (c *CommentUpdate) SetNotNilOrderID(value *uint64) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilOrderItemID ¶
func (c *CommentUpdate) SetNotNilOrderItemID(value *uint64) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilPicUrls ¶
func (c *CommentUpdate) SetNotNilPicUrls(value *string) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilReplyContent ¶
func (c *CommentUpdate) SetNotNilReplyContent(value *string) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilReplyStatus ¶
func (c *CommentUpdate) SetNotNilReplyStatus(value *bool) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilReplyTime ¶
func (c *CommentUpdate) SetNotNilReplyTime(value *time.Time) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilReplyUserID ¶
func (c *CommentUpdate) SetNotNilReplyUserID(value *int) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilScores ¶
func (c *CommentUpdate) SetNotNilScores(value *int8) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilSkuID ¶
func (c *CommentUpdate) SetNotNilSkuID(value *uint64) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilSkuPicURL ¶
func (c *CommentUpdate) SetNotNilSkuPicURL(value *string) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilSkuProperties ¶
func (c *CommentUpdate) SetNotNilSkuProperties(value *[]entType.SkuProperty) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilSpuID ¶
func (c *CommentUpdate) SetNotNilSpuID(value *uint64) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilSpuName ¶
func (c *CommentUpdate) SetNotNilSpuName(value *string) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilUpdatedAt ¶
func (c *CommentUpdate) SetNotNilUpdatedAt(value *time.Time) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilUserAvatar ¶
func (c *CommentUpdate) SetNotNilUserAvatar(value *string) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilUserID ¶
func (c *CommentUpdate) SetNotNilUserID(value *uint64) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilUserNickname ¶
func (c *CommentUpdate) SetNotNilUserNickname(value *string) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetNotNilVisible ¶
func (c *CommentUpdate) SetNotNilVisible(value *bool) *CommentUpdate
set field if value's pointer is not nil.
func (*CommentUpdate) SetOrderID ¶
func (cu *CommentUpdate) SetOrderID(u uint64) *CommentUpdate
SetOrderID sets the "order_id" field.
func (*CommentUpdate) SetOrderItemID ¶
func (cu *CommentUpdate) SetOrderItemID(u uint64) *CommentUpdate
SetOrderItemID sets the "order_item_id" field.
func (*CommentUpdate) SetPicUrls ¶
func (cu *CommentUpdate) SetPicUrls(s string) *CommentUpdate
SetPicUrls sets the "pic_urls" field.
func (*CommentUpdate) SetReplyContent ¶
func (cu *CommentUpdate) SetReplyContent(s string) *CommentUpdate
SetReplyContent sets the "reply_content" field.
func (*CommentUpdate) SetReplyStatus ¶
func (cu *CommentUpdate) SetReplyStatus(b bool) *CommentUpdate
SetReplyStatus sets the "reply_status" field.
func (*CommentUpdate) SetReplyTime ¶
func (cu *CommentUpdate) SetReplyTime(t time.Time) *CommentUpdate
SetReplyTime sets the "reply_time" field.
func (*CommentUpdate) SetReplyUserID ¶
func (cu *CommentUpdate) SetReplyUserID(i int) *CommentUpdate
SetReplyUserID sets the "reply_user_id" field.
func (*CommentUpdate) SetScores ¶
func (cu *CommentUpdate) SetScores(i int8) *CommentUpdate
SetScores sets the "scores" field.
func (*CommentUpdate) SetSkuID ¶
func (cu *CommentUpdate) SetSkuID(u uint64) *CommentUpdate
SetSkuID sets the "sku_id" field.
func (*CommentUpdate) SetSkuPicURL ¶
func (cu *CommentUpdate) SetSkuPicURL(s string) *CommentUpdate
SetSkuPicURL sets the "sku_pic_url" field.
func (*CommentUpdate) SetSkuProperties ¶
func (cu *CommentUpdate) SetSkuProperties(etp []entType.SkuProperty) *CommentUpdate
SetSkuProperties sets the "sku_properties" field.
func (*CommentUpdate) SetSkus ¶
func (cu *CommentUpdate) SetSkus(s *Sku) *CommentUpdate
SetSkus sets the "skus" edge to the Sku entity.
func (*CommentUpdate) SetSkusID ¶
func (cu *CommentUpdate) SetSkusID(id uint64) *CommentUpdate
SetSkusID sets the "skus" edge to the Sku entity by ID.
func (*CommentUpdate) SetSpuID ¶
func (cu *CommentUpdate) SetSpuID(u uint64) *CommentUpdate
SetSpuID sets the "spu_id" field.
func (*CommentUpdate) SetSpuName ¶
func (cu *CommentUpdate) SetSpuName(s string) *CommentUpdate
SetSpuName sets the "spu_name" field.
func (*CommentUpdate) SetUpdatedAt ¶
func (cu *CommentUpdate) SetUpdatedAt(t time.Time) *CommentUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CommentUpdate) SetUserAvatar ¶
func (cu *CommentUpdate) SetUserAvatar(s string) *CommentUpdate
SetUserAvatar sets the "user_avatar" field.
func (*CommentUpdate) SetUserID ¶
func (cu *CommentUpdate) SetUserID(u uint64) *CommentUpdate
SetUserID sets the "user_id" field.
func (*CommentUpdate) SetUserNickname ¶
func (cu *CommentUpdate) SetUserNickname(s string) *CommentUpdate
SetUserNickname sets the "user_nickname" field.
func (*CommentUpdate) SetVisible ¶
func (cu *CommentUpdate) SetVisible(b bool) *CommentUpdate
SetVisible sets the "visible" field.
func (*CommentUpdate) Where ¶
func (cu *CommentUpdate) Where(ps ...predicate.Comment) *CommentUpdate
Where appends a list predicates to the CommentUpdate builder.
type CommentUpdateOne ¶
type CommentUpdateOne struct {
// contains filtered or unexported fields
}
CommentUpdateOne is the builder for updating a single Comment entity.
func (*CommentUpdateOne) AddBenefitScores ¶
func (cuo *CommentUpdateOne) AddBenefitScores(i int8) *CommentUpdateOne
AddBenefitScores adds i to the "benefit_scores" field.
func (*CommentUpdateOne) AddDescriptionScores ¶
func (cuo *CommentUpdateOne) AddDescriptionScores(i int8) *CommentUpdateOne
AddDescriptionScores adds i to the "description_scores" field.
func (*CommentUpdateOne) AddOrderID ¶
func (cuo *CommentUpdateOne) AddOrderID(u int64) *CommentUpdateOne
AddOrderID adds u to the "order_id" field.
func (*CommentUpdateOne) AddOrderItemID ¶
func (cuo *CommentUpdateOne) AddOrderItemID(u int64) *CommentUpdateOne
AddOrderItemID adds u to the "order_item_id" field.
func (*CommentUpdateOne) AddReplyUserID ¶
func (cuo *CommentUpdateOne) AddReplyUserID(i int) *CommentUpdateOne
AddReplyUserID adds i to the "reply_user_id" field.
func (*CommentUpdateOne) AddScores ¶
func (cuo *CommentUpdateOne) AddScores(i int8) *CommentUpdateOne
AddScores adds i to the "scores" field.
func (*CommentUpdateOne) AddSpuID ¶
func (cuo *CommentUpdateOne) AddSpuID(u int64) *CommentUpdateOne
AddSpuID adds u to the "spu_id" field.
func (*CommentUpdateOne) AddUserID ¶
func (cuo *CommentUpdateOne) AddUserID(u int64) *CommentUpdateOne
AddUserID adds u to the "user_id" field.
func (*CommentUpdateOne) AppendSkuProperties ¶
func (cuo *CommentUpdateOne) AppendSkuProperties(etp []entType.SkuProperty) *CommentUpdateOne
AppendSkuProperties appends etp to the "sku_properties" field.
func (*CommentUpdateOne) ClearAnonymous ¶
func (cuo *CommentUpdateOne) ClearAnonymous() *CommentUpdateOne
ClearAnonymous clears the value of the "anonymous" field.
func (*CommentUpdateOne) ClearBenefitScores ¶
func (cuo *CommentUpdateOne) ClearBenefitScores() *CommentUpdateOne
ClearBenefitScores clears the value of the "benefit_scores" field.
func (*CommentUpdateOne) ClearContent ¶
func (cuo *CommentUpdateOne) ClearContent() *CommentUpdateOne
ClearContent clears the value of the "content" field.
func (*CommentUpdateOne) ClearDeletedAt ¶
func (cuo *CommentUpdateOne) ClearDeletedAt() *CommentUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CommentUpdateOne) ClearDescriptionScores ¶
func (cuo *CommentUpdateOne) ClearDescriptionScores() *CommentUpdateOne
ClearDescriptionScores clears the value of the "description_scores" field.
func (*CommentUpdateOne) ClearOrderID ¶
func (cuo *CommentUpdateOne) ClearOrderID() *CommentUpdateOne
ClearOrderID clears the value of the "order_id" field.
func (*CommentUpdateOne) ClearOrderItemID ¶
func (cuo *CommentUpdateOne) ClearOrderItemID() *CommentUpdateOne
ClearOrderItemID clears the value of the "order_item_id" field.
func (*CommentUpdateOne) ClearPicUrls ¶
func (cuo *CommentUpdateOne) ClearPicUrls() *CommentUpdateOne
ClearPicUrls clears the value of the "pic_urls" field.
func (*CommentUpdateOne) ClearReplyContent ¶
func (cuo *CommentUpdateOne) ClearReplyContent() *CommentUpdateOne
ClearReplyContent clears the value of the "reply_content" field.
func (*CommentUpdateOne) ClearReplyStatus ¶
func (cuo *CommentUpdateOne) ClearReplyStatus() *CommentUpdateOne
ClearReplyStatus clears the value of the "reply_status" field.
func (*CommentUpdateOne) ClearReplyTime ¶
func (cuo *CommentUpdateOne) ClearReplyTime() *CommentUpdateOne
ClearReplyTime clears the value of the "reply_time" field.
func (*CommentUpdateOne) ClearReplyUserID ¶
func (cuo *CommentUpdateOne) ClearReplyUserID() *CommentUpdateOne
ClearReplyUserID clears the value of the "reply_user_id" field.
func (*CommentUpdateOne) ClearScores ¶
func (cuo *CommentUpdateOne) ClearScores() *CommentUpdateOne
ClearScores clears the value of the "scores" field.
func (*CommentUpdateOne) ClearSkuID ¶
func (cuo *CommentUpdateOne) ClearSkuID() *CommentUpdateOne
ClearSkuID clears the value of the "sku_id" field.
func (*CommentUpdateOne) ClearSkuProperties ¶
func (cuo *CommentUpdateOne) ClearSkuProperties() *CommentUpdateOne
ClearSkuProperties clears the value of the "sku_properties" field.
func (*CommentUpdateOne) ClearSkus ¶
func (cuo *CommentUpdateOne) ClearSkus() *CommentUpdateOne
ClearSkus clears the "skus" edge to the Sku entity.
func (*CommentUpdateOne) ClearSpuID ¶
func (cuo *CommentUpdateOne) ClearSpuID() *CommentUpdateOne
ClearSpuID clears the value of the "spu_id" field.
func (*CommentUpdateOne) ClearSpuName ¶
func (cuo *CommentUpdateOne) ClearSpuName() *CommentUpdateOne
ClearSpuName clears the value of the "spu_name" field.
func (*CommentUpdateOne) ClearUserAvatar ¶
func (cuo *CommentUpdateOne) ClearUserAvatar() *CommentUpdateOne
ClearUserAvatar clears the value of the "user_avatar" field.
func (*CommentUpdateOne) ClearUserID ¶
func (cuo *CommentUpdateOne) ClearUserID() *CommentUpdateOne
ClearUserID clears the value of the "user_id" field.
func (*CommentUpdateOne) ClearUserNickname ¶
func (cuo *CommentUpdateOne) ClearUserNickname() *CommentUpdateOne
ClearUserNickname clears the value of the "user_nickname" field.
func (*CommentUpdateOne) ClearVisible ¶
func (cuo *CommentUpdateOne) ClearVisible() *CommentUpdateOne
ClearVisible clears the value of the "visible" field.
func (*CommentUpdateOne) Exec ¶
func (cuo *CommentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CommentUpdateOne) ExecX ¶
func (cuo *CommentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CommentUpdateOne) Mutation ¶
func (cuo *CommentUpdateOne) Mutation() *CommentMutation
Mutation returns the CommentMutation object of the builder.
func (*CommentUpdateOne) Save ¶
func (cuo *CommentUpdateOne) Save(ctx context.Context) (*Comment, error)
Save executes the query and returns the updated Comment entity.
func (*CommentUpdateOne) SaveX ¶
func (cuo *CommentUpdateOne) SaveX(ctx context.Context) *Comment
SaveX is like Save, but panics if an error occurs.
func (*CommentUpdateOne) Select ¶
func (cuo *CommentUpdateOne) Select(field string, fields ...string) *CommentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CommentUpdateOne) SetAnonymous ¶
func (cuo *CommentUpdateOne) SetAnonymous(b bool) *CommentUpdateOne
SetAnonymous sets the "anonymous" field.
func (*CommentUpdateOne) SetBenefitScores ¶
func (cuo *CommentUpdateOne) SetBenefitScores(i int8) *CommentUpdateOne
SetBenefitScores sets the "benefit_scores" field.
func (*CommentUpdateOne) SetContent ¶
func (cuo *CommentUpdateOne) SetContent(s string) *CommentUpdateOne
SetContent sets the "content" field.
func (*CommentUpdateOne) SetDeletedAt ¶
func (cuo *CommentUpdateOne) SetDeletedAt(t time.Time) *CommentUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*CommentUpdateOne) SetDescriptionScores ¶
func (cuo *CommentUpdateOne) SetDescriptionScores(i int8) *CommentUpdateOne
SetDescriptionScores sets the "description_scores" field.
func (*CommentUpdateOne) SetNillableAnonymous ¶
func (cuo *CommentUpdateOne) SetNillableAnonymous(b *bool) *CommentUpdateOne
SetNillableAnonymous sets the "anonymous" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableBenefitScores ¶
func (cuo *CommentUpdateOne) SetNillableBenefitScores(i *int8) *CommentUpdateOne
SetNillableBenefitScores sets the "benefit_scores" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableContent ¶
func (cuo *CommentUpdateOne) SetNillableContent(s *string) *CommentUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableDeletedAt ¶
func (cuo *CommentUpdateOne) SetNillableDeletedAt(t *time.Time) *CommentUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableDescriptionScores ¶
func (cuo *CommentUpdateOne) SetNillableDescriptionScores(i *int8) *CommentUpdateOne
SetNillableDescriptionScores sets the "description_scores" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableOrderID ¶
func (cuo *CommentUpdateOne) SetNillableOrderID(u *uint64) *CommentUpdateOne
SetNillableOrderID sets the "order_id" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableOrderItemID ¶
func (cuo *CommentUpdateOne) SetNillableOrderItemID(u *uint64) *CommentUpdateOne
SetNillableOrderItemID sets the "order_item_id" field if the given value is not nil.
func (*CommentUpdateOne) SetNillablePicUrls ¶
func (cuo *CommentUpdateOne) SetNillablePicUrls(s *string) *CommentUpdateOne
SetNillablePicUrls sets the "pic_urls" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableReplyContent ¶
func (cuo *CommentUpdateOne) SetNillableReplyContent(s *string) *CommentUpdateOne
SetNillableReplyContent sets the "reply_content" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableReplyStatus ¶
func (cuo *CommentUpdateOne) SetNillableReplyStatus(b *bool) *CommentUpdateOne
SetNillableReplyStatus sets the "reply_status" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableReplyTime ¶
func (cuo *CommentUpdateOne) SetNillableReplyTime(t *time.Time) *CommentUpdateOne
SetNillableReplyTime sets the "reply_time" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableReplyUserID ¶
func (cuo *CommentUpdateOne) SetNillableReplyUserID(i *int) *CommentUpdateOne
SetNillableReplyUserID sets the "reply_user_id" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableScores ¶
func (cuo *CommentUpdateOne) SetNillableScores(i *int8) *CommentUpdateOne
SetNillableScores sets the "scores" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableSkuID ¶
func (cuo *CommentUpdateOne) SetNillableSkuID(u *uint64) *CommentUpdateOne
SetNillableSkuID sets the "sku_id" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableSkusID ¶
func (cuo *CommentUpdateOne) SetNillableSkusID(id *uint64) *CommentUpdateOne
SetNillableSkusID sets the "skus" edge to the Sku entity by ID if the given value is not nil.
func (*CommentUpdateOne) SetNillableSpuID ¶
func (cuo *CommentUpdateOne) SetNillableSpuID(u *uint64) *CommentUpdateOne
SetNillableSpuID sets the "spu_id" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableSpuName ¶
func (cuo *CommentUpdateOne) SetNillableSpuName(s *string) *CommentUpdateOne
SetNillableSpuName sets the "spu_name" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableUserAvatar ¶
func (cuo *CommentUpdateOne) SetNillableUserAvatar(s *string) *CommentUpdateOne
SetNillableUserAvatar sets the "user_avatar" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableUserID ¶
func (cuo *CommentUpdateOne) SetNillableUserID(u *uint64) *CommentUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableUserNickname ¶
func (cuo *CommentUpdateOne) SetNillableUserNickname(s *string) *CommentUpdateOne
SetNillableUserNickname sets the "user_nickname" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableVisible ¶
func (cuo *CommentUpdateOne) SetNillableVisible(b *bool) *CommentUpdateOne
SetNillableVisible sets the "visible" field if the given value is not nil.
func (*CommentUpdateOne) SetNotNilAnonymous ¶
func (c *CommentUpdateOne) SetNotNilAnonymous(value *bool) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilBenefitScores ¶
func (c *CommentUpdateOne) SetNotNilBenefitScores(value *int8) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilContent ¶
func (c *CommentUpdateOne) SetNotNilContent(value *string) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilDeletedAt ¶
func (c *CommentUpdateOne) SetNotNilDeletedAt(value *time.Time) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilDescriptionScores ¶
func (c *CommentUpdateOne) SetNotNilDescriptionScores(value *int8) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilOrderID ¶
func (c *CommentUpdateOne) SetNotNilOrderID(value *uint64) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilOrderItemID ¶
func (c *CommentUpdateOne) SetNotNilOrderItemID(value *uint64) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilPicUrls ¶
func (c *CommentUpdateOne) SetNotNilPicUrls(value *string) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilReplyContent ¶
func (c *CommentUpdateOne) SetNotNilReplyContent(value *string) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilReplyStatus ¶
func (c *CommentUpdateOne) SetNotNilReplyStatus(value *bool) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilReplyTime ¶
func (c *CommentUpdateOne) SetNotNilReplyTime(value *time.Time) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilReplyUserID ¶
func (c *CommentUpdateOne) SetNotNilReplyUserID(value *int) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilScores ¶
func (c *CommentUpdateOne) SetNotNilScores(value *int8) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilSkuID ¶
func (c *CommentUpdateOne) SetNotNilSkuID(value *uint64) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilSkuPicURL ¶
func (c *CommentUpdateOne) SetNotNilSkuPicURL(value *string) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilSkuProperties ¶
func (c *CommentUpdateOne) SetNotNilSkuProperties(value *[]entType.SkuProperty) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilSpuID ¶
func (c *CommentUpdateOne) SetNotNilSpuID(value *uint64) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilSpuName ¶
func (c *CommentUpdateOne) SetNotNilSpuName(value *string) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilUpdatedAt ¶
func (c *CommentUpdateOne) SetNotNilUpdatedAt(value *time.Time) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilUserAvatar ¶
func (c *CommentUpdateOne) SetNotNilUserAvatar(value *string) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilUserID ¶
func (c *CommentUpdateOne) SetNotNilUserID(value *uint64) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilUserNickname ¶
func (c *CommentUpdateOne) SetNotNilUserNickname(value *string) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetNotNilVisible ¶
func (c *CommentUpdateOne) SetNotNilVisible(value *bool) *CommentUpdateOne
set field if value's pointer is not nil.
func (*CommentUpdateOne) SetOrderID ¶
func (cuo *CommentUpdateOne) SetOrderID(u uint64) *CommentUpdateOne
SetOrderID sets the "order_id" field.
func (*CommentUpdateOne) SetOrderItemID ¶
func (cuo *CommentUpdateOne) SetOrderItemID(u uint64) *CommentUpdateOne
SetOrderItemID sets the "order_item_id" field.
func (*CommentUpdateOne) SetPicUrls ¶
func (cuo *CommentUpdateOne) SetPicUrls(s string) *CommentUpdateOne
SetPicUrls sets the "pic_urls" field.
func (*CommentUpdateOne) SetReplyContent ¶
func (cuo *CommentUpdateOne) SetReplyContent(s string) *CommentUpdateOne
SetReplyContent sets the "reply_content" field.
func (*CommentUpdateOne) SetReplyStatus ¶
func (cuo *CommentUpdateOne) SetReplyStatus(b bool) *CommentUpdateOne
SetReplyStatus sets the "reply_status" field.
func (*CommentUpdateOne) SetReplyTime ¶
func (cuo *CommentUpdateOne) SetReplyTime(t time.Time) *CommentUpdateOne
SetReplyTime sets the "reply_time" field.
func (*CommentUpdateOne) SetReplyUserID ¶
func (cuo *CommentUpdateOne) SetReplyUserID(i int) *CommentUpdateOne
SetReplyUserID sets the "reply_user_id" field.
func (*CommentUpdateOne) SetScores ¶
func (cuo *CommentUpdateOne) SetScores(i int8) *CommentUpdateOne
SetScores sets the "scores" field.
func (*CommentUpdateOne) SetSkuID ¶
func (cuo *CommentUpdateOne) SetSkuID(u uint64) *CommentUpdateOne
SetSkuID sets the "sku_id" field.
func (*CommentUpdateOne) SetSkuPicURL ¶
func (cuo *CommentUpdateOne) SetSkuPicURL(s string) *CommentUpdateOne
SetSkuPicURL sets the "sku_pic_url" field.
func (*CommentUpdateOne) SetSkuProperties ¶
func (cuo *CommentUpdateOne) SetSkuProperties(etp []entType.SkuProperty) *CommentUpdateOne
SetSkuProperties sets the "sku_properties" field.
func (*CommentUpdateOne) SetSkus ¶
func (cuo *CommentUpdateOne) SetSkus(s *Sku) *CommentUpdateOne
SetSkus sets the "skus" edge to the Sku entity.
func (*CommentUpdateOne) SetSkusID ¶
func (cuo *CommentUpdateOne) SetSkusID(id uint64) *CommentUpdateOne
SetSkusID sets the "skus" edge to the Sku entity by ID.
func (*CommentUpdateOne) SetSpuID ¶
func (cuo *CommentUpdateOne) SetSpuID(u uint64) *CommentUpdateOne
SetSpuID sets the "spu_id" field.
func (*CommentUpdateOne) SetSpuName ¶
func (cuo *CommentUpdateOne) SetSpuName(s string) *CommentUpdateOne
SetSpuName sets the "spu_name" field.
func (*CommentUpdateOne) SetUpdatedAt ¶
func (cuo *CommentUpdateOne) SetUpdatedAt(t time.Time) *CommentUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*CommentUpdateOne) SetUserAvatar ¶
func (cuo *CommentUpdateOne) SetUserAvatar(s string) *CommentUpdateOne
SetUserAvatar sets the "user_avatar" field.
func (*CommentUpdateOne) SetUserID ¶
func (cuo *CommentUpdateOne) SetUserID(u uint64) *CommentUpdateOne
SetUserID sets the "user_id" field.
func (*CommentUpdateOne) SetUserNickname ¶
func (cuo *CommentUpdateOne) SetUserNickname(s string) *CommentUpdateOne
SetUserNickname sets the "user_nickname" field.
func (*CommentUpdateOne) SetVisible ¶
func (cuo *CommentUpdateOne) SetVisible(b bool) *CommentUpdateOne
SetVisible sets the "visible" field.
func (*CommentUpdateOne) Where ¶
func (cuo *CommentUpdateOne) Where(ps ...predicate.Comment) *CommentUpdateOne
Where appends a list predicates to the CommentUpdate builder.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderDirection ¶
type OrderDirection string
OrderDirection defines the directions in which to order a list of items.
const ( // OrderDirectionAsc specifies an ascending order. OrderDirectionAsc OrderDirection = "ASC" // OrderDirectionDesc specifies a descending order. OrderDirectionDesc OrderDirection = "DESC" )
func (OrderDirection) String ¶
func (o OrderDirection) String() string
String implements fmt.Stringer interface.
func (OrderDirection) Validate ¶
func (o OrderDirection) Validate() error
Validate the order direction value.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type PageDetails ¶
type Property ¶
type Property struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1: normal 2: ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // Delete Time | 删除日期 DeletedAt time.Time `json:"deleted_at,omitempty"` // 名称 Name string `json:"name,omitempty"` // 备注 Remark string `json:"remark,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PropertyQuery when eager-loading is set. Edges PropertyEdges `json:"edges"` // contains filtered or unexported fields }
Property is the model entity for the Property schema.
func (*Property) QueryPropertyValues ¶
func (pr *Property) QueryPropertyValues() *PropertyValueQuery
QueryPropertyValues queries the "property_values" edge of the Property entity.
func (*Property) Unwrap ¶
Unwrap unwraps the Property entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Property) Update ¶
func (pr *Property) Update() *PropertyUpdateOne
Update returns a builder for updating this Property. Note that you need to call Property.Unwrap() before calling this method if this Property was returned from a transaction, and the transaction was committed or rolled back.
type PropertyClient ¶
type PropertyClient struct {
// contains filtered or unexported fields
}
PropertyClient is a client for the Property schema.
func NewPropertyClient ¶
func NewPropertyClient(c config) *PropertyClient
NewPropertyClient returns a client for the Property from the given config.
func (*PropertyClient) Create ¶
func (c *PropertyClient) Create() *PropertyCreate
Create returns a builder for creating a Property entity.
func (*PropertyClient) CreateBulk ¶
func (c *PropertyClient) CreateBulk(builders ...*PropertyCreate) *PropertyCreateBulk
CreateBulk returns a builder for creating a bulk of Property entities.
func (*PropertyClient) Delete ¶
func (c *PropertyClient) Delete() *PropertyDelete
Delete returns a delete builder for Property.
func (*PropertyClient) DeleteOne ¶
func (c *PropertyClient) DeleteOne(pr *Property) *PropertyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PropertyClient) DeleteOneID ¶
func (c *PropertyClient) DeleteOneID(id uint64) *PropertyDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PropertyClient) GetX ¶
func (c *PropertyClient) GetX(ctx context.Context, id uint64) *Property
GetX is like Get, but panics if an error occurs.
func (*PropertyClient) Hooks ¶
func (c *PropertyClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PropertyClient) Intercept ¶
func (c *PropertyClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `property.Intercept(f(g(h())))`.
func (*PropertyClient) Interceptors ¶
func (c *PropertyClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PropertyClient) MapCreateBulk ¶
func (c *PropertyClient) MapCreateBulk(slice any, setFunc func(*PropertyCreate, int)) *PropertyCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PropertyClient) Query ¶
func (c *PropertyClient) Query() *PropertyQuery
Query returns a query builder for Property.
func (*PropertyClient) QueryPropertyValues ¶
func (c *PropertyClient) QueryPropertyValues(pr *Property) *PropertyValueQuery
QueryPropertyValues queries the property_values edge of a Property.
func (*PropertyClient) Update ¶
func (c *PropertyClient) Update() *PropertyUpdate
Update returns an update builder for Property.
func (*PropertyClient) UpdateOne ¶
func (c *PropertyClient) UpdateOne(pr *Property) *PropertyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PropertyClient) UpdateOneID ¶
func (c *PropertyClient) UpdateOneID(id uint64) *PropertyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PropertyClient) Use ¶
func (c *PropertyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `property.Hooks(f(g(h())))`.
type PropertyCreate ¶
type PropertyCreate struct {
// contains filtered or unexported fields
}
PropertyCreate is the builder for creating a Property entity.
func (*PropertyCreate) AddPropertyValueIDs ¶
func (pc *PropertyCreate) AddPropertyValueIDs(ids ...uint64) *PropertyCreate
AddPropertyValueIDs adds the "property_values" edge to the PropertyValue entity by IDs.
func (*PropertyCreate) AddPropertyValues ¶
func (pc *PropertyCreate) AddPropertyValues(p ...*PropertyValue) *PropertyCreate
AddPropertyValues adds the "property_values" edges to the PropertyValue entity.
func (*PropertyCreate) Exec ¶
func (pc *PropertyCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PropertyCreate) ExecX ¶
func (pc *PropertyCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PropertyCreate) Mutation ¶
func (pc *PropertyCreate) Mutation() *PropertyMutation
Mutation returns the PropertyMutation object of the builder.
func (*PropertyCreate) Save ¶
func (pc *PropertyCreate) Save(ctx context.Context) (*Property, error)
Save creates the Property in the database.
func (*PropertyCreate) SaveX ¶
func (pc *PropertyCreate) SaveX(ctx context.Context) *Property
SaveX calls Save and panics if Save returns an error.
func (*PropertyCreate) SetCreatedAt ¶
func (pc *PropertyCreate) SetCreatedAt(t time.Time) *PropertyCreate
SetCreatedAt sets the "created_at" field.
func (*PropertyCreate) SetDeletedAt ¶
func (pc *PropertyCreate) SetDeletedAt(t time.Time) *PropertyCreate
SetDeletedAt sets the "deleted_at" field.
func (*PropertyCreate) SetID ¶
func (pc *PropertyCreate) SetID(u uint64) *PropertyCreate
SetID sets the "id" field.
func (*PropertyCreate) SetName ¶
func (pc *PropertyCreate) SetName(s string) *PropertyCreate
SetName sets the "name" field.
func (*PropertyCreate) SetNillableCreatedAt ¶
func (pc *PropertyCreate) SetNillableCreatedAt(t *time.Time) *PropertyCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PropertyCreate) SetNillableDeletedAt ¶
func (pc *PropertyCreate) SetNillableDeletedAt(t *time.Time) *PropertyCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PropertyCreate) SetNillableName ¶
func (pc *PropertyCreate) SetNillableName(s *string) *PropertyCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*PropertyCreate) SetNillableRemark ¶
func (pc *PropertyCreate) SetNillableRemark(s *string) *PropertyCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*PropertyCreate) SetNillableStatus ¶
func (pc *PropertyCreate) SetNillableStatus(u *uint8) *PropertyCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PropertyCreate) SetNillableUpdatedAt ¶
func (pc *PropertyCreate) SetNillableUpdatedAt(t *time.Time) *PropertyCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PropertyCreate) SetNotNilDeletedAt ¶
func (pr *PropertyCreate) SetNotNilDeletedAt(value *time.Time) *PropertyCreate
set field if value's pointer is not nil.
func (*PropertyCreate) SetNotNilName ¶
func (pr *PropertyCreate) SetNotNilName(value *string) *PropertyCreate
set field if value's pointer is not nil.
func (*PropertyCreate) SetNotNilRemark ¶
func (pr *PropertyCreate) SetNotNilRemark(value *string) *PropertyCreate
set field if value's pointer is not nil.
func (*PropertyCreate) SetNotNilStatus ¶
func (pr *PropertyCreate) SetNotNilStatus(value *uint8) *PropertyCreate
set field if value's pointer is not nil.
func (*PropertyCreate) SetNotNilUpdatedAt ¶
func (pr *PropertyCreate) SetNotNilUpdatedAt(value *time.Time) *PropertyCreate
set field if value's pointer is not nil.
func (*PropertyCreate) SetRemark ¶
func (pc *PropertyCreate) SetRemark(s string) *PropertyCreate
SetRemark sets the "remark" field.
func (*PropertyCreate) SetStatus ¶
func (pc *PropertyCreate) SetStatus(u uint8) *PropertyCreate
SetStatus sets the "status" field.
func (*PropertyCreate) SetUpdatedAt ¶
func (pc *PropertyCreate) SetUpdatedAt(t time.Time) *PropertyCreate
SetUpdatedAt sets the "updated_at" field.
type PropertyCreateBulk ¶
type PropertyCreateBulk struct {
// contains filtered or unexported fields
}
PropertyCreateBulk is the builder for creating many Property entities in bulk.
func (*PropertyCreateBulk) Exec ¶
func (pcb *PropertyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PropertyCreateBulk) ExecX ¶
func (pcb *PropertyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PropertyDelete ¶
type PropertyDelete struct {
// contains filtered or unexported fields
}
PropertyDelete is the builder for deleting a Property entity.
func (*PropertyDelete) Exec ¶
func (pd *PropertyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PropertyDelete) ExecX ¶
func (pd *PropertyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PropertyDelete) Where ¶
func (pd *PropertyDelete) Where(ps ...predicate.Property) *PropertyDelete
Where appends a list predicates to the PropertyDelete builder.
type PropertyDeleteOne ¶
type PropertyDeleteOne struct {
// contains filtered or unexported fields
}
PropertyDeleteOne is the builder for deleting a single Property entity.
func (*PropertyDeleteOne) Exec ¶
func (pdo *PropertyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PropertyDeleteOne) ExecX ¶
func (pdo *PropertyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PropertyDeleteOne) Where ¶
func (pdo *PropertyDeleteOne) Where(ps ...predicate.Property) *PropertyDeleteOne
Where appends a list predicates to the PropertyDelete builder.
type PropertyEdges ¶
type PropertyEdges struct { // PropertyValues holds the value of the property_values edge. PropertyValues []*PropertyValue `json:"property_values,omitempty"` // contains filtered or unexported fields }
PropertyEdges holds the relations/edges for other nodes in the graph.
func (PropertyEdges) PropertyValuesOrErr ¶
func (e PropertyEdges) PropertyValuesOrErr() ([]*PropertyValue, error)
PropertyValuesOrErr returns the PropertyValues value or an error if the edge was not loaded in eager-loading.
type PropertyGroupBy ¶
type PropertyGroupBy struct {
// contains filtered or unexported fields
}
PropertyGroupBy is the group-by builder for Property entities.
func (*PropertyGroupBy) Aggregate ¶
func (pgb *PropertyGroupBy) Aggregate(fns ...AggregateFunc) *PropertyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PropertyGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PropertyGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PropertyGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PropertyGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PropertyGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PropertyGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PropertyGroupBy) Scan ¶
func (pgb *PropertyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PropertyGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PropertyMutation ¶
type PropertyMutation struct {
// contains filtered or unexported fields
}
PropertyMutation represents an operation that mutates the Property nodes in the graph.
func (*PropertyMutation) AddField ¶
func (m *PropertyMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PropertyMutation) AddPropertyValueIDs ¶
func (m *PropertyMutation) AddPropertyValueIDs(ids ...uint64)
AddPropertyValueIDs adds the "property_values" edge to the PropertyValue entity by ids.
func (*PropertyMutation) AddStatus ¶
func (m *PropertyMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*PropertyMutation) AddedEdges ¶
func (m *PropertyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PropertyMutation) AddedField ¶
func (m *PropertyMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PropertyMutation) AddedFields ¶
func (m *PropertyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PropertyMutation) AddedIDs ¶
func (m *PropertyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PropertyMutation) AddedStatus ¶
func (m *PropertyMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*PropertyMutation) ClearDeletedAt ¶
func (m *PropertyMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PropertyMutation) ClearEdge ¶
func (m *PropertyMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*PropertyMutation) ClearField ¶
func (m *PropertyMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*PropertyMutation) ClearName ¶
func (m *PropertyMutation) ClearName()
ClearName clears the value of the "name" field.
func (*PropertyMutation) ClearPropertyValues ¶
func (m *PropertyMutation) ClearPropertyValues()
ClearPropertyValues clears the "property_values" edge to the PropertyValue entity.
func (*PropertyMutation) ClearRemark ¶
func (m *PropertyMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*PropertyMutation) ClearStatus ¶
func (m *PropertyMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*PropertyMutation) ClearedEdges ¶
func (m *PropertyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PropertyMutation) ClearedFields ¶
func (m *PropertyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PropertyMutation) Client ¶
func (m PropertyMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*PropertyMutation) CreatedAt ¶
func (m *PropertyMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PropertyMutation) DeletedAt ¶
func (m *PropertyMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*PropertyMutation) DeletedAtCleared ¶
func (m *PropertyMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*PropertyMutation) EdgeCleared ¶
func (m *PropertyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PropertyMutation) Field ¶
func (m *PropertyMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PropertyMutation) FieldCleared ¶
func (m *PropertyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PropertyMutation) Fields ¶
func (m *PropertyMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*PropertyMutation) ID ¶
func (m *PropertyMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PropertyMutation) IDs ¶
func (m *PropertyMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PropertyMutation) Name ¶
func (m *PropertyMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PropertyMutation) NameCleared ¶
func (m *PropertyMutation) NameCleared() bool
NameCleared returns if the "name" field was cleared in this mutation.
func (*PropertyMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Property entity. If the Property object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PropertyMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Property entity. If the Property object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PropertyMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*PropertyMutation) OldName ¶
func (m *PropertyMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Property entity. If the Property object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PropertyMutation) OldRemark ¶
func (m *PropertyMutation) OldRemark(ctx context.Context) (v string, err error)
OldRemark returns the old "remark" field's value of the Property entity. If the Property object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PropertyMutation) OldStatus ¶
func (m *PropertyMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the Property entity. If the Property object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PropertyMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Property entity. If the Property object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PropertyMutation) PropertyValuesCleared ¶
func (m *PropertyMutation) PropertyValuesCleared() bool
PropertyValuesCleared reports if the "property_values" edge to the PropertyValue entity was cleared.
func (*PropertyMutation) PropertyValuesIDs ¶
func (m *PropertyMutation) PropertyValuesIDs() (ids []uint64)
PropertyValuesIDs returns the "property_values" edge IDs in the mutation.
func (*PropertyMutation) Remark ¶
func (m *PropertyMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*PropertyMutation) RemarkCleared ¶
func (m *PropertyMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*PropertyMutation) RemovePropertyValueIDs ¶
func (m *PropertyMutation) RemovePropertyValueIDs(ids ...uint64)
RemovePropertyValueIDs removes the "property_values" edge to the PropertyValue entity by IDs.
func (*PropertyMutation) RemovedEdges ¶
func (m *PropertyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PropertyMutation) RemovedIDs ¶
func (m *PropertyMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*PropertyMutation) RemovedPropertyValuesIDs ¶
func (m *PropertyMutation) RemovedPropertyValuesIDs() (ids []uint64)
RemovedPropertyValues returns the removed IDs of the "property_values" edge to the PropertyValue entity.
func (*PropertyMutation) ResetCreatedAt ¶
func (m *PropertyMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PropertyMutation) ResetDeletedAt ¶
func (m *PropertyMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*PropertyMutation) ResetEdge ¶
func (m *PropertyMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*PropertyMutation) ResetField ¶
func (m *PropertyMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*PropertyMutation) ResetName ¶
func (m *PropertyMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PropertyMutation) ResetPropertyValues ¶
func (m *PropertyMutation) ResetPropertyValues()
ResetPropertyValues resets all changes to the "property_values" edge.
func (*PropertyMutation) ResetRemark ¶
func (m *PropertyMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*PropertyMutation) ResetStatus ¶
func (m *PropertyMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*PropertyMutation) ResetUpdatedAt ¶
func (m *PropertyMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PropertyMutation) SetCreatedAt ¶
func (m *PropertyMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PropertyMutation) SetDeletedAt ¶
func (m *PropertyMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*PropertyMutation) SetField ¶
func (m *PropertyMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PropertyMutation) SetID ¶
func (m *PropertyMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Property entities.
func (*PropertyMutation) SetName ¶
func (m *PropertyMutation) SetName(s string)
SetName sets the "name" field.
func (*PropertyMutation) SetOp ¶
func (m *PropertyMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PropertyMutation) SetRemark ¶
func (m *PropertyMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*PropertyMutation) SetStatus ¶
func (m *PropertyMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*PropertyMutation) SetUpdatedAt ¶
func (m *PropertyMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PropertyMutation) Status ¶
func (m *PropertyMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*PropertyMutation) StatusCleared ¶
func (m *PropertyMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (PropertyMutation) Tx ¶
func (m PropertyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PropertyMutation) Type ¶
func (m *PropertyMutation) Type() string
Type returns the node type of this mutation (Property).
func (*PropertyMutation) UpdatedAt ¶
func (m *PropertyMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PropertyMutation) Where ¶
func (m *PropertyMutation) Where(ps ...predicate.Property)
Where appends a list predicates to the PropertyMutation builder.
func (*PropertyMutation) WhereP ¶
func (m *PropertyMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PropertyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PropertyPageList ¶
type PropertyPageList struct { List []*Property `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
PropertyPageList is Property PageList result.
type PropertyPager ¶
type PropertyPager struct { Order property.OrderOption Filter func(*PropertyQuery) (*PropertyQuery, error) }
func (*PropertyPager) ApplyFilter ¶
func (p *PropertyPager) ApplyFilter(query *PropertyQuery) (*PropertyQuery, error)
type PropertyPaginateOption ¶
type PropertyPaginateOption func(*PropertyPager)
PropertyPaginateOption enables pagination customization.
type PropertyQuery ¶
type PropertyQuery struct {
// contains filtered or unexported fields
}
PropertyQuery is the builder for querying Property entities.
func (*PropertyQuery) Aggregate ¶
func (pq *PropertyQuery) Aggregate(fns ...AggregateFunc) *PropertySelect
Aggregate returns a PropertySelect configured with the given aggregations.
func (*PropertyQuery) All ¶
func (pq *PropertyQuery) All(ctx context.Context) ([]*Property, error)
All executes the query and returns a list of Properties.
func (*PropertyQuery) AllX ¶
func (pq *PropertyQuery) AllX(ctx context.Context) []*Property
AllX is like All, but panics if an error occurs.
func (*PropertyQuery) Clone ¶
func (pq *PropertyQuery) Clone() *PropertyQuery
Clone returns a duplicate of the PropertyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PropertyQuery) Count ¶
func (pq *PropertyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PropertyQuery) CountX ¶
func (pq *PropertyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PropertyQuery) Exist ¶
func (pq *PropertyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PropertyQuery) ExistX ¶
func (pq *PropertyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PropertyQuery) First ¶
func (pq *PropertyQuery) First(ctx context.Context) (*Property, error)
First returns the first Property entity from the query. Returns a *NotFoundError when no Property was found.
func (*PropertyQuery) FirstID ¶
func (pq *PropertyQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Property ID from the query. Returns a *NotFoundError when no Property ID was found.
func (*PropertyQuery) FirstIDX ¶
func (pq *PropertyQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*PropertyQuery) FirstX ¶
func (pq *PropertyQuery) FirstX(ctx context.Context) *Property
FirstX is like First, but panics if an error occurs.
func (*PropertyQuery) GroupBy ¶
func (pq *PropertyQuery) GroupBy(field string, fields ...string) *PropertyGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Property.Query(). GroupBy(property.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PropertyQuery) IDs ¶
func (pq *PropertyQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Property IDs.
func (*PropertyQuery) IDsX ¶
func (pq *PropertyQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*PropertyQuery) Limit ¶
func (pq *PropertyQuery) Limit(limit int) *PropertyQuery
Limit the number of records to be returned by this query.
func (*PropertyQuery) Offset ¶
func (pq *PropertyQuery) Offset(offset int) *PropertyQuery
Offset to start from.
func (*PropertyQuery) Only ¶
func (pq *PropertyQuery) Only(ctx context.Context) (*Property, error)
Only returns a single Property entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Property entity is found. Returns a *NotFoundError when no Property entities are found.
func (*PropertyQuery) OnlyID ¶
func (pq *PropertyQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Property ID in the query. Returns a *NotSingularError when more than one Property ID is found. Returns a *NotFoundError when no entities are found.
func (*PropertyQuery) OnlyIDX ¶
func (pq *PropertyQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PropertyQuery) OnlyX ¶
func (pq *PropertyQuery) OnlyX(ctx context.Context) *Property
OnlyX is like Only, but panics if an error occurs.
func (*PropertyQuery) Order ¶
func (pq *PropertyQuery) Order(o ...property.OrderOption) *PropertyQuery
Order specifies how the records should be ordered.
func (*PropertyQuery) Page ¶
func (pr *PropertyQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...PropertyPaginateOption, ) (*PropertyPageList, error)
func (*PropertyQuery) QueryPropertyValues ¶
func (pq *PropertyQuery) QueryPropertyValues() *PropertyValueQuery
QueryPropertyValues chains the current query on the "property_values" edge.
func (*PropertyQuery) Select ¶
func (pq *PropertyQuery) Select(fields ...string) *PropertySelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Property.Query(). Select(property.FieldCreatedAt). Scan(ctx, &v)
func (*PropertyQuery) Unique ¶
func (pq *PropertyQuery) Unique(unique bool) *PropertyQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*PropertyQuery) Where ¶
func (pq *PropertyQuery) Where(ps ...predicate.Property) *PropertyQuery
Where adds a new predicate for the PropertyQuery builder.
func (*PropertyQuery) WithPropertyValues ¶
func (pq *PropertyQuery) WithPropertyValues(opts ...func(*PropertyValueQuery)) *PropertyQuery
WithPropertyValues tells the query-builder to eager-load the nodes that are connected to the "property_values" edge. The optional arguments are used to configure the query builder of the edge.
type PropertySelect ¶
type PropertySelect struct { *PropertyQuery // contains filtered or unexported fields }
PropertySelect is the builder for selecting fields of Property entities.
func (*PropertySelect) Aggregate ¶
func (ps *PropertySelect) Aggregate(fns ...AggregateFunc) *PropertySelect
Aggregate adds the given aggregation functions to the selector query.
func (*PropertySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PropertySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PropertySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PropertySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PropertySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PropertySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PropertySelect) Scan ¶
func (ps *PropertySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PropertySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PropertyUpdate ¶
type PropertyUpdate struct {
// contains filtered or unexported fields
}
PropertyUpdate is the builder for updating Property entities.
func (*PropertyUpdate) AddPropertyValueIDs ¶
func (pu *PropertyUpdate) AddPropertyValueIDs(ids ...uint64) *PropertyUpdate
AddPropertyValueIDs adds the "property_values" edge to the PropertyValue entity by IDs.
func (*PropertyUpdate) AddPropertyValues ¶
func (pu *PropertyUpdate) AddPropertyValues(p ...*PropertyValue) *PropertyUpdate
AddPropertyValues adds the "property_values" edges to the PropertyValue entity.
func (*PropertyUpdate) AddStatus ¶
func (pu *PropertyUpdate) AddStatus(u int8) *PropertyUpdate
AddStatus adds u to the "status" field.
func (*PropertyUpdate) ClearDeletedAt ¶
func (pu *PropertyUpdate) ClearDeletedAt() *PropertyUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PropertyUpdate) ClearName ¶
func (pu *PropertyUpdate) ClearName() *PropertyUpdate
ClearName clears the value of the "name" field.
func (*PropertyUpdate) ClearPropertyValues ¶
func (pu *PropertyUpdate) ClearPropertyValues() *PropertyUpdate
ClearPropertyValues clears all "property_values" edges to the PropertyValue entity.
func (*PropertyUpdate) ClearRemark ¶
func (pu *PropertyUpdate) ClearRemark() *PropertyUpdate
ClearRemark clears the value of the "remark" field.
func (*PropertyUpdate) ClearStatus ¶
func (pu *PropertyUpdate) ClearStatus() *PropertyUpdate
ClearStatus clears the value of the "status" field.
func (*PropertyUpdate) Exec ¶
func (pu *PropertyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PropertyUpdate) ExecX ¶
func (pu *PropertyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PropertyUpdate) Mutation ¶
func (pu *PropertyUpdate) Mutation() *PropertyMutation
Mutation returns the PropertyMutation object of the builder.
func (*PropertyUpdate) RemovePropertyValueIDs ¶
func (pu *PropertyUpdate) RemovePropertyValueIDs(ids ...uint64) *PropertyUpdate
RemovePropertyValueIDs removes the "property_values" edge to PropertyValue entities by IDs.
func (*PropertyUpdate) RemovePropertyValues ¶
func (pu *PropertyUpdate) RemovePropertyValues(p ...*PropertyValue) *PropertyUpdate
RemovePropertyValues removes "property_values" edges to PropertyValue entities.
func (*PropertyUpdate) Save ¶
func (pu *PropertyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PropertyUpdate) SaveX ¶
func (pu *PropertyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PropertyUpdate) SetDeletedAt ¶
func (pu *PropertyUpdate) SetDeletedAt(t time.Time) *PropertyUpdate
SetDeletedAt sets the "deleted_at" field.
func (*PropertyUpdate) SetName ¶
func (pu *PropertyUpdate) SetName(s string) *PropertyUpdate
SetName sets the "name" field.
func (*PropertyUpdate) SetNillableDeletedAt ¶
func (pu *PropertyUpdate) SetNillableDeletedAt(t *time.Time) *PropertyUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PropertyUpdate) SetNillableName ¶
func (pu *PropertyUpdate) SetNillableName(s *string) *PropertyUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*PropertyUpdate) SetNillableRemark ¶
func (pu *PropertyUpdate) SetNillableRemark(s *string) *PropertyUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*PropertyUpdate) SetNillableStatus ¶
func (pu *PropertyUpdate) SetNillableStatus(u *uint8) *PropertyUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PropertyUpdate) SetNotNilDeletedAt ¶
func (pr *PropertyUpdate) SetNotNilDeletedAt(value *time.Time) *PropertyUpdate
set field if value's pointer is not nil.
func (*PropertyUpdate) SetNotNilName ¶
func (pr *PropertyUpdate) SetNotNilName(value *string) *PropertyUpdate
set field if value's pointer is not nil.
func (*PropertyUpdate) SetNotNilRemark ¶
func (pr *PropertyUpdate) SetNotNilRemark(value *string) *PropertyUpdate
set field if value's pointer is not nil.
func (*PropertyUpdate) SetNotNilStatus ¶
func (pr *PropertyUpdate) SetNotNilStatus(value *uint8) *PropertyUpdate
set field if value's pointer is not nil.
func (*PropertyUpdate) SetNotNilUpdatedAt ¶
func (pr *PropertyUpdate) SetNotNilUpdatedAt(value *time.Time) *PropertyUpdate
set field if value's pointer is not nil.
func (*PropertyUpdate) SetRemark ¶
func (pu *PropertyUpdate) SetRemark(s string) *PropertyUpdate
SetRemark sets the "remark" field.
func (*PropertyUpdate) SetStatus ¶
func (pu *PropertyUpdate) SetStatus(u uint8) *PropertyUpdate
SetStatus sets the "status" field.
func (*PropertyUpdate) SetUpdatedAt ¶
func (pu *PropertyUpdate) SetUpdatedAt(t time.Time) *PropertyUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PropertyUpdate) Where ¶
func (pu *PropertyUpdate) Where(ps ...predicate.Property) *PropertyUpdate
Where appends a list predicates to the PropertyUpdate builder.
type PropertyUpdateOne ¶
type PropertyUpdateOne struct {
// contains filtered or unexported fields
}
PropertyUpdateOne is the builder for updating a single Property entity.
func (*PropertyUpdateOne) AddPropertyValueIDs ¶
func (puo *PropertyUpdateOne) AddPropertyValueIDs(ids ...uint64) *PropertyUpdateOne
AddPropertyValueIDs adds the "property_values" edge to the PropertyValue entity by IDs.
func (*PropertyUpdateOne) AddPropertyValues ¶
func (puo *PropertyUpdateOne) AddPropertyValues(p ...*PropertyValue) *PropertyUpdateOne
AddPropertyValues adds the "property_values" edges to the PropertyValue entity.
func (*PropertyUpdateOne) AddStatus ¶
func (puo *PropertyUpdateOne) AddStatus(u int8) *PropertyUpdateOne
AddStatus adds u to the "status" field.
func (*PropertyUpdateOne) ClearDeletedAt ¶
func (puo *PropertyUpdateOne) ClearDeletedAt() *PropertyUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PropertyUpdateOne) ClearName ¶
func (puo *PropertyUpdateOne) ClearName() *PropertyUpdateOne
ClearName clears the value of the "name" field.
func (*PropertyUpdateOne) ClearPropertyValues ¶
func (puo *PropertyUpdateOne) ClearPropertyValues() *PropertyUpdateOne
ClearPropertyValues clears all "property_values" edges to the PropertyValue entity.
func (*PropertyUpdateOne) ClearRemark ¶
func (puo *PropertyUpdateOne) ClearRemark() *PropertyUpdateOne
ClearRemark clears the value of the "remark" field.
func (*PropertyUpdateOne) ClearStatus ¶
func (puo *PropertyUpdateOne) ClearStatus() *PropertyUpdateOne
ClearStatus clears the value of the "status" field.
func (*PropertyUpdateOne) Exec ¶
func (puo *PropertyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PropertyUpdateOne) ExecX ¶
func (puo *PropertyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PropertyUpdateOne) Mutation ¶
func (puo *PropertyUpdateOne) Mutation() *PropertyMutation
Mutation returns the PropertyMutation object of the builder.
func (*PropertyUpdateOne) RemovePropertyValueIDs ¶
func (puo *PropertyUpdateOne) RemovePropertyValueIDs(ids ...uint64) *PropertyUpdateOne
RemovePropertyValueIDs removes the "property_values" edge to PropertyValue entities by IDs.
func (*PropertyUpdateOne) RemovePropertyValues ¶
func (puo *PropertyUpdateOne) RemovePropertyValues(p ...*PropertyValue) *PropertyUpdateOne
RemovePropertyValues removes "property_values" edges to PropertyValue entities.
func (*PropertyUpdateOne) Save ¶
func (puo *PropertyUpdateOne) Save(ctx context.Context) (*Property, error)
Save executes the query and returns the updated Property entity.
func (*PropertyUpdateOne) SaveX ¶
func (puo *PropertyUpdateOne) SaveX(ctx context.Context) *Property
SaveX is like Save, but panics if an error occurs.
func (*PropertyUpdateOne) Select ¶
func (puo *PropertyUpdateOne) Select(field string, fields ...string) *PropertyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PropertyUpdateOne) SetDeletedAt ¶
func (puo *PropertyUpdateOne) SetDeletedAt(t time.Time) *PropertyUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*PropertyUpdateOne) SetName ¶
func (puo *PropertyUpdateOne) SetName(s string) *PropertyUpdateOne
SetName sets the "name" field.
func (*PropertyUpdateOne) SetNillableDeletedAt ¶
func (puo *PropertyUpdateOne) SetNillableDeletedAt(t *time.Time) *PropertyUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PropertyUpdateOne) SetNillableName ¶
func (puo *PropertyUpdateOne) SetNillableName(s *string) *PropertyUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*PropertyUpdateOne) SetNillableRemark ¶
func (puo *PropertyUpdateOne) SetNillableRemark(s *string) *PropertyUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*PropertyUpdateOne) SetNillableStatus ¶
func (puo *PropertyUpdateOne) SetNillableStatus(u *uint8) *PropertyUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PropertyUpdateOne) SetNotNilDeletedAt ¶
func (pr *PropertyUpdateOne) SetNotNilDeletedAt(value *time.Time) *PropertyUpdateOne
set field if value's pointer is not nil.
func (*PropertyUpdateOne) SetNotNilName ¶
func (pr *PropertyUpdateOne) SetNotNilName(value *string) *PropertyUpdateOne
set field if value's pointer is not nil.
func (*PropertyUpdateOne) SetNotNilRemark ¶
func (pr *PropertyUpdateOne) SetNotNilRemark(value *string) *PropertyUpdateOne
set field if value's pointer is not nil.
func (*PropertyUpdateOne) SetNotNilStatus ¶
func (pr *PropertyUpdateOne) SetNotNilStatus(value *uint8) *PropertyUpdateOne
set field if value's pointer is not nil.
func (*PropertyUpdateOne) SetNotNilUpdatedAt ¶
func (pr *PropertyUpdateOne) SetNotNilUpdatedAt(value *time.Time) *PropertyUpdateOne
set field if value's pointer is not nil.
func (*PropertyUpdateOne) SetRemark ¶
func (puo *PropertyUpdateOne) SetRemark(s string) *PropertyUpdateOne
SetRemark sets the "remark" field.
func (*PropertyUpdateOne) SetStatus ¶
func (puo *PropertyUpdateOne) SetStatus(u uint8) *PropertyUpdateOne
SetStatus sets the "status" field.
func (*PropertyUpdateOne) SetUpdatedAt ¶
func (puo *PropertyUpdateOne) SetUpdatedAt(t time.Time) *PropertyUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PropertyUpdateOne) Where ¶
func (puo *PropertyUpdateOne) Where(ps ...predicate.Property) *PropertyUpdateOne
Where appends a list predicates to the PropertyUpdate builder.
type PropertyValue ¶
type PropertyValue struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Delete Time | 删除日期 DeletedAt time.Time `json:"deleted_at,omitempty"` // 属性项的编号 PropertyID uint64 `json:"property_id,omitempty"` // 名称 Name string `json:"name,omitempty"` // 备注 Remark string `json:"remark,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PropertyValueQuery when eager-loading is set. Edges PropertyValueEdges `json:"edges"` // contains filtered or unexported fields }
PropertyValue is the model entity for the PropertyValue schema.
func (*PropertyValue) QueryPropertys ¶
func (pv *PropertyValue) QueryPropertys() *PropertyQuery
QueryPropertys queries the "propertys" edge of the PropertyValue entity.
func (*PropertyValue) String ¶
func (pv *PropertyValue) String() string
String implements the fmt.Stringer.
func (*PropertyValue) Unwrap ¶
func (pv *PropertyValue) Unwrap() *PropertyValue
Unwrap unwraps the PropertyValue entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*PropertyValue) Update ¶
func (pv *PropertyValue) Update() *PropertyValueUpdateOne
Update returns a builder for updating this PropertyValue. Note that you need to call PropertyValue.Unwrap() before calling this method if this PropertyValue was returned from a transaction, and the transaction was committed or rolled back.
type PropertyValueClient ¶
type PropertyValueClient struct {
// contains filtered or unexported fields
}
PropertyValueClient is a client for the PropertyValue schema.
func NewPropertyValueClient ¶
func NewPropertyValueClient(c config) *PropertyValueClient
NewPropertyValueClient returns a client for the PropertyValue from the given config.
func (*PropertyValueClient) Create ¶
func (c *PropertyValueClient) Create() *PropertyValueCreate
Create returns a builder for creating a PropertyValue entity.
func (*PropertyValueClient) CreateBulk ¶
func (c *PropertyValueClient) CreateBulk(builders ...*PropertyValueCreate) *PropertyValueCreateBulk
CreateBulk returns a builder for creating a bulk of PropertyValue entities.
func (*PropertyValueClient) Delete ¶
func (c *PropertyValueClient) Delete() *PropertyValueDelete
Delete returns a delete builder for PropertyValue.
func (*PropertyValueClient) DeleteOne ¶
func (c *PropertyValueClient) DeleteOne(pv *PropertyValue) *PropertyValueDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PropertyValueClient) DeleteOneID ¶
func (c *PropertyValueClient) DeleteOneID(id uint64) *PropertyValueDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PropertyValueClient) Get ¶
func (c *PropertyValueClient) Get(ctx context.Context, id uint64) (*PropertyValue, error)
Get returns a PropertyValue entity by its id.
func (*PropertyValueClient) GetX ¶
func (c *PropertyValueClient) GetX(ctx context.Context, id uint64) *PropertyValue
GetX is like Get, but panics if an error occurs.
func (*PropertyValueClient) Hooks ¶
func (c *PropertyValueClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PropertyValueClient) Intercept ¶
func (c *PropertyValueClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `propertyvalue.Intercept(f(g(h())))`.
func (*PropertyValueClient) Interceptors ¶
func (c *PropertyValueClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PropertyValueClient) MapCreateBulk ¶
func (c *PropertyValueClient) MapCreateBulk(slice any, setFunc func(*PropertyValueCreate, int)) *PropertyValueCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*PropertyValueClient) Query ¶
func (c *PropertyValueClient) Query() *PropertyValueQuery
Query returns a query builder for PropertyValue.
func (*PropertyValueClient) QueryPropertys ¶
func (c *PropertyValueClient) QueryPropertys(pv *PropertyValue) *PropertyQuery
QueryPropertys queries the propertys edge of a PropertyValue.
func (*PropertyValueClient) Update ¶
func (c *PropertyValueClient) Update() *PropertyValueUpdate
Update returns an update builder for PropertyValue.
func (*PropertyValueClient) UpdateOne ¶
func (c *PropertyValueClient) UpdateOne(pv *PropertyValue) *PropertyValueUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PropertyValueClient) UpdateOneID ¶
func (c *PropertyValueClient) UpdateOneID(id uint64) *PropertyValueUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PropertyValueClient) Use ¶
func (c *PropertyValueClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `propertyvalue.Hooks(f(g(h())))`.
type PropertyValueCreate ¶
type PropertyValueCreate struct {
// contains filtered or unexported fields
}
PropertyValueCreate is the builder for creating a PropertyValue entity.
func (*PropertyValueCreate) Exec ¶
func (pvc *PropertyValueCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PropertyValueCreate) ExecX ¶
func (pvc *PropertyValueCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PropertyValueCreate) Mutation ¶
func (pvc *PropertyValueCreate) Mutation() *PropertyValueMutation
Mutation returns the PropertyValueMutation object of the builder.
func (*PropertyValueCreate) Save ¶
func (pvc *PropertyValueCreate) Save(ctx context.Context) (*PropertyValue, error)
Save creates the PropertyValue in the database.
func (*PropertyValueCreate) SaveX ¶
func (pvc *PropertyValueCreate) SaveX(ctx context.Context) *PropertyValue
SaveX calls Save and panics if Save returns an error.
func (*PropertyValueCreate) SetCreatedAt ¶
func (pvc *PropertyValueCreate) SetCreatedAt(t time.Time) *PropertyValueCreate
SetCreatedAt sets the "created_at" field.
func (*PropertyValueCreate) SetDeletedAt ¶
func (pvc *PropertyValueCreate) SetDeletedAt(t time.Time) *PropertyValueCreate
SetDeletedAt sets the "deleted_at" field.
func (*PropertyValueCreate) SetID ¶
func (pvc *PropertyValueCreate) SetID(u uint64) *PropertyValueCreate
SetID sets the "id" field.
func (*PropertyValueCreate) SetName ¶
func (pvc *PropertyValueCreate) SetName(s string) *PropertyValueCreate
SetName sets the "name" field.
func (*PropertyValueCreate) SetNillableCreatedAt ¶
func (pvc *PropertyValueCreate) SetNillableCreatedAt(t *time.Time) *PropertyValueCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PropertyValueCreate) SetNillableDeletedAt ¶
func (pvc *PropertyValueCreate) SetNillableDeletedAt(t *time.Time) *PropertyValueCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PropertyValueCreate) SetNillableName ¶
func (pvc *PropertyValueCreate) SetNillableName(s *string) *PropertyValueCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*PropertyValueCreate) SetNillablePropertyID ¶
func (pvc *PropertyValueCreate) SetNillablePropertyID(u *uint64) *PropertyValueCreate
SetNillablePropertyID sets the "property_id" field if the given value is not nil.
func (*PropertyValueCreate) SetNillablePropertysID ¶
func (pvc *PropertyValueCreate) SetNillablePropertysID(id *uint64) *PropertyValueCreate
SetNillablePropertysID sets the "propertys" edge to the Property entity by ID if the given value is not nil.
func (*PropertyValueCreate) SetNillableRemark ¶
func (pvc *PropertyValueCreate) SetNillableRemark(s *string) *PropertyValueCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*PropertyValueCreate) SetNillableUpdatedAt ¶
func (pvc *PropertyValueCreate) SetNillableUpdatedAt(t *time.Time) *PropertyValueCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PropertyValueCreate) SetNotNilDeletedAt ¶
func (pv *PropertyValueCreate) SetNotNilDeletedAt(value *time.Time) *PropertyValueCreate
set field if value's pointer is not nil.
func (*PropertyValueCreate) SetNotNilName ¶
func (pv *PropertyValueCreate) SetNotNilName(value *string) *PropertyValueCreate
set field if value's pointer is not nil.
func (*PropertyValueCreate) SetNotNilPropertyID ¶
func (pv *PropertyValueCreate) SetNotNilPropertyID(value *uint64) *PropertyValueCreate
set field if value's pointer is not nil.
func (*PropertyValueCreate) SetNotNilRemark ¶
func (pv *PropertyValueCreate) SetNotNilRemark(value *string) *PropertyValueCreate
set field if value's pointer is not nil.
func (*PropertyValueCreate) SetNotNilUpdatedAt ¶
func (pv *PropertyValueCreate) SetNotNilUpdatedAt(value *time.Time) *PropertyValueCreate
set field if value's pointer is not nil.
func (*PropertyValueCreate) SetPropertyID ¶
func (pvc *PropertyValueCreate) SetPropertyID(u uint64) *PropertyValueCreate
SetPropertyID sets the "property_id" field.
func (*PropertyValueCreate) SetPropertys ¶
func (pvc *PropertyValueCreate) SetPropertys(p *Property) *PropertyValueCreate
SetPropertys sets the "propertys" edge to the Property entity.
func (*PropertyValueCreate) SetPropertysID ¶
func (pvc *PropertyValueCreate) SetPropertysID(id uint64) *PropertyValueCreate
SetPropertysID sets the "propertys" edge to the Property entity by ID.
func (*PropertyValueCreate) SetRemark ¶
func (pvc *PropertyValueCreate) SetRemark(s string) *PropertyValueCreate
SetRemark sets the "remark" field.
func (*PropertyValueCreate) SetUpdatedAt ¶
func (pvc *PropertyValueCreate) SetUpdatedAt(t time.Time) *PropertyValueCreate
SetUpdatedAt sets the "updated_at" field.
type PropertyValueCreateBulk ¶
type PropertyValueCreateBulk struct {
// contains filtered or unexported fields
}
PropertyValueCreateBulk is the builder for creating many PropertyValue entities in bulk.
func (*PropertyValueCreateBulk) Exec ¶
func (pvcb *PropertyValueCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PropertyValueCreateBulk) ExecX ¶
func (pvcb *PropertyValueCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PropertyValueCreateBulk) Save ¶
func (pvcb *PropertyValueCreateBulk) Save(ctx context.Context) ([]*PropertyValue, error)
Save creates the PropertyValue entities in the database.
func (*PropertyValueCreateBulk) SaveX ¶
func (pvcb *PropertyValueCreateBulk) SaveX(ctx context.Context) []*PropertyValue
SaveX is like Save, but panics if an error occurs.
type PropertyValueDelete ¶
type PropertyValueDelete struct {
// contains filtered or unexported fields
}
PropertyValueDelete is the builder for deleting a PropertyValue entity.
func (*PropertyValueDelete) Exec ¶
func (pvd *PropertyValueDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PropertyValueDelete) ExecX ¶
func (pvd *PropertyValueDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PropertyValueDelete) Where ¶
func (pvd *PropertyValueDelete) Where(ps ...predicate.PropertyValue) *PropertyValueDelete
Where appends a list predicates to the PropertyValueDelete builder.
type PropertyValueDeleteOne ¶
type PropertyValueDeleteOne struct {
// contains filtered or unexported fields
}
PropertyValueDeleteOne is the builder for deleting a single PropertyValue entity.
func (*PropertyValueDeleteOne) Exec ¶
func (pvdo *PropertyValueDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PropertyValueDeleteOne) ExecX ¶
func (pvdo *PropertyValueDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PropertyValueDeleteOne) Where ¶
func (pvdo *PropertyValueDeleteOne) Where(ps ...predicate.PropertyValue) *PropertyValueDeleteOne
Where appends a list predicates to the PropertyValueDelete builder.
type PropertyValueEdges ¶
type PropertyValueEdges struct { // Propertys holds the value of the propertys edge. Propertys *Property `json:"propertys,omitempty"` // contains filtered or unexported fields }
PropertyValueEdges holds the relations/edges for other nodes in the graph.
func (PropertyValueEdges) PropertysOrErr ¶
func (e PropertyValueEdges) PropertysOrErr() (*Property, error)
PropertysOrErr returns the Propertys value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PropertyValueGroupBy ¶
type PropertyValueGroupBy struct {
// contains filtered or unexported fields
}
PropertyValueGroupBy is the group-by builder for PropertyValue entities.
func (*PropertyValueGroupBy) Aggregate ¶
func (pvgb *PropertyValueGroupBy) Aggregate(fns ...AggregateFunc) *PropertyValueGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PropertyValueGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PropertyValueGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PropertyValueGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PropertyValueGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PropertyValueGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PropertyValueGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PropertyValueGroupBy) Scan ¶
func (pvgb *PropertyValueGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PropertyValueGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PropertyValueMutation ¶
type PropertyValueMutation struct {
// contains filtered or unexported fields
}
PropertyValueMutation represents an operation that mutates the PropertyValue nodes in the graph.
func (*PropertyValueMutation) AddField ¶
func (m *PropertyValueMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PropertyValueMutation) AddedEdges ¶
func (m *PropertyValueMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PropertyValueMutation) AddedField ¶
func (m *PropertyValueMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PropertyValueMutation) AddedFields ¶
func (m *PropertyValueMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PropertyValueMutation) AddedIDs ¶
func (m *PropertyValueMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PropertyValueMutation) ClearDeletedAt ¶
func (m *PropertyValueMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PropertyValueMutation) ClearEdge ¶
func (m *PropertyValueMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*PropertyValueMutation) ClearField ¶
func (m *PropertyValueMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*PropertyValueMutation) ClearName ¶
func (m *PropertyValueMutation) ClearName()
ClearName clears the value of the "name" field.
func (*PropertyValueMutation) ClearPropertyID ¶
func (m *PropertyValueMutation) ClearPropertyID()
ClearPropertyID clears the value of the "property_id" field.
func (*PropertyValueMutation) ClearPropertys ¶
func (m *PropertyValueMutation) ClearPropertys()
ClearPropertys clears the "propertys" edge to the Property entity.
func (*PropertyValueMutation) ClearRemark ¶
func (m *PropertyValueMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*PropertyValueMutation) ClearedEdges ¶
func (m *PropertyValueMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PropertyValueMutation) ClearedFields ¶
func (m *PropertyValueMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PropertyValueMutation) Client ¶
func (m PropertyValueMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*PropertyValueMutation) CreatedAt ¶
func (m *PropertyValueMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PropertyValueMutation) DeletedAt ¶
func (m *PropertyValueMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*PropertyValueMutation) DeletedAtCleared ¶
func (m *PropertyValueMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*PropertyValueMutation) EdgeCleared ¶
func (m *PropertyValueMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PropertyValueMutation) Field ¶
func (m *PropertyValueMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*PropertyValueMutation) FieldCleared ¶
func (m *PropertyValueMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PropertyValueMutation) Fields ¶
func (m *PropertyValueMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*PropertyValueMutation) ID ¶
func (m *PropertyValueMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PropertyValueMutation) IDs ¶
func (m *PropertyValueMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PropertyValueMutation) Name ¶
func (m *PropertyValueMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PropertyValueMutation) NameCleared ¶
func (m *PropertyValueMutation) NameCleared() bool
NameCleared returns if the "name" field was cleared in this mutation.
func (*PropertyValueMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the PropertyValue entity. If the PropertyValue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PropertyValueMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the PropertyValue entity. If the PropertyValue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PropertyValueMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*PropertyValueMutation) OldName ¶
func (m *PropertyValueMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the PropertyValue entity. If the PropertyValue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PropertyValueMutation) OldPropertyID ¶
func (m *PropertyValueMutation) OldPropertyID(ctx context.Context) (v uint64, err error)
OldPropertyID returns the old "property_id" field's value of the PropertyValue entity. If the PropertyValue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PropertyValueMutation) OldRemark ¶
func (m *PropertyValueMutation) OldRemark(ctx context.Context) (v string, err error)
OldRemark returns the old "remark" field's value of the PropertyValue entity. If the PropertyValue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PropertyValueMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the PropertyValue entity. If the PropertyValue object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PropertyValueMutation) Op ¶
func (m *PropertyValueMutation) Op() Op
Op returns the operation name.
func (*PropertyValueMutation) PropertyID ¶
func (m *PropertyValueMutation) PropertyID() (r uint64, exists bool)
PropertyID returns the value of the "property_id" field in the mutation.
func (*PropertyValueMutation) PropertyIDCleared ¶
func (m *PropertyValueMutation) PropertyIDCleared() bool
PropertyIDCleared returns if the "property_id" field was cleared in this mutation.
func (*PropertyValueMutation) PropertysCleared ¶
func (m *PropertyValueMutation) PropertysCleared() bool
PropertysCleared reports if the "propertys" edge to the Property entity was cleared.
func (*PropertyValueMutation) PropertysID ¶
func (m *PropertyValueMutation) PropertysID() (id uint64, exists bool)
PropertysID returns the "propertys" edge ID in the mutation.
func (*PropertyValueMutation) PropertysIDs ¶
func (m *PropertyValueMutation) PropertysIDs() (ids []uint64)
PropertysIDs returns the "propertys" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PropertysID instead. It exists only for internal usage by the builders.
func (*PropertyValueMutation) Remark ¶
func (m *PropertyValueMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*PropertyValueMutation) RemarkCleared ¶
func (m *PropertyValueMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*PropertyValueMutation) RemovedEdges ¶
func (m *PropertyValueMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PropertyValueMutation) RemovedIDs ¶
func (m *PropertyValueMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*PropertyValueMutation) ResetCreatedAt ¶
func (m *PropertyValueMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PropertyValueMutation) ResetDeletedAt ¶
func (m *PropertyValueMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*PropertyValueMutation) ResetEdge ¶
func (m *PropertyValueMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*PropertyValueMutation) ResetField ¶
func (m *PropertyValueMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*PropertyValueMutation) ResetName ¶
func (m *PropertyValueMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PropertyValueMutation) ResetPropertyID ¶
func (m *PropertyValueMutation) ResetPropertyID()
ResetPropertyID resets all changes to the "property_id" field.
func (*PropertyValueMutation) ResetPropertys ¶
func (m *PropertyValueMutation) ResetPropertys()
ResetPropertys resets all changes to the "propertys" edge.
func (*PropertyValueMutation) ResetRemark ¶
func (m *PropertyValueMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*PropertyValueMutation) ResetUpdatedAt ¶
func (m *PropertyValueMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PropertyValueMutation) SetCreatedAt ¶
func (m *PropertyValueMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PropertyValueMutation) SetDeletedAt ¶
func (m *PropertyValueMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*PropertyValueMutation) SetField ¶
func (m *PropertyValueMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*PropertyValueMutation) SetID ¶
func (m *PropertyValueMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of PropertyValue entities.
func (*PropertyValueMutation) SetName ¶
func (m *PropertyValueMutation) SetName(s string)
SetName sets the "name" field.
func (*PropertyValueMutation) SetOp ¶
func (m *PropertyValueMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PropertyValueMutation) SetPropertyID ¶
func (m *PropertyValueMutation) SetPropertyID(u uint64)
SetPropertyID sets the "property_id" field.
func (*PropertyValueMutation) SetPropertysID ¶
func (m *PropertyValueMutation) SetPropertysID(id uint64)
SetPropertysID sets the "propertys" edge to the Property entity by id.
func (*PropertyValueMutation) SetRemark ¶
func (m *PropertyValueMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*PropertyValueMutation) SetUpdatedAt ¶
func (m *PropertyValueMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (PropertyValueMutation) Tx ¶
func (m PropertyValueMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PropertyValueMutation) Type ¶
func (m *PropertyValueMutation) Type() string
Type returns the node type of this mutation (PropertyValue).
func (*PropertyValueMutation) UpdatedAt ¶
func (m *PropertyValueMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PropertyValueMutation) Where ¶
func (m *PropertyValueMutation) Where(ps ...predicate.PropertyValue)
Where appends a list predicates to the PropertyValueMutation builder.
func (*PropertyValueMutation) WhereP ¶
func (m *PropertyValueMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PropertyValueMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PropertyValuePageList ¶
type PropertyValuePageList struct { List []*PropertyValue `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
PropertyValuePageList is PropertyValue PageList result.
type PropertyValuePager ¶
type PropertyValuePager struct { Order propertyvalue.OrderOption Filter func(*PropertyValueQuery) (*PropertyValueQuery, error) }
func (*PropertyValuePager) ApplyFilter ¶
func (p *PropertyValuePager) ApplyFilter(query *PropertyValueQuery) (*PropertyValueQuery, error)
type PropertyValuePaginateOption ¶
type PropertyValuePaginateOption func(*PropertyValuePager)
PropertyValuePaginateOption enables pagination customization.
type PropertyValueQuery ¶
type PropertyValueQuery struct {
// contains filtered or unexported fields
}
PropertyValueQuery is the builder for querying PropertyValue entities.
func (*PropertyValueQuery) Aggregate ¶
func (pvq *PropertyValueQuery) Aggregate(fns ...AggregateFunc) *PropertyValueSelect
Aggregate returns a PropertyValueSelect configured with the given aggregations.
func (*PropertyValueQuery) All ¶
func (pvq *PropertyValueQuery) All(ctx context.Context) ([]*PropertyValue, error)
All executes the query and returns a list of PropertyValues.
func (*PropertyValueQuery) AllX ¶
func (pvq *PropertyValueQuery) AllX(ctx context.Context) []*PropertyValue
AllX is like All, but panics if an error occurs.
func (*PropertyValueQuery) Clone ¶
func (pvq *PropertyValueQuery) Clone() *PropertyValueQuery
Clone returns a duplicate of the PropertyValueQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PropertyValueQuery) Count ¶
func (pvq *PropertyValueQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PropertyValueQuery) CountX ¶
func (pvq *PropertyValueQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PropertyValueQuery) Exist ¶
func (pvq *PropertyValueQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PropertyValueQuery) ExistX ¶
func (pvq *PropertyValueQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PropertyValueQuery) First ¶
func (pvq *PropertyValueQuery) First(ctx context.Context) (*PropertyValue, error)
First returns the first PropertyValue entity from the query. Returns a *NotFoundError when no PropertyValue was found.
func (*PropertyValueQuery) FirstID ¶
func (pvq *PropertyValueQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first PropertyValue ID from the query. Returns a *NotFoundError when no PropertyValue ID was found.
func (*PropertyValueQuery) FirstIDX ¶
func (pvq *PropertyValueQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*PropertyValueQuery) FirstX ¶
func (pvq *PropertyValueQuery) FirstX(ctx context.Context) *PropertyValue
FirstX is like First, but panics if an error occurs.
func (*PropertyValueQuery) GroupBy ¶
func (pvq *PropertyValueQuery) GroupBy(field string, fields ...string) *PropertyValueGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.PropertyValue.Query(). GroupBy(propertyvalue.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PropertyValueQuery) IDs ¶
func (pvq *PropertyValueQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of PropertyValue IDs.
func (*PropertyValueQuery) IDsX ¶
func (pvq *PropertyValueQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*PropertyValueQuery) Limit ¶
func (pvq *PropertyValueQuery) Limit(limit int) *PropertyValueQuery
Limit the number of records to be returned by this query.
func (*PropertyValueQuery) Offset ¶
func (pvq *PropertyValueQuery) Offset(offset int) *PropertyValueQuery
Offset to start from.
func (*PropertyValueQuery) Only ¶
func (pvq *PropertyValueQuery) Only(ctx context.Context) (*PropertyValue, error)
Only returns a single PropertyValue entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PropertyValue entity is found. Returns a *NotFoundError when no PropertyValue entities are found.
func (*PropertyValueQuery) OnlyID ¶
func (pvq *PropertyValueQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only PropertyValue ID in the query. Returns a *NotSingularError when more than one PropertyValue ID is found. Returns a *NotFoundError when no entities are found.
func (*PropertyValueQuery) OnlyIDX ¶
func (pvq *PropertyValueQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PropertyValueQuery) OnlyX ¶
func (pvq *PropertyValueQuery) OnlyX(ctx context.Context) *PropertyValue
OnlyX is like Only, but panics if an error occurs.
func (*PropertyValueQuery) Order ¶
func (pvq *PropertyValueQuery) Order(o ...propertyvalue.OrderOption) *PropertyValueQuery
Order specifies how the records should be ordered.
func (*PropertyValueQuery) Page ¶
func (pv *PropertyValueQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...PropertyValuePaginateOption, ) (*PropertyValuePageList, error)
func (*PropertyValueQuery) QueryPropertys ¶
func (pvq *PropertyValueQuery) QueryPropertys() *PropertyQuery
QueryPropertys chains the current query on the "propertys" edge.
func (*PropertyValueQuery) Select ¶
func (pvq *PropertyValueQuery) Select(fields ...string) *PropertyValueSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.PropertyValue.Query(). Select(propertyvalue.FieldCreatedAt). Scan(ctx, &v)
func (*PropertyValueQuery) Unique ¶
func (pvq *PropertyValueQuery) Unique(unique bool) *PropertyValueQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*PropertyValueQuery) Where ¶
func (pvq *PropertyValueQuery) Where(ps ...predicate.PropertyValue) *PropertyValueQuery
Where adds a new predicate for the PropertyValueQuery builder.
func (*PropertyValueQuery) WithPropertys ¶
func (pvq *PropertyValueQuery) WithPropertys(opts ...func(*PropertyQuery)) *PropertyValueQuery
WithPropertys tells the query-builder to eager-load the nodes that are connected to the "propertys" edge. The optional arguments are used to configure the query builder of the edge.
type PropertyValueSelect ¶
type PropertyValueSelect struct { *PropertyValueQuery // contains filtered or unexported fields }
PropertyValueSelect is the builder for selecting fields of PropertyValue entities.
func (*PropertyValueSelect) Aggregate ¶
func (pvs *PropertyValueSelect) Aggregate(fns ...AggregateFunc) *PropertyValueSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PropertyValueSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PropertyValueSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PropertyValueSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PropertyValueSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PropertyValueSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PropertyValueSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PropertyValueSelect) Scan ¶
func (pvs *PropertyValueSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PropertyValueSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PropertyValueUpdate ¶
type PropertyValueUpdate struct {
// contains filtered or unexported fields
}
PropertyValueUpdate is the builder for updating PropertyValue entities.
func (*PropertyValueUpdate) ClearDeletedAt ¶
func (pvu *PropertyValueUpdate) ClearDeletedAt() *PropertyValueUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PropertyValueUpdate) ClearName ¶
func (pvu *PropertyValueUpdate) ClearName() *PropertyValueUpdate
ClearName clears the value of the "name" field.
func (*PropertyValueUpdate) ClearPropertyID ¶
func (pvu *PropertyValueUpdate) ClearPropertyID() *PropertyValueUpdate
ClearPropertyID clears the value of the "property_id" field.
func (*PropertyValueUpdate) ClearPropertys ¶
func (pvu *PropertyValueUpdate) ClearPropertys() *PropertyValueUpdate
ClearPropertys clears the "propertys" edge to the Property entity.
func (*PropertyValueUpdate) ClearRemark ¶
func (pvu *PropertyValueUpdate) ClearRemark() *PropertyValueUpdate
ClearRemark clears the value of the "remark" field.
func (*PropertyValueUpdate) Exec ¶
func (pvu *PropertyValueUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PropertyValueUpdate) ExecX ¶
func (pvu *PropertyValueUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PropertyValueUpdate) Mutation ¶
func (pvu *PropertyValueUpdate) Mutation() *PropertyValueMutation
Mutation returns the PropertyValueMutation object of the builder.
func (*PropertyValueUpdate) Save ¶
func (pvu *PropertyValueUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PropertyValueUpdate) SaveX ¶
func (pvu *PropertyValueUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PropertyValueUpdate) SetDeletedAt ¶
func (pvu *PropertyValueUpdate) SetDeletedAt(t time.Time) *PropertyValueUpdate
SetDeletedAt sets the "deleted_at" field.
func (*PropertyValueUpdate) SetName ¶
func (pvu *PropertyValueUpdate) SetName(s string) *PropertyValueUpdate
SetName sets the "name" field.
func (*PropertyValueUpdate) SetNillableDeletedAt ¶
func (pvu *PropertyValueUpdate) SetNillableDeletedAt(t *time.Time) *PropertyValueUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PropertyValueUpdate) SetNillableName ¶
func (pvu *PropertyValueUpdate) SetNillableName(s *string) *PropertyValueUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*PropertyValueUpdate) SetNillablePropertyID ¶
func (pvu *PropertyValueUpdate) SetNillablePropertyID(u *uint64) *PropertyValueUpdate
SetNillablePropertyID sets the "property_id" field if the given value is not nil.
func (*PropertyValueUpdate) SetNillablePropertysID ¶
func (pvu *PropertyValueUpdate) SetNillablePropertysID(id *uint64) *PropertyValueUpdate
SetNillablePropertysID sets the "propertys" edge to the Property entity by ID if the given value is not nil.
func (*PropertyValueUpdate) SetNillableRemark ¶
func (pvu *PropertyValueUpdate) SetNillableRemark(s *string) *PropertyValueUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*PropertyValueUpdate) SetNotNilDeletedAt ¶
func (pv *PropertyValueUpdate) SetNotNilDeletedAt(value *time.Time) *PropertyValueUpdate
set field if value's pointer is not nil.
func (*PropertyValueUpdate) SetNotNilName ¶
func (pv *PropertyValueUpdate) SetNotNilName(value *string) *PropertyValueUpdate
set field if value's pointer is not nil.
func (*PropertyValueUpdate) SetNotNilPropertyID ¶
func (pv *PropertyValueUpdate) SetNotNilPropertyID(value *uint64) *PropertyValueUpdate
set field if value's pointer is not nil.
func (*PropertyValueUpdate) SetNotNilRemark ¶
func (pv *PropertyValueUpdate) SetNotNilRemark(value *string) *PropertyValueUpdate
set field if value's pointer is not nil.
func (*PropertyValueUpdate) SetNotNilUpdatedAt ¶
func (pv *PropertyValueUpdate) SetNotNilUpdatedAt(value *time.Time) *PropertyValueUpdate
set field if value's pointer is not nil.
func (*PropertyValueUpdate) SetPropertyID ¶
func (pvu *PropertyValueUpdate) SetPropertyID(u uint64) *PropertyValueUpdate
SetPropertyID sets the "property_id" field.
func (*PropertyValueUpdate) SetPropertys ¶
func (pvu *PropertyValueUpdate) SetPropertys(p *Property) *PropertyValueUpdate
SetPropertys sets the "propertys" edge to the Property entity.
func (*PropertyValueUpdate) SetPropertysID ¶
func (pvu *PropertyValueUpdate) SetPropertysID(id uint64) *PropertyValueUpdate
SetPropertysID sets the "propertys" edge to the Property entity by ID.
func (*PropertyValueUpdate) SetRemark ¶
func (pvu *PropertyValueUpdate) SetRemark(s string) *PropertyValueUpdate
SetRemark sets the "remark" field.
func (*PropertyValueUpdate) SetUpdatedAt ¶
func (pvu *PropertyValueUpdate) SetUpdatedAt(t time.Time) *PropertyValueUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PropertyValueUpdate) Where ¶
func (pvu *PropertyValueUpdate) Where(ps ...predicate.PropertyValue) *PropertyValueUpdate
Where appends a list predicates to the PropertyValueUpdate builder.
type PropertyValueUpdateOne ¶
type PropertyValueUpdateOne struct {
// contains filtered or unexported fields
}
PropertyValueUpdateOne is the builder for updating a single PropertyValue entity.
func (*PropertyValueUpdateOne) ClearDeletedAt ¶
func (pvuo *PropertyValueUpdateOne) ClearDeletedAt() *PropertyValueUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PropertyValueUpdateOne) ClearName ¶
func (pvuo *PropertyValueUpdateOne) ClearName() *PropertyValueUpdateOne
ClearName clears the value of the "name" field.
func (*PropertyValueUpdateOne) ClearPropertyID ¶
func (pvuo *PropertyValueUpdateOne) ClearPropertyID() *PropertyValueUpdateOne
ClearPropertyID clears the value of the "property_id" field.
func (*PropertyValueUpdateOne) ClearPropertys ¶
func (pvuo *PropertyValueUpdateOne) ClearPropertys() *PropertyValueUpdateOne
ClearPropertys clears the "propertys" edge to the Property entity.
func (*PropertyValueUpdateOne) ClearRemark ¶
func (pvuo *PropertyValueUpdateOne) ClearRemark() *PropertyValueUpdateOne
ClearRemark clears the value of the "remark" field.
func (*PropertyValueUpdateOne) Exec ¶
func (pvuo *PropertyValueUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PropertyValueUpdateOne) ExecX ¶
func (pvuo *PropertyValueUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PropertyValueUpdateOne) Mutation ¶
func (pvuo *PropertyValueUpdateOne) Mutation() *PropertyValueMutation
Mutation returns the PropertyValueMutation object of the builder.
func (*PropertyValueUpdateOne) Save ¶
func (pvuo *PropertyValueUpdateOne) Save(ctx context.Context) (*PropertyValue, error)
Save executes the query and returns the updated PropertyValue entity.
func (*PropertyValueUpdateOne) SaveX ¶
func (pvuo *PropertyValueUpdateOne) SaveX(ctx context.Context) *PropertyValue
SaveX is like Save, but panics if an error occurs.
func (*PropertyValueUpdateOne) Select ¶
func (pvuo *PropertyValueUpdateOne) Select(field string, fields ...string) *PropertyValueUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PropertyValueUpdateOne) SetDeletedAt ¶
func (pvuo *PropertyValueUpdateOne) SetDeletedAt(t time.Time) *PropertyValueUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*PropertyValueUpdateOne) SetName ¶
func (pvuo *PropertyValueUpdateOne) SetName(s string) *PropertyValueUpdateOne
SetName sets the "name" field.
func (*PropertyValueUpdateOne) SetNillableDeletedAt ¶
func (pvuo *PropertyValueUpdateOne) SetNillableDeletedAt(t *time.Time) *PropertyValueUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PropertyValueUpdateOne) SetNillableName ¶
func (pvuo *PropertyValueUpdateOne) SetNillableName(s *string) *PropertyValueUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*PropertyValueUpdateOne) SetNillablePropertyID ¶
func (pvuo *PropertyValueUpdateOne) SetNillablePropertyID(u *uint64) *PropertyValueUpdateOne
SetNillablePropertyID sets the "property_id" field if the given value is not nil.
func (*PropertyValueUpdateOne) SetNillablePropertysID ¶
func (pvuo *PropertyValueUpdateOne) SetNillablePropertysID(id *uint64) *PropertyValueUpdateOne
SetNillablePropertysID sets the "propertys" edge to the Property entity by ID if the given value is not nil.
func (*PropertyValueUpdateOne) SetNillableRemark ¶
func (pvuo *PropertyValueUpdateOne) SetNillableRemark(s *string) *PropertyValueUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*PropertyValueUpdateOne) SetNotNilDeletedAt ¶
func (pv *PropertyValueUpdateOne) SetNotNilDeletedAt(value *time.Time) *PropertyValueUpdateOne
set field if value's pointer is not nil.
func (*PropertyValueUpdateOne) SetNotNilName ¶
func (pv *PropertyValueUpdateOne) SetNotNilName(value *string) *PropertyValueUpdateOne
set field if value's pointer is not nil.
func (*PropertyValueUpdateOne) SetNotNilPropertyID ¶
func (pv *PropertyValueUpdateOne) SetNotNilPropertyID(value *uint64) *PropertyValueUpdateOne
set field if value's pointer is not nil.
func (*PropertyValueUpdateOne) SetNotNilRemark ¶
func (pv *PropertyValueUpdateOne) SetNotNilRemark(value *string) *PropertyValueUpdateOne
set field if value's pointer is not nil.
func (*PropertyValueUpdateOne) SetNotNilUpdatedAt ¶
func (pv *PropertyValueUpdateOne) SetNotNilUpdatedAt(value *time.Time) *PropertyValueUpdateOne
set field if value's pointer is not nil.
func (*PropertyValueUpdateOne) SetPropertyID ¶
func (pvuo *PropertyValueUpdateOne) SetPropertyID(u uint64) *PropertyValueUpdateOne
SetPropertyID sets the "property_id" field.
func (*PropertyValueUpdateOne) SetPropertys ¶
func (pvuo *PropertyValueUpdateOne) SetPropertys(p *Property) *PropertyValueUpdateOne
SetPropertys sets the "propertys" edge to the Property entity.
func (*PropertyValueUpdateOne) SetPropertysID ¶
func (pvuo *PropertyValueUpdateOne) SetPropertysID(id uint64) *PropertyValueUpdateOne
SetPropertysID sets the "propertys" edge to the Property entity by ID.
func (*PropertyValueUpdateOne) SetRemark ¶
func (pvuo *PropertyValueUpdateOne) SetRemark(s string) *PropertyValueUpdateOne
SetRemark sets the "remark" field.
func (*PropertyValueUpdateOne) SetUpdatedAt ¶
func (pvuo *PropertyValueUpdateOne) SetUpdatedAt(t time.Time) *PropertyValueUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PropertyValueUpdateOne) Where ¶
func (pvuo *PropertyValueUpdateOne) Where(ps ...predicate.PropertyValue) *PropertyValueUpdateOne
Where appends a list predicates to the PropertyValueUpdate builder.
type PropertyValues ¶
type PropertyValues []*PropertyValue
PropertyValues is a parsable slice of PropertyValue.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Sku ¶
type Sku struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Delete Time | 删除日期 DeletedAt time.Time `json:"deleted_at,omitempty"` // spu编号 SpuID uint64 `json:"spu_id,omitempty"` // 属性数组,JSON 格式 [{propertId: , valueId: }, {propertId: , valueId: }] Properties []entType.SkuProperty `json:"properties,omitempty"` // 商品价格,单位:分 Price int32 `json:"price,omitempty"` // 市场价,单位:分 MarketPrice int32 `json:"market_price,omitempty"` // 成本价,单位: 分 CostPrice int32 `json:"cost_price,omitempty"` // SKU 的条形码 BarCode string `json:"bar_code,omitempty"` // 图片地址 PicURL string `json:"pic_url,omitempty"` // 库存 Stock int32 `json:"stock,omitempty"` // 商品重量,单位:kg 千克 Weight float64 `json:"weight,omitempty"` // 商品体积,单位:m^3 平米 Volume float64 `json:"volume,omitempty"` // 一级分销的佣金,单位:分 FirstBrokeragePrice int32 `json:"first_brokerage_price,omitempty"` // 二级分销的佣金,单位:分 SecondBrokeragePrice float64 `json:"second_brokerage_price,omitempty"` // 商品销量 SalesCount int32 `json:"sales_count,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SkuQuery when eager-loading is set. Edges SkuEdges `json:"edges"` // contains filtered or unexported fields }
Sku is the model entity for the Sku schema.
func (*Sku) QueryComments ¶
func (s *Sku) QueryComments() *CommentQuery
QueryComments queries the "comments" edge of the Sku entity.
func (*Sku) Unwrap ¶
Unwrap unwraps the Sku entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Sku) Update ¶
func (s *Sku) Update() *SkuUpdateOne
Update returns a builder for updating this Sku. Note that you need to call Sku.Unwrap() before calling this method if this Sku was returned from a transaction, and the transaction was committed or rolled back.
type SkuClient ¶
type SkuClient struct {
// contains filtered or unexported fields
}
SkuClient is a client for the Sku schema.
func NewSkuClient ¶
func NewSkuClient(c config) *SkuClient
NewSkuClient returns a client for the Sku from the given config.
func (*SkuClient) CreateBulk ¶
func (c *SkuClient) CreateBulk(builders ...*SkuCreate) *SkuCreateBulk
CreateBulk returns a builder for creating a bulk of Sku entities.
func (*SkuClient) DeleteOne ¶
func (c *SkuClient) DeleteOne(s *Sku) *SkuDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SkuClient) DeleteOneID ¶
func (c *SkuClient) DeleteOneID(id uint64) *SkuDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SkuClient) Intercept ¶
func (c *SkuClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `sku.Intercept(f(g(h())))`.
func (*SkuClient) Interceptors ¶
func (c *SkuClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SkuClient) MapCreateBulk ¶
func (c *SkuClient) MapCreateBulk(slice any, setFunc func(*SkuCreate, int)) *SkuCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SkuClient) QueryComments ¶
func (c *SkuClient) QueryComments(s *Sku) *CommentQuery
QueryComments queries the comments edge of a Sku.
func (*SkuClient) UpdateOne ¶
func (c *SkuClient) UpdateOne(s *Sku) *SkuUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SkuClient) UpdateOneID ¶
func (c *SkuClient) UpdateOneID(id uint64) *SkuUpdateOne
UpdateOneID returns an update builder for the given id.
type SkuCreate ¶
type SkuCreate struct {
// contains filtered or unexported fields
}
SkuCreate is the builder for creating a Sku entity.
func (*SkuCreate) AddCommentIDs ¶
AddCommentIDs adds the "comments" edge to the Comment entity by IDs.
func (*SkuCreate) AddComments ¶
AddComments adds the "comments" edges to the Comment entity.
func (*SkuCreate) Mutation ¶
func (sc *SkuCreate) Mutation() *SkuMutation
Mutation returns the SkuMutation object of the builder.
func (*SkuCreate) SetBarCode ¶
SetBarCode sets the "bar_code" field.
func (*SkuCreate) SetCostPrice ¶
SetCostPrice sets the "cost_price" field.
func (*SkuCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*SkuCreate) SetDeletedAt ¶
SetDeletedAt sets the "deleted_at" field.
func (*SkuCreate) SetFirstBrokeragePrice ¶
SetFirstBrokeragePrice sets the "first_brokerage_price" field.
func (*SkuCreate) SetMarketPrice ¶
SetMarketPrice sets the "market_price" field.
func (*SkuCreate) SetNillableBarCode ¶
SetNillableBarCode sets the "bar_code" field if the given value is not nil.
func (*SkuCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SkuCreate) SetNillableDeletedAt ¶
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*SkuCreate) SetNillableFirstBrokeragePrice ¶
SetNillableFirstBrokeragePrice sets the "first_brokerage_price" field if the given value is not nil.
func (*SkuCreate) SetNillableMarketPrice ¶
SetNillableMarketPrice sets the "market_price" field if the given value is not nil.
func (*SkuCreate) SetNillableSalesCount ¶
SetNillableSalesCount sets the "sales_count" field if the given value is not nil.
func (*SkuCreate) SetNillableSecondBrokeragePrice ¶
SetNillableSecondBrokeragePrice sets the "second_brokerage_price" field if the given value is not nil.
func (*SkuCreate) SetNillableSpuID ¶
SetNillableSpuID sets the "spu_id" field if the given value is not nil.
func (*SkuCreate) SetNillableSpusID ¶
SetNillableSpusID sets the "spus" edge to the Spu entity by ID if the given value is not nil.
func (*SkuCreate) SetNillableStock ¶
SetNillableStock sets the "stock" field if the given value is not nil.
func (*SkuCreate) SetNillableUpdatedAt ¶
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SkuCreate) SetNillableVolume ¶
SetNillableVolume sets the "volume" field if the given value is not nil.
func (*SkuCreate) SetNillableWeight ¶
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*SkuCreate) SetNotNilBarCode ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilCostPrice ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilDeletedAt ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilFirstBrokeragePrice ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilMarketPrice ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilPicURL ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilPrice ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilProperties ¶
func (s *SkuCreate) SetNotNilProperties(value *[]entType.SkuProperty) *SkuCreate
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilSalesCount ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilSecondBrokeragePrice ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilSpuID ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilStock ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilUpdatedAt ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilVolume ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetNotNilWeight ¶
set field if value's pointer is not nil.
func (*SkuCreate) SetProperties ¶
func (sc *SkuCreate) SetProperties(etp []entType.SkuProperty) *SkuCreate
SetProperties sets the "properties" field.
func (*SkuCreate) SetSalesCount ¶
SetSalesCount sets the "sales_count" field.
func (*SkuCreate) SetSecondBrokeragePrice ¶
SetSecondBrokeragePrice sets the "second_brokerage_price" field.
func (*SkuCreate) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
type SkuCreateBulk ¶
type SkuCreateBulk struct {
// contains filtered or unexported fields
}
SkuCreateBulk is the builder for creating many Sku entities in bulk.
func (*SkuCreateBulk) Exec ¶
func (scb *SkuCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SkuCreateBulk) ExecX ¶
func (scb *SkuCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SkuDelete ¶
type SkuDelete struct {
// contains filtered or unexported fields
}
SkuDelete is the builder for deleting a Sku entity.
func (*SkuDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type SkuDeleteOne ¶
type SkuDeleteOne struct {
// contains filtered or unexported fields
}
SkuDeleteOne is the builder for deleting a single Sku entity.
func (*SkuDeleteOne) Exec ¶
func (sdo *SkuDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SkuDeleteOne) ExecX ¶
func (sdo *SkuDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SkuDeleteOne) Where ¶
func (sdo *SkuDeleteOne) Where(ps ...predicate.Sku) *SkuDeleteOne
Where appends a list predicates to the SkuDelete builder.
type SkuEdges ¶
type SkuEdges struct { // Spus holds the value of the spus edge. Spus *Spu `json:"spus,omitempty"` // Comments holds the value of the comments edge. Comments []*Comment `json:"comments,omitempty"` // contains filtered or unexported fields }
SkuEdges holds the relations/edges for other nodes in the graph.
func (SkuEdges) CommentsOrErr ¶
CommentsOrErr returns the Comments value or an error if the edge was not loaded in eager-loading.
type SkuGroupBy ¶
type SkuGroupBy struct {
// contains filtered or unexported fields
}
SkuGroupBy is the group-by builder for Sku entities.
func (*SkuGroupBy) Aggregate ¶
func (sgb *SkuGroupBy) Aggregate(fns ...AggregateFunc) *SkuGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SkuGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SkuGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SkuGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SkuGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SkuGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SkuGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SkuGroupBy) Scan ¶
func (sgb *SkuGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SkuGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SkuMutation ¶
type SkuMutation struct {
// contains filtered or unexported fields
}
SkuMutation represents an operation that mutates the Sku nodes in the graph.
func (*SkuMutation) AddCommentIDs ¶
func (m *SkuMutation) AddCommentIDs(ids ...uint64)
AddCommentIDs adds the "comments" edge to the Comment entity by ids.
func (*SkuMutation) AddCostPrice ¶
func (m *SkuMutation) AddCostPrice(i int32)
AddCostPrice adds i to the "cost_price" field.
func (*SkuMutation) AddField ¶
func (m *SkuMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SkuMutation) AddFirstBrokeragePrice ¶
func (m *SkuMutation) AddFirstBrokeragePrice(i int32)
AddFirstBrokeragePrice adds i to the "first_brokerage_price" field.
func (*SkuMutation) AddMarketPrice ¶
func (m *SkuMutation) AddMarketPrice(i int32)
AddMarketPrice adds i to the "market_price" field.
func (*SkuMutation) AddPrice ¶
func (m *SkuMutation) AddPrice(i int32)
AddPrice adds i to the "price" field.
func (*SkuMutation) AddSalesCount ¶
func (m *SkuMutation) AddSalesCount(i int32)
AddSalesCount adds i to the "sales_count" field.
func (*SkuMutation) AddSecondBrokeragePrice ¶
func (m *SkuMutation) AddSecondBrokeragePrice(f float64)
AddSecondBrokeragePrice adds f to the "second_brokerage_price" field.
func (*SkuMutation) AddStock ¶
func (m *SkuMutation) AddStock(i int32)
AddStock adds i to the "stock" field.
func (*SkuMutation) AddVolume ¶
func (m *SkuMutation) AddVolume(f float64)
AddVolume adds f to the "volume" field.
func (*SkuMutation) AddWeight ¶
func (m *SkuMutation) AddWeight(f float64)
AddWeight adds f to the "weight" field.
func (*SkuMutation) AddedCostPrice ¶
func (m *SkuMutation) AddedCostPrice() (r int32, exists bool)
AddedCostPrice returns the value that was added to the "cost_price" field in this mutation.
func (*SkuMutation) AddedEdges ¶
func (m *SkuMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SkuMutation) AddedField ¶
func (m *SkuMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SkuMutation) AddedFields ¶
func (m *SkuMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SkuMutation) AddedFirstBrokeragePrice ¶
func (m *SkuMutation) AddedFirstBrokeragePrice() (r int32, exists bool)
AddedFirstBrokeragePrice returns the value that was added to the "first_brokerage_price" field in this mutation.
func (*SkuMutation) AddedIDs ¶
func (m *SkuMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SkuMutation) AddedMarketPrice ¶
func (m *SkuMutation) AddedMarketPrice() (r int32, exists bool)
AddedMarketPrice returns the value that was added to the "market_price" field in this mutation.
func (*SkuMutation) AddedPrice ¶
func (m *SkuMutation) AddedPrice() (r int32, exists bool)
AddedPrice returns the value that was added to the "price" field in this mutation.
func (*SkuMutation) AddedSalesCount ¶
func (m *SkuMutation) AddedSalesCount() (r int32, exists bool)
AddedSalesCount returns the value that was added to the "sales_count" field in this mutation.
func (*SkuMutation) AddedSecondBrokeragePrice ¶
func (m *SkuMutation) AddedSecondBrokeragePrice() (r float64, exists bool)
AddedSecondBrokeragePrice returns the value that was added to the "second_brokerage_price" field in this mutation.
func (*SkuMutation) AddedStock ¶
func (m *SkuMutation) AddedStock() (r int32, exists bool)
AddedStock returns the value that was added to the "stock" field in this mutation.
func (*SkuMutation) AddedVolume ¶
func (m *SkuMutation) AddedVolume() (r float64, exists bool)
AddedVolume returns the value that was added to the "volume" field in this mutation.
func (*SkuMutation) AddedWeight ¶
func (m *SkuMutation) AddedWeight() (r float64, exists bool)
AddedWeight returns the value that was added to the "weight" field in this mutation.
func (*SkuMutation) AppendProperties ¶
func (m *SkuMutation) AppendProperties(etp []entType.SkuProperty)
AppendProperties adds etp to the "properties" field.
func (*SkuMutation) AppendedProperties ¶
func (m *SkuMutation) AppendedProperties() ([]entType.SkuProperty, bool)
AppendedProperties returns the list of values that were appended to the "properties" field in this mutation.
func (*SkuMutation) BarCode ¶
func (m *SkuMutation) BarCode() (r string, exists bool)
BarCode returns the value of the "bar_code" field in the mutation.
func (*SkuMutation) BarCodeCleared ¶
func (m *SkuMutation) BarCodeCleared() bool
BarCodeCleared returns if the "bar_code" field was cleared in this mutation.
func (*SkuMutation) ClearBarCode ¶
func (m *SkuMutation) ClearBarCode()
ClearBarCode clears the value of the "bar_code" field.
func (*SkuMutation) ClearComments ¶
func (m *SkuMutation) ClearComments()
ClearComments clears the "comments" edge to the Comment entity.
func (*SkuMutation) ClearDeletedAt ¶
func (m *SkuMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*SkuMutation) ClearEdge ¶
func (m *SkuMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*SkuMutation) ClearField ¶
func (m *SkuMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*SkuMutation) ClearFirstBrokeragePrice ¶
func (m *SkuMutation) ClearFirstBrokeragePrice()
ClearFirstBrokeragePrice clears the value of the "first_brokerage_price" field.
func (*SkuMutation) ClearMarketPrice ¶
func (m *SkuMutation) ClearMarketPrice()
ClearMarketPrice clears the value of the "market_price" field.
func (*SkuMutation) ClearProperties ¶
func (m *SkuMutation) ClearProperties()
ClearProperties clears the value of the "properties" field.
func (*SkuMutation) ClearSalesCount ¶
func (m *SkuMutation) ClearSalesCount()
ClearSalesCount clears the value of the "sales_count" field.
func (*SkuMutation) ClearSecondBrokeragePrice ¶
func (m *SkuMutation) ClearSecondBrokeragePrice()
ClearSecondBrokeragePrice clears the value of the "second_brokerage_price" field.
func (*SkuMutation) ClearSpuID ¶
func (m *SkuMutation) ClearSpuID()
ClearSpuID clears the value of the "spu_id" field.
func (*SkuMutation) ClearSpus ¶
func (m *SkuMutation) ClearSpus()
ClearSpus clears the "spus" edge to the Spu entity.
func (*SkuMutation) ClearStock ¶
func (m *SkuMutation) ClearStock()
ClearStock clears the value of the "stock" field.
func (*SkuMutation) ClearVolume ¶
func (m *SkuMutation) ClearVolume()
ClearVolume clears the value of the "volume" field.
func (*SkuMutation) ClearWeight ¶
func (m *SkuMutation) ClearWeight()
ClearWeight clears the value of the "weight" field.
func (*SkuMutation) ClearedEdges ¶
func (m *SkuMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SkuMutation) ClearedFields ¶
func (m *SkuMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SkuMutation) Client ¶
func (m SkuMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*SkuMutation) CommentsCleared ¶
func (m *SkuMutation) CommentsCleared() bool
CommentsCleared reports if the "comments" edge to the Comment entity was cleared.
func (*SkuMutation) CommentsIDs ¶
func (m *SkuMutation) CommentsIDs() (ids []uint64)
CommentsIDs returns the "comments" edge IDs in the mutation.
func (*SkuMutation) CostPrice ¶
func (m *SkuMutation) CostPrice() (r int32, exists bool)
CostPrice returns the value of the "cost_price" field in the mutation.
func (*SkuMutation) CreatedAt ¶
func (m *SkuMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SkuMutation) DeletedAt ¶
func (m *SkuMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*SkuMutation) DeletedAtCleared ¶
func (m *SkuMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*SkuMutation) EdgeCleared ¶
func (m *SkuMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SkuMutation) Field ¶
func (m *SkuMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SkuMutation) FieldCleared ¶
func (m *SkuMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SkuMutation) Fields ¶
func (m *SkuMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*SkuMutation) FirstBrokeragePrice ¶
func (m *SkuMutation) FirstBrokeragePrice() (r int32, exists bool)
FirstBrokeragePrice returns the value of the "first_brokerage_price" field in the mutation.
func (*SkuMutation) FirstBrokeragePriceCleared ¶
func (m *SkuMutation) FirstBrokeragePriceCleared() bool
FirstBrokeragePriceCleared returns if the "first_brokerage_price" field was cleared in this mutation.
func (*SkuMutation) ID ¶
func (m *SkuMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SkuMutation) IDs ¶
func (m *SkuMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SkuMutation) MarketPrice ¶
func (m *SkuMutation) MarketPrice() (r int32, exists bool)
MarketPrice returns the value of the "market_price" field in the mutation.
func (*SkuMutation) MarketPriceCleared ¶
func (m *SkuMutation) MarketPriceCleared() bool
MarketPriceCleared returns if the "market_price" field was cleared in this mutation.
func (*SkuMutation) OldBarCode ¶
func (m *SkuMutation) OldBarCode(ctx context.Context) (v string, err error)
OldBarCode returns the old "bar_code" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldCostPrice ¶
func (m *SkuMutation) OldCostPrice(ctx context.Context) (v int32, err error)
OldCostPrice returns the old "cost_price" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*SkuMutation) OldFirstBrokeragePrice ¶
func (m *SkuMutation) OldFirstBrokeragePrice(ctx context.Context) (v int32, err error)
OldFirstBrokeragePrice returns the old "first_brokerage_price" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldMarketPrice ¶
func (m *SkuMutation) OldMarketPrice(ctx context.Context) (v int32, err error)
OldMarketPrice returns the old "market_price" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldPicURL ¶
func (m *SkuMutation) OldPicURL(ctx context.Context) (v string, err error)
OldPicURL returns the old "pic_url" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldPrice ¶
func (m *SkuMutation) OldPrice(ctx context.Context) (v int32, err error)
OldPrice returns the old "price" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldProperties ¶
func (m *SkuMutation) OldProperties(ctx context.Context) (v []entType.SkuProperty, err error)
OldProperties returns the old "properties" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldSalesCount ¶
func (m *SkuMutation) OldSalesCount(ctx context.Context) (v int32, err error)
OldSalesCount returns the old "sales_count" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldSecondBrokeragePrice ¶
func (m *SkuMutation) OldSecondBrokeragePrice(ctx context.Context) (v float64, err error)
OldSecondBrokeragePrice returns the old "second_brokerage_price" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldSpuID ¶
func (m *SkuMutation) OldSpuID(ctx context.Context) (v uint64, err error)
OldSpuID returns the old "spu_id" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldStock ¶
func (m *SkuMutation) OldStock(ctx context.Context) (v int32, err error)
OldStock returns the old "stock" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldVolume ¶
func (m *SkuMutation) OldVolume(ctx context.Context) (v float64, err error)
OldVolume returns the old "volume" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) OldWeight ¶
func (m *SkuMutation) OldWeight(ctx context.Context) (v float64, err error)
OldWeight returns the old "weight" field's value of the Sku entity. If the Sku object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SkuMutation) PicURL ¶
func (m *SkuMutation) PicURL() (r string, exists bool)
PicURL returns the value of the "pic_url" field in the mutation.
func (*SkuMutation) Price ¶
func (m *SkuMutation) Price() (r int32, exists bool)
Price returns the value of the "price" field in the mutation.
func (*SkuMutation) Properties ¶
func (m *SkuMutation) Properties() (r []entType.SkuProperty, exists bool)
Properties returns the value of the "properties" field in the mutation.
func (*SkuMutation) PropertiesCleared ¶
func (m *SkuMutation) PropertiesCleared() bool
PropertiesCleared returns if the "properties" field was cleared in this mutation.
func (*SkuMutation) RemoveCommentIDs ¶
func (m *SkuMutation) RemoveCommentIDs(ids ...uint64)
RemoveCommentIDs removes the "comments" edge to the Comment entity by IDs.
func (*SkuMutation) RemovedCommentsIDs ¶
func (m *SkuMutation) RemovedCommentsIDs() (ids []uint64)
RemovedComments returns the removed IDs of the "comments" edge to the Comment entity.
func (*SkuMutation) RemovedEdges ¶
func (m *SkuMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SkuMutation) RemovedIDs ¶
func (m *SkuMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*SkuMutation) ResetBarCode ¶
func (m *SkuMutation) ResetBarCode()
ResetBarCode resets all changes to the "bar_code" field.
func (*SkuMutation) ResetComments ¶
func (m *SkuMutation) ResetComments()
ResetComments resets all changes to the "comments" edge.
func (*SkuMutation) ResetCostPrice ¶
func (m *SkuMutation) ResetCostPrice()
ResetCostPrice resets all changes to the "cost_price" field.
func (*SkuMutation) ResetCreatedAt ¶
func (m *SkuMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SkuMutation) ResetDeletedAt ¶
func (m *SkuMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*SkuMutation) ResetEdge ¶
func (m *SkuMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*SkuMutation) ResetField ¶
func (m *SkuMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*SkuMutation) ResetFirstBrokeragePrice ¶
func (m *SkuMutation) ResetFirstBrokeragePrice()
ResetFirstBrokeragePrice resets all changes to the "first_brokerage_price" field.
func (*SkuMutation) ResetMarketPrice ¶
func (m *SkuMutation) ResetMarketPrice()
ResetMarketPrice resets all changes to the "market_price" field.
func (*SkuMutation) ResetPicURL ¶
func (m *SkuMutation) ResetPicURL()
ResetPicURL resets all changes to the "pic_url" field.
func (*SkuMutation) ResetPrice ¶
func (m *SkuMutation) ResetPrice()
ResetPrice resets all changes to the "price" field.
func (*SkuMutation) ResetProperties ¶
func (m *SkuMutation) ResetProperties()
ResetProperties resets all changes to the "properties" field.
func (*SkuMutation) ResetSalesCount ¶
func (m *SkuMutation) ResetSalesCount()
ResetSalesCount resets all changes to the "sales_count" field.
func (*SkuMutation) ResetSecondBrokeragePrice ¶
func (m *SkuMutation) ResetSecondBrokeragePrice()
ResetSecondBrokeragePrice resets all changes to the "second_brokerage_price" field.
func (*SkuMutation) ResetSpuID ¶
func (m *SkuMutation) ResetSpuID()
ResetSpuID resets all changes to the "spu_id" field.
func (*SkuMutation) ResetSpus ¶
func (m *SkuMutation) ResetSpus()
ResetSpus resets all changes to the "spus" edge.
func (*SkuMutation) ResetStock ¶
func (m *SkuMutation) ResetStock()
ResetStock resets all changes to the "stock" field.
func (*SkuMutation) ResetUpdatedAt ¶
func (m *SkuMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SkuMutation) ResetVolume ¶
func (m *SkuMutation) ResetVolume()
ResetVolume resets all changes to the "volume" field.
func (*SkuMutation) ResetWeight ¶
func (m *SkuMutation) ResetWeight()
ResetWeight resets all changes to the "weight" field.
func (*SkuMutation) SalesCount ¶
func (m *SkuMutation) SalesCount() (r int32, exists bool)
SalesCount returns the value of the "sales_count" field in the mutation.
func (*SkuMutation) SalesCountCleared ¶
func (m *SkuMutation) SalesCountCleared() bool
SalesCountCleared returns if the "sales_count" field was cleared in this mutation.
func (*SkuMutation) SecondBrokeragePrice ¶
func (m *SkuMutation) SecondBrokeragePrice() (r float64, exists bool)
SecondBrokeragePrice returns the value of the "second_brokerage_price" field in the mutation.
func (*SkuMutation) SecondBrokeragePriceCleared ¶
func (m *SkuMutation) SecondBrokeragePriceCleared() bool
SecondBrokeragePriceCleared returns if the "second_brokerage_price" field was cleared in this mutation.
func (*SkuMutation) SetBarCode ¶
func (m *SkuMutation) SetBarCode(s string)
SetBarCode sets the "bar_code" field.
func (*SkuMutation) SetCostPrice ¶
func (m *SkuMutation) SetCostPrice(i int32)
SetCostPrice sets the "cost_price" field.
func (*SkuMutation) SetCreatedAt ¶
func (m *SkuMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SkuMutation) SetDeletedAt ¶
func (m *SkuMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*SkuMutation) SetField ¶
func (m *SkuMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SkuMutation) SetFirstBrokeragePrice ¶
func (m *SkuMutation) SetFirstBrokeragePrice(i int32)
SetFirstBrokeragePrice sets the "first_brokerage_price" field.
func (*SkuMutation) SetID ¶
func (m *SkuMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Sku entities.
func (*SkuMutation) SetMarketPrice ¶
func (m *SkuMutation) SetMarketPrice(i int32)
SetMarketPrice sets the "market_price" field.
func (*SkuMutation) SetOp ¶
func (m *SkuMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SkuMutation) SetPicURL ¶
func (m *SkuMutation) SetPicURL(s string)
SetPicURL sets the "pic_url" field.
func (*SkuMutation) SetPrice ¶
func (m *SkuMutation) SetPrice(i int32)
SetPrice sets the "price" field.
func (*SkuMutation) SetProperties ¶
func (m *SkuMutation) SetProperties(etp []entType.SkuProperty)
SetProperties sets the "properties" field.
func (*SkuMutation) SetSalesCount ¶
func (m *SkuMutation) SetSalesCount(i int32)
SetSalesCount sets the "sales_count" field.
func (*SkuMutation) SetSecondBrokeragePrice ¶
func (m *SkuMutation) SetSecondBrokeragePrice(f float64)
SetSecondBrokeragePrice sets the "second_brokerage_price" field.
func (*SkuMutation) SetSpuID ¶
func (m *SkuMutation) SetSpuID(u uint64)
SetSpuID sets the "spu_id" field.
func (*SkuMutation) SetSpusID ¶
func (m *SkuMutation) SetSpusID(id uint64)
SetSpusID sets the "spus" edge to the Spu entity by id.
func (*SkuMutation) SetStock ¶
func (m *SkuMutation) SetStock(i int32)
SetStock sets the "stock" field.
func (*SkuMutation) SetUpdatedAt ¶
func (m *SkuMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*SkuMutation) SetVolume ¶
func (m *SkuMutation) SetVolume(f float64)
SetVolume sets the "volume" field.
func (*SkuMutation) SetWeight ¶
func (m *SkuMutation) SetWeight(f float64)
SetWeight sets the "weight" field.
func (*SkuMutation) SpuID ¶
func (m *SkuMutation) SpuID() (r uint64, exists bool)
SpuID returns the value of the "spu_id" field in the mutation.
func (*SkuMutation) SpuIDCleared ¶
func (m *SkuMutation) SpuIDCleared() bool
SpuIDCleared returns if the "spu_id" field was cleared in this mutation.
func (*SkuMutation) SpusCleared ¶
func (m *SkuMutation) SpusCleared() bool
SpusCleared reports if the "spus" edge to the Spu entity was cleared.
func (*SkuMutation) SpusID ¶
func (m *SkuMutation) SpusID() (id uint64, exists bool)
SpusID returns the "spus" edge ID in the mutation.
func (*SkuMutation) SpusIDs ¶
func (m *SkuMutation) SpusIDs() (ids []uint64)
SpusIDs returns the "spus" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SpusID instead. It exists only for internal usage by the builders.
func (*SkuMutation) Stock ¶
func (m *SkuMutation) Stock() (r int32, exists bool)
Stock returns the value of the "stock" field in the mutation.
func (*SkuMutation) StockCleared ¶
func (m *SkuMutation) StockCleared() bool
StockCleared returns if the "stock" field was cleared in this mutation.
func (SkuMutation) Tx ¶
func (m SkuMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SkuMutation) Type ¶
func (m *SkuMutation) Type() string
Type returns the node type of this mutation (Sku).
func (*SkuMutation) UpdatedAt ¶
func (m *SkuMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*SkuMutation) Volume ¶
func (m *SkuMutation) Volume() (r float64, exists bool)
Volume returns the value of the "volume" field in the mutation.
func (*SkuMutation) VolumeCleared ¶
func (m *SkuMutation) VolumeCleared() bool
VolumeCleared returns if the "volume" field was cleared in this mutation.
func (*SkuMutation) Weight ¶
func (m *SkuMutation) Weight() (r float64, exists bool)
Weight returns the value of the "weight" field in the mutation.
func (*SkuMutation) WeightCleared ¶
func (m *SkuMutation) WeightCleared() bool
WeightCleared returns if the "weight" field was cleared in this mutation.
func (*SkuMutation) Where ¶
func (m *SkuMutation) Where(ps ...predicate.Sku)
Where appends a list predicates to the SkuMutation builder.
func (*SkuMutation) WhereP ¶
func (m *SkuMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SkuMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SkuPageList ¶
type SkuPageList struct { List []*Sku `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
SkuPageList is Sku PageList result.
type SkuPager ¶
type SkuPager struct { Order sku.OrderOption Filter func(*SkuQuery) (*SkuQuery, error) }
type SkuPaginateOption ¶
type SkuPaginateOption func(*SkuPager)
SkuPaginateOption enables pagination customization.
type SkuQuery ¶
type SkuQuery struct {
// contains filtered or unexported fields
}
SkuQuery is the builder for querying Sku entities.
func (*SkuQuery) Aggregate ¶
func (sq *SkuQuery) Aggregate(fns ...AggregateFunc) *SkuSelect
Aggregate returns a SkuSelect configured with the given aggregations.
func (*SkuQuery) Clone ¶
Clone returns a duplicate of the SkuQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SkuQuery) First ¶
First returns the first Sku entity from the query. Returns a *NotFoundError when no Sku was found.
func (*SkuQuery) FirstID ¶
FirstID returns the first Sku ID from the query. Returns a *NotFoundError when no Sku ID was found.
func (*SkuQuery) GroupBy ¶
func (sq *SkuQuery) GroupBy(field string, fields ...string) *SkuGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Sku.Query(). GroupBy(sku.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SkuQuery) Only ¶
Only returns a single Sku entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Sku entity is found. Returns a *NotFoundError when no Sku entities are found.
func (*SkuQuery) OnlyID ¶
OnlyID is like Only, but returns the only Sku ID in the query. Returns a *NotSingularError when more than one Sku ID is found. Returns a *NotFoundError when no entities are found.
func (*SkuQuery) Order ¶
func (sq *SkuQuery) Order(o ...sku.OrderOption) *SkuQuery
Order specifies how the records should be ordered.
func (*SkuQuery) Page ¶
func (s *SkuQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...SkuPaginateOption, ) (*SkuPageList, error)
func (*SkuQuery) QueryComments ¶
func (sq *SkuQuery) QueryComments() *CommentQuery
QueryComments chains the current query on the "comments" edge.
func (*SkuQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Sku.Query(). Select(sku.FieldCreatedAt). Scan(ctx, &v)
func (*SkuQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*SkuQuery) WithComments ¶
func (sq *SkuQuery) WithComments(opts ...func(*CommentQuery)) *SkuQuery
WithComments tells the query-builder to eager-load the nodes that are connected to the "comments" edge. The optional arguments are used to configure the query builder of the edge.
type SkuSelect ¶
type SkuSelect struct { *SkuQuery // contains filtered or unexported fields }
SkuSelect is the builder for selecting fields of Sku entities.
func (*SkuSelect) Aggregate ¶
func (ss *SkuSelect) Aggregate(fns ...AggregateFunc) *SkuSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SkuSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SkuSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SkuSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SkuSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SkuSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SkuSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SkuSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SkuUpdate ¶
type SkuUpdate struct {
// contains filtered or unexported fields
}
SkuUpdate is the builder for updating Sku entities.
func (*SkuUpdate) AddCommentIDs ¶
AddCommentIDs adds the "comments" edge to the Comment entity by IDs.
func (*SkuUpdate) AddComments ¶
AddComments adds the "comments" edges to the Comment entity.
func (*SkuUpdate) AddCostPrice ¶
AddCostPrice adds i to the "cost_price" field.
func (*SkuUpdate) AddFirstBrokeragePrice ¶
AddFirstBrokeragePrice adds i to the "first_brokerage_price" field.
func (*SkuUpdate) AddMarketPrice ¶
AddMarketPrice adds i to the "market_price" field.
func (*SkuUpdate) AddSalesCount ¶
AddSalesCount adds i to the "sales_count" field.
func (*SkuUpdate) AddSecondBrokeragePrice ¶
AddSecondBrokeragePrice adds f to the "second_brokerage_price" field.
func (*SkuUpdate) AppendProperties ¶
func (su *SkuUpdate) AppendProperties(etp []entType.SkuProperty) *SkuUpdate
AppendProperties appends etp to the "properties" field.
func (*SkuUpdate) ClearBarCode ¶
ClearBarCode clears the value of the "bar_code" field.
func (*SkuUpdate) ClearComments ¶
ClearComments clears all "comments" edges to the Comment entity.
func (*SkuUpdate) ClearDeletedAt ¶
ClearDeletedAt clears the value of the "deleted_at" field.
func (*SkuUpdate) ClearFirstBrokeragePrice ¶
ClearFirstBrokeragePrice clears the value of the "first_brokerage_price" field.
func (*SkuUpdate) ClearMarketPrice ¶
ClearMarketPrice clears the value of the "market_price" field.
func (*SkuUpdate) ClearProperties ¶
ClearProperties clears the value of the "properties" field.
func (*SkuUpdate) ClearSalesCount ¶
ClearSalesCount clears the value of the "sales_count" field.
func (*SkuUpdate) ClearSecondBrokeragePrice ¶
ClearSecondBrokeragePrice clears the value of the "second_brokerage_price" field.
func (*SkuUpdate) ClearSpuID ¶
ClearSpuID clears the value of the "spu_id" field.
func (*SkuUpdate) ClearStock ¶
ClearStock clears the value of the "stock" field.
func (*SkuUpdate) ClearVolume ¶
ClearVolume clears the value of the "volume" field.
func (*SkuUpdate) ClearWeight ¶
ClearWeight clears the value of the "weight" field.
func (*SkuUpdate) Mutation ¶
func (su *SkuUpdate) Mutation() *SkuMutation
Mutation returns the SkuMutation object of the builder.
func (*SkuUpdate) RemoveCommentIDs ¶
RemoveCommentIDs removes the "comments" edge to Comment entities by IDs.
func (*SkuUpdate) RemoveComments ¶
RemoveComments removes "comments" edges to Comment entities.
func (*SkuUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*SkuUpdate) SetBarCode ¶
SetBarCode sets the "bar_code" field.
func (*SkuUpdate) SetCostPrice ¶
SetCostPrice sets the "cost_price" field.
func (*SkuUpdate) SetDeletedAt ¶
SetDeletedAt sets the "deleted_at" field.
func (*SkuUpdate) SetFirstBrokeragePrice ¶
SetFirstBrokeragePrice sets the "first_brokerage_price" field.
func (*SkuUpdate) SetMarketPrice ¶
SetMarketPrice sets the "market_price" field.
func (*SkuUpdate) SetNillableBarCode ¶
SetNillableBarCode sets the "bar_code" field if the given value is not nil.
func (*SkuUpdate) SetNillableDeletedAt ¶
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*SkuUpdate) SetNillableFirstBrokeragePrice ¶
SetNillableFirstBrokeragePrice sets the "first_brokerage_price" field if the given value is not nil.
func (*SkuUpdate) SetNillableMarketPrice ¶
SetNillableMarketPrice sets the "market_price" field if the given value is not nil.
func (*SkuUpdate) SetNillableSalesCount ¶
SetNillableSalesCount sets the "sales_count" field if the given value is not nil.
func (*SkuUpdate) SetNillableSecondBrokeragePrice ¶
SetNillableSecondBrokeragePrice sets the "second_brokerage_price" field if the given value is not nil.
func (*SkuUpdate) SetNillableSpuID ¶
SetNillableSpuID sets the "spu_id" field if the given value is not nil.
func (*SkuUpdate) SetNillableSpusID ¶
SetNillableSpusID sets the "spus" edge to the Spu entity by ID if the given value is not nil.
func (*SkuUpdate) SetNillableStock ¶
SetNillableStock sets the "stock" field if the given value is not nil.
func (*SkuUpdate) SetNillableVolume ¶
SetNillableVolume sets the "volume" field if the given value is not nil.
func (*SkuUpdate) SetNillableWeight ¶
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*SkuUpdate) SetNotNilBarCode ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilCostPrice ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilDeletedAt ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilFirstBrokeragePrice ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilMarketPrice ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilPicURL ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilPrice ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilProperties ¶
func (s *SkuUpdate) SetNotNilProperties(value *[]entType.SkuProperty) *SkuUpdate
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilSalesCount ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilSecondBrokeragePrice ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilSpuID ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilStock ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilUpdatedAt ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilVolume ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetNotNilWeight ¶
set field if value's pointer is not nil.
func (*SkuUpdate) SetProperties ¶
func (su *SkuUpdate) SetProperties(etp []entType.SkuProperty) *SkuUpdate
SetProperties sets the "properties" field.
func (*SkuUpdate) SetSalesCount ¶
SetSalesCount sets the "sales_count" field.
func (*SkuUpdate) SetSecondBrokeragePrice ¶
SetSecondBrokeragePrice sets the "second_brokerage_price" field.
func (*SkuUpdate) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
type SkuUpdateOne ¶
type SkuUpdateOne struct {
// contains filtered or unexported fields
}
SkuUpdateOne is the builder for updating a single Sku entity.
func (*SkuUpdateOne) AddCommentIDs ¶
func (suo *SkuUpdateOne) AddCommentIDs(ids ...uint64) *SkuUpdateOne
AddCommentIDs adds the "comments" edge to the Comment entity by IDs.
func (*SkuUpdateOne) AddComments ¶
func (suo *SkuUpdateOne) AddComments(c ...*Comment) *SkuUpdateOne
AddComments adds the "comments" edges to the Comment entity.
func (*SkuUpdateOne) AddCostPrice ¶
func (suo *SkuUpdateOne) AddCostPrice(i int32) *SkuUpdateOne
AddCostPrice adds i to the "cost_price" field.
func (*SkuUpdateOne) AddFirstBrokeragePrice ¶
func (suo *SkuUpdateOne) AddFirstBrokeragePrice(i int32) *SkuUpdateOne
AddFirstBrokeragePrice adds i to the "first_brokerage_price" field.
func (*SkuUpdateOne) AddMarketPrice ¶
func (suo *SkuUpdateOne) AddMarketPrice(i int32) *SkuUpdateOne
AddMarketPrice adds i to the "market_price" field.
func (*SkuUpdateOne) AddPrice ¶
func (suo *SkuUpdateOne) AddPrice(i int32) *SkuUpdateOne
AddPrice adds i to the "price" field.
func (*SkuUpdateOne) AddSalesCount ¶
func (suo *SkuUpdateOne) AddSalesCount(i int32) *SkuUpdateOne
AddSalesCount adds i to the "sales_count" field.
func (*SkuUpdateOne) AddSecondBrokeragePrice ¶
func (suo *SkuUpdateOne) AddSecondBrokeragePrice(f float64) *SkuUpdateOne
AddSecondBrokeragePrice adds f to the "second_brokerage_price" field.
func (*SkuUpdateOne) AddStock ¶
func (suo *SkuUpdateOne) AddStock(i int32) *SkuUpdateOne
AddStock adds i to the "stock" field.
func (*SkuUpdateOne) AddVolume ¶
func (suo *SkuUpdateOne) AddVolume(f float64) *SkuUpdateOne
AddVolume adds f to the "volume" field.
func (*SkuUpdateOne) AddWeight ¶
func (suo *SkuUpdateOne) AddWeight(f float64) *SkuUpdateOne
AddWeight adds f to the "weight" field.
func (*SkuUpdateOne) AppendProperties ¶
func (suo *SkuUpdateOne) AppendProperties(etp []entType.SkuProperty) *SkuUpdateOne
AppendProperties appends etp to the "properties" field.
func (*SkuUpdateOne) ClearBarCode ¶
func (suo *SkuUpdateOne) ClearBarCode() *SkuUpdateOne
ClearBarCode clears the value of the "bar_code" field.
func (*SkuUpdateOne) ClearComments ¶
func (suo *SkuUpdateOne) ClearComments() *SkuUpdateOne
ClearComments clears all "comments" edges to the Comment entity.
func (*SkuUpdateOne) ClearDeletedAt ¶
func (suo *SkuUpdateOne) ClearDeletedAt() *SkuUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*SkuUpdateOne) ClearFirstBrokeragePrice ¶
func (suo *SkuUpdateOne) ClearFirstBrokeragePrice() *SkuUpdateOne
ClearFirstBrokeragePrice clears the value of the "first_brokerage_price" field.
func (*SkuUpdateOne) ClearMarketPrice ¶
func (suo *SkuUpdateOne) ClearMarketPrice() *SkuUpdateOne
ClearMarketPrice clears the value of the "market_price" field.
func (*SkuUpdateOne) ClearProperties ¶
func (suo *SkuUpdateOne) ClearProperties() *SkuUpdateOne
ClearProperties clears the value of the "properties" field.
func (*SkuUpdateOne) ClearSalesCount ¶
func (suo *SkuUpdateOne) ClearSalesCount() *SkuUpdateOne
ClearSalesCount clears the value of the "sales_count" field.
func (*SkuUpdateOne) ClearSecondBrokeragePrice ¶
func (suo *SkuUpdateOne) ClearSecondBrokeragePrice() *SkuUpdateOne
ClearSecondBrokeragePrice clears the value of the "second_brokerage_price" field.
func (*SkuUpdateOne) ClearSpuID ¶
func (suo *SkuUpdateOne) ClearSpuID() *SkuUpdateOne
ClearSpuID clears the value of the "spu_id" field.
func (*SkuUpdateOne) ClearSpus ¶
func (suo *SkuUpdateOne) ClearSpus() *SkuUpdateOne
ClearSpus clears the "spus" edge to the Spu entity.
func (*SkuUpdateOne) ClearStock ¶
func (suo *SkuUpdateOne) ClearStock() *SkuUpdateOne
ClearStock clears the value of the "stock" field.
func (*SkuUpdateOne) ClearVolume ¶
func (suo *SkuUpdateOne) ClearVolume() *SkuUpdateOne
ClearVolume clears the value of the "volume" field.
func (*SkuUpdateOne) ClearWeight ¶
func (suo *SkuUpdateOne) ClearWeight() *SkuUpdateOne
ClearWeight clears the value of the "weight" field.
func (*SkuUpdateOne) Exec ¶
func (suo *SkuUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SkuUpdateOne) ExecX ¶
func (suo *SkuUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SkuUpdateOne) Mutation ¶
func (suo *SkuUpdateOne) Mutation() *SkuMutation
Mutation returns the SkuMutation object of the builder.
func (*SkuUpdateOne) RemoveCommentIDs ¶
func (suo *SkuUpdateOne) RemoveCommentIDs(ids ...uint64) *SkuUpdateOne
RemoveCommentIDs removes the "comments" edge to Comment entities by IDs.
func (*SkuUpdateOne) RemoveComments ¶
func (suo *SkuUpdateOne) RemoveComments(c ...*Comment) *SkuUpdateOne
RemoveComments removes "comments" edges to Comment entities.
func (*SkuUpdateOne) Save ¶
func (suo *SkuUpdateOne) Save(ctx context.Context) (*Sku, error)
Save executes the query and returns the updated Sku entity.
func (*SkuUpdateOne) SaveX ¶
func (suo *SkuUpdateOne) SaveX(ctx context.Context) *Sku
SaveX is like Save, but panics if an error occurs.
func (*SkuUpdateOne) Select ¶
func (suo *SkuUpdateOne) Select(field string, fields ...string) *SkuUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SkuUpdateOne) SetBarCode ¶
func (suo *SkuUpdateOne) SetBarCode(s string) *SkuUpdateOne
SetBarCode sets the "bar_code" field.
func (*SkuUpdateOne) SetCostPrice ¶
func (suo *SkuUpdateOne) SetCostPrice(i int32) *SkuUpdateOne
SetCostPrice sets the "cost_price" field.
func (*SkuUpdateOne) SetDeletedAt ¶
func (suo *SkuUpdateOne) SetDeletedAt(t time.Time) *SkuUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*SkuUpdateOne) SetFirstBrokeragePrice ¶
func (suo *SkuUpdateOne) SetFirstBrokeragePrice(i int32) *SkuUpdateOne
SetFirstBrokeragePrice sets the "first_brokerage_price" field.
func (*SkuUpdateOne) SetMarketPrice ¶
func (suo *SkuUpdateOne) SetMarketPrice(i int32) *SkuUpdateOne
SetMarketPrice sets the "market_price" field.
func (*SkuUpdateOne) SetNillableBarCode ¶
func (suo *SkuUpdateOne) SetNillableBarCode(s *string) *SkuUpdateOne
SetNillableBarCode sets the "bar_code" field if the given value is not nil.
func (*SkuUpdateOne) SetNillableDeletedAt ¶
func (suo *SkuUpdateOne) SetNillableDeletedAt(t *time.Time) *SkuUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*SkuUpdateOne) SetNillableFirstBrokeragePrice ¶
func (suo *SkuUpdateOne) SetNillableFirstBrokeragePrice(i *int32) *SkuUpdateOne
SetNillableFirstBrokeragePrice sets the "first_brokerage_price" field if the given value is not nil.
func (*SkuUpdateOne) SetNillableMarketPrice ¶
func (suo *SkuUpdateOne) SetNillableMarketPrice(i *int32) *SkuUpdateOne
SetNillableMarketPrice sets the "market_price" field if the given value is not nil.
func (*SkuUpdateOne) SetNillableSalesCount ¶
func (suo *SkuUpdateOne) SetNillableSalesCount(i *int32) *SkuUpdateOne
SetNillableSalesCount sets the "sales_count" field if the given value is not nil.
func (*SkuUpdateOne) SetNillableSecondBrokeragePrice ¶
func (suo *SkuUpdateOne) SetNillableSecondBrokeragePrice(f *float64) *SkuUpdateOne
SetNillableSecondBrokeragePrice sets the "second_brokerage_price" field if the given value is not nil.
func (*SkuUpdateOne) SetNillableSpuID ¶
func (suo *SkuUpdateOne) SetNillableSpuID(u *uint64) *SkuUpdateOne
SetNillableSpuID sets the "spu_id" field if the given value is not nil.
func (*SkuUpdateOne) SetNillableSpusID ¶
func (suo *SkuUpdateOne) SetNillableSpusID(id *uint64) *SkuUpdateOne
SetNillableSpusID sets the "spus" edge to the Spu entity by ID if the given value is not nil.
func (*SkuUpdateOne) SetNillableStock ¶
func (suo *SkuUpdateOne) SetNillableStock(i *int32) *SkuUpdateOne
SetNillableStock sets the "stock" field if the given value is not nil.
func (*SkuUpdateOne) SetNillableVolume ¶
func (suo *SkuUpdateOne) SetNillableVolume(f *float64) *SkuUpdateOne
SetNillableVolume sets the "volume" field if the given value is not nil.
func (*SkuUpdateOne) SetNillableWeight ¶
func (suo *SkuUpdateOne) SetNillableWeight(f *float64) *SkuUpdateOne
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*SkuUpdateOne) SetNotNilBarCode ¶
func (s *SkuUpdateOne) SetNotNilBarCode(value *string) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilCostPrice ¶
func (s *SkuUpdateOne) SetNotNilCostPrice(value *int32) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilDeletedAt ¶
func (s *SkuUpdateOne) SetNotNilDeletedAt(value *time.Time) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilFirstBrokeragePrice ¶
func (s *SkuUpdateOne) SetNotNilFirstBrokeragePrice(value *int32) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilMarketPrice ¶
func (s *SkuUpdateOne) SetNotNilMarketPrice(value *int32) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilPicURL ¶
func (s *SkuUpdateOne) SetNotNilPicURL(value *string) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilPrice ¶
func (s *SkuUpdateOne) SetNotNilPrice(value *int32) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilProperties ¶
func (s *SkuUpdateOne) SetNotNilProperties(value *[]entType.SkuProperty) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilSalesCount ¶
func (s *SkuUpdateOne) SetNotNilSalesCount(value *int32) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilSecondBrokeragePrice ¶
func (s *SkuUpdateOne) SetNotNilSecondBrokeragePrice(value *float64) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilSpuID ¶
func (s *SkuUpdateOne) SetNotNilSpuID(value *uint64) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilStock ¶
func (s *SkuUpdateOne) SetNotNilStock(value *int32) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilUpdatedAt ¶
func (s *SkuUpdateOne) SetNotNilUpdatedAt(value *time.Time) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilVolume ¶
func (s *SkuUpdateOne) SetNotNilVolume(value *float64) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetNotNilWeight ¶
func (s *SkuUpdateOne) SetNotNilWeight(value *float64) *SkuUpdateOne
set field if value's pointer is not nil.
func (*SkuUpdateOne) SetPicURL ¶
func (suo *SkuUpdateOne) SetPicURL(s string) *SkuUpdateOne
SetPicURL sets the "pic_url" field.
func (*SkuUpdateOne) SetPrice ¶
func (suo *SkuUpdateOne) SetPrice(i int32) *SkuUpdateOne
SetPrice sets the "price" field.
func (*SkuUpdateOne) SetProperties ¶
func (suo *SkuUpdateOne) SetProperties(etp []entType.SkuProperty) *SkuUpdateOne
SetProperties sets the "properties" field.
func (*SkuUpdateOne) SetSalesCount ¶
func (suo *SkuUpdateOne) SetSalesCount(i int32) *SkuUpdateOne
SetSalesCount sets the "sales_count" field.
func (*SkuUpdateOne) SetSecondBrokeragePrice ¶
func (suo *SkuUpdateOne) SetSecondBrokeragePrice(f float64) *SkuUpdateOne
SetSecondBrokeragePrice sets the "second_brokerage_price" field.
func (*SkuUpdateOne) SetSpuID ¶
func (suo *SkuUpdateOne) SetSpuID(u uint64) *SkuUpdateOne
SetSpuID sets the "spu_id" field.
func (*SkuUpdateOne) SetSpus ¶
func (suo *SkuUpdateOne) SetSpus(s *Spu) *SkuUpdateOne
SetSpus sets the "spus" edge to the Spu entity.
func (*SkuUpdateOne) SetSpusID ¶
func (suo *SkuUpdateOne) SetSpusID(id uint64) *SkuUpdateOne
SetSpusID sets the "spus" edge to the Spu entity by ID.
func (*SkuUpdateOne) SetStock ¶
func (suo *SkuUpdateOne) SetStock(i int32) *SkuUpdateOne
SetStock sets the "stock" field.
func (*SkuUpdateOne) SetUpdatedAt ¶
func (suo *SkuUpdateOne) SetUpdatedAt(t time.Time) *SkuUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*SkuUpdateOne) SetVolume ¶
func (suo *SkuUpdateOne) SetVolume(f float64) *SkuUpdateOne
SetVolume sets the "volume" field.
func (*SkuUpdateOne) SetWeight ¶
func (suo *SkuUpdateOne) SetWeight(f float64) *SkuUpdateOne
SetWeight sets the "weight" field.
func (*SkuUpdateOne) Where ¶
func (suo *SkuUpdateOne) Where(ps ...predicate.Sku) *SkuUpdateOne
Where appends a list predicates to the SkuUpdate builder.
type Spu ¶
type Spu struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1: normal 2: ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // Sort Number | 排序编号 Sort uint32 `json:"sort,omitempty"` // Delete Time | 删除日期 DeletedAt time.Time `json:"deleted_at,omitempty"` // 商品名称 Name string `json:"name,omitempty"` // 关键字 Keyword string `json:"keyword,omitempty"` // 商品简介 Introduction string `json:"introduction,omitempty"` // 商品详情 Description string `json:"description,omitempty"` // 条形码 BarCode string `json:"bar_code,omitempty"` // 商品分类编号 CategoryID uint64 `json:"category_id,omitempty"` // 商品品牌编号 BrandID uint64 `json:"brand_id,omitempty"` // 商品封面图 PicURL string `json:"pic_url,omitempty"` // 商品轮播图地址数组,以逗号分隔最多上传15张 SliderPicUrls []string `json:"slider_pic_urls,omitempty"` // 商品视频 VideoURL string `json:"video_url,omitempty"` // 单位 Unit uint8 `json:"unit,omitempty"` // 规格类型:0 单规格 1 多规格 SpecType bool `json:"spec_type,omitempty"` // 商品价格,单位使用:分 Price int32 `json:"price,omitempty"` // 市场价,单位使用:分 MarketPrice int32 `json:"market_price,omitempty"` // 成本价,单位: 分 CostPrice int32 `json:"cost_price,omitempty"` // 库存 Stock int32 `json:"stock,omitempty"` // 物流配置模板编号 DeliveryTemplateID uint64 `json:"deliveryTemplate_id,omitempty"` // 是否热卖推荐 RecommendHot bool `json:"recommend_hot,omitempty"` // 是否优惠推荐 RecommendBenefit bool `json:"recommend_benefit,omitempty"` // 是否精品推荐 RecommendBest bool `json:"recommend_best,omitempty"` // 是否新品推荐 RecommendNew bool `json:"recommend_new,omitempty"` // 是否优品推荐 RecommendGood bool `json:"recommend_good,omitempty"` // 赠送积分 GiveIntegral int32 `json:"give_integral,omitempty"` // 赠送积分 GiveCouponTemplateIds []uint64 `json:"give_coupon_template_ids,omitempty"` // 赠送积分 SubCommissionType bool `json:"sub_commission_type,omitempty"` // 赠送积分 ActivityOrders []int32 `json:"activity_orders,omitempty"` // 商品销量 SalesCount int32 `json:"sales_count,omitempty"` // 虚拟销量 VirtualSalesCount int32 `json:"virtual_sales_count,omitempty"` // 商品点击量 BrowseCount int32 `json:"browse_count,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SpuQuery when eager-loading is set. Edges SpuEdges `json:"edges"` // contains filtered or unexported fields }
Spu is the model entity for the Spu schema.
func (*Spu) QueryBrands ¶
func (s *Spu) QueryBrands() *BrandQuery
QueryBrands queries the "brands" edge of the Spu entity.
func (*Spu) QueryCategorys ¶
func (s *Spu) QueryCategorys() *CategoryQuery
QueryCategorys queries the "categorys" edge of the Spu entity.
func (*Spu) Unwrap ¶
Unwrap unwraps the Spu entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Spu) Update ¶
func (s *Spu) Update() *SpuUpdateOne
Update returns a builder for updating this Spu. Note that you need to call Spu.Unwrap() before calling this method if this Spu was returned from a transaction, and the transaction was committed or rolled back.
type SpuClient ¶
type SpuClient struct {
// contains filtered or unexported fields
}
SpuClient is a client for the Spu schema.
func NewSpuClient ¶
func NewSpuClient(c config) *SpuClient
NewSpuClient returns a client for the Spu from the given config.
func (*SpuClient) CreateBulk ¶
func (c *SpuClient) CreateBulk(builders ...*SpuCreate) *SpuCreateBulk
CreateBulk returns a builder for creating a bulk of Spu entities.
func (*SpuClient) DeleteOne ¶
func (c *SpuClient) DeleteOne(s *Spu) *SpuDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SpuClient) DeleteOneID ¶
func (c *SpuClient) DeleteOneID(id uint64) *SpuDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SpuClient) Intercept ¶
func (c *SpuClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `spu.Intercept(f(g(h())))`.
func (*SpuClient) Interceptors ¶
func (c *SpuClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SpuClient) MapCreateBulk ¶
func (c *SpuClient) MapCreateBulk(slice any, setFunc func(*SpuCreate, int)) *SpuCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*SpuClient) QueryBrands ¶
func (c *SpuClient) QueryBrands(s *Spu) *BrandQuery
QueryBrands queries the brands edge of a Spu.
func (*SpuClient) QueryCategorys ¶
func (c *SpuClient) QueryCategorys(s *Spu) *CategoryQuery
QueryCategorys queries the categorys edge of a Spu.
func (*SpuClient) UpdateOne ¶
func (c *SpuClient) UpdateOne(s *Spu) *SpuUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SpuClient) UpdateOneID ¶
func (c *SpuClient) UpdateOneID(id uint64) *SpuUpdateOne
UpdateOneID returns an update builder for the given id.
type SpuCreate ¶
type SpuCreate struct {
// contains filtered or unexported fields
}
SpuCreate is the builder for creating a Spu entity.
func (*SpuCreate) Mutation ¶
func (sc *SpuCreate) Mutation() *SpuMutation
Mutation returns the SpuMutation object of the builder.
func (*SpuCreate) SetActivityOrders ¶
SetActivityOrders sets the "activity_orders" field.
func (*SpuCreate) SetBarCode ¶
SetBarCode sets the "bar_code" field.
func (*SpuCreate) SetBrandID ¶
SetBrandID sets the "brand_id" field.
func (*SpuCreate) SetBrandsID ¶
SetBrandsID sets the "brands" edge to the Brand entity by ID.
func (*SpuCreate) SetBrowseCount ¶
SetBrowseCount sets the "browse_count" field.
func (*SpuCreate) SetCategoryID ¶
SetCategoryID sets the "category_id" field.
func (*SpuCreate) SetCategorys ¶
SetCategorys sets the "categorys" edge to the Category entity.
func (*SpuCreate) SetCategorysID ¶
SetCategorysID sets the "categorys" edge to the Category entity by ID.
func (*SpuCreate) SetCostPrice ¶
SetCostPrice sets the "cost_price" field.
func (*SpuCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*SpuCreate) SetDeletedAt ¶
SetDeletedAt sets the "deleted_at" field.
func (*SpuCreate) SetDeliveryTemplateID ¶
SetDeliveryTemplateID sets the "deliveryTemplate_id" field.
func (*SpuCreate) SetDescription ¶
SetDescription sets the "description" field.
func (*SpuCreate) SetGiveCouponTemplateIds ¶
SetGiveCouponTemplateIds sets the "give_coupon_template_ids" field.
func (*SpuCreate) SetGiveIntegral ¶
SetGiveIntegral sets the "give_integral" field.
func (*SpuCreate) SetIntroduction ¶
SetIntroduction sets the "introduction" field.
func (*SpuCreate) SetKeyword ¶
SetKeyword sets the "keyword" field.
func (*SpuCreate) SetMarketPrice ¶
SetMarketPrice sets the "market_price" field.
func (*SpuCreate) SetNillableBarCode ¶
SetNillableBarCode sets the "bar_code" field if the given value is not nil.
func (*SpuCreate) SetNillableBrandID ¶
SetNillableBrandID sets the "brand_id" field if the given value is not nil.
func (*SpuCreate) SetNillableBrandsID ¶
SetNillableBrandsID sets the "brands" edge to the Brand entity by ID if the given value is not nil.
func (*SpuCreate) SetNillableBrowseCount ¶
SetNillableBrowseCount sets the "browse_count" field if the given value is not nil.
func (*SpuCreate) SetNillableCategoryID ¶
SetNillableCategoryID sets the "category_id" field if the given value is not nil.
func (*SpuCreate) SetNillableCategorysID ¶
SetNillableCategorysID sets the "categorys" edge to the Category entity by ID if the given value is not nil.
func (*SpuCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SpuCreate) SetNillableDeletedAt ¶
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*SpuCreate) SetNillableDeliveryTemplateID ¶
SetNillableDeliveryTemplateID sets the "deliveryTemplate_id" field if the given value is not nil.
func (*SpuCreate) SetNillableDescription ¶
SetNillableDescription sets the "description" field if the given value is not nil.
func (*SpuCreate) SetNillableGiveIntegral ¶
SetNillableGiveIntegral sets the "give_integral" field if the given value is not nil.
func (*SpuCreate) SetNillableIntroduction ¶
SetNillableIntroduction sets the "introduction" field if the given value is not nil.
func (*SpuCreate) SetNillableKeyword ¶
SetNillableKeyword sets the "keyword" field if the given value is not nil.
func (*SpuCreate) SetNillableMarketPrice ¶
SetNillableMarketPrice sets the "market_price" field if the given value is not nil.
func (*SpuCreate) SetNillableRecommendBenefit ¶
SetNillableRecommendBenefit sets the "recommend_benefit" field if the given value is not nil.
func (*SpuCreate) SetNillableRecommendBest ¶
SetNillableRecommendBest sets the "recommend_best" field if the given value is not nil.
func (*SpuCreate) SetNillableRecommendGood ¶
SetNillableRecommendGood sets the "recommend_good" field if the given value is not nil.
func (*SpuCreate) SetNillableRecommendHot ¶
SetNillableRecommendHot sets the "recommend_hot" field if the given value is not nil.
func (*SpuCreate) SetNillableRecommendNew ¶
SetNillableRecommendNew sets the "recommend_new" field if the given value is not nil.
func (*SpuCreate) SetNillableSalesCount ¶
SetNillableSalesCount sets the "sales_count" field if the given value is not nil.
func (*SpuCreate) SetNillableSort ¶
SetNillableSort sets the "sort" field if the given value is not nil.
func (*SpuCreate) SetNillableSpecType ¶
SetNillableSpecType sets the "spec_type" field if the given value is not nil.
func (*SpuCreate) SetNillableStatus ¶
SetNillableStatus sets the "status" field if the given value is not nil.
func (*SpuCreate) SetNillableSubCommissionType ¶
SetNillableSubCommissionType sets the "sub_commission_type" field if the given value is not nil.
func (*SpuCreate) SetNillableUpdatedAt ¶
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SpuCreate) SetNillableVideoURL ¶
SetNillableVideoURL sets the "video_url" field if the given value is not nil.
func (*SpuCreate) SetNillableVirtualSalesCount ¶
SetNillableVirtualSalesCount sets the "virtual_sales_count" field if the given value is not nil.
func (*SpuCreate) SetNotNilActivityOrders ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilBarCode ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilBrandID ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilBrowseCount ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilCategoryID ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilCostPrice ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilDeletedAt ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilDeliveryTemplateID ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilDescription ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilGiveCouponTemplateIds ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilGiveIntegral ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilIntroduction ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilKeyword ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilMarketPrice ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilName ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilPicURL ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilPrice ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilRecommendBenefit ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilRecommendBest ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilRecommendGood ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilRecommendHot ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilRecommendNew ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilSalesCount ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilSliderPicUrls ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilSort ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilSpecType ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilStatus ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilStock ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilSubCommissionType ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilUnit ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilUpdatedAt ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilVideoURL ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetNotNilVirtualSalesCount ¶
set field if value's pointer is not nil.
func (*SpuCreate) SetRecommendBenefit ¶
SetRecommendBenefit sets the "recommend_benefit" field.
func (*SpuCreate) SetRecommendBest ¶
SetRecommendBest sets the "recommend_best" field.
func (*SpuCreate) SetRecommendGood ¶
SetRecommendGood sets the "recommend_good" field.
func (*SpuCreate) SetRecommendHot ¶
SetRecommendHot sets the "recommend_hot" field.
func (*SpuCreate) SetRecommendNew ¶
SetRecommendNew sets the "recommend_new" field.
func (*SpuCreate) SetSalesCount ¶
SetSalesCount sets the "sales_count" field.
func (*SpuCreate) SetSliderPicUrls ¶
SetSliderPicUrls sets the "slider_pic_urls" field.
func (*SpuCreate) SetSpecType ¶
SetSpecType sets the "spec_type" field.
func (*SpuCreate) SetSubCommissionType ¶
SetSubCommissionType sets the "sub_commission_type" field.
func (*SpuCreate) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
func (*SpuCreate) SetVideoURL ¶
SetVideoURL sets the "video_url" field.
func (*SpuCreate) SetVirtualSalesCount ¶
SetVirtualSalesCount sets the "virtual_sales_count" field.
type SpuCreateBulk ¶
type SpuCreateBulk struct {
// contains filtered or unexported fields
}
SpuCreateBulk is the builder for creating many Spu entities in bulk.
func (*SpuCreateBulk) Exec ¶
func (scb *SpuCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SpuCreateBulk) ExecX ¶
func (scb *SpuCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SpuDelete ¶
type SpuDelete struct {
// contains filtered or unexported fields
}
SpuDelete is the builder for deleting a Spu entity.
func (*SpuDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type SpuDeleteOne ¶
type SpuDeleteOne struct {
// contains filtered or unexported fields
}
SpuDeleteOne is the builder for deleting a single Spu entity.
func (*SpuDeleteOne) Exec ¶
func (sdo *SpuDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SpuDeleteOne) ExecX ¶
func (sdo *SpuDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SpuDeleteOne) Where ¶
func (sdo *SpuDeleteOne) Where(ps ...predicate.Spu) *SpuDeleteOne
Where appends a list predicates to the SpuDelete builder.
type SpuEdges ¶
type SpuEdges struct { // Skus holds the value of the skus edge. Skus []*Sku `json:"skus,omitempty"` // Brands holds the value of the brands edge. Brands *Brand `json:"brands,omitempty"` // Categorys holds the value of the categorys edge. Categorys *Category `json:"categorys,omitempty"` // contains filtered or unexported fields }
SpuEdges holds the relations/edges for other nodes in the graph.
func (SpuEdges) BrandsOrErr ¶
BrandsOrErr returns the Brands value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SpuEdges) CategorysOrErr ¶
CategorysOrErr returns the Categorys value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SpuGroupBy ¶
type SpuGroupBy struct {
// contains filtered or unexported fields
}
SpuGroupBy is the group-by builder for Spu entities.
func (*SpuGroupBy) Aggregate ¶
func (sgb *SpuGroupBy) Aggregate(fns ...AggregateFunc) *SpuGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SpuGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SpuGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SpuGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SpuGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SpuGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SpuGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SpuGroupBy) Scan ¶
func (sgb *SpuGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SpuGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SpuMutation ¶
type SpuMutation struct {
// contains filtered or unexported fields
}
SpuMutation represents an operation that mutates the Spu nodes in the graph.
func (*SpuMutation) ActivityOrders ¶
func (m *SpuMutation) ActivityOrders() (r []int32, exists bool)
ActivityOrders returns the value of the "activity_orders" field in the mutation.
func (*SpuMutation) ActivityOrdersCleared ¶
func (m *SpuMutation) ActivityOrdersCleared() bool
ActivityOrdersCleared returns if the "activity_orders" field was cleared in this mutation.
func (*SpuMutation) AddBrowseCount ¶
func (m *SpuMutation) AddBrowseCount(i int32)
AddBrowseCount adds i to the "browse_count" field.
func (*SpuMutation) AddCostPrice ¶
func (m *SpuMutation) AddCostPrice(i int32)
AddCostPrice adds i to the "cost_price" field.
func (*SpuMutation) AddDeliveryTemplateID ¶
func (m *SpuMutation) AddDeliveryTemplateID(u int64)
AddDeliveryTemplateID adds u to the "deliveryTemplate_id" field.
func (*SpuMutation) AddField ¶
func (m *SpuMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SpuMutation) AddGiveIntegral ¶
func (m *SpuMutation) AddGiveIntegral(i int32)
AddGiveIntegral adds i to the "give_integral" field.
func (*SpuMutation) AddMarketPrice ¶
func (m *SpuMutation) AddMarketPrice(i int32)
AddMarketPrice adds i to the "market_price" field.
func (*SpuMutation) AddPrice ¶
func (m *SpuMutation) AddPrice(i int32)
AddPrice adds i to the "price" field.
func (*SpuMutation) AddSalesCount ¶
func (m *SpuMutation) AddSalesCount(i int32)
AddSalesCount adds i to the "sales_count" field.
func (*SpuMutation) AddSkuIDs ¶
func (m *SpuMutation) AddSkuIDs(ids ...uint64)
AddSkuIDs adds the "skus" edge to the Sku entity by ids.
func (*SpuMutation) AddSort ¶
func (m *SpuMutation) AddSort(u int32)
AddSort adds u to the "sort" field.
func (*SpuMutation) AddStatus ¶
func (m *SpuMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*SpuMutation) AddStock ¶
func (m *SpuMutation) AddStock(i int32)
AddStock adds i to the "stock" field.
func (*SpuMutation) AddUnit ¶
func (m *SpuMutation) AddUnit(u int8)
AddUnit adds u to the "unit" field.
func (*SpuMutation) AddVirtualSalesCount ¶
func (m *SpuMutation) AddVirtualSalesCount(i int32)
AddVirtualSalesCount adds i to the "virtual_sales_count" field.
func (*SpuMutation) AddedBrowseCount ¶
func (m *SpuMutation) AddedBrowseCount() (r int32, exists bool)
AddedBrowseCount returns the value that was added to the "browse_count" field in this mutation.
func (*SpuMutation) AddedCostPrice ¶
func (m *SpuMutation) AddedCostPrice() (r int32, exists bool)
AddedCostPrice returns the value that was added to the "cost_price" field in this mutation.
func (*SpuMutation) AddedDeliveryTemplateID ¶
func (m *SpuMutation) AddedDeliveryTemplateID() (r int64, exists bool)
AddedDeliveryTemplateID returns the value that was added to the "deliveryTemplate_id" field in this mutation.
func (*SpuMutation) AddedEdges ¶
func (m *SpuMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SpuMutation) AddedField ¶
func (m *SpuMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SpuMutation) AddedFields ¶
func (m *SpuMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SpuMutation) AddedGiveIntegral ¶
func (m *SpuMutation) AddedGiveIntegral() (r int32, exists bool)
AddedGiveIntegral returns the value that was added to the "give_integral" field in this mutation.
func (*SpuMutation) AddedIDs ¶
func (m *SpuMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SpuMutation) AddedMarketPrice ¶
func (m *SpuMutation) AddedMarketPrice() (r int32, exists bool)
AddedMarketPrice returns the value that was added to the "market_price" field in this mutation.
func (*SpuMutation) AddedPrice ¶
func (m *SpuMutation) AddedPrice() (r int32, exists bool)
AddedPrice returns the value that was added to the "price" field in this mutation.
func (*SpuMutation) AddedSalesCount ¶
func (m *SpuMutation) AddedSalesCount() (r int32, exists bool)
AddedSalesCount returns the value that was added to the "sales_count" field in this mutation.
func (*SpuMutation) AddedSort ¶
func (m *SpuMutation) AddedSort() (r int32, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*SpuMutation) AddedStatus ¶
func (m *SpuMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*SpuMutation) AddedStock ¶
func (m *SpuMutation) AddedStock() (r int32, exists bool)
AddedStock returns the value that was added to the "stock" field in this mutation.
func (*SpuMutation) AddedUnit ¶
func (m *SpuMutation) AddedUnit() (r int8, exists bool)
AddedUnit returns the value that was added to the "unit" field in this mutation.
func (*SpuMutation) AddedVirtualSalesCount ¶
func (m *SpuMutation) AddedVirtualSalesCount() (r int32, exists bool)
AddedVirtualSalesCount returns the value that was added to the "virtual_sales_count" field in this mutation.
func (*SpuMutation) AppendActivityOrders ¶
func (m *SpuMutation) AppendActivityOrders(i []int32)
AppendActivityOrders adds i to the "activity_orders" field.
func (*SpuMutation) AppendGiveCouponTemplateIds ¶
func (m *SpuMutation) AppendGiveCouponTemplateIds(u []uint64)
AppendGiveCouponTemplateIds adds u to the "give_coupon_template_ids" field.
func (*SpuMutation) AppendSliderPicUrls ¶
func (m *SpuMutation) AppendSliderPicUrls(s []string)
AppendSliderPicUrls adds s to the "slider_pic_urls" field.
func (*SpuMutation) AppendedActivityOrders ¶
func (m *SpuMutation) AppendedActivityOrders() ([]int32, bool)
AppendedActivityOrders returns the list of values that were appended to the "activity_orders" field in this mutation.
func (*SpuMutation) AppendedGiveCouponTemplateIds ¶
func (m *SpuMutation) AppendedGiveCouponTemplateIds() ([]uint64, bool)
AppendedGiveCouponTemplateIds returns the list of values that were appended to the "give_coupon_template_ids" field in this mutation.
func (*SpuMutation) AppendedSliderPicUrls ¶
func (m *SpuMutation) AppendedSliderPicUrls() ([]string, bool)
AppendedSliderPicUrls returns the list of values that were appended to the "slider_pic_urls" field in this mutation.
func (*SpuMutation) BarCode ¶
func (m *SpuMutation) BarCode() (r string, exists bool)
BarCode returns the value of the "bar_code" field in the mutation.
func (*SpuMutation) BarCodeCleared ¶
func (m *SpuMutation) BarCodeCleared() bool
BarCodeCleared returns if the "bar_code" field was cleared in this mutation.
func (*SpuMutation) BrandID ¶
func (m *SpuMutation) BrandID() (r uint64, exists bool)
BrandID returns the value of the "brand_id" field in the mutation.
func (*SpuMutation) BrandIDCleared ¶
func (m *SpuMutation) BrandIDCleared() bool
BrandIDCleared returns if the "brand_id" field was cleared in this mutation.
func (*SpuMutation) BrandsCleared ¶
func (m *SpuMutation) BrandsCleared() bool
BrandsCleared reports if the "brands" edge to the Brand entity was cleared.
func (*SpuMutation) BrandsID ¶
func (m *SpuMutation) BrandsID() (id uint64, exists bool)
BrandsID returns the "brands" edge ID in the mutation.
func (*SpuMutation) BrandsIDs ¶
func (m *SpuMutation) BrandsIDs() (ids []uint64)
BrandsIDs returns the "brands" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BrandsID instead. It exists only for internal usage by the builders.
func (*SpuMutation) BrowseCount ¶
func (m *SpuMutation) BrowseCount() (r int32, exists bool)
BrowseCount returns the value of the "browse_count" field in the mutation.
func (*SpuMutation) BrowseCountCleared ¶
func (m *SpuMutation) BrowseCountCleared() bool
BrowseCountCleared returns if the "browse_count" field was cleared in this mutation.
func (*SpuMutation) CategoryID ¶
func (m *SpuMutation) CategoryID() (r uint64, exists bool)
CategoryID returns the value of the "category_id" field in the mutation.
func (*SpuMutation) CategoryIDCleared ¶
func (m *SpuMutation) CategoryIDCleared() bool
CategoryIDCleared returns if the "category_id" field was cleared in this mutation.
func (*SpuMutation) CategorysCleared ¶
func (m *SpuMutation) CategorysCleared() bool
CategorysCleared reports if the "categorys" edge to the Category entity was cleared.
func (*SpuMutation) CategorysID ¶
func (m *SpuMutation) CategorysID() (id uint64, exists bool)
CategorysID returns the "categorys" edge ID in the mutation.
func (*SpuMutation) CategorysIDs ¶
func (m *SpuMutation) CategorysIDs() (ids []uint64)
CategorysIDs returns the "categorys" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CategorysID instead. It exists only for internal usage by the builders.
func (*SpuMutation) ClearActivityOrders ¶
func (m *SpuMutation) ClearActivityOrders()
ClearActivityOrders clears the value of the "activity_orders" field.
func (*SpuMutation) ClearBarCode ¶
func (m *SpuMutation) ClearBarCode()
ClearBarCode clears the value of the "bar_code" field.
func (*SpuMutation) ClearBrandID ¶
func (m *SpuMutation) ClearBrandID()
ClearBrandID clears the value of the "brand_id" field.
func (*SpuMutation) ClearBrands ¶
func (m *SpuMutation) ClearBrands()
ClearBrands clears the "brands" edge to the Brand entity.
func (*SpuMutation) ClearBrowseCount ¶
func (m *SpuMutation) ClearBrowseCount()
ClearBrowseCount clears the value of the "browse_count" field.
func (*SpuMutation) ClearCategoryID ¶
func (m *SpuMutation) ClearCategoryID()
ClearCategoryID clears the value of the "category_id" field.
func (*SpuMutation) ClearCategorys ¶
func (m *SpuMutation) ClearCategorys()
ClearCategorys clears the "categorys" edge to the Category entity.
func (*SpuMutation) ClearDeletedAt ¶
func (m *SpuMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*SpuMutation) ClearDeliveryTemplateID ¶
func (m *SpuMutation) ClearDeliveryTemplateID()
ClearDeliveryTemplateID clears the value of the "deliveryTemplate_id" field.
func (*SpuMutation) ClearDescription ¶
func (m *SpuMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*SpuMutation) ClearEdge ¶
func (m *SpuMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*SpuMutation) ClearField ¶
func (m *SpuMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*SpuMutation) ClearGiveCouponTemplateIds ¶
func (m *SpuMutation) ClearGiveCouponTemplateIds()
ClearGiveCouponTemplateIds clears the value of the "give_coupon_template_ids" field.
func (*SpuMutation) ClearGiveIntegral ¶
func (m *SpuMutation) ClearGiveIntegral()
ClearGiveIntegral clears the value of the "give_integral" field.
func (*SpuMutation) ClearIntroduction ¶
func (m *SpuMutation) ClearIntroduction()
ClearIntroduction clears the value of the "introduction" field.
func (*SpuMutation) ClearKeyword ¶
func (m *SpuMutation) ClearKeyword()
ClearKeyword clears the value of the "keyword" field.
func (*SpuMutation) ClearMarketPrice ¶
func (m *SpuMutation) ClearMarketPrice()
ClearMarketPrice clears the value of the "market_price" field.
func (*SpuMutation) ClearRecommendBenefit ¶
func (m *SpuMutation) ClearRecommendBenefit()
ClearRecommendBenefit clears the value of the "recommend_benefit" field.
func (*SpuMutation) ClearRecommendBest ¶
func (m *SpuMutation) ClearRecommendBest()
ClearRecommendBest clears the value of the "recommend_best" field.
func (*SpuMutation) ClearRecommendGood ¶
func (m *SpuMutation) ClearRecommendGood()
ClearRecommendGood clears the value of the "recommend_good" field.
func (*SpuMutation) ClearRecommendHot ¶
func (m *SpuMutation) ClearRecommendHot()
ClearRecommendHot clears the value of the "recommend_hot" field.
func (*SpuMutation) ClearRecommendNew ¶
func (m *SpuMutation) ClearRecommendNew()
ClearRecommendNew clears the value of the "recommend_new" field.
func (*SpuMutation) ClearSalesCount ¶
func (m *SpuMutation) ClearSalesCount()
ClearSalesCount clears the value of the "sales_count" field.
func (*SpuMutation) ClearSkus ¶
func (m *SpuMutation) ClearSkus()
ClearSkus clears the "skus" edge to the Sku entity.
func (*SpuMutation) ClearSliderPicUrls ¶
func (m *SpuMutation) ClearSliderPicUrls()
ClearSliderPicUrls clears the value of the "slider_pic_urls" field.
func (*SpuMutation) ClearSpecType ¶
func (m *SpuMutation) ClearSpecType()
ClearSpecType clears the value of the "spec_type" field.
func (*SpuMutation) ClearStatus ¶
func (m *SpuMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*SpuMutation) ClearSubCommissionType ¶
func (m *SpuMutation) ClearSubCommissionType()
ClearSubCommissionType clears the value of the "sub_commission_type" field.
func (*SpuMutation) ClearVideoURL ¶
func (m *SpuMutation) ClearVideoURL()
ClearVideoURL clears the value of the "video_url" field.
func (*SpuMutation) ClearVirtualSalesCount ¶
func (m *SpuMutation) ClearVirtualSalesCount()
ClearVirtualSalesCount clears the value of the "virtual_sales_count" field.
func (*SpuMutation) ClearedEdges ¶
func (m *SpuMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SpuMutation) ClearedFields ¶
func (m *SpuMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SpuMutation) Client ¶
func (m SpuMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*SpuMutation) CostPrice ¶
func (m *SpuMutation) CostPrice() (r int32, exists bool)
CostPrice returns the value of the "cost_price" field in the mutation.
func (*SpuMutation) CreatedAt ¶
func (m *SpuMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SpuMutation) DeletedAt ¶
func (m *SpuMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*SpuMutation) DeletedAtCleared ¶
func (m *SpuMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*SpuMutation) DeliveryTemplateID ¶
func (m *SpuMutation) DeliveryTemplateID() (r uint64, exists bool)
DeliveryTemplateID returns the value of the "deliveryTemplate_id" field in the mutation.
func (*SpuMutation) DeliveryTemplateIDCleared ¶
func (m *SpuMutation) DeliveryTemplateIDCleared() bool
DeliveryTemplateIDCleared returns if the "deliveryTemplate_id" field was cleared in this mutation.
func (*SpuMutation) Description ¶
func (m *SpuMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*SpuMutation) DescriptionCleared ¶
func (m *SpuMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*SpuMutation) EdgeCleared ¶
func (m *SpuMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SpuMutation) Field ¶
func (m *SpuMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*SpuMutation) FieldCleared ¶
func (m *SpuMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SpuMutation) Fields ¶
func (m *SpuMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*SpuMutation) GiveCouponTemplateIds ¶
func (m *SpuMutation) GiveCouponTemplateIds() (r []uint64, exists bool)
GiveCouponTemplateIds returns the value of the "give_coupon_template_ids" field in the mutation.
func (*SpuMutation) GiveCouponTemplateIdsCleared ¶
func (m *SpuMutation) GiveCouponTemplateIdsCleared() bool
GiveCouponTemplateIdsCleared returns if the "give_coupon_template_ids" field was cleared in this mutation.
func (*SpuMutation) GiveIntegral ¶
func (m *SpuMutation) GiveIntegral() (r int32, exists bool)
GiveIntegral returns the value of the "give_integral" field in the mutation.
func (*SpuMutation) GiveIntegralCleared ¶
func (m *SpuMutation) GiveIntegralCleared() bool
GiveIntegralCleared returns if the "give_integral" field was cleared in this mutation.
func (*SpuMutation) ID ¶
func (m *SpuMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SpuMutation) IDs ¶
func (m *SpuMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SpuMutation) Introduction ¶
func (m *SpuMutation) Introduction() (r string, exists bool)
Introduction returns the value of the "introduction" field in the mutation.
func (*SpuMutation) IntroductionCleared ¶
func (m *SpuMutation) IntroductionCleared() bool
IntroductionCleared returns if the "introduction" field was cleared in this mutation.
func (*SpuMutation) Keyword ¶
func (m *SpuMutation) Keyword() (r string, exists bool)
Keyword returns the value of the "keyword" field in the mutation.
func (*SpuMutation) KeywordCleared ¶
func (m *SpuMutation) KeywordCleared() bool
KeywordCleared returns if the "keyword" field was cleared in this mutation.
func (*SpuMutation) MarketPrice ¶
func (m *SpuMutation) MarketPrice() (r int32, exists bool)
MarketPrice returns the value of the "market_price" field in the mutation.
func (*SpuMutation) MarketPriceCleared ¶
func (m *SpuMutation) MarketPriceCleared() bool
MarketPriceCleared returns if the "market_price" field was cleared in this mutation.
func (*SpuMutation) Name ¶
func (m *SpuMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*SpuMutation) OldActivityOrders ¶
func (m *SpuMutation) OldActivityOrders(ctx context.Context) (v []int32, err error)
OldActivityOrders returns the old "activity_orders" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldBarCode ¶
func (m *SpuMutation) OldBarCode(ctx context.Context) (v string, err error)
OldBarCode returns the old "bar_code" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldBrandID ¶
func (m *SpuMutation) OldBrandID(ctx context.Context) (v uint64, err error)
OldBrandID returns the old "brand_id" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldBrowseCount ¶
func (m *SpuMutation) OldBrowseCount(ctx context.Context) (v int32, err error)
OldBrowseCount returns the old "browse_count" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldCategoryID ¶
func (m *SpuMutation) OldCategoryID(ctx context.Context) (v uint64, err error)
OldCategoryID returns the old "category_id" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldCostPrice ¶
func (m *SpuMutation) OldCostPrice(ctx context.Context) (v int32, err error)
OldCostPrice returns the old "cost_price" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldDeliveryTemplateID ¶
func (m *SpuMutation) OldDeliveryTemplateID(ctx context.Context) (v uint64, err error)
OldDeliveryTemplateID returns the old "deliveryTemplate_id" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldDescription ¶
func (m *SpuMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*SpuMutation) OldGiveCouponTemplateIds ¶
func (m *SpuMutation) OldGiveCouponTemplateIds(ctx context.Context) (v []uint64, err error)
OldGiveCouponTemplateIds returns the old "give_coupon_template_ids" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldGiveIntegral ¶
func (m *SpuMutation) OldGiveIntegral(ctx context.Context) (v int32, err error)
OldGiveIntegral returns the old "give_integral" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldIntroduction ¶
func (m *SpuMutation) OldIntroduction(ctx context.Context) (v string, err error)
OldIntroduction returns the old "introduction" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldKeyword ¶
func (m *SpuMutation) OldKeyword(ctx context.Context) (v string, err error)
OldKeyword returns the old "keyword" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldMarketPrice ¶
func (m *SpuMutation) OldMarketPrice(ctx context.Context) (v int32, err error)
OldMarketPrice returns the old "market_price" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldName ¶
func (m *SpuMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldPicURL ¶
func (m *SpuMutation) OldPicURL(ctx context.Context) (v string, err error)
OldPicURL returns the old "pic_url" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldPrice ¶
func (m *SpuMutation) OldPrice(ctx context.Context) (v int32, err error)
OldPrice returns the old "price" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldRecommendBenefit ¶
func (m *SpuMutation) OldRecommendBenefit(ctx context.Context) (v bool, err error)
OldRecommendBenefit returns the old "recommend_benefit" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldRecommendBest ¶
func (m *SpuMutation) OldRecommendBest(ctx context.Context) (v bool, err error)
OldRecommendBest returns the old "recommend_best" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldRecommendGood ¶
func (m *SpuMutation) OldRecommendGood(ctx context.Context) (v bool, err error)
OldRecommendGood returns the old "recommend_good" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldRecommendHot ¶
func (m *SpuMutation) OldRecommendHot(ctx context.Context) (v bool, err error)
OldRecommendHot returns the old "recommend_hot" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldRecommendNew ¶
func (m *SpuMutation) OldRecommendNew(ctx context.Context) (v bool, err error)
OldRecommendNew returns the old "recommend_new" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldSalesCount ¶
func (m *SpuMutation) OldSalesCount(ctx context.Context) (v int32, err error)
OldSalesCount returns the old "sales_count" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldSliderPicUrls ¶
func (m *SpuMutation) OldSliderPicUrls(ctx context.Context) (v []string, err error)
OldSliderPicUrls returns the old "slider_pic_urls" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldSort ¶
func (m *SpuMutation) OldSort(ctx context.Context) (v uint32, err error)
OldSort returns the old "sort" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldSpecType ¶
func (m *SpuMutation) OldSpecType(ctx context.Context) (v bool, err error)
OldSpecType returns the old "spec_type" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldStatus ¶
func (m *SpuMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldStock ¶
func (m *SpuMutation) OldStock(ctx context.Context) (v int32, err error)
OldStock returns the old "stock" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldSubCommissionType ¶
func (m *SpuMutation) OldSubCommissionType(ctx context.Context) (v bool, err error)
OldSubCommissionType returns the old "sub_commission_type" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldUnit ¶
func (m *SpuMutation) OldUnit(ctx context.Context) (v uint8, err error)
OldUnit returns the old "unit" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldVideoURL ¶
func (m *SpuMutation) OldVideoURL(ctx context.Context) (v string, err error)
OldVideoURL returns the old "video_url" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) OldVirtualSalesCount ¶
func (m *SpuMutation) OldVirtualSalesCount(ctx context.Context) (v int32, err error)
OldVirtualSalesCount returns the old "virtual_sales_count" field's value of the Spu entity. If the Spu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SpuMutation) PicURL ¶
func (m *SpuMutation) PicURL() (r string, exists bool)
PicURL returns the value of the "pic_url" field in the mutation.
func (*SpuMutation) Price ¶
func (m *SpuMutation) Price() (r int32, exists bool)
Price returns the value of the "price" field in the mutation.
func (*SpuMutation) RecommendBenefit ¶
func (m *SpuMutation) RecommendBenefit() (r bool, exists bool)
RecommendBenefit returns the value of the "recommend_benefit" field in the mutation.
func (*SpuMutation) RecommendBenefitCleared ¶
func (m *SpuMutation) RecommendBenefitCleared() bool
RecommendBenefitCleared returns if the "recommend_benefit" field was cleared in this mutation.
func (*SpuMutation) RecommendBest ¶
func (m *SpuMutation) RecommendBest() (r bool, exists bool)
RecommendBest returns the value of the "recommend_best" field in the mutation.
func (*SpuMutation) RecommendBestCleared ¶
func (m *SpuMutation) RecommendBestCleared() bool
RecommendBestCleared returns if the "recommend_best" field was cleared in this mutation.
func (*SpuMutation) RecommendGood ¶
func (m *SpuMutation) RecommendGood() (r bool, exists bool)
RecommendGood returns the value of the "recommend_good" field in the mutation.
func (*SpuMutation) RecommendGoodCleared ¶
func (m *SpuMutation) RecommendGoodCleared() bool
RecommendGoodCleared returns if the "recommend_good" field was cleared in this mutation.
func (*SpuMutation) RecommendHot ¶
func (m *SpuMutation) RecommendHot() (r bool, exists bool)
RecommendHot returns the value of the "recommend_hot" field in the mutation.
func (*SpuMutation) RecommendHotCleared ¶
func (m *SpuMutation) RecommendHotCleared() bool
RecommendHotCleared returns if the "recommend_hot" field was cleared in this mutation.
func (*SpuMutation) RecommendNew ¶
func (m *SpuMutation) RecommendNew() (r bool, exists bool)
RecommendNew returns the value of the "recommend_new" field in the mutation.
func (*SpuMutation) RecommendNewCleared ¶
func (m *SpuMutation) RecommendNewCleared() bool
RecommendNewCleared returns if the "recommend_new" field was cleared in this mutation.
func (*SpuMutation) RemoveSkuIDs ¶
func (m *SpuMutation) RemoveSkuIDs(ids ...uint64)
RemoveSkuIDs removes the "skus" edge to the Sku entity by IDs.
func (*SpuMutation) RemovedEdges ¶
func (m *SpuMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SpuMutation) RemovedIDs ¶
func (m *SpuMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*SpuMutation) RemovedSkusIDs ¶
func (m *SpuMutation) RemovedSkusIDs() (ids []uint64)
RemovedSkus returns the removed IDs of the "skus" edge to the Sku entity.
func (*SpuMutation) ResetActivityOrders ¶
func (m *SpuMutation) ResetActivityOrders()
ResetActivityOrders resets all changes to the "activity_orders" field.
func (*SpuMutation) ResetBarCode ¶
func (m *SpuMutation) ResetBarCode()
ResetBarCode resets all changes to the "bar_code" field.
func (*SpuMutation) ResetBrandID ¶
func (m *SpuMutation) ResetBrandID()
ResetBrandID resets all changes to the "brand_id" field.
func (*SpuMutation) ResetBrands ¶
func (m *SpuMutation) ResetBrands()
ResetBrands resets all changes to the "brands" edge.
func (*SpuMutation) ResetBrowseCount ¶
func (m *SpuMutation) ResetBrowseCount()
ResetBrowseCount resets all changes to the "browse_count" field.
func (*SpuMutation) ResetCategoryID ¶
func (m *SpuMutation) ResetCategoryID()
ResetCategoryID resets all changes to the "category_id" field.
func (*SpuMutation) ResetCategorys ¶
func (m *SpuMutation) ResetCategorys()
ResetCategorys resets all changes to the "categorys" edge.
func (*SpuMutation) ResetCostPrice ¶
func (m *SpuMutation) ResetCostPrice()
ResetCostPrice resets all changes to the "cost_price" field.
func (*SpuMutation) ResetCreatedAt ¶
func (m *SpuMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SpuMutation) ResetDeletedAt ¶
func (m *SpuMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*SpuMutation) ResetDeliveryTemplateID ¶
func (m *SpuMutation) ResetDeliveryTemplateID()
ResetDeliveryTemplateID resets all changes to the "deliveryTemplate_id" field.
func (*SpuMutation) ResetDescription ¶
func (m *SpuMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*SpuMutation) ResetEdge ¶
func (m *SpuMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*SpuMutation) ResetField ¶
func (m *SpuMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*SpuMutation) ResetGiveCouponTemplateIds ¶
func (m *SpuMutation) ResetGiveCouponTemplateIds()
ResetGiveCouponTemplateIds resets all changes to the "give_coupon_template_ids" field.
func (*SpuMutation) ResetGiveIntegral ¶
func (m *SpuMutation) ResetGiveIntegral()
ResetGiveIntegral resets all changes to the "give_integral" field.
func (*SpuMutation) ResetIntroduction ¶
func (m *SpuMutation) ResetIntroduction()
ResetIntroduction resets all changes to the "introduction" field.
func (*SpuMutation) ResetKeyword ¶
func (m *SpuMutation) ResetKeyword()
ResetKeyword resets all changes to the "keyword" field.
func (*SpuMutation) ResetMarketPrice ¶
func (m *SpuMutation) ResetMarketPrice()
ResetMarketPrice resets all changes to the "market_price" field.
func (*SpuMutation) ResetName ¶
func (m *SpuMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*SpuMutation) ResetPicURL ¶
func (m *SpuMutation) ResetPicURL()
ResetPicURL resets all changes to the "pic_url" field.
func (*SpuMutation) ResetPrice ¶
func (m *SpuMutation) ResetPrice()
ResetPrice resets all changes to the "price" field.
func (*SpuMutation) ResetRecommendBenefit ¶
func (m *SpuMutation) ResetRecommendBenefit()
ResetRecommendBenefit resets all changes to the "recommend_benefit" field.
func (*SpuMutation) ResetRecommendBest ¶
func (m *SpuMutation) ResetRecommendBest()
ResetRecommendBest resets all changes to the "recommend_best" field.
func (*SpuMutation) ResetRecommendGood ¶
func (m *SpuMutation) ResetRecommendGood()
ResetRecommendGood resets all changes to the "recommend_good" field.
func (*SpuMutation) ResetRecommendHot ¶
func (m *SpuMutation) ResetRecommendHot()
ResetRecommendHot resets all changes to the "recommend_hot" field.
func (*SpuMutation) ResetRecommendNew ¶
func (m *SpuMutation) ResetRecommendNew()
ResetRecommendNew resets all changes to the "recommend_new" field.
func (*SpuMutation) ResetSalesCount ¶
func (m *SpuMutation) ResetSalesCount()
ResetSalesCount resets all changes to the "sales_count" field.
func (*SpuMutation) ResetSkus ¶
func (m *SpuMutation) ResetSkus()
ResetSkus resets all changes to the "skus" edge.
func (*SpuMutation) ResetSliderPicUrls ¶
func (m *SpuMutation) ResetSliderPicUrls()
ResetSliderPicUrls resets all changes to the "slider_pic_urls" field.
func (*SpuMutation) ResetSort ¶
func (m *SpuMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*SpuMutation) ResetSpecType ¶
func (m *SpuMutation) ResetSpecType()
ResetSpecType resets all changes to the "spec_type" field.
func (*SpuMutation) ResetStatus ¶
func (m *SpuMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*SpuMutation) ResetStock ¶
func (m *SpuMutation) ResetStock()
ResetStock resets all changes to the "stock" field.
func (*SpuMutation) ResetSubCommissionType ¶
func (m *SpuMutation) ResetSubCommissionType()
ResetSubCommissionType resets all changes to the "sub_commission_type" field.
func (*SpuMutation) ResetUnit ¶
func (m *SpuMutation) ResetUnit()
ResetUnit resets all changes to the "unit" field.
func (*SpuMutation) ResetUpdatedAt ¶
func (m *SpuMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SpuMutation) ResetVideoURL ¶
func (m *SpuMutation) ResetVideoURL()
ResetVideoURL resets all changes to the "video_url" field.
func (*SpuMutation) ResetVirtualSalesCount ¶
func (m *SpuMutation) ResetVirtualSalesCount()
ResetVirtualSalesCount resets all changes to the "virtual_sales_count" field.
func (*SpuMutation) SalesCount ¶
func (m *SpuMutation) SalesCount() (r int32, exists bool)
SalesCount returns the value of the "sales_count" field in the mutation.
func (*SpuMutation) SalesCountCleared ¶
func (m *SpuMutation) SalesCountCleared() bool
SalesCountCleared returns if the "sales_count" field was cleared in this mutation.
func (*SpuMutation) SetActivityOrders ¶
func (m *SpuMutation) SetActivityOrders(i []int32)
SetActivityOrders sets the "activity_orders" field.
func (*SpuMutation) SetBarCode ¶
func (m *SpuMutation) SetBarCode(s string)
SetBarCode sets the "bar_code" field.
func (*SpuMutation) SetBrandID ¶
func (m *SpuMutation) SetBrandID(u uint64)
SetBrandID sets the "brand_id" field.
func (*SpuMutation) SetBrandsID ¶
func (m *SpuMutation) SetBrandsID(id uint64)
SetBrandsID sets the "brands" edge to the Brand entity by id.
func (*SpuMutation) SetBrowseCount ¶
func (m *SpuMutation) SetBrowseCount(i int32)
SetBrowseCount sets the "browse_count" field.
func (*SpuMutation) SetCategoryID ¶
func (m *SpuMutation) SetCategoryID(u uint64)
SetCategoryID sets the "category_id" field.
func (*SpuMutation) SetCategorysID ¶
func (m *SpuMutation) SetCategorysID(id uint64)
SetCategorysID sets the "categorys" edge to the Category entity by id.
func (*SpuMutation) SetCostPrice ¶
func (m *SpuMutation) SetCostPrice(i int32)
SetCostPrice sets the "cost_price" field.
func (*SpuMutation) SetCreatedAt ¶
func (m *SpuMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SpuMutation) SetDeletedAt ¶
func (m *SpuMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*SpuMutation) SetDeliveryTemplateID ¶
func (m *SpuMutation) SetDeliveryTemplateID(u uint64)
SetDeliveryTemplateID sets the "deliveryTemplate_id" field.
func (*SpuMutation) SetDescription ¶
func (m *SpuMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*SpuMutation) SetField ¶
func (m *SpuMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*SpuMutation) SetGiveCouponTemplateIds ¶
func (m *SpuMutation) SetGiveCouponTemplateIds(u []uint64)
SetGiveCouponTemplateIds sets the "give_coupon_template_ids" field.
func (*SpuMutation) SetGiveIntegral ¶
func (m *SpuMutation) SetGiveIntegral(i int32)
SetGiveIntegral sets the "give_integral" field.
func (*SpuMutation) SetID ¶
func (m *SpuMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Spu entities.
func (*SpuMutation) SetIntroduction ¶
func (m *SpuMutation) SetIntroduction(s string)
SetIntroduction sets the "introduction" field.
func (*SpuMutation) SetKeyword ¶
func (m *SpuMutation) SetKeyword(s string)
SetKeyword sets the "keyword" field.
func (*SpuMutation) SetMarketPrice ¶
func (m *SpuMutation) SetMarketPrice(i int32)
SetMarketPrice sets the "market_price" field.
func (*SpuMutation) SetName ¶
func (m *SpuMutation) SetName(s string)
SetName sets the "name" field.
func (*SpuMutation) SetOp ¶
func (m *SpuMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SpuMutation) SetPicURL ¶
func (m *SpuMutation) SetPicURL(s string)
SetPicURL sets the "pic_url" field.
func (*SpuMutation) SetPrice ¶
func (m *SpuMutation) SetPrice(i int32)
SetPrice sets the "price" field.
func (*SpuMutation) SetRecommendBenefit ¶
func (m *SpuMutation) SetRecommendBenefit(b bool)
SetRecommendBenefit sets the "recommend_benefit" field.
func (*SpuMutation) SetRecommendBest ¶
func (m *SpuMutation) SetRecommendBest(b bool)
SetRecommendBest sets the "recommend_best" field.
func (*SpuMutation) SetRecommendGood ¶
func (m *SpuMutation) SetRecommendGood(b bool)
SetRecommendGood sets the "recommend_good" field.
func (*SpuMutation) SetRecommendHot ¶
func (m *SpuMutation) SetRecommendHot(b bool)
SetRecommendHot sets the "recommend_hot" field.
func (*SpuMutation) SetRecommendNew ¶
func (m *SpuMutation) SetRecommendNew(b bool)
SetRecommendNew sets the "recommend_new" field.
func (*SpuMutation) SetSalesCount ¶
func (m *SpuMutation) SetSalesCount(i int32)
SetSalesCount sets the "sales_count" field.
func (*SpuMutation) SetSliderPicUrls ¶
func (m *SpuMutation) SetSliderPicUrls(s []string)
SetSliderPicUrls sets the "slider_pic_urls" field.
func (*SpuMutation) SetSort ¶
func (m *SpuMutation) SetSort(u uint32)
SetSort sets the "sort" field.
func (*SpuMutation) SetSpecType ¶
func (m *SpuMutation) SetSpecType(b bool)
SetSpecType sets the "spec_type" field.
func (*SpuMutation) SetStatus ¶
func (m *SpuMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*SpuMutation) SetStock ¶
func (m *SpuMutation) SetStock(i int32)
SetStock sets the "stock" field.
func (*SpuMutation) SetSubCommissionType ¶
func (m *SpuMutation) SetSubCommissionType(b bool)
SetSubCommissionType sets the "sub_commission_type" field.
func (*SpuMutation) SetUpdatedAt ¶
func (m *SpuMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*SpuMutation) SetVideoURL ¶
func (m *SpuMutation) SetVideoURL(s string)
SetVideoURL sets the "video_url" field.
func (*SpuMutation) SetVirtualSalesCount ¶
func (m *SpuMutation) SetVirtualSalesCount(i int32)
SetVirtualSalesCount sets the "virtual_sales_count" field.
func (*SpuMutation) SkusCleared ¶
func (m *SpuMutation) SkusCleared() bool
SkusCleared reports if the "skus" edge to the Sku entity was cleared.
func (*SpuMutation) SkusIDs ¶
func (m *SpuMutation) SkusIDs() (ids []uint64)
SkusIDs returns the "skus" edge IDs in the mutation.
func (*SpuMutation) SliderPicUrls ¶
func (m *SpuMutation) SliderPicUrls() (r []string, exists bool)
SliderPicUrls returns the value of the "slider_pic_urls" field in the mutation.
func (*SpuMutation) SliderPicUrlsCleared ¶
func (m *SpuMutation) SliderPicUrlsCleared() bool
SliderPicUrlsCleared returns if the "slider_pic_urls" field was cleared in this mutation.
func (*SpuMutation) Sort ¶
func (m *SpuMutation) Sort() (r uint32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*SpuMutation) SpecType ¶
func (m *SpuMutation) SpecType() (r bool, exists bool)
SpecType returns the value of the "spec_type" field in the mutation.
func (*SpuMutation) SpecTypeCleared ¶
func (m *SpuMutation) SpecTypeCleared() bool
SpecTypeCleared returns if the "spec_type" field was cleared in this mutation.
func (*SpuMutation) Status ¶
func (m *SpuMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*SpuMutation) StatusCleared ¶
func (m *SpuMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (*SpuMutation) Stock ¶
func (m *SpuMutation) Stock() (r int32, exists bool)
Stock returns the value of the "stock" field in the mutation.
func (*SpuMutation) SubCommissionType ¶
func (m *SpuMutation) SubCommissionType() (r bool, exists bool)
SubCommissionType returns the value of the "sub_commission_type" field in the mutation.
func (*SpuMutation) SubCommissionTypeCleared ¶
func (m *SpuMutation) SubCommissionTypeCleared() bool
SubCommissionTypeCleared returns if the "sub_commission_type" field was cleared in this mutation.
func (SpuMutation) Tx ¶
func (m SpuMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SpuMutation) Type ¶
func (m *SpuMutation) Type() string
Type returns the node type of this mutation (Spu).
func (*SpuMutation) Unit ¶
func (m *SpuMutation) Unit() (r uint8, exists bool)
Unit returns the value of the "unit" field in the mutation.
func (*SpuMutation) UpdatedAt ¶
func (m *SpuMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*SpuMutation) VideoURL ¶
func (m *SpuMutation) VideoURL() (r string, exists bool)
VideoURL returns the value of the "video_url" field in the mutation.
func (*SpuMutation) VideoURLCleared ¶
func (m *SpuMutation) VideoURLCleared() bool
VideoURLCleared returns if the "video_url" field was cleared in this mutation.
func (*SpuMutation) VirtualSalesCount ¶
func (m *SpuMutation) VirtualSalesCount() (r int32, exists bool)
VirtualSalesCount returns the value of the "virtual_sales_count" field in the mutation.
func (*SpuMutation) VirtualSalesCountCleared ¶
func (m *SpuMutation) VirtualSalesCountCleared() bool
VirtualSalesCountCleared returns if the "virtual_sales_count" field was cleared in this mutation.
func (*SpuMutation) Where ¶
func (m *SpuMutation) Where(ps ...predicate.Spu)
Where appends a list predicates to the SpuMutation builder.
func (*SpuMutation) WhereP ¶
func (m *SpuMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SpuMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SpuPageList ¶
type SpuPageList struct { List []*Spu `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
SpuPageList is Spu PageList result.
type SpuPager ¶
type SpuPager struct { Order spu.OrderOption Filter func(*SpuQuery) (*SpuQuery, error) }
type SpuPaginateOption ¶
type SpuPaginateOption func(*SpuPager)
SpuPaginateOption enables pagination customization.
type SpuQuery ¶
type SpuQuery struct {
// contains filtered or unexported fields
}
SpuQuery is the builder for querying Spu entities.
func (*SpuQuery) Aggregate ¶
func (sq *SpuQuery) Aggregate(fns ...AggregateFunc) *SpuSelect
Aggregate returns a SpuSelect configured with the given aggregations.
func (*SpuQuery) Clone ¶
Clone returns a duplicate of the SpuQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SpuQuery) First ¶
First returns the first Spu entity from the query. Returns a *NotFoundError when no Spu was found.
func (*SpuQuery) FirstID ¶
FirstID returns the first Spu ID from the query. Returns a *NotFoundError when no Spu ID was found.
func (*SpuQuery) GroupBy ¶
func (sq *SpuQuery) GroupBy(field string, fields ...string) *SpuGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Spu.Query(). GroupBy(spu.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SpuQuery) Only ¶
Only returns a single Spu entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Spu entity is found. Returns a *NotFoundError when no Spu entities are found.
func (*SpuQuery) OnlyID ¶
OnlyID is like Only, but returns the only Spu ID in the query. Returns a *NotSingularError when more than one Spu ID is found. Returns a *NotFoundError when no entities are found.
func (*SpuQuery) Order ¶
func (sq *SpuQuery) Order(o ...spu.OrderOption) *SpuQuery
Order specifies how the records should be ordered.
func (*SpuQuery) Page ¶
func (s *SpuQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...SpuPaginateOption, ) (*SpuPageList, error)
func (*SpuQuery) QueryBrands ¶
func (sq *SpuQuery) QueryBrands() *BrandQuery
QueryBrands chains the current query on the "brands" edge.
func (*SpuQuery) QueryCategorys ¶
func (sq *SpuQuery) QueryCategorys() *CategoryQuery
QueryCategorys chains the current query on the "categorys" edge.
func (*SpuQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Spu.Query(). Select(spu.FieldCreatedAt). Scan(ctx, &v)
func (*SpuQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*SpuQuery) WithBrands ¶
func (sq *SpuQuery) WithBrands(opts ...func(*BrandQuery)) *SpuQuery
WithBrands tells the query-builder to eager-load the nodes that are connected to the "brands" edge. The optional arguments are used to configure the query builder of the edge.
func (*SpuQuery) WithCategorys ¶
func (sq *SpuQuery) WithCategorys(opts ...func(*CategoryQuery)) *SpuQuery
WithCategorys tells the query-builder to eager-load the nodes that are connected to the "categorys" edge. The optional arguments are used to configure the query builder of the edge.
type SpuSelect ¶
type SpuSelect struct { *SpuQuery // contains filtered or unexported fields }
SpuSelect is the builder for selecting fields of Spu entities.
func (*SpuSelect) Aggregate ¶
func (ss *SpuSelect) Aggregate(fns ...AggregateFunc) *SpuSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SpuSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SpuSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SpuSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SpuSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SpuSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SpuSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SpuSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SpuUpdate ¶
type SpuUpdate struct {
// contains filtered or unexported fields
}
SpuUpdate is the builder for updating Spu entities.
func (*SpuUpdate) AddBrowseCount ¶
AddBrowseCount adds i to the "browse_count" field.
func (*SpuUpdate) AddCostPrice ¶
AddCostPrice adds i to the "cost_price" field.
func (*SpuUpdate) AddDeliveryTemplateID ¶
AddDeliveryTemplateID adds u to the "deliveryTemplate_id" field.
func (*SpuUpdate) AddGiveIntegral ¶
AddGiveIntegral adds i to the "give_integral" field.
func (*SpuUpdate) AddMarketPrice ¶
AddMarketPrice adds i to the "market_price" field.
func (*SpuUpdate) AddSalesCount ¶
AddSalesCount adds i to the "sales_count" field.
func (*SpuUpdate) AddVirtualSalesCount ¶
AddVirtualSalesCount adds i to the "virtual_sales_count" field.
func (*SpuUpdate) AppendActivityOrders ¶
AppendActivityOrders appends i to the "activity_orders" field.
func (*SpuUpdate) AppendGiveCouponTemplateIds ¶
AppendGiveCouponTemplateIds appends u to the "give_coupon_template_ids" field.
func (*SpuUpdate) AppendSliderPicUrls ¶
AppendSliderPicUrls appends s to the "slider_pic_urls" field.
func (*SpuUpdate) ClearActivityOrders ¶
ClearActivityOrders clears the value of the "activity_orders" field.
func (*SpuUpdate) ClearBarCode ¶
ClearBarCode clears the value of the "bar_code" field.
func (*SpuUpdate) ClearBrandID ¶
ClearBrandID clears the value of the "brand_id" field.
func (*SpuUpdate) ClearBrands ¶
ClearBrands clears the "brands" edge to the Brand entity.
func (*SpuUpdate) ClearBrowseCount ¶
ClearBrowseCount clears the value of the "browse_count" field.
func (*SpuUpdate) ClearCategoryID ¶
ClearCategoryID clears the value of the "category_id" field.
func (*SpuUpdate) ClearCategorys ¶
ClearCategorys clears the "categorys" edge to the Category entity.
func (*SpuUpdate) ClearDeletedAt ¶
ClearDeletedAt clears the value of the "deleted_at" field.
func (*SpuUpdate) ClearDeliveryTemplateID ¶
ClearDeliveryTemplateID clears the value of the "deliveryTemplate_id" field.
func (*SpuUpdate) ClearDescription ¶
ClearDescription clears the value of the "description" field.
func (*SpuUpdate) ClearGiveCouponTemplateIds ¶
ClearGiveCouponTemplateIds clears the value of the "give_coupon_template_ids" field.
func (*SpuUpdate) ClearGiveIntegral ¶
ClearGiveIntegral clears the value of the "give_integral" field.
func (*SpuUpdate) ClearIntroduction ¶
ClearIntroduction clears the value of the "introduction" field.
func (*SpuUpdate) ClearKeyword ¶
ClearKeyword clears the value of the "keyword" field.
func (*SpuUpdate) ClearMarketPrice ¶
ClearMarketPrice clears the value of the "market_price" field.
func (*SpuUpdate) ClearRecommendBenefit ¶
ClearRecommendBenefit clears the value of the "recommend_benefit" field.
func (*SpuUpdate) ClearRecommendBest ¶
ClearRecommendBest clears the value of the "recommend_best" field.
func (*SpuUpdate) ClearRecommendGood ¶
ClearRecommendGood clears the value of the "recommend_good" field.
func (*SpuUpdate) ClearRecommendHot ¶
ClearRecommendHot clears the value of the "recommend_hot" field.
func (*SpuUpdate) ClearRecommendNew ¶
ClearRecommendNew clears the value of the "recommend_new" field.
func (*SpuUpdate) ClearSalesCount ¶
ClearSalesCount clears the value of the "sales_count" field.
func (*SpuUpdate) ClearSliderPicUrls ¶
ClearSliderPicUrls clears the value of the "slider_pic_urls" field.
func (*SpuUpdate) ClearSpecType ¶
ClearSpecType clears the value of the "spec_type" field.
func (*SpuUpdate) ClearStatus ¶
ClearStatus clears the value of the "status" field.
func (*SpuUpdate) ClearSubCommissionType ¶
ClearSubCommissionType clears the value of the "sub_commission_type" field.
func (*SpuUpdate) ClearVideoURL ¶
ClearVideoURL clears the value of the "video_url" field.
func (*SpuUpdate) ClearVirtualSalesCount ¶
ClearVirtualSalesCount clears the value of the "virtual_sales_count" field.
func (*SpuUpdate) Mutation ¶
func (su *SpuUpdate) Mutation() *SpuMutation
Mutation returns the SpuMutation object of the builder.
func (*SpuUpdate) RemoveSkuIDs ¶
RemoveSkuIDs removes the "skus" edge to Sku entities by IDs.
func (*SpuUpdate) RemoveSkus ¶
RemoveSkus removes "skus" edges to Sku entities.
func (*SpuUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*SpuUpdate) SetActivityOrders ¶
SetActivityOrders sets the "activity_orders" field.
func (*SpuUpdate) SetBarCode ¶
SetBarCode sets the "bar_code" field.
func (*SpuUpdate) SetBrandID ¶
SetBrandID sets the "brand_id" field.
func (*SpuUpdate) SetBrandsID ¶
SetBrandsID sets the "brands" edge to the Brand entity by ID.
func (*SpuUpdate) SetBrowseCount ¶
SetBrowseCount sets the "browse_count" field.
func (*SpuUpdate) SetCategoryID ¶
SetCategoryID sets the "category_id" field.
func (*SpuUpdate) SetCategorys ¶
SetCategorys sets the "categorys" edge to the Category entity.
func (*SpuUpdate) SetCategorysID ¶
SetCategorysID sets the "categorys" edge to the Category entity by ID.
func (*SpuUpdate) SetCostPrice ¶
SetCostPrice sets the "cost_price" field.
func (*SpuUpdate) SetDeletedAt ¶
SetDeletedAt sets the "deleted_at" field.
func (*SpuUpdate) SetDeliveryTemplateID ¶
SetDeliveryTemplateID sets the "deliveryTemplate_id" field.
func (*SpuUpdate) SetDescription ¶
SetDescription sets the "description" field.
func (*SpuUpdate) SetGiveCouponTemplateIds ¶
SetGiveCouponTemplateIds sets the "give_coupon_template_ids" field.
func (*SpuUpdate) SetGiveIntegral ¶
SetGiveIntegral sets the "give_integral" field.
func (*SpuUpdate) SetIntroduction ¶
SetIntroduction sets the "introduction" field.
func (*SpuUpdate) SetKeyword ¶
SetKeyword sets the "keyword" field.
func (*SpuUpdate) SetMarketPrice ¶
SetMarketPrice sets the "market_price" field.
func (*SpuUpdate) SetNillableBarCode ¶
SetNillableBarCode sets the "bar_code" field if the given value is not nil.
func (*SpuUpdate) SetNillableBrandID ¶
SetNillableBrandID sets the "brand_id" field if the given value is not nil.
func (*SpuUpdate) SetNillableBrandsID ¶
SetNillableBrandsID sets the "brands" edge to the Brand entity by ID if the given value is not nil.
func (*SpuUpdate) SetNillableBrowseCount ¶
SetNillableBrowseCount sets the "browse_count" field if the given value is not nil.
func (*SpuUpdate) SetNillableCategoryID ¶
SetNillableCategoryID sets the "category_id" field if the given value is not nil.
func (*SpuUpdate) SetNillableCategorysID ¶
SetNillableCategorysID sets the "categorys" edge to the Category entity by ID if the given value is not nil.
func (*SpuUpdate) SetNillableDeletedAt ¶
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*SpuUpdate) SetNillableDeliveryTemplateID ¶
SetNillableDeliveryTemplateID sets the "deliveryTemplate_id" field if the given value is not nil.
func (*SpuUpdate) SetNillableDescription ¶
SetNillableDescription sets the "description" field if the given value is not nil.
func (*SpuUpdate) SetNillableGiveIntegral ¶
SetNillableGiveIntegral sets the "give_integral" field if the given value is not nil.
func (*SpuUpdate) SetNillableIntroduction ¶
SetNillableIntroduction sets the "introduction" field if the given value is not nil.
func (*SpuUpdate) SetNillableKeyword ¶
SetNillableKeyword sets the "keyword" field if the given value is not nil.
func (*SpuUpdate) SetNillableMarketPrice ¶
SetNillableMarketPrice sets the "market_price" field if the given value is not nil.
func (*SpuUpdate) SetNillableRecommendBenefit ¶
SetNillableRecommendBenefit sets the "recommend_benefit" field if the given value is not nil.
func (*SpuUpdate) SetNillableRecommendBest ¶
SetNillableRecommendBest sets the "recommend_best" field if the given value is not nil.
func (*SpuUpdate) SetNillableRecommendGood ¶
SetNillableRecommendGood sets the "recommend_good" field if the given value is not nil.
func (*SpuUpdate) SetNillableRecommendHot ¶
SetNillableRecommendHot sets the "recommend_hot" field if the given value is not nil.
func (*SpuUpdate) SetNillableRecommendNew ¶
SetNillableRecommendNew sets the "recommend_new" field if the given value is not nil.
func (*SpuUpdate) SetNillableSalesCount ¶
SetNillableSalesCount sets the "sales_count" field if the given value is not nil.
func (*SpuUpdate) SetNillableSort ¶
SetNillableSort sets the "sort" field if the given value is not nil.
func (*SpuUpdate) SetNillableSpecType ¶
SetNillableSpecType sets the "spec_type" field if the given value is not nil.
func (*SpuUpdate) SetNillableStatus ¶
SetNillableStatus sets the "status" field if the given value is not nil.
func (*SpuUpdate) SetNillableSubCommissionType ¶
SetNillableSubCommissionType sets the "sub_commission_type" field if the given value is not nil.
func (*SpuUpdate) SetNillableVideoURL ¶
SetNillableVideoURL sets the "video_url" field if the given value is not nil.
func (*SpuUpdate) SetNillableVirtualSalesCount ¶
SetNillableVirtualSalesCount sets the "virtual_sales_count" field if the given value is not nil.
func (*SpuUpdate) SetNotNilActivityOrders ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilBarCode ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilBrandID ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilBrowseCount ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilCategoryID ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilCostPrice ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilDeletedAt ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilDeliveryTemplateID ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilDescription ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilGiveCouponTemplateIds ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilGiveIntegral ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilIntroduction ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilKeyword ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilMarketPrice ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilName ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilPicURL ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilPrice ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilRecommendBenefit ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilRecommendBest ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilRecommendGood ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilRecommendHot ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilRecommendNew ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilSalesCount ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilSliderPicUrls ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilSort ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilSpecType ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilStatus ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilStock ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilSubCommissionType ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilUnit ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilUpdatedAt ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilVideoURL ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetNotNilVirtualSalesCount ¶
set field if value's pointer is not nil.
func (*SpuUpdate) SetRecommendBenefit ¶
SetRecommendBenefit sets the "recommend_benefit" field.
func (*SpuUpdate) SetRecommendBest ¶
SetRecommendBest sets the "recommend_best" field.
func (*SpuUpdate) SetRecommendGood ¶
SetRecommendGood sets the "recommend_good" field.
func (*SpuUpdate) SetRecommendHot ¶
SetRecommendHot sets the "recommend_hot" field.
func (*SpuUpdate) SetRecommendNew ¶
SetRecommendNew sets the "recommend_new" field.
func (*SpuUpdate) SetSalesCount ¶
SetSalesCount sets the "sales_count" field.
func (*SpuUpdate) SetSliderPicUrls ¶
SetSliderPicUrls sets the "slider_pic_urls" field.
func (*SpuUpdate) SetSpecType ¶
SetSpecType sets the "spec_type" field.
func (*SpuUpdate) SetSubCommissionType ¶
SetSubCommissionType sets the "sub_commission_type" field.
func (*SpuUpdate) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
func (*SpuUpdate) SetVideoURL ¶
SetVideoURL sets the "video_url" field.
func (*SpuUpdate) SetVirtualSalesCount ¶
SetVirtualSalesCount sets the "virtual_sales_count" field.
type SpuUpdateOne ¶
type SpuUpdateOne struct {
// contains filtered or unexported fields
}
SpuUpdateOne is the builder for updating a single Spu entity.
func (*SpuUpdateOne) AddBrowseCount ¶
func (suo *SpuUpdateOne) AddBrowseCount(i int32) *SpuUpdateOne
AddBrowseCount adds i to the "browse_count" field.
func (*SpuUpdateOne) AddCostPrice ¶
func (suo *SpuUpdateOne) AddCostPrice(i int32) *SpuUpdateOne
AddCostPrice adds i to the "cost_price" field.
func (*SpuUpdateOne) AddDeliveryTemplateID ¶
func (suo *SpuUpdateOne) AddDeliveryTemplateID(u int64) *SpuUpdateOne
AddDeliveryTemplateID adds u to the "deliveryTemplate_id" field.
func (*SpuUpdateOne) AddGiveIntegral ¶
func (suo *SpuUpdateOne) AddGiveIntegral(i int32) *SpuUpdateOne
AddGiveIntegral adds i to the "give_integral" field.
func (*SpuUpdateOne) AddMarketPrice ¶
func (suo *SpuUpdateOne) AddMarketPrice(i int32) *SpuUpdateOne
AddMarketPrice adds i to the "market_price" field.
func (*SpuUpdateOne) AddPrice ¶
func (suo *SpuUpdateOne) AddPrice(i int32) *SpuUpdateOne
AddPrice adds i to the "price" field.
func (*SpuUpdateOne) AddSalesCount ¶
func (suo *SpuUpdateOne) AddSalesCount(i int32) *SpuUpdateOne
AddSalesCount adds i to the "sales_count" field.
func (*SpuUpdateOne) AddSkuIDs ¶
func (suo *SpuUpdateOne) AddSkuIDs(ids ...uint64) *SpuUpdateOne
AddSkuIDs adds the "skus" edge to the Sku entity by IDs.
func (*SpuUpdateOne) AddSkus ¶
func (suo *SpuUpdateOne) AddSkus(s ...*Sku) *SpuUpdateOne
AddSkus adds the "skus" edges to the Sku entity.
func (*SpuUpdateOne) AddSort ¶
func (suo *SpuUpdateOne) AddSort(u int32) *SpuUpdateOne
AddSort adds u to the "sort" field.
func (*SpuUpdateOne) AddStatus ¶
func (suo *SpuUpdateOne) AddStatus(u int8) *SpuUpdateOne
AddStatus adds u to the "status" field.
func (*SpuUpdateOne) AddStock ¶
func (suo *SpuUpdateOne) AddStock(i int32) *SpuUpdateOne
AddStock adds i to the "stock" field.
func (*SpuUpdateOne) AddUnit ¶
func (suo *SpuUpdateOne) AddUnit(u int8) *SpuUpdateOne
AddUnit adds u to the "unit" field.
func (*SpuUpdateOne) AddVirtualSalesCount ¶
func (suo *SpuUpdateOne) AddVirtualSalesCount(i int32) *SpuUpdateOne
AddVirtualSalesCount adds i to the "virtual_sales_count" field.
func (*SpuUpdateOne) AppendActivityOrders ¶
func (suo *SpuUpdateOne) AppendActivityOrders(i []int32) *SpuUpdateOne
AppendActivityOrders appends i to the "activity_orders" field.
func (*SpuUpdateOne) AppendGiveCouponTemplateIds ¶
func (suo *SpuUpdateOne) AppendGiveCouponTemplateIds(u []uint64) *SpuUpdateOne
AppendGiveCouponTemplateIds appends u to the "give_coupon_template_ids" field.
func (*SpuUpdateOne) AppendSliderPicUrls ¶
func (suo *SpuUpdateOne) AppendSliderPicUrls(s []string) *SpuUpdateOne
AppendSliderPicUrls appends s to the "slider_pic_urls" field.
func (*SpuUpdateOne) ClearActivityOrders ¶
func (suo *SpuUpdateOne) ClearActivityOrders() *SpuUpdateOne
ClearActivityOrders clears the value of the "activity_orders" field.
func (*SpuUpdateOne) ClearBarCode ¶
func (suo *SpuUpdateOne) ClearBarCode() *SpuUpdateOne
ClearBarCode clears the value of the "bar_code" field.
func (*SpuUpdateOne) ClearBrandID ¶
func (suo *SpuUpdateOne) ClearBrandID() *SpuUpdateOne
ClearBrandID clears the value of the "brand_id" field.
func (*SpuUpdateOne) ClearBrands ¶
func (suo *SpuUpdateOne) ClearBrands() *SpuUpdateOne
ClearBrands clears the "brands" edge to the Brand entity.
func (*SpuUpdateOne) ClearBrowseCount ¶
func (suo *SpuUpdateOne) ClearBrowseCount() *SpuUpdateOne
ClearBrowseCount clears the value of the "browse_count" field.
func (*SpuUpdateOne) ClearCategoryID ¶
func (suo *SpuUpdateOne) ClearCategoryID() *SpuUpdateOne
ClearCategoryID clears the value of the "category_id" field.
func (*SpuUpdateOne) ClearCategorys ¶
func (suo *SpuUpdateOne) ClearCategorys() *SpuUpdateOne
ClearCategorys clears the "categorys" edge to the Category entity.
func (*SpuUpdateOne) ClearDeletedAt ¶
func (suo *SpuUpdateOne) ClearDeletedAt() *SpuUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*SpuUpdateOne) ClearDeliveryTemplateID ¶
func (suo *SpuUpdateOne) ClearDeliveryTemplateID() *SpuUpdateOne
ClearDeliveryTemplateID clears the value of the "deliveryTemplate_id" field.
func (*SpuUpdateOne) ClearDescription ¶
func (suo *SpuUpdateOne) ClearDescription() *SpuUpdateOne
ClearDescription clears the value of the "description" field.
func (*SpuUpdateOne) ClearGiveCouponTemplateIds ¶
func (suo *SpuUpdateOne) ClearGiveCouponTemplateIds() *SpuUpdateOne
ClearGiveCouponTemplateIds clears the value of the "give_coupon_template_ids" field.
func (*SpuUpdateOne) ClearGiveIntegral ¶
func (suo *SpuUpdateOne) ClearGiveIntegral() *SpuUpdateOne
ClearGiveIntegral clears the value of the "give_integral" field.
func (*SpuUpdateOne) ClearIntroduction ¶
func (suo *SpuUpdateOne) ClearIntroduction() *SpuUpdateOne
ClearIntroduction clears the value of the "introduction" field.
func (*SpuUpdateOne) ClearKeyword ¶
func (suo *SpuUpdateOne) ClearKeyword() *SpuUpdateOne
ClearKeyword clears the value of the "keyword" field.
func (*SpuUpdateOne) ClearMarketPrice ¶
func (suo *SpuUpdateOne) ClearMarketPrice() *SpuUpdateOne
ClearMarketPrice clears the value of the "market_price" field.
func (*SpuUpdateOne) ClearRecommendBenefit ¶
func (suo *SpuUpdateOne) ClearRecommendBenefit() *SpuUpdateOne
ClearRecommendBenefit clears the value of the "recommend_benefit" field.
func (*SpuUpdateOne) ClearRecommendBest ¶
func (suo *SpuUpdateOne) ClearRecommendBest() *SpuUpdateOne
ClearRecommendBest clears the value of the "recommend_best" field.
func (*SpuUpdateOne) ClearRecommendGood ¶
func (suo *SpuUpdateOne) ClearRecommendGood() *SpuUpdateOne
ClearRecommendGood clears the value of the "recommend_good" field.
func (*SpuUpdateOne) ClearRecommendHot ¶
func (suo *SpuUpdateOne) ClearRecommendHot() *SpuUpdateOne
ClearRecommendHot clears the value of the "recommend_hot" field.
func (*SpuUpdateOne) ClearRecommendNew ¶
func (suo *SpuUpdateOne) ClearRecommendNew() *SpuUpdateOne
ClearRecommendNew clears the value of the "recommend_new" field.
func (*SpuUpdateOne) ClearSalesCount ¶
func (suo *SpuUpdateOne) ClearSalesCount() *SpuUpdateOne
ClearSalesCount clears the value of the "sales_count" field.
func (*SpuUpdateOne) ClearSkus ¶
func (suo *SpuUpdateOne) ClearSkus() *SpuUpdateOne
ClearSkus clears all "skus" edges to the Sku entity.
func (*SpuUpdateOne) ClearSliderPicUrls ¶
func (suo *SpuUpdateOne) ClearSliderPicUrls() *SpuUpdateOne
ClearSliderPicUrls clears the value of the "slider_pic_urls" field.
func (*SpuUpdateOne) ClearSpecType ¶
func (suo *SpuUpdateOne) ClearSpecType() *SpuUpdateOne
ClearSpecType clears the value of the "spec_type" field.
func (*SpuUpdateOne) ClearStatus ¶
func (suo *SpuUpdateOne) ClearStatus() *SpuUpdateOne
ClearStatus clears the value of the "status" field.
func (*SpuUpdateOne) ClearSubCommissionType ¶
func (suo *SpuUpdateOne) ClearSubCommissionType() *SpuUpdateOne
ClearSubCommissionType clears the value of the "sub_commission_type" field.
func (*SpuUpdateOne) ClearVideoURL ¶
func (suo *SpuUpdateOne) ClearVideoURL() *SpuUpdateOne
ClearVideoURL clears the value of the "video_url" field.
func (*SpuUpdateOne) ClearVirtualSalesCount ¶
func (suo *SpuUpdateOne) ClearVirtualSalesCount() *SpuUpdateOne
ClearVirtualSalesCount clears the value of the "virtual_sales_count" field.
func (*SpuUpdateOne) Exec ¶
func (suo *SpuUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SpuUpdateOne) ExecX ¶
func (suo *SpuUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SpuUpdateOne) Mutation ¶
func (suo *SpuUpdateOne) Mutation() *SpuMutation
Mutation returns the SpuMutation object of the builder.
func (*SpuUpdateOne) RemoveSkuIDs ¶
func (suo *SpuUpdateOne) RemoveSkuIDs(ids ...uint64) *SpuUpdateOne
RemoveSkuIDs removes the "skus" edge to Sku entities by IDs.
func (*SpuUpdateOne) RemoveSkus ¶
func (suo *SpuUpdateOne) RemoveSkus(s ...*Sku) *SpuUpdateOne
RemoveSkus removes "skus" edges to Sku entities.
func (*SpuUpdateOne) Save ¶
func (suo *SpuUpdateOne) Save(ctx context.Context) (*Spu, error)
Save executes the query and returns the updated Spu entity.
func (*SpuUpdateOne) SaveX ¶
func (suo *SpuUpdateOne) SaveX(ctx context.Context) *Spu
SaveX is like Save, but panics if an error occurs.
func (*SpuUpdateOne) Select ¶
func (suo *SpuUpdateOne) Select(field string, fields ...string) *SpuUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SpuUpdateOne) SetActivityOrders ¶
func (suo *SpuUpdateOne) SetActivityOrders(i []int32) *SpuUpdateOne
SetActivityOrders sets the "activity_orders" field.
func (*SpuUpdateOne) SetBarCode ¶
func (suo *SpuUpdateOne) SetBarCode(s string) *SpuUpdateOne
SetBarCode sets the "bar_code" field.
func (*SpuUpdateOne) SetBrandID ¶
func (suo *SpuUpdateOne) SetBrandID(u uint64) *SpuUpdateOne
SetBrandID sets the "brand_id" field.
func (*SpuUpdateOne) SetBrands ¶
func (suo *SpuUpdateOne) SetBrands(b *Brand) *SpuUpdateOne
SetBrands sets the "brands" edge to the Brand entity.
func (*SpuUpdateOne) SetBrandsID ¶
func (suo *SpuUpdateOne) SetBrandsID(id uint64) *SpuUpdateOne
SetBrandsID sets the "brands" edge to the Brand entity by ID.
func (*SpuUpdateOne) SetBrowseCount ¶
func (suo *SpuUpdateOne) SetBrowseCount(i int32) *SpuUpdateOne
SetBrowseCount sets the "browse_count" field.
func (*SpuUpdateOne) SetCategoryID ¶
func (suo *SpuUpdateOne) SetCategoryID(u uint64) *SpuUpdateOne
SetCategoryID sets the "category_id" field.
func (*SpuUpdateOne) SetCategorys ¶
func (suo *SpuUpdateOne) SetCategorys(c *Category) *SpuUpdateOne
SetCategorys sets the "categorys" edge to the Category entity.
func (*SpuUpdateOne) SetCategorysID ¶
func (suo *SpuUpdateOne) SetCategorysID(id uint64) *SpuUpdateOne
SetCategorysID sets the "categorys" edge to the Category entity by ID.
func (*SpuUpdateOne) SetCostPrice ¶
func (suo *SpuUpdateOne) SetCostPrice(i int32) *SpuUpdateOne
SetCostPrice sets the "cost_price" field.
func (*SpuUpdateOne) SetDeletedAt ¶
func (suo *SpuUpdateOne) SetDeletedAt(t time.Time) *SpuUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*SpuUpdateOne) SetDeliveryTemplateID ¶
func (suo *SpuUpdateOne) SetDeliveryTemplateID(u uint64) *SpuUpdateOne
SetDeliveryTemplateID sets the "deliveryTemplate_id" field.
func (*SpuUpdateOne) SetDescription ¶
func (suo *SpuUpdateOne) SetDescription(s string) *SpuUpdateOne
SetDescription sets the "description" field.
func (*SpuUpdateOne) SetGiveCouponTemplateIds ¶
func (suo *SpuUpdateOne) SetGiveCouponTemplateIds(u []uint64) *SpuUpdateOne
SetGiveCouponTemplateIds sets the "give_coupon_template_ids" field.
func (*SpuUpdateOne) SetGiveIntegral ¶
func (suo *SpuUpdateOne) SetGiveIntegral(i int32) *SpuUpdateOne
SetGiveIntegral sets the "give_integral" field.
func (*SpuUpdateOne) SetIntroduction ¶
func (suo *SpuUpdateOne) SetIntroduction(s string) *SpuUpdateOne
SetIntroduction sets the "introduction" field.
func (*SpuUpdateOne) SetKeyword ¶
func (suo *SpuUpdateOne) SetKeyword(s string) *SpuUpdateOne
SetKeyword sets the "keyword" field.
func (*SpuUpdateOne) SetMarketPrice ¶
func (suo *SpuUpdateOne) SetMarketPrice(i int32) *SpuUpdateOne
SetMarketPrice sets the "market_price" field.
func (*SpuUpdateOne) SetName ¶
func (suo *SpuUpdateOne) SetName(s string) *SpuUpdateOne
SetName sets the "name" field.
func (*SpuUpdateOne) SetNillableBarCode ¶
func (suo *SpuUpdateOne) SetNillableBarCode(s *string) *SpuUpdateOne
SetNillableBarCode sets the "bar_code" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableBrandID ¶
func (suo *SpuUpdateOne) SetNillableBrandID(u *uint64) *SpuUpdateOne
SetNillableBrandID sets the "brand_id" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableBrandsID ¶
func (suo *SpuUpdateOne) SetNillableBrandsID(id *uint64) *SpuUpdateOne
SetNillableBrandsID sets the "brands" edge to the Brand entity by ID if the given value is not nil.
func (*SpuUpdateOne) SetNillableBrowseCount ¶
func (suo *SpuUpdateOne) SetNillableBrowseCount(i *int32) *SpuUpdateOne
SetNillableBrowseCount sets the "browse_count" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableCategoryID ¶
func (suo *SpuUpdateOne) SetNillableCategoryID(u *uint64) *SpuUpdateOne
SetNillableCategoryID sets the "category_id" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableCategorysID ¶
func (suo *SpuUpdateOne) SetNillableCategorysID(id *uint64) *SpuUpdateOne
SetNillableCategorysID sets the "categorys" edge to the Category entity by ID if the given value is not nil.
func (*SpuUpdateOne) SetNillableDeletedAt ¶
func (suo *SpuUpdateOne) SetNillableDeletedAt(t *time.Time) *SpuUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableDeliveryTemplateID ¶
func (suo *SpuUpdateOne) SetNillableDeliveryTemplateID(u *uint64) *SpuUpdateOne
SetNillableDeliveryTemplateID sets the "deliveryTemplate_id" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableDescription ¶
func (suo *SpuUpdateOne) SetNillableDescription(s *string) *SpuUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableGiveIntegral ¶
func (suo *SpuUpdateOne) SetNillableGiveIntegral(i *int32) *SpuUpdateOne
SetNillableGiveIntegral sets the "give_integral" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableIntroduction ¶
func (suo *SpuUpdateOne) SetNillableIntroduction(s *string) *SpuUpdateOne
SetNillableIntroduction sets the "introduction" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableKeyword ¶
func (suo *SpuUpdateOne) SetNillableKeyword(s *string) *SpuUpdateOne
SetNillableKeyword sets the "keyword" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableMarketPrice ¶
func (suo *SpuUpdateOne) SetNillableMarketPrice(i *int32) *SpuUpdateOne
SetNillableMarketPrice sets the "market_price" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableRecommendBenefit ¶
func (suo *SpuUpdateOne) SetNillableRecommendBenefit(b *bool) *SpuUpdateOne
SetNillableRecommendBenefit sets the "recommend_benefit" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableRecommendBest ¶
func (suo *SpuUpdateOne) SetNillableRecommendBest(b *bool) *SpuUpdateOne
SetNillableRecommendBest sets the "recommend_best" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableRecommendGood ¶
func (suo *SpuUpdateOne) SetNillableRecommendGood(b *bool) *SpuUpdateOne
SetNillableRecommendGood sets the "recommend_good" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableRecommendHot ¶
func (suo *SpuUpdateOne) SetNillableRecommendHot(b *bool) *SpuUpdateOne
SetNillableRecommendHot sets the "recommend_hot" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableRecommendNew ¶
func (suo *SpuUpdateOne) SetNillableRecommendNew(b *bool) *SpuUpdateOne
SetNillableRecommendNew sets the "recommend_new" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableSalesCount ¶
func (suo *SpuUpdateOne) SetNillableSalesCount(i *int32) *SpuUpdateOne
SetNillableSalesCount sets the "sales_count" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableSort ¶
func (suo *SpuUpdateOne) SetNillableSort(u *uint32) *SpuUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableSpecType ¶
func (suo *SpuUpdateOne) SetNillableSpecType(b *bool) *SpuUpdateOne
SetNillableSpecType sets the "spec_type" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableStatus ¶
func (suo *SpuUpdateOne) SetNillableStatus(u *uint8) *SpuUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableSubCommissionType ¶
func (suo *SpuUpdateOne) SetNillableSubCommissionType(b *bool) *SpuUpdateOne
SetNillableSubCommissionType sets the "sub_commission_type" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableVideoURL ¶
func (suo *SpuUpdateOne) SetNillableVideoURL(s *string) *SpuUpdateOne
SetNillableVideoURL sets the "video_url" field if the given value is not nil.
func (*SpuUpdateOne) SetNillableVirtualSalesCount ¶
func (suo *SpuUpdateOne) SetNillableVirtualSalesCount(i *int32) *SpuUpdateOne
SetNillableVirtualSalesCount sets the "virtual_sales_count" field if the given value is not nil.
func (*SpuUpdateOne) SetNotNilActivityOrders ¶
func (s *SpuUpdateOne) SetNotNilActivityOrders(value *[]int32) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilBarCode ¶
func (s *SpuUpdateOne) SetNotNilBarCode(value *string) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilBrandID ¶
func (s *SpuUpdateOne) SetNotNilBrandID(value *uint64) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilBrowseCount ¶
func (s *SpuUpdateOne) SetNotNilBrowseCount(value *int32) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilCategoryID ¶
func (s *SpuUpdateOne) SetNotNilCategoryID(value *uint64) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilCostPrice ¶
func (s *SpuUpdateOne) SetNotNilCostPrice(value *int32) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilDeletedAt ¶
func (s *SpuUpdateOne) SetNotNilDeletedAt(value *time.Time) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilDeliveryTemplateID ¶
func (s *SpuUpdateOne) SetNotNilDeliveryTemplateID(value *uint64) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilDescription ¶
func (s *SpuUpdateOne) SetNotNilDescription(value *string) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilGiveCouponTemplateIds ¶
func (s *SpuUpdateOne) SetNotNilGiveCouponTemplateIds(value *[]uint64) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilGiveIntegral ¶
func (s *SpuUpdateOne) SetNotNilGiveIntegral(value *int32) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilIntroduction ¶
func (s *SpuUpdateOne) SetNotNilIntroduction(value *string) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilKeyword ¶
func (s *SpuUpdateOne) SetNotNilKeyword(value *string) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilMarketPrice ¶
func (s *SpuUpdateOne) SetNotNilMarketPrice(value *int32) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilName ¶
func (s *SpuUpdateOne) SetNotNilName(value *string) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilPicURL ¶
func (s *SpuUpdateOne) SetNotNilPicURL(value *string) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilPrice ¶
func (s *SpuUpdateOne) SetNotNilPrice(value *int32) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilRecommendBenefit ¶
func (s *SpuUpdateOne) SetNotNilRecommendBenefit(value *bool) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilRecommendBest ¶
func (s *SpuUpdateOne) SetNotNilRecommendBest(value *bool) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilRecommendGood ¶
func (s *SpuUpdateOne) SetNotNilRecommendGood(value *bool) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilRecommendHot ¶
func (s *SpuUpdateOne) SetNotNilRecommendHot(value *bool) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilRecommendNew ¶
func (s *SpuUpdateOne) SetNotNilRecommendNew(value *bool) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilSalesCount ¶
func (s *SpuUpdateOne) SetNotNilSalesCount(value *int32) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilSliderPicUrls ¶
func (s *SpuUpdateOne) SetNotNilSliderPicUrls(value *[]string) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilSort ¶
func (s *SpuUpdateOne) SetNotNilSort(value *uint32) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilSpecType ¶
func (s *SpuUpdateOne) SetNotNilSpecType(value *bool) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilStatus ¶
func (s *SpuUpdateOne) SetNotNilStatus(value *uint8) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilStock ¶
func (s *SpuUpdateOne) SetNotNilStock(value *int32) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilSubCommissionType ¶
func (s *SpuUpdateOne) SetNotNilSubCommissionType(value *bool) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilUnit ¶
func (s *SpuUpdateOne) SetNotNilUnit(value *uint8) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilUpdatedAt ¶
func (s *SpuUpdateOne) SetNotNilUpdatedAt(value *time.Time) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilVideoURL ¶
func (s *SpuUpdateOne) SetNotNilVideoURL(value *string) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetNotNilVirtualSalesCount ¶
func (s *SpuUpdateOne) SetNotNilVirtualSalesCount(value *int32) *SpuUpdateOne
set field if value's pointer is not nil.
func (*SpuUpdateOne) SetPicURL ¶
func (suo *SpuUpdateOne) SetPicURL(s string) *SpuUpdateOne
SetPicURL sets the "pic_url" field.
func (*SpuUpdateOne) SetPrice ¶
func (suo *SpuUpdateOne) SetPrice(i int32) *SpuUpdateOne
SetPrice sets the "price" field.
func (*SpuUpdateOne) SetRecommendBenefit ¶
func (suo *SpuUpdateOne) SetRecommendBenefit(b bool) *SpuUpdateOne
SetRecommendBenefit sets the "recommend_benefit" field.
func (*SpuUpdateOne) SetRecommendBest ¶
func (suo *SpuUpdateOne) SetRecommendBest(b bool) *SpuUpdateOne
SetRecommendBest sets the "recommend_best" field.
func (*SpuUpdateOne) SetRecommendGood ¶
func (suo *SpuUpdateOne) SetRecommendGood(b bool) *SpuUpdateOne
SetRecommendGood sets the "recommend_good" field.
func (*SpuUpdateOne) SetRecommendHot ¶
func (suo *SpuUpdateOne) SetRecommendHot(b bool) *SpuUpdateOne
SetRecommendHot sets the "recommend_hot" field.
func (*SpuUpdateOne) SetRecommendNew ¶
func (suo *SpuUpdateOne) SetRecommendNew(b bool) *SpuUpdateOne
SetRecommendNew sets the "recommend_new" field.
func (*SpuUpdateOne) SetSalesCount ¶
func (suo *SpuUpdateOne) SetSalesCount(i int32) *SpuUpdateOne
SetSalesCount sets the "sales_count" field.
func (*SpuUpdateOne) SetSliderPicUrls ¶
func (suo *SpuUpdateOne) SetSliderPicUrls(s []string) *SpuUpdateOne
SetSliderPicUrls sets the "slider_pic_urls" field.
func (*SpuUpdateOne) SetSort ¶
func (suo *SpuUpdateOne) SetSort(u uint32) *SpuUpdateOne
SetSort sets the "sort" field.
func (*SpuUpdateOne) SetSpecType ¶
func (suo *SpuUpdateOne) SetSpecType(b bool) *SpuUpdateOne
SetSpecType sets the "spec_type" field.
func (*SpuUpdateOne) SetStatus ¶
func (suo *SpuUpdateOne) SetStatus(u uint8) *SpuUpdateOne
SetStatus sets the "status" field.
func (*SpuUpdateOne) SetStock ¶
func (suo *SpuUpdateOne) SetStock(i int32) *SpuUpdateOne
SetStock sets the "stock" field.
func (*SpuUpdateOne) SetSubCommissionType ¶
func (suo *SpuUpdateOne) SetSubCommissionType(b bool) *SpuUpdateOne
SetSubCommissionType sets the "sub_commission_type" field.
func (*SpuUpdateOne) SetUnit ¶
func (suo *SpuUpdateOne) SetUnit(u uint8) *SpuUpdateOne
SetUnit sets the "unit" field.
func (*SpuUpdateOne) SetUpdatedAt ¶
func (suo *SpuUpdateOne) SetUpdatedAt(t time.Time) *SpuUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*SpuUpdateOne) SetVideoURL ¶
func (suo *SpuUpdateOne) SetVideoURL(s string) *SpuUpdateOne
SetVideoURL sets the "video_url" field.
func (*SpuUpdateOne) SetVirtualSalesCount ¶
func (suo *SpuUpdateOne) SetVirtualSalesCount(i int32) *SpuUpdateOne
SetVirtualSalesCount sets the "virtual_sales_count" field.
func (*SpuUpdateOne) Where ¶
func (suo *SpuUpdateOne) Where(ps ...predicate.Spu) *SpuUpdateOne
Where appends a list predicates to the SpuUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Brand is the client for interacting with the Brand builders. Brand *BrandClient // Category is the client for interacting with the Category builders. Category *CategoryClient // Comment is the client for interacting with the Comment builders. Comment *CommentClient // Property is the client for interacting with the Property builders. Property *PropertyClient // PropertyValue is the client for interacting with the PropertyValue builders. PropertyValue *PropertyValueClient // Sku is the client for interacting with the Sku builders. Sku *SkuClient // Spu is the client for interacting with the Spu builders. Spu *SpuClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- brand.go
- brand_create.go
- brand_delete.go
- brand_query.go
- brand_update.go
- category.go
- category_create.go
- category_delete.go
- category_query.go
- category_update.go
- client.go
- comment.go
- comment_create.go
- comment_delete.go
- comment_query.go
- comment_update.go
- ent.go
- generate.go
- mutation.go
- pagination.go
- property.go
- property_create.go
- property_delete.go
- property_query.go
- property_update.go
- propertyvalue.go
- propertyvalue_create.go
- propertyvalue_delete.go
- propertyvalue_query.go
- propertyvalue_update.go
- runtime.go
- set_not_nil.go
- sku.go
- sku_create.go
- sku_delete.go
- sku_query.go
- sku_update.go
- spu.go
- spu_create.go
- spu_delete.go
- spu_query.go
- spu_update.go
- tx.go