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 Address
- type AddressClient
- func (c *AddressClient) Create() *AddressCreate
- func (c *AddressClient) CreateBulk(builders ...*AddressCreate) *AddressCreateBulk
- func (c *AddressClient) Delete() *AddressDelete
- func (c *AddressClient) DeleteOne(a *Address) *AddressDeleteOne
- func (c *AddressClient) DeleteOneID(id uuid.UUID) *AddressDeleteOne
- func (c *AddressClient) Get(ctx context.Context, id uuid.UUID) (*Address, error)
- func (c *AddressClient) GetX(ctx context.Context, id uuid.UUID) *Address
- func (c *AddressClient) Hooks() []Hook
- func (c *AddressClient) Intercept(interceptors ...Interceptor)
- func (c *AddressClient) Interceptors() []Interceptor
- func (c *AddressClient) MapCreateBulk(slice any, setFunc func(*AddressCreate, int)) *AddressCreateBulk
- func (c *AddressClient) Query() *AddressQuery
- func (c *AddressClient) QueryPersonAddresses(a *Address) *PersonAddressQuery
- func (c *AddressClient) QueryPersons(a *Address) *PersonQuery
- func (c *AddressClient) Update() *AddressUpdate
- func (c *AddressClient) UpdateOne(a *Address) *AddressUpdateOne
- func (c *AddressClient) UpdateOneID(id uuid.UUID) *AddressUpdateOne
- func (c *AddressClient) Use(hooks ...Hook)
- type AddressCreate
- func (ac *AddressCreate) AddPersonIDs(ids ...uuid.UUID) *AddressCreate
- func (ac *AddressCreate) AddPersons(p ...*Person) *AddressCreate
- func (ac *AddressCreate) Exec(ctx context.Context) error
- func (ac *AddressCreate) ExecX(ctx context.Context)
- func (ac *AddressCreate) Mutation() *AddressMutation
- func (ac *AddressCreate) Save(ctx context.Context) (*Address, error)
- func (ac *AddressCreate) SaveX(ctx context.Context) *Address
- func (ac *AddressCreate) SetCity(s string) *AddressCreate
- func (ac *AddressCreate) SetCountry(s string) *AddressCreate
- func (ac *AddressCreate) SetCreatedAt(t time.Time) *AddressCreate
- func (ac *AddressCreate) SetID(u uuid.UUID) *AddressCreate
- func (ac *AddressCreate) SetLine1(s string) *AddressCreate
- func (ac *AddressCreate) SetLine2(s string) *AddressCreate
- func (ac *AddressCreate) SetNillableCreatedAt(t *time.Time) *AddressCreate
- func (ac *AddressCreate) SetNillableID(u *uuid.UUID) *AddressCreate
- func (ac *AddressCreate) SetNillableLine2(s *string) *AddressCreate
- func (ac *AddressCreate) SetNillableOtherAddressDetails(s *string) *AddressCreate
- func (ac *AddressCreate) SetOtherAddressDetails(s string) *AddressCreate
- func (ac *AddressCreate) SetStateOrProvince(s string) *AddressCreate
- func (ac *AddressCreate) SetZipOrPostcode(s string) *AddressCreate
- type AddressCreateBulk
- type AddressDelete
- type AddressDeleteOne
- type AddressEdges
- type AddressGroupBy
- func (agb *AddressGroupBy) Aggregate(fns ...AggregateFunc) *AddressGroupBy
- func (s *AddressGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AddressGroupBy) BoolX(ctx context.Context) bool
- func (s *AddressGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AddressGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AddressGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AddressGroupBy) Float64X(ctx context.Context) float64
- func (s *AddressGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AddressGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AddressGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AddressGroupBy) IntX(ctx context.Context) int
- func (s *AddressGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AddressGroupBy) IntsX(ctx context.Context) []int
- func (agb *AddressGroupBy) Scan(ctx context.Context, v any) error
- func (s *AddressGroupBy) ScanX(ctx context.Context, v any)
- func (s *AddressGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AddressGroupBy) StringX(ctx context.Context) string
- func (s *AddressGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AddressGroupBy) StringsX(ctx context.Context) []string
- type AddressMutation
- func (m *AddressMutation) AddField(name string, value ent.Value) error
- func (m *AddressMutation) AddPersonIDs(ids ...uuid.UUID)
- func (m *AddressMutation) AddedEdges() []string
- func (m *AddressMutation) AddedField(name string) (ent.Value, bool)
- func (m *AddressMutation) AddedFields() []string
- func (m *AddressMutation) AddedIDs(name string) []ent.Value
- func (m *AddressMutation) City() (r string, exists bool)
- func (m *AddressMutation) ClearEdge(name string) error
- func (m *AddressMutation) ClearField(name string) error
- func (m *AddressMutation) ClearLine2()
- func (m *AddressMutation) ClearOtherAddressDetails()
- func (m *AddressMutation) ClearPersons()
- func (m *AddressMutation) ClearedEdges() []string
- func (m *AddressMutation) ClearedFields() []string
- func (m AddressMutation) Client() *Client
- func (m *AddressMutation) Country() (r string, exists bool)
- func (m *AddressMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AddressMutation) EdgeCleared(name string) bool
- func (m *AddressMutation) Field(name string) (ent.Value, bool)
- func (m *AddressMutation) FieldCleared(name string) bool
- func (m *AddressMutation) Fields() []string
- func (m *AddressMutation) ID() (id uuid.UUID, exists bool)
- func (m *AddressMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AddressMutation) Line1() (r string, exists bool)
- func (m *AddressMutation) Line2() (r string, exists bool)
- func (m *AddressMutation) Line2Cleared() bool
- func (m *AddressMutation) OldCity(ctx context.Context) (v string, err error)
- func (m *AddressMutation) OldCountry(ctx context.Context) (v string, err error)
- func (m *AddressMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *AddressMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AddressMutation) OldLine1(ctx context.Context) (v string, err error)
- func (m *AddressMutation) OldLine2(ctx context.Context) (v *string, err error)
- func (m *AddressMutation) OldOtherAddressDetails(ctx context.Context) (v *string, err error)
- func (m *AddressMutation) OldStateOrProvince(ctx context.Context) (v string, err error)
- func (m *AddressMutation) OldZipOrPostcode(ctx context.Context) (v string, err error)
- func (m *AddressMutation) Op() Op
- func (m *AddressMutation) OtherAddressDetails() (r string, exists bool)
- func (m *AddressMutation) OtherAddressDetailsCleared() bool
- func (m *AddressMutation) PersonsCleared() bool
- func (m *AddressMutation) PersonsIDs() (ids []uuid.UUID)
- func (m *AddressMutation) RemovePersonIDs(ids ...uuid.UUID)
- func (m *AddressMutation) RemovedEdges() []string
- func (m *AddressMutation) RemovedIDs(name string) []ent.Value
- func (m *AddressMutation) RemovedPersonsIDs() (ids []uuid.UUID)
- func (m *AddressMutation) ResetCity()
- func (m *AddressMutation) ResetCountry()
- func (m *AddressMutation) ResetCreatedAt()
- func (m *AddressMutation) ResetEdge(name string) error
- func (m *AddressMutation) ResetField(name string) error
- func (m *AddressMutation) ResetLine1()
- func (m *AddressMutation) ResetLine2()
- func (m *AddressMutation) ResetOtherAddressDetails()
- func (m *AddressMutation) ResetPersons()
- func (m *AddressMutation) ResetStateOrProvince()
- func (m *AddressMutation) ResetZipOrPostcode()
- func (m *AddressMutation) SetCity(s string)
- func (m *AddressMutation) SetCountry(s string)
- func (m *AddressMutation) SetCreatedAt(t time.Time)
- func (m *AddressMutation) SetField(name string, value ent.Value) error
- func (m *AddressMutation) SetID(id uuid.UUID)
- func (m *AddressMutation) SetLine1(s string)
- func (m *AddressMutation) SetLine2(s string)
- func (m *AddressMutation) SetOp(op Op)
- func (m *AddressMutation) SetOtherAddressDetails(s string)
- func (m *AddressMutation) SetStateOrProvince(s string)
- func (m *AddressMutation) SetZipOrPostcode(s string)
- func (m *AddressMutation) StateOrProvince() (r string, exists bool)
- func (m AddressMutation) Tx() (*Tx, error)
- func (m *AddressMutation) Type() string
- func (m *AddressMutation) Where(ps ...predicate.Address)
- func (m *AddressMutation) WhereP(ps ...func(*sql.Selector))
- func (m *AddressMutation) ZipOrPostcode() (r string, exists bool)
- type AddressQuery
- func (aq *AddressQuery) Aggregate(fns ...AggregateFunc) *AddressSelect
- func (aq *AddressQuery) All(ctx context.Context) ([]*Address, error)
- func (aq *AddressQuery) AllX(ctx context.Context) []*Address
- func (aq *AddressQuery) Clone() *AddressQuery
- func (aq *AddressQuery) Count(ctx context.Context) (int, error)
- func (aq *AddressQuery) CountX(ctx context.Context) int
- func (aq *AddressQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AddressQuery) ExistX(ctx context.Context) bool
- func (aq *AddressQuery) First(ctx context.Context) (*Address, error)
- func (aq *AddressQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AddressQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (aq *AddressQuery) FirstX(ctx context.Context) *Address
- func (aq *AddressQuery) GroupBy(field string, fields ...string) *AddressGroupBy
- func (aq *AddressQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (aq *AddressQuery) IDsX(ctx context.Context) []uuid.UUID
- func (aq *AddressQuery) Limit(limit int) *AddressQuery
- func (aq *AddressQuery) Offset(offset int) *AddressQuery
- func (aq *AddressQuery) Only(ctx context.Context) (*Address, error)
- func (aq *AddressQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AddressQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (aq *AddressQuery) OnlyX(ctx context.Context) *Address
- func (aq *AddressQuery) Order(o ...address.OrderOption) *AddressQuery
- func (aq *AddressQuery) QueryPersonAddresses() *PersonAddressQuery
- func (aq *AddressQuery) QueryPersons() *PersonQuery
- func (aq *AddressQuery) Select(fields ...string) *AddressSelect
- func (aq *AddressQuery) Unique(unique bool) *AddressQuery
- func (aq *AddressQuery) Where(ps ...predicate.Address) *AddressQuery
- func (aq *AddressQuery) WithPersonAddresses(opts ...func(*PersonAddressQuery)) *AddressQuery
- func (aq *AddressQuery) WithPersons(opts ...func(*PersonQuery)) *AddressQuery
- type AddressSelect
- func (as *AddressSelect) Aggregate(fns ...AggregateFunc) *AddressSelect
- func (s *AddressSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AddressSelect) BoolX(ctx context.Context) bool
- func (s *AddressSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AddressSelect) BoolsX(ctx context.Context) []bool
- func (s *AddressSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AddressSelect) Float64X(ctx context.Context) float64
- func (s *AddressSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AddressSelect) Float64sX(ctx context.Context) []float64
- func (s *AddressSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AddressSelect) IntX(ctx context.Context) int
- func (s *AddressSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AddressSelect) IntsX(ctx context.Context) []int
- func (as *AddressSelect) Scan(ctx context.Context, v any) error
- func (s *AddressSelect) ScanX(ctx context.Context, v any)
- func (s *AddressSelect) String(ctx context.Context) (_ string, err error)
- func (s *AddressSelect) StringX(ctx context.Context) string
- func (s *AddressSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AddressSelect) StringsX(ctx context.Context) []string
- type AddressUpdate
- func (au *AddressUpdate) AddPersonIDs(ids ...uuid.UUID) *AddressUpdate
- func (au *AddressUpdate) AddPersons(p ...*Person) *AddressUpdate
- func (au *AddressUpdate) ClearPersons() *AddressUpdate
- func (au *AddressUpdate) Exec(ctx context.Context) error
- func (au *AddressUpdate) ExecX(ctx context.Context)
- func (au *AddressUpdate) Mutation() *AddressMutation
- func (au *AddressUpdate) RemovePersonIDs(ids ...uuid.UUID) *AddressUpdate
- func (au *AddressUpdate) RemovePersons(p ...*Person) *AddressUpdate
- func (au *AddressUpdate) Save(ctx context.Context) (int, error)
- func (au *AddressUpdate) SaveX(ctx context.Context) int
- func (au *AddressUpdate) Where(ps ...predicate.Address) *AddressUpdate
- type AddressUpdateOne
- func (auo *AddressUpdateOne) AddPersonIDs(ids ...uuid.UUID) *AddressUpdateOne
- func (auo *AddressUpdateOne) AddPersons(p ...*Person) *AddressUpdateOne
- func (auo *AddressUpdateOne) ClearPersons() *AddressUpdateOne
- func (auo *AddressUpdateOne) Exec(ctx context.Context) error
- func (auo *AddressUpdateOne) ExecX(ctx context.Context)
- func (auo *AddressUpdateOne) Mutation() *AddressMutation
- func (auo *AddressUpdateOne) RemovePersonIDs(ids ...uuid.UUID) *AddressUpdateOne
- func (auo *AddressUpdateOne) RemovePersons(p ...*Person) *AddressUpdateOne
- func (auo *AddressUpdateOne) Save(ctx context.Context) (*Address, error)
- func (auo *AddressUpdateOne) SaveX(ctx context.Context) *Address
- func (auo *AddressUpdateOne) Select(field string, fields ...string) *AddressUpdateOne
- func (auo *AddressUpdateOne) Where(ps ...predicate.Address) *AddressUpdateOne
- type Addresses
- type AggregateFunc
- 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 CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Conversation
- func (c *Conversation) QueryPersonOne() *PersonQuery
- func (c *Conversation) QueryPersonTwo() *PersonQuery
- func (c *Conversation) String() string
- func (c *Conversation) Unwrap() *Conversation
- func (c *Conversation) Update() *ConversationUpdateOne
- func (c *Conversation) Value(name string) (ent.Value, error)
- type ConversationClient
- func (c *ConversationClient) Create() *ConversationCreate
- func (c *ConversationClient) CreateBulk(builders ...*ConversationCreate) *ConversationCreateBulk
- func (c *ConversationClient) Delete() *ConversationDelete
- func (c *ConversationClient) DeleteOne(co *Conversation) *ConversationDeleteOne
- func (c *ConversationClient) DeleteOneID(id uuid.UUID) *ConversationDeleteOne
- func (c *ConversationClient) Get(ctx context.Context, id uuid.UUID) (*Conversation, error)
- func (c *ConversationClient) GetX(ctx context.Context, id uuid.UUID) *Conversation
- func (c *ConversationClient) Hooks() []Hook
- func (c *ConversationClient) Intercept(interceptors ...Interceptor)
- func (c *ConversationClient) Interceptors() []Interceptor
- func (c *ConversationClient) MapCreateBulk(slice any, setFunc func(*ConversationCreate, int)) *ConversationCreateBulk
- func (c *ConversationClient) Query() *ConversationQuery
- func (c *ConversationClient) QueryPersonOne(co *Conversation) *PersonQuery
- func (c *ConversationClient) QueryPersonTwo(co *Conversation) *PersonQuery
- func (c *ConversationClient) Update() *ConversationUpdate
- func (c *ConversationClient) UpdateOne(co *Conversation) *ConversationUpdateOne
- func (c *ConversationClient) UpdateOneID(id uuid.UUID) *ConversationUpdateOne
- func (c *ConversationClient) Use(hooks ...Hook)
- type ConversationCreate
- func (cc *ConversationCreate) Exec(ctx context.Context) error
- func (cc *ConversationCreate) ExecX(ctx context.Context)
- func (cc *ConversationCreate) Mutation() *ConversationMutation
- func (cc *ConversationCreate) Save(ctx context.Context) (*Conversation, error)
- func (cc *ConversationCreate) SaveX(ctx context.Context) *Conversation
- func (cc *ConversationCreate) SetCreatedAt(t time.Time) *ConversationCreate
- func (cc *ConversationCreate) SetID(u uuid.UUID) *ConversationCreate
- func (cc *ConversationCreate) SetNillableCreatedAt(t *time.Time) *ConversationCreate
- func (cc *ConversationCreate) SetNillableID(u *uuid.UUID) *ConversationCreate
- func (cc *ConversationCreate) SetNillableTitle(s *string) *ConversationCreate
- func (cc *ConversationCreate) SetNillableUpdatedAt(t *time.Time) *ConversationCreate
- func (cc *ConversationCreate) SetPersonOne(p *Person) *ConversationCreate
- func (cc *ConversationCreate) SetPersonOneID(u uuid.UUID) *ConversationCreate
- func (cc *ConversationCreate) SetPersonTwo(p *Person) *ConversationCreate
- func (cc *ConversationCreate) SetPersonTwoID(u uuid.UUID) *ConversationCreate
- func (cc *ConversationCreate) SetTitle(s string) *ConversationCreate
- func (cc *ConversationCreate) SetUpdatedAt(t time.Time) *ConversationCreate
- type ConversationCreateBulk
- type ConversationDelete
- type ConversationDeleteOne
- type ConversationEdges
- type ConversationGroupBy
- func (cgb *ConversationGroupBy) Aggregate(fns ...AggregateFunc) *ConversationGroupBy
- func (s *ConversationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ConversationGroupBy) BoolX(ctx context.Context) bool
- func (s *ConversationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ConversationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ConversationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ConversationGroupBy) Float64X(ctx context.Context) float64
- func (s *ConversationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ConversationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ConversationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ConversationGroupBy) IntX(ctx context.Context) int
- func (s *ConversationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ConversationGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ConversationGroupBy) Scan(ctx context.Context, v any) error
- func (s *ConversationGroupBy) ScanX(ctx context.Context, v any)
- func (s *ConversationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ConversationGroupBy) StringX(ctx context.Context) string
- func (s *ConversationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ConversationGroupBy) StringsX(ctx context.Context) []string
- type ConversationMutation
- func (m *ConversationMutation) AddField(name string, value ent.Value) error
- func (m *ConversationMutation) AddedEdges() []string
- func (m *ConversationMutation) AddedField(name string) (ent.Value, bool)
- func (m *ConversationMutation) AddedFields() []string
- func (m *ConversationMutation) AddedIDs(name string) []ent.Value
- func (m *ConversationMutation) ClearEdge(name string) error
- func (m *ConversationMutation) ClearField(name string) error
- func (m *ConversationMutation) ClearPersonOne()
- func (m *ConversationMutation) ClearPersonTwo()
- func (m *ConversationMutation) ClearTitle()
- func (m *ConversationMutation) ClearedEdges() []string
- func (m *ConversationMutation) ClearedFields() []string
- func (m ConversationMutation) Client() *Client
- func (m *ConversationMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ConversationMutation) EdgeCleared(name string) bool
- func (m *ConversationMutation) Field(name string) (ent.Value, bool)
- func (m *ConversationMutation) FieldCleared(name string) bool
- func (m *ConversationMutation) Fields() []string
- func (m *ConversationMutation) ID() (id uuid.UUID, exists bool)
- func (m *ConversationMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ConversationMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ConversationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ConversationMutation) OldPersonOneID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ConversationMutation) OldPersonTwoID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ConversationMutation) OldTitle(ctx context.Context) (v *string, err error)
- func (m *ConversationMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ConversationMutation) Op() Op
- func (m *ConversationMutation) PersonOneCleared() bool
- func (m *ConversationMutation) PersonOneID() (r uuid.UUID, exists bool)
- func (m *ConversationMutation) PersonOneIDs() (ids []uuid.UUID)
- func (m *ConversationMutation) PersonTwoCleared() bool
- func (m *ConversationMutation) PersonTwoID() (r uuid.UUID, exists bool)
- func (m *ConversationMutation) PersonTwoIDs() (ids []uuid.UUID)
- func (m *ConversationMutation) RemovedEdges() []string
- func (m *ConversationMutation) RemovedIDs(name string) []ent.Value
- func (m *ConversationMutation) ResetCreatedAt()
- func (m *ConversationMutation) ResetEdge(name string) error
- func (m *ConversationMutation) ResetField(name string) error
- func (m *ConversationMutation) ResetPersonOne()
- func (m *ConversationMutation) ResetPersonOneID()
- func (m *ConversationMutation) ResetPersonTwo()
- func (m *ConversationMutation) ResetPersonTwoID()
- func (m *ConversationMutation) ResetTitle()
- func (m *ConversationMutation) ResetUpdatedAt()
- func (m *ConversationMutation) SetCreatedAt(t time.Time)
- func (m *ConversationMutation) SetField(name string, value ent.Value) error
- func (m *ConversationMutation) SetID(id uuid.UUID)
- func (m *ConversationMutation) SetOp(op Op)
- func (m *ConversationMutation) SetPersonOneID(u uuid.UUID)
- func (m *ConversationMutation) SetPersonTwoID(u uuid.UUID)
- func (m *ConversationMutation) SetTitle(s string)
- func (m *ConversationMutation) SetUpdatedAt(t time.Time)
- func (m *ConversationMutation) Title() (r string, exists bool)
- func (m *ConversationMutation) TitleCleared() bool
- func (m ConversationMutation) Tx() (*Tx, error)
- func (m *ConversationMutation) Type() string
- func (m *ConversationMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ConversationMutation) Where(ps ...predicate.Conversation)
- func (m *ConversationMutation) WhereP(ps ...func(*sql.Selector))
- type ConversationQuery
- func (cq *ConversationQuery) Aggregate(fns ...AggregateFunc) *ConversationSelect
- func (cq *ConversationQuery) All(ctx context.Context) ([]*Conversation, error)
- func (cq *ConversationQuery) AllX(ctx context.Context) []*Conversation
- func (cq *ConversationQuery) Clone() *ConversationQuery
- func (cq *ConversationQuery) Count(ctx context.Context) (int, error)
- func (cq *ConversationQuery) CountX(ctx context.Context) int
- func (cq *ConversationQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ConversationQuery) ExistX(ctx context.Context) bool
- func (cq *ConversationQuery) First(ctx context.Context) (*Conversation, error)
- func (cq *ConversationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *ConversationQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (cq *ConversationQuery) FirstX(ctx context.Context) *Conversation
- func (cq *ConversationQuery) GroupBy(field string, fields ...string) *ConversationGroupBy
- func (cq *ConversationQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (cq *ConversationQuery) IDsX(ctx context.Context) []uuid.UUID
- func (cq *ConversationQuery) Limit(limit int) *ConversationQuery
- func (cq *ConversationQuery) Offset(offset int) *ConversationQuery
- func (cq *ConversationQuery) Only(ctx context.Context) (*Conversation, error)
- func (cq *ConversationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (cq *ConversationQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (cq *ConversationQuery) OnlyX(ctx context.Context) *Conversation
- func (cq *ConversationQuery) Order(o ...conversation.OrderOption) *ConversationQuery
- func (cq *ConversationQuery) QueryPersonOne() *PersonQuery
- func (cq *ConversationQuery) QueryPersonTwo() *PersonQuery
- func (cq *ConversationQuery) Select(fields ...string) *ConversationSelect
- func (cq *ConversationQuery) Unique(unique bool) *ConversationQuery
- func (cq *ConversationQuery) Where(ps ...predicate.Conversation) *ConversationQuery
- func (cq *ConversationQuery) WithPersonOne(opts ...func(*PersonQuery)) *ConversationQuery
- func (cq *ConversationQuery) WithPersonTwo(opts ...func(*PersonQuery)) *ConversationQuery
- type ConversationSelect
- func (cs *ConversationSelect) Aggregate(fns ...AggregateFunc) *ConversationSelect
- func (s *ConversationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ConversationSelect) BoolX(ctx context.Context) bool
- func (s *ConversationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ConversationSelect) BoolsX(ctx context.Context) []bool
- func (s *ConversationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ConversationSelect) Float64X(ctx context.Context) float64
- func (s *ConversationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ConversationSelect) Float64sX(ctx context.Context) []float64
- func (s *ConversationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ConversationSelect) IntX(ctx context.Context) int
- func (s *ConversationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ConversationSelect) IntsX(ctx context.Context) []int
- func (cs *ConversationSelect) Scan(ctx context.Context, v any) error
- func (s *ConversationSelect) ScanX(ctx context.Context, v any)
- func (s *ConversationSelect) String(ctx context.Context) (_ string, err error)
- func (s *ConversationSelect) StringX(ctx context.Context) string
- func (s *ConversationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ConversationSelect) StringsX(ctx context.Context) []string
- type ConversationUpdate
- func (cu *ConversationUpdate) ClearTitle() *ConversationUpdate
- func (cu *ConversationUpdate) Exec(ctx context.Context) error
- func (cu *ConversationUpdate) ExecX(ctx context.Context)
- func (cu *ConversationUpdate) Mutation() *ConversationMutation
- func (cu *ConversationUpdate) Save(ctx context.Context) (int, error)
- func (cu *ConversationUpdate) SaveX(ctx context.Context) int
- func (cu *ConversationUpdate) SetNillableTitle(s *string) *ConversationUpdate
- func (cu *ConversationUpdate) SetTitle(s string) *ConversationUpdate
- func (cu *ConversationUpdate) SetUpdatedAt(t time.Time) *ConversationUpdate
- func (cu *ConversationUpdate) Where(ps ...predicate.Conversation) *ConversationUpdate
- type ConversationUpdateOne
- func (cuo *ConversationUpdateOne) ClearTitle() *ConversationUpdateOne
- func (cuo *ConversationUpdateOne) Exec(ctx context.Context) error
- func (cuo *ConversationUpdateOne) ExecX(ctx context.Context)
- func (cuo *ConversationUpdateOne) Mutation() *ConversationMutation
- func (cuo *ConversationUpdateOne) Save(ctx context.Context) (*Conversation, error)
- func (cuo *ConversationUpdateOne) SaveX(ctx context.Context) *Conversation
- func (cuo *ConversationUpdateOne) Select(field string, fields ...string) *ConversationUpdateOne
- func (cuo *ConversationUpdateOne) SetNillableTitle(s *string) *ConversationUpdateOne
- func (cuo *ConversationUpdateOne) SetTitle(s string) *ConversationUpdateOne
- func (cuo *ConversationUpdateOne) SetUpdatedAt(t time.Time) *ConversationUpdateOne
- func (cuo *ConversationUpdateOne) Where(ps ...predicate.Conversation) *ConversationUpdateOne
- type Conversations
- type Hook
- type InterceptFunc
- type Interceptor
- type Invoice
- type InvoiceClient
- func (c *InvoiceClient) Create() *InvoiceCreate
- func (c *InvoiceClient) CreateBulk(builders ...*InvoiceCreate) *InvoiceCreateBulk
- func (c *InvoiceClient) Delete() *InvoiceDelete
- func (c *InvoiceClient) DeleteOne(i *Invoice) *InvoiceDeleteOne
- func (c *InvoiceClient) DeleteOneID(id uuid.UUID) *InvoiceDeleteOne
- func (c *InvoiceClient) Get(ctx context.Context, id uuid.UUID) (*Invoice, error)
- func (c *InvoiceClient) GetX(ctx context.Context, id uuid.UUID) *Invoice
- func (c *InvoiceClient) Hooks() []Hook
- func (c *InvoiceClient) Intercept(interceptors ...Interceptor)
- func (c *InvoiceClient) Interceptors() []Interceptor
- func (c *InvoiceClient) MapCreateBulk(slice any, setFunc func(*InvoiceCreate, int)) *InvoiceCreateBulk
- func (c *InvoiceClient) Query() *InvoiceQuery
- func (c *InvoiceClient) QueryInvoiceStatus(i *Invoice) *InvoiceStatusCodeQuery
- func (c *InvoiceClient) QueryOrder(i *Invoice) *OrderQuery
- func (c *InvoiceClient) Update() *InvoiceUpdate
- func (c *InvoiceClient) UpdateOne(i *Invoice) *InvoiceUpdateOne
- func (c *InvoiceClient) UpdateOneID(id uuid.UUID) *InvoiceUpdateOne
- func (c *InvoiceClient) Use(hooks ...Hook)
- type InvoiceCreate
- func (ic *InvoiceCreate) Exec(ctx context.Context) error
- func (ic *InvoiceCreate) ExecX(ctx context.Context)
- func (ic *InvoiceCreate) Mutation() *InvoiceMutation
- func (ic *InvoiceCreate) Save(ctx context.Context) (*Invoice, error)
- func (ic *InvoiceCreate) SaveX(ctx context.Context) *Invoice
- func (ic *InvoiceCreate) SetCreatedAt(t time.Time) *InvoiceCreate
- func (ic *InvoiceCreate) SetID(u uuid.UUID) *InvoiceCreate
- func (ic *InvoiceCreate) SetInvoiceStatus(i *InvoiceStatusCode) *InvoiceCreate
- func (ic *InvoiceCreate) SetInvoiceStatusID(id int) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableCreatedAt(t *time.Time) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableID(u *uuid.UUID) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableNote(s *string) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillablePaymentMethod(im *invoice.PaymentMethod) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableStatusCode(i *int) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableType(i *invoice.Type) *InvoiceCreate
- func (ic *InvoiceCreate) SetNillableUpdatedAt(t *time.Time) *InvoiceCreate
- func (ic *InvoiceCreate) SetNote(s string) *InvoiceCreate
- func (ic *InvoiceCreate) SetOrder(o *Order) *InvoiceCreate
- func (ic *InvoiceCreate) SetOrderID(u uuid.UUID) *InvoiceCreate
- func (ic *InvoiceCreate) SetPaymentMethod(im invoice.PaymentMethod) *InvoiceCreate
- func (ic *InvoiceCreate) SetStatusCode(i int) *InvoiceCreate
- func (ic *InvoiceCreate) SetTotal(d decimal.Decimal) *InvoiceCreate
- func (ic *InvoiceCreate) SetType(i invoice.Type) *InvoiceCreate
- func (ic *InvoiceCreate) SetUpdatedAt(t time.Time) *InvoiceCreate
- type InvoiceCreateBulk
- type InvoiceDelete
- type InvoiceDeleteOne
- type InvoiceEdges
- type InvoiceGroupBy
- func (igb *InvoiceGroupBy) Aggregate(fns ...AggregateFunc) *InvoiceGroupBy
- func (s *InvoiceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *InvoiceGroupBy) BoolX(ctx context.Context) bool
- func (s *InvoiceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *InvoiceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *InvoiceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *InvoiceGroupBy) Float64X(ctx context.Context) float64
- func (s *InvoiceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *InvoiceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *InvoiceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *InvoiceGroupBy) IntX(ctx context.Context) int
- func (s *InvoiceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *InvoiceGroupBy) IntsX(ctx context.Context) []int
- func (igb *InvoiceGroupBy) Scan(ctx context.Context, v any) error
- func (s *InvoiceGroupBy) ScanX(ctx context.Context, v any)
- func (s *InvoiceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *InvoiceGroupBy) StringX(ctx context.Context) string
- func (s *InvoiceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *InvoiceGroupBy) StringsX(ctx context.Context) []string
- type InvoiceHistories
- type InvoiceHistory
- func (ih *InvoiceHistory) QueryInvoice() *InvoiceQuery
- func (ih *InvoiceHistory) QueryNewStatus() *InvoiceStatusCodeQuery
- func (ih *InvoiceHistory) QueryOldStatus() *InvoiceStatusCodeQuery
- func (ih *InvoiceHistory) QueryPerson() *PersonQuery
- func (ih *InvoiceHistory) String() string
- func (ih *InvoiceHistory) Unwrap() *InvoiceHistory
- func (ih *InvoiceHistory) Update() *InvoiceHistoryUpdateOne
- func (ih *InvoiceHistory) Value(name string) (ent.Value, error)
- type InvoiceHistoryClient
- func (c *InvoiceHistoryClient) Create() *InvoiceHistoryCreate
- func (c *InvoiceHistoryClient) CreateBulk(builders ...*InvoiceHistoryCreate) *InvoiceHistoryCreateBulk
- func (c *InvoiceHistoryClient) Delete() *InvoiceHistoryDelete
- func (c *InvoiceHistoryClient) DeleteOne(ih *InvoiceHistory) *InvoiceHistoryDeleteOne
- func (c *InvoiceHistoryClient) DeleteOneID(id uuid.UUID) *InvoiceHistoryDeleteOne
- func (c *InvoiceHistoryClient) Get(ctx context.Context, id uuid.UUID) (*InvoiceHistory, error)
- func (c *InvoiceHistoryClient) GetX(ctx context.Context, id uuid.UUID) *InvoiceHistory
- func (c *InvoiceHistoryClient) Hooks() []Hook
- func (c *InvoiceHistoryClient) Intercept(interceptors ...Interceptor)
- func (c *InvoiceHistoryClient) Interceptors() []Interceptor
- func (c *InvoiceHistoryClient) MapCreateBulk(slice any, setFunc func(*InvoiceHistoryCreate, int)) *InvoiceHistoryCreateBulk
- func (c *InvoiceHistoryClient) Query() *InvoiceHistoryQuery
- func (c *InvoiceHistoryClient) QueryInvoice(ih *InvoiceHistory) *InvoiceQuery
- func (c *InvoiceHistoryClient) QueryNewStatus(ih *InvoiceHistory) *InvoiceStatusCodeQuery
- func (c *InvoiceHistoryClient) QueryOldStatus(ih *InvoiceHistory) *InvoiceStatusCodeQuery
- func (c *InvoiceHistoryClient) QueryPerson(ih *InvoiceHistory) *PersonQuery
- func (c *InvoiceHistoryClient) Update() *InvoiceHistoryUpdate
- func (c *InvoiceHistoryClient) UpdateOne(ih *InvoiceHistory) *InvoiceHistoryUpdateOne
- func (c *InvoiceHistoryClient) UpdateOneID(id uuid.UUID) *InvoiceHistoryUpdateOne
- func (c *InvoiceHistoryClient) Use(hooks ...Hook)
- type InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) Exec(ctx context.Context) error
- func (ihc *InvoiceHistoryCreate) ExecX(ctx context.Context)
- func (ihc *InvoiceHistoryCreate) Mutation() *InvoiceHistoryMutation
- func (ihc *InvoiceHistoryCreate) Save(ctx context.Context) (*InvoiceHistory, error)
- func (ihc *InvoiceHistoryCreate) SaveX(ctx context.Context) *InvoiceHistory
- func (ihc *InvoiceHistoryCreate) SetCreatedAt(t time.Time) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetDescription(s string) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetID(u uuid.UUID) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetInvoice(i *Invoice) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetInvoiceID(u uuid.UUID) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetNewStatus(i *InvoiceStatusCode) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetNewStatusCode(i int) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetNewStatusID(id int) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetNillableCreatedAt(t *time.Time) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetNillableDescription(s *string) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetNillableID(u *uuid.UUID) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetNillableNewStatusCode(i *int) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetNillableNewStatusID(id *int) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetNillableOldStatusCode(i *int) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetNillableOldStatusID(id *int) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetOldStatus(i *InvoiceStatusCode) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetOldStatusCode(i int) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetOldStatusID(id int) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetPerson(p *Person) *InvoiceHistoryCreate
- func (ihc *InvoiceHistoryCreate) SetPersonID(u uuid.UUID) *InvoiceHistoryCreate
- type InvoiceHistoryCreateBulk
- func (ihcb *InvoiceHistoryCreateBulk) Exec(ctx context.Context) error
- func (ihcb *InvoiceHistoryCreateBulk) ExecX(ctx context.Context)
- func (ihcb *InvoiceHistoryCreateBulk) Save(ctx context.Context) ([]*InvoiceHistory, error)
- func (ihcb *InvoiceHistoryCreateBulk) SaveX(ctx context.Context) []*InvoiceHistory
- type InvoiceHistoryDelete
- type InvoiceHistoryDeleteOne
- type InvoiceHistoryEdges
- type InvoiceHistoryGroupBy
- func (ihgb *InvoiceHistoryGroupBy) Aggregate(fns ...AggregateFunc) *InvoiceHistoryGroupBy
- func (s *InvoiceHistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *InvoiceHistoryGroupBy) BoolX(ctx context.Context) bool
- func (s *InvoiceHistoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *InvoiceHistoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *InvoiceHistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *InvoiceHistoryGroupBy) Float64X(ctx context.Context) float64
- func (s *InvoiceHistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *InvoiceHistoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *InvoiceHistoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *InvoiceHistoryGroupBy) IntX(ctx context.Context) int
- func (s *InvoiceHistoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *InvoiceHistoryGroupBy) IntsX(ctx context.Context) []int
- func (ihgb *InvoiceHistoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *InvoiceHistoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *InvoiceHistoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *InvoiceHistoryGroupBy) StringX(ctx context.Context) string
- func (s *InvoiceHistoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *InvoiceHistoryGroupBy) StringsX(ctx context.Context) []string
- type InvoiceHistoryMutation
- func (m *InvoiceHistoryMutation) AddField(name string, value ent.Value) error
- func (m *InvoiceHistoryMutation) AddedEdges() []string
- func (m *InvoiceHistoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *InvoiceHistoryMutation) AddedFields() []string
- func (m *InvoiceHistoryMutation) AddedIDs(name string) []ent.Value
- func (m *InvoiceHistoryMutation) ClearDescription()
- func (m *InvoiceHistoryMutation) ClearEdge(name string) error
- func (m *InvoiceHistoryMutation) ClearField(name string) error
- func (m *InvoiceHistoryMutation) ClearInvoice()
- func (m *InvoiceHistoryMutation) ClearNewStatus()
- func (m *InvoiceHistoryMutation) ClearNewStatusCode()
- func (m *InvoiceHistoryMutation) ClearOldStatus()
- func (m *InvoiceHistoryMutation) ClearOldStatusCode()
- func (m *InvoiceHistoryMutation) ClearPerson()
- func (m *InvoiceHistoryMutation) ClearedEdges() []string
- func (m *InvoiceHistoryMutation) ClearedFields() []string
- func (m InvoiceHistoryMutation) Client() *Client
- func (m *InvoiceHistoryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *InvoiceHistoryMutation) Description() (r string, exists bool)
- func (m *InvoiceHistoryMutation) DescriptionCleared() bool
- func (m *InvoiceHistoryMutation) EdgeCleared(name string) bool
- func (m *InvoiceHistoryMutation) Field(name string) (ent.Value, bool)
- func (m *InvoiceHistoryMutation) FieldCleared(name string) bool
- func (m *InvoiceHistoryMutation) Fields() []string
- func (m *InvoiceHistoryMutation) ID() (id uuid.UUID, exists bool)
- func (m *InvoiceHistoryMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *InvoiceHistoryMutation) InvoiceCleared() bool
- func (m *InvoiceHistoryMutation) InvoiceID() (r uuid.UUID, exists bool)
- func (m *InvoiceHistoryMutation) InvoiceIDs() (ids []uuid.UUID)
- func (m *InvoiceHistoryMutation) NewStatusCleared() bool
- func (m *InvoiceHistoryMutation) NewStatusCode() (r int, exists bool)
- func (m *InvoiceHistoryMutation) NewStatusCodeCleared() bool
- func (m *InvoiceHistoryMutation) NewStatusID() (id int, exists bool)
- func (m *InvoiceHistoryMutation) NewStatusIDs() (ids []int)
- func (m *InvoiceHistoryMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *InvoiceHistoryMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *InvoiceHistoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *InvoiceHistoryMutation) OldInvoiceID(ctx context.Context) (v uuid.UUID, err error)
- func (m *InvoiceHistoryMutation) OldNewStatusCode(ctx context.Context) (v *int, err error)
- func (m *InvoiceHistoryMutation) OldOldStatusCode(ctx context.Context) (v *int, err error)
- func (m *InvoiceHistoryMutation) OldPersonID(ctx context.Context) (v uuid.UUID, err error)
- func (m *InvoiceHistoryMutation) OldStatusCleared() bool
- func (m *InvoiceHistoryMutation) OldStatusCode() (r int, exists bool)
- func (m *InvoiceHistoryMutation) OldStatusCodeCleared() bool
- func (m *InvoiceHistoryMutation) OldStatusID() (id int, exists bool)
- func (m *InvoiceHistoryMutation) OldStatusIDs() (ids []int)
- func (m *InvoiceHistoryMutation) Op() Op
- func (m *InvoiceHistoryMutation) PersonCleared() bool
- func (m *InvoiceHistoryMutation) PersonID() (r uuid.UUID, exists bool)
- func (m *InvoiceHistoryMutation) PersonIDs() (ids []uuid.UUID)
- func (m *InvoiceHistoryMutation) RemovedEdges() []string
- func (m *InvoiceHistoryMutation) RemovedIDs(name string) []ent.Value
- func (m *InvoiceHistoryMutation) ResetCreatedAt()
- func (m *InvoiceHistoryMutation) ResetDescription()
- func (m *InvoiceHistoryMutation) ResetEdge(name string) error
- func (m *InvoiceHistoryMutation) ResetField(name string) error
- func (m *InvoiceHistoryMutation) ResetInvoice()
- func (m *InvoiceHistoryMutation) ResetInvoiceID()
- func (m *InvoiceHistoryMutation) ResetNewStatus()
- func (m *InvoiceHistoryMutation) ResetNewStatusCode()
- func (m *InvoiceHistoryMutation) ResetOldStatus()
- func (m *InvoiceHistoryMutation) ResetOldStatusCode()
- func (m *InvoiceHistoryMutation) ResetPerson()
- func (m *InvoiceHistoryMutation) ResetPersonID()
- func (m *InvoiceHistoryMutation) SetCreatedAt(t time.Time)
- func (m *InvoiceHistoryMutation) SetDescription(s string)
- func (m *InvoiceHistoryMutation) SetField(name string, value ent.Value) error
- func (m *InvoiceHistoryMutation) SetID(id uuid.UUID)
- func (m *InvoiceHistoryMutation) SetInvoiceID(u uuid.UUID)
- func (m *InvoiceHistoryMutation) SetNewStatusCode(i int)
- func (m *InvoiceHistoryMutation) SetNewStatusID(id int)
- func (m *InvoiceHistoryMutation) SetOldStatusCode(i int)
- func (m *InvoiceHistoryMutation) SetOldStatusID(id int)
- func (m *InvoiceHistoryMutation) SetOp(op Op)
- func (m *InvoiceHistoryMutation) SetPersonID(u uuid.UUID)
- func (m InvoiceHistoryMutation) Tx() (*Tx, error)
- func (m *InvoiceHistoryMutation) Type() string
- func (m *InvoiceHistoryMutation) Where(ps ...predicate.InvoiceHistory)
- func (m *InvoiceHistoryMutation) WhereP(ps ...func(*sql.Selector))
- type InvoiceHistoryQuery
- func (ihq *InvoiceHistoryQuery) Aggregate(fns ...AggregateFunc) *InvoiceHistorySelect
- func (ihq *InvoiceHistoryQuery) All(ctx context.Context) ([]*InvoiceHistory, error)
- func (ihq *InvoiceHistoryQuery) AllX(ctx context.Context) []*InvoiceHistory
- func (ihq *InvoiceHistoryQuery) Clone() *InvoiceHistoryQuery
- func (ihq *InvoiceHistoryQuery) Count(ctx context.Context) (int, error)
- func (ihq *InvoiceHistoryQuery) CountX(ctx context.Context) int
- func (ihq *InvoiceHistoryQuery) Exist(ctx context.Context) (bool, error)
- func (ihq *InvoiceHistoryQuery) ExistX(ctx context.Context) bool
- func (ihq *InvoiceHistoryQuery) First(ctx context.Context) (*InvoiceHistory, error)
- func (ihq *InvoiceHistoryQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (ihq *InvoiceHistoryQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (ihq *InvoiceHistoryQuery) FirstX(ctx context.Context) *InvoiceHistory
- func (ihq *InvoiceHistoryQuery) GroupBy(field string, fields ...string) *InvoiceHistoryGroupBy
- func (ihq *InvoiceHistoryQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (ihq *InvoiceHistoryQuery) IDsX(ctx context.Context) []uuid.UUID
- func (ihq *InvoiceHistoryQuery) Limit(limit int) *InvoiceHistoryQuery
- func (ihq *InvoiceHistoryQuery) Offset(offset int) *InvoiceHistoryQuery
- func (ihq *InvoiceHistoryQuery) Only(ctx context.Context) (*InvoiceHistory, error)
- func (ihq *InvoiceHistoryQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (ihq *InvoiceHistoryQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (ihq *InvoiceHistoryQuery) OnlyX(ctx context.Context) *InvoiceHistory
- func (ihq *InvoiceHistoryQuery) Order(o ...invoicehistory.OrderOption) *InvoiceHistoryQuery
- func (ihq *InvoiceHistoryQuery) QueryInvoice() *InvoiceQuery
- func (ihq *InvoiceHistoryQuery) QueryNewStatus() *InvoiceStatusCodeQuery
- func (ihq *InvoiceHistoryQuery) QueryOldStatus() *InvoiceStatusCodeQuery
- func (ihq *InvoiceHistoryQuery) QueryPerson() *PersonQuery
- func (ihq *InvoiceHistoryQuery) Select(fields ...string) *InvoiceHistorySelect
- func (ihq *InvoiceHistoryQuery) Unique(unique bool) *InvoiceHistoryQuery
- func (ihq *InvoiceHistoryQuery) Where(ps ...predicate.InvoiceHistory) *InvoiceHistoryQuery
- func (ihq *InvoiceHistoryQuery) WithInvoice(opts ...func(*InvoiceQuery)) *InvoiceHistoryQuery
- func (ihq *InvoiceHistoryQuery) WithNewStatus(opts ...func(*InvoiceStatusCodeQuery)) *InvoiceHistoryQuery
- func (ihq *InvoiceHistoryQuery) WithOldStatus(opts ...func(*InvoiceStatusCodeQuery)) *InvoiceHistoryQuery
- func (ihq *InvoiceHistoryQuery) WithPerson(opts ...func(*PersonQuery)) *InvoiceHistoryQuery
- type InvoiceHistorySelect
- func (ihs *InvoiceHistorySelect) Aggregate(fns ...AggregateFunc) *InvoiceHistorySelect
- func (s *InvoiceHistorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *InvoiceHistorySelect) BoolX(ctx context.Context) bool
- func (s *InvoiceHistorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *InvoiceHistorySelect) BoolsX(ctx context.Context) []bool
- func (s *InvoiceHistorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *InvoiceHistorySelect) Float64X(ctx context.Context) float64
- func (s *InvoiceHistorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *InvoiceHistorySelect) Float64sX(ctx context.Context) []float64
- func (s *InvoiceHistorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *InvoiceHistorySelect) IntX(ctx context.Context) int
- func (s *InvoiceHistorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *InvoiceHistorySelect) IntsX(ctx context.Context) []int
- func (ihs *InvoiceHistorySelect) Scan(ctx context.Context, v any) error
- func (s *InvoiceHistorySelect) ScanX(ctx context.Context, v any)
- func (s *InvoiceHistorySelect) String(ctx context.Context) (_ string, err error)
- func (s *InvoiceHistorySelect) StringX(ctx context.Context) string
- func (s *InvoiceHistorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *InvoiceHistorySelect) StringsX(ctx context.Context) []string
- type InvoiceHistoryUpdate
- func (ihu *InvoiceHistoryUpdate) Exec(ctx context.Context) error
- func (ihu *InvoiceHistoryUpdate) ExecX(ctx context.Context)
- func (ihu *InvoiceHistoryUpdate) Mutation() *InvoiceHistoryMutation
- func (ihu *InvoiceHistoryUpdate) Save(ctx context.Context) (int, error)
- func (ihu *InvoiceHistoryUpdate) SaveX(ctx context.Context) int
- func (ihu *InvoiceHistoryUpdate) Where(ps ...predicate.InvoiceHistory) *InvoiceHistoryUpdate
- type InvoiceHistoryUpdateOne
- func (ihuo *InvoiceHistoryUpdateOne) Exec(ctx context.Context) error
- func (ihuo *InvoiceHistoryUpdateOne) ExecX(ctx context.Context)
- func (ihuo *InvoiceHistoryUpdateOne) Mutation() *InvoiceHistoryMutation
- func (ihuo *InvoiceHistoryUpdateOne) Save(ctx context.Context) (*InvoiceHistory, error)
- func (ihuo *InvoiceHistoryUpdateOne) SaveX(ctx context.Context) *InvoiceHistory
- func (ihuo *InvoiceHistoryUpdateOne) Select(field string, fields ...string) *InvoiceHistoryUpdateOne
- func (ihuo *InvoiceHistoryUpdateOne) Where(ps ...predicate.InvoiceHistory) *InvoiceHistoryUpdateOne
- type InvoiceMutation
- func (m *InvoiceMutation) AddField(name string, value ent.Value) error
- func (m *InvoiceMutation) AddTotal(d decimal.Decimal)
- func (m *InvoiceMutation) AddedEdges() []string
- func (m *InvoiceMutation) AddedField(name string) (ent.Value, bool)
- func (m *InvoiceMutation) AddedFields() []string
- func (m *InvoiceMutation) AddedIDs(name string) []ent.Value
- func (m *InvoiceMutation) AddedTotal() (r decimal.Decimal, exists bool)
- func (m *InvoiceMutation) ClearEdge(name string) error
- func (m *InvoiceMutation) ClearField(name string) error
- func (m *InvoiceMutation) ClearInvoiceStatus()
- func (m *InvoiceMutation) ClearNote()
- func (m *InvoiceMutation) ClearOrder()
- func (m *InvoiceMutation) ClearedEdges() []string
- func (m *InvoiceMutation) ClearedFields() []string
- func (m InvoiceMutation) Client() *Client
- func (m *InvoiceMutation) CreatedAt() (r time.Time, exists bool)
- func (m *InvoiceMutation) EdgeCleared(name string) bool
- func (m *InvoiceMutation) Field(name string) (ent.Value, bool)
- func (m *InvoiceMutation) FieldCleared(name string) bool
- func (m *InvoiceMutation) Fields() []string
- func (m *InvoiceMutation) GetType() (r invoice.Type, exists bool)
- func (m *InvoiceMutation) ID() (id uuid.UUID, exists bool)
- func (m *InvoiceMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *InvoiceMutation) InvoiceStatusCleared() bool
- func (m *InvoiceMutation) InvoiceStatusID() (id int, exists bool)
- func (m *InvoiceMutation) InvoiceStatusIDs() (ids []int)
- func (m *InvoiceMutation) Note() (r string, exists bool)
- func (m *InvoiceMutation) NoteCleared() bool
- func (m *InvoiceMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *InvoiceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *InvoiceMutation) OldNote(ctx context.Context) (v *string, err error)
- func (m *InvoiceMutation) OldOrderID(ctx context.Context) (v uuid.UUID, err error)
- func (m *InvoiceMutation) OldPaymentMethod(ctx context.Context) (v *invoice.PaymentMethod, err error)
- func (m *InvoiceMutation) OldStatusCode(ctx context.Context) (v *int, err error)
- func (m *InvoiceMutation) OldTotal(ctx context.Context) (v *decimal.Decimal, err error)
- func (m *InvoiceMutation) OldType(ctx context.Context) (v *invoice.Type, err error)
- func (m *InvoiceMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *InvoiceMutation) Op() Op
- func (m *InvoiceMutation) OrderCleared() bool
- func (m *InvoiceMutation) OrderID() (r uuid.UUID, exists bool)
- func (m *InvoiceMutation) OrderIDs() (ids []uuid.UUID)
- func (m *InvoiceMutation) PaymentMethod() (r invoice.PaymentMethod, exists bool)
- func (m *InvoiceMutation) RemovedEdges() []string
- func (m *InvoiceMutation) RemovedIDs(name string) []ent.Value
- func (m *InvoiceMutation) ResetCreatedAt()
- func (m *InvoiceMutation) ResetEdge(name string) error
- func (m *InvoiceMutation) ResetField(name string) error
- func (m *InvoiceMutation) ResetInvoiceStatus()
- func (m *InvoiceMutation) ResetNote()
- func (m *InvoiceMutation) ResetOrder()
- func (m *InvoiceMutation) ResetOrderID()
- func (m *InvoiceMutation) ResetPaymentMethod()
- func (m *InvoiceMutation) ResetStatusCode()
- func (m *InvoiceMutation) ResetTotal()
- func (m *InvoiceMutation) ResetType()
- func (m *InvoiceMutation) ResetUpdatedAt()
- func (m *InvoiceMutation) SetCreatedAt(t time.Time)
- func (m *InvoiceMutation) SetField(name string, value ent.Value) error
- func (m *InvoiceMutation) SetID(id uuid.UUID)
- func (m *InvoiceMutation) SetInvoiceStatusID(id int)
- func (m *InvoiceMutation) SetNote(s string)
- func (m *InvoiceMutation) SetOp(op Op)
- func (m *InvoiceMutation) SetOrderID(u uuid.UUID)
- func (m *InvoiceMutation) SetPaymentMethod(im invoice.PaymentMethod)
- func (m *InvoiceMutation) SetStatusCode(i int)
- func (m *InvoiceMutation) SetTotal(d decimal.Decimal)
- func (m *InvoiceMutation) SetType(i invoice.Type)
- func (m *InvoiceMutation) SetUpdatedAt(t time.Time)
- func (m *InvoiceMutation) StatusCode() (r int, exists bool)
- func (m *InvoiceMutation) Total() (r decimal.Decimal, exists bool)
- func (m InvoiceMutation) Tx() (*Tx, error)
- func (m *InvoiceMutation) Type() string
- func (m *InvoiceMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *InvoiceMutation) Where(ps ...predicate.Invoice)
- func (m *InvoiceMutation) WhereP(ps ...func(*sql.Selector))
- type InvoiceQuery
- func (iq *InvoiceQuery) Aggregate(fns ...AggregateFunc) *InvoiceSelect
- func (iq *InvoiceQuery) All(ctx context.Context) ([]*Invoice, error)
- func (iq *InvoiceQuery) AllX(ctx context.Context) []*Invoice
- func (iq *InvoiceQuery) Clone() *InvoiceQuery
- func (iq *InvoiceQuery) Count(ctx context.Context) (int, error)
- func (iq *InvoiceQuery) CountX(ctx context.Context) int
- func (iq *InvoiceQuery) Exist(ctx context.Context) (bool, error)
- func (iq *InvoiceQuery) ExistX(ctx context.Context) bool
- func (iq *InvoiceQuery) First(ctx context.Context) (*Invoice, error)
- func (iq *InvoiceQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *InvoiceQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (iq *InvoiceQuery) FirstX(ctx context.Context) *Invoice
- func (iq *InvoiceQuery) GroupBy(field string, fields ...string) *InvoiceGroupBy
- func (iq *InvoiceQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (iq *InvoiceQuery) IDsX(ctx context.Context) []uuid.UUID
- func (iq *InvoiceQuery) Limit(limit int) *InvoiceQuery
- func (iq *InvoiceQuery) Offset(offset int) *InvoiceQuery
- func (iq *InvoiceQuery) Only(ctx context.Context) (*Invoice, error)
- func (iq *InvoiceQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (iq *InvoiceQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (iq *InvoiceQuery) OnlyX(ctx context.Context) *Invoice
- func (iq *InvoiceQuery) Order(o ...invoice.OrderOption) *InvoiceQuery
- func (iq *InvoiceQuery) QueryInvoiceStatus() *InvoiceStatusCodeQuery
- func (iq *InvoiceQuery) QueryOrder() *OrderQuery
- func (iq *InvoiceQuery) Select(fields ...string) *InvoiceSelect
- func (iq *InvoiceQuery) Unique(unique bool) *InvoiceQuery
- func (iq *InvoiceQuery) Where(ps ...predicate.Invoice) *InvoiceQuery
- func (iq *InvoiceQuery) WithInvoiceStatus(opts ...func(*InvoiceStatusCodeQuery)) *InvoiceQuery
- func (iq *InvoiceQuery) WithOrder(opts ...func(*OrderQuery)) *InvoiceQuery
- type InvoiceSelect
- func (is *InvoiceSelect) Aggregate(fns ...AggregateFunc) *InvoiceSelect
- func (s *InvoiceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *InvoiceSelect) BoolX(ctx context.Context) bool
- func (s *InvoiceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *InvoiceSelect) BoolsX(ctx context.Context) []bool
- func (s *InvoiceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *InvoiceSelect) Float64X(ctx context.Context) float64
- func (s *InvoiceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *InvoiceSelect) Float64sX(ctx context.Context) []float64
- func (s *InvoiceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *InvoiceSelect) IntX(ctx context.Context) int
- func (s *InvoiceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *InvoiceSelect) IntsX(ctx context.Context) []int
- func (is *InvoiceSelect) Scan(ctx context.Context, v any) error
- func (s *InvoiceSelect) ScanX(ctx context.Context, v any)
- func (s *InvoiceSelect) String(ctx context.Context) (_ string, err error)
- func (s *InvoiceSelect) StringX(ctx context.Context) string
- func (s *InvoiceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *InvoiceSelect) StringsX(ctx context.Context) []string
- type InvoiceStatusCode
- type InvoiceStatusCodeClient
- func (c *InvoiceStatusCodeClient) Create() *InvoiceStatusCodeCreate
- func (c *InvoiceStatusCodeClient) CreateBulk(builders ...*InvoiceStatusCodeCreate) *InvoiceStatusCodeCreateBulk
- func (c *InvoiceStatusCodeClient) Delete() *InvoiceStatusCodeDelete
- func (c *InvoiceStatusCodeClient) DeleteOne(isc *InvoiceStatusCode) *InvoiceStatusCodeDeleteOne
- func (c *InvoiceStatusCodeClient) DeleteOneID(id int) *InvoiceStatusCodeDeleteOne
- func (c *InvoiceStatusCodeClient) Get(ctx context.Context, id int) (*InvoiceStatusCode, error)
- func (c *InvoiceStatusCodeClient) GetX(ctx context.Context, id int) *InvoiceStatusCode
- func (c *InvoiceStatusCodeClient) Hooks() []Hook
- func (c *InvoiceStatusCodeClient) Intercept(interceptors ...Interceptor)
- func (c *InvoiceStatusCodeClient) Interceptors() []Interceptor
- func (c *InvoiceStatusCodeClient) MapCreateBulk(slice any, setFunc func(*InvoiceStatusCodeCreate, int)) *InvoiceStatusCodeCreateBulk
- func (c *InvoiceStatusCodeClient) Query() *InvoiceStatusCodeQuery
- func (c *InvoiceStatusCodeClient) Update() *InvoiceStatusCodeUpdate
- func (c *InvoiceStatusCodeClient) UpdateOne(isc *InvoiceStatusCode) *InvoiceStatusCodeUpdateOne
- func (c *InvoiceStatusCodeClient) UpdateOneID(id int) *InvoiceStatusCodeUpdateOne
- func (c *InvoiceStatusCodeClient) Use(hooks ...Hook)
- type InvoiceStatusCodeCreate
- func (iscc *InvoiceStatusCodeCreate) Exec(ctx context.Context) error
- func (iscc *InvoiceStatusCodeCreate) ExecX(ctx context.Context)
- func (iscc *InvoiceStatusCodeCreate) Mutation() *InvoiceStatusCodeMutation
- func (iscc *InvoiceStatusCodeCreate) Save(ctx context.Context) (*InvoiceStatusCode, error)
- func (iscc *InvoiceStatusCodeCreate) SaveX(ctx context.Context) *InvoiceStatusCode
- func (iscc *InvoiceStatusCodeCreate) SetCreatedAt(t time.Time) *InvoiceStatusCodeCreate
- func (iscc *InvoiceStatusCodeCreate) SetID(i int) *InvoiceStatusCodeCreate
- func (iscc *InvoiceStatusCodeCreate) SetInvoiceStatus(s string) *InvoiceStatusCodeCreate
- func (iscc *InvoiceStatusCodeCreate) SetNillableCreatedAt(t *time.Time) *InvoiceStatusCodeCreate
- func (iscc *InvoiceStatusCodeCreate) SetNillableUpdatedAt(t *time.Time) *InvoiceStatusCodeCreate
- func (iscc *InvoiceStatusCodeCreate) SetUpdatedAt(t time.Time) *InvoiceStatusCodeCreate
- type InvoiceStatusCodeCreateBulk
- func (isccb *InvoiceStatusCodeCreateBulk) Exec(ctx context.Context) error
- func (isccb *InvoiceStatusCodeCreateBulk) ExecX(ctx context.Context)
- func (isccb *InvoiceStatusCodeCreateBulk) Save(ctx context.Context) ([]*InvoiceStatusCode, error)
- func (isccb *InvoiceStatusCodeCreateBulk) SaveX(ctx context.Context) []*InvoiceStatusCode
- type InvoiceStatusCodeDelete
- type InvoiceStatusCodeDeleteOne
- type InvoiceStatusCodeGroupBy
- func (iscgb *InvoiceStatusCodeGroupBy) Aggregate(fns ...AggregateFunc) *InvoiceStatusCodeGroupBy
- func (s *InvoiceStatusCodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *InvoiceStatusCodeGroupBy) BoolX(ctx context.Context) bool
- func (s *InvoiceStatusCodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *InvoiceStatusCodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *InvoiceStatusCodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *InvoiceStatusCodeGroupBy) Float64X(ctx context.Context) float64
- func (s *InvoiceStatusCodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *InvoiceStatusCodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *InvoiceStatusCodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *InvoiceStatusCodeGroupBy) IntX(ctx context.Context) int
- func (s *InvoiceStatusCodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *InvoiceStatusCodeGroupBy) IntsX(ctx context.Context) []int
- func (iscgb *InvoiceStatusCodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *InvoiceStatusCodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *InvoiceStatusCodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *InvoiceStatusCodeGroupBy) StringX(ctx context.Context) string
- func (s *InvoiceStatusCodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *InvoiceStatusCodeGroupBy) StringsX(ctx context.Context) []string
- type InvoiceStatusCodeMutation
- func (m *InvoiceStatusCodeMutation) AddField(name string, value ent.Value) error
- func (m *InvoiceStatusCodeMutation) AddedEdges() []string
- func (m *InvoiceStatusCodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *InvoiceStatusCodeMutation) AddedFields() []string
- func (m *InvoiceStatusCodeMutation) AddedIDs(name string) []ent.Value
- func (m *InvoiceStatusCodeMutation) ClearEdge(name string) error
- func (m *InvoiceStatusCodeMutation) ClearField(name string) error
- func (m *InvoiceStatusCodeMutation) ClearedEdges() []string
- func (m *InvoiceStatusCodeMutation) ClearedFields() []string
- func (m InvoiceStatusCodeMutation) Client() *Client
- func (m *InvoiceStatusCodeMutation) CreatedAt() (r time.Time, exists bool)
- func (m *InvoiceStatusCodeMutation) EdgeCleared(name string) bool
- func (m *InvoiceStatusCodeMutation) Field(name string) (ent.Value, bool)
- func (m *InvoiceStatusCodeMutation) FieldCleared(name string) bool
- func (m *InvoiceStatusCodeMutation) Fields() []string
- func (m *InvoiceStatusCodeMutation) ID() (id int, exists bool)
- func (m *InvoiceStatusCodeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *InvoiceStatusCodeMutation) InvoiceStatus() (r string, exists bool)
- func (m *InvoiceStatusCodeMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *InvoiceStatusCodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *InvoiceStatusCodeMutation) OldInvoiceStatus(ctx context.Context) (v string, err error)
- func (m *InvoiceStatusCodeMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *InvoiceStatusCodeMutation) Op() Op
- func (m *InvoiceStatusCodeMutation) RemovedEdges() []string
- func (m *InvoiceStatusCodeMutation) RemovedIDs(name string) []ent.Value
- func (m *InvoiceStatusCodeMutation) ResetCreatedAt()
- func (m *InvoiceStatusCodeMutation) ResetEdge(name string) error
- func (m *InvoiceStatusCodeMutation) ResetField(name string) error
- func (m *InvoiceStatusCodeMutation) ResetInvoiceStatus()
- func (m *InvoiceStatusCodeMutation) ResetUpdatedAt()
- func (m *InvoiceStatusCodeMutation) SetCreatedAt(t time.Time)
- func (m *InvoiceStatusCodeMutation) SetField(name string, value ent.Value) error
- func (m *InvoiceStatusCodeMutation) SetID(id int)
- func (m *InvoiceStatusCodeMutation) SetInvoiceStatus(s string)
- func (m *InvoiceStatusCodeMutation) SetOp(op Op)
- func (m *InvoiceStatusCodeMutation) SetUpdatedAt(t time.Time)
- func (m InvoiceStatusCodeMutation) Tx() (*Tx, error)
- func (m *InvoiceStatusCodeMutation) Type() string
- func (m *InvoiceStatusCodeMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *InvoiceStatusCodeMutation) Where(ps ...predicate.InvoiceStatusCode)
- func (m *InvoiceStatusCodeMutation) WhereP(ps ...func(*sql.Selector))
- type InvoiceStatusCodeQuery
- func (iscq *InvoiceStatusCodeQuery) Aggregate(fns ...AggregateFunc) *InvoiceStatusCodeSelect
- func (iscq *InvoiceStatusCodeQuery) All(ctx context.Context) ([]*InvoiceStatusCode, error)
- func (iscq *InvoiceStatusCodeQuery) AllX(ctx context.Context) []*InvoiceStatusCode
- func (iscq *InvoiceStatusCodeQuery) Clone() *InvoiceStatusCodeQuery
- func (iscq *InvoiceStatusCodeQuery) Count(ctx context.Context) (int, error)
- func (iscq *InvoiceStatusCodeQuery) CountX(ctx context.Context) int
- func (iscq *InvoiceStatusCodeQuery) Exist(ctx context.Context) (bool, error)
- func (iscq *InvoiceStatusCodeQuery) ExistX(ctx context.Context) bool
- func (iscq *InvoiceStatusCodeQuery) First(ctx context.Context) (*InvoiceStatusCode, error)
- func (iscq *InvoiceStatusCodeQuery) FirstID(ctx context.Context) (id int, err error)
- func (iscq *InvoiceStatusCodeQuery) FirstIDX(ctx context.Context) int
- func (iscq *InvoiceStatusCodeQuery) FirstX(ctx context.Context) *InvoiceStatusCode
- func (iscq *InvoiceStatusCodeQuery) GroupBy(field string, fields ...string) *InvoiceStatusCodeGroupBy
- func (iscq *InvoiceStatusCodeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (iscq *InvoiceStatusCodeQuery) IDsX(ctx context.Context) []int
- func (iscq *InvoiceStatusCodeQuery) Limit(limit int) *InvoiceStatusCodeQuery
- func (iscq *InvoiceStatusCodeQuery) Offset(offset int) *InvoiceStatusCodeQuery
- func (iscq *InvoiceStatusCodeQuery) Only(ctx context.Context) (*InvoiceStatusCode, error)
- func (iscq *InvoiceStatusCodeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (iscq *InvoiceStatusCodeQuery) OnlyIDX(ctx context.Context) int
- func (iscq *InvoiceStatusCodeQuery) OnlyX(ctx context.Context) *InvoiceStatusCode
- func (iscq *InvoiceStatusCodeQuery) Order(o ...invoicestatuscode.OrderOption) *InvoiceStatusCodeQuery
- func (iscq *InvoiceStatusCodeQuery) Select(fields ...string) *InvoiceStatusCodeSelect
- func (iscq *InvoiceStatusCodeQuery) Unique(unique bool) *InvoiceStatusCodeQuery
- func (iscq *InvoiceStatusCodeQuery) Where(ps ...predicate.InvoiceStatusCode) *InvoiceStatusCodeQuery
- type InvoiceStatusCodeSelect
- func (iscs *InvoiceStatusCodeSelect) Aggregate(fns ...AggregateFunc) *InvoiceStatusCodeSelect
- func (s *InvoiceStatusCodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *InvoiceStatusCodeSelect) BoolX(ctx context.Context) bool
- func (s *InvoiceStatusCodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *InvoiceStatusCodeSelect) BoolsX(ctx context.Context) []bool
- func (s *InvoiceStatusCodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *InvoiceStatusCodeSelect) Float64X(ctx context.Context) float64
- func (s *InvoiceStatusCodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *InvoiceStatusCodeSelect) Float64sX(ctx context.Context) []float64
- func (s *InvoiceStatusCodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *InvoiceStatusCodeSelect) IntX(ctx context.Context) int
- func (s *InvoiceStatusCodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *InvoiceStatusCodeSelect) IntsX(ctx context.Context) []int
- func (iscs *InvoiceStatusCodeSelect) Scan(ctx context.Context, v any) error
- func (s *InvoiceStatusCodeSelect) ScanX(ctx context.Context, v any)
- func (s *InvoiceStatusCodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *InvoiceStatusCodeSelect) StringX(ctx context.Context) string
- func (s *InvoiceStatusCodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *InvoiceStatusCodeSelect) StringsX(ctx context.Context) []string
- type InvoiceStatusCodeUpdate
- func (iscu *InvoiceStatusCodeUpdate) Exec(ctx context.Context) error
- func (iscu *InvoiceStatusCodeUpdate) ExecX(ctx context.Context)
- func (iscu *InvoiceStatusCodeUpdate) Mutation() *InvoiceStatusCodeMutation
- func (iscu *InvoiceStatusCodeUpdate) Save(ctx context.Context) (int, error)
- func (iscu *InvoiceStatusCodeUpdate) SaveX(ctx context.Context) int
- func (iscu *InvoiceStatusCodeUpdate) SetInvoiceStatus(s string) *InvoiceStatusCodeUpdate
- func (iscu *InvoiceStatusCodeUpdate) SetNillableInvoiceStatus(s *string) *InvoiceStatusCodeUpdate
- func (iscu *InvoiceStatusCodeUpdate) SetUpdatedAt(t time.Time) *InvoiceStatusCodeUpdate
- func (iscu *InvoiceStatusCodeUpdate) Where(ps ...predicate.InvoiceStatusCode) *InvoiceStatusCodeUpdate
- type InvoiceStatusCodeUpdateOne
- func (iscuo *InvoiceStatusCodeUpdateOne) Exec(ctx context.Context) error
- func (iscuo *InvoiceStatusCodeUpdateOne) ExecX(ctx context.Context)
- func (iscuo *InvoiceStatusCodeUpdateOne) Mutation() *InvoiceStatusCodeMutation
- func (iscuo *InvoiceStatusCodeUpdateOne) Save(ctx context.Context) (*InvoiceStatusCode, error)
- func (iscuo *InvoiceStatusCodeUpdateOne) SaveX(ctx context.Context) *InvoiceStatusCode
- func (iscuo *InvoiceStatusCodeUpdateOne) Select(field string, fields ...string) *InvoiceStatusCodeUpdateOne
- func (iscuo *InvoiceStatusCodeUpdateOne) SetInvoiceStatus(s string) *InvoiceStatusCodeUpdateOne
- func (iscuo *InvoiceStatusCodeUpdateOne) SetNillableInvoiceStatus(s *string) *InvoiceStatusCodeUpdateOne
- func (iscuo *InvoiceStatusCodeUpdateOne) SetUpdatedAt(t time.Time) *InvoiceStatusCodeUpdateOne
- func (iscuo *InvoiceStatusCodeUpdateOne) Where(ps ...predicate.InvoiceStatusCode) *InvoiceStatusCodeUpdateOne
- type InvoiceStatusCodes
- type InvoiceUpdate
- func (iu *InvoiceUpdate) ClearInvoiceStatus() *InvoiceUpdate
- func (iu *InvoiceUpdate) ClearNote() *InvoiceUpdate
- func (iu *InvoiceUpdate) Exec(ctx context.Context) error
- func (iu *InvoiceUpdate) ExecX(ctx context.Context)
- func (iu *InvoiceUpdate) Mutation() *InvoiceMutation
- func (iu *InvoiceUpdate) Save(ctx context.Context) (int, error)
- func (iu *InvoiceUpdate) SaveX(ctx context.Context) int
- func (iu *InvoiceUpdate) SetInvoiceStatus(i *InvoiceStatusCode) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetInvoiceStatusID(id int) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableNote(s *string) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillablePaymentMethod(im *invoice.PaymentMethod) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNillableStatusCode(i *int) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetNote(s string) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetPaymentMethod(im invoice.PaymentMethod) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetStatusCode(i int) *InvoiceUpdate
- func (iu *InvoiceUpdate) SetUpdatedAt(t time.Time) *InvoiceUpdate
- func (iu *InvoiceUpdate) Where(ps ...predicate.Invoice) *InvoiceUpdate
- type InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearInvoiceStatus() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) ClearNote() *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) Exec(ctx context.Context) error
- func (iuo *InvoiceUpdateOne) ExecX(ctx context.Context)
- func (iuo *InvoiceUpdateOne) Mutation() *InvoiceMutation
- func (iuo *InvoiceUpdateOne) Save(ctx context.Context) (*Invoice, error)
- func (iuo *InvoiceUpdateOne) SaveX(ctx context.Context) *Invoice
- func (iuo *InvoiceUpdateOne) Select(field string, fields ...string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetInvoiceStatus(i *InvoiceStatusCode) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetInvoiceStatusID(id int) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableNote(s *string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillablePaymentMethod(im *invoice.PaymentMethod) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNillableStatusCode(i *int) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetNote(s string) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetPaymentMethod(im invoice.PaymentMethod) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetStatusCode(i int) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) SetUpdatedAt(t time.Time) *InvoiceUpdateOne
- func (iuo *InvoiceUpdateOne) Where(ps ...predicate.Invoice) *InvoiceUpdateOne
- type Invoices
- type Message
- type MessageClient
- func (c *MessageClient) Create() *MessageCreate
- func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
- func (c *MessageClient) Delete() *MessageDelete
- func (c *MessageClient) DeleteOne(m *Message) *MessageDeleteOne
- func (c *MessageClient) DeleteOneID(id uuid.UUID) *MessageDeleteOne
- func (c *MessageClient) Get(ctx context.Context, id uuid.UUID) (*Message, error)
- func (c *MessageClient) GetX(ctx context.Context, id uuid.UUID) *Message
- func (c *MessageClient) Hooks() []Hook
- func (c *MessageClient) Intercept(interceptors ...Interceptor)
- func (c *MessageClient) Interceptors() []Interceptor
- func (c *MessageClient) MapCreateBulk(slice any, setFunc func(*MessageCreate, int)) *MessageCreateBulk
- func (c *MessageClient) Query() *MessageQuery
- func (c *MessageClient) QueryConversation(m *Message) *ConversationQuery
- func (c *MessageClient) QuerySender(m *Message) *PersonQuery
- func (c *MessageClient) Update() *MessageUpdate
- func (c *MessageClient) UpdateOne(m *Message) *MessageUpdateOne
- func (c *MessageClient) UpdateOneID(id uuid.UUID) *MessageUpdateOne
- func (c *MessageClient) Use(hooks ...Hook)
- type MessageCreate
- func (mc *MessageCreate) Exec(ctx context.Context) error
- func (mc *MessageCreate) ExecX(ctx context.Context)
- func (mc *MessageCreate) Mutation() *MessageMutation
- func (mc *MessageCreate) Save(ctx context.Context) (*Message, error)
- func (mc *MessageCreate) SaveX(ctx context.Context) *Message
- func (mc *MessageCreate) SetContent(s string) *MessageCreate
- func (mc *MessageCreate) SetConversation(c *Conversation) *MessageCreate
- func (mc *MessageCreate) SetConversationID(u uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetCreatedAt(t time.Time) *MessageCreate
- func (mc *MessageCreate) SetID(u uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetIsRead(b bool) *MessageCreate
- func (mc *MessageCreate) SetNillableCreatedAt(t *time.Time) *MessageCreate
- func (mc *MessageCreate) SetNillableID(u *uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetNillableIsRead(b *bool) *MessageCreate
- func (mc *MessageCreate) SetNillableType(m *message.Type) *MessageCreate
- func (mc *MessageCreate) SetNillableUpdatedAt(t *time.Time) *MessageCreate
- func (mc *MessageCreate) SetSender(p *Person) *MessageCreate
- func (mc *MessageCreate) SetSenderID(u uuid.UUID) *MessageCreate
- func (mc *MessageCreate) SetType(m message.Type) *MessageCreate
- func (mc *MessageCreate) SetUpdatedAt(t time.Time) *MessageCreate
- type MessageCreateBulk
- type MessageDelete
- type MessageDeleteOne
- type MessageEdges
- type MessageGroupBy
- func (mgb *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
- func (s *MessageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageGroupBy) BoolX(ctx context.Context) bool
- func (s *MessageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MessageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageGroupBy) Float64X(ctx context.Context) float64
- func (s *MessageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MessageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MessageGroupBy) IntX(ctx context.Context) int
- func (s *MessageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MessageGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MessageGroupBy) Scan(ctx context.Context, v any) error
- func (s *MessageGroupBy) ScanX(ctx context.Context, v any)
- func (s *MessageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MessageGroupBy) StringX(ctx context.Context) string
- func (s *MessageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MessageGroupBy) StringsX(ctx context.Context) []string
- type MessageMutation
- func (m *MessageMutation) AddField(name string, value ent.Value) error
- func (m *MessageMutation) AddedEdges() []string
- func (m *MessageMutation) AddedField(name string) (ent.Value, bool)
- func (m *MessageMutation) AddedFields() []string
- func (m *MessageMutation) AddedIDs(name string) []ent.Value
- func (m *MessageMutation) ClearConversation()
- func (m *MessageMutation) ClearEdge(name string) error
- func (m *MessageMutation) ClearField(name string) error
- func (m *MessageMutation) ClearSender()
- func (m *MessageMutation) ClearedEdges() []string
- func (m *MessageMutation) ClearedFields() []string
- func (m MessageMutation) Client() *Client
- func (m *MessageMutation) Content() (r string, exists bool)
- func (m *MessageMutation) ConversationCleared() bool
- func (m *MessageMutation) ConversationID() (r uuid.UUID, exists bool)
- func (m *MessageMutation) ConversationIDs() (ids []uuid.UUID)
- func (m *MessageMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MessageMutation) EdgeCleared(name string) bool
- func (m *MessageMutation) Field(name string) (ent.Value, bool)
- func (m *MessageMutation) FieldCleared(name string) bool
- func (m *MessageMutation) Fields() []string
- func (m *MessageMutation) GetType() (r message.Type, exists bool)
- func (m *MessageMutation) ID() (id uuid.UUID, exists bool)
- func (m *MessageMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *MessageMutation) IsRead() (r bool, exists bool)
- func (m *MessageMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldConversationID(ctx context.Context) (v uuid.UUID, err error)
- func (m *MessageMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MessageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MessageMutation) OldIsRead(ctx context.Context) (v *bool, err error)
- func (m *MessageMutation) OldSenderID(ctx context.Context) (v uuid.UUID, err error)
- func (m *MessageMutation) OldType(ctx context.Context) (v *message.Type, err error)
- func (m *MessageMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MessageMutation) Op() Op
- func (m *MessageMutation) RemovedEdges() []string
- func (m *MessageMutation) RemovedIDs(name string) []ent.Value
- func (m *MessageMutation) ResetContent()
- func (m *MessageMutation) ResetConversation()
- func (m *MessageMutation) ResetConversationID()
- func (m *MessageMutation) ResetCreatedAt()
- func (m *MessageMutation) ResetEdge(name string) error
- func (m *MessageMutation) ResetField(name string) error
- func (m *MessageMutation) ResetIsRead()
- func (m *MessageMutation) ResetSender()
- func (m *MessageMutation) ResetSenderID()
- func (m *MessageMutation) ResetType()
- func (m *MessageMutation) ResetUpdatedAt()
- func (m *MessageMutation) SenderCleared() bool
- func (m *MessageMutation) SenderID() (r uuid.UUID, exists bool)
- func (m *MessageMutation) SenderIDs() (ids []uuid.UUID)
- func (m *MessageMutation) SetContent(s string)
- func (m *MessageMutation) SetConversationID(u uuid.UUID)
- func (m *MessageMutation) SetCreatedAt(t time.Time)
- func (m *MessageMutation) SetField(name string, value ent.Value) error
- func (m *MessageMutation) SetID(id uuid.UUID)
- func (m *MessageMutation) SetIsRead(b bool)
- func (m *MessageMutation) SetOp(op Op)
- func (m *MessageMutation) SetSenderID(u uuid.UUID)
- func (m *MessageMutation) SetType(value message.Type)
- func (m *MessageMutation) SetUpdatedAt(t time.Time)
- func (m MessageMutation) Tx() (*Tx, error)
- func (m *MessageMutation) Type() string
- func (m *MessageMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MessageMutation) Where(ps ...predicate.Message)
- func (m *MessageMutation) WhereP(ps ...func(*sql.Selector))
- type MessageQuery
- func (mq *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (mq *MessageQuery) All(ctx context.Context) ([]*Message, error)
- func (mq *MessageQuery) AllX(ctx context.Context) []*Message
- func (mq *MessageQuery) Clone() *MessageQuery
- func (mq *MessageQuery) Count(ctx context.Context) (int, error)
- func (mq *MessageQuery) CountX(ctx context.Context) int
- func (mq *MessageQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MessageQuery) ExistX(ctx context.Context) bool
- func (mq *MessageQuery) First(ctx context.Context) (*Message, error)
- func (mq *MessageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (mq *MessageQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (mq *MessageQuery) FirstX(ctx context.Context) *Message
- func (mq *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
- func (mq *MessageQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (mq *MessageQuery) IDsX(ctx context.Context) []uuid.UUID
- func (mq *MessageQuery) Limit(limit int) *MessageQuery
- func (mq *MessageQuery) Offset(offset int) *MessageQuery
- func (mq *MessageQuery) Only(ctx context.Context) (*Message, error)
- func (mq *MessageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (mq *MessageQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (mq *MessageQuery) OnlyX(ctx context.Context) *Message
- func (mq *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
- func (mq *MessageQuery) QueryConversation() *ConversationQuery
- func (mq *MessageQuery) QuerySender() *PersonQuery
- func (mq *MessageQuery) Select(fields ...string) *MessageSelect
- func (mq *MessageQuery) Unique(unique bool) *MessageQuery
- func (mq *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
- func (mq *MessageQuery) WithConversation(opts ...func(*ConversationQuery)) *MessageQuery
- func (mq *MessageQuery) WithSender(opts ...func(*PersonQuery)) *MessageQuery
- type MessageSelect
- func (ms *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (s *MessageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageSelect) BoolX(ctx context.Context) bool
- func (s *MessageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageSelect) BoolsX(ctx context.Context) []bool
- func (s *MessageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageSelect) Float64X(ctx context.Context) float64
- func (s *MessageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageSelect) Float64sX(ctx context.Context) []float64
- func (s *MessageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MessageSelect) IntX(ctx context.Context) int
- func (s *MessageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MessageSelect) IntsX(ctx context.Context) []int
- func (ms *MessageSelect) Scan(ctx context.Context, v any) error
- func (s *MessageSelect) ScanX(ctx context.Context, v any)
- func (s *MessageSelect) String(ctx context.Context) (_ string, err error)
- func (s *MessageSelect) StringX(ctx context.Context) string
- func (s *MessageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MessageSelect) StringsX(ctx context.Context) []string
- type MessageUpdate
- func (mu *MessageUpdate) Exec(ctx context.Context) error
- func (mu *MessageUpdate) ExecX(ctx context.Context)
- func (mu *MessageUpdate) Mutation() *MessageMutation
- func (mu *MessageUpdate) Save(ctx context.Context) (int, error)
- func (mu *MessageUpdate) SaveX(ctx context.Context) int
- func (mu *MessageUpdate) SetContent(s string) *MessageUpdate
- func (mu *MessageUpdate) SetIsRead(b bool) *MessageUpdate
- func (mu *MessageUpdate) SetNillableContent(s *string) *MessageUpdate
- func (mu *MessageUpdate) SetNillableIsRead(b *bool) *MessageUpdate
- func (mu *MessageUpdate) SetUpdatedAt(t time.Time) *MessageUpdate
- func (mu *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
- type MessageUpdateOne
- func (muo *MessageUpdateOne) Exec(ctx context.Context) error
- func (muo *MessageUpdateOne) ExecX(ctx context.Context)
- func (muo *MessageUpdateOne) Mutation() *MessageMutation
- func (muo *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
- func (muo *MessageUpdateOne) SaveX(ctx context.Context) *Message
- func (muo *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetContent(s string) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetIsRead(b bool) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetNillableContent(s *string) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetNillableIsRead(b *bool) *MessageUpdateOne
- func (muo *MessageUpdateOne) SetUpdatedAt(t time.Time) *MessageUpdateOne
- func (muo *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
- type Messages
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type Order
- func (o *Order) QueryCreator() *PersonQuery
- func (o *Order) QueryCustomer() *PersonQuery
- func (o *Order) QueryOrderAddress() *AddressQuery
- func (o *Order) QueryOrderStatus() *OrderStatusCodeQuery
- func (o *Order) QueryParentOrder() *OrderQuery
- func (o *Order) QueryStaff() *PersonQuery
- func (o *Order) String() string
- func (o *Order) Unwrap() *Order
- func (o *Order) Update() *OrderUpdateOne
- func (o *Order) Value(name string) (ent.Value, error)
- type OrderClient
- func (c *OrderClient) Create() *OrderCreate
- func (c *OrderClient) CreateBulk(builders ...*OrderCreate) *OrderCreateBulk
- func (c *OrderClient) Delete() *OrderDelete
- func (c *OrderClient) DeleteOne(o *Order) *OrderDeleteOne
- func (c *OrderClient) DeleteOneID(id uuid.UUID) *OrderDeleteOne
- func (c *OrderClient) Get(ctx context.Context, id uuid.UUID) (*Order, error)
- func (c *OrderClient) GetX(ctx context.Context, id uuid.UUID) *Order
- func (c *OrderClient) Hooks() []Hook
- func (c *OrderClient) Intercept(interceptors ...Interceptor)
- func (c *OrderClient) Interceptors() []Interceptor
- func (c *OrderClient) MapCreateBulk(slice any, setFunc func(*OrderCreate, int)) *OrderCreateBulk
- func (c *OrderClient) Query() *OrderQuery
- func (c *OrderClient) QueryCreator(o *Order) *PersonQuery
- func (c *OrderClient) QueryCustomer(o *Order) *PersonQuery
- func (c *OrderClient) QueryOrderAddress(o *Order) *AddressQuery
- func (c *OrderClient) QueryOrderStatus(o *Order) *OrderStatusCodeQuery
- func (c *OrderClient) QueryParentOrder(o *Order) *OrderQuery
- func (c *OrderClient) QueryStaff(o *Order) *PersonQuery
- func (c *OrderClient) Update() *OrderUpdate
- func (c *OrderClient) UpdateOne(o *Order) *OrderUpdateOne
- func (c *OrderClient) UpdateOneID(id uuid.UUID) *OrderUpdateOne
- func (c *OrderClient) Use(hooks ...Hook)
- type OrderCreate
- func (oc *OrderCreate) Exec(ctx context.Context) error
- func (oc *OrderCreate) ExecX(ctx context.Context)
- func (oc *OrderCreate) Mutation() *OrderMutation
- func (oc *OrderCreate) Save(ctx context.Context) (*Order, error)
- func (oc *OrderCreate) SaveX(ctx context.Context) *Order
- func (oc *OrderCreate) SetAddressID(u uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetCreatedAt(t time.Time) *OrderCreate
- func (oc *OrderCreate) SetCreatedBy(u uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetCreator(p *Person) *OrderCreate
- func (oc *OrderCreate) SetCreatorID(id uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetCustomer(p *Person) *OrderCreate
- func (oc *OrderCreate) SetCustomerID(u uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetID(u uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetInternalNote(s string) *OrderCreate
- func (oc *OrderCreate) SetIsInternal(b bool) *OrderCreate
- func (oc *OrderCreate) SetNillableCreatedAt(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetNillableID(u *uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetNillableInternalNote(s *string) *OrderCreate
- func (oc *OrderCreate) SetNillableIsInternal(b *bool) *OrderCreate
- func (oc *OrderCreate) SetNillableNote(s *string) *OrderCreate
- func (oc *OrderCreate) SetNillableParentOrderID(u *uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetNillablePriority(i *int) *OrderCreate
- func (oc *OrderCreate) SetNillableStaffID(u *uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetNillableStatusCode(i *int) *OrderCreate
- func (oc *OrderCreate) SetNillableType(o *order.Type) *OrderCreate
- func (oc *OrderCreate) SetNillableUpdatedAt(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetNote(s string) *OrderCreate
- func (oc *OrderCreate) SetOrderAddress(a *Address) *OrderCreate
- func (oc *OrderCreate) SetOrderAddressID(id uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetOrderStatus(o *OrderStatusCode) *OrderCreate
- func (oc *OrderCreate) SetOrderStatusID(id int) *OrderCreate
- func (oc *OrderCreate) SetParentOrder(o *Order) *OrderCreate
- func (oc *OrderCreate) SetParentOrderID(u uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetPriority(i int) *OrderCreate
- func (oc *OrderCreate) SetStaff(p *Person) *OrderCreate
- func (oc *OrderCreate) SetStaffID(u uuid.UUID) *OrderCreate
- func (oc *OrderCreate) SetStatusCode(i int) *OrderCreate
- func (oc *OrderCreate) SetType(o order.Type) *OrderCreate
- func (oc *OrderCreate) SetUpdatedAt(t time.Time) *OrderCreate
- type OrderCreateBulk
- type OrderDelete
- type OrderDeleteOne
- type OrderEdges
- func (e OrderEdges) CreatorOrErr() (*Person, error)
- func (e OrderEdges) CustomerOrErr() (*Person, error)
- func (e OrderEdges) OrderAddressOrErr() (*Address, error)
- func (e OrderEdges) OrderStatusOrErr() (*OrderStatusCode, error)
- func (e OrderEdges) ParentOrderOrErr() (*Order, error)
- func (e OrderEdges) StaffOrErr() (*Person, error)
- type OrderFunc
- type OrderGroupBy
- func (ogb *OrderGroupBy) Aggregate(fns ...AggregateFunc) *OrderGroupBy
- func (s *OrderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderGroupBy) BoolX(ctx context.Context) bool
- func (s *OrderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OrderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderGroupBy) Float64X(ctx context.Context) float64
- func (s *OrderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OrderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OrderGroupBy) IntX(ctx context.Context) int
- func (s *OrderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OrderGroupBy) IntsX(ctx context.Context) []int
- func (ogb *OrderGroupBy) Scan(ctx context.Context, v any) error
- func (s *OrderGroupBy) ScanX(ctx context.Context, v any)
- func (s *OrderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OrderGroupBy) StringX(ctx context.Context) string
- func (s *OrderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OrderGroupBy) StringsX(ctx context.Context) []string
- type OrderHistories
- type OrderHistory
- func (oh *OrderHistory) QueryNewStatus() *OrderStatusCodeQuery
- func (oh *OrderHistory) QueryOldStatus() *OrderStatusCodeQuery
- func (oh *OrderHistory) QueryOrder() *OrderQuery
- func (oh *OrderHistory) QueryPerson() *PersonQuery
- func (oh *OrderHistory) String() string
- func (oh *OrderHistory) Unwrap() *OrderHistory
- func (oh *OrderHistory) Update() *OrderHistoryUpdateOne
- func (oh *OrderHistory) Value(name string) (ent.Value, error)
- type OrderHistoryClient
- func (c *OrderHistoryClient) Create() *OrderHistoryCreate
- func (c *OrderHistoryClient) CreateBulk(builders ...*OrderHistoryCreate) *OrderHistoryCreateBulk
- func (c *OrderHistoryClient) Delete() *OrderHistoryDelete
- func (c *OrderHistoryClient) DeleteOne(oh *OrderHistory) *OrderHistoryDeleteOne
- func (c *OrderHistoryClient) DeleteOneID(id uuid.UUID) *OrderHistoryDeleteOne
- func (c *OrderHistoryClient) Get(ctx context.Context, id uuid.UUID) (*OrderHistory, error)
- func (c *OrderHistoryClient) GetX(ctx context.Context, id uuid.UUID) *OrderHistory
- func (c *OrderHistoryClient) Hooks() []Hook
- func (c *OrderHistoryClient) Intercept(interceptors ...Interceptor)
- func (c *OrderHistoryClient) Interceptors() []Interceptor
- func (c *OrderHistoryClient) MapCreateBulk(slice any, setFunc func(*OrderHistoryCreate, int)) *OrderHistoryCreateBulk
- func (c *OrderHistoryClient) Query() *OrderHistoryQuery
- func (c *OrderHistoryClient) QueryNewStatus(oh *OrderHistory) *OrderStatusCodeQuery
- func (c *OrderHistoryClient) QueryOldStatus(oh *OrderHistory) *OrderStatusCodeQuery
- func (c *OrderHistoryClient) QueryOrder(oh *OrderHistory) *OrderQuery
- func (c *OrderHistoryClient) QueryPerson(oh *OrderHistory) *PersonQuery
- func (c *OrderHistoryClient) Update() *OrderHistoryUpdate
- func (c *OrderHistoryClient) UpdateOne(oh *OrderHistory) *OrderHistoryUpdateOne
- func (c *OrderHistoryClient) UpdateOneID(id uuid.UUID) *OrderHistoryUpdateOne
- func (c *OrderHistoryClient) Use(hooks ...Hook)
- type OrderHistoryCreate
- func (ohc *OrderHistoryCreate) Exec(ctx context.Context) error
- func (ohc *OrderHistoryCreate) ExecX(ctx context.Context)
- func (ohc *OrderHistoryCreate) Mutation() *OrderHistoryMutation
- func (ohc *OrderHistoryCreate) Save(ctx context.Context) (*OrderHistory, error)
- func (ohc *OrderHistoryCreate) SaveX(ctx context.Context) *OrderHistory
- func (ohc *OrderHistoryCreate) SetCreatedAt(t time.Time) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetDescription(s string) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetID(u uuid.UUID) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetNewStatus(o *OrderStatusCode) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetNewStatusCode(i int) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetNewStatusID(id int) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetNillableCreatedAt(t *time.Time) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetNillableDescription(s *string) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetNillableID(u *uuid.UUID) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetNillableNewStatusCode(i *int) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetNillableNewStatusID(id *int) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetNillableOldStatusCode(i *int) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetNillableOldStatusID(id *int) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetOldStatus(o *OrderStatusCode) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetOldStatusCode(i int) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetOldStatusID(id int) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetOrder(o *Order) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetOrderID(u uuid.UUID) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetPerson(p *Person) *OrderHistoryCreate
- func (ohc *OrderHistoryCreate) SetPersonID(u uuid.UUID) *OrderHistoryCreate
- type OrderHistoryCreateBulk
- type OrderHistoryDelete
- type OrderHistoryDeleteOne
- type OrderHistoryEdges
- type OrderHistoryGroupBy
- func (ohgb *OrderHistoryGroupBy) Aggregate(fns ...AggregateFunc) *OrderHistoryGroupBy
- func (s *OrderHistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderHistoryGroupBy) BoolX(ctx context.Context) bool
- func (s *OrderHistoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderHistoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OrderHistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderHistoryGroupBy) Float64X(ctx context.Context) float64
- func (s *OrderHistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderHistoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OrderHistoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OrderHistoryGroupBy) IntX(ctx context.Context) int
- func (s *OrderHistoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OrderHistoryGroupBy) IntsX(ctx context.Context) []int
- func (ohgb *OrderHistoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *OrderHistoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *OrderHistoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OrderHistoryGroupBy) StringX(ctx context.Context) string
- func (s *OrderHistoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OrderHistoryGroupBy) StringsX(ctx context.Context) []string
- type OrderHistoryMutation
- func (m *OrderHistoryMutation) AddField(name string, value ent.Value) error
- func (m *OrderHistoryMutation) AddedEdges() []string
- func (m *OrderHistoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrderHistoryMutation) AddedFields() []string
- func (m *OrderHistoryMutation) AddedIDs(name string) []ent.Value
- func (m *OrderHistoryMutation) ClearDescription()
- func (m *OrderHistoryMutation) ClearEdge(name string) error
- func (m *OrderHistoryMutation) ClearField(name string) error
- func (m *OrderHistoryMutation) ClearNewStatus()
- func (m *OrderHistoryMutation) ClearNewStatusCode()
- func (m *OrderHistoryMutation) ClearOldStatus()
- func (m *OrderHistoryMutation) ClearOldStatusCode()
- func (m *OrderHistoryMutation) ClearOrder()
- func (m *OrderHistoryMutation) ClearPerson()
- func (m *OrderHistoryMutation) ClearedEdges() []string
- func (m *OrderHistoryMutation) ClearedFields() []string
- func (m OrderHistoryMutation) Client() *Client
- func (m *OrderHistoryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OrderHistoryMutation) Description() (r string, exists bool)
- func (m *OrderHistoryMutation) DescriptionCleared() bool
- func (m *OrderHistoryMutation) EdgeCleared(name string) bool
- func (m *OrderHistoryMutation) Field(name string) (ent.Value, bool)
- func (m *OrderHistoryMutation) FieldCleared(name string) bool
- func (m *OrderHistoryMutation) Fields() []string
- func (m *OrderHistoryMutation) ID() (id uuid.UUID, exists bool)
- func (m *OrderHistoryMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *OrderHistoryMutation) NewStatusCleared() bool
- func (m *OrderHistoryMutation) NewStatusCode() (r int, exists bool)
- func (m *OrderHistoryMutation) NewStatusCodeCleared() bool
- func (m *OrderHistoryMutation) NewStatusID() (id int, exists bool)
- func (m *OrderHistoryMutation) NewStatusIDs() (ids []int)
- func (m *OrderHistoryMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *OrderHistoryMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *OrderHistoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderHistoryMutation) OldNewStatusCode(ctx context.Context) (v *int, err error)
- func (m *OrderHistoryMutation) OldOldStatusCode(ctx context.Context) (v *int, err error)
- func (m *OrderHistoryMutation) OldOrderID(ctx context.Context) (v uuid.UUID, err error)
- func (m *OrderHistoryMutation) OldPersonID(ctx context.Context) (v uuid.UUID, err error)
- func (m *OrderHistoryMutation) OldStatusCleared() bool
- func (m *OrderHistoryMutation) OldStatusCode() (r int, exists bool)
- func (m *OrderHistoryMutation) OldStatusCodeCleared() bool
- func (m *OrderHistoryMutation) OldStatusID() (id int, exists bool)
- func (m *OrderHistoryMutation) OldStatusIDs() (ids []int)
- func (m *OrderHistoryMutation) Op() Op
- func (m *OrderHistoryMutation) OrderCleared() bool
- func (m *OrderHistoryMutation) OrderID() (r uuid.UUID, exists bool)
- func (m *OrderHistoryMutation) OrderIDs() (ids []uuid.UUID)
- func (m *OrderHistoryMutation) PersonCleared() bool
- func (m *OrderHistoryMutation) PersonID() (r uuid.UUID, exists bool)
- func (m *OrderHistoryMutation) PersonIDs() (ids []uuid.UUID)
- func (m *OrderHistoryMutation) RemovedEdges() []string
- func (m *OrderHistoryMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderHistoryMutation) ResetCreatedAt()
- func (m *OrderHistoryMutation) ResetDescription()
- func (m *OrderHistoryMutation) ResetEdge(name string) error
- func (m *OrderHistoryMutation) ResetField(name string) error
- func (m *OrderHistoryMutation) ResetNewStatus()
- func (m *OrderHistoryMutation) ResetNewStatusCode()
- func (m *OrderHistoryMutation) ResetOldStatus()
- func (m *OrderHistoryMutation) ResetOldStatusCode()
- func (m *OrderHistoryMutation) ResetOrder()
- func (m *OrderHistoryMutation) ResetOrderID()
- func (m *OrderHistoryMutation) ResetPerson()
- func (m *OrderHistoryMutation) ResetPersonID()
- func (m *OrderHistoryMutation) SetCreatedAt(t time.Time)
- func (m *OrderHistoryMutation) SetDescription(s string)
- func (m *OrderHistoryMutation) SetField(name string, value ent.Value) error
- func (m *OrderHistoryMutation) SetID(id uuid.UUID)
- func (m *OrderHistoryMutation) SetNewStatusCode(i int)
- func (m *OrderHistoryMutation) SetNewStatusID(id int)
- func (m *OrderHistoryMutation) SetOldStatusCode(i int)
- func (m *OrderHistoryMutation) SetOldStatusID(id int)
- func (m *OrderHistoryMutation) SetOp(op Op)
- func (m *OrderHistoryMutation) SetOrderID(u uuid.UUID)
- func (m *OrderHistoryMutation) SetPersonID(u uuid.UUID)
- func (m OrderHistoryMutation) Tx() (*Tx, error)
- func (m *OrderHistoryMutation) Type() string
- func (m *OrderHistoryMutation) Where(ps ...predicate.OrderHistory)
- func (m *OrderHistoryMutation) WhereP(ps ...func(*sql.Selector))
- type OrderHistoryQuery
- func (ohq *OrderHistoryQuery) Aggregate(fns ...AggregateFunc) *OrderHistorySelect
- func (ohq *OrderHistoryQuery) All(ctx context.Context) ([]*OrderHistory, error)
- func (ohq *OrderHistoryQuery) AllX(ctx context.Context) []*OrderHistory
- func (ohq *OrderHistoryQuery) Clone() *OrderHistoryQuery
- func (ohq *OrderHistoryQuery) Count(ctx context.Context) (int, error)
- func (ohq *OrderHistoryQuery) CountX(ctx context.Context) int
- func (ohq *OrderHistoryQuery) Exist(ctx context.Context) (bool, error)
- func (ohq *OrderHistoryQuery) ExistX(ctx context.Context) bool
- func (ohq *OrderHistoryQuery) First(ctx context.Context) (*OrderHistory, error)
- func (ohq *OrderHistoryQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (ohq *OrderHistoryQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (ohq *OrderHistoryQuery) FirstX(ctx context.Context) *OrderHistory
- func (ohq *OrderHistoryQuery) GroupBy(field string, fields ...string) *OrderHistoryGroupBy
- func (ohq *OrderHistoryQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (ohq *OrderHistoryQuery) IDsX(ctx context.Context) []uuid.UUID
- func (ohq *OrderHistoryQuery) Limit(limit int) *OrderHistoryQuery
- func (ohq *OrderHistoryQuery) Offset(offset int) *OrderHistoryQuery
- func (ohq *OrderHistoryQuery) Only(ctx context.Context) (*OrderHistory, error)
- func (ohq *OrderHistoryQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (ohq *OrderHistoryQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (ohq *OrderHistoryQuery) OnlyX(ctx context.Context) *OrderHistory
- func (ohq *OrderHistoryQuery) Order(o ...orderhistory.OrderOption) *OrderHistoryQuery
- func (ohq *OrderHistoryQuery) QueryNewStatus() *OrderStatusCodeQuery
- func (ohq *OrderHistoryQuery) QueryOldStatus() *OrderStatusCodeQuery
- func (ohq *OrderHistoryQuery) QueryOrder() *OrderQuery
- func (ohq *OrderHistoryQuery) QueryPerson() *PersonQuery
- func (ohq *OrderHistoryQuery) Select(fields ...string) *OrderHistorySelect
- func (ohq *OrderHistoryQuery) Unique(unique bool) *OrderHistoryQuery
- func (ohq *OrderHistoryQuery) Where(ps ...predicate.OrderHistory) *OrderHistoryQuery
- func (ohq *OrderHistoryQuery) WithNewStatus(opts ...func(*OrderStatusCodeQuery)) *OrderHistoryQuery
- func (ohq *OrderHistoryQuery) WithOldStatus(opts ...func(*OrderStatusCodeQuery)) *OrderHistoryQuery
- func (ohq *OrderHistoryQuery) WithOrder(opts ...func(*OrderQuery)) *OrderHistoryQuery
- func (ohq *OrderHistoryQuery) WithPerson(opts ...func(*PersonQuery)) *OrderHistoryQuery
- type OrderHistorySelect
- func (ohs *OrderHistorySelect) Aggregate(fns ...AggregateFunc) *OrderHistorySelect
- func (s *OrderHistorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderHistorySelect) BoolX(ctx context.Context) bool
- func (s *OrderHistorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderHistorySelect) BoolsX(ctx context.Context) []bool
- func (s *OrderHistorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderHistorySelect) Float64X(ctx context.Context) float64
- func (s *OrderHistorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderHistorySelect) Float64sX(ctx context.Context) []float64
- func (s *OrderHistorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *OrderHistorySelect) IntX(ctx context.Context) int
- func (s *OrderHistorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *OrderHistorySelect) IntsX(ctx context.Context) []int
- func (ohs *OrderHistorySelect) Scan(ctx context.Context, v any) error
- func (s *OrderHistorySelect) ScanX(ctx context.Context, v any)
- func (s *OrderHistorySelect) String(ctx context.Context) (_ string, err error)
- func (s *OrderHistorySelect) StringX(ctx context.Context) string
- func (s *OrderHistorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *OrderHistorySelect) StringsX(ctx context.Context) []string
- type OrderHistoryUpdate
- func (ohu *OrderHistoryUpdate) Exec(ctx context.Context) error
- func (ohu *OrderHistoryUpdate) ExecX(ctx context.Context)
- func (ohu *OrderHistoryUpdate) Mutation() *OrderHistoryMutation
- func (ohu *OrderHistoryUpdate) Save(ctx context.Context) (int, error)
- func (ohu *OrderHistoryUpdate) SaveX(ctx context.Context) int
- func (ohu *OrderHistoryUpdate) Where(ps ...predicate.OrderHistory) *OrderHistoryUpdate
- type OrderHistoryUpdateOne
- func (ohuo *OrderHistoryUpdateOne) Exec(ctx context.Context) error
- func (ohuo *OrderHistoryUpdateOne) ExecX(ctx context.Context)
- func (ohuo *OrderHistoryUpdateOne) Mutation() *OrderHistoryMutation
- func (ohuo *OrderHistoryUpdateOne) Save(ctx context.Context) (*OrderHistory, error)
- func (ohuo *OrderHistoryUpdateOne) SaveX(ctx context.Context) *OrderHistory
- func (ohuo *OrderHistoryUpdateOne) Select(field string, fields ...string) *OrderHistoryUpdateOne
- func (ohuo *OrderHistoryUpdateOne) Where(ps ...predicate.OrderHistory) *OrderHistoryUpdateOne
- type OrderItem
- func (oi *OrderItem) QueryDestinationWorkUnit() *WorkUnitInfoQuery
- func (oi *OrderItem) QueryOrder() *OrderQuery
- func (oi *OrderItem) QueryProduct() *ProductInfoQuery
- func (oi *OrderItem) QueryProductColor() *ProductColorQuery
- func (oi *OrderItem) QuerySourceWorkUnit() *WorkUnitInfoQuery
- func (oi *OrderItem) String() string
- func (oi *OrderItem) Unwrap() *OrderItem
- func (oi *OrderItem) Update() *OrderItemUpdateOne
- func (oi *OrderItem) Value(name string) (ent.Value, error)
- type OrderItemClient
- func (c *OrderItemClient) Create() *OrderItemCreate
- func (c *OrderItemClient) CreateBulk(builders ...*OrderItemCreate) *OrderItemCreateBulk
- func (c *OrderItemClient) Delete() *OrderItemDelete
- func (c *OrderItemClient) DeleteOne(oi *OrderItem) *OrderItemDeleteOne
- func (c *OrderItemClient) DeleteOneID(id uuid.UUID) *OrderItemDeleteOne
- func (c *OrderItemClient) Get(ctx context.Context, id uuid.UUID) (*OrderItem, error)
- func (c *OrderItemClient) GetX(ctx context.Context, id uuid.UUID) *OrderItem
- func (c *OrderItemClient) Hooks() []Hook
- func (c *OrderItemClient) Intercept(interceptors ...Interceptor)
- func (c *OrderItemClient) Interceptors() []Interceptor
- func (c *OrderItemClient) MapCreateBulk(slice any, setFunc func(*OrderItemCreate, int)) *OrderItemCreateBulk
- func (c *OrderItemClient) Query() *OrderItemQuery
- func (c *OrderItemClient) QueryDestinationWorkUnit(oi *OrderItem) *WorkUnitInfoQuery
- func (c *OrderItemClient) QueryOrder(oi *OrderItem) *OrderQuery
- func (c *OrderItemClient) QueryProduct(oi *OrderItem) *ProductInfoQuery
- func (c *OrderItemClient) QueryProductColor(oi *OrderItem) *ProductColorQuery
- func (c *OrderItemClient) QuerySourceWorkUnit(oi *OrderItem) *WorkUnitInfoQuery
- func (c *OrderItemClient) Update() *OrderItemUpdate
- func (c *OrderItemClient) UpdateOne(oi *OrderItem) *OrderItemUpdateOne
- func (c *OrderItemClient) UpdateOneID(id uuid.UUID) *OrderItemUpdateOne
- func (c *OrderItemClient) Use(hooks ...Hook)
- type OrderItemCreate
- func (oic *OrderItemCreate) Exec(ctx context.Context) error
- func (oic *OrderItemCreate) ExecX(ctx context.Context)
- func (oic *OrderItemCreate) Mutation() *OrderItemMutation
- func (oic *OrderItemCreate) Save(ctx context.Context) (*OrderItem, error)
- func (oic *OrderItemCreate) SaveX(ctx context.Context) *OrderItem
- func (oic *OrderItemCreate) SetCreatedAt(t time.Time) *OrderItemCreate
- func (oic *OrderItemCreate) SetDestinationWorkUnit(w *WorkUnitInfo) *OrderItemCreate
- func (oic *OrderItemCreate) SetDestinationWorkUnitID(id uuid.UUID) *OrderItemCreate
- func (oic *OrderItemCreate) SetDstUnitID(u uuid.UUID) *OrderItemCreate
- func (oic *OrderItemCreate) SetID(u uuid.UUID) *OrderItemCreate
- func (oic *OrderItemCreate) SetNillableCreatedAt(t *time.Time) *OrderItemCreate
- func (oic *OrderItemCreate) SetNillableDestinationWorkUnitID(id *uuid.UUID) *OrderItemCreate
- func (oic *OrderItemCreate) SetNillableDstUnitID(u *uuid.UUID) *OrderItemCreate
- func (oic *OrderItemCreate) SetNillableID(u *uuid.UUID) *OrderItemCreate
- func (oic *OrderItemCreate) SetNillableSourceWorkUnitID(id *uuid.UUID) *OrderItemCreate
- func (oic *OrderItemCreate) SetNillableSrcUnitID(u *uuid.UUID) *OrderItemCreate
- func (oic *OrderItemCreate) SetNillableStatus(o *orderitem.Status) *OrderItemCreate
- func (oic *OrderItemCreate) SetNillableUpdatedAt(t *time.Time) *OrderItemCreate
- func (oic *OrderItemCreate) SetOrder(o *Order) *OrderItemCreate
- func (oic *OrderItemCreate) SetOrderID(u uuid.UUID) *OrderItemCreate
- func (oic *OrderItemCreate) SetPricePerUnit(d decimal.Decimal) *OrderItemCreate
- func (oic *OrderItemCreate) SetProduct(p *ProductInfo) *OrderItemCreate
- func (oic *OrderItemCreate) SetProductColor(p *ProductColor) *OrderItemCreate
- func (oic *OrderItemCreate) SetProductColorID(s string) *OrderItemCreate
- func (oic *OrderItemCreate) SetProductID(s string) *OrderItemCreate
- func (oic *OrderItemCreate) SetQty(d decimal.Decimal) *OrderItemCreate
- func (oic *OrderItemCreate) SetSourceWorkUnit(w *WorkUnitInfo) *OrderItemCreate
- func (oic *OrderItemCreate) SetSourceWorkUnitID(id uuid.UUID) *OrderItemCreate
- func (oic *OrderItemCreate) SetSrcUnitID(u uuid.UUID) *OrderItemCreate
- func (oic *OrderItemCreate) SetStatus(o orderitem.Status) *OrderItemCreate
- func (oic *OrderItemCreate) SetUpdatedAt(t time.Time) *OrderItemCreate
- type OrderItemCreateBulk
- type OrderItemDelete
- type OrderItemDeleteOne
- type OrderItemEdges
- func (e OrderItemEdges) DestinationWorkUnitOrErr() (*WorkUnitInfo, error)
- func (e OrderItemEdges) OrderOrErr() (*Order, error)
- func (e OrderItemEdges) ProductColorOrErr() (*ProductColor, error)
- func (e OrderItemEdges) ProductOrErr() (*ProductInfo, error)
- func (e OrderItemEdges) SourceWorkUnitOrErr() (*WorkUnitInfo, error)
- type OrderItemGroupBy
- func (oigb *OrderItemGroupBy) Aggregate(fns ...AggregateFunc) *OrderItemGroupBy
- func (s *OrderItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderItemGroupBy) BoolX(ctx context.Context) bool
- func (s *OrderItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderItemGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OrderItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderItemGroupBy) Float64X(ctx context.Context) float64
- func (s *OrderItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderItemGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OrderItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OrderItemGroupBy) IntX(ctx context.Context) int
- func (s *OrderItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OrderItemGroupBy) IntsX(ctx context.Context) []int
- func (oigb *OrderItemGroupBy) Scan(ctx context.Context, v any) error
- func (s *OrderItemGroupBy) ScanX(ctx context.Context, v any)
- func (s *OrderItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OrderItemGroupBy) StringX(ctx context.Context) string
- func (s *OrderItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OrderItemGroupBy) StringsX(ctx context.Context) []string
- type OrderItemMutation
- func (m *OrderItemMutation) AddField(name string, value ent.Value) error
- func (m *OrderItemMutation) AddPricePerUnit(d decimal.Decimal)
- func (m *OrderItemMutation) AddQty(d decimal.Decimal)
- func (m *OrderItemMutation) AddedEdges() []string
- func (m *OrderItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrderItemMutation) AddedFields() []string
- func (m *OrderItemMutation) AddedIDs(name string) []ent.Value
- func (m *OrderItemMutation) AddedPricePerUnit() (r decimal.Decimal, exists bool)
- func (m *OrderItemMutation) AddedQty() (r decimal.Decimal, exists bool)
- func (m *OrderItemMutation) ClearDestinationWorkUnit()
- func (m *OrderItemMutation) ClearDstUnitID()
- func (m *OrderItemMutation) ClearEdge(name string) error
- func (m *OrderItemMutation) ClearField(name string) error
- func (m *OrderItemMutation) ClearOrder()
- func (m *OrderItemMutation) ClearProduct()
- func (m *OrderItemMutation) ClearProductColor()
- func (m *OrderItemMutation) ClearSourceWorkUnit()
- func (m *OrderItemMutation) ClearSrcUnitID()
- func (m *OrderItemMutation) ClearedEdges() []string
- func (m *OrderItemMutation) ClearedFields() []string
- func (m OrderItemMutation) Client() *Client
- func (m *OrderItemMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OrderItemMutation) DestinationWorkUnitCleared() bool
- func (m *OrderItemMutation) DestinationWorkUnitID() (id uuid.UUID, exists bool)
- func (m *OrderItemMutation) DestinationWorkUnitIDs() (ids []uuid.UUID)
- func (m *OrderItemMutation) DstUnitID() (r uuid.UUID, exists bool)
- func (m *OrderItemMutation) DstUnitIDCleared() bool
- func (m *OrderItemMutation) EdgeCleared(name string) bool
- func (m *OrderItemMutation) Field(name string) (ent.Value, bool)
- func (m *OrderItemMutation) FieldCleared(name string) bool
- func (m *OrderItemMutation) Fields() []string
- func (m *OrderItemMutation) ID() (id uuid.UUID, exists bool)
- func (m *OrderItemMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *OrderItemMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *OrderItemMutation) OldDstUnitID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *OrderItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderItemMutation) OldOrderID(ctx context.Context) (v uuid.UUID, err error)
- func (m *OrderItemMutation) OldPricePerUnit(ctx context.Context) (v *decimal.Decimal, err error)
- func (m *OrderItemMutation) OldProductColorID(ctx context.Context) (v string, err error)
- func (m *OrderItemMutation) OldProductID(ctx context.Context) (v string, err error)
- func (m *OrderItemMutation) OldQty(ctx context.Context) (v *decimal.Decimal, err error)
- func (m *OrderItemMutation) OldSrcUnitID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *OrderItemMutation) OldStatus(ctx context.Context) (v *orderitem.Status, err error)
- func (m *OrderItemMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *OrderItemMutation) Op() Op
- func (m *OrderItemMutation) OrderCleared() bool
- func (m *OrderItemMutation) OrderID() (r uuid.UUID, exists bool)
- func (m *OrderItemMutation) OrderIDs() (ids []uuid.UUID)
- func (m *OrderItemMutation) PricePerUnit() (r decimal.Decimal, exists bool)
- func (m *OrderItemMutation) ProductCleared() bool
- func (m *OrderItemMutation) ProductColorCleared() bool
- func (m *OrderItemMutation) ProductColorID() (r string, exists bool)
- func (m *OrderItemMutation) ProductColorIDs() (ids []string)
- func (m *OrderItemMutation) ProductID() (r string, exists bool)
- func (m *OrderItemMutation) ProductIDs() (ids []string)
- func (m *OrderItemMutation) Qty() (r decimal.Decimal, exists bool)
- func (m *OrderItemMutation) RemovedEdges() []string
- func (m *OrderItemMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderItemMutation) ResetCreatedAt()
- func (m *OrderItemMutation) ResetDestinationWorkUnit()
- func (m *OrderItemMutation) ResetDstUnitID()
- func (m *OrderItemMutation) ResetEdge(name string) error
- func (m *OrderItemMutation) ResetField(name string) error
- func (m *OrderItemMutation) ResetOrder()
- func (m *OrderItemMutation) ResetOrderID()
- func (m *OrderItemMutation) ResetPricePerUnit()
- func (m *OrderItemMutation) ResetProduct()
- func (m *OrderItemMutation) ResetProductColor()
- func (m *OrderItemMutation) ResetProductColorID()
- func (m *OrderItemMutation) ResetProductID()
- func (m *OrderItemMutation) ResetQty()
- func (m *OrderItemMutation) ResetSourceWorkUnit()
- func (m *OrderItemMutation) ResetSrcUnitID()
- func (m *OrderItemMutation) ResetStatus()
- func (m *OrderItemMutation) ResetUpdatedAt()
- func (m *OrderItemMutation) SetCreatedAt(t time.Time)
- func (m *OrderItemMutation) SetDestinationWorkUnitID(id uuid.UUID)
- func (m *OrderItemMutation) SetDstUnitID(u uuid.UUID)
- func (m *OrderItemMutation) SetField(name string, value ent.Value) error
- func (m *OrderItemMutation) SetID(id uuid.UUID)
- func (m *OrderItemMutation) SetOp(op Op)
- func (m *OrderItemMutation) SetOrderID(u uuid.UUID)
- func (m *OrderItemMutation) SetPricePerUnit(d decimal.Decimal)
- func (m *OrderItemMutation) SetProductColorID(s string)
- func (m *OrderItemMutation) SetProductID(s string)
- func (m *OrderItemMutation) SetQty(d decimal.Decimal)
- func (m *OrderItemMutation) SetSourceWorkUnitID(id uuid.UUID)
- func (m *OrderItemMutation) SetSrcUnitID(u uuid.UUID)
- func (m *OrderItemMutation) SetStatus(o orderitem.Status)
- func (m *OrderItemMutation) SetUpdatedAt(t time.Time)
- func (m *OrderItemMutation) SourceWorkUnitCleared() bool
- func (m *OrderItemMutation) SourceWorkUnitID() (id uuid.UUID, exists bool)
- func (m *OrderItemMutation) SourceWorkUnitIDs() (ids []uuid.UUID)
- func (m *OrderItemMutation) SrcUnitID() (r uuid.UUID, exists bool)
- func (m *OrderItemMutation) SrcUnitIDCleared() bool
- func (m *OrderItemMutation) Status() (r orderitem.Status, exists bool)
- func (m OrderItemMutation) Tx() (*Tx, error)
- func (m *OrderItemMutation) Type() string
- func (m *OrderItemMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OrderItemMutation) Where(ps ...predicate.OrderItem)
- func (m *OrderItemMutation) WhereP(ps ...func(*sql.Selector))
- type OrderItemQuery
- func (oiq *OrderItemQuery) Aggregate(fns ...AggregateFunc) *OrderItemSelect
- func (oiq *OrderItemQuery) All(ctx context.Context) ([]*OrderItem, error)
- func (oiq *OrderItemQuery) AllX(ctx context.Context) []*OrderItem
- func (oiq *OrderItemQuery) Clone() *OrderItemQuery
- func (oiq *OrderItemQuery) Count(ctx context.Context) (int, error)
- func (oiq *OrderItemQuery) CountX(ctx context.Context) int
- func (oiq *OrderItemQuery) Exist(ctx context.Context) (bool, error)
- func (oiq *OrderItemQuery) ExistX(ctx context.Context) bool
- func (oiq *OrderItemQuery) First(ctx context.Context) (*OrderItem, error)
- func (oiq *OrderItemQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (oiq *OrderItemQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (oiq *OrderItemQuery) FirstX(ctx context.Context) *OrderItem
- func (oiq *OrderItemQuery) GroupBy(field string, fields ...string) *OrderItemGroupBy
- func (oiq *OrderItemQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (oiq *OrderItemQuery) IDsX(ctx context.Context) []uuid.UUID
- func (oiq *OrderItemQuery) Limit(limit int) *OrderItemQuery
- func (oiq *OrderItemQuery) Offset(offset int) *OrderItemQuery
- func (oiq *OrderItemQuery) Only(ctx context.Context) (*OrderItem, error)
- func (oiq *OrderItemQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (oiq *OrderItemQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (oiq *OrderItemQuery) OnlyX(ctx context.Context) *OrderItem
- func (oiq *OrderItemQuery) Order(o ...orderitem.OrderOption) *OrderItemQuery
- func (oiq *OrderItemQuery) QueryDestinationWorkUnit() *WorkUnitInfoQuery
- func (oiq *OrderItemQuery) QueryOrder() *OrderQuery
- func (oiq *OrderItemQuery) QueryProduct() *ProductInfoQuery
- func (oiq *OrderItemQuery) QueryProductColor() *ProductColorQuery
- func (oiq *OrderItemQuery) QuerySourceWorkUnit() *WorkUnitInfoQuery
- func (oiq *OrderItemQuery) Select(fields ...string) *OrderItemSelect
- func (oiq *OrderItemQuery) Unique(unique bool) *OrderItemQuery
- func (oiq *OrderItemQuery) Where(ps ...predicate.OrderItem) *OrderItemQuery
- func (oiq *OrderItemQuery) WithDestinationWorkUnit(opts ...func(*WorkUnitInfoQuery)) *OrderItemQuery
- func (oiq *OrderItemQuery) WithOrder(opts ...func(*OrderQuery)) *OrderItemQuery
- func (oiq *OrderItemQuery) WithProduct(opts ...func(*ProductInfoQuery)) *OrderItemQuery
- func (oiq *OrderItemQuery) WithProductColor(opts ...func(*ProductColorQuery)) *OrderItemQuery
- func (oiq *OrderItemQuery) WithSourceWorkUnit(opts ...func(*WorkUnitInfoQuery)) *OrderItemQuery
- type OrderItemSelect
- func (ois *OrderItemSelect) Aggregate(fns ...AggregateFunc) *OrderItemSelect
- func (s *OrderItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderItemSelect) BoolX(ctx context.Context) bool
- func (s *OrderItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderItemSelect) BoolsX(ctx context.Context) []bool
- func (s *OrderItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderItemSelect) Float64X(ctx context.Context) float64
- func (s *OrderItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderItemSelect) Float64sX(ctx context.Context) []float64
- func (s *OrderItemSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OrderItemSelect) IntX(ctx context.Context) int
- func (s *OrderItemSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OrderItemSelect) IntsX(ctx context.Context) []int
- func (ois *OrderItemSelect) Scan(ctx context.Context, v any) error
- func (s *OrderItemSelect) ScanX(ctx context.Context, v any)
- func (s *OrderItemSelect) String(ctx context.Context) (_ string, err error)
- func (s *OrderItemSelect) StringX(ctx context.Context) string
- func (s *OrderItemSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OrderItemSelect) StringsX(ctx context.Context) []string
- type OrderItemUpdate
- func (oiu *OrderItemUpdate) AddPricePerUnit(d decimal.Decimal) *OrderItemUpdate
- func (oiu *OrderItemUpdate) AddQty(d decimal.Decimal) *OrderItemUpdate
- func (oiu *OrderItemUpdate) ClearDestinationWorkUnit() *OrderItemUpdate
- func (oiu *OrderItemUpdate) ClearDstUnitID() *OrderItemUpdate
- func (oiu *OrderItemUpdate) ClearSourceWorkUnit() *OrderItemUpdate
- func (oiu *OrderItemUpdate) ClearSrcUnitID() *OrderItemUpdate
- func (oiu *OrderItemUpdate) Exec(ctx context.Context) error
- func (oiu *OrderItemUpdate) ExecX(ctx context.Context)
- func (oiu *OrderItemUpdate) Mutation() *OrderItemMutation
- func (oiu *OrderItemUpdate) Save(ctx context.Context) (int, error)
- func (oiu *OrderItemUpdate) SaveX(ctx context.Context) int
- func (oiu *OrderItemUpdate) SetDestinationWorkUnit(w *WorkUnitInfo) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetDestinationWorkUnitID(id uuid.UUID) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetDstUnitID(u uuid.UUID) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetNillableDestinationWorkUnitID(id *uuid.UUID) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetNillableDstUnitID(u *uuid.UUID) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetNillablePricePerUnit(d *decimal.Decimal) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetNillableQty(d *decimal.Decimal) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetNillableSourceWorkUnitID(id *uuid.UUID) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetNillableSrcUnitID(u *uuid.UUID) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetNillableStatus(o *orderitem.Status) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetPricePerUnit(d decimal.Decimal) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetQty(d decimal.Decimal) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetSourceWorkUnit(w *WorkUnitInfo) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetSourceWorkUnitID(id uuid.UUID) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetSrcUnitID(u uuid.UUID) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetStatus(o orderitem.Status) *OrderItemUpdate
- func (oiu *OrderItemUpdate) SetUpdatedAt(t time.Time) *OrderItemUpdate
- func (oiu *OrderItemUpdate) Where(ps ...predicate.OrderItem) *OrderItemUpdate
- type OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) AddPricePerUnit(d decimal.Decimal) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) AddQty(d decimal.Decimal) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) ClearDestinationWorkUnit() *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) ClearDstUnitID() *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) ClearSourceWorkUnit() *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) ClearSrcUnitID() *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) Exec(ctx context.Context) error
- func (oiuo *OrderItemUpdateOne) ExecX(ctx context.Context)
- func (oiuo *OrderItemUpdateOne) Mutation() *OrderItemMutation
- func (oiuo *OrderItemUpdateOne) Save(ctx context.Context) (*OrderItem, error)
- func (oiuo *OrderItemUpdateOne) SaveX(ctx context.Context) *OrderItem
- func (oiuo *OrderItemUpdateOne) Select(field string, fields ...string) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetDestinationWorkUnit(w *WorkUnitInfo) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetDestinationWorkUnitID(id uuid.UUID) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetDstUnitID(u uuid.UUID) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetNillableDestinationWorkUnitID(id *uuid.UUID) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetNillableDstUnitID(u *uuid.UUID) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetNillablePricePerUnit(d *decimal.Decimal) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetNillableQty(d *decimal.Decimal) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetNillableSourceWorkUnitID(id *uuid.UUID) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetNillableSrcUnitID(u *uuid.UUID) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetNillableStatus(o *orderitem.Status) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetPricePerUnit(d decimal.Decimal) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetQty(d decimal.Decimal) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetSourceWorkUnit(w *WorkUnitInfo) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetSourceWorkUnitID(id uuid.UUID) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetSrcUnitID(u uuid.UUID) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetStatus(o orderitem.Status) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) SetUpdatedAt(t time.Time) *OrderItemUpdateOne
- func (oiuo *OrderItemUpdateOne) Where(ps ...predicate.OrderItem) *OrderItemUpdateOne
- type OrderItems
- type OrderMutation
- func (m *OrderMutation) AddField(name string, value ent.Value) error
- func (m *OrderMutation) AddPriority(i int)
- func (m *OrderMutation) AddedEdges() []string
- func (m *OrderMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrderMutation) AddedFields() []string
- func (m *OrderMutation) AddedIDs(name string) []ent.Value
- func (m *OrderMutation) AddedPriority() (r int, exists bool)
- func (m *OrderMutation) AddressID() (r uuid.UUID, exists bool)
- func (m *OrderMutation) ClearCreator()
- func (m *OrderMutation) ClearCustomer()
- func (m *OrderMutation) ClearEdge(name string) error
- func (m *OrderMutation) ClearField(name string) error
- func (m *OrderMutation) ClearInternalNote()
- func (m *OrderMutation) ClearNote()
- func (m *OrderMutation) ClearOrderAddress()
- func (m *OrderMutation) ClearOrderStatus()
- func (m *OrderMutation) ClearParentOrder()
- func (m *OrderMutation) ClearParentOrderID()
- func (m *OrderMutation) ClearStaff()
- func (m *OrderMutation) ClearStaffID()
- func (m *OrderMutation) ClearedEdges() []string
- func (m *OrderMutation) ClearedFields() []string
- func (m OrderMutation) Client() *Client
- func (m *OrderMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OrderMutation) CreatedBy() (r uuid.UUID, exists bool)
- func (m *OrderMutation) CreatorCleared() bool
- func (m *OrderMutation) CreatorID() (id uuid.UUID, exists bool)
- func (m *OrderMutation) CreatorIDs() (ids []uuid.UUID)
- func (m *OrderMutation) CustomerCleared() bool
- func (m *OrderMutation) CustomerID() (r uuid.UUID, exists bool)
- func (m *OrderMutation) CustomerIDs() (ids []uuid.UUID)
- func (m *OrderMutation) EdgeCleared(name string) bool
- func (m *OrderMutation) Field(name string) (ent.Value, bool)
- func (m *OrderMutation) FieldCleared(name string) bool
- func (m *OrderMutation) Fields() []string
- func (m *OrderMutation) GetType() (r order.Type, exists bool)
- func (m *OrderMutation) ID() (id uuid.UUID, exists bool)
- func (m *OrderMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *OrderMutation) InternalNote() (r string, exists bool)
- func (m *OrderMutation) InternalNoteCleared() bool
- func (m *OrderMutation) IsInternal() (r bool, exists bool)
- func (m *OrderMutation) Note() (r string, exists bool)
- func (m *OrderMutation) NoteCleared() bool
- func (m *OrderMutation) OldAddressID(ctx context.Context) (v uuid.UUID, err error)
- func (m *OrderMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *OrderMutation) OldCreatedBy(ctx context.Context) (v uuid.UUID, err error)
- func (m *OrderMutation) OldCustomerID(ctx context.Context) (v uuid.UUID, err error)
- func (m *OrderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderMutation) OldInternalNote(ctx context.Context) (v *string, err error)
- func (m *OrderMutation) OldIsInternal(ctx context.Context) (v *bool, err error)
- func (m *OrderMutation) OldNote(ctx context.Context) (v *string, err error)
- func (m *OrderMutation) OldParentOrderID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *OrderMutation) OldPriority(ctx context.Context) (v *int, err error)
- func (m *OrderMutation) OldStaffID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *OrderMutation) OldStatusCode(ctx context.Context) (v int, err error)
- func (m *OrderMutation) OldType(ctx context.Context) (v *order.Type, err error)
- func (m *OrderMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *OrderMutation) Op() Op
- func (m *OrderMutation) OrderAddressCleared() bool
- func (m *OrderMutation) OrderAddressID() (id uuid.UUID, exists bool)
- func (m *OrderMutation) OrderAddressIDs() (ids []uuid.UUID)
- func (m *OrderMutation) OrderStatusCleared() bool
- func (m *OrderMutation) OrderStatusID() (id int, exists bool)
- func (m *OrderMutation) OrderStatusIDs() (ids []int)
- func (m *OrderMutation) ParentOrderCleared() bool
- func (m *OrderMutation) ParentOrderID() (r uuid.UUID, exists bool)
- func (m *OrderMutation) ParentOrderIDCleared() bool
- func (m *OrderMutation) ParentOrderIDs() (ids []uuid.UUID)
- func (m *OrderMutation) Priority() (r int, exists bool)
- func (m *OrderMutation) RemovedEdges() []string
- func (m *OrderMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderMutation) ResetAddressID()
- func (m *OrderMutation) ResetCreatedAt()
- func (m *OrderMutation) ResetCreatedBy()
- func (m *OrderMutation) ResetCreator()
- func (m *OrderMutation) ResetCustomer()
- func (m *OrderMutation) ResetCustomerID()
- func (m *OrderMutation) ResetEdge(name string) error
- func (m *OrderMutation) ResetField(name string) error
- func (m *OrderMutation) ResetInternalNote()
- func (m *OrderMutation) ResetIsInternal()
- func (m *OrderMutation) ResetNote()
- func (m *OrderMutation) ResetOrderAddress()
- func (m *OrderMutation) ResetOrderStatus()
- func (m *OrderMutation) ResetParentOrder()
- func (m *OrderMutation) ResetParentOrderID()
- func (m *OrderMutation) ResetPriority()
- func (m *OrderMutation) ResetStaff()
- func (m *OrderMutation) ResetStaffID()
- func (m *OrderMutation) ResetStatusCode()
- func (m *OrderMutation) ResetType()
- func (m *OrderMutation) ResetUpdatedAt()
- func (m *OrderMutation) SetAddressID(u uuid.UUID)
- func (m *OrderMutation) SetCreatedAt(t time.Time)
- func (m *OrderMutation) SetCreatedBy(u uuid.UUID)
- func (m *OrderMutation) SetCreatorID(id uuid.UUID)
- func (m *OrderMutation) SetCustomerID(u uuid.UUID)
- func (m *OrderMutation) SetField(name string, value ent.Value) error
- func (m *OrderMutation) SetID(id uuid.UUID)
- func (m *OrderMutation) SetInternalNote(s string)
- func (m *OrderMutation) SetIsInternal(b bool)
- func (m *OrderMutation) SetNote(s string)
- func (m *OrderMutation) SetOp(op Op)
- func (m *OrderMutation) SetOrderAddressID(id uuid.UUID)
- func (m *OrderMutation) SetOrderStatusID(id int)
- func (m *OrderMutation) SetParentOrderID(u uuid.UUID)
- func (m *OrderMutation) SetPriority(i int)
- func (m *OrderMutation) SetStaffID(u uuid.UUID)
- func (m *OrderMutation) SetStatusCode(i int)
- func (m *OrderMutation) SetType(o order.Type)
- func (m *OrderMutation) SetUpdatedAt(t time.Time)
- func (m *OrderMutation) StaffCleared() bool
- func (m *OrderMutation) StaffID() (r uuid.UUID, exists bool)
- func (m *OrderMutation) StaffIDCleared() bool
- func (m *OrderMutation) StaffIDs() (ids []uuid.UUID)
- func (m *OrderMutation) StatusCode() (r int, exists bool)
- func (m OrderMutation) Tx() (*Tx, error)
- func (m *OrderMutation) Type() string
- func (m *OrderMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OrderMutation) Where(ps ...predicate.Order)
- func (m *OrderMutation) WhereP(ps ...func(*sql.Selector))
- type OrderQuery
- func (oq *OrderQuery) Aggregate(fns ...AggregateFunc) *OrderSelect
- func (oq *OrderQuery) All(ctx context.Context) ([]*Order, error)
- func (oq *OrderQuery) AllX(ctx context.Context) []*Order
- func (oq *OrderQuery) Clone() *OrderQuery
- func (oq *OrderQuery) Count(ctx context.Context) (int, error)
- func (oq *OrderQuery) CountX(ctx context.Context) int
- func (oq *OrderQuery) Exist(ctx context.Context) (bool, error)
- func (oq *OrderQuery) ExistX(ctx context.Context) bool
- func (oq *OrderQuery) First(ctx context.Context) (*Order, error)
- func (oq *OrderQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (oq *OrderQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (oq *OrderQuery) FirstX(ctx context.Context) *Order
- func (oq *OrderQuery) GroupBy(field string, fields ...string) *OrderGroupBy
- func (oq *OrderQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (oq *OrderQuery) IDsX(ctx context.Context) []uuid.UUID
- func (oq *OrderQuery) Limit(limit int) *OrderQuery
- func (oq *OrderQuery) Offset(offset int) *OrderQuery
- func (oq *OrderQuery) Only(ctx context.Context) (*Order, error)
- func (oq *OrderQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (oq *OrderQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (oq *OrderQuery) OnlyX(ctx context.Context) *Order
- func (oq *OrderQuery) Order(o ...order.OrderOption) *OrderQuery
- func (oq *OrderQuery) QueryCreator() *PersonQuery
- func (oq *OrderQuery) QueryCustomer() *PersonQuery
- func (oq *OrderQuery) QueryOrderAddress() *AddressQuery
- func (oq *OrderQuery) QueryOrderStatus() *OrderStatusCodeQuery
- func (oq *OrderQuery) QueryParentOrder() *OrderQuery
- func (oq *OrderQuery) QueryStaff() *PersonQuery
- func (oq *OrderQuery) Select(fields ...string) *OrderSelect
- func (oq *OrderQuery) Unique(unique bool) *OrderQuery
- func (oq *OrderQuery) Where(ps ...predicate.Order) *OrderQuery
- func (oq *OrderQuery) WithCreator(opts ...func(*PersonQuery)) *OrderQuery
- func (oq *OrderQuery) WithCustomer(opts ...func(*PersonQuery)) *OrderQuery
- func (oq *OrderQuery) WithOrderAddress(opts ...func(*AddressQuery)) *OrderQuery
- func (oq *OrderQuery) WithOrderStatus(opts ...func(*OrderStatusCodeQuery)) *OrderQuery
- func (oq *OrderQuery) WithParentOrder(opts ...func(*OrderQuery)) *OrderQuery
- func (oq *OrderQuery) WithStaff(opts ...func(*PersonQuery)) *OrderQuery
- type OrderSelect
- func (os *OrderSelect) Aggregate(fns ...AggregateFunc) *OrderSelect
- func (s *OrderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderSelect) BoolX(ctx context.Context) bool
- func (s *OrderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderSelect) BoolsX(ctx context.Context) []bool
- func (s *OrderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderSelect) Float64X(ctx context.Context) float64
- func (s *OrderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderSelect) Float64sX(ctx context.Context) []float64
- func (s *OrderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OrderSelect) IntX(ctx context.Context) int
- func (s *OrderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OrderSelect) IntsX(ctx context.Context) []int
- func (os *OrderSelect) Scan(ctx context.Context, v any) error
- func (s *OrderSelect) ScanX(ctx context.Context, v any)
- func (s *OrderSelect) String(ctx context.Context) (_ string, err error)
- func (s *OrderSelect) StringX(ctx context.Context) string
- func (s *OrderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OrderSelect) StringsX(ctx context.Context) []string
- type OrderStatusCode
- type OrderStatusCodeClient
- func (c *OrderStatusCodeClient) Create() *OrderStatusCodeCreate
- func (c *OrderStatusCodeClient) CreateBulk(builders ...*OrderStatusCodeCreate) *OrderStatusCodeCreateBulk
- func (c *OrderStatusCodeClient) Delete() *OrderStatusCodeDelete
- func (c *OrderStatusCodeClient) DeleteOne(osc *OrderStatusCode) *OrderStatusCodeDeleteOne
- func (c *OrderStatusCodeClient) DeleteOneID(id int) *OrderStatusCodeDeleteOne
- func (c *OrderStatusCodeClient) Get(ctx context.Context, id int) (*OrderStatusCode, error)
- func (c *OrderStatusCodeClient) GetX(ctx context.Context, id int) *OrderStatusCode
- func (c *OrderStatusCodeClient) Hooks() []Hook
- func (c *OrderStatusCodeClient) Intercept(interceptors ...Interceptor)
- func (c *OrderStatusCodeClient) Interceptors() []Interceptor
- func (c *OrderStatusCodeClient) MapCreateBulk(slice any, setFunc func(*OrderStatusCodeCreate, int)) *OrderStatusCodeCreateBulk
- func (c *OrderStatusCodeClient) Query() *OrderStatusCodeQuery
- func (c *OrderStatusCodeClient) Update() *OrderStatusCodeUpdate
- func (c *OrderStatusCodeClient) UpdateOne(osc *OrderStatusCode) *OrderStatusCodeUpdateOne
- func (c *OrderStatusCodeClient) UpdateOneID(id int) *OrderStatusCodeUpdateOne
- func (c *OrderStatusCodeClient) Use(hooks ...Hook)
- type OrderStatusCodeCreate
- func (oscc *OrderStatusCodeCreate) Exec(ctx context.Context) error
- func (oscc *OrderStatusCodeCreate) ExecX(ctx context.Context)
- func (oscc *OrderStatusCodeCreate) Mutation() *OrderStatusCodeMutation
- func (oscc *OrderStatusCodeCreate) Save(ctx context.Context) (*OrderStatusCode, error)
- func (oscc *OrderStatusCodeCreate) SaveX(ctx context.Context) *OrderStatusCode
- func (oscc *OrderStatusCodeCreate) SetCreatedAt(t time.Time) *OrderStatusCodeCreate
- func (oscc *OrderStatusCodeCreate) SetID(i int) *OrderStatusCodeCreate
- func (oscc *OrderStatusCodeCreate) SetNillableCreatedAt(t *time.Time) *OrderStatusCodeCreate
- func (oscc *OrderStatusCodeCreate) SetNillableUpdatedAt(t *time.Time) *OrderStatusCodeCreate
- func (oscc *OrderStatusCodeCreate) SetOrderStatus(s string) *OrderStatusCodeCreate
- func (oscc *OrderStatusCodeCreate) SetUpdatedAt(t time.Time) *OrderStatusCodeCreate
- type OrderStatusCodeCreateBulk
- func (osccb *OrderStatusCodeCreateBulk) Exec(ctx context.Context) error
- func (osccb *OrderStatusCodeCreateBulk) ExecX(ctx context.Context)
- func (osccb *OrderStatusCodeCreateBulk) Save(ctx context.Context) ([]*OrderStatusCode, error)
- func (osccb *OrderStatusCodeCreateBulk) SaveX(ctx context.Context) []*OrderStatusCode
- type OrderStatusCodeDelete
- type OrderStatusCodeDeleteOne
- type OrderStatusCodeGroupBy
- func (oscgb *OrderStatusCodeGroupBy) Aggregate(fns ...AggregateFunc) *OrderStatusCodeGroupBy
- func (s *OrderStatusCodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderStatusCodeGroupBy) BoolX(ctx context.Context) bool
- func (s *OrderStatusCodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderStatusCodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OrderStatusCodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderStatusCodeGroupBy) Float64X(ctx context.Context) float64
- func (s *OrderStatusCodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderStatusCodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OrderStatusCodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OrderStatusCodeGroupBy) IntX(ctx context.Context) int
- func (s *OrderStatusCodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OrderStatusCodeGroupBy) IntsX(ctx context.Context) []int
- func (oscgb *OrderStatusCodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *OrderStatusCodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *OrderStatusCodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OrderStatusCodeGroupBy) StringX(ctx context.Context) string
- func (s *OrderStatusCodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OrderStatusCodeGroupBy) StringsX(ctx context.Context) []string
- type OrderStatusCodeMutation
- func (m *OrderStatusCodeMutation) AddField(name string, value ent.Value) error
- func (m *OrderStatusCodeMutation) AddedEdges() []string
- func (m *OrderStatusCodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrderStatusCodeMutation) AddedFields() []string
- func (m *OrderStatusCodeMutation) AddedIDs(name string) []ent.Value
- func (m *OrderStatusCodeMutation) ClearEdge(name string) error
- func (m *OrderStatusCodeMutation) ClearField(name string) error
- func (m *OrderStatusCodeMutation) ClearedEdges() []string
- func (m *OrderStatusCodeMutation) ClearedFields() []string
- func (m OrderStatusCodeMutation) Client() *Client
- func (m *OrderStatusCodeMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OrderStatusCodeMutation) EdgeCleared(name string) bool
- func (m *OrderStatusCodeMutation) Field(name string) (ent.Value, bool)
- func (m *OrderStatusCodeMutation) FieldCleared(name string) bool
- func (m *OrderStatusCodeMutation) Fields() []string
- func (m *OrderStatusCodeMutation) ID() (id int, exists bool)
- func (m *OrderStatusCodeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *OrderStatusCodeMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *OrderStatusCodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderStatusCodeMutation) OldOrderStatus(ctx context.Context) (v string, err error)
- func (m *OrderStatusCodeMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *OrderStatusCodeMutation) Op() Op
- func (m *OrderStatusCodeMutation) OrderStatus() (r string, exists bool)
- func (m *OrderStatusCodeMutation) RemovedEdges() []string
- func (m *OrderStatusCodeMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderStatusCodeMutation) ResetCreatedAt()
- func (m *OrderStatusCodeMutation) ResetEdge(name string) error
- func (m *OrderStatusCodeMutation) ResetField(name string) error
- func (m *OrderStatusCodeMutation) ResetOrderStatus()
- func (m *OrderStatusCodeMutation) ResetUpdatedAt()
- func (m *OrderStatusCodeMutation) SetCreatedAt(t time.Time)
- func (m *OrderStatusCodeMutation) SetField(name string, value ent.Value) error
- func (m *OrderStatusCodeMutation) SetID(id int)
- func (m *OrderStatusCodeMutation) SetOp(op Op)
- func (m *OrderStatusCodeMutation) SetOrderStatus(s string)
- func (m *OrderStatusCodeMutation) SetUpdatedAt(t time.Time)
- func (m OrderStatusCodeMutation) Tx() (*Tx, error)
- func (m *OrderStatusCodeMutation) Type() string
- func (m *OrderStatusCodeMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OrderStatusCodeMutation) Where(ps ...predicate.OrderStatusCode)
- func (m *OrderStatusCodeMutation) WhereP(ps ...func(*sql.Selector))
- type OrderStatusCodeQuery
- func (oscq *OrderStatusCodeQuery) Aggregate(fns ...AggregateFunc) *OrderStatusCodeSelect
- func (oscq *OrderStatusCodeQuery) All(ctx context.Context) ([]*OrderStatusCode, error)
- func (oscq *OrderStatusCodeQuery) AllX(ctx context.Context) []*OrderStatusCode
- func (oscq *OrderStatusCodeQuery) Clone() *OrderStatusCodeQuery
- func (oscq *OrderStatusCodeQuery) Count(ctx context.Context) (int, error)
- func (oscq *OrderStatusCodeQuery) CountX(ctx context.Context) int
- func (oscq *OrderStatusCodeQuery) Exist(ctx context.Context) (bool, error)
- func (oscq *OrderStatusCodeQuery) ExistX(ctx context.Context) bool
- func (oscq *OrderStatusCodeQuery) First(ctx context.Context) (*OrderStatusCode, error)
- func (oscq *OrderStatusCodeQuery) FirstID(ctx context.Context) (id int, err error)
- func (oscq *OrderStatusCodeQuery) FirstIDX(ctx context.Context) int
- func (oscq *OrderStatusCodeQuery) FirstX(ctx context.Context) *OrderStatusCode
- func (oscq *OrderStatusCodeQuery) GroupBy(field string, fields ...string) *OrderStatusCodeGroupBy
- func (oscq *OrderStatusCodeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (oscq *OrderStatusCodeQuery) IDsX(ctx context.Context) []int
- func (oscq *OrderStatusCodeQuery) Limit(limit int) *OrderStatusCodeQuery
- func (oscq *OrderStatusCodeQuery) Offset(offset int) *OrderStatusCodeQuery
- func (oscq *OrderStatusCodeQuery) Only(ctx context.Context) (*OrderStatusCode, error)
- func (oscq *OrderStatusCodeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (oscq *OrderStatusCodeQuery) OnlyIDX(ctx context.Context) int
- func (oscq *OrderStatusCodeQuery) OnlyX(ctx context.Context) *OrderStatusCode
- func (oscq *OrderStatusCodeQuery) Order(o ...orderstatuscode.OrderOption) *OrderStatusCodeQuery
- func (oscq *OrderStatusCodeQuery) Select(fields ...string) *OrderStatusCodeSelect
- func (oscq *OrderStatusCodeQuery) Unique(unique bool) *OrderStatusCodeQuery
- func (oscq *OrderStatusCodeQuery) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeQuery
- type OrderStatusCodeSelect
- func (oscs *OrderStatusCodeSelect) Aggregate(fns ...AggregateFunc) *OrderStatusCodeSelect
- func (s *OrderStatusCodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderStatusCodeSelect) BoolX(ctx context.Context) bool
- func (s *OrderStatusCodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderStatusCodeSelect) BoolsX(ctx context.Context) []bool
- func (s *OrderStatusCodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderStatusCodeSelect) Float64X(ctx context.Context) float64
- func (s *OrderStatusCodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderStatusCodeSelect) Float64sX(ctx context.Context) []float64
- func (s *OrderStatusCodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OrderStatusCodeSelect) IntX(ctx context.Context) int
- func (s *OrderStatusCodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OrderStatusCodeSelect) IntsX(ctx context.Context) []int
- func (oscs *OrderStatusCodeSelect) Scan(ctx context.Context, v any) error
- func (s *OrderStatusCodeSelect) ScanX(ctx context.Context, v any)
- func (s *OrderStatusCodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *OrderStatusCodeSelect) StringX(ctx context.Context) string
- func (s *OrderStatusCodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OrderStatusCodeSelect) StringsX(ctx context.Context) []string
- type OrderStatusCodeUpdate
- func (oscu *OrderStatusCodeUpdate) Exec(ctx context.Context) error
- func (oscu *OrderStatusCodeUpdate) ExecX(ctx context.Context)
- func (oscu *OrderStatusCodeUpdate) Mutation() *OrderStatusCodeMutation
- func (oscu *OrderStatusCodeUpdate) Save(ctx context.Context) (int, error)
- func (oscu *OrderStatusCodeUpdate) SaveX(ctx context.Context) int
- func (oscu *OrderStatusCodeUpdate) SetNillableOrderStatus(s *string) *OrderStatusCodeUpdate
- func (oscu *OrderStatusCodeUpdate) SetOrderStatus(s string) *OrderStatusCodeUpdate
- func (oscu *OrderStatusCodeUpdate) SetUpdatedAt(t time.Time) *OrderStatusCodeUpdate
- func (oscu *OrderStatusCodeUpdate) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeUpdate
- type OrderStatusCodeUpdateOne
- func (oscuo *OrderStatusCodeUpdateOne) Exec(ctx context.Context) error
- func (oscuo *OrderStatusCodeUpdateOne) ExecX(ctx context.Context)
- func (oscuo *OrderStatusCodeUpdateOne) Mutation() *OrderStatusCodeMutation
- func (oscuo *OrderStatusCodeUpdateOne) Save(ctx context.Context) (*OrderStatusCode, error)
- func (oscuo *OrderStatusCodeUpdateOne) SaveX(ctx context.Context) *OrderStatusCode
- func (oscuo *OrderStatusCodeUpdateOne) Select(field string, fields ...string) *OrderStatusCodeUpdateOne
- func (oscuo *OrderStatusCodeUpdateOne) SetNillableOrderStatus(s *string) *OrderStatusCodeUpdateOne
- func (oscuo *OrderStatusCodeUpdateOne) SetOrderStatus(s string) *OrderStatusCodeUpdateOne
- func (oscuo *OrderStatusCodeUpdateOne) SetUpdatedAt(t time.Time) *OrderStatusCodeUpdateOne
- func (oscuo *OrderStatusCodeUpdateOne) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeUpdateOne
- type OrderStatusCodes
- type OrderUpdate
- func (ou *OrderUpdate) AddPriority(i int) *OrderUpdate
- func (ou *OrderUpdate) ClearInternalNote() *OrderUpdate
- func (ou *OrderUpdate) ClearNote() *OrderUpdate
- func (ou *OrderUpdate) ClearOrderAddress() *OrderUpdate
- func (ou *OrderUpdate) ClearOrderStatus() *OrderUpdate
- func (ou *OrderUpdate) ClearStaff() *OrderUpdate
- func (ou *OrderUpdate) ClearStaffID() *OrderUpdate
- func (ou *OrderUpdate) Exec(ctx context.Context) error
- func (ou *OrderUpdate) ExecX(ctx context.Context)
- func (ou *OrderUpdate) Mutation() *OrderMutation
- func (ou *OrderUpdate) Save(ctx context.Context) (int, error)
- func (ou *OrderUpdate) SaveX(ctx context.Context) int
- func (ou *OrderUpdate) SetAddressID(u uuid.UUID) *OrderUpdate
- func (ou *OrderUpdate) SetInternalNote(s string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableAddressID(u *uuid.UUID) *OrderUpdate
- func (ou *OrderUpdate) SetNillableInternalNote(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableNote(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillablePriority(i *int) *OrderUpdate
- func (ou *OrderUpdate) SetNillableStaffID(u *uuid.UUID) *OrderUpdate
- func (ou *OrderUpdate) SetNillableStatusCode(i *int) *OrderUpdate
- func (ou *OrderUpdate) SetNote(s string) *OrderUpdate
- func (ou *OrderUpdate) SetOrderAddress(a *Address) *OrderUpdate
- func (ou *OrderUpdate) SetOrderAddressID(id uuid.UUID) *OrderUpdate
- func (ou *OrderUpdate) SetOrderStatus(o *OrderStatusCode) *OrderUpdate
- func (ou *OrderUpdate) SetOrderStatusID(id int) *OrderUpdate
- func (ou *OrderUpdate) SetPriority(i int) *OrderUpdate
- func (ou *OrderUpdate) SetStaff(p *Person) *OrderUpdate
- func (ou *OrderUpdate) SetStaffID(u uuid.UUID) *OrderUpdate
- func (ou *OrderUpdate) SetStatusCode(i int) *OrderUpdate
- func (ou *OrderUpdate) SetUpdatedAt(t time.Time) *OrderUpdate
- func (ou *OrderUpdate) Where(ps ...predicate.Order) *OrderUpdate
- type OrderUpdateOne
- func (ouo *OrderUpdateOne) AddPriority(i int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearInternalNote() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearNote() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearOrderAddress() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearOrderStatus() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearStaff() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearStaffID() *OrderUpdateOne
- func (ouo *OrderUpdateOne) Exec(ctx context.Context) error
- func (ouo *OrderUpdateOne) ExecX(ctx context.Context)
- func (ouo *OrderUpdateOne) Mutation() *OrderMutation
- func (ouo *OrderUpdateOne) Save(ctx context.Context) (*Order, error)
- func (ouo *OrderUpdateOne) SaveX(ctx context.Context) *Order
- func (ouo *OrderUpdateOne) Select(field string, fields ...string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetAddressID(u uuid.UUID) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetInternalNote(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableAddressID(u *uuid.UUID) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableInternalNote(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableNote(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillablePriority(i *int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableStaffID(u *uuid.UUID) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableStatusCode(i *int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNote(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetOrderAddress(a *Address) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetOrderAddressID(id uuid.UUID) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetOrderStatus(o *OrderStatusCode) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetOrderStatusID(id int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetPriority(i int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetStaff(p *Person) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetStaffID(u uuid.UUID) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetStatusCode(i int) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetUpdatedAt(t time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) Where(ps ...predicate.Order) *OrderUpdateOne
- type Orders
- type Person
- func (pe *Person) QueryAddresses() *AddressQuery
- func (pe *Person) QueryPersonAddresses() *PersonAddressQuery
- func (pe *Person) QueryWorkUnit() *WorkUnitInfoQuery
- func (pe *Person) String() string
- func (pe *Person) Unwrap() *Person
- func (pe *Person) Update() *PersonUpdateOne
- func (pe *Person) Value(name string) (ent.Value, error)
- type PersonAddress
- func (pa *PersonAddress) QueryAddresses() *AddressQuery
- func (pa *PersonAddress) QueryPersons() *PersonQuery
- func (pa *PersonAddress) String() string
- func (pa *PersonAddress) Unwrap() *PersonAddress
- func (pa *PersonAddress) Update() *PersonAddressUpdateOne
- func (pa *PersonAddress) Value(name string) (ent.Value, error)
- type PersonAddressClient
- func (c *PersonAddressClient) Create() *PersonAddressCreate
- func (c *PersonAddressClient) CreateBulk(builders ...*PersonAddressCreate) *PersonAddressCreateBulk
- func (c *PersonAddressClient) Delete() *PersonAddressDelete
- func (c *PersonAddressClient) Hooks() []Hook
- func (c *PersonAddressClient) Intercept(interceptors ...Interceptor)
- func (c *PersonAddressClient) Interceptors() []Interceptor
- func (c *PersonAddressClient) MapCreateBulk(slice any, setFunc func(*PersonAddressCreate, int)) *PersonAddressCreateBulk
- func (c *PersonAddressClient) Query() *PersonAddressQuery
- func (c *PersonAddressClient) QueryAddresses(pa *PersonAddress) *AddressQuery
- func (c *PersonAddressClient) QueryPersons(pa *PersonAddress) *PersonQuery
- func (c *PersonAddressClient) Update() *PersonAddressUpdate
- func (c *PersonAddressClient) UpdateOne(pa *PersonAddress) *PersonAddressUpdateOne
- func (c *PersonAddressClient) Use(hooks ...Hook)
- type PersonAddressCreate
- func (pac *PersonAddressCreate) Exec(ctx context.Context) error
- func (pac *PersonAddressCreate) ExecX(ctx context.Context)
- func (pac *PersonAddressCreate) Mutation() *PersonAddressMutation
- func (pac *PersonAddressCreate) Save(ctx context.Context) (*PersonAddress, error)
- func (pac *PersonAddressCreate) SaveX(ctx context.Context) *PersonAddress
- func (pac *PersonAddressCreate) SetAddressID(u uuid.UUID) *PersonAddressCreate
- func (pac *PersonAddressCreate) SetAddresses(a *Address) *PersonAddressCreate
- func (pac *PersonAddressCreate) SetAddressesID(id uuid.UUID) *PersonAddressCreate
- func (pac *PersonAddressCreate) SetCreatedAt(t time.Time) *PersonAddressCreate
- func (pac *PersonAddressCreate) SetNillableCreatedAt(t *time.Time) *PersonAddressCreate
- func (pac *PersonAddressCreate) SetNillableUpdatedAt(t *time.Time) *PersonAddressCreate
- func (pac *PersonAddressCreate) SetPersonID(u uuid.UUID) *PersonAddressCreate
- func (pac *PersonAddressCreate) SetPersons(p *Person) *PersonAddressCreate
- func (pac *PersonAddressCreate) SetPersonsID(id uuid.UUID) *PersonAddressCreate
- func (pac *PersonAddressCreate) SetUpdatedAt(t time.Time) *PersonAddressCreate
- type PersonAddressCreateBulk
- func (pacb *PersonAddressCreateBulk) Exec(ctx context.Context) error
- func (pacb *PersonAddressCreateBulk) ExecX(ctx context.Context)
- func (pacb *PersonAddressCreateBulk) Save(ctx context.Context) ([]*PersonAddress, error)
- func (pacb *PersonAddressCreateBulk) SaveX(ctx context.Context) []*PersonAddress
- type PersonAddressDelete
- type PersonAddressDeleteOne
- type PersonAddressEdges
- type PersonAddressGroupBy
- func (pagb *PersonAddressGroupBy) Aggregate(fns ...AggregateFunc) *PersonAddressGroupBy
- func (s *PersonAddressGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PersonAddressGroupBy) BoolX(ctx context.Context) bool
- func (s *PersonAddressGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PersonAddressGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PersonAddressGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PersonAddressGroupBy) Float64X(ctx context.Context) float64
- func (s *PersonAddressGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PersonAddressGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PersonAddressGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PersonAddressGroupBy) IntX(ctx context.Context) int
- func (s *PersonAddressGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PersonAddressGroupBy) IntsX(ctx context.Context) []int
- func (pagb *PersonAddressGroupBy) Scan(ctx context.Context, v any) error
- func (s *PersonAddressGroupBy) ScanX(ctx context.Context, v any)
- func (s *PersonAddressGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PersonAddressGroupBy) StringX(ctx context.Context) string
- func (s *PersonAddressGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PersonAddressGroupBy) StringsX(ctx context.Context) []string
- type PersonAddressMutation
- func (m *PersonAddressMutation) AddField(name string, value ent.Value) error
- func (m *PersonAddressMutation) AddedEdges() []string
- func (m *PersonAddressMutation) AddedField(name string) (ent.Value, bool)
- func (m *PersonAddressMutation) AddedFields() []string
- func (m *PersonAddressMutation) AddedIDs(name string) []ent.Value
- func (m *PersonAddressMutation) AddressID() (r uuid.UUID, exists bool)
- func (m *PersonAddressMutation) AddressesCleared() bool
- func (m *PersonAddressMutation) AddressesID() (id uuid.UUID, exists bool)
- func (m *PersonAddressMutation) AddressesIDs() (ids []uuid.UUID)
- func (m *PersonAddressMutation) ClearAddresses()
- func (m *PersonAddressMutation) ClearEdge(name string) error
- func (m *PersonAddressMutation) ClearField(name string) error
- func (m *PersonAddressMutation) ClearPersons()
- func (m *PersonAddressMutation) ClearedEdges() []string
- func (m *PersonAddressMutation) ClearedFields() []string
- func (m PersonAddressMutation) Client() *Client
- func (m *PersonAddressMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PersonAddressMutation) EdgeCleared(name string) bool
- func (m *PersonAddressMutation) Field(name string) (ent.Value, bool)
- func (m *PersonAddressMutation) FieldCleared(name string) bool
- func (m *PersonAddressMutation) Fields() []string
- func (m *PersonAddressMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PersonAddressMutation) Op() Op
- func (m *PersonAddressMutation) PersonID() (r uuid.UUID, exists bool)
- func (m *PersonAddressMutation) PersonsCleared() bool
- func (m *PersonAddressMutation) PersonsID() (id uuid.UUID, exists bool)
- func (m *PersonAddressMutation) PersonsIDs() (ids []uuid.UUID)
- func (m *PersonAddressMutation) RemovedEdges() []string
- func (m *PersonAddressMutation) RemovedIDs(name string) []ent.Value
- func (m *PersonAddressMutation) ResetAddressID()
- func (m *PersonAddressMutation) ResetAddresses()
- func (m *PersonAddressMutation) ResetCreatedAt()
- func (m *PersonAddressMutation) ResetEdge(name string) error
- func (m *PersonAddressMutation) ResetField(name string) error
- func (m *PersonAddressMutation) ResetPersonID()
- func (m *PersonAddressMutation) ResetPersons()
- func (m *PersonAddressMutation) ResetUpdatedAt()
- func (m *PersonAddressMutation) SetAddressID(u uuid.UUID)
- func (m *PersonAddressMutation) SetAddressesID(id uuid.UUID)
- func (m *PersonAddressMutation) SetCreatedAt(t time.Time)
- func (m *PersonAddressMutation) SetField(name string, value ent.Value) error
- func (m *PersonAddressMutation) SetOp(op Op)
- func (m *PersonAddressMutation) SetPersonID(u uuid.UUID)
- func (m *PersonAddressMutation) SetPersonsID(id uuid.UUID)
- func (m *PersonAddressMutation) SetUpdatedAt(t time.Time)
- func (m PersonAddressMutation) Tx() (*Tx, error)
- func (m *PersonAddressMutation) Type() string
- func (m *PersonAddressMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PersonAddressMutation) Where(ps ...predicate.PersonAddress)
- func (m *PersonAddressMutation) WhereP(ps ...func(*sql.Selector))
- type PersonAddressQuery
- func (paq *PersonAddressQuery) Aggregate(fns ...AggregateFunc) *PersonAddressSelect
- func (paq *PersonAddressQuery) All(ctx context.Context) ([]*PersonAddress, error)
- func (paq *PersonAddressQuery) AllX(ctx context.Context) []*PersonAddress
- func (paq *PersonAddressQuery) Clone() *PersonAddressQuery
- func (paq *PersonAddressQuery) Count(ctx context.Context) (int, error)
- func (paq *PersonAddressQuery) CountX(ctx context.Context) int
- func (paq *PersonAddressQuery) Exist(ctx context.Context) (bool, error)
- func (paq *PersonAddressQuery) ExistX(ctx context.Context) bool
- func (paq *PersonAddressQuery) First(ctx context.Context) (*PersonAddress, error)
- func (paq *PersonAddressQuery) FirstX(ctx context.Context) *PersonAddress
- func (paq *PersonAddressQuery) GroupBy(field string, fields ...string) *PersonAddressGroupBy
- func (paq *PersonAddressQuery) Limit(limit int) *PersonAddressQuery
- func (paq *PersonAddressQuery) Offset(offset int) *PersonAddressQuery
- func (paq *PersonAddressQuery) Only(ctx context.Context) (*PersonAddress, error)
- func (paq *PersonAddressQuery) OnlyX(ctx context.Context) *PersonAddress
- func (paq *PersonAddressQuery) Order(o ...personaddress.OrderOption) *PersonAddressQuery
- func (paq *PersonAddressQuery) QueryAddresses() *AddressQuery
- func (paq *PersonAddressQuery) QueryPersons() *PersonQuery
- func (paq *PersonAddressQuery) Select(fields ...string) *PersonAddressSelect
- func (paq *PersonAddressQuery) Unique(unique bool) *PersonAddressQuery
- func (paq *PersonAddressQuery) Where(ps ...predicate.PersonAddress) *PersonAddressQuery
- func (paq *PersonAddressQuery) WithAddresses(opts ...func(*AddressQuery)) *PersonAddressQuery
- func (paq *PersonAddressQuery) WithPersons(opts ...func(*PersonQuery)) *PersonAddressQuery
- type PersonAddressSelect
- func (pas *PersonAddressSelect) Aggregate(fns ...AggregateFunc) *PersonAddressSelect
- func (s *PersonAddressSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PersonAddressSelect) BoolX(ctx context.Context) bool
- func (s *PersonAddressSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PersonAddressSelect) BoolsX(ctx context.Context) []bool
- func (s *PersonAddressSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PersonAddressSelect) Float64X(ctx context.Context) float64
- func (s *PersonAddressSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PersonAddressSelect) Float64sX(ctx context.Context) []float64
- func (s *PersonAddressSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PersonAddressSelect) IntX(ctx context.Context) int
- func (s *PersonAddressSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PersonAddressSelect) IntsX(ctx context.Context) []int
- func (pas *PersonAddressSelect) Scan(ctx context.Context, v any) error
- func (s *PersonAddressSelect) ScanX(ctx context.Context, v any)
- func (s *PersonAddressSelect) String(ctx context.Context) (_ string, err error)
- func (s *PersonAddressSelect) StringX(ctx context.Context) string
- func (s *PersonAddressSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PersonAddressSelect) StringsX(ctx context.Context) []string
- type PersonAddressUpdate
- func (pau *PersonAddressUpdate) Exec(ctx context.Context) error
- func (pau *PersonAddressUpdate) ExecX(ctx context.Context)
- func (pau *PersonAddressUpdate) Mutation() *PersonAddressMutation
- func (pau *PersonAddressUpdate) Save(ctx context.Context) (int, error)
- func (pau *PersonAddressUpdate) SaveX(ctx context.Context) int
- func (pau *PersonAddressUpdate) SetUpdatedAt(t time.Time) *PersonAddressUpdate
- func (pau *PersonAddressUpdate) Where(ps ...predicate.PersonAddress) *PersonAddressUpdate
- type PersonAddressUpdateOne
- func (pauo *PersonAddressUpdateOne) Exec(ctx context.Context) error
- func (pauo *PersonAddressUpdateOne) ExecX(ctx context.Context)
- func (pauo *PersonAddressUpdateOne) Mutation() *PersonAddressMutation
- func (pauo *PersonAddressUpdateOne) Save(ctx context.Context) (*PersonAddress, error)
- func (pauo *PersonAddressUpdateOne) SaveX(ctx context.Context) *PersonAddress
- func (pauo *PersonAddressUpdateOne) Select(field string, fields ...string) *PersonAddressUpdateOne
- func (pauo *PersonAddressUpdateOne) SetUpdatedAt(t time.Time) *PersonAddressUpdateOne
- func (pauo *PersonAddressUpdateOne) Where(ps ...predicate.PersonAddress) *PersonAddressUpdateOne
- type PersonAddresses
- type PersonClient
- func (c *PersonClient) Create() *PersonCreate
- func (c *PersonClient) CreateBulk(builders ...*PersonCreate) *PersonCreateBulk
- func (c *PersonClient) Delete() *PersonDelete
- func (c *PersonClient) DeleteOne(pe *Person) *PersonDeleteOne
- func (c *PersonClient) DeleteOneID(id uuid.UUID) *PersonDeleteOne
- func (c *PersonClient) Get(ctx context.Context, id uuid.UUID) (*Person, error)
- func (c *PersonClient) GetX(ctx context.Context, id uuid.UUID) *Person
- func (c *PersonClient) Hooks() []Hook
- func (c *PersonClient) Intercept(interceptors ...Interceptor)
- func (c *PersonClient) Interceptors() []Interceptor
- func (c *PersonClient) MapCreateBulk(slice any, setFunc func(*PersonCreate, int)) *PersonCreateBulk
- func (c *PersonClient) Query() *PersonQuery
- func (c *PersonClient) QueryAddresses(pe *Person) *AddressQuery
- func (c *PersonClient) QueryPersonAddresses(pe *Person) *PersonAddressQuery
- func (c *PersonClient) QueryWorkUnit(pe *Person) *WorkUnitInfoQuery
- func (c *PersonClient) Update() *PersonUpdate
- func (c *PersonClient) UpdateOne(pe *Person) *PersonUpdateOne
- func (c *PersonClient) UpdateOneID(id uuid.UUID) *PersonUpdateOne
- func (c *PersonClient) Use(hooks ...Hook)
- type PersonCreate
- func (pc *PersonCreate) AddAddressIDs(ids ...uuid.UUID) *PersonCreate
- func (pc *PersonCreate) AddAddresses(a ...*Address) *PersonCreate
- func (pc *PersonCreate) Exec(ctx context.Context) error
- func (pc *PersonCreate) ExecX(ctx context.Context)
- func (pc *PersonCreate) Mutation() *PersonMutation
- func (pc *PersonCreate) Save(ctx context.Context) (*Person, error)
- func (pc *PersonCreate) SaveX(ctx context.Context) *Person
- func (pc *PersonCreate) SetAvatarURL(s string) *PersonCreate
- func (pc *PersonCreate) SetCreatedAt(t time.Time) *PersonCreate
- func (pc *PersonCreate) SetEmail(s string) *PersonCreate
- func (pc *PersonCreate) SetID(u uuid.UUID) *PersonCreate
- func (pc *PersonCreate) SetIsEmailVerified(b bool) *PersonCreate
- func (pc *PersonCreate) SetIsPhoneVerified(b bool) *PersonCreate
- func (pc *PersonCreate) SetName(s string) *PersonCreate
- func (pc *PersonCreate) SetNillableAvatarURL(s *string) *PersonCreate
- func (pc *PersonCreate) SetNillableCreatedAt(t *time.Time) *PersonCreate
- func (pc *PersonCreate) SetNillableID(u *uuid.UUID) *PersonCreate
- func (pc *PersonCreate) SetNillableIsEmailVerified(b *bool) *PersonCreate
- func (pc *PersonCreate) SetNillableIsPhoneVerified(b *bool) *PersonCreate
- func (pc *PersonCreate) SetNillablePhone(s *string) *PersonCreate
- func (pc *PersonCreate) SetNillableRole(pe *person.Role) *PersonCreate
- func (pc *PersonCreate) SetNillableUpdatedAt(t *time.Time) *PersonCreate
- func (pc *PersonCreate) SetNillableWorkUnitID(u *uuid.UUID) *PersonCreate
- func (pc *PersonCreate) SetPasswordHash(b []byte) *PersonCreate
- func (pc *PersonCreate) SetPhone(s string) *PersonCreate
- func (pc *PersonCreate) SetRole(pe person.Role) *PersonCreate
- func (pc *PersonCreate) SetUpdatedAt(t time.Time) *PersonCreate
- func (pc *PersonCreate) SetWorkUnit(w *WorkUnitInfo) *PersonCreate
- func (pc *PersonCreate) SetWorkUnitID(u uuid.UUID) *PersonCreate
- type PersonCreateBulk
- type PersonDelete
- type PersonDeleteOne
- type PersonEdges
- type PersonGroupBy
- func (pgb *PersonGroupBy) Aggregate(fns ...AggregateFunc) *PersonGroupBy
- func (s *PersonGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PersonGroupBy) BoolX(ctx context.Context) bool
- func (s *PersonGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PersonGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PersonGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PersonGroupBy) Float64X(ctx context.Context) float64
- func (s *PersonGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PersonGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PersonGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PersonGroupBy) IntX(ctx context.Context) int
- func (s *PersonGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PersonGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PersonGroupBy) Scan(ctx context.Context, v any) error
- func (s *PersonGroupBy) ScanX(ctx context.Context, v any)
- func (s *PersonGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PersonGroupBy) StringX(ctx context.Context) string
- func (s *PersonGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PersonGroupBy) StringsX(ctx context.Context) []string
- type PersonMutation
- func (m *PersonMutation) AddAddressIDs(ids ...uuid.UUID)
- func (m *PersonMutation) AddField(name string, value ent.Value) error
- func (m *PersonMutation) AddedEdges() []string
- func (m *PersonMutation) AddedField(name string) (ent.Value, bool)
- func (m *PersonMutation) AddedFields() []string
- func (m *PersonMutation) AddedIDs(name string) []ent.Value
- func (m *PersonMutation) AddressesCleared() bool
- func (m *PersonMutation) AddressesIDs() (ids []uuid.UUID)
- func (m *PersonMutation) AvatarURL() (r string, exists bool)
- func (m *PersonMutation) AvatarURLCleared() bool
- func (m *PersonMutation) ClearAddresses()
- func (m *PersonMutation) ClearAvatarURL()
- func (m *PersonMutation) ClearEdge(name string) error
- func (m *PersonMutation) ClearField(name string) error
- func (m *PersonMutation) ClearPasswordHash()
- func (m *PersonMutation) ClearPhone()
- func (m *PersonMutation) ClearWorkUnit()
- func (m *PersonMutation) ClearWorkUnitID()
- func (m *PersonMutation) ClearedEdges() []string
- func (m *PersonMutation) ClearedFields() []string
- func (m PersonMutation) Client() *Client
- func (m *PersonMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PersonMutation) EdgeCleared(name string) bool
- func (m *PersonMutation) Email() (r string, exists bool)
- func (m *PersonMutation) Field(name string) (ent.Value, bool)
- func (m *PersonMutation) FieldCleared(name string) bool
- func (m *PersonMutation) Fields() []string
- func (m *PersonMutation) ID() (id uuid.UUID, exists bool)
- func (m *PersonMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *PersonMutation) IsEmailVerified() (r bool, exists bool)
- func (m *PersonMutation) IsPhoneVerified() (r bool, exists bool)
- func (m *PersonMutation) Name() (r string, exists bool)
- func (m *PersonMutation) OldAvatarURL(ctx context.Context) (v *string, err error)
- func (m *PersonMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *PersonMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *PersonMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PersonMutation) OldIsEmailVerified(ctx context.Context) (v *bool, err error)
- func (m *PersonMutation) OldIsPhoneVerified(ctx context.Context) (v *bool, err error)
- func (m *PersonMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PersonMutation) OldPasswordHash(ctx context.Context) (v *[]byte, err error)
- func (m *PersonMutation) OldPhone(ctx context.Context) (v *string, err error)
- func (m *PersonMutation) OldRole(ctx context.Context) (v *person.Role, err error)
- func (m *PersonMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *PersonMutation) OldWorkUnitID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *PersonMutation) Op() Op
- func (m *PersonMutation) PasswordHash() (r []byte, exists bool)
- func (m *PersonMutation) PasswordHashCleared() bool
- func (m *PersonMutation) Phone() (r string, exists bool)
- func (m *PersonMutation) PhoneCleared() bool
- func (m *PersonMutation) RemoveAddressIDs(ids ...uuid.UUID)
- func (m *PersonMutation) RemovedAddressesIDs() (ids []uuid.UUID)
- func (m *PersonMutation) RemovedEdges() []string
- func (m *PersonMutation) RemovedIDs(name string) []ent.Value
- func (m *PersonMutation) ResetAddresses()
- func (m *PersonMutation) ResetAvatarURL()
- func (m *PersonMutation) ResetCreatedAt()
- func (m *PersonMutation) ResetEdge(name string) error
- func (m *PersonMutation) ResetEmail()
- func (m *PersonMutation) ResetField(name string) error
- func (m *PersonMutation) ResetIsEmailVerified()
- func (m *PersonMutation) ResetIsPhoneVerified()
- func (m *PersonMutation) ResetName()
- func (m *PersonMutation) ResetPasswordHash()
- func (m *PersonMutation) ResetPhone()
- func (m *PersonMutation) ResetRole()
- func (m *PersonMutation) ResetUpdatedAt()
- func (m *PersonMutation) ResetWorkUnit()
- func (m *PersonMutation) ResetWorkUnitID()
- func (m *PersonMutation) Role() (r person.Role, exists bool)
- func (m *PersonMutation) SetAvatarURL(s string)
- func (m *PersonMutation) SetCreatedAt(t time.Time)
- func (m *PersonMutation) SetEmail(s string)
- func (m *PersonMutation) SetField(name string, value ent.Value) error
- func (m *PersonMutation) SetID(id uuid.UUID)
- func (m *PersonMutation) SetIsEmailVerified(b bool)
- func (m *PersonMutation) SetIsPhoneVerified(b bool)
- func (m *PersonMutation) SetName(s string)
- func (m *PersonMutation) SetOp(op Op)
- func (m *PersonMutation) SetPasswordHash(b []byte)
- func (m *PersonMutation) SetPhone(s string)
- func (m *PersonMutation) SetRole(pe person.Role)
- func (m *PersonMutation) SetUpdatedAt(t time.Time)
- func (m *PersonMutation) SetWorkUnitID(u uuid.UUID)
- func (m PersonMutation) Tx() (*Tx, error)
- func (m *PersonMutation) Type() string
- func (m *PersonMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PersonMutation) Where(ps ...predicate.Person)
- func (m *PersonMutation) WhereP(ps ...func(*sql.Selector))
- func (m *PersonMutation) WorkUnitCleared() bool
- func (m *PersonMutation) WorkUnitID() (r uuid.UUID, exists bool)
- func (m *PersonMutation) WorkUnitIDCleared() bool
- func (m *PersonMutation) WorkUnitIDs() (ids []uuid.UUID)
- type PersonQuery
- func (pq *PersonQuery) Aggregate(fns ...AggregateFunc) *PersonSelect
- func (pq *PersonQuery) All(ctx context.Context) ([]*Person, error)
- func (pq *PersonQuery) AllX(ctx context.Context) []*Person
- func (pq *PersonQuery) Clone() *PersonQuery
- func (pq *PersonQuery) Count(ctx context.Context) (int, error)
- func (pq *PersonQuery) CountX(ctx context.Context) int
- func (pq *PersonQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PersonQuery) ExistX(ctx context.Context) bool
- func (pq *PersonQuery) First(ctx context.Context) (*Person, error)
- func (pq *PersonQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *PersonQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (pq *PersonQuery) FirstX(ctx context.Context) *Person
- func (pq *PersonQuery) GroupBy(field string, fields ...string) *PersonGroupBy
- func (pq *PersonQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (pq *PersonQuery) IDsX(ctx context.Context) []uuid.UUID
- func (pq *PersonQuery) Limit(limit int) *PersonQuery
- func (pq *PersonQuery) Offset(offset int) *PersonQuery
- func (pq *PersonQuery) Only(ctx context.Context) (*Person, error)
- func (pq *PersonQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (pq *PersonQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (pq *PersonQuery) OnlyX(ctx context.Context) *Person
- func (pq *PersonQuery) Order(o ...person.OrderOption) *PersonQuery
- func (pq *PersonQuery) QueryAddresses() *AddressQuery
- func (pq *PersonQuery) QueryPersonAddresses() *PersonAddressQuery
- func (pq *PersonQuery) QueryWorkUnit() *WorkUnitInfoQuery
- func (pq *PersonQuery) Select(fields ...string) *PersonSelect
- func (pq *PersonQuery) Unique(unique bool) *PersonQuery
- func (pq *PersonQuery) Where(ps ...predicate.Person) *PersonQuery
- func (pq *PersonQuery) WithAddresses(opts ...func(*AddressQuery)) *PersonQuery
- func (pq *PersonQuery) WithPersonAddresses(opts ...func(*PersonAddressQuery)) *PersonQuery
- func (pq *PersonQuery) WithWorkUnit(opts ...func(*WorkUnitInfoQuery)) *PersonQuery
- type PersonSelect
- func (ps *PersonSelect) Aggregate(fns ...AggregateFunc) *PersonSelect
- func (s *PersonSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PersonSelect) BoolX(ctx context.Context) bool
- func (s *PersonSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PersonSelect) BoolsX(ctx context.Context) []bool
- func (s *PersonSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PersonSelect) Float64X(ctx context.Context) float64
- func (s *PersonSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PersonSelect) Float64sX(ctx context.Context) []float64
- func (s *PersonSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PersonSelect) IntX(ctx context.Context) int
- func (s *PersonSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PersonSelect) IntsX(ctx context.Context) []int
- func (ps *PersonSelect) Scan(ctx context.Context, v any) error
- func (s *PersonSelect) ScanX(ctx context.Context, v any)
- func (s *PersonSelect) String(ctx context.Context) (_ string, err error)
- func (s *PersonSelect) StringX(ctx context.Context) string
- func (s *PersonSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PersonSelect) StringsX(ctx context.Context) []string
- type PersonUpdate
- func (pu *PersonUpdate) AddAddressIDs(ids ...uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) AddAddresses(a ...*Address) *PersonUpdate
- func (pu *PersonUpdate) ClearAddresses() *PersonUpdate
- func (pu *PersonUpdate) ClearAvatarURL() *PersonUpdate
- func (pu *PersonUpdate) ClearPasswordHash() *PersonUpdate
- func (pu *PersonUpdate) ClearPhone() *PersonUpdate
- func (pu *PersonUpdate) ClearWorkUnit() *PersonUpdate
- func (pu *PersonUpdate) ClearWorkUnitID() *PersonUpdate
- func (pu *PersonUpdate) Exec(ctx context.Context) error
- func (pu *PersonUpdate) ExecX(ctx context.Context)
- func (pu *PersonUpdate) Mutation() *PersonMutation
- func (pu *PersonUpdate) RemoveAddressIDs(ids ...uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) RemoveAddresses(a ...*Address) *PersonUpdate
- func (pu *PersonUpdate) Save(ctx context.Context) (int, error)
- func (pu *PersonUpdate) SaveX(ctx context.Context) int
- func (pu *PersonUpdate) SetAvatarURL(s string) *PersonUpdate
- func (pu *PersonUpdate) SetEmail(s string) *PersonUpdate
- func (pu *PersonUpdate) SetIsEmailVerified(b bool) *PersonUpdate
- func (pu *PersonUpdate) SetIsPhoneVerified(b bool) *PersonUpdate
- func (pu *PersonUpdate) SetName(s string) *PersonUpdate
- func (pu *PersonUpdate) SetNillableAvatarURL(s *string) *PersonUpdate
- func (pu *PersonUpdate) SetNillableEmail(s *string) *PersonUpdate
- func (pu *PersonUpdate) SetNillableIsEmailVerified(b *bool) *PersonUpdate
- func (pu *PersonUpdate) SetNillableIsPhoneVerified(b *bool) *PersonUpdate
- func (pu *PersonUpdate) SetNillableName(s *string) *PersonUpdate
- func (pu *PersonUpdate) SetNillablePhone(s *string) *PersonUpdate
- func (pu *PersonUpdate) SetNillableRole(pe *person.Role) *PersonUpdate
- func (pu *PersonUpdate) SetNillableWorkUnitID(u *uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) SetPasswordHash(b []byte) *PersonUpdate
- func (pu *PersonUpdate) SetPhone(s string) *PersonUpdate
- func (pu *PersonUpdate) SetRole(pe person.Role) *PersonUpdate
- func (pu *PersonUpdate) SetUpdatedAt(t time.Time) *PersonUpdate
- func (pu *PersonUpdate) SetWorkUnit(w *WorkUnitInfo) *PersonUpdate
- func (pu *PersonUpdate) SetWorkUnitID(u uuid.UUID) *PersonUpdate
- func (pu *PersonUpdate) Where(ps ...predicate.Person) *PersonUpdate
- type PersonUpdateOne
- func (puo *PersonUpdateOne) AddAddressIDs(ids ...uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) AddAddresses(a ...*Address) *PersonUpdateOne
- func (puo *PersonUpdateOne) ClearAddresses() *PersonUpdateOne
- func (puo *PersonUpdateOne) ClearAvatarURL() *PersonUpdateOne
- func (puo *PersonUpdateOne) ClearPasswordHash() *PersonUpdateOne
- func (puo *PersonUpdateOne) ClearPhone() *PersonUpdateOne
- func (puo *PersonUpdateOne) ClearWorkUnit() *PersonUpdateOne
- func (puo *PersonUpdateOne) ClearWorkUnitID() *PersonUpdateOne
- func (puo *PersonUpdateOne) Exec(ctx context.Context) error
- func (puo *PersonUpdateOne) ExecX(ctx context.Context)
- func (puo *PersonUpdateOne) Mutation() *PersonMutation
- func (puo *PersonUpdateOne) RemoveAddressIDs(ids ...uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) RemoveAddresses(a ...*Address) *PersonUpdateOne
- func (puo *PersonUpdateOne) Save(ctx context.Context) (*Person, error)
- func (puo *PersonUpdateOne) SaveX(ctx context.Context) *Person
- func (puo *PersonUpdateOne) Select(field string, fields ...string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetAvatarURL(s string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetEmail(s string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetIsEmailVerified(b bool) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetIsPhoneVerified(b bool) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetName(s string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableAvatarURL(s *string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableEmail(s *string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableIsEmailVerified(b *bool) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableIsPhoneVerified(b *bool) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableName(s *string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillablePhone(s *string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableRole(pe *person.Role) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetNillableWorkUnitID(u *uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetPasswordHash(b []byte) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetPhone(s string) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetRole(pe person.Role) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetUpdatedAt(t time.Time) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetWorkUnit(w *WorkUnitInfo) *PersonUpdateOne
- func (puo *PersonUpdateOne) SetWorkUnitID(u uuid.UUID) *PersonUpdateOne
- func (puo *PersonUpdateOne) Where(ps ...predicate.Person) *PersonUpdateOne
- type Persons
- type Policy
- type ProductColor
- type ProductColorClient
- func (c *ProductColorClient) Create() *ProductColorCreate
- func (c *ProductColorClient) CreateBulk(builders ...*ProductColorCreate) *ProductColorCreateBulk
- func (c *ProductColorClient) Delete() *ProductColorDelete
- func (c *ProductColorClient) DeleteOne(pc *ProductColor) *ProductColorDeleteOne
- func (c *ProductColorClient) DeleteOneID(id string) *ProductColorDeleteOne
- func (c *ProductColorClient) Get(ctx context.Context, id string) (*ProductColor, error)
- func (c *ProductColorClient) GetX(ctx context.Context, id string) *ProductColor
- func (c *ProductColorClient) Hooks() []Hook
- func (c *ProductColorClient) Intercept(interceptors ...Interceptor)
- func (c *ProductColorClient) Interceptors() []Interceptor
- func (c *ProductColorClient) MapCreateBulk(slice any, setFunc func(*ProductColorCreate, int)) *ProductColorCreateBulk
- func (c *ProductColorClient) Query() *ProductColorQuery
- func (c *ProductColorClient) Update() *ProductColorUpdate
- func (c *ProductColorClient) UpdateOne(pc *ProductColor) *ProductColorUpdateOne
- func (c *ProductColorClient) UpdateOneID(id string) *ProductColorUpdateOne
- func (c *ProductColorClient) Use(hooks ...Hook)
- type ProductColorCreate
- func (pcc *ProductColorCreate) Exec(ctx context.Context) error
- func (pcc *ProductColorCreate) ExecX(ctx context.Context)
- func (pcc *ProductColorCreate) Mutation() *ProductColorMutation
- func (pcc *ProductColorCreate) Save(ctx context.Context) (*ProductColor, error)
- func (pcc *ProductColorCreate) SaveX(ctx context.Context) *ProductColor
- func (pcc *ProductColorCreate) SetColorCode(s string) *ProductColorCreate
- func (pcc *ProductColorCreate) SetCreatedAt(t time.Time) *ProductColorCreate
- func (pcc *ProductColorCreate) SetID(s string) *ProductColorCreate
- func (pcc *ProductColorCreate) SetName(s string) *ProductColorCreate
- func (pcc *ProductColorCreate) SetNillableCreatedAt(t *time.Time) *ProductColorCreate
- func (pcc *ProductColorCreate) SetNillableUpdatedAt(t *time.Time) *ProductColorCreate
- func (pcc *ProductColorCreate) SetUpdatedAt(t time.Time) *ProductColorCreate
- type ProductColorCreateBulk
- type ProductColorDelete
- type ProductColorDeleteOne
- type ProductColorGroupBy
- func (pcgb *ProductColorGroupBy) Aggregate(fns ...AggregateFunc) *ProductColorGroupBy
- func (s *ProductColorGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductColorGroupBy) BoolX(ctx context.Context) bool
- func (s *ProductColorGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductColorGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProductColorGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductColorGroupBy) Float64X(ctx context.Context) float64
- func (s *ProductColorGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductColorGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProductColorGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProductColorGroupBy) IntX(ctx context.Context) int
- func (s *ProductColorGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProductColorGroupBy) IntsX(ctx context.Context) []int
- func (pcgb *ProductColorGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProductColorGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProductColorGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProductColorGroupBy) StringX(ctx context.Context) string
- func (s *ProductColorGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProductColorGroupBy) StringsX(ctx context.Context) []string
- type ProductColorMutation
- func (m *ProductColorMutation) AddField(name string, value ent.Value) error
- func (m *ProductColorMutation) AddedEdges() []string
- func (m *ProductColorMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProductColorMutation) AddedFields() []string
- func (m *ProductColorMutation) AddedIDs(name string) []ent.Value
- func (m *ProductColorMutation) ClearEdge(name string) error
- func (m *ProductColorMutation) ClearField(name string) error
- func (m *ProductColorMutation) ClearedEdges() []string
- func (m *ProductColorMutation) ClearedFields() []string
- func (m ProductColorMutation) Client() *Client
- func (m *ProductColorMutation) ColorCode() (r string, exists bool)
- func (m *ProductColorMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ProductColorMutation) EdgeCleared(name string) bool
- func (m *ProductColorMutation) Field(name string) (ent.Value, bool)
- func (m *ProductColorMutation) FieldCleared(name string) bool
- func (m *ProductColorMutation) Fields() []string
- func (m *ProductColorMutation) ID() (id string, exists bool)
- func (m *ProductColorMutation) IDs(ctx context.Context) ([]string, error)
- func (m *ProductColorMutation) Name() (r string, exists bool)
- func (m *ProductColorMutation) OldColorCode(ctx context.Context) (v string, err error)
- func (m *ProductColorMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ProductColorMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProductColorMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ProductColorMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ProductColorMutation) Op() Op
- func (m *ProductColorMutation) RemovedEdges() []string
- func (m *ProductColorMutation) RemovedIDs(name string) []ent.Value
- func (m *ProductColorMutation) ResetColorCode()
- func (m *ProductColorMutation) ResetCreatedAt()
- func (m *ProductColorMutation) ResetEdge(name string) error
- func (m *ProductColorMutation) ResetField(name string) error
- func (m *ProductColorMutation) ResetName()
- func (m *ProductColorMutation) ResetUpdatedAt()
- func (m *ProductColorMutation) SetColorCode(s string)
- func (m *ProductColorMutation) SetCreatedAt(t time.Time)
- func (m *ProductColorMutation) SetField(name string, value ent.Value) error
- func (m *ProductColorMutation) SetID(id string)
- func (m *ProductColorMutation) SetName(s string)
- func (m *ProductColorMutation) SetOp(op Op)
- func (m *ProductColorMutation) SetUpdatedAt(t time.Time)
- func (m ProductColorMutation) Tx() (*Tx, error)
- func (m *ProductColorMutation) Type() string
- func (m *ProductColorMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ProductColorMutation) Where(ps ...predicate.ProductColor)
- func (m *ProductColorMutation) WhereP(ps ...func(*sql.Selector))
- type ProductColorQuery
- func (pcq *ProductColorQuery) Aggregate(fns ...AggregateFunc) *ProductColorSelect
- func (pcq *ProductColorQuery) All(ctx context.Context) ([]*ProductColor, error)
- func (pcq *ProductColorQuery) AllX(ctx context.Context) []*ProductColor
- func (pcq *ProductColorQuery) Clone() *ProductColorQuery
- func (pcq *ProductColorQuery) Count(ctx context.Context) (int, error)
- func (pcq *ProductColorQuery) CountX(ctx context.Context) int
- func (pcq *ProductColorQuery) Exist(ctx context.Context) (bool, error)
- func (pcq *ProductColorQuery) ExistX(ctx context.Context) bool
- func (pcq *ProductColorQuery) First(ctx context.Context) (*ProductColor, error)
- func (pcq *ProductColorQuery) FirstID(ctx context.Context) (id string, err error)
- func (pcq *ProductColorQuery) FirstIDX(ctx context.Context) string
- func (pcq *ProductColorQuery) FirstX(ctx context.Context) *ProductColor
- func (pcq *ProductColorQuery) GroupBy(field string, fields ...string) *ProductColorGroupBy
- func (pcq *ProductColorQuery) IDs(ctx context.Context) (ids []string, err error)
- func (pcq *ProductColorQuery) IDsX(ctx context.Context) []string
- func (pcq *ProductColorQuery) Limit(limit int) *ProductColorQuery
- func (pcq *ProductColorQuery) Offset(offset int) *ProductColorQuery
- func (pcq *ProductColorQuery) Only(ctx context.Context) (*ProductColor, error)
- func (pcq *ProductColorQuery) OnlyID(ctx context.Context) (id string, err error)
- func (pcq *ProductColorQuery) OnlyIDX(ctx context.Context) string
- func (pcq *ProductColorQuery) OnlyX(ctx context.Context) *ProductColor
- func (pcq *ProductColorQuery) Order(o ...productcolor.OrderOption) *ProductColorQuery
- func (pcq *ProductColorQuery) Select(fields ...string) *ProductColorSelect
- func (pcq *ProductColorQuery) Unique(unique bool) *ProductColorQuery
- func (pcq *ProductColorQuery) Where(ps ...predicate.ProductColor) *ProductColorQuery
- type ProductColorSelect
- func (pcs *ProductColorSelect) Aggregate(fns ...AggregateFunc) *ProductColorSelect
- func (s *ProductColorSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductColorSelect) BoolX(ctx context.Context) bool
- func (s *ProductColorSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductColorSelect) BoolsX(ctx context.Context) []bool
- func (s *ProductColorSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductColorSelect) Float64X(ctx context.Context) float64
- func (s *ProductColorSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductColorSelect) Float64sX(ctx context.Context) []float64
- func (s *ProductColorSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProductColorSelect) IntX(ctx context.Context) int
- func (s *ProductColorSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProductColorSelect) IntsX(ctx context.Context) []int
- func (pcs *ProductColorSelect) Scan(ctx context.Context, v any) error
- func (s *ProductColorSelect) ScanX(ctx context.Context, v any)
- func (s *ProductColorSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProductColorSelect) StringX(ctx context.Context) string
- func (s *ProductColorSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProductColorSelect) StringsX(ctx context.Context) []string
- type ProductColorUpdate
- func (pcu *ProductColorUpdate) Exec(ctx context.Context) error
- func (pcu *ProductColorUpdate) ExecX(ctx context.Context)
- func (pcu *ProductColorUpdate) Mutation() *ProductColorMutation
- func (pcu *ProductColorUpdate) Save(ctx context.Context) (int, error)
- func (pcu *ProductColorUpdate) SaveX(ctx context.Context) int
- func (pcu *ProductColorUpdate) SetColorCode(s string) *ProductColorUpdate
- func (pcu *ProductColorUpdate) SetName(s string) *ProductColorUpdate
- func (pcu *ProductColorUpdate) SetNillableColorCode(s *string) *ProductColorUpdate
- func (pcu *ProductColorUpdate) SetNillableName(s *string) *ProductColorUpdate
- func (pcu *ProductColorUpdate) SetUpdatedAt(t time.Time) *ProductColorUpdate
- func (pcu *ProductColorUpdate) Where(ps ...predicate.ProductColor) *ProductColorUpdate
- type ProductColorUpdateOne
- func (pcuo *ProductColorUpdateOne) Exec(ctx context.Context) error
- func (pcuo *ProductColorUpdateOne) ExecX(ctx context.Context)
- func (pcuo *ProductColorUpdateOne) Mutation() *ProductColorMutation
- func (pcuo *ProductColorUpdateOne) Save(ctx context.Context) (*ProductColor, error)
- func (pcuo *ProductColorUpdateOne) SaveX(ctx context.Context) *ProductColor
- func (pcuo *ProductColorUpdateOne) Select(field string, fields ...string) *ProductColorUpdateOne
- func (pcuo *ProductColorUpdateOne) SetColorCode(s string) *ProductColorUpdateOne
- func (pcuo *ProductColorUpdateOne) SetName(s string) *ProductColorUpdateOne
- func (pcuo *ProductColorUpdateOne) SetNillableColorCode(s *string) *ProductColorUpdateOne
- func (pcuo *ProductColorUpdateOne) SetNillableName(s *string) *ProductColorUpdateOne
- func (pcuo *ProductColorUpdateOne) SetUpdatedAt(t time.Time) *ProductColorUpdateOne
- func (pcuo *ProductColorUpdateOne) Where(ps ...predicate.ProductColor) *ProductColorUpdateOne
- type ProductColors
- type ProductImage
- type ProductImageClient
- func (c *ProductImageClient) Create() *ProductImageCreate
- func (c *ProductImageClient) CreateBulk(builders ...*ProductImageCreate) *ProductImageCreateBulk
- func (c *ProductImageClient) Delete() *ProductImageDelete
- func (c *ProductImageClient) DeleteOne(pi *ProductImage) *ProductImageDeleteOne
- func (c *ProductImageClient) DeleteOneID(id uuid.UUID) *ProductImageDeleteOne
- func (c *ProductImageClient) Get(ctx context.Context, id uuid.UUID) (*ProductImage, error)
- func (c *ProductImageClient) GetX(ctx context.Context, id uuid.UUID) *ProductImage
- func (c *ProductImageClient) Hooks() []Hook
- func (c *ProductImageClient) Intercept(interceptors ...Interceptor)
- func (c *ProductImageClient) Interceptors() []Interceptor
- func (c *ProductImageClient) MapCreateBulk(slice any, setFunc func(*ProductImageCreate, int)) *ProductImageCreateBulk
- func (c *ProductImageClient) Query() *ProductImageQuery
- func (c *ProductImageClient) QueryProduct(pi *ProductImage) *ProductInfoQuery
- func (c *ProductImageClient) Update() *ProductImageUpdate
- func (c *ProductImageClient) UpdateOne(pi *ProductImage) *ProductImageUpdateOne
- func (c *ProductImageClient) UpdateOneID(id uuid.UUID) *ProductImageUpdateOne
- func (c *ProductImageClient) Use(hooks ...Hook)
- type ProductImageCreate
- func (pic *ProductImageCreate) Exec(ctx context.Context) error
- func (pic *ProductImageCreate) ExecX(ctx context.Context)
- func (pic *ProductImageCreate) Mutation() *ProductImageMutation
- func (pic *ProductImageCreate) Save(ctx context.Context) (*ProductImage, error)
- func (pic *ProductImageCreate) SaveX(ctx context.Context) *ProductImage
- func (pic *ProductImageCreate) SetCreatedAt(t time.Time) *ProductImageCreate
- func (pic *ProductImageCreate) SetID(u uuid.UUID) *ProductImageCreate
- func (pic *ProductImageCreate) SetImageURL(s string) *ProductImageCreate
- func (pic *ProductImageCreate) SetNillableCreatedAt(t *time.Time) *ProductImageCreate
- func (pic *ProductImageCreate) SetNillableID(u *uuid.UUID) *ProductImageCreate
- func (pic *ProductImageCreate) SetNillableUpdatedAt(t *time.Time) *ProductImageCreate
- func (pic *ProductImageCreate) SetProduct(p *ProductInfo) *ProductImageCreate
- func (pic *ProductImageCreate) SetProductID(s string) *ProductImageCreate
- func (pic *ProductImageCreate) SetUpdatedAt(t time.Time) *ProductImageCreate
- type ProductImageCreateBulk
- type ProductImageDelete
- type ProductImageDeleteOne
- type ProductImageEdges
- type ProductImageGroupBy
- func (pigb *ProductImageGroupBy) Aggregate(fns ...AggregateFunc) *ProductImageGroupBy
- func (s *ProductImageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductImageGroupBy) BoolX(ctx context.Context) bool
- func (s *ProductImageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductImageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProductImageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductImageGroupBy) Float64X(ctx context.Context) float64
- func (s *ProductImageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductImageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProductImageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProductImageGroupBy) IntX(ctx context.Context) int
- func (s *ProductImageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProductImageGroupBy) IntsX(ctx context.Context) []int
- func (pigb *ProductImageGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProductImageGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProductImageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProductImageGroupBy) StringX(ctx context.Context) string
- func (s *ProductImageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProductImageGroupBy) StringsX(ctx context.Context) []string
- type ProductImageMutation
- func (m *ProductImageMutation) AddField(name string, value ent.Value) error
- func (m *ProductImageMutation) AddedEdges() []string
- func (m *ProductImageMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProductImageMutation) AddedFields() []string
- func (m *ProductImageMutation) AddedIDs(name string) []ent.Value
- func (m *ProductImageMutation) ClearEdge(name string) error
- func (m *ProductImageMutation) ClearField(name string) error
- func (m *ProductImageMutation) ClearProduct()
- func (m *ProductImageMutation) ClearedEdges() []string
- func (m *ProductImageMutation) ClearedFields() []string
- func (m ProductImageMutation) Client() *Client
- func (m *ProductImageMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ProductImageMutation) EdgeCleared(name string) bool
- func (m *ProductImageMutation) Field(name string) (ent.Value, bool)
- func (m *ProductImageMutation) FieldCleared(name string) bool
- func (m *ProductImageMutation) Fields() []string
- func (m *ProductImageMutation) ID() (id uuid.UUID, exists bool)
- func (m *ProductImageMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ProductImageMutation) ImageURL() (r string, exists bool)
- func (m *ProductImageMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ProductImageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProductImageMutation) OldImageURL(ctx context.Context) (v string, err error)
- func (m *ProductImageMutation) OldProductID(ctx context.Context) (v string, err error)
- func (m *ProductImageMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ProductImageMutation) Op() Op
- func (m *ProductImageMutation) ProductCleared() bool
- func (m *ProductImageMutation) ProductID() (r string, exists bool)
- func (m *ProductImageMutation) ProductIDs() (ids []string)
- func (m *ProductImageMutation) RemovedEdges() []string
- func (m *ProductImageMutation) RemovedIDs(name string) []ent.Value
- func (m *ProductImageMutation) ResetCreatedAt()
- func (m *ProductImageMutation) ResetEdge(name string) error
- func (m *ProductImageMutation) ResetField(name string) error
- func (m *ProductImageMutation) ResetImageURL()
- func (m *ProductImageMutation) ResetProduct()
- func (m *ProductImageMutation) ResetProductID()
- func (m *ProductImageMutation) ResetUpdatedAt()
- func (m *ProductImageMutation) SetCreatedAt(t time.Time)
- func (m *ProductImageMutation) SetField(name string, value ent.Value) error
- func (m *ProductImageMutation) SetID(id uuid.UUID)
- func (m *ProductImageMutation) SetImageURL(s string)
- func (m *ProductImageMutation) SetOp(op Op)
- func (m *ProductImageMutation) SetProductID(s string)
- func (m *ProductImageMutation) SetUpdatedAt(t time.Time)
- func (m ProductImageMutation) Tx() (*Tx, error)
- func (m *ProductImageMutation) Type() string
- func (m *ProductImageMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ProductImageMutation) Where(ps ...predicate.ProductImage)
- func (m *ProductImageMutation) WhereP(ps ...func(*sql.Selector))
- type ProductImageQuery
- func (piq *ProductImageQuery) Aggregate(fns ...AggregateFunc) *ProductImageSelect
- func (piq *ProductImageQuery) All(ctx context.Context) ([]*ProductImage, error)
- func (piq *ProductImageQuery) AllX(ctx context.Context) []*ProductImage
- func (piq *ProductImageQuery) Clone() *ProductImageQuery
- func (piq *ProductImageQuery) Count(ctx context.Context) (int, error)
- func (piq *ProductImageQuery) CountX(ctx context.Context) int
- func (piq *ProductImageQuery) Exist(ctx context.Context) (bool, error)
- func (piq *ProductImageQuery) ExistX(ctx context.Context) bool
- func (piq *ProductImageQuery) First(ctx context.Context) (*ProductImage, error)
- func (piq *ProductImageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (piq *ProductImageQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (piq *ProductImageQuery) FirstX(ctx context.Context) *ProductImage
- func (piq *ProductImageQuery) GroupBy(field string, fields ...string) *ProductImageGroupBy
- func (piq *ProductImageQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (piq *ProductImageQuery) IDsX(ctx context.Context) []uuid.UUID
- func (piq *ProductImageQuery) Limit(limit int) *ProductImageQuery
- func (piq *ProductImageQuery) Offset(offset int) *ProductImageQuery
- func (piq *ProductImageQuery) Only(ctx context.Context) (*ProductImage, error)
- func (piq *ProductImageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (piq *ProductImageQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (piq *ProductImageQuery) OnlyX(ctx context.Context) *ProductImage
- func (piq *ProductImageQuery) Order(o ...productimage.OrderOption) *ProductImageQuery
- func (piq *ProductImageQuery) QueryProduct() *ProductInfoQuery
- func (piq *ProductImageQuery) Select(fields ...string) *ProductImageSelect
- func (piq *ProductImageQuery) Unique(unique bool) *ProductImageQuery
- func (piq *ProductImageQuery) Where(ps ...predicate.ProductImage) *ProductImageQuery
- func (piq *ProductImageQuery) WithProduct(opts ...func(*ProductInfoQuery)) *ProductImageQuery
- type ProductImageSelect
- func (pis *ProductImageSelect) Aggregate(fns ...AggregateFunc) *ProductImageSelect
- func (s *ProductImageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductImageSelect) BoolX(ctx context.Context) bool
- func (s *ProductImageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductImageSelect) BoolsX(ctx context.Context) []bool
- func (s *ProductImageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductImageSelect) Float64X(ctx context.Context) float64
- func (s *ProductImageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductImageSelect) Float64sX(ctx context.Context) []float64
- func (s *ProductImageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProductImageSelect) IntX(ctx context.Context) int
- func (s *ProductImageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProductImageSelect) IntsX(ctx context.Context) []int
- func (pis *ProductImageSelect) Scan(ctx context.Context, v any) error
- func (s *ProductImageSelect) ScanX(ctx context.Context, v any)
- func (s *ProductImageSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProductImageSelect) StringX(ctx context.Context) string
- func (s *ProductImageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProductImageSelect) StringsX(ctx context.Context) []string
- type ProductImageUpdate
- func (piu *ProductImageUpdate) Exec(ctx context.Context) error
- func (piu *ProductImageUpdate) ExecX(ctx context.Context)
- func (piu *ProductImageUpdate) Mutation() *ProductImageMutation
- func (piu *ProductImageUpdate) Save(ctx context.Context) (int, error)
- func (piu *ProductImageUpdate) SaveX(ctx context.Context) int
- func (piu *ProductImageUpdate) SetUpdatedAt(t time.Time) *ProductImageUpdate
- func (piu *ProductImageUpdate) Where(ps ...predicate.ProductImage) *ProductImageUpdate
- type ProductImageUpdateOne
- func (piuo *ProductImageUpdateOne) Exec(ctx context.Context) error
- func (piuo *ProductImageUpdateOne) ExecX(ctx context.Context)
- func (piuo *ProductImageUpdateOne) Mutation() *ProductImageMutation
- func (piuo *ProductImageUpdateOne) Save(ctx context.Context) (*ProductImage, error)
- func (piuo *ProductImageUpdateOne) SaveX(ctx context.Context) *ProductImage
- func (piuo *ProductImageUpdateOne) Select(field string, fields ...string) *ProductImageUpdateOne
- func (piuo *ProductImageUpdateOne) SetUpdatedAt(t time.Time) *ProductImageUpdateOne
- func (piuo *ProductImageUpdateOne) Where(ps ...predicate.ProductImage) *ProductImageUpdateOne
- type ProductImages
- type ProductInfo
- func (pi *ProductInfo) QueryProductTags() *ProductTagQuery
- func (pi *ProductInfo) QueryTags() *TagQuery
- func (pi *ProductInfo) String() string
- func (pi *ProductInfo) Unwrap() *ProductInfo
- func (pi *ProductInfo) Update() *ProductInfoUpdateOne
- func (pi *ProductInfo) Value(name string) (ent.Value, error)
- type ProductInfoClient
- func (c *ProductInfoClient) Create() *ProductInfoCreate
- func (c *ProductInfoClient) CreateBulk(builders ...*ProductInfoCreate) *ProductInfoCreateBulk
- func (c *ProductInfoClient) Delete() *ProductInfoDelete
- func (c *ProductInfoClient) DeleteOne(pi *ProductInfo) *ProductInfoDeleteOne
- func (c *ProductInfoClient) DeleteOneID(id string) *ProductInfoDeleteOne
- func (c *ProductInfoClient) Get(ctx context.Context, id string) (*ProductInfo, error)
- func (c *ProductInfoClient) GetX(ctx context.Context, id string) *ProductInfo
- func (c *ProductInfoClient) Hooks() []Hook
- func (c *ProductInfoClient) Intercept(interceptors ...Interceptor)
- func (c *ProductInfoClient) Interceptors() []Interceptor
- func (c *ProductInfoClient) MapCreateBulk(slice any, setFunc func(*ProductInfoCreate, int)) *ProductInfoCreateBulk
- func (c *ProductInfoClient) Query() *ProductInfoQuery
- func (c *ProductInfoClient) QueryProductTags(pi *ProductInfo) *ProductTagQuery
- func (c *ProductInfoClient) QueryTags(pi *ProductInfo) *TagQuery
- func (c *ProductInfoClient) Update() *ProductInfoUpdate
- func (c *ProductInfoClient) UpdateOne(pi *ProductInfo) *ProductInfoUpdateOne
- func (c *ProductInfoClient) UpdateOneID(id string) *ProductInfoUpdateOne
- func (c *ProductInfoClient) Use(hooks ...Hook)
- type ProductInfoCreate
- func (pic *ProductInfoCreate) AddTagIDs(ids ...string) *ProductInfoCreate
- func (pic *ProductInfoCreate) AddTags(t ...*Tag) *ProductInfoCreate
- func (pic *ProductInfoCreate) Exec(ctx context.Context) error
- func (pic *ProductInfoCreate) ExecX(ctx context.Context)
- func (pic *ProductInfoCreate) Mutation() *ProductInfoMutation
- func (pic *ProductInfoCreate) Save(ctx context.Context) (*ProductInfo, error)
- func (pic *ProductInfoCreate) SaveX(ctx context.Context) *ProductInfo
- func (pic *ProductInfoCreate) SetCreatedAt(t time.Time) *ProductInfoCreate
- func (pic *ProductInfoCreate) SetDescription(s string) *ProductInfoCreate
- func (pic *ProductInfoCreate) SetID(s string) *ProductInfoCreate
- func (pic *ProductInfoCreate) SetName(s string) *ProductInfoCreate
- func (pic *ProductInfoCreate) SetNillableCreatedAt(t *time.Time) *ProductInfoCreate
- func (pic *ProductInfoCreate) SetNillableDescription(s *string) *ProductInfoCreate
- func (pic *ProductInfoCreate) SetNillableProvider(s *string) *ProductInfoCreate
- func (pic *ProductInfoCreate) SetNillableUpdatedAt(t *time.Time) *ProductInfoCreate
- func (pic *ProductInfoCreate) SetNillableYear(i *int) *ProductInfoCreate
- func (pic *ProductInfoCreate) SetProvider(s string) *ProductInfoCreate
- func (pic *ProductInfoCreate) SetUpdatedAt(t time.Time) *ProductInfoCreate
- func (pic *ProductInfoCreate) SetYear(i int) *ProductInfoCreate
- type ProductInfoCreateBulk
- type ProductInfoDelete
- type ProductInfoDeleteOne
- type ProductInfoEdges
- type ProductInfoGroupBy
- func (pigb *ProductInfoGroupBy) Aggregate(fns ...AggregateFunc) *ProductInfoGroupBy
- func (s *ProductInfoGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductInfoGroupBy) BoolX(ctx context.Context) bool
- func (s *ProductInfoGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductInfoGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProductInfoGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductInfoGroupBy) Float64X(ctx context.Context) float64
- func (s *ProductInfoGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductInfoGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProductInfoGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProductInfoGroupBy) IntX(ctx context.Context) int
- func (s *ProductInfoGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProductInfoGroupBy) IntsX(ctx context.Context) []int
- func (pigb *ProductInfoGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProductInfoGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProductInfoGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProductInfoGroupBy) StringX(ctx context.Context) string
- func (s *ProductInfoGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProductInfoGroupBy) StringsX(ctx context.Context) []string
- type ProductInfoMutation
- func (m *ProductInfoMutation) AddField(name string, value ent.Value) error
- func (m *ProductInfoMutation) AddTagIDs(ids ...string)
- func (m *ProductInfoMutation) AddYear(i int)
- func (m *ProductInfoMutation) AddedEdges() []string
- func (m *ProductInfoMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProductInfoMutation) AddedFields() []string
- func (m *ProductInfoMutation) AddedIDs(name string) []ent.Value
- func (m *ProductInfoMutation) AddedYear() (r int, exists bool)
- func (m *ProductInfoMutation) ClearDescription()
- func (m *ProductInfoMutation) ClearEdge(name string) error
- func (m *ProductInfoMutation) ClearField(name string) error
- func (m *ProductInfoMutation) ClearProvider()
- func (m *ProductInfoMutation) ClearTags()
- func (m *ProductInfoMutation) ClearYear()
- func (m *ProductInfoMutation) ClearedEdges() []string
- func (m *ProductInfoMutation) ClearedFields() []string
- func (m ProductInfoMutation) Client() *Client
- func (m *ProductInfoMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ProductInfoMutation) Description() (r string, exists bool)
- func (m *ProductInfoMutation) DescriptionCleared() bool
- func (m *ProductInfoMutation) EdgeCleared(name string) bool
- func (m *ProductInfoMutation) Field(name string) (ent.Value, bool)
- func (m *ProductInfoMutation) FieldCleared(name string) bool
- func (m *ProductInfoMutation) Fields() []string
- func (m *ProductInfoMutation) ID() (id string, exists bool)
- func (m *ProductInfoMutation) IDs(ctx context.Context) ([]string, error)
- func (m *ProductInfoMutation) Name() (r string, exists bool)
- func (m *ProductInfoMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ProductInfoMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *ProductInfoMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProductInfoMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ProductInfoMutation) OldProvider(ctx context.Context) (v *string, err error)
- func (m *ProductInfoMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ProductInfoMutation) OldYear(ctx context.Context) (v *int, err error)
- func (m *ProductInfoMutation) Op() Op
- func (m *ProductInfoMutation) Provider() (r string, exists bool)
- func (m *ProductInfoMutation) ProviderCleared() bool
- func (m *ProductInfoMutation) RemoveTagIDs(ids ...string)
- func (m *ProductInfoMutation) RemovedEdges() []string
- func (m *ProductInfoMutation) RemovedIDs(name string) []ent.Value
- func (m *ProductInfoMutation) RemovedTagsIDs() (ids []string)
- func (m *ProductInfoMutation) ResetCreatedAt()
- func (m *ProductInfoMutation) ResetDescription()
- func (m *ProductInfoMutation) ResetEdge(name string) error
- func (m *ProductInfoMutation) ResetField(name string) error
- func (m *ProductInfoMutation) ResetName()
- func (m *ProductInfoMutation) ResetProvider()
- func (m *ProductInfoMutation) ResetTags()
- func (m *ProductInfoMutation) ResetUpdatedAt()
- func (m *ProductInfoMutation) ResetYear()
- func (m *ProductInfoMutation) SetCreatedAt(t time.Time)
- func (m *ProductInfoMutation) SetDescription(s string)
- func (m *ProductInfoMutation) SetField(name string, value ent.Value) error
- func (m *ProductInfoMutation) SetID(id string)
- func (m *ProductInfoMutation) SetName(s string)
- func (m *ProductInfoMutation) SetOp(op Op)
- func (m *ProductInfoMutation) SetProvider(s string)
- func (m *ProductInfoMutation) SetUpdatedAt(t time.Time)
- func (m *ProductInfoMutation) SetYear(i int)
- func (m *ProductInfoMutation) TagsCleared() bool
- func (m *ProductInfoMutation) TagsIDs() (ids []string)
- func (m ProductInfoMutation) Tx() (*Tx, error)
- func (m *ProductInfoMutation) Type() string
- func (m *ProductInfoMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ProductInfoMutation) Where(ps ...predicate.ProductInfo)
- func (m *ProductInfoMutation) WhereP(ps ...func(*sql.Selector))
- func (m *ProductInfoMutation) Year() (r int, exists bool)
- func (m *ProductInfoMutation) YearCleared() bool
- type ProductInfoQuery
- func (piq *ProductInfoQuery) Aggregate(fns ...AggregateFunc) *ProductInfoSelect
- func (piq *ProductInfoQuery) All(ctx context.Context) ([]*ProductInfo, error)
- func (piq *ProductInfoQuery) AllX(ctx context.Context) []*ProductInfo
- func (piq *ProductInfoQuery) Clone() *ProductInfoQuery
- func (piq *ProductInfoQuery) Count(ctx context.Context) (int, error)
- func (piq *ProductInfoQuery) CountX(ctx context.Context) int
- func (piq *ProductInfoQuery) Exist(ctx context.Context) (bool, error)
- func (piq *ProductInfoQuery) ExistX(ctx context.Context) bool
- func (piq *ProductInfoQuery) First(ctx context.Context) (*ProductInfo, error)
- func (piq *ProductInfoQuery) FirstID(ctx context.Context) (id string, err error)
- func (piq *ProductInfoQuery) FirstIDX(ctx context.Context) string
- func (piq *ProductInfoQuery) FirstX(ctx context.Context) *ProductInfo
- func (piq *ProductInfoQuery) GroupBy(field string, fields ...string) *ProductInfoGroupBy
- func (piq *ProductInfoQuery) IDs(ctx context.Context) (ids []string, err error)
- func (piq *ProductInfoQuery) IDsX(ctx context.Context) []string
- func (piq *ProductInfoQuery) Limit(limit int) *ProductInfoQuery
- func (piq *ProductInfoQuery) Offset(offset int) *ProductInfoQuery
- func (piq *ProductInfoQuery) Only(ctx context.Context) (*ProductInfo, error)
- func (piq *ProductInfoQuery) OnlyID(ctx context.Context) (id string, err error)
- func (piq *ProductInfoQuery) OnlyIDX(ctx context.Context) string
- func (piq *ProductInfoQuery) OnlyX(ctx context.Context) *ProductInfo
- func (piq *ProductInfoQuery) Order(o ...productinfo.OrderOption) *ProductInfoQuery
- func (piq *ProductInfoQuery) QueryProductTags() *ProductTagQuery
- func (piq *ProductInfoQuery) QueryTags() *TagQuery
- func (piq *ProductInfoQuery) Select(fields ...string) *ProductInfoSelect
- func (piq *ProductInfoQuery) Unique(unique bool) *ProductInfoQuery
- func (piq *ProductInfoQuery) Where(ps ...predicate.ProductInfo) *ProductInfoQuery
- func (piq *ProductInfoQuery) WithProductTags(opts ...func(*ProductTagQuery)) *ProductInfoQuery
- func (piq *ProductInfoQuery) WithTags(opts ...func(*TagQuery)) *ProductInfoQuery
- type ProductInfoSelect
- func (pis *ProductInfoSelect) Aggregate(fns ...AggregateFunc) *ProductInfoSelect
- func (s *ProductInfoSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductInfoSelect) BoolX(ctx context.Context) bool
- func (s *ProductInfoSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductInfoSelect) BoolsX(ctx context.Context) []bool
- func (s *ProductInfoSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductInfoSelect) Float64X(ctx context.Context) float64
- func (s *ProductInfoSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductInfoSelect) Float64sX(ctx context.Context) []float64
- func (s *ProductInfoSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProductInfoSelect) IntX(ctx context.Context) int
- func (s *ProductInfoSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProductInfoSelect) IntsX(ctx context.Context) []int
- func (pis *ProductInfoSelect) Scan(ctx context.Context, v any) error
- func (s *ProductInfoSelect) ScanX(ctx context.Context, v any)
- func (s *ProductInfoSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProductInfoSelect) StringX(ctx context.Context) string
- func (s *ProductInfoSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProductInfoSelect) StringsX(ctx context.Context) []string
- type ProductInfoUpdate
- func (piu *ProductInfoUpdate) AddTagIDs(ids ...string) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) AddTags(t ...*Tag) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) AddYear(i int) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) ClearDescription() *ProductInfoUpdate
- func (piu *ProductInfoUpdate) ClearProvider() *ProductInfoUpdate
- func (piu *ProductInfoUpdate) ClearTags() *ProductInfoUpdate
- func (piu *ProductInfoUpdate) ClearYear() *ProductInfoUpdate
- func (piu *ProductInfoUpdate) Exec(ctx context.Context) error
- func (piu *ProductInfoUpdate) ExecX(ctx context.Context)
- func (piu *ProductInfoUpdate) Mutation() *ProductInfoMutation
- func (piu *ProductInfoUpdate) RemoveTagIDs(ids ...string) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) RemoveTags(t ...*Tag) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) Save(ctx context.Context) (int, error)
- func (piu *ProductInfoUpdate) SaveX(ctx context.Context) int
- func (piu *ProductInfoUpdate) SetDescription(s string) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) SetName(s string) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) SetNillableDescription(s *string) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) SetNillableName(s *string) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) SetNillableProvider(s *string) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) SetNillableYear(i *int) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) SetProvider(s string) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) SetUpdatedAt(t time.Time) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) SetYear(i int) *ProductInfoUpdate
- func (piu *ProductInfoUpdate) Where(ps ...predicate.ProductInfo) *ProductInfoUpdate
- type ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) AddTagIDs(ids ...string) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) AddTags(t ...*Tag) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) AddYear(i int) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) ClearDescription() *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) ClearProvider() *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) ClearTags() *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) ClearYear() *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) Exec(ctx context.Context) error
- func (piuo *ProductInfoUpdateOne) ExecX(ctx context.Context)
- func (piuo *ProductInfoUpdateOne) Mutation() *ProductInfoMutation
- func (piuo *ProductInfoUpdateOne) RemoveTagIDs(ids ...string) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) RemoveTags(t ...*Tag) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) Save(ctx context.Context) (*ProductInfo, error)
- func (piuo *ProductInfoUpdateOne) SaveX(ctx context.Context) *ProductInfo
- func (piuo *ProductInfoUpdateOne) Select(field string, fields ...string) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) SetDescription(s string) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) SetName(s string) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) SetNillableDescription(s *string) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) SetNillableName(s *string) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) SetNillableProvider(s *string) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) SetNillableYear(i *int) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) SetProvider(s string) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) SetUpdatedAt(t time.Time) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) SetYear(i int) *ProductInfoUpdateOne
- func (piuo *ProductInfoUpdateOne) Where(ps ...predicate.ProductInfo) *ProductInfoUpdateOne
- type ProductInfos
- type ProductQties
- type ProductQty
- func (pq *ProductQty) QueryProduct() *ProductInfoQuery
- func (pq *ProductQty) QueryProductColor() *ProductColorQuery
- func (pq *ProductQty) QueryWorkUnit() *WorkUnitInfoQuery
- func (pq *ProductQty) String() string
- func (pq *ProductQty) Unwrap() *ProductQty
- func (pq *ProductQty) Update() *ProductQtyUpdateOne
- func (pq *ProductQty) Value(name string) (ent.Value, error)
- type ProductQtyClient
- func (c *ProductQtyClient) Create() *ProductQtyCreate
- func (c *ProductQtyClient) CreateBulk(builders ...*ProductQtyCreate) *ProductQtyCreateBulk
- func (c *ProductQtyClient) Delete() *ProductQtyDelete
- func (c *ProductQtyClient) DeleteOne(pq *ProductQty) *ProductQtyDeleteOne
- func (c *ProductQtyClient) DeleteOneID(id uuid.UUID) *ProductQtyDeleteOne
- func (c *ProductQtyClient) Get(ctx context.Context, id uuid.UUID) (*ProductQty, error)
- func (c *ProductQtyClient) GetX(ctx context.Context, id uuid.UUID) *ProductQty
- func (c *ProductQtyClient) Hooks() []Hook
- func (c *ProductQtyClient) Intercept(interceptors ...Interceptor)
- func (c *ProductQtyClient) Interceptors() []Interceptor
- func (c *ProductQtyClient) MapCreateBulk(slice any, setFunc func(*ProductQtyCreate, int)) *ProductQtyCreateBulk
- func (c *ProductQtyClient) Query() *ProductQtyQuery
- func (c *ProductQtyClient) QueryProduct(pq *ProductQty) *ProductInfoQuery
- func (c *ProductQtyClient) QueryProductColor(pq *ProductQty) *ProductColorQuery
- func (c *ProductQtyClient) QueryWorkUnit(pq *ProductQty) *WorkUnitInfoQuery
- func (c *ProductQtyClient) Update() *ProductQtyUpdate
- func (c *ProductQtyClient) UpdateOne(pq *ProductQty) *ProductQtyUpdateOne
- func (c *ProductQtyClient) UpdateOneID(id uuid.UUID) *ProductQtyUpdateOne
- func (c *ProductQtyClient) Use(hooks ...Hook)
- type ProductQtyCreate
- func (pqc *ProductQtyCreate) Exec(ctx context.Context) error
- func (pqc *ProductQtyCreate) ExecX(ctx context.Context)
- func (pqc *ProductQtyCreate) Mutation() *ProductQtyMutation
- func (pqc *ProductQtyCreate) Save(ctx context.Context) (*ProductQty, error)
- func (pqc *ProductQtyCreate) SaveX(ctx context.Context) *ProductQty
- func (pqc *ProductQtyCreate) SetCreatedAt(t time.Time) *ProductQtyCreate
- func (pqc *ProductQtyCreate) SetID(u uuid.UUID) *ProductQtyCreate
- func (pqc *ProductQtyCreate) SetNillableCreatedAt(t *time.Time) *ProductQtyCreate
- func (pqc *ProductQtyCreate) SetNillableID(u *uuid.UUID) *ProductQtyCreate
- func (pqc *ProductQtyCreate) SetNillableUpdatedAt(t *time.Time) *ProductQtyCreate
- func (pqc *ProductQtyCreate) SetPricePerUnit(d decimal.Decimal) *ProductQtyCreate
- func (pqc *ProductQtyCreate) SetProduct(p *ProductInfo) *ProductQtyCreate
- func (pqc *ProductQtyCreate) SetProductColor(p *ProductColor) *ProductQtyCreate
- func (pqc *ProductQtyCreate) SetProductColorID(s string) *ProductQtyCreate
- func (pqc *ProductQtyCreate) SetProductID(s string) *ProductQtyCreate
- func (pqc *ProductQtyCreate) SetQty(d decimal.Decimal) *ProductQtyCreate
- func (pqc *ProductQtyCreate) SetUpdatedAt(t time.Time) *ProductQtyCreate
- func (pqc *ProductQtyCreate) SetWorkUnit(w *WorkUnitInfo) *ProductQtyCreate
- func (pqc *ProductQtyCreate) SetWorkUnitID(u uuid.UUID) *ProductQtyCreate
- type ProductQtyCreateBulk
- type ProductQtyDelete
- type ProductQtyDeleteOne
- type ProductQtyEdges
- type ProductQtyGroupBy
- func (pqgb *ProductQtyGroupBy) Aggregate(fns ...AggregateFunc) *ProductQtyGroupBy
- func (s *ProductQtyGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductQtyGroupBy) BoolX(ctx context.Context) bool
- func (s *ProductQtyGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductQtyGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProductQtyGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductQtyGroupBy) Float64X(ctx context.Context) float64
- func (s *ProductQtyGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductQtyGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProductQtyGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProductQtyGroupBy) IntX(ctx context.Context) int
- func (s *ProductQtyGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProductQtyGroupBy) IntsX(ctx context.Context) []int
- func (pqgb *ProductQtyGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProductQtyGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProductQtyGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProductQtyGroupBy) StringX(ctx context.Context) string
- func (s *ProductQtyGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProductQtyGroupBy) StringsX(ctx context.Context) []string
- type ProductQtyMutation
- func (m *ProductQtyMutation) AddField(name string, value ent.Value) error
- func (m *ProductQtyMutation) AddPricePerUnit(d decimal.Decimal)
- func (m *ProductQtyMutation) AddQty(d decimal.Decimal)
- func (m *ProductQtyMutation) AddedEdges() []string
- func (m *ProductQtyMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProductQtyMutation) AddedFields() []string
- func (m *ProductQtyMutation) AddedIDs(name string) []ent.Value
- func (m *ProductQtyMutation) AddedPricePerUnit() (r decimal.Decimal, exists bool)
- func (m *ProductQtyMutation) AddedQty() (r decimal.Decimal, exists bool)
- func (m *ProductQtyMutation) ClearEdge(name string) error
- func (m *ProductQtyMutation) ClearField(name string) error
- func (m *ProductQtyMutation) ClearProduct()
- func (m *ProductQtyMutation) ClearProductColor()
- func (m *ProductQtyMutation) ClearWorkUnit()
- func (m *ProductQtyMutation) ClearedEdges() []string
- func (m *ProductQtyMutation) ClearedFields() []string
- func (m ProductQtyMutation) Client() *Client
- func (m *ProductQtyMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ProductQtyMutation) EdgeCleared(name string) bool
- func (m *ProductQtyMutation) Field(name string) (ent.Value, bool)
- func (m *ProductQtyMutation) FieldCleared(name string) bool
- func (m *ProductQtyMutation) Fields() []string
- func (m *ProductQtyMutation) ID() (id uuid.UUID, exists bool)
- func (m *ProductQtyMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ProductQtyMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ProductQtyMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProductQtyMutation) OldPricePerUnit(ctx context.Context) (v *decimal.Decimal, err error)
- func (m *ProductQtyMutation) OldProductColorID(ctx context.Context) (v string, err error)
- func (m *ProductQtyMutation) OldProductID(ctx context.Context) (v string, err error)
- func (m *ProductQtyMutation) OldQty(ctx context.Context) (v *decimal.Decimal, err error)
- func (m *ProductQtyMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ProductQtyMutation) OldWorkUnitID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ProductQtyMutation) Op() Op
- func (m *ProductQtyMutation) PricePerUnit() (r decimal.Decimal, exists bool)
- func (m *ProductQtyMutation) ProductCleared() bool
- func (m *ProductQtyMutation) ProductColorCleared() bool
- func (m *ProductQtyMutation) ProductColorID() (r string, exists bool)
- func (m *ProductQtyMutation) ProductColorIDs() (ids []string)
- func (m *ProductQtyMutation) ProductID() (r string, exists bool)
- func (m *ProductQtyMutation) ProductIDs() (ids []string)
- func (m *ProductQtyMutation) Qty() (r decimal.Decimal, exists bool)
- func (m *ProductQtyMutation) RemovedEdges() []string
- func (m *ProductQtyMutation) RemovedIDs(name string) []ent.Value
- func (m *ProductQtyMutation) ResetCreatedAt()
- func (m *ProductQtyMutation) ResetEdge(name string) error
- func (m *ProductQtyMutation) ResetField(name string) error
- func (m *ProductQtyMutation) ResetPricePerUnit()
- func (m *ProductQtyMutation) ResetProduct()
- func (m *ProductQtyMutation) ResetProductColor()
- func (m *ProductQtyMutation) ResetProductColorID()
- func (m *ProductQtyMutation) ResetProductID()
- func (m *ProductQtyMutation) ResetQty()
- func (m *ProductQtyMutation) ResetUpdatedAt()
- func (m *ProductQtyMutation) ResetWorkUnit()
- func (m *ProductQtyMutation) ResetWorkUnitID()
- func (m *ProductQtyMutation) SetCreatedAt(t time.Time)
- func (m *ProductQtyMutation) SetField(name string, value ent.Value) error
- func (m *ProductQtyMutation) SetID(id uuid.UUID)
- func (m *ProductQtyMutation) SetOp(op Op)
- func (m *ProductQtyMutation) SetPricePerUnit(d decimal.Decimal)
- func (m *ProductQtyMutation) SetProductColorID(s string)
- func (m *ProductQtyMutation) SetProductID(s string)
- func (m *ProductQtyMutation) SetQty(d decimal.Decimal)
- func (m *ProductQtyMutation) SetUpdatedAt(t time.Time)
- func (m *ProductQtyMutation) SetWorkUnitID(u uuid.UUID)
- func (m ProductQtyMutation) Tx() (*Tx, error)
- func (m *ProductQtyMutation) Type() string
- func (m *ProductQtyMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ProductQtyMutation) Where(ps ...predicate.ProductQty)
- func (m *ProductQtyMutation) WhereP(ps ...func(*sql.Selector))
- func (m *ProductQtyMutation) WorkUnitCleared() bool
- func (m *ProductQtyMutation) WorkUnitID() (r uuid.UUID, exists bool)
- func (m *ProductQtyMutation) WorkUnitIDs() (ids []uuid.UUID)
- type ProductQtyQuery
- func (pqq *ProductQtyQuery) Aggregate(fns ...AggregateFunc) *ProductQtySelect
- func (pqq *ProductQtyQuery) All(ctx context.Context) ([]*ProductQty, error)
- func (pqq *ProductQtyQuery) AllX(ctx context.Context) []*ProductQty
- func (pqq *ProductQtyQuery) Clone() *ProductQtyQuery
- func (pqq *ProductQtyQuery) Count(ctx context.Context) (int, error)
- func (pqq *ProductQtyQuery) CountX(ctx context.Context) int
- func (pqq *ProductQtyQuery) Exist(ctx context.Context) (bool, error)
- func (pqq *ProductQtyQuery) ExistX(ctx context.Context) bool
- func (pqq *ProductQtyQuery) First(ctx context.Context) (*ProductQty, error)
- func (pqq *ProductQtyQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (pqq *ProductQtyQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (pqq *ProductQtyQuery) FirstX(ctx context.Context) *ProductQty
- func (pqq *ProductQtyQuery) GroupBy(field string, fields ...string) *ProductQtyGroupBy
- func (pqq *ProductQtyQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (pqq *ProductQtyQuery) IDsX(ctx context.Context) []uuid.UUID
- func (pqq *ProductQtyQuery) Limit(limit int) *ProductQtyQuery
- func (pqq *ProductQtyQuery) Offset(offset int) *ProductQtyQuery
- func (pqq *ProductQtyQuery) Only(ctx context.Context) (*ProductQty, error)
- func (pqq *ProductQtyQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (pqq *ProductQtyQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (pqq *ProductQtyQuery) OnlyX(ctx context.Context) *ProductQty
- func (pqq *ProductQtyQuery) Order(o ...productqty.OrderOption) *ProductQtyQuery
- func (pqq *ProductQtyQuery) QueryProduct() *ProductInfoQuery
- func (pqq *ProductQtyQuery) QueryProductColor() *ProductColorQuery
- func (pqq *ProductQtyQuery) QueryWorkUnit() *WorkUnitInfoQuery
- func (pqq *ProductQtyQuery) Select(fields ...string) *ProductQtySelect
- func (pqq *ProductQtyQuery) Unique(unique bool) *ProductQtyQuery
- func (pqq *ProductQtyQuery) Where(ps ...predicate.ProductQty) *ProductQtyQuery
- func (pqq *ProductQtyQuery) WithProduct(opts ...func(*ProductInfoQuery)) *ProductQtyQuery
- func (pqq *ProductQtyQuery) WithProductColor(opts ...func(*ProductColorQuery)) *ProductQtyQuery
- func (pqq *ProductQtyQuery) WithWorkUnit(opts ...func(*WorkUnitInfoQuery)) *ProductQtyQuery
- type ProductQtySelect
- func (pqs *ProductQtySelect) Aggregate(fns ...AggregateFunc) *ProductQtySelect
- func (s *ProductQtySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductQtySelect) BoolX(ctx context.Context) bool
- func (s *ProductQtySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductQtySelect) BoolsX(ctx context.Context) []bool
- func (s *ProductQtySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductQtySelect) Float64X(ctx context.Context) float64
- func (s *ProductQtySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductQtySelect) Float64sX(ctx context.Context) []float64
- func (s *ProductQtySelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProductQtySelect) IntX(ctx context.Context) int
- func (s *ProductQtySelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProductQtySelect) IntsX(ctx context.Context) []int
- func (pqs *ProductQtySelect) Scan(ctx context.Context, v any) error
- func (s *ProductQtySelect) ScanX(ctx context.Context, v any)
- func (s *ProductQtySelect) String(ctx context.Context) (_ string, err error)
- func (s *ProductQtySelect) StringX(ctx context.Context) string
- func (s *ProductQtySelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProductQtySelect) StringsX(ctx context.Context) []string
- type ProductQtyUpdate
- func (pqu *ProductQtyUpdate) AddPricePerUnit(d decimal.Decimal) *ProductQtyUpdate
- func (pqu *ProductQtyUpdate) AddQty(d decimal.Decimal) *ProductQtyUpdate
- func (pqu *ProductQtyUpdate) Exec(ctx context.Context) error
- func (pqu *ProductQtyUpdate) ExecX(ctx context.Context)
- func (pqu *ProductQtyUpdate) Mutation() *ProductQtyMutation
- func (pqu *ProductQtyUpdate) Save(ctx context.Context) (int, error)
- func (pqu *ProductQtyUpdate) SaveX(ctx context.Context) int
- func (pqu *ProductQtyUpdate) SetNillablePricePerUnit(d *decimal.Decimal) *ProductQtyUpdate
- func (pqu *ProductQtyUpdate) SetNillableQty(d *decimal.Decimal) *ProductQtyUpdate
- func (pqu *ProductQtyUpdate) SetPricePerUnit(d decimal.Decimal) *ProductQtyUpdate
- func (pqu *ProductQtyUpdate) SetQty(d decimal.Decimal) *ProductQtyUpdate
- func (pqu *ProductQtyUpdate) SetUpdatedAt(t time.Time) *ProductQtyUpdate
- func (pqu *ProductQtyUpdate) Where(ps ...predicate.ProductQty) *ProductQtyUpdate
- type ProductQtyUpdateOne
- func (pquo *ProductQtyUpdateOne) AddPricePerUnit(d decimal.Decimal) *ProductQtyUpdateOne
- func (pquo *ProductQtyUpdateOne) AddQty(d decimal.Decimal) *ProductQtyUpdateOne
- func (pquo *ProductQtyUpdateOne) Exec(ctx context.Context) error
- func (pquo *ProductQtyUpdateOne) ExecX(ctx context.Context)
- func (pquo *ProductQtyUpdateOne) Mutation() *ProductQtyMutation
- func (pquo *ProductQtyUpdateOne) Save(ctx context.Context) (*ProductQty, error)
- func (pquo *ProductQtyUpdateOne) SaveX(ctx context.Context) *ProductQty
- func (pquo *ProductQtyUpdateOne) Select(field string, fields ...string) *ProductQtyUpdateOne
- func (pquo *ProductQtyUpdateOne) SetNillablePricePerUnit(d *decimal.Decimal) *ProductQtyUpdateOne
- func (pquo *ProductQtyUpdateOne) SetNillableQty(d *decimal.Decimal) *ProductQtyUpdateOne
- func (pquo *ProductQtyUpdateOne) SetPricePerUnit(d decimal.Decimal) *ProductQtyUpdateOne
- func (pquo *ProductQtyUpdateOne) SetQty(d decimal.Decimal) *ProductQtyUpdateOne
- func (pquo *ProductQtyUpdateOne) SetUpdatedAt(t time.Time) *ProductQtyUpdateOne
- func (pquo *ProductQtyUpdateOne) Where(ps ...predicate.ProductQty) *ProductQtyUpdateOne
- type ProductTag
- type ProductTagClient
- func (c *ProductTagClient) Create() *ProductTagCreate
- func (c *ProductTagClient) CreateBulk(builders ...*ProductTagCreate) *ProductTagCreateBulk
- func (c *ProductTagClient) Delete() *ProductTagDelete
- func (c *ProductTagClient) Hooks() []Hook
- func (c *ProductTagClient) Intercept(interceptors ...Interceptor)
- func (c *ProductTagClient) Interceptors() []Interceptor
- func (c *ProductTagClient) MapCreateBulk(slice any, setFunc func(*ProductTagCreate, int)) *ProductTagCreateBulk
- func (c *ProductTagClient) Query() *ProductTagQuery
- func (c *ProductTagClient) QueryProducts(pt *ProductTag) *ProductInfoQuery
- func (c *ProductTagClient) QueryTags(pt *ProductTag) *TagQuery
- func (c *ProductTagClient) Update() *ProductTagUpdate
- func (c *ProductTagClient) UpdateOne(pt *ProductTag) *ProductTagUpdateOne
- func (c *ProductTagClient) Use(hooks ...Hook)
- type ProductTagCreate
- func (ptc *ProductTagCreate) Exec(ctx context.Context) error
- func (ptc *ProductTagCreate) ExecX(ctx context.Context)
- func (ptc *ProductTagCreate) Mutation() *ProductTagMutation
- func (ptc *ProductTagCreate) Save(ctx context.Context) (*ProductTag, error)
- func (ptc *ProductTagCreate) SaveX(ctx context.Context) *ProductTag
- func (ptc *ProductTagCreate) SetProductID(s string) *ProductTagCreate
- func (ptc *ProductTagCreate) SetProducts(p *ProductInfo) *ProductTagCreate
- func (ptc *ProductTagCreate) SetProductsID(id string) *ProductTagCreate
- func (ptc *ProductTagCreate) SetTagID(s string) *ProductTagCreate
- func (ptc *ProductTagCreate) SetTags(t *Tag) *ProductTagCreate
- func (ptc *ProductTagCreate) SetTagsID(id string) *ProductTagCreate
- type ProductTagCreateBulk
- type ProductTagDelete
- type ProductTagDeleteOne
- type ProductTagEdges
- type ProductTagGroupBy
- func (ptgb *ProductTagGroupBy) Aggregate(fns ...AggregateFunc) *ProductTagGroupBy
- func (s *ProductTagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductTagGroupBy) BoolX(ctx context.Context) bool
- func (s *ProductTagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductTagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProductTagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductTagGroupBy) Float64X(ctx context.Context) float64
- func (s *ProductTagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductTagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProductTagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProductTagGroupBy) IntX(ctx context.Context) int
- func (s *ProductTagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProductTagGroupBy) IntsX(ctx context.Context) []int
- func (ptgb *ProductTagGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProductTagGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProductTagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProductTagGroupBy) StringX(ctx context.Context) string
- func (s *ProductTagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProductTagGroupBy) StringsX(ctx context.Context) []string
- type ProductTagMutation
- func (m *ProductTagMutation) AddField(name string, value ent.Value) error
- func (m *ProductTagMutation) AddedEdges() []string
- func (m *ProductTagMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProductTagMutation) AddedFields() []string
- func (m *ProductTagMutation) AddedIDs(name string) []ent.Value
- func (m *ProductTagMutation) ClearEdge(name string) error
- func (m *ProductTagMutation) ClearField(name string) error
- func (m *ProductTagMutation) ClearProducts()
- func (m *ProductTagMutation) ClearTags()
- func (m *ProductTagMutation) ClearedEdges() []string
- func (m *ProductTagMutation) ClearedFields() []string
- func (m ProductTagMutation) Client() *Client
- func (m *ProductTagMutation) EdgeCleared(name string) bool
- func (m *ProductTagMutation) Field(name string) (ent.Value, bool)
- func (m *ProductTagMutation) FieldCleared(name string) bool
- func (m *ProductTagMutation) Fields() []string
- func (m *ProductTagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProductTagMutation) Op() Op
- func (m *ProductTagMutation) ProductID() (r string, exists bool)
- func (m *ProductTagMutation) ProductsCleared() bool
- func (m *ProductTagMutation) ProductsID() (id string, exists bool)
- func (m *ProductTagMutation) ProductsIDs() (ids []string)
- func (m *ProductTagMutation) RemovedEdges() []string
- func (m *ProductTagMutation) RemovedIDs(name string) []ent.Value
- func (m *ProductTagMutation) ResetEdge(name string) error
- func (m *ProductTagMutation) ResetField(name string) error
- func (m *ProductTagMutation) ResetProductID()
- func (m *ProductTagMutation) ResetProducts()
- func (m *ProductTagMutation) ResetTagID()
- func (m *ProductTagMutation) ResetTags()
- func (m *ProductTagMutation) SetField(name string, value ent.Value) error
- func (m *ProductTagMutation) SetOp(op Op)
- func (m *ProductTagMutation) SetProductID(s string)
- func (m *ProductTagMutation) SetProductsID(id string)
- func (m *ProductTagMutation) SetTagID(s string)
- func (m *ProductTagMutation) SetTagsID(id string)
- func (m *ProductTagMutation) TagID() (r string, exists bool)
- func (m *ProductTagMutation) TagsCleared() bool
- func (m *ProductTagMutation) TagsID() (id string, exists bool)
- func (m *ProductTagMutation) TagsIDs() (ids []string)
- func (m ProductTagMutation) Tx() (*Tx, error)
- func (m *ProductTagMutation) Type() string
- func (m *ProductTagMutation) Where(ps ...predicate.ProductTag)
- func (m *ProductTagMutation) WhereP(ps ...func(*sql.Selector))
- type ProductTagQuery
- func (ptq *ProductTagQuery) Aggregate(fns ...AggregateFunc) *ProductTagSelect
- func (ptq *ProductTagQuery) All(ctx context.Context) ([]*ProductTag, error)
- func (ptq *ProductTagQuery) AllX(ctx context.Context) []*ProductTag
- func (ptq *ProductTagQuery) Clone() *ProductTagQuery
- func (ptq *ProductTagQuery) Count(ctx context.Context) (int, error)
- func (ptq *ProductTagQuery) CountX(ctx context.Context) int
- func (ptq *ProductTagQuery) Exist(ctx context.Context) (bool, error)
- func (ptq *ProductTagQuery) ExistX(ctx context.Context) bool
- func (ptq *ProductTagQuery) First(ctx context.Context) (*ProductTag, error)
- func (ptq *ProductTagQuery) FirstX(ctx context.Context) *ProductTag
- func (ptq *ProductTagQuery) GroupBy(field string, fields ...string) *ProductTagGroupBy
- func (ptq *ProductTagQuery) Limit(limit int) *ProductTagQuery
- func (ptq *ProductTagQuery) Offset(offset int) *ProductTagQuery
- func (ptq *ProductTagQuery) Only(ctx context.Context) (*ProductTag, error)
- func (ptq *ProductTagQuery) OnlyX(ctx context.Context) *ProductTag
- func (ptq *ProductTagQuery) Order(o ...producttag.OrderOption) *ProductTagQuery
- func (ptq *ProductTagQuery) QueryProducts() *ProductInfoQuery
- func (ptq *ProductTagQuery) QueryTags() *TagQuery
- func (ptq *ProductTagQuery) Select(fields ...string) *ProductTagSelect
- func (ptq *ProductTagQuery) Unique(unique bool) *ProductTagQuery
- func (ptq *ProductTagQuery) Where(ps ...predicate.ProductTag) *ProductTagQuery
- func (ptq *ProductTagQuery) WithProducts(opts ...func(*ProductInfoQuery)) *ProductTagQuery
- func (ptq *ProductTagQuery) WithTags(opts ...func(*TagQuery)) *ProductTagQuery
- type ProductTagSelect
- func (pts *ProductTagSelect) Aggregate(fns ...AggregateFunc) *ProductTagSelect
- func (s *ProductTagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProductTagSelect) BoolX(ctx context.Context) bool
- func (s *ProductTagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProductTagSelect) BoolsX(ctx context.Context) []bool
- func (s *ProductTagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProductTagSelect) Float64X(ctx context.Context) float64
- func (s *ProductTagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProductTagSelect) Float64sX(ctx context.Context) []float64
- func (s *ProductTagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProductTagSelect) IntX(ctx context.Context) int
- func (s *ProductTagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProductTagSelect) IntsX(ctx context.Context) []int
- func (pts *ProductTagSelect) Scan(ctx context.Context, v any) error
- func (s *ProductTagSelect) ScanX(ctx context.Context, v any)
- func (s *ProductTagSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProductTagSelect) StringX(ctx context.Context) string
- func (s *ProductTagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProductTagSelect) StringsX(ctx context.Context) []string
- type ProductTagUpdate
- func (ptu *ProductTagUpdate) Exec(ctx context.Context) error
- func (ptu *ProductTagUpdate) ExecX(ctx context.Context)
- func (ptu *ProductTagUpdate) Mutation() *ProductTagMutation
- func (ptu *ProductTagUpdate) Save(ctx context.Context) (int, error)
- func (ptu *ProductTagUpdate) SaveX(ctx context.Context) int
- func (ptu *ProductTagUpdate) Where(ps ...predicate.ProductTag) *ProductTagUpdate
- type ProductTagUpdateOne
- func (ptuo *ProductTagUpdateOne) Exec(ctx context.Context) error
- func (ptuo *ProductTagUpdateOne) ExecX(ctx context.Context)
- func (ptuo *ProductTagUpdateOne) Mutation() *ProductTagMutation
- func (ptuo *ProductTagUpdateOne) Save(ctx context.Context) (*ProductTag, error)
- func (ptuo *ProductTagUpdateOne) SaveX(ctx context.Context) *ProductTag
- func (ptuo *ProductTagUpdateOne) Select(field string, fields ...string) *ProductTagUpdateOne
- func (ptuo *ProductTagUpdateOne) Where(ps ...predicate.ProductTag) *ProductTagUpdateOne
- type ProductTags
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Shipment
- func (s *Shipment) QueryInvoice() *InvoiceQuery
- func (s *Shipment) QueryOrder() *OrderQuery
- func (s *Shipment) QueryShipmentStatus() *ShipmentStatusCodeQuery
- func (s *Shipment) QueryStaff() *PersonQuery
- func (s *Shipment) String() string
- func (s *Shipment) Unwrap() *Shipment
- func (s *Shipment) Update() *ShipmentUpdateOne
- func (s *Shipment) Value(name string) (ent.Value, error)
- type ShipmentClient
- func (c *ShipmentClient) Create() *ShipmentCreate
- func (c *ShipmentClient) CreateBulk(builders ...*ShipmentCreate) *ShipmentCreateBulk
- func (c *ShipmentClient) Delete() *ShipmentDelete
- func (c *ShipmentClient) DeleteOne(s *Shipment) *ShipmentDeleteOne
- func (c *ShipmentClient) DeleteOneID(id string) *ShipmentDeleteOne
- func (c *ShipmentClient) Get(ctx context.Context, id string) (*Shipment, error)
- func (c *ShipmentClient) GetX(ctx context.Context, id string) *Shipment
- func (c *ShipmentClient) Hooks() []Hook
- func (c *ShipmentClient) Intercept(interceptors ...Interceptor)
- func (c *ShipmentClient) Interceptors() []Interceptor
- func (c *ShipmentClient) MapCreateBulk(slice any, setFunc func(*ShipmentCreate, int)) *ShipmentCreateBulk
- func (c *ShipmentClient) Query() *ShipmentQuery
- func (c *ShipmentClient) QueryInvoice(s *Shipment) *InvoiceQuery
- func (c *ShipmentClient) QueryOrder(s *Shipment) *OrderQuery
- func (c *ShipmentClient) QueryShipmentStatus(s *Shipment) *ShipmentStatusCodeQuery
- func (c *ShipmentClient) QueryStaff(s *Shipment) *PersonQuery
- func (c *ShipmentClient) Update() *ShipmentUpdate
- func (c *ShipmentClient) UpdateOne(s *Shipment) *ShipmentUpdateOne
- func (c *ShipmentClient) UpdateOneID(id string) *ShipmentUpdateOne
- func (c *ShipmentClient) Use(hooks ...Hook)
- type ShipmentCreate
- func (sc *ShipmentCreate) Exec(ctx context.Context) error
- func (sc *ShipmentCreate) ExecX(ctx context.Context)
- func (sc *ShipmentCreate) Mutation() *ShipmentMutation
- func (sc *ShipmentCreate) Save(ctx context.Context) (*Shipment, error)
- func (sc *ShipmentCreate) SaveX(ctx context.Context) *Shipment
- func (sc *ShipmentCreate) SetCreatedAt(t time.Time) *ShipmentCreate
- func (sc *ShipmentCreate) SetID(s string) *ShipmentCreate
- func (sc *ShipmentCreate) SetInvoice(i *Invoice) *ShipmentCreate
- func (sc *ShipmentCreate) SetInvoiceID(u uuid.UUID) *ShipmentCreate
- func (sc *ShipmentCreate) SetNillableCreatedAt(t *time.Time) *ShipmentCreate
- func (sc *ShipmentCreate) SetNillableNote(s *string) *ShipmentCreate
- func (sc *ShipmentCreate) SetNillableStatusCode(i *int) *ShipmentCreate
- func (sc *ShipmentCreate) SetNillableUpdatedAt(t *time.Time) *ShipmentCreate
- func (sc *ShipmentCreate) SetNote(s string) *ShipmentCreate
- func (sc *ShipmentCreate) SetOrder(o *Order) *ShipmentCreate
- func (sc *ShipmentCreate) SetOrderID(u uuid.UUID) *ShipmentCreate
- func (sc *ShipmentCreate) SetShipmentDate(t time.Time) *ShipmentCreate
- func (sc *ShipmentCreate) SetShipmentStatus(s *ShipmentStatusCode) *ShipmentCreate
- func (sc *ShipmentCreate) SetShipmentStatusID(id int) *ShipmentCreate
- func (sc *ShipmentCreate) SetStaff(p *Person) *ShipmentCreate
- func (sc *ShipmentCreate) SetStaffID(u uuid.UUID) *ShipmentCreate
- func (sc *ShipmentCreate) SetStatusCode(i int) *ShipmentCreate
- func (sc *ShipmentCreate) SetUpdatedAt(t time.Time) *ShipmentCreate
- type ShipmentCreateBulk
- type ShipmentDelete
- type ShipmentDeleteOne
- type ShipmentEdges
- type ShipmentGroupBy
- func (sgb *ShipmentGroupBy) Aggregate(fns ...AggregateFunc) *ShipmentGroupBy
- func (s *ShipmentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ShipmentGroupBy) BoolX(ctx context.Context) bool
- func (s *ShipmentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ShipmentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ShipmentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ShipmentGroupBy) Float64X(ctx context.Context) float64
- func (s *ShipmentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ShipmentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ShipmentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ShipmentGroupBy) IntX(ctx context.Context) int
- func (s *ShipmentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ShipmentGroupBy) IntsX(ctx context.Context) []int
- func (sgb *ShipmentGroupBy) Scan(ctx context.Context, v any) error
- func (s *ShipmentGroupBy) ScanX(ctx context.Context, v any)
- func (s *ShipmentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ShipmentGroupBy) StringX(ctx context.Context) string
- func (s *ShipmentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ShipmentGroupBy) StringsX(ctx context.Context) []string
- type ShipmentHistories
- type ShipmentHistory
- func (sh *ShipmentHistory) QueryNewStatus() *ShipmentStatusCodeQuery
- func (sh *ShipmentHistory) QueryOldStatus() *ShipmentStatusCodeQuery
- func (sh *ShipmentHistory) QueryPerson() *PersonQuery
- func (sh *ShipmentHistory) QueryShipment() *ShipmentQuery
- func (sh *ShipmentHistory) String() string
- func (sh *ShipmentHistory) Unwrap() *ShipmentHistory
- func (sh *ShipmentHistory) Update() *ShipmentHistoryUpdateOne
- func (sh *ShipmentHistory) Value(name string) (ent.Value, error)
- type ShipmentHistoryClient
- func (c *ShipmentHistoryClient) Create() *ShipmentHistoryCreate
- func (c *ShipmentHistoryClient) CreateBulk(builders ...*ShipmentHistoryCreate) *ShipmentHistoryCreateBulk
- func (c *ShipmentHistoryClient) Delete() *ShipmentHistoryDelete
- func (c *ShipmentHistoryClient) DeleteOne(sh *ShipmentHistory) *ShipmentHistoryDeleteOne
- func (c *ShipmentHistoryClient) DeleteOneID(id uuid.UUID) *ShipmentHistoryDeleteOne
- func (c *ShipmentHistoryClient) Get(ctx context.Context, id uuid.UUID) (*ShipmentHistory, error)
- func (c *ShipmentHistoryClient) GetX(ctx context.Context, id uuid.UUID) *ShipmentHistory
- func (c *ShipmentHistoryClient) Hooks() []Hook
- func (c *ShipmentHistoryClient) Intercept(interceptors ...Interceptor)
- func (c *ShipmentHistoryClient) Interceptors() []Interceptor
- func (c *ShipmentHistoryClient) MapCreateBulk(slice any, setFunc func(*ShipmentHistoryCreate, int)) *ShipmentHistoryCreateBulk
- func (c *ShipmentHistoryClient) Query() *ShipmentHistoryQuery
- func (c *ShipmentHistoryClient) QueryNewStatus(sh *ShipmentHistory) *ShipmentStatusCodeQuery
- func (c *ShipmentHistoryClient) QueryOldStatus(sh *ShipmentHistory) *ShipmentStatusCodeQuery
- func (c *ShipmentHistoryClient) QueryPerson(sh *ShipmentHistory) *PersonQuery
- func (c *ShipmentHistoryClient) QueryShipment(sh *ShipmentHistory) *ShipmentQuery
- func (c *ShipmentHistoryClient) Update() *ShipmentHistoryUpdate
- func (c *ShipmentHistoryClient) UpdateOne(sh *ShipmentHistory) *ShipmentHistoryUpdateOne
- func (c *ShipmentHistoryClient) UpdateOneID(id uuid.UUID) *ShipmentHistoryUpdateOne
- func (c *ShipmentHistoryClient) Use(hooks ...Hook)
- type ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) Exec(ctx context.Context) error
- func (shc *ShipmentHistoryCreate) ExecX(ctx context.Context)
- func (shc *ShipmentHistoryCreate) Mutation() *ShipmentHistoryMutation
- func (shc *ShipmentHistoryCreate) Save(ctx context.Context) (*ShipmentHistory, error)
- func (shc *ShipmentHistoryCreate) SaveX(ctx context.Context) *ShipmentHistory
- func (shc *ShipmentHistoryCreate) SetCreatedAt(t time.Time) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetDescription(s string) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetID(u uuid.UUID) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetNewStatus(s *ShipmentStatusCode) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetNewStatusCode(i int) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetNewStatusID(id int) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetNillableCreatedAt(t *time.Time) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetNillableDescription(s *string) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetNillableID(u *uuid.UUID) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetNillableNewStatusCode(i *int) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetNillableNewStatusID(id *int) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetNillableOldStatusCode(i *int) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetNillableOldStatusID(id *int) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetOldStatus(s *ShipmentStatusCode) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetOldStatusCode(i int) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetOldStatusID(id int) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetPerson(p *Person) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetPersonID(u uuid.UUID) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetShipment(s *Shipment) *ShipmentHistoryCreate
- func (shc *ShipmentHistoryCreate) SetShipmentID(s string) *ShipmentHistoryCreate
- type ShipmentHistoryCreateBulk
- func (shcb *ShipmentHistoryCreateBulk) Exec(ctx context.Context) error
- func (shcb *ShipmentHistoryCreateBulk) ExecX(ctx context.Context)
- func (shcb *ShipmentHistoryCreateBulk) Save(ctx context.Context) ([]*ShipmentHistory, error)
- func (shcb *ShipmentHistoryCreateBulk) SaveX(ctx context.Context) []*ShipmentHistory
- type ShipmentHistoryDelete
- type ShipmentHistoryDeleteOne
- type ShipmentHistoryEdges
- type ShipmentHistoryGroupBy
- func (shgb *ShipmentHistoryGroupBy) Aggregate(fns ...AggregateFunc) *ShipmentHistoryGroupBy
- func (s *ShipmentHistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ShipmentHistoryGroupBy) BoolX(ctx context.Context) bool
- func (s *ShipmentHistoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ShipmentHistoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ShipmentHistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ShipmentHistoryGroupBy) Float64X(ctx context.Context) float64
- func (s *ShipmentHistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ShipmentHistoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ShipmentHistoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ShipmentHistoryGroupBy) IntX(ctx context.Context) int
- func (s *ShipmentHistoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ShipmentHistoryGroupBy) IntsX(ctx context.Context) []int
- func (shgb *ShipmentHistoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *ShipmentHistoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *ShipmentHistoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ShipmentHistoryGroupBy) StringX(ctx context.Context) string
- func (s *ShipmentHistoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ShipmentHistoryGroupBy) StringsX(ctx context.Context) []string
- type ShipmentHistoryMutation
- func (m *ShipmentHistoryMutation) AddField(name string, value ent.Value) error
- func (m *ShipmentHistoryMutation) AddedEdges() []string
- func (m *ShipmentHistoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *ShipmentHistoryMutation) AddedFields() []string
- func (m *ShipmentHistoryMutation) AddedIDs(name string) []ent.Value
- func (m *ShipmentHistoryMutation) ClearDescription()
- func (m *ShipmentHistoryMutation) ClearEdge(name string) error
- func (m *ShipmentHistoryMutation) ClearField(name string) error
- func (m *ShipmentHistoryMutation) ClearNewStatus()
- func (m *ShipmentHistoryMutation) ClearNewStatusCode()
- func (m *ShipmentHistoryMutation) ClearOldStatus()
- func (m *ShipmentHistoryMutation) ClearOldStatusCode()
- func (m *ShipmentHistoryMutation) ClearPerson()
- func (m *ShipmentHistoryMutation) ClearShipment()
- func (m *ShipmentHistoryMutation) ClearedEdges() []string
- func (m *ShipmentHistoryMutation) ClearedFields() []string
- func (m ShipmentHistoryMutation) Client() *Client
- func (m *ShipmentHistoryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ShipmentHistoryMutation) Description() (r string, exists bool)
- func (m *ShipmentHistoryMutation) DescriptionCleared() bool
- func (m *ShipmentHistoryMutation) EdgeCleared(name string) bool
- func (m *ShipmentHistoryMutation) Field(name string) (ent.Value, bool)
- func (m *ShipmentHistoryMutation) FieldCleared(name string) bool
- func (m *ShipmentHistoryMutation) Fields() []string
- func (m *ShipmentHistoryMutation) ID() (id uuid.UUID, exists bool)
- func (m *ShipmentHistoryMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ShipmentHistoryMutation) NewStatusCleared() bool
- func (m *ShipmentHistoryMutation) NewStatusCode() (r int, exists bool)
- func (m *ShipmentHistoryMutation) NewStatusCodeCleared() bool
- func (m *ShipmentHistoryMutation) NewStatusID() (id int, exists bool)
- func (m *ShipmentHistoryMutation) NewStatusIDs() (ids []int)
- func (m *ShipmentHistoryMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ShipmentHistoryMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *ShipmentHistoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ShipmentHistoryMutation) OldNewStatusCode(ctx context.Context) (v *int, err error)
- func (m *ShipmentHistoryMutation) OldOldStatusCode(ctx context.Context) (v *int, err error)
- func (m *ShipmentHistoryMutation) OldPersonID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ShipmentHistoryMutation) OldShipmentID(ctx context.Context) (v string, err error)
- func (m *ShipmentHistoryMutation) OldStatusCleared() bool
- func (m *ShipmentHistoryMutation) OldStatusCode() (r int, exists bool)
- func (m *ShipmentHistoryMutation) OldStatusCodeCleared() bool
- func (m *ShipmentHistoryMutation) OldStatusID() (id int, exists bool)
- func (m *ShipmentHistoryMutation) OldStatusIDs() (ids []int)
- func (m *ShipmentHistoryMutation) Op() Op
- func (m *ShipmentHistoryMutation) PersonCleared() bool
- func (m *ShipmentHistoryMutation) PersonID() (r uuid.UUID, exists bool)
- func (m *ShipmentHistoryMutation) PersonIDs() (ids []uuid.UUID)
- func (m *ShipmentHistoryMutation) RemovedEdges() []string
- func (m *ShipmentHistoryMutation) RemovedIDs(name string) []ent.Value
- func (m *ShipmentHistoryMutation) ResetCreatedAt()
- func (m *ShipmentHistoryMutation) ResetDescription()
- func (m *ShipmentHistoryMutation) ResetEdge(name string) error
- func (m *ShipmentHistoryMutation) ResetField(name string) error
- func (m *ShipmentHistoryMutation) ResetNewStatus()
- func (m *ShipmentHistoryMutation) ResetNewStatusCode()
- func (m *ShipmentHistoryMutation) ResetOldStatus()
- func (m *ShipmentHistoryMutation) ResetOldStatusCode()
- func (m *ShipmentHistoryMutation) ResetPerson()
- func (m *ShipmentHistoryMutation) ResetPersonID()
- func (m *ShipmentHistoryMutation) ResetShipment()
- func (m *ShipmentHistoryMutation) ResetShipmentID()
- func (m *ShipmentHistoryMutation) SetCreatedAt(t time.Time)
- func (m *ShipmentHistoryMutation) SetDescription(s string)
- func (m *ShipmentHistoryMutation) SetField(name string, value ent.Value) error
- func (m *ShipmentHistoryMutation) SetID(id uuid.UUID)
- func (m *ShipmentHistoryMutation) SetNewStatusCode(i int)
- func (m *ShipmentHistoryMutation) SetNewStatusID(id int)
- func (m *ShipmentHistoryMutation) SetOldStatusCode(i int)
- func (m *ShipmentHistoryMutation) SetOldStatusID(id int)
- func (m *ShipmentHistoryMutation) SetOp(op Op)
- func (m *ShipmentHistoryMutation) SetPersonID(u uuid.UUID)
- func (m *ShipmentHistoryMutation) SetShipmentID(s string)
- func (m *ShipmentHistoryMutation) ShipmentCleared() bool
- func (m *ShipmentHistoryMutation) ShipmentID() (r string, exists bool)
- func (m *ShipmentHistoryMutation) ShipmentIDs() (ids []string)
- func (m ShipmentHistoryMutation) Tx() (*Tx, error)
- func (m *ShipmentHistoryMutation) Type() string
- func (m *ShipmentHistoryMutation) Where(ps ...predicate.ShipmentHistory)
- func (m *ShipmentHistoryMutation) WhereP(ps ...func(*sql.Selector))
- type ShipmentHistoryQuery
- func (shq *ShipmentHistoryQuery) Aggregate(fns ...AggregateFunc) *ShipmentHistorySelect
- func (shq *ShipmentHistoryQuery) All(ctx context.Context) ([]*ShipmentHistory, error)
- func (shq *ShipmentHistoryQuery) AllX(ctx context.Context) []*ShipmentHistory
- func (shq *ShipmentHistoryQuery) Clone() *ShipmentHistoryQuery
- func (shq *ShipmentHistoryQuery) Count(ctx context.Context) (int, error)
- func (shq *ShipmentHistoryQuery) CountX(ctx context.Context) int
- func (shq *ShipmentHistoryQuery) Exist(ctx context.Context) (bool, error)
- func (shq *ShipmentHistoryQuery) ExistX(ctx context.Context) bool
- func (shq *ShipmentHistoryQuery) First(ctx context.Context) (*ShipmentHistory, error)
- func (shq *ShipmentHistoryQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (shq *ShipmentHistoryQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (shq *ShipmentHistoryQuery) FirstX(ctx context.Context) *ShipmentHistory
- func (shq *ShipmentHistoryQuery) GroupBy(field string, fields ...string) *ShipmentHistoryGroupBy
- func (shq *ShipmentHistoryQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (shq *ShipmentHistoryQuery) IDsX(ctx context.Context) []uuid.UUID
- func (shq *ShipmentHistoryQuery) Limit(limit int) *ShipmentHistoryQuery
- func (shq *ShipmentHistoryQuery) Offset(offset int) *ShipmentHistoryQuery
- func (shq *ShipmentHistoryQuery) Only(ctx context.Context) (*ShipmentHistory, error)
- func (shq *ShipmentHistoryQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (shq *ShipmentHistoryQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (shq *ShipmentHistoryQuery) OnlyX(ctx context.Context) *ShipmentHistory
- func (shq *ShipmentHistoryQuery) Order(o ...shipmenthistory.OrderOption) *ShipmentHistoryQuery
- func (shq *ShipmentHistoryQuery) QueryNewStatus() *ShipmentStatusCodeQuery
- func (shq *ShipmentHistoryQuery) QueryOldStatus() *ShipmentStatusCodeQuery
- func (shq *ShipmentHistoryQuery) QueryPerson() *PersonQuery
- func (shq *ShipmentHistoryQuery) QueryShipment() *ShipmentQuery
- func (shq *ShipmentHistoryQuery) Select(fields ...string) *ShipmentHistorySelect
- func (shq *ShipmentHistoryQuery) Unique(unique bool) *ShipmentHistoryQuery
- func (shq *ShipmentHistoryQuery) Where(ps ...predicate.ShipmentHistory) *ShipmentHistoryQuery
- func (shq *ShipmentHistoryQuery) WithNewStatus(opts ...func(*ShipmentStatusCodeQuery)) *ShipmentHistoryQuery
- func (shq *ShipmentHistoryQuery) WithOldStatus(opts ...func(*ShipmentStatusCodeQuery)) *ShipmentHistoryQuery
- func (shq *ShipmentHistoryQuery) WithPerson(opts ...func(*PersonQuery)) *ShipmentHistoryQuery
- func (shq *ShipmentHistoryQuery) WithShipment(opts ...func(*ShipmentQuery)) *ShipmentHistoryQuery
- type ShipmentHistorySelect
- func (shs *ShipmentHistorySelect) Aggregate(fns ...AggregateFunc) *ShipmentHistorySelect
- func (s *ShipmentHistorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ShipmentHistorySelect) BoolX(ctx context.Context) bool
- func (s *ShipmentHistorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ShipmentHistorySelect) BoolsX(ctx context.Context) []bool
- func (s *ShipmentHistorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ShipmentHistorySelect) Float64X(ctx context.Context) float64
- func (s *ShipmentHistorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ShipmentHistorySelect) Float64sX(ctx context.Context) []float64
- func (s *ShipmentHistorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *ShipmentHistorySelect) IntX(ctx context.Context) int
- func (s *ShipmentHistorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *ShipmentHistorySelect) IntsX(ctx context.Context) []int
- func (shs *ShipmentHistorySelect) Scan(ctx context.Context, v any) error
- func (s *ShipmentHistorySelect) ScanX(ctx context.Context, v any)
- func (s *ShipmentHistorySelect) String(ctx context.Context) (_ string, err error)
- func (s *ShipmentHistorySelect) StringX(ctx context.Context) string
- func (s *ShipmentHistorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *ShipmentHistorySelect) StringsX(ctx context.Context) []string
- type ShipmentHistoryUpdate
- func (shu *ShipmentHistoryUpdate) Exec(ctx context.Context) error
- func (shu *ShipmentHistoryUpdate) ExecX(ctx context.Context)
- func (shu *ShipmentHistoryUpdate) Mutation() *ShipmentHistoryMutation
- func (shu *ShipmentHistoryUpdate) Save(ctx context.Context) (int, error)
- func (shu *ShipmentHistoryUpdate) SaveX(ctx context.Context) int
- func (shu *ShipmentHistoryUpdate) Where(ps ...predicate.ShipmentHistory) *ShipmentHistoryUpdate
- type ShipmentHistoryUpdateOne
- func (shuo *ShipmentHistoryUpdateOne) Exec(ctx context.Context) error
- func (shuo *ShipmentHistoryUpdateOne) ExecX(ctx context.Context)
- func (shuo *ShipmentHistoryUpdateOne) Mutation() *ShipmentHistoryMutation
- func (shuo *ShipmentHistoryUpdateOne) Save(ctx context.Context) (*ShipmentHistory, error)
- func (shuo *ShipmentHistoryUpdateOne) SaveX(ctx context.Context) *ShipmentHistory
- func (shuo *ShipmentHistoryUpdateOne) Select(field string, fields ...string) *ShipmentHistoryUpdateOne
- func (shuo *ShipmentHistoryUpdateOne) Where(ps ...predicate.ShipmentHistory) *ShipmentHistoryUpdateOne
- type ShipmentItem
- func (si *ShipmentItem) QueryOrderItem() *OrderItemQuery
- func (si *ShipmentItem) QueryShipment() *ShipmentQuery
- func (si *ShipmentItem) String() string
- func (si *ShipmentItem) Unwrap() *ShipmentItem
- func (si *ShipmentItem) Update() *ShipmentItemUpdateOne
- func (si *ShipmentItem) Value(name string) (ent.Value, error)
- type ShipmentItemClient
- func (c *ShipmentItemClient) Create() *ShipmentItemCreate
- func (c *ShipmentItemClient) CreateBulk(builders ...*ShipmentItemCreate) *ShipmentItemCreateBulk
- func (c *ShipmentItemClient) Delete() *ShipmentItemDelete
- func (c *ShipmentItemClient) DeleteOne(si *ShipmentItem) *ShipmentItemDeleteOne
- func (c *ShipmentItemClient) DeleteOneID(id uuid.UUID) *ShipmentItemDeleteOne
- func (c *ShipmentItemClient) Get(ctx context.Context, id uuid.UUID) (*ShipmentItem, error)
- func (c *ShipmentItemClient) GetX(ctx context.Context, id uuid.UUID) *ShipmentItem
- func (c *ShipmentItemClient) Hooks() []Hook
- func (c *ShipmentItemClient) Intercept(interceptors ...Interceptor)
- func (c *ShipmentItemClient) Interceptors() []Interceptor
- func (c *ShipmentItemClient) MapCreateBulk(slice any, setFunc func(*ShipmentItemCreate, int)) *ShipmentItemCreateBulk
- func (c *ShipmentItemClient) Query() *ShipmentItemQuery
- func (c *ShipmentItemClient) QueryOrderItem(si *ShipmentItem) *OrderItemQuery
- func (c *ShipmentItemClient) QueryShipment(si *ShipmentItem) *ShipmentQuery
- func (c *ShipmentItemClient) Update() *ShipmentItemUpdate
- func (c *ShipmentItemClient) UpdateOne(si *ShipmentItem) *ShipmentItemUpdateOne
- func (c *ShipmentItemClient) UpdateOneID(id uuid.UUID) *ShipmentItemUpdateOne
- func (c *ShipmentItemClient) Use(hooks ...Hook)
- type ShipmentItemCreate
- func (sic *ShipmentItemCreate) Exec(ctx context.Context) error
- func (sic *ShipmentItemCreate) ExecX(ctx context.Context)
- func (sic *ShipmentItemCreate) Mutation() *ShipmentItemMutation
- func (sic *ShipmentItemCreate) Save(ctx context.Context) (*ShipmentItem, error)
- func (sic *ShipmentItemCreate) SaveX(ctx context.Context) *ShipmentItem
- func (sic *ShipmentItemCreate) SetCreatedAt(t time.Time) *ShipmentItemCreate
- func (sic *ShipmentItemCreate) SetID(u uuid.UUID) *ShipmentItemCreate
- func (sic *ShipmentItemCreate) SetNillableCreatedAt(t *time.Time) *ShipmentItemCreate
- func (sic *ShipmentItemCreate) SetNillableID(u *uuid.UUID) *ShipmentItemCreate
- func (sic *ShipmentItemCreate) SetNillableUpdatedAt(t *time.Time) *ShipmentItemCreate
- func (sic *ShipmentItemCreate) SetOrderItem(o *OrderItem) *ShipmentItemCreate
- func (sic *ShipmentItemCreate) SetOrderItemID(u uuid.UUID) *ShipmentItemCreate
- func (sic *ShipmentItemCreate) SetQty(d decimal.Decimal) *ShipmentItemCreate
- func (sic *ShipmentItemCreate) SetShipment(s *Shipment) *ShipmentItemCreate
- func (sic *ShipmentItemCreate) SetShipmentID(s string) *ShipmentItemCreate
- func (sic *ShipmentItemCreate) SetTotal(d decimal.Decimal) *ShipmentItemCreate
- func (sic *ShipmentItemCreate) SetUpdatedAt(t time.Time) *ShipmentItemCreate
- type ShipmentItemCreateBulk
- type ShipmentItemDelete
- type ShipmentItemDeleteOne
- type ShipmentItemEdges
- type ShipmentItemGroupBy
- func (sigb *ShipmentItemGroupBy) Aggregate(fns ...AggregateFunc) *ShipmentItemGroupBy
- func (s *ShipmentItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ShipmentItemGroupBy) BoolX(ctx context.Context) bool
- func (s *ShipmentItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ShipmentItemGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ShipmentItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ShipmentItemGroupBy) Float64X(ctx context.Context) float64
- func (s *ShipmentItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ShipmentItemGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ShipmentItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ShipmentItemGroupBy) IntX(ctx context.Context) int
- func (s *ShipmentItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ShipmentItemGroupBy) IntsX(ctx context.Context) []int
- func (sigb *ShipmentItemGroupBy) Scan(ctx context.Context, v any) error
- func (s *ShipmentItemGroupBy) ScanX(ctx context.Context, v any)
- func (s *ShipmentItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ShipmentItemGroupBy) StringX(ctx context.Context) string
- func (s *ShipmentItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ShipmentItemGroupBy) StringsX(ctx context.Context) []string
- type ShipmentItemMutation
- func (m *ShipmentItemMutation) AddField(name string, value ent.Value) error
- func (m *ShipmentItemMutation) AddQty(d decimal.Decimal)
- func (m *ShipmentItemMutation) AddTotal(d decimal.Decimal)
- func (m *ShipmentItemMutation) AddedEdges() []string
- func (m *ShipmentItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *ShipmentItemMutation) AddedFields() []string
- func (m *ShipmentItemMutation) AddedIDs(name string) []ent.Value
- func (m *ShipmentItemMutation) AddedQty() (r decimal.Decimal, exists bool)
- func (m *ShipmentItemMutation) AddedTotal() (r decimal.Decimal, exists bool)
- func (m *ShipmentItemMutation) ClearEdge(name string) error
- func (m *ShipmentItemMutation) ClearField(name string) error
- func (m *ShipmentItemMutation) ClearOrderItem()
- func (m *ShipmentItemMutation) ClearShipment()
- func (m *ShipmentItemMutation) ClearedEdges() []string
- func (m *ShipmentItemMutation) ClearedFields() []string
- func (m ShipmentItemMutation) Client() *Client
- func (m *ShipmentItemMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ShipmentItemMutation) EdgeCleared(name string) bool
- func (m *ShipmentItemMutation) Field(name string) (ent.Value, bool)
- func (m *ShipmentItemMutation) FieldCleared(name string) bool
- func (m *ShipmentItemMutation) Fields() []string
- func (m *ShipmentItemMutation) ID() (id uuid.UUID, exists bool)
- func (m *ShipmentItemMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ShipmentItemMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ShipmentItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ShipmentItemMutation) OldOrderItemID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ShipmentItemMutation) OldQty(ctx context.Context) (v *decimal.Decimal, err error)
- func (m *ShipmentItemMutation) OldShipmentID(ctx context.Context) (v string, err error)
- func (m *ShipmentItemMutation) OldTotal(ctx context.Context) (v *decimal.Decimal, err error)
- func (m *ShipmentItemMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ShipmentItemMutation) Op() Op
- func (m *ShipmentItemMutation) OrderItemCleared() bool
- func (m *ShipmentItemMutation) OrderItemID() (r uuid.UUID, exists bool)
- func (m *ShipmentItemMutation) OrderItemIDs() (ids []uuid.UUID)
- func (m *ShipmentItemMutation) Qty() (r decimal.Decimal, exists bool)
- func (m *ShipmentItemMutation) RemovedEdges() []string
- func (m *ShipmentItemMutation) RemovedIDs(name string) []ent.Value
- func (m *ShipmentItemMutation) ResetCreatedAt()
- func (m *ShipmentItemMutation) ResetEdge(name string) error
- func (m *ShipmentItemMutation) ResetField(name string) error
- func (m *ShipmentItemMutation) ResetOrderItem()
- func (m *ShipmentItemMutation) ResetOrderItemID()
- func (m *ShipmentItemMutation) ResetQty()
- func (m *ShipmentItemMutation) ResetShipment()
- func (m *ShipmentItemMutation) ResetShipmentID()
- func (m *ShipmentItemMutation) ResetTotal()
- func (m *ShipmentItemMutation) ResetUpdatedAt()
- func (m *ShipmentItemMutation) SetCreatedAt(t time.Time)
- func (m *ShipmentItemMutation) SetField(name string, value ent.Value) error
- func (m *ShipmentItemMutation) SetID(id uuid.UUID)
- func (m *ShipmentItemMutation) SetOp(op Op)
- func (m *ShipmentItemMutation) SetOrderItemID(u uuid.UUID)
- func (m *ShipmentItemMutation) SetQty(d decimal.Decimal)
- func (m *ShipmentItemMutation) SetShipmentID(s string)
- func (m *ShipmentItemMutation) SetTotal(d decimal.Decimal)
- func (m *ShipmentItemMutation) SetUpdatedAt(t time.Time)
- func (m *ShipmentItemMutation) ShipmentCleared() bool
- func (m *ShipmentItemMutation) ShipmentID() (r string, exists bool)
- func (m *ShipmentItemMutation) ShipmentIDs() (ids []string)
- func (m *ShipmentItemMutation) Total() (r decimal.Decimal, exists bool)
- func (m ShipmentItemMutation) Tx() (*Tx, error)
- func (m *ShipmentItemMutation) Type() string
- func (m *ShipmentItemMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ShipmentItemMutation) Where(ps ...predicate.ShipmentItem)
- func (m *ShipmentItemMutation) WhereP(ps ...func(*sql.Selector))
- type ShipmentItemQuery
- func (siq *ShipmentItemQuery) Aggregate(fns ...AggregateFunc) *ShipmentItemSelect
- func (siq *ShipmentItemQuery) All(ctx context.Context) ([]*ShipmentItem, error)
- func (siq *ShipmentItemQuery) AllX(ctx context.Context) []*ShipmentItem
- func (siq *ShipmentItemQuery) Clone() *ShipmentItemQuery
- func (siq *ShipmentItemQuery) Count(ctx context.Context) (int, error)
- func (siq *ShipmentItemQuery) CountX(ctx context.Context) int
- func (siq *ShipmentItemQuery) Exist(ctx context.Context) (bool, error)
- func (siq *ShipmentItemQuery) ExistX(ctx context.Context) bool
- func (siq *ShipmentItemQuery) First(ctx context.Context) (*ShipmentItem, error)
- func (siq *ShipmentItemQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (siq *ShipmentItemQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (siq *ShipmentItemQuery) FirstX(ctx context.Context) *ShipmentItem
- func (siq *ShipmentItemQuery) GroupBy(field string, fields ...string) *ShipmentItemGroupBy
- func (siq *ShipmentItemQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (siq *ShipmentItemQuery) IDsX(ctx context.Context) []uuid.UUID
- func (siq *ShipmentItemQuery) Limit(limit int) *ShipmentItemQuery
- func (siq *ShipmentItemQuery) Offset(offset int) *ShipmentItemQuery
- func (siq *ShipmentItemQuery) Only(ctx context.Context) (*ShipmentItem, error)
- func (siq *ShipmentItemQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (siq *ShipmentItemQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (siq *ShipmentItemQuery) OnlyX(ctx context.Context) *ShipmentItem
- func (siq *ShipmentItemQuery) Order(o ...shipmentitem.OrderOption) *ShipmentItemQuery
- func (siq *ShipmentItemQuery) QueryOrderItem() *OrderItemQuery
- func (siq *ShipmentItemQuery) QueryShipment() *ShipmentQuery
- func (siq *ShipmentItemQuery) Select(fields ...string) *ShipmentItemSelect
- func (siq *ShipmentItemQuery) Unique(unique bool) *ShipmentItemQuery
- func (siq *ShipmentItemQuery) Where(ps ...predicate.ShipmentItem) *ShipmentItemQuery
- func (siq *ShipmentItemQuery) WithOrderItem(opts ...func(*OrderItemQuery)) *ShipmentItemQuery
- func (siq *ShipmentItemQuery) WithShipment(opts ...func(*ShipmentQuery)) *ShipmentItemQuery
- type ShipmentItemSelect
- func (sis *ShipmentItemSelect) Aggregate(fns ...AggregateFunc) *ShipmentItemSelect
- func (s *ShipmentItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ShipmentItemSelect) BoolX(ctx context.Context) bool
- func (s *ShipmentItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ShipmentItemSelect) BoolsX(ctx context.Context) []bool
- func (s *ShipmentItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ShipmentItemSelect) Float64X(ctx context.Context) float64
- func (s *ShipmentItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ShipmentItemSelect) Float64sX(ctx context.Context) []float64
- func (s *ShipmentItemSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ShipmentItemSelect) IntX(ctx context.Context) int
- func (s *ShipmentItemSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ShipmentItemSelect) IntsX(ctx context.Context) []int
- func (sis *ShipmentItemSelect) Scan(ctx context.Context, v any) error
- func (s *ShipmentItemSelect) ScanX(ctx context.Context, v any)
- func (s *ShipmentItemSelect) String(ctx context.Context) (_ string, err error)
- func (s *ShipmentItemSelect) StringX(ctx context.Context) string
- func (s *ShipmentItemSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ShipmentItemSelect) StringsX(ctx context.Context) []string
- type ShipmentItemUpdate
- func (siu *ShipmentItemUpdate) Exec(ctx context.Context) error
- func (siu *ShipmentItemUpdate) ExecX(ctx context.Context)
- func (siu *ShipmentItemUpdate) Mutation() *ShipmentItemMutation
- func (siu *ShipmentItemUpdate) Save(ctx context.Context) (int, error)
- func (siu *ShipmentItemUpdate) SaveX(ctx context.Context) int
- func (siu *ShipmentItemUpdate) SetUpdatedAt(t time.Time) *ShipmentItemUpdate
- func (siu *ShipmentItemUpdate) Where(ps ...predicate.ShipmentItem) *ShipmentItemUpdate
- type ShipmentItemUpdateOne
- func (siuo *ShipmentItemUpdateOne) Exec(ctx context.Context) error
- func (siuo *ShipmentItemUpdateOne) ExecX(ctx context.Context)
- func (siuo *ShipmentItemUpdateOne) Mutation() *ShipmentItemMutation
- func (siuo *ShipmentItemUpdateOne) Save(ctx context.Context) (*ShipmentItem, error)
- func (siuo *ShipmentItemUpdateOne) SaveX(ctx context.Context) *ShipmentItem
- func (siuo *ShipmentItemUpdateOne) Select(field string, fields ...string) *ShipmentItemUpdateOne
- func (siuo *ShipmentItemUpdateOne) SetUpdatedAt(t time.Time) *ShipmentItemUpdateOne
- func (siuo *ShipmentItemUpdateOne) Where(ps ...predicate.ShipmentItem) *ShipmentItemUpdateOne
- type ShipmentItems
- type ShipmentMutation
- func (m *ShipmentMutation) AddField(name string, value ent.Value) error
- func (m *ShipmentMutation) AddedEdges() []string
- func (m *ShipmentMutation) AddedField(name string) (ent.Value, bool)
- func (m *ShipmentMutation) AddedFields() []string
- func (m *ShipmentMutation) AddedIDs(name string) []ent.Value
- func (m *ShipmentMutation) ClearEdge(name string) error
- func (m *ShipmentMutation) ClearField(name string) error
- func (m *ShipmentMutation) ClearInvoice()
- func (m *ShipmentMutation) ClearNote()
- func (m *ShipmentMutation) ClearOrder()
- func (m *ShipmentMutation) ClearShipmentStatus()
- func (m *ShipmentMutation) ClearStaff()
- func (m *ShipmentMutation) ClearedEdges() []string
- func (m *ShipmentMutation) ClearedFields() []string
- func (m ShipmentMutation) Client() *Client
- func (m *ShipmentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ShipmentMutation) EdgeCleared(name string) bool
- func (m *ShipmentMutation) Field(name string) (ent.Value, bool)
- func (m *ShipmentMutation) FieldCleared(name string) bool
- func (m *ShipmentMutation) Fields() []string
- func (m *ShipmentMutation) ID() (id string, exists bool)
- func (m *ShipmentMutation) IDs(ctx context.Context) ([]string, error)
- func (m *ShipmentMutation) InvoiceCleared() bool
- func (m *ShipmentMutation) InvoiceID() (r uuid.UUID, exists bool)
- func (m *ShipmentMutation) InvoiceIDs() (ids []uuid.UUID)
- func (m *ShipmentMutation) Note() (r string, exists bool)
- func (m *ShipmentMutation) NoteCleared() bool
- func (m *ShipmentMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ShipmentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ShipmentMutation) OldInvoiceID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ShipmentMutation) OldNote(ctx context.Context) (v *string, err error)
- func (m *ShipmentMutation) OldOrderID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ShipmentMutation) OldShipmentDate(ctx context.Context) (v *time.Time, err error)
- func (m *ShipmentMutation) OldStaffID(ctx context.Context) (v uuid.UUID, err error)
- func (m *ShipmentMutation) OldStatusCode(ctx context.Context) (v *int, err error)
- func (m *ShipmentMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ShipmentMutation) Op() Op
- func (m *ShipmentMutation) OrderCleared() bool
- func (m *ShipmentMutation) OrderID() (r uuid.UUID, exists bool)
- func (m *ShipmentMutation) OrderIDs() (ids []uuid.UUID)
- func (m *ShipmentMutation) RemovedEdges() []string
- func (m *ShipmentMutation) RemovedIDs(name string) []ent.Value
- func (m *ShipmentMutation) ResetCreatedAt()
- func (m *ShipmentMutation) ResetEdge(name string) error
- func (m *ShipmentMutation) ResetField(name string) error
- func (m *ShipmentMutation) ResetInvoice()
- func (m *ShipmentMutation) ResetInvoiceID()
- func (m *ShipmentMutation) ResetNote()
- func (m *ShipmentMutation) ResetOrder()
- func (m *ShipmentMutation) ResetOrderID()
- func (m *ShipmentMutation) ResetShipmentDate()
- func (m *ShipmentMutation) ResetShipmentStatus()
- func (m *ShipmentMutation) ResetStaff()
- func (m *ShipmentMutation) ResetStaffID()
- func (m *ShipmentMutation) ResetStatusCode()
- func (m *ShipmentMutation) ResetUpdatedAt()
- func (m *ShipmentMutation) SetCreatedAt(t time.Time)
- func (m *ShipmentMutation) SetField(name string, value ent.Value) error
- func (m *ShipmentMutation) SetID(id string)
- func (m *ShipmentMutation) SetInvoiceID(u uuid.UUID)
- func (m *ShipmentMutation) SetNote(s string)
- func (m *ShipmentMutation) SetOp(op Op)
- func (m *ShipmentMutation) SetOrderID(u uuid.UUID)
- func (m *ShipmentMutation) SetShipmentDate(t time.Time)
- func (m *ShipmentMutation) SetShipmentStatusID(id int)
- func (m *ShipmentMutation) SetStaffID(u uuid.UUID)
- func (m *ShipmentMutation) SetStatusCode(i int)
- func (m *ShipmentMutation) SetUpdatedAt(t time.Time)
- func (m *ShipmentMutation) ShipmentDate() (r time.Time, exists bool)
- func (m *ShipmentMutation) ShipmentStatusCleared() bool
- func (m *ShipmentMutation) ShipmentStatusID() (id int, exists bool)
- func (m *ShipmentMutation) ShipmentStatusIDs() (ids []int)
- func (m *ShipmentMutation) StaffCleared() bool
- func (m *ShipmentMutation) StaffID() (r uuid.UUID, exists bool)
- func (m *ShipmentMutation) StaffIDs() (ids []uuid.UUID)
- func (m *ShipmentMutation) StatusCode() (r int, exists bool)
- func (m ShipmentMutation) Tx() (*Tx, error)
- func (m *ShipmentMutation) Type() string
- func (m *ShipmentMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ShipmentMutation) Where(ps ...predicate.Shipment)
- func (m *ShipmentMutation) WhereP(ps ...func(*sql.Selector))
- type ShipmentQuery
- func (sq *ShipmentQuery) Aggregate(fns ...AggregateFunc) *ShipmentSelect
- func (sq *ShipmentQuery) All(ctx context.Context) ([]*Shipment, error)
- func (sq *ShipmentQuery) AllX(ctx context.Context) []*Shipment
- func (sq *ShipmentQuery) Clone() *ShipmentQuery
- func (sq *ShipmentQuery) Count(ctx context.Context) (int, error)
- func (sq *ShipmentQuery) CountX(ctx context.Context) int
- func (sq *ShipmentQuery) Exist(ctx context.Context) (bool, error)
- func (sq *ShipmentQuery) ExistX(ctx context.Context) bool
- func (sq *ShipmentQuery) First(ctx context.Context) (*Shipment, error)
- func (sq *ShipmentQuery) FirstID(ctx context.Context) (id string, err error)
- func (sq *ShipmentQuery) FirstIDX(ctx context.Context) string
- func (sq *ShipmentQuery) FirstX(ctx context.Context) *Shipment
- func (sq *ShipmentQuery) GroupBy(field string, fields ...string) *ShipmentGroupBy
- func (sq *ShipmentQuery) IDs(ctx context.Context) (ids []string, err error)
- func (sq *ShipmentQuery) IDsX(ctx context.Context) []string
- func (sq *ShipmentQuery) Limit(limit int) *ShipmentQuery
- func (sq *ShipmentQuery) Offset(offset int) *ShipmentQuery
- func (sq *ShipmentQuery) Only(ctx context.Context) (*Shipment, error)
- func (sq *ShipmentQuery) OnlyID(ctx context.Context) (id string, err error)
- func (sq *ShipmentQuery) OnlyIDX(ctx context.Context) string
- func (sq *ShipmentQuery) OnlyX(ctx context.Context) *Shipment
- func (sq *ShipmentQuery) Order(o ...shipment.OrderOption) *ShipmentQuery
- func (sq *ShipmentQuery) QueryInvoice() *InvoiceQuery
- func (sq *ShipmentQuery) QueryOrder() *OrderQuery
- func (sq *ShipmentQuery) QueryShipmentStatus() *ShipmentStatusCodeQuery
- func (sq *ShipmentQuery) QueryStaff() *PersonQuery
- func (sq *ShipmentQuery) Select(fields ...string) *ShipmentSelect
- func (sq *ShipmentQuery) Unique(unique bool) *ShipmentQuery
- func (sq *ShipmentQuery) Where(ps ...predicate.Shipment) *ShipmentQuery
- func (sq *ShipmentQuery) WithInvoice(opts ...func(*InvoiceQuery)) *ShipmentQuery
- func (sq *ShipmentQuery) WithOrder(opts ...func(*OrderQuery)) *ShipmentQuery
- func (sq *ShipmentQuery) WithShipmentStatus(opts ...func(*ShipmentStatusCodeQuery)) *ShipmentQuery
- func (sq *ShipmentQuery) WithStaff(opts ...func(*PersonQuery)) *ShipmentQuery
- type ShipmentSelect
- func (ss *ShipmentSelect) Aggregate(fns ...AggregateFunc) *ShipmentSelect
- func (s *ShipmentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ShipmentSelect) BoolX(ctx context.Context) bool
- func (s *ShipmentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ShipmentSelect) BoolsX(ctx context.Context) []bool
- func (s *ShipmentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ShipmentSelect) Float64X(ctx context.Context) float64
- func (s *ShipmentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ShipmentSelect) Float64sX(ctx context.Context) []float64
- func (s *ShipmentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ShipmentSelect) IntX(ctx context.Context) int
- func (s *ShipmentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ShipmentSelect) IntsX(ctx context.Context) []int
- func (ss *ShipmentSelect) Scan(ctx context.Context, v any) error
- func (s *ShipmentSelect) ScanX(ctx context.Context, v any)
- func (s *ShipmentSelect) String(ctx context.Context) (_ string, err error)
- func (s *ShipmentSelect) StringX(ctx context.Context) string
- func (s *ShipmentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ShipmentSelect) StringsX(ctx context.Context) []string
- type ShipmentStatusCode
- type ShipmentStatusCodeClient
- func (c *ShipmentStatusCodeClient) Create() *ShipmentStatusCodeCreate
- func (c *ShipmentStatusCodeClient) CreateBulk(builders ...*ShipmentStatusCodeCreate) *ShipmentStatusCodeCreateBulk
- func (c *ShipmentStatusCodeClient) Delete() *ShipmentStatusCodeDelete
- func (c *ShipmentStatusCodeClient) DeleteOne(ssc *ShipmentStatusCode) *ShipmentStatusCodeDeleteOne
- func (c *ShipmentStatusCodeClient) DeleteOneID(id int) *ShipmentStatusCodeDeleteOne
- func (c *ShipmentStatusCodeClient) Get(ctx context.Context, id int) (*ShipmentStatusCode, error)
- func (c *ShipmentStatusCodeClient) GetX(ctx context.Context, id int) *ShipmentStatusCode
- func (c *ShipmentStatusCodeClient) Hooks() []Hook
- func (c *ShipmentStatusCodeClient) Intercept(interceptors ...Interceptor)
- func (c *ShipmentStatusCodeClient) Interceptors() []Interceptor
- func (c *ShipmentStatusCodeClient) MapCreateBulk(slice any, setFunc func(*ShipmentStatusCodeCreate, int)) *ShipmentStatusCodeCreateBulk
- func (c *ShipmentStatusCodeClient) Query() *ShipmentStatusCodeQuery
- func (c *ShipmentStatusCodeClient) Update() *ShipmentStatusCodeUpdate
- func (c *ShipmentStatusCodeClient) UpdateOne(ssc *ShipmentStatusCode) *ShipmentStatusCodeUpdateOne
- func (c *ShipmentStatusCodeClient) UpdateOneID(id int) *ShipmentStatusCodeUpdateOne
- func (c *ShipmentStatusCodeClient) Use(hooks ...Hook)
- type ShipmentStatusCodeCreate
- func (sscc *ShipmentStatusCodeCreate) Exec(ctx context.Context) error
- func (sscc *ShipmentStatusCodeCreate) ExecX(ctx context.Context)
- func (sscc *ShipmentStatusCodeCreate) Mutation() *ShipmentStatusCodeMutation
- func (sscc *ShipmentStatusCodeCreate) Save(ctx context.Context) (*ShipmentStatusCode, error)
- func (sscc *ShipmentStatusCodeCreate) SaveX(ctx context.Context) *ShipmentStatusCode
- func (sscc *ShipmentStatusCodeCreate) SetCreatedAt(t time.Time) *ShipmentStatusCodeCreate
- func (sscc *ShipmentStatusCodeCreate) SetID(i int) *ShipmentStatusCodeCreate
- func (sscc *ShipmentStatusCodeCreate) SetNillableCreatedAt(t *time.Time) *ShipmentStatusCodeCreate
- func (sscc *ShipmentStatusCodeCreate) SetNillableUpdatedAt(t *time.Time) *ShipmentStatusCodeCreate
- func (sscc *ShipmentStatusCodeCreate) SetShipmentStatus(s string) *ShipmentStatusCodeCreate
- func (sscc *ShipmentStatusCodeCreate) SetUpdatedAt(t time.Time) *ShipmentStatusCodeCreate
- type ShipmentStatusCodeCreateBulk
- func (ssccb *ShipmentStatusCodeCreateBulk) Exec(ctx context.Context) error
- func (ssccb *ShipmentStatusCodeCreateBulk) ExecX(ctx context.Context)
- func (ssccb *ShipmentStatusCodeCreateBulk) Save(ctx context.Context) ([]*ShipmentStatusCode, error)
- func (ssccb *ShipmentStatusCodeCreateBulk) SaveX(ctx context.Context) []*ShipmentStatusCode
- type ShipmentStatusCodeDelete
- type ShipmentStatusCodeDeleteOne
- type ShipmentStatusCodeGroupBy
- func (sscgb *ShipmentStatusCodeGroupBy) Aggregate(fns ...AggregateFunc) *ShipmentStatusCodeGroupBy
- func (s *ShipmentStatusCodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ShipmentStatusCodeGroupBy) BoolX(ctx context.Context) bool
- func (s *ShipmentStatusCodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ShipmentStatusCodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ShipmentStatusCodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ShipmentStatusCodeGroupBy) Float64X(ctx context.Context) float64
- func (s *ShipmentStatusCodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ShipmentStatusCodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ShipmentStatusCodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ShipmentStatusCodeGroupBy) IntX(ctx context.Context) int
- func (s *ShipmentStatusCodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ShipmentStatusCodeGroupBy) IntsX(ctx context.Context) []int
- func (sscgb *ShipmentStatusCodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *ShipmentStatusCodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *ShipmentStatusCodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ShipmentStatusCodeGroupBy) StringX(ctx context.Context) string
- func (s *ShipmentStatusCodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ShipmentStatusCodeGroupBy) StringsX(ctx context.Context) []string
- type ShipmentStatusCodeMutation
- func (m *ShipmentStatusCodeMutation) AddField(name string, value ent.Value) error
- func (m *ShipmentStatusCodeMutation) AddedEdges() []string
- func (m *ShipmentStatusCodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *ShipmentStatusCodeMutation) AddedFields() []string
- func (m *ShipmentStatusCodeMutation) AddedIDs(name string) []ent.Value
- func (m *ShipmentStatusCodeMutation) ClearEdge(name string) error
- func (m *ShipmentStatusCodeMutation) ClearField(name string) error
- func (m *ShipmentStatusCodeMutation) ClearedEdges() []string
- func (m *ShipmentStatusCodeMutation) ClearedFields() []string
- func (m ShipmentStatusCodeMutation) Client() *Client
- func (m *ShipmentStatusCodeMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ShipmentStatusCodeMutation) EdgeCleared(name string) bool
- func (m *ShipmentStatusCodeMutation) Field(name string) (ent.Value, bool)
- func (m *ShipmentStatusCodeMutation) FieldCleared(name string) bool
- func (m *ShipmentStatusCodeMutation) Fields() []string
- func (m *ShipmentStatusCodeMutation) ID() (id int, exists bool)
- func (m *ShipmentStatusCodeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ShipmentStatusCodeMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ShipmentStatusCodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ShipmentStatusCodeMutation) OldShipmentStatus(ctx context.Context) (v string, err error)
- func (m *ShipmentStatusCodeMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ShipmentStatusCodeMutation) Op() Op
- func (m *ShipmentStatusCodeMutation) RemovedEdges() []string
- func (m *ShipmentStatusCodeMutation) RemovedIDs(name string) []ent.Value
- func (m *ShipmentStatusCodeMutation) ResetCreatedAt()
- func (m *ShipmentStatusCodeMutation) ResetEdge(name string) error
- func (m *ShipmentStatusCodeMutation) ResetField(name string) error
- func (m *ShipmentStatusCodeMutation) ResetShipmentStatus()
- func (m *ShipmentStatusCodeMutation) ResetUpdatedAt()
- func (m *ShipmentStatusCodeMutation) SetCreatedAt(t time.Time)
- func (m *ShipmentStatusCodeMutation) SetField(name string, value ent.Value) error
- func (m *ShipmentStatusCodeMutation) SetID(id int)
- func (m *ShipmentStatusCodeMutation) SetOp(op Op)
- func (m *ShipmentStatusCodeMutation) SetShipmentStatus(s string)
- func (m *ShipmentStatusCodeMutation) SetUpdatedAt(t time.Time)
- func (m *ShipmentStatusCodeMutation) ShipmentStatus() (r string, exists bool)
- func (m ShipmentStatusCodeMutation) Tx() (*Tx, error)
- func (m *ShipmentStatusCodeMutation) Type() string
- func (m *ShipmentStatusCodeMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ShipmentStatusCodeMutation) Where(ps ...predicate.ShipmentStatusCode)
- func (m *ShipmentStatusCodeMutation) WhereP(ps ...func(*sql.Selector))
- type ShipmentStatusCodeQuery
- func (sscq *ShipmentStatusCodeQuery) Aggregate(fns ...AggregateFunc) *ShipmentStatusCodeSelect
- func (sscq *ShipmentStatusCodeQuery) All(ctx context.Context) ([]*ShipmentStatusCode, error)
- func (sscq *ShipmentStatusCodeQuery) AllX(ctx context.Context) []*ShipmentStatusCode
- func (sscq *ShipmentStatusCodeQuery) Clone() *ShipmentStatusCodeQuery
- func (sscq *ShipmentStatusCodeQuery) Count(ctx context.Context) (int, error)
- func (sscq *ShipmentStatusCodeQuery) CountX(ctx context.Context) int
- func (sscq *ShipmentStatusCodeQuery) Exist(ctx context.Context) (bool, error)
- func (sscq *ShipmentStatusCodeQuery) ExistX(ctx context.Context) bool
- func (sscq *ShipmentStatusCodeQuery) First(ctx context.Context) (*ShipmentStatusCode, error)
- func (sscq *ShipmentStatusCodeQuery) FirstID(ctx context.Context) (id int, err error)
- func (sscq *ShipmentStatusCodeQuery) FirstIDX(ctx context.Context) int
- func (sscq *ShipmentStatusCodeQuery) FirstX(ctx context.Context) *ShipmentStatusCode
- func (sscq *ShipmentStatusCodeQuery) GroupBy(field string, fields ...string) *ShipmentStatusCodeGroupBy
- func (sscq *ShipmentStatusCodeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (sscq *ShipmentStatusCodeQuery) IDsX(ctx context.Context) []int
- func (sscq *ShipmentStatusCodeQuery) Limit(limit int) *ShipmentStatusCodeQuery
- func (sscq *ShipmentStatusCodeQuery) Offset(offset int) *ShipmentStatusCodeQuery
- func (sscq *ShipmentStatusCodeQuery) Only(ctx context.Context) (*ShipmentStatusCode, error)
- func (sscq *ShipmentStatusCodeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sscq *ShipmentStatusCodeQuery) OnlyIDX(ctx context.Context) int
- func (sscq *ShipmentStatusCodeQuery) OnlyX(ctx context.Context) *ShipmentStatusCode
- func (sscq *ShipmentStatusCodeQuery) Order(o ...shipmentstatuscode.OrderOption) *ShipmentStatusCodeQuery
- func (sscq *ShipmentStatusCodeQuery) Select(fields ...string) *ShipmentStatusCodeSelect
- func (sscq *ShipmentStatusCodeQuery) Unique(unique bool) *ShipmentStatusCodeQuery
- func (sscq *ShipmentStatusCodeQuery) Where(ps ...predicate.ShipmentStatusCode) *ShipmentStatusCodeQuery
- type ShipmentStatusCodeSelect
- func (sscs *ShipmentStatusCodeSelect) Aggregate(fns ...AggregateFunc) *ShipmentStatusCodeSelect
- func (s *ShipmentStatusCodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ShipmentStatusCodeSelect) BoolX(ctx context.Context) bool
- func (s *ShipmentStatusCodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ShipmentStatusCodeSelect) BoolsX(ctx context.Context) []bool
- func (s *ShipmentStatusCodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ShipmentStatusCodeSelect) Float64X(ctx context.Context) float64
- func (s *ShipmentStatusCodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ShipmentStatusCodeSelect) Float64sX(ctx context.Context) []float64
- func (s *ShipmentStatusCodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ShipmentStatusCodeSelect) IntX(ctx context.Context) int
- func (s *ShipmentStatusCodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ShipmentStatusCodeSelect) IntsX(ctx context.Context) []int
- func (sscs *ShipmentStatusCodeSelect) Scan(ctx context.Context, v any) error
- func (s *ShipmentStatusCodeSelect) ScanX(ctx context.Context, v any)
- func (s *ShipmentStatusCodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *ShipmentStatusCodeSelect) StringX(ctx context.Context) string
- func (s *ShipmentStatusCodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ShipmentStatusCodeSelect) StringsX(ctx context.Context) []string
- type ShipmentStatusCodeUpdate
- func (sscu *ShipmentStatusCodeUpdate) Exec(ctx context.Context) error
- func (sscu *ShipmentStatusCodeUpdate) ExecX(ctx context.Context)
- func (sscu *ShipmentStatusCodeUpdate) Mutation() *ShipmentStatusCodeMutation
- func (sscu *ShipmentStatusCodeUpdate) Save(ctx context.Context) (int, error)
- func (sscu *ShipmentStatusCodeUpdate) SaveX(ctx context.Context) int
- func (sscu *ShipmentStatusCodeUpdate) SetNillableShipmentStatus(s *string) *ShipmentStatusCodeUpdate
- func (sscu *ShipmentStatusCodeUpdate) SetShipmentStatus(s string) *ShipmentStatusCodeUpdate
- func (sscu *ShipmentStatusCodeUpdate) SetUpdatedAt(t time.Time) *ShipmentStatusCodeUpdate
- func (sscu *ShipmentStatusCodeUpdate) Where(ps ...predicate.ShipmentStatusCode) *ShipmentStatusCodeUpdate
- type ShipmentStatusCodeUpdateOne
- func (sscuo *ShipmentStatusCodeUpdateOne) Exec(ctx context.Context) error
- func (sscuo *ShipmentStatusCodeUpdateOne) ExecX(ctx context.Context)
- func (sscuo *ShipmentStatusCodeUpdateOne) Mutation() *ShipmentStatusCodeMutation
- func (sscuo *ShipmentStatusCodeUpdateOne) Save(ctx context.Context) (*ShipmentStatusCode, error)
- func (sscuo *ShipmentStatusCodeUpdateOne) SaveX(ctx context.Context) *ShipmentStatusCode
- func (sscuo *ShipmentStatusCodeUpdateOne) Select(field string, fields ...string) *ShipmentStatusCodeUpdateOne
- func (sscuo *ShipmentStatusCodeUpdateOne) SetNillableShipmentStatus(s *string) *ShipmentStatusCodeUpdateOne
- func (sscuo *ShipmentStatusCodeUpdateOne) SetShipmentStatus(s string) *ShipmentStatusCodeUpdateOne
- func (sscuo *ShipmentStatusCodeUpdateOne) SetUpdatedAt(t time.Time) *ShipmentStatusCodeUpdateOne
- func (sscuo *ShipmentStatusCodeUpdateOne) Where(ps ...predicate.ShipmentStatusCode) *ShipmentStatusCodeUpdateOne
- type ShipmentStatusCodes
- type ShipmentUpdate
- func (su *ShipmentUpdate) ClearNote() *ShipmentUpdate
- func (su *ShipmentUpdate) ClearShipmentStatus() *ShipmentUpdate
- func (su *ShipmentUpdate) Exec(ctx context.Context) error
- func (su *ShipmentUpdate) ExecX(ctx context.Context)
- func (su *ShipmentUpdate) Mutation() *ShipmentMutation
- func (su *ShipmentUpdate) Save(ctx context.Context) (int, error)
- func (su *ShipmentUpdate) SaveX(ctx context.Context) int
- func (su *ShipmentUpdate) SetNillableNote(s *string) *ShipmentUpdate
- func (su *ShipmentUpdate) SetNillableShipmentDate(t *time.Time) *ShipmentUpdate
- func (su *ShipmentUpdate) SetNillableStatusCode(i *int) *ShipmentUpdate
- func (su *ShipmentUpdate) SetNote(s string) *ShipmentUpdate
- func (su *ShipmentUpdate) SetShipmentDate(t time.Time) *ShipmentUpdate
- func (su *ShipmentUpdate) SetShipmentStatus(s *ShipmentStatusCode) *ShipmentUpdate
- func (su *ShipmentUpdate) SetShipmentStatusID(id int) *ShipmentUpdate
- func (su *ShipmentUpdate) SetStatusCode(i int) *ShipmentUpdate
- func (su *ShipmentUpdate) SetUpdatedAt(t time.Time) *ShipmentUpdate
- func (su *ShipmentUpdate) Where(ps ...predicate.Shipment) *ShipmentUpdate
- type ShipmentUpdateOne
- func (suo *ShipmentUpdateOne) ClearNote() *ShipmentUpdateOne
- func (suo *ShipmentUpdateOne) ClearShipmentStatus() *ShipmentUpdateOne
- func (suo *ShipmentUpdateOne) Exec(ctx context.Context) error
- func (suo *ShipmentUpdateOne) ExecX(ctx context.Context)
- func (suo *ShipmentUpdateOne) Mutation() *ShipmentMutation
- func (suo *ShipmentUpdateOne) Save(ctx context.Context) (*Shipment, error)
- func (suo *ShipmentUpdateOne) SaveX(ctx context.Context) *Shipment
- func (suo *ShipmentUpdateOne) Select(field string, fields ...string) *ShipmentUpdateOne
- func (suo *ShipmentUpdateOne) SetNillableNote(s *string) *ShipmentUpdateOne
- func (suo *ShipmentUpdateOne) SetNillableShipmentDate(t *time.Time) *ShipmentUpdateOne
- func (suo *ShipmentUpdateOne) SetNillableStatusCode(i *int) *ShipmentUpdateOne
- func (suo *ShipmentUpdateOne) SetNote(s string) *ShipmentUpdateOne
- func (suo *ShipmentUpdateOne) SetShipmentDate(t time.Time) *ShipmentUpdateOne
- func (suo *ShipmentUpdateOne) SetShipmentStatus(s *ShipmentStatusCode) *ShipmentUpdateOne
- func (suo *ShipmentUpdateOne) SetShipmentStatusID(id int) *ShipmentUpdateOne
- func (suo *ShipmentUpdateOne) SetStatusCode(i int) *ShipmentUpdateOne
- func (suo *ShipmentUpdateOne) SetUpdatedAt(t time.Time) *ShipmentUpdateOne
- func (suo *ShipmentUpdateOne) Where(ps ...predicate.Shipment) *ShipmentUpdateOne
- type Shipments
- type Tag
- type TagClient
- func (c *TagClient) Create() *TagCreate
- func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
- func (c *TagClient) Delete() *TagDelete
- func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
- func (c *TagClient) DeleteOneID(id string) *TagDeleteOne
- func (c *TagClient) Get(ctx context.Context, id string) (*Tag, error)
- func (c *TagClient) GetX(ctx context.Context, id string) *Tag
- func (c *TagClient) Hooks() []Hook
- func (c *TagClient) Intercept(interceptors ...Interceptor)
- func (c *TagClient) Interceptors() []Interceptor
- func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
- func (c *TagClient) Query() *TagQuery
- func (c *TagClient) QueryProductTags(t *Tag) *ProductTagQuery
- func (c *TagClient) QueryProducts(t *Tag) *ProductInfoQuery
- func (c *TagClient) Update() *TagUpdate
- func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
- func (c *TagClient) UpdateOneID(id string) *TagUpdateOne
- func (c *TagClient) Use(hooks ...Hook)
- type TagCreate
- func (tc *TagCreate) AddProductIDs(ids ...string) *TagCreate
- func (tc *TagCreate) AddProducts(p ...*ProductInfo) *TagCreate
- func (tc *TagCreate) Exec(ctx context.Context) error
- func (tc *TagCreate) ExecX(ctx context.Context)
- func (tc *TagCreate) Mutation() *TagMutation
- func (tc *TagCreate) Save(ctx context.Context) (*Tag, error)
- func (tc *TagCreate) SaveX(ctx context.Context) *Tag
- func (tc *TagCreate) SetCreatedAt(t time.Time) *TagCreate
- func (tc *TagCreate) SetID(s string) *TagCreate
- func (tc *TagCreate) SetNillableCreatedAt(t *time.Time) *TagCreate
- func (tc *TagCreate) SetNillableUpdatedAt(t *time.Time) *TagCreate
- func (tc *TagCreate) SetTitle(s string) *TagCreate
- func (tc *TagCreate) SetUpdatedAt(t time.Time) *TagCreate
- type TagCreateBulk
- type TagDelete
- type TagDeleteOne
- type TagEdges
- type TagGroupBy
- func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
- func (s *TagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagGroupBy) BoolX(ctx context.Context) bool
- func (s *TagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagGroupBy) Float64X(ctx context.Context) float64
- func (s *TagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TagGroupBy) IntX(ctx context.Context) int
- func (s *TagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TagGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
- func (s *TagGroupBy) ScanX(ctx context.Context, v any)
- func (s *TagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TagGroupBy) StringX(ctx context.Context) string
- func (s *TagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TagGroupBy) StringsX(ctx context.Context) []string
- type TagMutation
- func (m *TagMutation) AddField(name string, value ent.Value) error
- func (m *TagMutation) AddProductIDs(ids ...string)
- func (m *TagMutation) AddedEdges() []string
- func (m *TagMutation) AddedField(name string) (ent.Value, bool)
- func (m *TagMutation) AddedFields() []string
- func (m *TagMutation) AddedIDs(name string) []ent.Value
- func (m *TagMutation) ClearEdge(name string) error
- func (m *TagMutation) ClearField(name string) error
- func (m *TagMutation) ClearProducts()
- func (m *TagMutation) ClearedEdges() []string
- func (m *TagMutation) ClearedFields() []string
- func (m TagMutation) Client() *Client
- func (m *TagMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TagMutation) EdgeCleared(name string) bool
- func (m *TagMutation) Field(name string) (ent.Value, bool)
- func (m *TagMutation) FieldCleared(name string) bool
- func (m *TagMutation) Fields() []string
- func (m *TagMutation) ID() (id string, exists bool)
- func (m *TagMutation) IDs(ctx context.Context) ([]string, error)
- func (m *TagMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *TagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TagMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *TagMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *TagMutation) Op() Op
- func (m *TagMutation) ProductsCleared() bool
- func (m *TagMutation) ProductsIDs() (ids []string)
- func (m *TagMutation) RemoveProductIDs(ids ...string)
- func (m *TagMutation) RemovedEdges() []string
- func (m *TagMutation) RemovedIDs(name string) []ent.Value
- func (m *TagMutation) RemovedProductsIDs() (ids []string)
- func (m *TagMutation) ResetCreatedAt()
- func (m *TagMutation) ResetEdge(name string) error
- func (m *TagMutation) ResetField(name string) error
- func (m *TagMutation) ResetProducts()
- func (m *TagMutation) ResetTitle()
- func (m *TagMutation) ResetUpdatedAt()
- func (m *TagMutation) SetCreatedAt(t time.Time)
- func (m *TagMutation) SetField(name string, value ent.Value) error
- func (m *TagMutation) SetID(id string)
- func (m *TagMutation) SetOp(op Op)
- func (m *TagMutation) SetTitle(s string)
- func (m *TagMutation) SetUpdatedAt(t time.Time)
- func (m *TagMutation) Title() (r string, exists bool)
- func (m TagMutation) Tx() (*Tx, error)
- func (m *TagMutation) Type() string
- func (m *TagMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *TagMutation) Where(ps ...predicate.Tag)
- func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
- type TagQuery
- func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
- func (tq *TagQuery) All(ctx context.Context) ([]*Tag, error)
- func (tq *TagQuery) AllX(ctx context.Context) []*Tag
- func (tq *TagQuery) Clone() *TagQuery
- func (tq *TagQuery) Count(ctx context.Context) (int, error)
- func (tq *TagQuery) CountX(ctx context.Context) int
- func (tq *TagQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TagQuery) ExistX(ctx context.Context) bool
- func (tq *TagQuery) First(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) FirstID(ctx context.Context) (id string, err error)
- func (tq *TagQuery) FirstIDX(ctx context.Context) string
- func (tq *TagQuery) FirstX(ctx context.Context) *Tag
- func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
- func (tq *TagQuery) IDs(ctx context.Context) (ids []string, err error)
- func (tq *TagQuery) IDsX(ctx context.Context) []string
- func (tq *TagQuery) Limit(limit int) *TagQuery
- func (tq *TagQuery) Offset(offset int) *TagQuery
- func (tq *TagQuery) Only(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) OnlyID(ctx context.Context) (id string, err error)
- func (tq *TagQuery) OnlyIDX(ctx context.Context) string
- func (tq *TagQuery) OnlyX(ctx context.Context) *Tag
- func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
- func (tq *TagQuery) QueryProductTags() *ProductTagQuery
- func (tq *TagQuery) QueryProducts() *ProductInfoQuery
- func (tq *TagQuery) Select(fields ...string) *TagSelect
- func (tq *TagQuery) Unique(unique bool) *TagQuery
- func (tq *TagQuery) Where(ps ...predicate.Tag) *TagQuery
- func (tq *TagQuery) WithProductTags(opts ...func(*ProductTagQuery)) *TagQuery
- func (tq *TagQuery) WithProducts(opts ...func(*ProductInfoQuery)) *TagQuery
- type TagSelect
- func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
- func (s *TagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagSelect) BoolX(ctx context.Context) bool
- func (s *TagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TagSelect) BoolsX(ctx context.Context) []bool
- func (s *TagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagSelect) Float64X(ctx context.Context) float64
- func (s *TagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagSelect) Float64sX(ctx context.Context) []float64
- func (s *TagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TagSelect) IntX(ctx context.Context) int
- func (s *TagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TagSelect) IntsX(ctx context.Context) []int
- func (ts *TagSelect) Scan(ctx context.Context, v any) error
- func (s *TagSelect) ScanX(ctx context.Context, v any)
- func (s *TagSelect) String(ctx context.Context) (_ string, err error)
- func (s *TagSelect) StringX(ctx context.Context) string
- func (s *TagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TagSelect) StringsX(ctx context.Context) []string
- type TagUpdate
- func (tu *TagUpdate) AddProductIDs(ids ...string) *TagUpdate
- func (tu *TagUpdate) AddProducts(p ...*ProductInfo) *TagUpdate
- func (tu *TagUpdate) ClearProducts() *TagUpdate
- func (tu *TagUpdate) Exec(ctx context.Context) error
- func (tu *TagUpdate) ExecX(ctx context.Context)
- func (tu *TagUpdate) Mutation() *TagMutation
- func (tu *TagUpdate) RemoveProductIDs(ids ...string) *TagUpdate
- func (tu *TagUpdate) RemoveProducts(p ...*ProductInfo) *TagUpdate
- func (tu *TagUpdate) Save(ctx context.Context) (int, error)
- func (tu *TagUpdate) SaveX(ctx context.Context) int
- func (tu *TagUpdate) SetNillableTitle(s *string) *TagUpdate
- func (tu *TagUpdate) SetTitle(s string) *TagUpdate
- func (tu *TagUpdate) SetUpdatedAt(t time.Time) *TagUpdate
- func (tu *TagUpdate) Where(ps ...predicate.Tag) *TagUpdate
- type TagUpdateOne
- func (tuo *TagUpdateOne) AddProductIDs(ids ...string) *TagUpdateOne
- func (tuo *TagUpdateOne) AddProducts(p ...*ProductInfo) *TagUpdateOne
- func (tuo *TagUpdateOne) ClearProducts() *TagUpdateOne
- func (tuo *TagUpdateOne) Exec(ctx context.Context) error
- func (tuo *TagUpdateOne) ExecX(ctx context.Context)
- func (tuo *TagUpdateOne) Mutation() *TagMutation
- func (tuo *TagUpdateOne) RemoveProductIDs(ids ...string) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveProducts(p ...*ProductInfo) *TagUpdateOne
- func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
- func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
- func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetNillableTitle(s *string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetTitle(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetUpdatedAt(t time.Time) *TagUpdateOne
- func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
- type Tags
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
- type WarehouseAssignment
- func (wa *WarehouseAssignment) QueryOrder() *OrderQuery
- func (wa *WarehouseAssignment) QueryStaff() *PersonQuery
- func (wa *WarehouseAssignment) QueryWorkUnit() *WorkUnitInfoQuery
- func (wa *WarehouseAssignment) String() string
- func (wa *WarehouseAssignment) Unwrap() *WarehouseAssignment
- func (wa *WarehouseAssignment) Update() *WarehouseAssignmentUpdateOne
- func (wa *WarehouseAssignment) Value(name string) (ent.Value, error)
- type WarehouseAssignmentClient
- func (c *WarehouseAssignmentClient) Create() *WarehouseAssignmentCreate
- func (c *WarehouseAssignmentClient) CreateBulk(builders ...*WarehouseAssignmentCreate) *WarehouseAssignmentCreateBulk
- func (c *WarehouseAssignmentClient) Delete() *WarehouseAssignmentDelete
- func (c *WarehouseAssignmentClient) DeleteOne(wa *WarehouseAssignment) *WarehouseAssignmentDeleteOne
- func (c *WarehouseAssignmentClient) DeleteOneID(id uuid.UUID) *WarehouseAssignmentDeleteOne
- func (c *WarehouseAssignmentClient) Get(ctx context.Context, id uuid.UUID) (*WarehouseAssignment, error)
- func (c *WarehouseAssignmentClient) GetX(ctx context.Context, id uuid.UUID) *WarehouseAssignment
- func (c *WarehouseAssignmentClient) Hooks() []Hook
- func (c *WarehouseAssignmentClient) Intercept(interceptors ...Interceptor)
- func (c *WarehouseAssignmentClient) Interceptors() []Interceptor
- func (c *WarehouseAssignmentClient) MapCreateBulk(slice any, setFunc func(*WarehouseAssignmentCreate, int)) *WarehouseAssignmentCreateBulk
- func (c *WarehouseAssignmentClient) Query() *WarehouseAssignmentQuery
- func (c *WarehouseAssignmentClient) QueryOrder(wa *WarehouseAssignment) *OrderQuery
- func (c *WarehouseAssignmentClient) QueryStaff(wa *WarehouseAssignment) *PersonQuery
- func (c *WarehouseAssignmentClient) QueryWorkUnit(wa *WarehouseAssignment) *WorkUnitInfoQuery
- func (c *WarehouseAssignmentClient) Update() *WarehouseAssignmentUpdate
- func (c *WarehouseAssignmentClient) UpdateOne(wa *WarehouseAssignment) *WarehouseAssignmentUpdateOne
- func (c *WarehouseAssignmentClient) UpdateOneID(id uuid.UUID) *WarehouseAssignmentUpdateOne
- func (c *WarehouseAssignmentClient) Use(hooks ...Hook)
- type WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) Exec(ctx context.Context) error
- func (wac *WarehouseAssignmentCreate) ExecX(ctx context.Context)
- func (wac *WarehouseAssignmentCreate) Mutation() *WarehouseAssignmentMutation
- func (wac *WarehouseAssignmentCreate) Save(ctx context.Context) (*WarehouseAssignment, error)
- func (wac *WarehouseAssignmentCreate) SaveX(ctx context.Context) *WarehouseAssignment
- func (wac *WarehouseAssignmentCreate) SetCreatedAt(t time.Time) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetID(u uuid.UUID) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetNillableCreatedAt(t *time.Time) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetNillableID(u *uuid.UUID) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetNillableNote(s *string) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetNillableStaffID(u *uuid.UUID) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetNillableStatus(w *warehouseassignment.Status) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetNillableUpdatedAt(t *time.Time) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetNote(s string) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetOrder(o *Order) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetOrderID(u uuid.UUID) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetStaff(p *Person) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetStaffID(u uuid.UUID) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetStatus(w warehouseassignment.Status) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetUpdatedAt(t time.Time) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetWorkUnit(w *WorkUnitInfo) *WarehouseAssignmentCreate
- func (wac *WarehouseAssignmentCreate) SetWorkUnitID(u uuid.UUID) *WarehouseAssignmentCreate
- type WarehouseAssignmentCreateBulk
- func (wacb *WarehouseAssignmentCreateBulk) Exec(ctx context.Context) error
- func (wacb *WarehouseAssignmentCreateBulk) ExecX(ctx context.Context)
- func (wacb *WarehouseAssignmentCreateBulk) Save(ctx context.Context) ([]*WarehouseAssignment, error)
- func (wacb *WarehouseAssignmentCreateBulk) SaveX(ctx context.Context) []*WarehouseAssignment
- type WarehouseAssignmentDelete
- type WarehouseAssignmentDeleteOne
- type WarehouseAssignmentEdges
- type WarehouseAssignmentGroupBy
- func (wagb *WarehouseAssignmentGroupBy) Aggregate(fns ...AggregateFunc) *WarehouseAssignmentGroupBy
- func (s *WarehouseAssignmentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WarehouseAssignmentGroupBy) BoolX(ctx context.Context) bool
- func (s *WarehouseAssignmentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WarehouseAssignmentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WarehouseAssignmentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WarehouseAssignmentGroupBy) Float64X(ctx context.Context) float64
- func (s *WarehouseAssignmentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WarehouseAssignmentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WarehouseAssignmentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WarehouseAssignmentGroupBy) IntX(ctx context.Context) int
- func (s *WarehouseAssignmentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WarehouseAssignmentGroupBy) IntsX(ctx context.Context) []int
- func (wagb *WarehouseAssignmentGroupBy) Scan(ctx context.Context, v any) error
- func (s *WarehouseAssignmentGroupBy) ScanX(ctx context.Context, v any)
- func (s *WarehouseAssignmentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WarehouseAssignmentGroupBy) StringX(ctx context.Context) string
- func (s *WarehouseAssignmentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WarehouseAssignmentGroupBy) StringsX(ctx context.Context) []string
- type WarehouseAssignmentMutation
- func (m *WarehouseAssignmentMutation) AddField(name string, value ent.Value) error
- func (m *WarehouseAssignmentMutation) AddedEdges() []string
- func (m *WarehouseAssignmentMutation) AddedField(name string) (ent.Value, bool)
- func (m *WarehouseAssignmentMutation) AddedFields() []string
- func (m *WarehouseAssignmentMutation) AddedIDs(name string) []ent.Value
- func (m *WarehouseAssignmentMutation) ClearEdge(name string) error
- func (m *WarehouseAssignmentMutation) ClearField(name string) error
- func (m *WarehouseAssignmentMutation) ClearNote()
- func (m *WarehouseAssignmentMutation) ClearOrder()
- func (m *WarehouseAssignmentMutation) ClearStaff()
- func (m *WarehouseAssignmentMutation) ClearStaffID()
- func (m *WarehouseAssignmentMutation) ClearWorkUnit()
- func (m *WarehouseAssignmentMutation) ClearedEdges() []string
- func (m *WarehouseAssignmentMutation) ClearedFields() []string
- func (m WarehouseAssignmentMutation) Client() *Client
- func (m *WarehouseAssignmentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *WarehouseAssignmentMutation) EdgeCleared(name string) bool
- func (m *WarehouseAssignmentMutation) Field(name string) (ent.Value, bool)
- func (m *WarehouseAssignmentMutation) FieldCleared(name string) bool
- func (m *WarehouseAssignmentMutation) Fields() []string
- func (m *WarehouseAssignmentMutation) ID() (id uuid.UUID, exists bool)
- func (m *WarehouseAssignmentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *WarehouseAssignmentMutation) Note() (r string, exists bool)
- func (m *WarehouseAssignmentMutation) NoteCleared() bool
- func (m *WarehouseAssignmentMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *WarehouseAssignmentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WarehouseAssignmentMutation) OldNote(ctx context.Context) (v *string, err error)
- func (m *WarehouseAssignmentMutation) OldOrderID(ctx context.Context) (v uuid.UUID, err error)
- func (m *WarehouseAssignmentMutation) OldStaffID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *WarehouseAssignmentMutation) OldStatus(ctx context.Context) (v *warehouseassignment.Status, err error)
- func (m *WarehouseAssignmentMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *WarehouseAssignmentMutation) OldWorkUnitID(ctx context.Context) (v uuid.UUID, err error)
- func (m *WarehouseAssignmentMutation) Op() Op
- func (m *WarehouseAssignmentMutation) OrderCleared() bool
- func (m *WarehouseAssignmentMutation) OrderID() (r uuid.UUID, exists bool)
- func (m *WarehouseAssignmentMutation) OrderIDs() (ids []uuid.UUID)
- func (m *WarehouseAssignmentMutation) RemovedEdges() []string
- func (m *WarehouseAssignmentMutation) RemovedIDs(name string) []ent.Value
- func (m *WarehouseAssignmentMutation) ResetCreatedAt()
- func (m *WarehouseAssignmentMutation) ResetEdge(name string) error
- func (m *WarehouseAssignmentMutation) ResetField(name string) error
- func (m *WarehouseAssignmentMutation) ResetNote()
- func (m *WarehouseAssignmentMutation) ResetOrder()
- func (m *WarehouseAssignmentMutation) ResetOrderID()
- func (m *WarehouseAssignmentMutation) ResetStaff()
- func (m *WarehouseAssignmentMutation) ResetStaffID()
- func (m *WarehouseAssignmentMutation) ResetStatus()
- func (m *WarehouseAssignmentMutation) ResetUpdatedAt()
- func (m *WarehouseAssignmentMutation) ResetWorkUnit()
- func (m *WarehouseAssignmentMutation) ResetWorkUnitID()
- func (m *WarehouseAssignmentMutation) SetCreatedAt(t time.Time)
- func (m *WarehouseAssignmentMutation) SetField(name string, value ent.Value) error
- func (m *WarehouseAssignmentMutation) SetID(id uuid.UUID)
- func (m *WarehouseAssignmentMutation) SetNote(s string)
- func (m *WarehouseAssignmentMutation) SetOp(op Op)
- func (m *WarehouseAssignmentMutation) SetOrderID(u uuid.UUID)
- func (m *WarehouseAssignmentMutation) SetStaffID(u uuid.UUID)
- func (m *WarehouseAssignmentMutation) SetStatus(w warehouseassignment.Status)
- func (m *WarehouseAssignmentMutation) SetUpdatedAt(t time.Time)
- func (m *WarehouseAssignmentMutation) SetWorkUnitID(u uuid.UUID)
- func (m *WarehouseAssignmentMutation) StaffCleared() bool
- func (m *WarehouseAssignmentMutation) StaffID() (r uuid.UUID, exists bool)
- func (m *WarehouseAssignmentMutation) StaffIDCleared() bool
- func (m *WarehouseAssignmentMutation) StaffIDs() (ids []uuid.UUID)
- func (m *WarehouseAssignmentMutation) Status() (r warehouseassignment.Status, exists bool)
- func (m WarehouseAssignmentMutation) Tx() (*Tx, error)
- func (m *WarehouseAssignmentMutation) Type() string
- func (m *WarehouseAssignmentMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *WarehouseAssignmentMutation) Where(ps ...predicate.WarehouseAssignment)
- func (m *WarehouseAssignmentMutation) WhereP(ps ...func(*sql.Selector))
- func (m *WarehouseAssignmentMutation) WorkUnitCleared() bool
- func (m *WarehouseAssignmentMutation) WorkUnitID() (r uuid.UUID, exists bool)
- func (m *WarehouseAssignmentMutation) WorkUnitIDs() (ids []uuid.UUID)
- type WarehouseAssignmentQuery
- func (waq *WarehouseAssignmentQuery) Aggregate(fns ...AggregateFunc) *WarehouseAssignmentSelect
- func (waq *WarehouseAssignmentQuery) All(ctx context.Context) ([]*WarehouseAssignment, error)
- func (waq *WarehouseAssignmentQuery) AllX(ctx context.Context) []*WarehouseAssignment
- func (waq *WarehouseAssignmentQuery) Clone() *WarehouseAssignmentQuery
- func (waq *WarehouseAssignmentQuery) Count(ctx context.Context) (int, error)
- func (waq *WarehouseAssignmentQuery) CountX(ctx context.Context) int
- func (waq *WarehouseAssignmentQuery) Exist(ctx context.Context) (bool, error)
- func (waq *WarehouseAssignmentQuery) ExistX(ctx context.Context) bool
- func (waq *WarehouseAssignmentQuery) First(ctx context.Context) (*WarehouseAssignment, error)
- func (waq *WarehouseAssignmentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (waq *WarehouseAssignmentQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (waq *WarehouseAssignmentQuery) FirstX(ctx context.Context) *WarehouseAssignment
- func (waq *WarehouseAssignmentQuery) GroupBy(field string, fields ...string) *WarehouseAssignmentGroupBy
- func (waq *WarehouseAssignmentQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (waq *WarehouseAssignmentQuery) IDsX(ctx context.Context) []uuid.UUID
- func (waq *WarehouseAssignmentQuery) Limit(limit int) *WarehouseAssignmentQuery
- func (waq *WarehouseAssignmentQuery) Offset(offset int) *WarehouseAssignmentQuery
- func (waq *WarehouseAssignmentQuery) Only(ctx context.Context) (*WarehouseAssignment, error)
- func (waq *WarehouseAssignmentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (waq *WarehouseAssignmentQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (waq *WarehouseAssignmentQuery) OnlyX(ctx context.Context) *WarehouseAssignment
- func (waq *WarehouseAssignmentQuery) Order(o ...warehouseassignment.OrderOption) *WarehouseAssignmentQuery
- func (waq *WarehouseAssignmentQuery) QueryOrder() *OrderQuery
- func (waq *WarehouseAssignmentQuery) QueryStaff() *PersonQuery
- func (waq *WarehouseAssignmentQuery) QueryWorkUnit() *WorkUnitInfoQuery
- func (waq *WarehouseAssignmentQuery) Select(fields ...string) *WarehouseAssignmentSelect
- func (waq *WarehouseAssignmentQuery) Unique(unique bool) *WarehouseAssignmentQuery
- func (waq *WarehouseAssignmentQuery) Where(ps ...predicate.WarehouseAssignment) *WarehouseAssignmentQuery
- func (waq *WarehouseAssignmentQuery) WithOrder(opts ...func(*OrderQuery)) *WarehouseAssignmentQuery
- func (waq *WarehouseAssignmentQuery) WithStaff(opts ...func(*PersonQuery)) *WarehouseAssignmentQuery
- func (waq *WarehouseAssignmentQuery) WithWorkUnit(opts ...func(*WorkUnitInfoQuery)) *WarehouseAssignmentQuery
- type WarehouseAssignmentSelect
- func (was *WarehouseAssignmentSelect) Aggregate(fns ...AggregateFunc) *WarehouseAssignmentSelect
- func (s *WarehouseAssignmentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WarehouseAssignmentSelect) BoolX(ctx context.Context) bool
- func (s *WarehouseAssignmentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WarehouseAssignmentSelect) BoolsX(ctx context.Context) []bool
- func (s *WarehouseAssignmentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WarehouseAssignmentSelect) Float64X(ctx context.Context) float64
- func (s *WarehouseAssignmentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WarehouseAssignmentSelect) Float64sX(ctx context.Context) []float64
- func (s *WarehouseAssignmentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WarehouseAssignmentSelect) IntX(ctx context.Context) int
- func (s *WarehouseAssignmentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WarehouseAssignmentSelect) IntsX(ctx context.Context) []int
- func (was *WarehouseAssignmentSelect) Scan(ctx context.Context, v any) error
- func (s *WarehouseAssignmentSelect) ScanX(ctx context.Context, v any)
- func (s *WarehouseAssignmentSelect) String(ctx context.Context) (_ string, err error)
- func (s *WarehouseAssignmentSelect) StringX(ctx context.Context) string
- func (s *WarehouseAssignmentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WarehouseAssignmentSelect) StringsX(ctx context.Context) []string
- type WarehouseAssignmentUpdate
- func (wau *WarehouseAssignmentUpdate) ClearNote() *WarehouseAssignmentUpdate
- func (wau *WarehouseAssignmentUpdate) ClearStaff() *WarehouseAssignmentUpdate
- func (wau *WarehouseAssignmentUpdate) ClearStaffID() *WarehouseAssignmentUpdate
- func (wau *WarehouseAssignmentUpdate) Exec(ctx context.Context) error
- func (wau *WarehouseAssignmentUpdate) ExecX(ctx context.Context)
- func (wau *WarehouseAssignmentUpdate) Mutation() *WarehouseAssignmentMutation
- func (wau *WarehouseAssignmentUpdate) Save(ctx context.Context) (int, error)
- func (wau *WarehouseAssignmentUpdate) SaveX(ctx context.Context) int
- func (wau *WarehouseAssignmentUpdate) SetNillableNote(s *string) *WarehouseAssignmentUpdate
- func (wau *WarehouseAssignmentUpdate) SetNillableStaffID(u *uuid.UUID) *WarehouseAssignmentUpdate
- func (wau *WarehouseAssignmentUpdate) SetNillableStatus(w *warehouseassignment.Status) *WarehouseAssignmentUpdate
- func (wau *WarehouseAssignmentUpdate) SetNote(s string) *WarehouseAssignmentUpdate
- func (wau *WarehouseAssignmentUpdate) SetStaff(p *Person) *WarehouseAssignmentUpdate
- func (wau *WarehouseAssignmentUpdate) SetStaffID(u uuid.UUID) *WarehouseAssignmentUpdate
- func (wau *WarehouseAssignmentUpdate) SetStatus(w warehouseassignment.Status) *WarehouseAssignmentUpdate
- func (wau *WarehouseAssignmentUpdate) SetUpdatedAt(t time.Time) *WarehouseAssignmentUpdate
- func (wau *WarehouseAssignmentUpdate) Where(ps ...predicate.WarehouseAssignment) *WarehouseAssignmentUpdate
- type WarehouseAssignmentUpdateOne
- func (wauo *WarehouseAssignmentUpdateOne) ClearNote() *WarehouseAssignmentUpdateOne
- func (wauo *WarehouseAssignmentUpdateOne) ClearStaff() *WarehouseAssignmentUpdateOne
- func (wauo *WarehouseAssignmentUpdateOne) ClearStaffID() *WarehouseAssignmentUpdateOne
- func (wauo *WarehouseAssignmentUpdateOne) Exec(ctx context.Context) error
- func (wauo *WarehouseAssignmentUpdateOne) ExecX(ctx context.Context)
- func (wauo *WarehouseAssignmentUpdateOne) Mutation() *WarehouseAssignmentMutation
- func (wauo *WarehouseAssignmentUpdateOne) Save(ctx context.Context) (*WarehouseAssignment, error)
- func (wauo *WarehouseAssignmentUpdateOne) SaveX(ctx context.Context) *WarehouseAssignment
- func (wauo *WarehouseAssignmentUpdateOne) Select(field string, fields ...string) *WarehouseAssignmentUpdateOne
- func (wauo *WarehouseAssignmentUpdateOne) SetNillableNote(s *string) *WarehouseAssignmentUpdateOne
- func (wauo *WarehouseAssignmentUpdateOne) SetNillableStaffID(u *uuid.UUID) *WarehouseAssignmentUpdateOne
- func (wauo *WarehouseAssignmentUpdateOne) SetNillableStatus(w *warehouseassignment.Status) *WarehouseAssignmentUpdateOne
- func (wauo *WarehouseAssignmentUpdateOne) SetNote(s string) *WarehouseAssignmentUpdateOne
- func (wauo *WarehouseAssignmentUpdateOne) SetStaff(p *Person) *WarehouseAssignmentUpdateOne
- func (wauo *WarehouseAssignmentUpdateOne) SetStaffID(u uuid.UUID) *WarehouseAssignmentUpdateOne
- func (wauo *WarehouseAssignmentUpdateOne) SetStatus(w warehouseassignment.Status) *WarehouseAssignmentUpdateOne
- func (wauo *WarehouseAssignmentUpdateOne) SetUpdatedAt(t time.Time) *WarehouseAssignmentUpdateOne
- func (wauo *WarehouseAssignmentUpdateOne) Where(ps ...predicate.WarehouseAssignment) *WarehouseAssignmentUpdateOne
- type WarehouseAssignments
- type WorkUnitInfo
- type WorkUnitInfoClient
- func (c *WorkUnitInfoClient) Create() *WorkUnitInfoCreate
- func (c *WorkUnitInfoClient) CreateBulk(builders ...*WorkUnitInfoCreate) *WorkUnitInfoCreateBulk
- func (c *WorkUnitInfoClient) Delete() *WorkUnitInfoDelete
- func (c *WorkUnitInfoClient) DeleteOne(wui *WorkUnitInfo) *WorkUnitInfoDeleteOne
- func (c *WorkUnitInfoClient) DeleteOneID(id uuid.UUID) *WorkUnitInfoDeleteOne
- func (c *WorkUnitInfoClient) Get(ctx context.Context, id uuid.UUID) (*WorkUnitInfo, error)
- func (c *WorkUnitInfoClient) GetX(ctx context.Context, id uuid.UUID) *WorkUnitInfo
- func (c *WorkUnitInfoClient) Hooks() []Hook
- func (c *WorkUnitInfoClient) Intercept(interceptors ...Interceptor)
- func (c *WorkUnitInfoClient) Interceptors() []Interceptor
- func (c *WorkUnitInfoClient) MapCreateBulk(slice any, setFunc func(*WorkUnitInfoCreate, int)) *WorkUnitInfoCreateBulk
- func (c *WorkUnitInfoClient) Query() *WorkUnitInfoQuery
- func (c *WorkUnitInfoClient) QueryAddress(wui *WorkUnitInfo) *AddressQuery
- func (c *WorkUnitInfoClient) Update() *WorkUnitInfoUpdate
- func (c *WorkUnitInfoClient) UpdateOne(wui *WorkUnitInfo) *WorkUnitInfoUpdateOne
- func (c *WorkUnitInfoClient) UpdateOneID(id uuid.UUID) *WorkUnitInfoUpdateOne
- func (c *WorkUnitInfoClient) Use(hooks ...Hook)
- type WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) Exec(ctx context.Context) error
- func (wuic *WorkUnitInfoCreate) ExecX(ctx context.Context)
- func (wuic *WorkUnitInfoCreate) Mutation() *WorkUnitInfoMutation
- func (wuic *WorkUnitInfoCreate) Save(ctx context.Context) (*WorkUnitInfo, error)
- func (wuic *WorkUnitInfoCreate) SaveX(ctx context.Context) *WorkUnitInfo
- func (wuic *WorkUnitInfoCreate) SetAddress(a *Address) *WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) SetAddressID(u uuid.UUID) *WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) SetCreatedAt(t time.Time) *WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) SetID(u uuid.UUID) *WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) SetImageURL(s string) *WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) SetName(s string) *WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) SetNillableAddressID(u *uuid.UUID) *WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) SetNillableCreatedAt(t *time.Time) *WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) SetNillableID(u *uuid.UUID) *WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) SetNillableImageURL(s *string) *WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) SetNillableType(w *workunitinfo.Type) *WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) SetNillableUpdatedAt(t *time.Time) *WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) SetType(w workunitinfo.Type) *WorkUnitInfoCreate
- func (wuic *WorkUnitInfoCreate) SetUpdatedAt(t time.Time) *WorkUnitInfoCreate
- type WorkUnitInfoCreateBulk
- func (wuicb *WorkUnitInfoCreateBulk) Exec(ctx context.Context) error
- func (wuicb *WorkUnitInfoCreateBulk) ExecX(ctx context.Context)
- func (wuicb *WorkUnitInfoCreateBulk) Save(ctx context.Context) ([]*WorkUnitInfo, error)
- func (wuicb *WorkUnitInfoCreateBulk) SaveX(ctx context.Context) []*WorkUnitInfo
- type WorkUnitInfoDelete
- type WorkUnitInfoDeleteOne
- type WorkUnitInfoEdges
- type WorkUnitInfoGroupBy
- func (wuigb *WorkUnitInfoGroupBy) Aggregate(fns ...AggregateFunc) *WorkUnitInfoGroupBy
- func (s *WorkUnitInfoGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkUnitInfoGroupBy) BoolX(ctx context.Context) bool
- func (s *WorkUnitInfoGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkUnitInfoGroupBy) BoolsX(ctx context.Context) []bool
- func (s *WorkUnitInfoGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkUnitInfoGroupBy) Float64X(ctx context.Context) float64
- func (s *WorkUnitInfoGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkUnitInfoGroupBy) Float64sX(ctx context.Context) []float64
- func (s *WorkUnitInfoGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *WorkUnitInfoGroupBy) IntX(ctx context.Context) int
- func (s *WorkUnitInfoGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *WorkUnitInfoGroupBy) IntsX(ctx context.Context) []int
- func (wuigb *WorkUnitInfoGroupBy) Scan(ctx context.Context, v any) error
- func (s *WorkUnitInfoGroupBy) ScanX(ctx context.Context, v any)
- func (s *WorkUnitInfoGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *WorkUnitInfoGroupBy) StringX(ctx context.Context) string
- func (s *WorkUnitInfoGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *WorkUnitInfoGroupBy) StringsX(ctx context.Context) []string
- type WorkUnitInfoMutation
- func (m *WorkUnitInfoMutation) AddField(name string, value ent.Value) error
- func (m *WorkUnitInfoMutation) AddedEdges() []string
- func (m *WorkUnitInfoMutation) AddedField(name string) (ent.Value, bool)
- func (m *WorkUnitInfoMutation) AddedFields() []string
- func (m *WorkUnitInfoMutation) AddedIDs(name string) []ent.Value
- func (m *WorkUnitInfoMutation) AddressCleared() bool
- func (m *WorkUnitInfoMutation) AddressID() (r uuid.UUID, exists bool)
- func (m *WorkUnitInfoMutation) AddressIDCleared() bool
- func (m *WorkUnitInfoMutation) AddressIDs() (ids []uuid.UUID)
- func (m *WorkUnitInfoMutation) ClearAddress()
- func (m *WorkUnitInfoMutation) ClearAddressID()
- func (m *WorkUnitInfoMutation) ClearEdge(name string) error
- func (m *WorkUnitInfoMutation) ClearField(name string) error
- func (m *WorkUnitInfoMutation) ClearImageURL()
- func (m *WorkUnitInfoMutation) ClearedEdges() []string
- func (m *WorkUnitInfoMutation) ClearedFields() []string
- func (m WorkUnitInfoMutation) Client() *Client
- func (m *WorkUnitInfoMutation) CreatedAt() (r time.Time, exists bool)
- func (m *WorkUnitInfoMutation) EdgeCleared(name string) bool
- func (m *WorkUnitInfoMutation) Field(name string) (ent.Value, bool)
- func (m *WorkUnitInfoMutation) FieldCleared(name string) bool
- func (m *WorkUnitInfoMutation) Fields() []string
- func (m *WorkUnitInfoMutation) GetType() (r workunitinfo.Type, exists bool)
- func (m *WorkUnitInfoMutation) ID() (id uuid.UUID, exists bool)
- func (m *WorkUnitInfoMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *WorkUnitInfoMutation) ImageURL() (r string, exists bool)
- func (m *WorkUnitInfoMutation) ImageURLCleared() bool
- func (m *WorkUnitInfoMutation) Name() (r string, exists bool)
- func (m *WorkUnitInfoMutation) OldAddressID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *WorkUnitInfoMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *WorkUnitInfoMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *WorkUnitInfoMutation) OldImageURL(ctx context.Context) (v *string, err error)
- func (m *WorkUnitInfoMutation) OldName(ctx context.Context) (v string, err error)
- func (m *WorkUnitInfoMutation) OldType(ctx context.Context) (v *workunitinfo.Type, err error)
- func (m *WorkUnitInfoMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *WorkUnitInfoMutation) Op() Op
- func (m *WorkUnitInfoMutation) RemovedEdges() []string
- func (m *WorkUnitInfoMutation) RemovedIDs(name string) []ent.Value
- func (m *WorkUnitInfoMutation) ResetAddress()
- func (m *WorkUnitInfoMutation) ResetAddressID()
- func (m *WorkUnitInfoMutation) ResetCreatedAt()
- func (m *WorkUnitInfoMutation) ResetEdge(name string) error
- func (m *WorkUnitInfoMutation) ResetField(name string) error
- func (m *WorkUnitInfoMutation) ResetImageURL()
- func (m *WorkUnitInfoMutation) ResetName()
- func (m *WorkUnitInfoMutation) ResetType()
- func (m *WorkUnitInfoMutation) ResetUpdatedAt()
- func (m *WorkUnitInfoMutation) SetAddressID(u uuid.UUID)
- func (m *WorkUnitInfoMutation) SetCreatedAt(t time.Time)
- func (m *WorkUnitInfoMutation) SetField(name string, value ent.Value) error
- func (m *WorkUnitInfoMutation) SetID(id uuid.UUID)
- func (m *WorkUnitInfoMutation) SetImageURL(s string)
- func (m *WorkUnitInfoMutation) SetName(s string)
- func (m *WorkUnitInfoMutation) SetOp(op Op)
- func (m *WorkUnitInfoMutation) SetType(w workunitinfo.Type)
- func (m *WorkUnitInfoMutation) SetUpdatedAt(t time.Time)
- func (m WorkUnitInfoMutation) Tx() (*Tx, error)
- func (m *WorkUnitInfoMutation) Type() string
- func (m *WorkUnitInfoMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *WorkUnitInfoMutation) Where(ps ...predicate.WorkUnitInfo)
- func (m *WorkUnitInfoMutation) WhereP(ps ...func(*sql.Selector))
- type WorkUnitInfoQuery
- func (wuiq *WorkUnitInfoQuery) Aggregate(fns ...AggregateFunc) *WorkUnitInfoSelect
- func (wuiq *WorkUnitInfoQuery) All(ctx context.Context) ([]*WorkUnitInfo, error)
- func (wuiq *WorkUnitInfoQuery) AllX(ctx context.Context) []*WorkUnitInfo
- func (wuiq *WorkUnitInfoQuery) Clone() *WorkUnitInfoQuery
- func (wuiq *WorkUnitInfoQuery) Count(ctx context.Context) (int, error)
- func (wuiq *WorkUnitInfoQuery) CountX(ctx context.Context) int
- func (wuiq *WorkUnitInfoQuery) Exist(ctx context.Context) (bool, error)
- func (wuiq *WorkUnitInfoQuery) ExistX(ctx context.Context) bool
- func (wuiq *WorkUnitInfoQuery) First(ctx context.Context) (*WorkUnitInfo, error)
- func (wuiq *WorkUnitInfoQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (wuiq *WorkUnitInfoQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (wuiq *WorkUnitInfoQuery) FirstX(ctx context.Context) *WorkUnitInfo
- func (wuiq *WorkUnitInfoQuery) GroupBy(field string, fields ...string) *WorkUnitInfoGroupBy
- func (wuiq *WorkUnitInfoQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (wuiq *WorkUnitInfoQuery) IDsX(ctx context.Context) []uuid.UUID
- func (wuiq *WorkUnitInfoQuery) Limit(limit int) *WorkUnitInfoQuery
- func (wuiq *WorkUnitInfoQuery) Offset(offset int) *WorkUnitInfoQuery
- func (wuiq *WorkUnitInfoQuery) Only(ctx context.Context) (*WorkUnitInfo, error)
- func (wuiq *WorkUnitInfoQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (wuiq *WorkUnitInfoQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (wuiq *WorkUnitInfoQuery) OnlyX(ctx context.Context) *WorkUnitInfo
- func (wuiq *WorkUnitInfoQuery) Order(o ...workunitinfo.OrderOption) *WorkUnitInfoQuery
- func (wuiq *WorkUnitInfoQuery) QueryAddress() *AddressQuery
- func (wuiq *WorkUnitInfoQuery) Select(fields ...string) *WorkUnitInfoSelect
- func (wuiq *WorkUnitInfoQuery) Unique(unique bool) *WorkUnitInfoQuery
- func (wuiq *WorkUnitInfoQuery) Where(ps ...predicate.WorkUnitInfo) *WorkUnitInfoQuery
- func (wuiq *WorkUnitInfoQuery) WithAddress(opts ...func(*AddressQuery)) *WorkUnitInfoQuery
- type WorkUnitInfoSelect
- func (wuis *WorkUnitInfoSelect) Aggregate(fns ...AggregateFunc) *WorkUnitInfoSelect
- func (s *WorkUnitInfoSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *WorkUnitInfoSelect) BoolX(ctx context.Context) bool
- func (s *WorkUnitInfoSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *WorkUnitInfoSelect) BoolsX(ctx context.Context) []bool
- func (s *WorkUnitInfoSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *WorkUnitInfoSelect) Float64X(ctx context.Context) float64
- func (s *WorkUnitInfoSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *WorkUnitInfoSelect) Float64sX(ctx context.Context) []float64
- func (s *WorkUnitInfoSelect) Int(ctx context.Context) (_ int, err error)
- func (s *WorkUnitInfoSelect) IntX(ctx context.Context) int
- func (s *WorkUnitInfoSelect) Ints(ctx context.Context) ([]int, error)
- func (s *WorkUnitInfoSelect) IntsX(ctx context.Context) []int
- func (wuis *WorkUnitInfoSelect) Scan(ctx context.Context, v any) error
- func (s *WorkUnitInfoSelect) ScanX(ctx context.Context, v any)
- func (s *WorkUnitInfoSelect) String(ctx context.Context) (_ string, err error)
- func (s *WorkUnitInfoSelect) StringX(ctx context.Context) string
- func (s *WorkUnitInfoSelect) Strings(ctx context.Context) ([]string, error)
- func (s *WorkUnitInfoSelect) StringsX(ctx context.Context) []string
- type WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) ClearAddress() *WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) ClearAddressID() *WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) ClearImageURL() *WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) Exec(ctx context.Context) error
- func (wuiu *WorkUnitInfoUpdate) ExecX(ctx context.Context)
- func (wuiu *WorkUnitInfoUpdate) Mutation() *WorkUnitInfoMutation
- func (wuiu *WorkUnitInfoUpdate) Save(ctx context.Context) (int, error)
- func (wuiu *WorkUnitInfoUpdate) SaveX(ctx context.Context) int
- func (wuiu *WorkUnitInfoUpdate) SetAddress(a *Address) *WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) SetAddressID(u uuid.UUID) *WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) SetImageURL(s string) *WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) SetName(s string) *WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) SetNillableAddressID(u *uuid.UUID) *WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) SetNillableImageURL(s *string) *WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) SetNillableName(s *string) *WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) SetNillableType(w *workunitinfo.Type) *WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) SetType(w workunitinfo.Type) *WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) SetUpdatedAt(t time.Time) *WorkUnitInfoUpdate
- func (wuiu *WorkUnitInfoUpdate) Where(ps ...predicate.WorkUnitInfo) *WorkUnitInfoUpdate
- type WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) ClearAddress() *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) ClearAddressID() *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) ClearImageURL() *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) Exec(ctx context.Context) error
- func (wuiuo *WorkUnitInfoUpdateOne) ExecX(ctx context.Context)
- func (wuiuo *WorkUnitInfoUpdateOne) Mutation() *WorkUnitInfoMutation
- func (wuiuo *WorkUnitInfoUpdateOne) Save(ctx context.Context) (*WorkUnitInfo, error)
- func (wuiuo *WorkUnitInfoUpdateOne) SaveX(ctx context.Context) *WorkUnitInfo
- func (wuiuo *WorkUnitInfoUpdateOne) Select(field string, fields ...string) *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) SetAddress(a *Address) *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) SetAddressID(u uuid.UUID) *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) SetImageURL(s string) *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) SetName(s string) *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) SetNillableAddressID(u *uuid.UUID) *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) SetNillableImageURL(s *string) *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) SetNillableName(s *string) *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) SetNillableType(w *workunitinfo.Type) *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) SetType(w workunitinfo.Type) *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) SetUpdatedAt(t time.Time) *WorkUnitInfoUpdateOne
- func (wuiuo *WorkUnitInfoUpdateOne) Where(ps ...predicate.WorkUnitInfo) *WorkUnitInfoUpdateOne
- type WorkUnitInfos
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAddress = "Address" TypeConversation = "Conversation" TypeInvoice = "Invoice" TypeInvoiceHistory = "InvoiceHistory" TypeInvoiceStatusCode = "InvoiceStatusCode" TypeMessage = "Message" TypeOrder = "Order" TypeOrderHistory = "OrderHistory" TypeOrderItem = "OrderItem" TypeOrderStatusCode = "OrderStatusCode" TypePerson = "Person" TypePersonAddress = "PersonAddress" TypeProductColor = "ProductColor" TypeProductImage = "ProductImage" TypeProductInfo = "ProductInfo" TypeProductQty = "ProductQty" TypeProductTag = "ProductTag" TypeShipment = "Shipment" TypeShipmentHistory = "ShipmentHistory" TypeShipmentItem = "ShipmentItem" TypeShipmentStatusCode = "ShipmentStatusCode" TypeTag = "Tag" TypeWarehouseAssignment = "WarehouseAssignment" TypeWorkUnitInfo = "WorkUnitInfo" )
Variables ¶
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 Address ¶
type Address struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // Line1 holds the value of the "line1" field. Line1 string `json:"line1,omitempty"` // Line2 holds the value of the "line2" field. Line2 *string `json:"line2,omitempty"` // City holds the value of the "city" field. City string `json:"city,omitempty"` // StateOrProvince holds the value of the "state_or_province" field. StateOrProvince string `json:"state_or_province,omitempty"` // ZipOrPostcode holds the value of the "zip_or_postcode" field. ZipOrPostcode string `json:"zip_or_postcode,omitempty"` // Country holds the value of the "country" field. Country string `json:"country,omitempty"` // OtherAddressDetails holds the value of the "other_address_details" field. OtherAddressDetails *string `json:"other_address_details,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AddressQuery when eager-loading is set. Edges AddressEdges `json:"edges"` // contains filtered or unexported fields }
Address is the model entity for the Address schema.
func (*Address) QueryPersonAddresses ¶
func (a *Address) QueryPersonAddresses() *PersonAddressQuery
QueryPersonAddresses queries the "person_addresses" edge of the Address entity.
func (*Address) QueryPersons ¶
func (a *Address) QueryPersons() *PersonQuery
QueryPersons queries the "persons" edge of the Address entity.
func (*Address) Unwrap ¶
Unwrap unwraps the Address 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 (*Address) Update ¶
func (a *Address) Update() *AddressUpdateOne
Update returns a builder for updating this Address. Note that you need to call Address.Unwrap() before calling this method if this Address was returned from a transaction, and the transaction was committed or rolled back.
type AddressClient ¶
type AddressClient struct {
// contains filtered or unexported fields
}
AddressClient is a client for the Address schema.
func NewAddressClient ¶
func NewAddressClient(c config) *AddressClient
NewAddressClient returns a client for the Address from the given config.
func (*AddressClient) Create ¶
func (c *AddressClient) Create() *AddressCreate
Create returns a builder for creating a Address entity.
func (*AddressClient) CreateBulk ¶
func (c *AddressClient) CreateBulk(builders ...*AddressCreate) *AddressCreateBulk
CreateBulk returns a builder for creating a bulk of Address entities.
func (*AddressClient) Delete ¶
func (c *AddressClient) Delete() *AddressDelete
Delete returns a delete builder for Address.
func (*AddressClient) DeleteOne ¶
func (c *AddressClient) DeleteOne(a *Address) *AddressDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AddressClient) DeleteOneID ¶
func (c *AddressClient) DeleteOneID(id uuid.UUID) *AddressDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AddressClient) Hooks ¶
func (c *AddressClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AddressClient) Intercept ¶
func (c *AddressClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `address.Intercept(f(g(h())))`.
func (*AddressClient) Interceptors ¶
func (c *AddressClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AddressClient) MapCreateBulk ¶
func (c *AddressClient) MapCreateBulk(slice any, setFunc func(*AddressCreate, int)) *AddressCreateBulk
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 (*AddressClient) Query ¶
func (c *AddressClient) Query() *AddressQuery
Query returns a query builder for Address.
func (*AddressClient) QueryPersonAddresses ¶
func (c *AddressClient) QueryPersonAddresses(a *Address) *PersonAddressQuery
QueryPersonAddresses queries the person_addresses edge of a Address.
func (*AddressClient) QueryPersons ¶
func (c *AddressClient) QueryPersons(a *Address) *PersonQuery
QueryPersons queries the persons edge of a Address.
func (*AddressClient) Update ¶
func (c *AddressClient) Update() *AddressUpdate
Update returns an update builder for Address.
func (*AddressClient) UpdateOne ¶
func (c *AddressClient) UpdateOne(a *Address) *AddressUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AddressClient) UpdateOneID ¶
func (c *AddressClient) UpdateOneID(id uuid.UUID) *AddressUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AddressClient) Use ¶
func (c *AddressClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `address.Hooks(f(g(h())))`.
type AddressCreate ¶
type AddressCreate struct {
// contains filtered or unexported fields
}
AddressCreate is the builder for creating a Address entity.
func (*AddressCreate) AddPersonIDs ¶
func (ac *AddressCreate) AddPersonIDs(ids ...uuid.UUID) *AddressCreate
AddPersonIDs adds the "persons" edge to the Person entity by IDs.
func (*AddressCreate) AddPersons ¶
func (ac *AddressCreate) AddPersons(p ...*Person) *AddressCreate
AddPersons adds the "persons" edges to the Person entity.
func (*AddressCreate) Exec ¶
func (ac *AddressCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AddressCreate) ExecX ¶
func (ac *AddressCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AddressCreate) Mutation ¶
func (ac *AddressCreate) Mutation() *AddressMutation
Mutation returns the AddressMutation object of the builder.
func (*AddressCreate) Save ¶
func (ac *AddressCreate) Save(ctx context.Context) (*Address, error)
Save creates the Address in the database.
func (*AddressCreate) SaveX ¶
func (ac *AddressCreate) SaveX(ctx context.Context) *Address
SaveX calls Save and panics if Save returns an error.
func (*AddressCreate) SetCity ¶
func (ac *AddressCreate) SetCity(s string) *AddressCreate
SetCity sets the "city" field.
func (*AddressCreate) SetCountry ¶
func (ac *AddressCreate) SetCountry(s string) *AddressCreate
SetCountry sets the "country" field.
func (*AddressCreate) SetCreatedAt ¶
func (ac *AddressCreate) SetCreatedAt(t time.Time) *AddressCreate
SetCreatedAt sets the "created_at" field.
func (*AddressCreate) SetID ¶
func (ac *AddressCreate) SetID(u uuid.UUID) *AddressCreate
SetID sets the "id" field.
func (*AddressCreate) SetLine1 ¶
func (ac *AddressCreate) SetLine1(s string) *AddressCreate
SetLine1 sets the "line1" field.
func (*AddressCreate) SetLine2 ¶
func (ac *AddressCreate) SetLine2(s string) *AddressCreate
SetLine2 sets the "line2" field.
func (*AddressCreate) SetNillableCreatedAt ¶
func (ac *AddressCreate) SetNillableCreatedAt(t *time.Time) *AddressCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AddressCreate) SetNillableID ¶
func (ac *AddressCreate) SetNillableID(u *uuid.UUID) *AddressCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AddressCreate) SetNillableLine2 ¶
func (ac *AddressCreate) SetNillableLine2(s *string) *AddressCreate
SetNillableLine2 sets the "line2" field if the given value is not nil.
func (*AddressCreate) SetNillableOtherAddressDetails ¶
func (ac *AddressCreate) SetNillableOtherAddressDetails(s *string) *AddressCreate
SetNillableOtherAddressDetails sets the "other_address_details" field if the given value is not nil.
func (*AddressCreate) SetOtherAddressDetails ¶
func (ac *AddressCreate) SetOtherAddressDetails(s string) *AddressCreate
SetOtherAddressDetails sets the "other_address_details" field.
func (*AddressCreate) SetStateOrProvince ¶
func (ac *AddressCreate) SetStateOrProvince(s string) *AddressCreate
SetStateOrProvince sets the "state_or_province" field.
func (*AddressCreate) SetZipOrPostcode ¶
func (ac *AddressCreate) SetZipOrPostcode(s string) *AddressCreate
SetZipOrPostcode sets the "zip_or_postcode" field.
type AddressCreateBulk ¶
type AddressCreateBulk struct {
// contains filtered or unexported fields
}
AddressCreateBulk is the builder for creating many Address entities in bulk.
func (*AddressCreateBulk) Exec ¶
func (acb *AddressCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AddressCreateBulk) ExecX ¶
func (acb *AddressCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AddressDelete ¶
type AddressDelete struct {
// contains filtered or unexported fields
}
AddressDelete is the builder for deleting a Address entity.
func (*AddressDelete) Exec ¶
func (ad *AddressDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AddressDelete) ExecX ¶
func (ad *AddressDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AddressDelete) Where ¶
func (ad *AddressDelete) Where(ps ...predicate.Address) *AddressDelete
Where appends a list predicates to the AddressDelete builder.
type AddressDeleteOne ¶
type AddressDeleteOne struct {
// contains filtered or unexported fields
}
AddressDeleteOne is the builder for deleting a single Address entity.
func (*AddressDeleteOne) Exec ¶
func (ado *AddressDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AddressDeleteOne) ExecX ¶
func (ado *AddressDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AddressDeleteOne) Where ¶
func (ado *AddressDeleteOne) Where(ps ...predicate.Address) *AddressDeleteOne
Where appends a list predicates to the AddressDelete builder.
type AddressEdges ¶
type AddressEdges struct { // Persons holds the value of the persons edge. Persons []*Person `json:"persons,omitempty"` // PersonAddresses holds the value of the person_addresses edge. PersonAddresses []*PersonAddress `json:"person_addresses,omitempty"` // contains filtered or unexported fields }
AddressEdges holds the relations/edges for other nodes in the graph.
func (AddressEdges) PersonAddressesOrErr ¶
func (e AddressEdges) PersonAddressesOrErr() ([]*PersonAddress, error)
PersonAddressesOrErr returns the PersonAddresses value or an error if the edge was not loaded in eager-loading.
func (AddressEdges) PersonsOrErr ¶
func (e AddressEdges) PersonsOrErr() ([]*Person, error)
PersonsOrErr returns the Persons value or an error if the edge was not loaded in eager-loading.
type AddressGroupBy ¶
type AddressGroupBy struct {
// contains filtered or unexported fields
}
AddressGroupBy is the group-by builder for Address entities.
func (*AddressGroupBy) Aggregate ¶
func (agb *AddressGroupBy) Aggregate(fns ...AggregateFunc) *AddressGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AddressGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AddressGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AddressGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AddressGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AddressGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AddressGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AddressGroupBy) Scan ¶
func (agb *AddressGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AddressGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AddressMutation ¶
type AddressMutation struct {
// contains filtered or unexported fields
}
AddressMutation represents an operation that mutates the Address nodes in the graph.
func (*AddressMutation) AddField ¶
func (m *AddressMutation) 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 (*AddressMutation) AddPersonIDs ¶
func (m *AddressMutation) AddPersonIDs(ids ...uuid.UUID)
AddPersonIDs adds the "persons" edge to the Person entity by ids.
func (*AddressMutation) AddedEdges ¶
func (m *AddressMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AddressMutation) AddedField ¶
func (m *AddressMutation) 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 (*AddressMutation) AddedFields ¶
func (m *AddressMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AddressMutation) AddedIDs ¶
func (m *AddressMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AddressMutation) City ¶
func (m *AddressMutation) City() (r string, exists bool)
City returns the value of the "city" field in the mutation.
func (*AddressMutation) ClearEdge ¶
func (m *AddressMutation) 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 (*AddressMutation) ClearField ¶
func (m *AddressMutation) 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 (*AddressMutation) ClearLine2 ¶
func (m *AddressMutation) ClearLine2()
ClearLine2 clears the value of the "line2" field.
func (*AddressMutation) ClearOtherAddressDetails ¶
func (m *AddressMutation) ClearOtherAddressDetails()
ClearOtherAddressDetails clears the value of the "other_address_details" field.
func (*AddressMutation) ClearPersons ¶
func (m *AddressMutation) ClearPersons()
ClearPersons clears the "persons" edge to the Person entity.
func (*AddressMutation) ClearedEdges ¶
func (m *AddressMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AddressMutation) ClearedFields ¶
func (m *AddressMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AddressMutation) Client ¶
func (m AddressMutation) 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 (*AddressMutation) Country ¶
func (m *AddressMutation) Country() (r string, exists bool)
Country returns the value of the "country" field in the mutation.
func (*AddressMutation) CreatedAt ¶
func (m *AddressMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AddressMutation) EdgeCleared ¶
func (m *AddressMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AddressMutation) Field ¶
func (m *AddressMutation) 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 (*AddressMutation) FieldCleared ¶
func (m *AddressMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AddressMutation) Fields ¶
func (m *AddressMutation) 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 (*AddressMutation) ID ¶
func (m *AddressMutation) ID() (id uuid.UUID, 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 (*AddressMutation) IDs ¶
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 (*AddressMutation) Line1 ¶
func (m *AddressMutation) Line1() (r string, exists bool)
Line1 returns the value of the "line1" field in the mutation.
func (*AddressMutation) Line2 ¶
func (m *AddressMutation) Line2() (r string, exists bool)
Line2 returns the value of the "line2" field in the mutation.
func (*AddressMutation) Line2Cleared ¶
func (m *AddressMutation) Line2Cleared() bool
Line2Cleared returns if the "line2" field was cleared in this mutation.
func (*AddressMutation) OldCity ¶
func (m *AddressMutation) OldCity(ctx context.Context) (v string, err error)
OldCity returns the old "city" field's value of the Address entity. If the Address 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 (*AddressMutation) OldCountry ¶
func (m *AddressMutation) OldCountry(ctx context.Context) (v string, err error)
OldCountry returns the old "country" field's value of the Address entity. If the Address 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 (*AddressMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Address entity. If the Address 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 (*AddressMutation) 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 (*AddressMutation) OldLine1 ¶
func (m *AddressMutation) OldLine1(ctx context.Context) (v string, err error)
OldLine1 returns the old "line1" field's value of the Address entity. If the Address 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 (*AddressMutation) OldLine2 ¶
func (m *AddressMutation) OldLine2(ctx context.Context) (v *string, err error)
OldLine2 returns the old "line2" field's value of the Address entity. If the Address 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 (*AddressMutation) OldOtherAddressDetails ¶
func (m *AddressMutation) OldOtherAddressDetails(ctx context.Context) (v *string, err error)
OldOtherAddressDetails returns the old "other_address_details" field's value of the Address entity. If the Address 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 (*AddressMutation) OldStateOrProvince ¶
func (m *AddressMutation) OldStateOrProvince(ctx context.Context) (v string, err error)
OldStateOrProvince returns the old "state_or_province" field's value of the Address entity. If the Address 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 (*AddressMutation) OldZipOrPostcode ¶
func (m *AddressMutation) OldZipOrPostcode(ctx context.Context) (v string, err error)
OldZipOrPostcode returns the old "zip_or_postcode" field's value of the Address entity. If the Address 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 (*AddressMutation) OtherAddressDetails ¶
func (m *AddressMutation) OtherAddressDetails() (r string, exists bool)
OtherAddressDetails returns the value of the "other_address_details" field in the mutation.
func (*AddressMutation) OtherAddressDetailsCleared ¶
func (m *AddressMutation) OtherAddressDetailsCleared() bool
OtherAddressDetailsCleared returns if the "other_address_details" field was cleared in this mutation.
func (*AddressMutation) PersonsCleared ¶
func (m *AddressMutation) PersonsCleared() bool
PersonsCleared reports if the "persons" edge to the Person entity was cleared.
func (*AddressMutation) PersonsIDs ¶
func (m *AddressMutation) PersonsIDs() (ids []uuid.UUID)
PersonsIDs returns the "persons" edge IDs in the mutation.
func (*AddressMutation) RemovePersonIDs ¶
func (m *AddressMutation) RemovePersonIDs(ids ...uuid.UUID)
RemovePersonIDs removes the "persons" edge to the Person entity by IDs.
func (*AddressMutation) RemovedEdges ¶
func (m *AddressMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AddressMutation) RemovedIDs ¶
func (m *AddressMutation) 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 (*AddressMutation) RemovedPersonsIDs ¶
func (m *AddressMutation) RemovedPersonsIDs() (ids []uuid.UUID)
RemovedPersons returns the removed IDs of the "persons" edge to the Person entity.
func (*AddressMutation) ResetCity ¶
func (m *AddressMutation) ResetCity()
ResetCity resets all changes to the "city" field.
func (*AddressMutation) ResetCountry ¶
func (m *AddressMutation) ResetCountry()
ResetCountry resets all changes to the "country" field.
func (*AddressMutation) ResetCreatedAt ¶
func (m *AddressMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AddressMutation) ResetEdge ¶
func (m *AddressMutation) 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 (*AddressMutation) ResetField ¶
func (m *AddressMutation) 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 (*AddressMutation) ResetLine1 ¶
func (m *AddressMutation) ResetLine1()
ResetLine1 resets all changes to the "line1" field.
func (*AddressMutation) ResetLine2 ¶
func (m *AddressMutation) ResetLine2()
ResetLine2 resets all changes to the "line2" field.
func (*AddressMutation) ResetOtherAddressDetails ¶
func (m *AddressMutation) ResetOtherAddressDetails()
ResetOtherAddressDetails resets all changes to the "other_address_details" field.
func (*AddressMutation) ResetPersons ¶
func (m *AddressMutation) ResetPersons()
ResetPersons resets all changes to the "persons" edge.
func (*AddressMutation) ResetStateOrProvince ¶
func (m *AddressMutation) ResetStateOrProvince()
ResetStateOrProvince resets all changes to the "state_or_province" field.
func (*AddressMutation) ResetZipOrPostcode ¶
func (m *AddressMutation) ResetZipOrPostcode()
ResetZipOrPostcode resets all changes to the "zip_or_postcode" field.
func (*AddressMutation) SetCity ¶
func (m *AddressMutation) SetCity(s string)
SetCity sets the "city" field.
func (*AddressMutation) SetCountry ¶
func (m *AddressMutation) SetCountry(s string)
SetCountry sets the "country" field.
func (*AddressMutation) SetCreatedAt ¶
func (m *AddressMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AddressMutation) SetField ¶
func (m *AddressMutation) 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 (*AddressMutation) SetID ¶
func (m *AddressMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Address entities.
func (*AddressMutation) SetLine1 ¶
func (m *AddressMutation) SetLine1(s string)
SetLine1 sets the "line1" field.
func (*AddressMutation) SetLine2 ¶
func (m *AddressMutation) SetLine2(s string)
SetLine2 sets the "line2" field.
func (*AddressMutation) SetOp ¶
func (m *AddressMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AddressMutation) SetOtherAddressDetails ¶
func (m *AddressMutation) SetOtherAddressDetails(s string)
SetOtherAddressDetails sets the "other_address_details" field.
func (*AddressMutation) SetStateOrProvince ¶
func (m *AddressMutation) SetStateOrProvince(s string)
SetStateOrProvince sets the "state_or_province" field.
func (*AddressMutation) SetZipOrPostcode ¶
func (m *AddressMutation) SetZipOrPostcode(s string)
SetZipOrPostcode sets the "zip_or_postcode" field.
func (*AddressMutation) StateOrProvince ¶
func (m *AddressMutation) StateOrProvince() (r string, exists bool)
StateOrProvince returns the value of the "state_or_province" field in the mutation.
func (AddressMutation) Tx ¶
func (m AddressMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AddressMutation) Type ¶
func (m *AddressMutation) Type() string
Type returns the node type of this mutation (Address).
func (*AddressMutation) Where ¶
func (m *AddressMutation) Where(ps ...predicate.Address)
Where appends a list predicates to the AddressMutation builder.
func (*AddressMutation) WhereP ¶
func (m *AddressMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AddressMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*AddressMutation) ZipOrPostcode ¶
func (m *AddressMutation) ZipOrPostcode() (r string, exists bool)
ZipOrPostcode returns the value of the "zip_or_postcode" field in the mutation.
type AddressQuery ¶
type AddressQuery struct {
// contains filtered or unexported fields
}
AddressQuery is the builder for querying Address entities.
func (*AddressQuery) Aggregate ¶
func (aq *AddressQuery) Aggregate(fns ...AggregateFunc) *AddressSelect
Aggregate returns a AddressSelect configured with the given aggregations.
func (*AddressQuery) All ¶
func (aq *AddressQuery) All(ctx context.Context) ([]*Address, error)
All executes the query and returns a list of Addresses.
func (*AddressQuery) AllX ¶
func (aq *AddressQuery) AllX(ctx context.Context) []*Address
AllX is like All, but panics if an error occurs.
func (*AddressQuery) Clone ¶
func (aq *AddressQuery) Clone() *AddressQuery
Clone returns a duplicate of the AddressQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AddressQuery) Count ¶
func (aq *AddressQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AddressQuery) CountX ¶
func (aq *AddressQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AddressQuery) Exist ¶
func (aq *AddressQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AddressQuery) ExistX ¶
func (aq *AddressQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AddressQuery) First ¶
func (aq *AddressQuery) First(ctx context.Context) (*Address, error)
First returns the first Address entity from the query. Returns a *NotFoundError when no Address was found.
func (*AddressQuery) FirstID ¶
FirstID returns the first Address ID from the query. Returns a *NotFoundError when no Address ID was found.
func (*AddressQuery) FirstIDX ¶
func (aq *AddressQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AddressQuery) FirstX ¶
func (aq *AddressQuery) FirstX(ctx context.Context) *Address
FirstX is like First, but panics if an error occurs.
func (*AddressQuery) GroupBy ¶
func (aq *AddressQuery) GroupBy(field string, fields ...string) *AddressGroupBy
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.Address.Query(). GroupBy(address.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AddressQuery) IDsX ¶
func (aq *AddressQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AddressQuery) Limit ¶
func (aq *AddressQuery) Limit(limit int) *AddressQuery
Limit the number of records to be returned by this query.
func (*AddressQuery) Offset ¶
func (aq *AddressQuery) Offset(offset int) *AddressQuery
Offset to start from.
func (*AddressQuery) Only ¶
func (aq *AddressQuery) Only(ctx context.Context) (*Address, error)
Only returns a single Address entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Address entity is found. Returns a *NotFoundError when no Address entities are found.
func (*AddressQuery) OnlyID ¶
OnlyID is like Only, but returns the only Address ID in the query. Returns a *NotSingularError when more than one Address ID is found. Returns a *NotFoundError when no entities are found.
func (*AddressQuery) OnlyIDX ¶
func (aq *AddressQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AddressQuery) OnlyX ¶
func (aq *AddressQuery) OnlyX(ctx context.Context) *Address
OnlyX is like Only, but panics if an error occurs.
func (*AddressQuery) Order ¶
func (aq *AddressQuery) Order(o ...address.OrderOption) *AddressQuery
Order specifies how the records should be ordered.
func (*AddressQuery) QueryPersonAddresses ¶
func (aq *AddressQuery) QueryPersonAddresses() *PersonAddressQuery
QueryPersonAddresses chains the current query on the "person_addresses" edge.
func (*AddressQuery) QueryPersons ¶
func (aq *AddressQuery) QueryPersons() *PersonQuery
QueryPersons chains the current query on the "persons" edge.
func (*AddressQuery) Select ¶
func (aq *AddressQuery) Select(fields ...string) *AddressSelect
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.Address.Query(). Select(address.FieldCreatedAt). Scan(ctx, &v)
func (*AddressQuery) Unique ¶
func (aq *AddressQuery) Unique(unique bool) *AddressQuery
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 (*AddressQuery) Where ¶
func (aq *AddressQuery) Where(ps ...predicate.Address) *AddressQuery
Where adds a new predicate for the AddressQuery builder.
func (*AddressQuery) WithPersonAddresses ¶
func (aq *AddressQuery) WithPersonAddresses(opts ...func(*PersonAddressQuery)) *AddressQuery
WithPersonAddresses tells the query-builder to eager-load the nodes that are connected to the "person_addresses" edge. The optional arguments are used to configure the query builder of the edge.
func (*AddressQuery) WithPersons ¶
func (aq *AddressQuery) WithPersons(opts ...func(*PersonQuery)) *AddressQuery
WithPersons tells the query-builder to eager-load the nodes that are connected to the "persons" edge. The optional arguments are used to configure the query builder of the edge.
type AddressSelect ¶
type AddressSelect struct { *AddressQuery // contains filtered or unexported fields }
AddressSelect is the builder for selecting fields of Address entities.
func (*AddressSelect) Aggregate ¶
func (as *AddressSelect) Aggregate(fns ...AggregateFunc) *AddressSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AddressSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AddressSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AddressSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AddressSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AddressSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AddressSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AddressSelect) Scan ¶
func (as *AddressSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AddressSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AddressUpdate ¶
type AddressUpdate struct {
// contains filtered or unexported fields
}
AddressUpdate is the builder for updating Address entities.
func (*AddressUpdate) AddPersonIDs ¶
func (au *AddressUpdate) AddPersonIDs(ids ...uuid.UUID) *AddressUpdate
AddPersonIDs adds the "persons" edge to the Person entity by IDs.
func (*AddressUpdate) AddPersons ¶
func (au *AddressUpdate) AddPersons(p ...*Person) *AddressUpdate
AddPersons adds the "persons" edges to the Person entity.
func (*AddressUpdate) ClearPersons ¶
func (au *AddressUpdate) ClearPersons() *AddressUpdate
ClearPersons clears all "persons" edges to the Person entity.
func (*AddressUpdate) Exec ¶
func (au *AddressUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AddressUpdate) ExecX ¶
func (au *AddressUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AddressUpdate) Mutation ¶
func (au *AddressUpdate) Mutation() *AddressMutation
Mutation returns the AddressMutation object of the builder.
func (*AddressUpdate) RemovePersonIDs ¶
func (au *AddressUpdate) RemovePersonIDs(ids ...uuid.UUID) *AddressUpdate
RemovePersonIDs removes the "persons" edge to Person entities by IDs.
func (*AddressUpdate) RemovePersons ¶
func (au *AddressUpdate) RemovePersons(p ...*Person) *AddressUpdate
RemovePersons removes "persons" edges to Person entities.
func (*AddressUpdate) Save ¶
func (au *AddressUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AddressUpdate) SaveX ¶
func (au *AddressUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AddressUpdate) Where ¶
func (au *AddressUpdate) Where(ps ...predicate.Address) *AddressUpdate
Where appends a list predicates to the AddressUpdate builder.
type AddressUpdateOne ¶
type AddressUpdateOne struct {
// contains filtered or unexported fields
}
AddressUpdateOne is the builder for updating a single Address entity.
func (*AddressUpdateOne) AddPersonIDs ¶
func (auo *AddressUpdateOne) AddPersonIDs(ids ...uuid.UUID) *AddressUpdateOne
AddPersonIDs adds the "persons" edge to the Person entity by IDs.
func (*AddressUpdateOne) AddPersons ¶
func (auo *AddressUpdateOne) AddPersons(p ...*Person) *AddressUpdateOne
AddPersons adds the "persons" edges to the Person entity.
func (*AddressUpdateOne) ClearPersons ¶
func (auo *AddressUpdateOne) ClearPersons() *AddressUpdateOne
ClearPersons clears all "persons" edges to the Person entity.
func (*AddressUpdateOne) Exec ¶
func (auo *AddressUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AddressUpdateOne) ExecX ¶
func (auo *AddressUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AddressUpdateOne) Mutation ¶
func (auo *AddressUpdateOne) Mutation() *AddressMutation
Mutation returns the AddressMutation object of the builder.
func (*AddressUpdateOne) RemovePersonIDs ¶
func (auo *AddressUpdateOne) RemovePersonIDs(ids ...uuid.UUID) *AddressUpdateOne
RemovePersonIDs removes the "persons" edge to Person entities by IDs.
func (*AddressUpdateOne) RemovePersons ¶
func (auo *AddressUpdateOne) RemovePersons(p ...*Person) *AddressUpdateOne
RemovePersons removes "persons" edges to Person entities.
func (*AddressUpdateOne) Save ¶
func (auo *AddressUpdateOne) Save(ctx context.Context) (*Address, error)
Save executes the query and returns the updated Address entity.
func (*AddressUpdateOne) SaveX ¶
func (auo *AddressUpdateOne) SaveX(ctx context.Context) *Address
SaveX is like Save, but panics if an error occurs.
func (*AddressUpdateOne) Select ¶
func (auo *AddressUpdateOne) Select(field string, fields ...string) *AddressUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AddressUpdateOne) Where ¶
func (auo *AddressUpdateOne) Where(ps ...predicate.Address) *AddressUpdateOne
Where appends a list predicates to the AddressUpdate builder.
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 Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Address is the client for interacting with the Address builders. Address *AddressClient // Conversation is the client for interacting with the Conversation builders. Conversation *ConversationClient // Invoice is the client for interacting with the Invoice builders. Invoice *InvoiceClient // InvoiceHistory is the client for interacting with the InvoiceHistory builders. InvoiceHistory *InvoiceHistoryClient // InvoiceStatusCode is the client for interacting with the InvoiceStatusCode builders. InvoiceStatusCode *InvoiceStatusCodeClient // Message is the client for interacting with the Message builders. Message *MessageClient // Order is the client for interacting with the Order builders. Order *OrderClient // OrderHistory is the client for interacting with the OrderHistory builders. OrderHistory *OrderHistoryClient // OrderItem is the client for interacting with the OrderItem builders. OrderItem *OrderItemClient // OrderStatusCode is the client for interacting with the OrderStatusCode builders. OrderStatusCode *OrderStatusCodeClient // Person is the client for interacting with the Person builders. Person *PersonClient // PersonAddress is the client for interacting with the PersonAddress builders. PersonAddress *PersonAddressClient // ProductColor is the client for interacting with the ProductColor builders. ProductColor *ProductColorClient // ProductImage is the client for interacting with the ProductImage builders. ProductImage *ProductImageClient // ProductInfo is the client for interacting with the ProductInfo builders. ProductInfo *ProductInfoClient // ProductQty is the client for interacting with the ProductQty builders. ProductQty *ProductQtyClient // ProductTag is the client for interacting with the ProductTag builders. ProductTag *ProductTagClient // Shipment is the client for interacting with the Shipment builders. Shipment *ShipmentClient // ShipmentHistory is the client for interacting with the ShipmentHistory builders. ShipmentHistory *ShipmentHistoryClient // ShipmentItem is the client for interacting with the ShipmentItem builders. ShipmentItem *ShipmentItemClient // ShipmentStatusCode is the client for interacting with the ShipmentStatusCode builders. ShipmentStatusCode *ShipmentStatusCodeClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // WarehouseAssignment is the client for interacting with the WarehouseAssignment builders. WarehouseAssignment *WarehouseAssignmentClient // WorkUnitInfo is the client for interacting with the WorkUnitInfo builders. WorkUnitInfo *WorkUnitInfoClient // 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(). Address. 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 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 Conversation ¶
type Conversation struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // Title holds the value of the "title" field. Title *string `json:"title,omitempty"` // PersonOneID holds the value of the "person_one_id" field. PersonOneID uuid.UUID `json:"person_one_id,omitempty"` // PersonTwoID holds the value of the "person_two_id" field. PersonTwoID uuid.UUID `json:"person_two_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ConversationQuery when eager-loading is set. Edges ConversationEdges `json:"edges"` // contains filtered or unexported fields }
Conversation is the model entity for the Conversation schema.
func (*Conversation) QueryPersonOne ¶
func (c *Conversation) QueryPersonOne() *PersonQuery
QueryPersonOne queries the "person_one" edge of the Conversation entity.
func (*Conversation) QueryPersonTwo ¶
func (c *Conversation) QueryPersonTwo() *PersonQuery
QueryPersonTwo queries the "person_two" edge of the Conversation entity.
func (*Conversation) String ¶
func (c *Conversation) String() string
String implements the fmt.Stringer.
func (*Conversation) Unwrap ¶
func (c *Conversation) Unwrap() *Conversation
Unwrap unwraps the Conversation 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 (*Conversation) Update ¶
func (c *Conversation) Update() *ConversationUpdateOne
Update returns a builder for updating this Conversation. Note that you need to call Conversation.Unwrap() before calling this method if this Conversation was returned from a transaction, and the transaction was committed or rolled back.
type ConversationClient ¶
type ConversationClient struct {
// contains filtered or unexported fields
}
ConversationClient is a client for the Conversation schema.
func NewConversationClient ¶
func NewConversationClient(c config) *ConversationClient
NewConversationClient returns a client for the Conversation from the given config.
func (*ConversationClient) Create ¶
func (c *ConversationClient) Create() *ConversationCreate
Create returns a builder for creating a Conversation entity.
func (*ConversationClient) CreateBulk ¶
func (c *ConversationClient) CreateBulk(builders ...*ConversationCreate) *ConversationCreateBulk
CreateBulk returns a builder for creating a bulk of Conversation entities.
func (*ConversationClient) Delete ¶
func (c *ConversationClient) Delete() *ConversationDelete
Delete returns a delete builder for Conversation.
func (*ConversationClient) DeleteOne ¶
func (c *ConversationClient) DeleteOne(co *Conversation) *ConversationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ConversationClient) DeleteOneID ¶
func (c *ConversationClient) DeleteOneID(id uuid.UUID) *ConversationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ConversationClient) Get ¶
func (c *ConversationClient) Get(ctx context.Context, id uuid.UUID) (*Conversation, error)
Get returns a Conversation entity by its id.
func (*ConversationClient) GetX ¶
func (c *ConversationClient) GetX(ctx context.Context, id uuid.UUID) *Conversation
GetX is like Get, but panics if an error occurs.
func (*ConversationClient) Hooks ¶
func (c *ConversationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ConversationClient) Intercept ¶
func (c *ConversationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `conversation.Intercept(f(g(h())))`.
func (*ConversationClient) Interceptors ¶
func (c *ConversationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ConversationClient) MapCreateBulk ¶
func (c *ConversationClient) MapCreateBulk(slice any, setFunc func(*ConversationCreate, int)) *ConversationCreateBulk
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 (*ConversationClient) Query ¶
func (c *ConversationClient) Query() *ConversationQuery
Query returns a query builder for Conversation.
func (*ConversationClient) QueryPersonOne ¶
func (c *ConversationClient) QueryPersonOne(co *Conversation) *PersonQuery
QueryPersonOne queries the person_one edge of a Conversation.
func (*ConversationClient) QueryPersonTwo ¶
func (c *ConversationClient) QueryPersonTwo(co *Conversation) *PersonQuery
QueryPersonTwo queries the person_two edge of a Conversation.
func (*ConversationClient) Update ¶
func (c *ConversationClient) Update() *ConversationUpdate
Update returns an update builder for Conversation.
func (*ConversationClient) UpdateOne ¶
func (c *ConversationClient) UpdateOne(co *Conversation) *ConversationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ConversationClient) UpdateOneID ¶
func (c *ConversationClient) UpdateOneID(id uuid.UUID) *ConversationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ConversationClient) Use ¶
func (c *ConversationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `conversation.Hooks(f(g(h())))`.
type ConversationCreate ¶
type ConversationCreate struct {
// contains filtered or unexported fields
}
ConversationCreate is the builder for creating a Conversation entity.
func (*ConversationCreate) Exec ¶
func (cc *ConversationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ConversationCreate) ExecX ¶
func (cc *ConversationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConversationCreate) Mutation ¶
func (cc *ConversationCreate) Mutation() *ConversationMutation
Mutation returns the ConversationMutation object of the builder.
func (*ConversationCreate) Save ¶
func (cc *ConversationCreate) Save(ctx context.Context) (*Conversation, error)
Save creates the Conversation in the database.
func (*ConversationCreate) SaveX ¶
func (cc *ConversationCreate) SaveX(ctx context.Context) *Conversation
SaveX calls Save and panics if Save returns an error.
func (*ConversationCreate) SetCreatedAt ¶
func (cc *ConversationCreate) SetCreatedAt(t time.Time) *ConversationCreate
SetCreatedAt sets the "created_at" field.
func (*ConversationCreate) SetID ¶
func (cc *ConversationCreate) SetID(u uuid.UUID) *ConversationCreate
SetID sets the "id" field.
func (*ConversationCreate) SetNillableCreatedAt ¶
func (cc *ConversationCreate) SetNillableCreatedAt(t *time.Time) *ConversationCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ConversationCreate) SetNillableID ¶
func (cc *ConversationCreate) SetNillableID(u *uuid.UUID) *ConversationCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ConversationCreate) SetNillableTitle ¶
func (cc *ConversationCreate) SetNillableTitle(s *string) *ConversationCreate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*ConversationCreate) SetNillableUpdatedAt ¶
func (cc *ConversationCreate) SetNillableUpdatedAt(t *time.Time) *ConversationCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ConversationCreate) SetPersonOne ¶
func (cc *ConversationCreate) SetPersonOne(p *Person) *ConversationCreate
SetPersonOne sets the "person_one" edge to the Person entity.
func (*ConversationCreate) SetPersonOneID ¶
func (cc *ConversationCreate) SetPersonOneID(u uuid.UUID) *ConversationCreate
SetPersonOneID sets the "person_one_id" field.
func (*ConversationCreate) SetPersonTwo ¶
func (cc *ConversationCreate) SetPersonTwo(p *Person) *ConversationCreate
SetPersonTwo sets the "person_two" edge to the Person entity.
func (*ConversationCreate) SetPersonTwoID ¶
func (cc *ConversationCreate) SetPersonTwoID(u uuid.UUID) *ConversationCreate
SetPersonTwoID sets the "person_two_id" field.
func (*ConversationCreate) SetTitle ¶
func (cc *ConversationCreate) SetTitle(s string) *ConversationCreate
SetTitle sets the "title" field.
func (*ConversationCreate) SetUpdatedAt ¶
func (cc *ConversationCreate) SetUpdatedAt(t time.Time) *ConversationCreate
SetUpdatedAt sets the "updated_at" field.
type ConversationCreateBulk ¶
type ConversationCreateBulk struct {
// contains filtered or unexported fields
}
ConversationCreateBulk is the builder for creating many Conversation entities in bulk.
func (*ConversationCreateBulk) Exec ¶
func (ccb *ConversationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ConversationCreateBulk) ExecX ¶
func (ccb *ConversationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConversationCreateBulk) Save ¶
func (ccb *ConversationCreateBulk) Save(ctx context.Context) ([]*Conversation, error)
Save creates the Conversation entities in the database.
func (*ConversationCreateBulk) SaveX ¶
func (ccb *ConversationCreateBulk) SaveX(ctx context.Context) []*Conversation
SaveX is like Save, but panics if an error occurs.
type ConversationDelete ¶
type ConversationDelete struct {
// contains filtered or unexported fields
}
ConversationDelete is the builder for deleting a Conversation entity.
func (*ConversationDelete) Exec ¶
func (cd *ConversationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ConversationDelete) ExecX ¶
func (cd *ConversationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ConversationDelete) Where ¶
func (cd *ConversationDelete) Where(ps ...predicate.Conversation) *ConversationDelete
Where appends a list predicates to the ConversationDelete builder.
type ConversationDeleteOne ¶
type ConversationDeleteOne struct {
// contains filtered or unexported fields
}
ConversationDeleteOne is the builder for deleting a single Conversation entity.
func (*ConversationDeleteOne) Exec ¶
func (cdo *ConversationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ConversationDeleteOne) ExecX ¶
func (cdo *ConversationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConversationDeleteOne) Where ¶
func (cdo *ConversationDeleteOne) Where(ps ...predicate.Conversation) *ConversationDeleteOne
Where appends a list predicates to the ConversationDelete builder.
type ConversationEdges ¶
type ConversationEdges struct { // PersonOne holds the value of the person_one edge. PersonOne *Person `json:"person_one,omitempty"` // PersonTwo holds the value of the person_two edge. PersonTwo *Person `json:"person_two,omitempty"` // contains filtered or unexported fields }
ConversationEdges holds the relations/edges for other nodes in the graph.
func (ConversationEdges) PersonOneOrErr ¶
func (e ConversationEdges) PersonOneOrErr() (*Person, error)
PersonOneOrErr returns the PersonOne value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ConversationEdges) PersonTwoOrErr ¶
func (e ConversationEdges) PersonTwoOrErr() (*Person, error)
PersonTwoOrErr returns the PersonTwo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ConversationGroupBy ¶
type ConversationGroupBy struct {
// contains filtered or unexported fields
}
ConversationGroupBy is the group-by builder for Conversation entities.
func (*ConversationGroupBy) Aggregate ¶
func (cgb *ConversationGroupBy) Aggregate(fns ...AggregateFunc) *ConversationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ConversationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ConversationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ConversationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ConversationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ConversationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ConversationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ConversationGroupBy) Scan ¶
func (cgb *ConversationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ConversationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ConversationMutation ¶
type ConversationMutation struct {
// contains filtered or unexported fields
}
ConversationMutation represents an operation that mutates the Conversation nodes in the graph.
func (*ConversationMutation) AddField ¶
func (m *ConversationMutation) 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 (*ConversationMutation) AddedEdges ¶
func (m *ConversationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ConversationMutation) AddedField ¶
func (m *ConversationMutation) 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 (*ConversationMutation) AddedFields ¶
func (m *ConversationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ConversationMutation) AddedIDs ¶
func (m *ConversationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ConversationMutation) ClearEdge ¶
func (m *ConversationMutation) 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 (*ConversationMutation) ClearField ¶
func (m *ConversationMutation) 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 (*ConversationMutation) ClearPersonOne ¶
func (m *ConversationMutation) ClearPersonOne()
ClearPersonOne clears the "person_one" edge to the Person entity.
func (*ConversationMutation) ClearPersonTwo ¶
func (m *ConversationMutation) ClearPersonTwo()
ClearPersonTwo clears the "person_two" edge to the Person entity.
func (*ConversationMutation) ClearTitle ¶
func (m *ConversationMutation) ClearTitle()
ClearTitle clears the value of the "title" field.
func (*ConversationMutation) ClearedEdges ¶
func (m *ConversationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ConversationMutation) ClearedFields ¶
func (m *ConversationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ConversationMutation) Client ¶
func (m ConversationMutation) 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 (*ConversationMutation) CreatedAt ¶
func (m *ConversationMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ConversationMutation) EdgeCleared ¶
func (m *ConversationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ConversationMutation) Field ¶
func (m *ConversationMutation) 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 (*ConversationMutation) FieldCleared ¶
func (m *ConversationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ConversationMutation) Fields ¶
func (m *ConversationMutation) 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 (*ConversationMutation) ID ¶
func (m *ConversationMutation) ID() (id uuid.UUID, 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 (*ConversationMutation) IDs ¶
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 (*ConversationMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Conversation entity. If the Conversation 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 (*ConversationMutation) 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 (*ConversationMutation) OldPersonOneID ¶
OldPersonOneID returns the old "person_one_id" field's value of the Conversation entity. If the Conversation 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 (*ConversationMutation) OldPersonTwoID ¶
OldPersonTwoID returns the old "person_two_id" field's value of the Conversation entity. If the Conversation 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 (*ConversationMutation) OldTitle ¶
func (m *ConversationMutation) OldTitle(ctx context.Context) (v *string, err error)
OldTitle returns the old "title" field's value of the Conversation entity. If the Conversation 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 (*ConversationMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Conversation entity. If the Conversation 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 (*ConversationMutation) Op ¶
func (m *ConversationMutation) Op() Op
Op returns the operation name.
func (*ConversationMutation) PersonOneCleared ¶
func (m *ConversationMutation) PersonOneCleared() bool
PersonOneCleared reports if the "person_one" edge to the Person entity was cleared.
func (*ConversationMutation) PersonOneID ¶
func (m *ConversationMutation) PersonOneID() (r uuid.UUID, exists bool)
PersonOneID returns the value of the "person_one_id" field in the mutation.
func (*ConversationMutation) PersonOneIDs ¶
func (m *ConversationMutation) PersonOneIDs() (ids []uuid.UUID)
PersonOneIDs returns the "person_one" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PersonOneID instead. It exists only for internal usage by the builders.
func (*ConversationMutation) PersonTwoCleared ¶
func (m *ConversationMutation) PersonTwoCleared() bool
PersonTwoCleared reports if the "person_two" edge to the Person entity was cleared.
func (*ConversationMutation) PersonTwoID ¶
func (m *ConversationMutation) PersonTwoID() (r uuid.UUID, exists bool)
PersonTwoID returns the value of the "person_two_id" field in the mutation.
func (*ConversationMutation) PersonTwoIDs ¶
func (m *ConversationMutation) PersonTwoIDs() (ids []uuid.UUID)
PersonTwoIDs returns the "person_two" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PersonTwoID instead. It exists only for internal usage by the builders.
func (*ConversationMutation) RemovedEdges ¶
func (m *ConversationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ConversationMutation) RemovedIDs ¶
func (m *ConversationMutation) 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 (*ConversationMutation) ResetCreatedAt ¶
func (m *ConversationMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ConversationMutation) ResetEdge ¶
func (m *ConversationMutation) 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 (*ConversationMutation) ResetField ¶
func (m *ConversationMutation) 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 (*ConversationMutation) ResetPersonOne ¶
func (m *ConversationMutation) ResetPersonOne()
ResetPersonOne resets all changes to the "person_one" edge.
func (*ConversationMutation) ResetPersonOneID ¶
func (m *ConversationMutation) ResetPersonOneID()
ResetPersonOneID resets all changes to the "person_one_id" field.
func (*ConversationMutation) ResetPersonTwo ¶
func (m *ConversationMutation) ResetPersonTwo()
ResetPersonTwo resets all changes to the "person_two" edge.
func (*ConversationMutation) ResetPersonTwoID ¶
func (m *ConversationMutation) ResetPersonTwoID()
ResetPersonTwoID resets all changes to the "person_two_id" field.
func (*ConversationMutation) ResetTitle ¶
func (m *ConversationMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*ConversationMutation) ResetUpdatedAt ¶
func (m *ConversationMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ConversationMutation) SetCreatedAt ¶
func (m *ConversationMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ConversationMutation) SetField ¶
func (m *ConversationMutation) 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 (*ConversationMutation) SetID ¶
func (m *ConversationMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Conversation entities.
func (*ConversationMutation) SetOp ¶
func (m *ConversationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ConversationMutation) SetPersonOneID ¶
func (m *ConversationMutation) SetPersonOneID(u uuid.UUID)
SetPersonOneID sets the "person_one_id" field.
func (*ConversationMutation) SetPersonTwoID ¶
func (m *ConversationMutation) SetPersonTwoID(u uuid.UUID)
SetPersonTwoID sets the "person_two_id" field.
func (*ConversationMutation) SetTitle ¶
func (m *ConversationMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*ConversationMutation) SetUpdatedAt ¶
func (m *ConversationMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ConversationMutation) Title ¶
func (m *ConversationMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (*ConversationMutation) TitleCleared ¶
func (m *ConversationMutation) TitleCleared() bool
TitleCleared returns if the "title" field was cleared in this mutation.
func (ConversationMutation) Tx ¶
func (m ConversationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ConversationMutation) Type ¶
func (m *ConversationMutation) Type() string
Type returns the node type of this mutation (Conversation).
func (*ConversationMutation) UpdatedAt ¶
func (m *ConversationMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ConversationMutation) Where ¶
func (m *ConversationMutation) Where(ps ...predicate.Conversation)
Where appends a list predicates to the ConversationMutation builder.
func (*ConversationMutation) WhereP ¶
func (m *ConversationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ConversationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ConversationQuery ¶
type ConversationQuery struct {
// contains filtered or unexported fields
}
ConversationQuery is the builder for querying Conversation entities.
func (*ConversationQuery) Aggregate ¶
func (cq *ConversationQuery) Aggregate(fns ...AggregateFunc) *ConversationSelect
Aggregate returns a ConversationSelect configured with the given aggregations.
func (*ConversationQuery) All ¶
func (cq *ConversationQuery) All(ctx context.Context) ([]*Conversation, error)
All executes the query and returns a list of Conversations.
func (*ConversationQuery) AllX ¶
func (cq *ConversationQuery) AllX(ctx context.Context) []*Conversation
AllX is like All, but panics if an error occurs.
func (*ConversationQuery) Clone ¶
func (cq *ConversationQuery) Clone() *ConversationQuery
Clone returns a duplicate of the ConversationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ConversationQuery) Count ¶
func (cq *ConversationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ConversationQuery) CountX ¶
func (cq *ConversationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ConversationQuery) Exist ¶
func (cq *ConversationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ConversationQuery) ExistX ¶
func (cq *ConversationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ConversationQuery) First ¶
func (cq *ConversationQuery) First(ctx context.Context) (*Conversation, error)
First returns the first Conversation entity from the query. Returns a *NotFoundError when no Conversation was found.
func (*ConversationQuery) FirstID ¶
FirstID returns the first Conversation ID from the query. Returns a *NotFoundError when no Conversation ID was found.
func (*ConversationQuery) FirstIDX ¶
func (cq *ConversationQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ConversationQuery) FirstX ¶
func (cq *ConversationQuery) FirstX(ctx context.Context) *Conversation
FirstX is like First, but panics if an error occurs.
func (*ConversationQuery) GroupBy ¶
func (cq *ConversationQuery) GroupBy(field string, fields ...string) *ConversationGroupBy
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.Conversation.Query(). GroupBy(conversation.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ConversationQuery) IDsX ¶
func (cq *ConversationQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ConversationQuery) Limit ¶
func (cq *ConversationQuery) Limit(limit int) *ConversationQuery
Limit the number of records to be returned by this query.
func (*ConversationQuery) Offset ¶
func (cq *ConversationQuery) Offset(offset int) *ConversationQuery
Offset to start from.
func (*ConversationQuery) Only ¶
func (cq *ConversationQuery) Only(ctx context.Context) (*Conversation, error)
Only returns a single Conversation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Conversation entity is found. Returns a *NotFoundError when no Conversation entities are found.
func (*ConversationQuery) OnlyID ¶
OnlyID is like Only, but returns the only Conversation ID in the query. Returns a *NotSingularError when more than one Conversation ID is found. Returns a *NotFoundError when no entities are found.
func (*ConversationQuery) OnlyIDX ¶
func (cq *ConversationQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ConversationQuery) OnlyX ¶
func (cq *ConversationQuery) OnlyX(ctx context.Context) *Conversation
OnlyX is like Only, but panics if an error occurs.
func (*ConversationQuery) Order ¶
func (cq *ConversationQuery) Order(o ...conversation.OrderOption) *ConversationQuery
Order specifies how the records should be ordered.
func (*ConversationQuery) QueryPersonOne ¶
func (cq *ConversationQuery) QueryPersonOne() *PersonQuery
QueryPersonOne chains the current query on the "person_one" edge.
func (*ConversationQuery) QueryPersonTwo ¶
func (cq *ConversationQuery) QueryPersonTwo() *PersonQuery
QueryPersonTwo chains the current query on the "person_two" edge.
func (*ConversationQuery) Select ¶
func (cq *ConversationQuery) Select(fields ...string) *ConversationSelect
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.Conversation.Query(). Select(conversation.FieldCreatedAt). Scan(ctx, &v)
func (*ConversationQuery) Unique ¶
func (cq *ConversationQuery) Unique(unique bool) *ConversationQuery
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 (*ConversationQuery) Where ¶
func (cq *ConversationQuery) Where(ps ...predicate.Conversation) *ConversationQuery
Where adds a new predicate for the ConversationQuery builder.
func (*ConversationQuery) WithPersonOne ¶
func (cq *ConversationQuery) WithPersonOne(opts ...func(*PersonQuery)) *ConversationQuery
WithPersonOne tells the query-builder to eager-load the nodes that are connected to the "person_one" edge. The optional arguments are used to configure the query builder of the edge.
func (*ConversationQuery) WithPersonTwo ¶
func (cq *ConversationQuery) WithPersonTwo(opts ...func(*PersonQuery)) *ConversationQuery
WithPersonTwo tells the query-builder to eager-load the nodes that are connected to the "person_two" edge. The optional arguments are used to configure the query builder of the edge.
type ConversationSelect ¶
type ConversationSelect struct { *ConversationQuery // contains filtered or unexported fields }
ConversationSelect is the builder for selecting fields of Conversation entities.
func (*ConversationSelect) Aggregate ¶
func (cs *ConversationSelect) Aggregate(fns ...AggregateFunc) *ConversationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ConversationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ConversationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ConversationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ConversationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ConversationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ConversationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ConversationSelect) Scan ¶
func (cs *ConversationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ConversationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ConversationUpdate ¶
type ConversationUpdate struct {
// contains filtered or unexported fields
}
ConversationUpdate is the builder for updating Conversation entities.
func (*ConversationUpdate) ClearTitle ¶
func (cu *ConversationUpdate) ClearTitle() *ConversationUpdate
ClearTitle clears the value of the "title" field.
func (*ConversationUpdate) Exec ¶
func (cu *ConversationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ConversationUpdate) ExecX ¶
func (cu *ConversationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConversationUpdate) Mutation ¶
func (cu *ConversationUpdate) Mutation() *ConversationMutation
Mutation returns the ConversationMutation object of the builder.
func (*ConversationUpdate) Save ¶
func (cu *ConversationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ConversationUpdate) SaveX ¶
func (cu *ConversationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ConversationUpdate) SetNillableTitle ¶
func (cu *ConversationUpdate) SetNillableTitle(s *string) *ConversationUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*ConversationUpdate) SetTitle ¶
func (cu *ConversationUpdate) SetTitle(s string) *ConversationUpdate
SetTitle sets the "title" field.
func (*ConversationUpdate) SetUpdatedAt ¶
func (cu *ConversationUpdate) SetUpdatedAt(t time.Time) *ConversationUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ConversationUpdate) Where ¶
func (cu *ConversationUpdate) Where(ps ...predicate.Conversation) *ConversationUpdate
Where appends a list predicates to the ConversationUpdate builder.
type ConversationUpdateOne ¶
type ConversationUpdateOne struct {
// contains filtered or unexported fields
}
ConversationUpdateOne is the builder for updating a single Conversation entity.
func (*ConversationUpdateOne) ClearTitle ¶
func (cuo *ConversationUpdateOne) ClearTitle() *ConversationUpdateOne
ClearTitle clears the value of the "title" field.
func (*ConversationUpdateOne) Exec ¶
func (cuo *ConversationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ConversationUpdateOne) ExecX ¶
func (cuo *ConversationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConversationUpdateOne) Mutation ¶
func (cuo *ConversationUpdateOne) Mutation() *ConversationMutation
Mutation returns the ConversationMutation object of the builder.
func (*ConversationUpdateOne) Save ¶
func (cuo *ConversationUpdateOne) Save(ctx context.Context) (*Conversation, error)
Save executes the query and returns the updated Conversation entity.
func (*ConversationUpdateOne) SaveX ¶
func (cuo *ConversationUpdateOne) SaveX(ctx context.Context) *Conversation
SaveX is like Save, but panics if an error occurs.
func (*ConversationUpdateOne) Select ¶
func (cuo *ConversationUpdateOne) Select(field string, fields ...string) *ConversationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ConversationUpdateOne) SetNillableTitle ¶
func (cuo *ConversationUpdateOne) SetNillableTitle(s *string) *ConversationUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*ConversationUpdateOne) SetTitle ¶
func (cuo *ConversationUpdateOne) SetTitle(s string) *ConversationUpdateOne
SetTitle sets the "title" field.
func (*ConversationUpdateOne) SetUpdatedAt ¶
func (cuo *ConversationUpdateOne) SetUpdatedAt(t time.Time) *ConversationUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ConversationUpdateOne) Where ¶
func (cuo *ConversationUpdateOne) Where(ps ...predicate.Conversation) *ConversationUpdateOne
Where appends a list predicates to the ConversationUpdate builder.
type Conversations ¶
type Conversations []*Conversation
Conversations is a parsable slice of Conversation.
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 Invoice ¶
type Invoice struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // OrderID holds the value of the "order_id" field. OrderID uuid.UUID `json:"order_id,omitempty"` // Total holds the value of the "total" field. Total *decimal.Decimal `json:"total,omitempty"` // Note holds the value of the "note" field. Note *string `json:"note,omitempty"` // Type holds the value of the "type" field. Type *invoice.Type `json:"type,omitempty"` // StatusCode holds the value of the "status_code" field. StatusCode *int `json:"status_code,omitempty"` // PaymentMethod holds the value of the "payment_method" field. PaymentMethod *invoice.PaymentMethod `json:"payment_method,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the InvoiceQuery when eager-loading is set. Edges InvoiceEdges `json:"edges"` // contains filtered or unexported fields }
Invoice is the model entity for the Invoice schema.
func (*Invoice) QueryInvoiceStatus ¶
func (i *Invoice) QueryInvoiceStatus() *InvoiceStatusCodeQuery
QueryInvoiceStatus queries the "invoice_status" edge of the Invoice entity.
func (*Invoice) QueryOrder ¶
func (i *Invoice) QueryOrder() *OrderQuery
QueryOrder queries the "order" edge of the Invoice entity.
func (*Invoice) Unwrap ¶
Unwrap unwraps the Invoice 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 (*Invoice) Update ¶
func (i *Invoice) Update() *InvoiceUpdateOne
Update returns a builder for updating this Invoice. Note that you need to call Invoice.Unwrap() before calling this method if this Invoice was returned from a transaction, and the transaction was committed or rolled back.
type InvoiceClient ¶
type InvoiceClient struct {
// contains filtered or unexported fields
}
InvoiceClient is a client for the Invoice schema.
func NewInvoiceClient ¶
func NewInvoiceClient(c config) *InvoiceClient
NewInvoiceClient returns a client for the Invoice from the given config.
func (*InvoiceClient) Create ¶
func (c *InvoiceClient) Create() *InvoiceCreate
Create returns a builder for creating a Invoice entity.
func (*InvoiceClient) CreateBulk ¶
func (c *InvoiceClient) CreateBulk(builders ...*InvoiceCreate) *InvoiceCreateBulk
CreateBulk returns a builder for creating a bulk of Invoice entities.
func (*InvoiceClient) Delete ¶
func (c *InvoiceClient) Delete() *InvoiceDelete
Delete returns a delete builder for Invoice.
func (*InvoiceClient) DeleteOne ¶
func (c *InvoiceClient) DeleteOne(i *Invoice) *InvoiceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*InvoiceClient) DeleteOneID ¶
func (c *InvoiceClient) DeleteOneID(id uuid.UUID) *InvoiceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*InvoiceClient) Hooks ¶
func (c *InvoiceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*InvoiceClient) Intercept ¶
func (c *InvoiceClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `invoice.Intercept(f(g(h())))`.
func (*InvoiceClient) Interceptors ¶
func (c *InvoiceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*InvoiceClient) MapCreateBulk ¶
func (c *InvoiceClient) MapCreateBulk(slice any, setFunc func(*InvoiceCreate, int)) *InvoiceCreateBulk
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 (*InvoiceClient) Query ¶
func (c *InvoiceClient) Query() *InvoiceQuery
Query returns a query builder for Invoice.
func (*InvoiceClient) QueryInvoiceStatus ¶
func (c *InvoiceClient) QueryInvoiceStatus(i *Invoice) *InvoiceStatusCodeQuery
QueryInvoiceStatus queries the invoice_status edge of a Invoice.
func (*InvoiceClient) QueryOrder ¶
func (c *InvoiceClient) QueryOrder(i *Invoice) *OrderQuery
QueryOrder queries the order edge of a Invoice.
func (*InvoiceClient) Update ¶
func (c *InvoiceClient) Update() *InvoiceUpdate
Update returns an update builder for Invoice.
func (*InvoiceClient) UpdateOne ¶
func (c *InvoiceClient) UpdateOne(i *Invoice) *InvoiceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*InvoiceClient) UpdateOneID ¶
func (c *InvoiceClient) UpdateOneID(id uuid.UUID) *InvoiceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*InvoiceClient) Use ¶
func (c *InvoiceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `invoice.Hooks(f(g(h())))`.
type InvoiceCreate ¶
type InvoiceCreate struct {
// contains filtered or unexported fields
}
InvoiceCreate is the builder for creating a Invoice entity.
func (*InvoiceCreate) Exec ¶
func (ic *InvoiceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceCreate) ExecX ¶
func (ic *InvoiceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceCreate) Mutation ¶
func (ic *InvoiceCreate) Mutation() *InvoiceMutation
Mutation returns the InvoiceMutation object of the builder.
func (*InvoiceCreate) Save ¶
func (ic *InvoiceCreate) Save(ctx context.Context) (*Invoice, error)
Save creates the Invoice in the database.
func (*InvoiceCreate) SaveX ¶
func (ic *InvoiceCreate) SaveX(ctx context.Context) *Invoice
SaveX calls Save and panics if Save returns an error.
func (*InvoiceCreate) SetCreatedAt ¶
func (ic *InvoiceCreate) SetCreatedAt(t time.Time) *InvoiceCreate
SetCreatedAt sets the "created_at" field.
func (*InvoiceCreate) SetID ¶
func (ic *InvoiceCreate) SetID(u uuid.UUID) *InvoiceCreate
SetID sets the "id" field.
func (*InvoiceCreate) SetInvoiceStatus ¶
func (ic *InvoiceCreate) SetInvoiceStatus(i *InvoiceStatusCode) *InvoiceCreate
SetInvoiceStatus sets the "invoice_status" edge to the InvoiceStatusCode entity.
func (*InvoiceCreate) SetInvoiceStatusID ¶
func (ic *InvoiceCreate) SetInvoiceStatusID(id int) *InvoiceCreate
SetInvoiceStatusID sets the "invoice_status" edge to the InvoiceStatusCode entity by ID.
func (*InvoiceCreate) SetNillableCreatedAt ¶
func (ic *InvoiceCreate) SetNillableCreatedAt(t *time.Time) *InvoiceCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*InvoiceCreate) SetNillableID ¶
func (ic *InvoiceCreate) SetNillableID(u *uuid.UUID) *InvoiceCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*InvoiceCreate) SetNillableNote ¶
func (ic *InvoiceCreate) SetNillableNote(s *string) *InvoiceCreate
SetNillableNote sets the "note" field if the given value is not nil.
func (*InvoiceCreate) SetNillablePaymentMethod ¶
func (ic *InvoiceCreate) SetNillablePaymentMethod(im *invoice.PaymentMethod) *InvoiceCreate
SetNillablePaymentMethod sets the "payment_method" field if the given value is not nil.
func (*InvoiceCreate) SetNillableStatusCode ¶
func (ic *InvoiceCreate) SetNillableStatusCode(i *int) *InvoiceCreate
SetNillableStatusCode sets the "status_code" field if the given value is not nil.
func (*InvoiceCreate) SetNillableType ¶
func (ic *InvoiceCreate) SetNillableType(i *invoice.Type) *InvoiceCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*InvoiceCreate) SetNillableUpdatedAt ¶
func (ic *InvoiceCreate) SetNillableUpdatedAt(t *time.Time) *InvoiceCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*InvoiceCreate) SetNote ¶
func (ic *InvoiceCreate) SetNote(s string) *InvoiceCreate
SetNote sets the "note" field.
func (*InvoiceCreate) SetOrder ¶
func (ic *InvoiceCreate) SetOrder(o *Order) *InvoiceCreate
SetOrder sets the "order" edge to the Order entity.
func (*InvoiceCreate) SetOrderID ¶
func (ic *InvoiceCreate) SetOrderID(u uuid.UUID) *InvoiceCreate
SetOrderID sets the "order_id" field.
func (*InvoiceCreate) SetPaymentMethod ¶
func (ic *InvoiceCreate) SetPaymentMethod(im invoice.PaymentMethod) *InvoiceCreate
SetPaymentMethod sets the "payment_method" field.
func (*InvoiceCreate) SetStatusCode ¶
func (ic *InvoiceCreate) SetStatusCode(i int) *InvoiceCreate
SetStatusCode sets the "status_code" field.
func (*InvoiceCreate) SetTotal ¶
func (ic *InvoiceCreate) SetTotal(d decimal.Decimal) *InvoiceCreate
SetTotal sets the "total" field.
func (*InvoiceCreate) SetType ¶
func (ic *InvoiceCreate) SetType(i invoice.Type) *InvoiceCreate
SetType sets the "type" field.
func (*InvoiceCreate) SetUpdatedAt ¶
func (ic *InvoiceCreate) SetUpdatedAt(t time.Time) *InvoiceCreate
SetUpdatedAt sets the "updated_at" field.
type InvoiceCreateBulk ¶
type InvoiceCreateBulk struct {
// contains filtered or unexported fields
}
InvoiceCreateBulk is the builder for creating many Invoice entities in bulk.
func (*InvoiceCreateBulk) Exec ¶
func (icb *InvoiceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceCreateBulk) ExecX ¶
func (icb *InvoiceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type InvoiceDelete ¶
type InvoiceDelete struct {
// contains filtered or unexported fields
}
InvoiceDelete is the builder for deleting a Invoice entity.
func (*InvoiceDelete) Exec ¶
func (id *InvoiceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*InvoiceDelete) ExecX ¶
func (id *InvoiceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceDelete) Where ¶
func (id *InvoiceDelete) Where(ps ...predicate.Invoice) *InvoiceDelete
Where appends a list predicates to the InvoiceDelete builder.
type InvoiceDeleteOne ¶
type InvoiceDeleteOne struct {
// contains filtered or unexported fields
}
InvoiceDeleteOne is the builder for deleting a single Invoice entity.
func (*InvoiceDeleteOne) Exec ¶
func (ido *InvoiceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*InvoiceDeleteOne) ExecX ¶
func (ido *InvoiceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceDeleteOne) Where ¶
func (ido *InvoiceDeleteOne) Where(ps ...predicate.Invoice) *InvoiceDeleteOne
Where appends a list predicates to the InvoiceDelete builder.
type InvoiceEdges ¶
type InvoiceEdges struct { // Order holds the value of the order edge. Order *Order `json:"order,omitempty"` // InvoiceStatus holds the value of the invoice_status edge. InvoiceStatus *InvoiceStatusCode `json:"invoice_status,omitempty"` // contains filtered or unexported fields }
InvoiceEdges holds the relations/edges for other nodes in the graph.
func (InvoiceEdges) InvoiceStatusOrErr ¶
func (e InvoiceEdges) InvoiceStatusOrErr() (*InvoiceStatusCode, error)
InvoiceStatusOrErr returns the InvoiceStatus value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (InvoiceEdges) OrderOrErr ¶
func (e InvoiceEdges) OrderOrErr() (*Order, error)
OrderOrErr returns the Order value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type InvoiceGroupBy ¶
type InvoiceGroupBy struct {
// contains filtered or unexported fields
}
InvoiceGroupBy is the group-by builder for Invoice entities.
func (*InvoiceGroupBy) Aggregate ¶
func (igb *InvoiceGroupBy) Aggregate(fns ...AggregateFunc) *InvoiceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*InvoiceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InvoiceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InvoiceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InvoiceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InvoiceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InvoiceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InvoiceGroupBy) Scan ¶
func (igb *InvoiceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InvoiceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InvoiceHistories ¶
type InvoiceHistories []*InvoiceHistory
InvoiceHistories is a parsable slice of InvoiceHistory.
type InvoiceHistory ¶
type InvoiceHistory struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // InvoiceID holds the value of the "invoice_id" field. InvoiceID uuid.UUID `json:"invoice_id,omitempty"` // PersonID holds the value of the "person_id" field. PersonID uuid.UUID `json:"person_id,omitempty"` // OldStatusCode holds the value of the "old_status_code" field. OldStatusCode *int `json:"old_status_code,omitempty"` // NewStatusCode holds the value of the "new_status_code" field. NewStatusCode *int `json:"new_status_code,omitempty"` // Description holds the value of the "description" field. Description *string `json:"description,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the InvoiceHistoryQuery when eager-loading is set. Edges InvoiceHistoryEdges `json:"edges"` // contains filtered or unexported fields }
InvoiceHistory is the model entity for the InvoiceHistory schema.
func (*InvoiceHistory) QueryInvoice ¶
func (ih *InvoiceHistory) QueryInvoice() *InvoiceQuery
QueryInvoice queries the "invoice" edge of the InvoiceHistory entity.
func (*InvoiceHistory) QueryNewStatus ¶
func (ih *InvoiceHistory) QueryNewStatus() *InvoiceStatusCodeQuery
QueryNewStatus queries the "new_status" edge of the InvoiceHistory entity.
func (*InvoiceHistory) QueryOldStatus ¶
func (ih *InvoiceHistory) QueryOldStatus() *InvoiceStatusCodeQuery
QueryOldStatus queries the "old_status" edge of the InvoiceHistory entity.
func (*InvoiceHistory) QueryPerson ¶
func (ih *InvoiceHistory) QueryPerson() *PersonQuery
QueryPerson queries the "person" edge of the InvoiceHistory entity.
func (*InvoiceHistory) String ¶
func (ih *InvoiceHistory) String() string
String implements the fmt.Stringer.
func (*InvoiceHistory) Unwrap ¶
func (ih *InvoiceHistory) Unwrap() *InvoiceHistory
Unwrap unwraps the InvoiceHistory 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 (*InvoiceHistory) Update ¶
func (ih *InvoiceHistory) Update() *InvoiceHistoryUpdateOne
Update returns a builder for updating this InvoiceHistory. Note that you need to call InvoiceHistory.Unwrap() before calling this method if this InvoiceHistory was returned from a transaction, and the transaction was committed or rolled back.
type InvoiceHistoryClient ¶
type InvoiceHistoryClient struct {
// contains filtered or unexported fields
}
InvoiceHistoryClient is a client for the InvoiceHistory schema.
func NewInvoiceHistoryClient ¶
func NewInvoiceHistoryClient(c config) *InvoiceHistoryClient
NewInvoiceHistoryClient returns a client for the InvoiceHistory from the given config.
func (*InvoiceHistoryClient) Create ¶
func (c *InvoiceHistoryClient) Create() *InvoiceHistoryCreate
Create returns a builder for creating a InvoiceHistory entity.
func (*InvoiceHistoryClient) CreateBulk ¶
func (c *InvoiceHistoryClient) CreateBulk(builders ...*InvoiceHistoryCreate) *InvoiceHistoryCreateBulk
CreateBulk returns a builder for creating a bulk of InvoiceHistory entities.
func (*InvoiceHistoryClient) Delete ¶
func (c *InvoiceHistoryClient) Delete() *InvoiceHistoryDelete
Delete returns a delete builder for InvoiceHistory.
func (*InvoiceHistoryClient) DeleteOne ¶
func (c *InvoiceHistoryClient) DeleteOne(ih *InvoiceHistory) *InvoiceHistoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*InvoiceHistoryClient) DeleteOneID ¶
func (c *InvoiceHistoryClient) DeleteOneID(id uuid.UUID) *InvoiceHistoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*InvoiceHistoryClient) Get ¶
func (c *InvoiceHistoryClient) Get(ctx context.Context, id uuid.UUID) (*InvoiceHistory, error)
Get returns a InvoiceHistory entity by its id.
func (*InvoiceHistoryClient) GetX ¶
func (c *InvoiceHistoryClient) GetX(ctx context.Context, id uuid.UUID) *InvoiceHistory
GetX is like Get, but panics if an error occurs.
func (*InvoiceHistoryClient) Hooks ¶
func (c *InvoiceHistoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*InvoiceHistoryClient) Intercept ¶
func (c *InvoiceHistoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `invoicehistory.Intercept(f(g(h())))`.
func (*InvoiceHistoryClient) Interceptors ¶
func (c *InvoiceHistoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*InvoiceHistoryClient) MapCreateBulk ¶
func (c *InvoiceHistoryClient) MapCreateBulk(slice any, setFunc func(*InvoiceHistoryCreate, int)) *InvoiceHistoryCreateBulk
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 (*InvoiceHistoryClient) Query ¶
func (c *InvoiceHistoryClient) Query() *InvoiceHistoryQuery
Query returns a query builder for InvoiceHistory.
func (*InvoiceHistoryClient) QueryInvoice ¶
func (c *InvoiceHistoryClient) QueryInvoice(ih *InvoiceHistory) *InvoiceQuery
QueryInvoice queries the invoice edge of a InvoiceHistory.
func (*InvoiceHistoryClient) QueryNewStatus ¶
func (c *InvoiceHistoryClient) QueryNewStatus(ih *InvoiceHistory) *InvoiceStatusCodeQuery
QueryNewStatus queries the new_status edge of a InvoiceHistory.
func (*InvoiceHistoryClient) QueryOldStatus ¶
func (c *InvoiceHistoryClient) QueryOldStatus(ih *InvoiceHistory) *InvoiceStatusCodeQuery
QueryOldStatus queries the old_status edge of a InvoiceHistory.
func (*InvoiceHistoryClient) QueryPerson ¶
func (c *InvoiceHistoryClient) QueryPerson(ih *InvoiceHistory) *PersonQuery
QueryPerson queries the person edge of a InvoiceHistory.
func (*InvoiceHistoryClient) Update ¶
func (c *InvoiceHistoryClient) Update() *InvoiceHistoryUpdate
Update returns an update builder for InvoiceHistory.
func (*InvoiceHistoryClient) UpdateOne ¶
func (c *InvoiceHistoryClient) UpdateOne(ih *InvoiceHistory) *InvoiceHistoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*InvoiceHistoryClient) UpdateOneID ¶
func (c *InvoiceHistoryClient) UpdateOneID(id uuid.UUID) *InvoiceHistoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*InvoiceHistoryClient) Use ¶
func (c *InvoiceHistoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `invoicehistory.Hooks(f(g(h())))`.
type InvoiceHistoryCreate ¶
type InvoiceHistoryCreate struct {
// contains filtered or unexported fields
}
InvoiceHistoryCreate is the builder for creating a InvoiceHistory entity.
func (*InvoiceHistoryCreate) Exec ¶
func (ihc *InvoiceHistoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceHistoryCreate) ExecX ¶
func (ihc *InvoiceHistoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceHistoryCreate) Mutation ¶
func (ihc *InvoiceHistoryCreate) Mutation() *InvoiceHistoryMutation
Mutation returns the InvoiceHistoryMutation object of the builder.
func (*InvoiceHistoryCreate) Save ¶
func (ihc *InvoiceHistoryCreate) Save(ctx context.Context) (*InvoiceHistory, error)
Save creates the InvoiceHistory in the database.
func (*InvoiceHistoryCreate) SaveX ¶
func (ihc *InvoiceHistoryCreate) SaveX(ctx context.Context) *InvoiceHistory
SaveX calls Save and panics if Save returns an error.
func (*InvoiceHistoryCreate) SetCreatedAt ¶
func (ihc *InvoiceHistoryCreate) SetCreatedAt(t time.Time) *InvoiceHistoryCreate
SetCreatedAt sets the "created_at" field.
func (*InvoiceHistoryCreate) SetDescription ¶
func (ihc *InvoiceHistoryCreate) SetDescription(s string) *InvoiceHistoryCreate
SetDescription sets the "description" field.
func (*InvoiceHistoryCreate) SetID ¶
func (ihc *InvoiceHistoryCreate) SetID(u uuid.UUID) *InvoiceHistoryCreate
SetID sets the "id" field.
func (*InvoiceHistoryCreate) SetInvoice ¶
func (ihc *InvoiceHistoryCreate) SetInvoice(i *Invoice) *InvoiceHistoryCreate
SetInvoice sets the "invoice" edge to the Invoice entity.
func (*InvoiceHistoryCreate) SetInvoiceID ¶
func (ihc *InvoiceHistoryCreate) SetInvoiceID(u uuid.UUID) *InvoiceHistoryCreate
SetInvoiceID sets the "invoice_id" field.
func (*InvoiceHistoryCreate) SetNewStatus ¶
func (ihc *InvoiceHistoryCreate) SetNewStatus(i *InvoiceStatusCode) *InvoiceHistoryCreate
SetNewStatus sets the "new_status" edge to the InvoiceStatusCode entity.
func (*InvoiceHistoryCreate) SetNewStatusCode ¶
func (ihc *InvoiceHistoryCreate) SetNewStatusCode(i int) *InvoiceHistoryCreate
SetNewStatusCode sets the "new_status_code" field.
func (*InvoiceHistoryCreate) SetNewStatusID ¶
func (ihc *InvoiceHistoryCreate) SetNewStatusID(id int) *InvoiceHistoryCreate
SetNewStatusID sets the "new_status" edge to the InvoiceStatusCode entity by ID.
func (*InvoiceHistoryCreate) SetNillableCreatedAt ¶
func (ihc *InvoiceHistoryCreate) SetNillableCreatedAt(t *time.Time) *InvoiceHistoryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*InvoiceHistoryCreate) SetNillableDescription ¶
func (ihc *InvoiceHistoryCreate) SetNillableDescription(s *string) *InvoiceHistoryCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*InvoiceHistoryCreate) SetNillableID ¶
func (ihc *InvoiceHistoryCreate) SetNillableID(u *uuid.UUID) *InvoiceHistoryCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*InvoiceHistoryCreate) SetNillableNewStatusCode ¶
func (ihc *InvoiceHistoryCreate) SetNillableNewStatusCode(i *int) *InvoiceHistoryCreate
SetNillableNewStatusCode sets the "new_status_code" field if the given value is not nil.
func (*InvoiceHistoryCreate) SetNillableNewStatusID ¶
func (ihc *InvoiceHistoryCreate) SetNillableNewStatusID(id *int) *InvoiceHistoryCreate
SetNillableNewStatusID sets the "new_status" edge to the InvoiceStatusCode entity by ID if the given value is not nil.
func (*InvoiceHistoryCreate) SetNillableOldStatusCode ¶
func (ihc *InvoiceHistoryCreate) SetNillableOldStatusCode(i *int) *InvoiceHistoryCreate
SetNillableOldStatusCode sets the "old_status_code" field if the given value is not nil.
func (*InvoiceHistoryCreate) SetNillableOldStatusID ¶
func (ihc *InvoiceHistoryCreate) SetNillableOldStatusID(id *int) *InvoiceHistoryCreate
SetNillableOldStatusID sets the "old_status" edge to the InvoiceStatusCode entity by ID if the given value is not nil.
func (*InvoiceHistoryCreate) SetOldStatus ¶
func (ihc *InvoiceHistoryCreate) SetOldStatus(i *InvoiceStatusCode) *InvoiceHistoryCreate
SetOldStatus sets the "old_status" edge to the InvoiceStatusCode entity.
func (*InvoiceHistoryCreate) SetOldStatusCode ¶
func (ihc *InvoiceHistoryCreate) SetOldStatusCode(i int) *InvoiceHistoryCreate
SetOldStatusCode sets the "old_status_code" field.
func (*InvoiceHistoryCreate) SetOldStatusID ¶
func (ihc *InvoiceHistoryCreate) SetOldStatusID(id int) *InvoiceHistoryCreate
SetOldStatusID sets the "old_status" edge to the InvoiceStatusCode entity by ID.
func (*InvoiceHistoryCreate) SetPerson ¶
func (ihc *InvoiceHistoryCreate) SetPerson(p *Person) *InvoiceHistoryCreate
SetPerson sets the "person" edge to the Person entity.
func (*InvoiceHistoryCreate) SetPersonID ¶
func (ihc *InvoiceHistoryCreate) SetPersonID(u uuid.UUID) *InvoiceHistoryCreate
SetPersonID sets the "person_id" field.
type InvoiceHistoryCreateBulk ¶
type InvoiceHistoryCreateBulk struct {
// contains filtered or unexported fields
}
InvoiceHistoryCreateBulk is the builder for creating many InvoiceHistory entities in bulk.
func (*InvoiceHistoryCreateBulk) Exec ¶
func (ihcb *InvoiceHistoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceHistoryCreateBulk) ExecX ¶
func (ihcb *InvoiceHistoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceHistoryCreateBulk) Save ¶
func (ihcb *InvoiceHistoryCreateBulk) Save(ctx context.Context) ([]*InvoiceHistory, error)
Save creates the InvoiceHistory entities in the database.
func (*InvoiceHistoryCreateBulk) SaveX ¶
func (ihcb *InvoiceHistoryCreateBulk) SaveX(ctx context.Context) []*InvoiceHistory
SaveX is like Save, but panics if an error occurs.
type InvoiceHistoryDelete ¶
type InvoiceHistoryDelete struct {
// contains filtered or unexported fields
}
InvoiceHistoryDelete is the builder for deleting a InvoiceHistory entity.
func (*InvoiceHistoryDelete) Exec ¶
func (ihd *InvoiceHistoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*InvoiceHistoryDelete) ExecX ¶
func (ihd *InvoiceHistoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceHistoryDelete) Where ¶
func (ihd *InvoiceHistoryDelete) Where(ps ...predicate.InvoiceHistory) *InvoiceHistoryDelete
Where appends a list predicates to the InvoiceHistoryDelete builder.
type InvoiceHistoryDeleteOne ¶
type InvoiceHistoryDeleteOne struct {
// contains filtered or unexported fields
}
InvoiceHistoryDeleteOne is the builder for deleting a single InvoiceHistory entity.
func (*InvoiceHistoryDeleteOne) Exec ¶
func (ihdo *InvoiceHistoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*InvoiceHistoryDeleteOne) ExecX ¶
func (ihdo *InvoiceHistoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceHistoryDeleteOne) Where ¶
func (ihdo *InvoiceHistoryDeleteOne) Where(ps ...predicate.InvoiceHistory) *InvoiceHistoryDeleteOne
Where appends a list predicates to the InvoiceHistoryDelete builder.
type InvoiceHistoryEdges ¶
type InvoiceHistoryEdges struct { // Invoice holds the value of the invoice edge. Invoice *Invoice `json:"invoice,omitempty"` // Person holds the value of the person edge. Person *Person `json:"person,omitempty"` // OldStatus holds the value of the old_status edge. OldStatus *InvoiceStatusCode `json:"old_status,omitempty"` // NewStatus holds the value of the new_status edge. NewStatus *InvoiceStatusCode `json:"new_status,omitempty"` // contains filtered or unexported fields }
InvoiceHistoryEdges holds the relations/edges for other nodes in the graph.
func (InvoiceHistoryEdges) InvoiceOrErr ¶
func (e InvoiceHistoryEdges) InvoiceOrErr() (*Invoice, error)
InvoiceOrErr returns the Invoice value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (InvoiceHistoryEdges) NewStatusOrErr ¶
func (e InvoiceHistoryEdges) NewStatusOrErr() (*InvoiceStatusCode, error)
NewStatusOrErr returns the NewStatus value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (InvoiceHistoryEdges) OldStatusOrErr ¶
func (e InvoiceHistoryEdges) OldStatusOrErr() (*InvoiceStatusCode, error)
OldStatusOrErr returns the OldStatus value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (InvoiceHistoryEdges) PersonOrErr ¶
func (e InvoiceHistoryEdges) PersonOrErr() (*Person, error)
PersonOrErr returns the Person value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type InvoiceHistoryGroupBy ¶
type InvoiceHistoryGroupBy struct {
// contains filtered or unexported fields
}
InvoiceHistoryGroupBy is the group-by builder for InvoiceHistory entities.
func (*InvoiceHistoryGroupBy) Aggregate ¶
func (ihgb *InvoiceHistoryGroupBy) Aggregate(fns ...AggregateFunc) *InvoiceHistoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*InvoiceHistoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InvoiceHistoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InvoiceHistoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InvoiceHistoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InvoiceHistoryGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*InvoiceHistoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InvoiceHistoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InvoiceHistoryGroupBy) Scan ¶
func (ihgb *InvoiceHistoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InvoiceHistoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InvoiceHistoryMutation ¶
type InvoiceHistoryMutation struct {
// contains filtered or unexported fields
}
InvoiceHistoryMutation represents an operation that mutates the InvoiceHistory nodes in the graph.
func (*InvoiceHistoryMutation) AddField ¶
func (m *InvoiceHistoryMutation) 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 (*InvoiceHistoryMutation) AddedEdges ¶
func (m *InvoiceHistoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*InvoiceHistoryMutation) AddedField ¶
func (m *InvoiceHistoryMutation) 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 (*InvoiceHistoryMutation) AddedFields ¶
func (m *InvoiceHistoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*InvoiceHistoryMutation) AddedIDs ¶
func (m *InvoiceHistoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*InvoiceHistoryMutation) ClearDescription ¶
func (m *InvoiceHistoryMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*InvoiceHistoryMutation) ClearEdge ¶
func (m *InvoiceHistoryMutation) 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 (*InvoiceHistoryMutation) ClearField ¶
func (m *InvoiceHistoryMutation) 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 (*InvoiceHistoryMutation) ClearInvoice ¶
func (m *InvoiceHistoryMutation) ClearInvoice()
ClearInvoice clears the "invoice" edge to the Invoice entity.
func (*InvoiceHistoryMutation) ClearNewStatus ¶
func (m *InvoiceHistoryMutation) ClearNewStatus()
ClearNewStatus clears the "new_status" edge to the InvoiceStatusCode entity.
func (*InvoiceHistoryMutation) ClearNewStatusCode ¶
func (m *InvoiceHistoryMutation) ClearNewStatusCode()
ClearNewStatusCode clears the value of the "new_status_code" field.
func (*InvoiceHistoryMutation) ClearOldStatus ¶
func (m *InvoiceHistoryMutation) ClearOldStatus()
ClearOldStatus clears the "old_status" edge to the InvoiceStatusCode entity.
func (*InvoiceHistoryMutation) ClearOldStatusCode ¶
func (m *InvoiceHistoryMutation) ClearOldStatusCode()
ClearOldStatusCode clears the value of the "old_status_code" field.
func (*InvoiceHistoryMutation) ClearPerson ¶
func (m *InvoiceHistoryMutation) ClearPerson()
ClearPerson clears the "person" edge to the Person entity.
func (*InvoiceHistoryMutation) ClearedEdges ¶
func (m *InvoiceHistoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*InvoiceHistoryMutation) ClearedFields ¶
func (m *InvoiceHistoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (InvoiceHistoryMutation) Client ¶
func (m InvoiceHistoryMutation) 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 (*InvoiceHistoryMutation) CreatedAt ¶
func (m *InvoiceHistoryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*InvoiceHistoryMutation) Description ¶
func (m *InvoiceHistoryMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*InvoiceHistoryMutation) DescriptionCleared ¶
func (m *InvoiceHistoryMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*InvoiceHistoryMutation) EdgeCleared ¶
func (m *InvoiceHistoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*InvoiceHistoryMutation) Field ¶
func (m *InvoiceHistoryMutation) 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 (*InvoiceHistoryMutation) FieldCleared ¶
func (m *InvoiceHistoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*InvoiceHistoryMutation) Fields ¶
func (m *InvoiceHistoryMutation) 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 (*InvoiceHistoryMutation) ID ¶
func (m *InvoiceHistoryMutation) ID() (id uuid.UUID, 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 (*InvoiceHistoryMutation) IDs ¶
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 (*InvoiceHistoryMutation) InvoiceCleared ¶
func (m *InvoiceHistoryMutation) InvoiceCleared() bool
InvoiceCleared reports if the "invoice" edge to the Invoice entity was cleared.
func (*InvoiceHistoryMutation) InvoiceID ¶
func (m *InvoiceHistoryMutation) InvoiceID() (r uuid.UUID, exists bool)
InvoiceID returns the value of the "invoice_id" field in the mutation.
func (*InvoiceHistoryMutation) InvoiceIDs ¶
func (m *InvoiceHistoryMutation) InvoiceIDs() (ids []uuid.UUID)
InvoiceIDs returns the "invoice" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InvoiceID instead. It exists only for internal usage by the builders.
func (*InvoiceHistoryMutation) NewStatusCleared ¶
func (m *InvoiceHistoryMutation) NewStatusCleared() bool
NewStatusCleared reports if the "new_status" edge to the InvoiceStatusCode entity was cleared.
func (*InvoiceHistoryMutation) NewStatusCode ¶
func (m *InvoiceHistoryMutation) NewStatusCode() (r int, exists bool)
NewStatusCode returns the value of the "new_status_code" field in the mutation.
func (*InvoiceHistoryMutation) NewStatusCodeCleared ¶
func (m *InvoiceHistoryMutation) NewStatusCodeCleared() bool
NewStatusCodeCleared returns if the "new_status_code" field was cleared in this mutation.
func (*InvoiceHistoryMutation) NewStatusID ¶
func (m *InvoiceHistoryMutation) NewStatusID() (id int, exists bool)
NewStatusID returns the "new_status" edge ID in the mutation.
func (*InvoiceHistoryMutation) NewStatusIDs ¶
func (m *InvoiceHistoryMutation) NewStatusIDs() (ids []int)
NewStatusIDs returns the "new_status" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NewStatusID instead. It exists only for internal usage by the builders.
func (*InvoiceHistoryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the InvoiceHistory entity. If the InvoiceHistory 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 (*InvoiceHistoryMutation) OldDescription ¶
func (m *InvoiceHistoryMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old "description" field's value of the InvoiceHistory entity. If the InvoiceHistory 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 (*InvoiceHistoryMutation) 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 (*InvoiceHistoryMutation) OldInvoiceID ¶
OldInvoiceID returns the old "invoice_id" field's value of the InvoiceHistory entity. If the InvoiceHistory 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 (*InvoiceHistoryMutation) OldNewStatusCode ¶
func (m *InvoiceHistoryMutation) OldNewStatusCode(ctx context.Context) (v *int, err error)
OldNewStatusCode returns the old "new_status_code" field's value of the InvoiceHistory entity. If the InvoiceHistory 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 (*InvoiceHistoryMutation) OldOldStatusCode ¶
func (m *InvoiceHistoryMutation) OldOldStatusCode(ctx context.Context) (v *int, err error)
OldOldStatusCode returns the old "old_status_code" field's value of the InvoiceHistory entity. If the InvoiceHistory 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 (*InvoiceHistoryMutation) OldPersonID ¶
OldPersonID returns the old "person_id" field's value of the InvoiceHistory entity. If the InvoiceHistory 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 (*InvoiceHistoryMutation) OldStatusCleared ¶
func (m *InvoiceHistoryMutation) OldStatusCleared() bool
OldStatusCleared reports if the "old_status" edge to the InvoiceStatusCode entity was cleared.
func (*InvoiceHistoryMutation) OldStatusCode ¶
func (m *InvoiceHistoryMutation) OldStatusCode() (r int, exists bool)
OldStatusCode returns the value of the "old_status_code" field in the mutation.
func (*InvoiceHistoryMutation) OldStatusCodeCleared ¶
func (m *InvoiceHistoryMutation) OldStatusCodeCleared() bool
OldStatusCodeCleared returns if the "old_status_code" field was cleared in this mutation.
func (*InvoiceHistoryMutation) OldStatusID ¶
func (m *InvoiceHistoryMutation) OldStatusID() (id int, exists bool)
OldStatusID returns the "old_status" edge ID in the mutation.
func (*InvoiceHistoryMutation) OldStatusIDs ¶
func (m *InvoiceHistoryMutation) OldStatusIDs() (ids []int)
OldStatusIDs returns the "old_status" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OldStatusID instead. It exists only for internal usage by the builders.
func (*InvoiceHistoryMutation) Op ¶
func (m *InvoiceHistoryMutation) Op() Op
Op returns the operation name.
func (*InvoiceHistoryMutation) PersonCleared ¶
func (m *InvoiceHistoryMutation) PersonCleared() bool
PersonCleared reports if the "person" edge to the Person entity was cleared.
func (*InvoiceHistoryMutation) PersonID ¶
func (m *InvoiceHistoryMutation) PersonID() (r uuid.UUID, exists bool)
PersonID returns the value of the "person_id" field in the mutation.
func (*InvoiceHistoryMutation) PersonIDs ¶
func (m *InvoiceHistoryMutation) PersonIDs() (ids []uuid.UUID)
PersonIDs returns the "person" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PersonID instead. It exists only for internal usage by the builders.
func (*InvoiceHistoryMutation) RemovedEdges ¶
func (m *InvoiceHistoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*InvoiceHistoryMutation) RemovedIDs ¶
func (m *InvoiceHistoryMutation) 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 (*InvoiceHistoryMutation) ResetCreatedAt ¶
func (m *InvoiceHistoryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*InvoiceHistoryMutation) ResetDescription ¶
func (m *InvoiceHistoryMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*InvoiceHistoryMutation) ResetEdge ¶
func (m *InvoiceHistoryMutation) 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 (*InvoiceHistoryMutation) ResetField ¶
func (m *InvoiceHistoryMutation) 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 (*InvoiceHistoryMutation) ResetInvoice ¶
func (m *InvoiceHistoryMutation) ResetInvoice()
ResetInvoice resets all changes to the "invoice" edge.
func (*InvoiceHistoryMutation) ResetInvoiceID ¶
func (m *InvoiceHistoryMutation) ResetInvoiceID()
ResetInvoiceID resets all changes to the "invoice_id" field.
func (*InvoiceHistoryMutation) ResetNewStatus ¶
func (m *InvoiceHistoryMutation) ResetNewStatus()
ResetNewStatus resets all changes to the "new_status" edge.
func (*InvoiceHistoryMutation) ResetNewStatusCode ¶
func (m *InvoiceHistoryMutation) ResetNewStatusCode()
ResetNewStatusCode resets all changes to the "new_status_code" field.
func (*InvoiceHistoryMutation) ResetOldStatus ¶
func (m *InvoiceHistoryMutation) ResetOldStatus()
ResetOldStatus resets all changes to the "old_status" edge.
func (*InvoiceHistoryMutation) ResetOldStatusCode ¶
func (m *InvoiceHistoryMutation) ResetOldStatusCode()
ResetOldStatusCode resets all changes to the "old_status_code" field.
func (*InvoiceHistoryMutation) ResetPerson ¶
func (m *InvoiceHistoryMutation) ResetPerson()
ResetPerson resets all changes to the "person" edge.
func (*InvoiceHistoryMutation) ResetPersonID ¶
func (m *InvoiceHistoryMutation) ResetPersonID()
ResetPersonID resets all changes to the "person_id" field.
func (*InvoiceHistoryMutation) SetCreatedAt ¶
func (m *InvoiceHistoryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*InvoiceHistoryMutation) SetDescription ¶
func (m *InvoiceHistoryMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*InvoiceHistoryMutation) SetField ¶
func (m *InvoiceHistoryMutation) 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 (*InvoiceHistoryMutation) SetID ¶
func (m *InvoiceHistoryMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of InvoiceHistory entities.
func (*InvoiceHistoryMutation) SetInvoiceID ¶
func (m *InvoiceHistoryMutation) SetInvoiceID(u uuid.UUID)
SetInvoiceID sets the "invoice_id" field.
func (*InvoiceHistoryMutation) SetNewStatusCode ¶
func (m *InvoiceHistoryMutation) SetNewStatusCode(i int)
SetNewStatusCode sets the "new_status_code" field.
func (*InvoiceHistoryMutation) SetNewStatusID ¶
func (m *InvoiceHistoryMutation) SetNewStatusID(id int)
SetNewStatusID sets the "new_status" edge to the InvoiceStatusCode entity by id.
func (*InvoiceHistoryMutation) SetOldStatusCode ¶
func (m *InvoiceHistoryMutation) SetOldStatusCode(i int)
SetOldStatusCode sets the "old_status_code" field.
func (*InvoiceHistoryMutation) SetOldStatusID ¶
func (m *InvoiceHistoryMutation) SetOldStatusID(id int)
SetOldStatusID sets the "old_status" edge to the InvoiceStatusCode entity by id.
func (*InvoiceHistoryMutation) SetOp ¶
func (m *InvoiceHistoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*InvoiceHistoryMutation) SetPersonID ¶
func (m *InvoiceHistoryMutation) SetPersonID(u uuid.UUID)
SetPersonID sets the "person_id" field.
func (InvoiceHistoryMutation) Tx ¶
func (m InvoiceHistoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*InvoiceHistoryMutation) Type ¶
func (m *InvoiceHistoryMutation) Type() string
Type returns the node type of this mutation (InvoiceHistory).
func (*InvoiceHistoryMutation) Where ¶
func (m *InvoiceHistoryMutation) Where(ps ...predicate.InvoiceHistory)
Where appends a list predicates to the InvoiceHistoryMutation builder.
func (*InvoiceHistoryMutation) WhereP ¶
func (m *InvoiceHistoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the InvoiceHistoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type InvoiceHistoryQuery ¶
type InvoiceHistoryQuery struct {
// contains filtered or unexported fields
}
InvoiceHistoryQuery is the builder for querying InvoiceHistory entities.
func (*InvoiceHistoryQuery) Aggregate ¶
func (ihq *InvoiceHistoryQuery) Aggregate(fns ...AggregateFunc) *InvoiceHistorySelect
Aggregate returns a InvoiceHistorySelect configured with the given aggregations.
func (*InvoiceHistoryQuery) All ¶
func (ihq *InvoiceHistoryQuery) All(ctx context.Context) ([]*InvoiceHistory, error)
All executes the query and returns a list of InvoiceHistories.
func (*InvoiceHistoryQuery) AllX ¶
func (ihq *InvoiceHistoryQuery) AllX(ctx context.Context) []*InvoiceHistory
AllX is like All, but panics if an error occurs.
func (*InvoiceHistoryQuery) Clone ¶
func (ihq *InvoiceHistoryQuery) Clone() *InvoiceHistoryQuery
Clone returns a duplicate of the InvoiceHistoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*InvoiceHistoryQuery) Count ¶
func (ihq *InvoiceHistoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*InvoiceHistoryQuery) CountX ¶
func (ihq *InvoiceHistoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*InvoiceHistoryQuery) Exist ¶
func (ihq *InvoiceHistoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*InvoiceHistoryQuery) ExistX ¶
func (ihq *InvoiceHistoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*InvoiceHistoryQuery) First ¶
func (ihq *InvoiceHistoryQuery) First(ctx context.Context) (*InvoiceHistory, error)
First returns the first InvoiceHistory entity from the query. Returns a *NotFoundError when no InvoiceHistory was found.
func (*InvoiceHistoryQuery) FirstID ¶
FirstID returns the first InvoiceHistory ID from the query. Returns a *NotFoundError when no InvoiceHistory ID was found.
func (*InvoiceHistoryQuery) FirstIDX ¶
func (ihq *InvoiceHistoryQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*InvoiceHistoryQuery) FirstX ¶
func (ihq *InvoiceHistoryQuery) FirstX(ctx context.Context) *InvoiceHistory
FirstX is like First, but panics if an error occurs.
func (*InvoiceHistoryQuery) GroupBy ¶
func (ihq *InvoiceHistoryQuery) GroupBy(field string, fields ...string) *InvoiceHistoryGroupBy
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.InvoiceHistory.Query(). GroupBy(invoicehistory.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*InvoiceHistoryQuery) IDsX ¶
func (ihq *InvoiceHistoryQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*InvoiceHistoryQuery) Limit ¶
func (ihq *InvoiceHistoryQuery) Limit(limit int) *InvoiceHistoryQuery
Limit the number of records to be returned by this query.
func (*InvoiceHistoryQuery) Offset ¶
func (ihq *InvoiceHistoryQuery) Offset(offset int) *InvoiceHistoryQuery
Offset to start from.
func (*InvoiceHistoryQuery) Only ¶
func (ihq *InvoiceHistoryQuery) Only(ctx context.Context) (*InvoiceHistory, error)
Only returns a single InvoiceHistory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one InvoiceHistory entity is found. Returns a *NotFoundError when no InvoiceHistory entities are found.
func (*InvoiceHistoryQuery) OnlyID ¶
OnlyID is like Only, but returns the only InvoiceHistory ID in the query. Returns a *NotSingularError when more than one InvoiceHistory ID is found. Returns a *NotFoundError when no entities are found.
func (*InvoiceHistoryQuery) OnlyIDX ¶
func (ihq *InvoiceHistoryQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*InvoiceHistoryQuery) OnlyX ¶
func (ihq *InvoiceHistoryQuery) OnlyX(ctx context.Context) *InvoiceHistory
OnlyX is like Only, but panics if an error occurs.
func (*InvoiceHistoryQuery) Order ¶
func (ihq *InvoiceHistoryQuery) Order(o ...invoicehistory.OrderOption) *InvoiceHistoryQuery
Order specifies how the records should be ordered.
func (*InvoiceHistoryQuery) QueryInvoice ¶
func (ihq *InvoiceHistoryQuery) QueryInvoice() *InvoiceQuery
QueryInvoice chains the current query on the "invoice" edge.
func (*InvoiceHistoryQuery) QueryNewStatus ¶
func (ihq *InvoiceHistoryQuery) QueryNewStatus() *InvoiceStatusCodeQuery
QueryNewStatus chains the current query on the "new_status" edge.
func (*InvoiceHistoryQuery) QueryOldStatus ¶
func (ihq *InvoiceHistoryQuery) QueryOldStatus() *InvoiceStatusCodeQuery
QueryOldStatus chains the current query on the "old_status" edge.
func (*InvoiceHistoryQuery) QueryPerson ¶
func (ihq *InvoiceHistoryQuery) QueryPerson() *PersonQuery
QueryPerson chains the current query on the "person" edge.
func (*InvoiceHistoryQuery) Select ¶
func (ihq *InvoiceHistoryQuery) Select(fields ...string) *InvoiceHistorySelect
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.InvoiceHistory.Query(). Select(invoicehistory.FieldCreatedAt). Scan(ctx, &v)
func (*InvoiceHistoryQuery) Unique ¶
func (ihq *InvoiceHistoryQuery) Unique(unique bool) *InvoiceHistoryQuery
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 (*InvoiceHistoryQuery) Where ¶
func (ihq *InvoiceHistoryQuery) Where(ps ...predicate.InvoiceHistory) *InvoiceHistoryQuery
Where adds a new predicate for the InvoiceHistoryQuery builder.
func (*InvoiceHistoryQuery) WithInvoice ¶
func (ihq *InvoiceHistoryQuery) WithInvoice(opts ...func(*InvoiceQuery)) *InvoiceHistoryQuery
WithInvoice tells the query-builder to eager-load the nodes that are connected to the "invoice" edge. The optional arguments are used to configure the query builder of the edge.
func (*InvoiceHistoryQuery) WithNewStatus ¶
func (ihq *InvoiceHistoryQuery) WithNewStatus(opts ...func(*InvoiceStatusCodeQuery)) *InvoiceHistoryQuery
WithNewStatus tells the query-builder to eager-load the nodes that are connected to the "new_status" edge. The optional arguments are used to configure the query builder of the edge.
func (*InvoiceHistoryQuery) WithOldStatus ¶
func (ihq *InvoiceHistoryQuery) WithOldStatus(opts ...func(*InvoiceStatusCodeQuery)) *InvoiceHistoryQuery
WithOldStatus tells the query-builder to eager-load the nodes that are connected to the "old_status" edge. The optional arguments are used to configure the query builder of the edge.
func (*InvoiceHistoryQuery) WithPerson ¶
func (ihq *InvoiceHistoryQuery) WithPerson(opts ...func(*PersonQuery)) *InvoiceHistoryQuery
WithPerson tells the query-builder to eager-load the nodes that are connected to the "person" edge. The optional arguments are used to configure the query builder of the edge.
type InvoiceHistorySelect ¶
type InvoiceHistorySelect struct { *InvoiceHistoryQuery // contains filtered or unexported fields }
InvoiceHistorySelect is the builder for selecting fields of InvoiceHistory entities.
func (*InvoiceHistorySelect) Aggregate ¶
func (ihs *InvoiceHistorySelect) Aggregate(fns ...AggregateFunc) *InvoiceHistorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*InvoiceHistorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InvoiceHistorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InvoiceHistorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InvoiceHistorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InvoiceHistorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InvoiceHistorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InvoiceHistorySelect) Scan ¶
func (ihs *InvoiceHistorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InvoiceHistorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InvoiceHistoryUpdate ¶
type InvoiceHistoryUpdate struct {
// contains filtered or unexported fields
}
InvoiceHistoryUpdate is the builder for updating InvoiceHistory entities.
func (*InvoiceHistoryUpdate) Exec ¶
func (ihu *InvoiceHistoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceHistoryUpdate) ExecX ¶
func (ihu *InvoiceHistoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceHistoryUpdate) Mutation ¶
func (ihu *InvoiceHistoryUpdate) Mutation() *InvoiceHistoryMutation
Mutation returns the InvoiceHistoryMutation object of the builder.
func (*InvoiceHistoryUpdate) Save ¶
func (ihu *InvoiceHistoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*InvoiceHistoryUpdate) SaveX ¶
func (ihu *InvoiceHistoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*InvoiceHistoryUpdate) Where ¶
func (ihu *InvoiceHistoryUpdate) Where(ps ...predicate.InvoiceHistory) *InvoiceHistoryUpdate
Where appends a list predicates to the InvoiceHistoryUpdate builder.
type InvoiceHistoryUpdateOne ¶
type InvoiceHistoryUpdateOne struct {
// contains filtered or unexported fields
}
InvoiceHistoryUpdateOne is the builder for updating a single InvoiceHistory entity.
func (*InvoiceHistoryUpdateOne) Exec ¶
func (ihuo *InvoiceHistoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*InvoiceHistoryUpdateOne) ExecX ¶
func (ihuo *InvoiceHistoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceHistoryUpdateOne) Mutation ¶
func (ihuo *InvoiceHistoryUpdateOne) Mutation() *InvoiceHistoryMutation
Mutation returns the InvoiceHistoryMutation object of the builder.
func (*InvoiceHistoryUpdateOne) Save ¶
func (ihuo *InvoiceHistoryUpdateOne) Save(ctx context.Context) (*InvoiceHistory, error)
Save executes the query and returns the updated InvoiceHistory entity.
func (*InvoiceHistoryUpdateOne) SaveX ¶
func (ihuo *InvoiceHistoryUpdateOne) SaveX(ctx context.Context) *InvoiceHistory
SaveX is like Save, but panics if an error occurs.
func (*InvoiceHistoryUpdateOne) Select ¶
func (ihuo *InvoiceHistoryUpdateOne) Select(field string, fields ...string) *InvoiceHistoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*InvoiceHistoryUpdateOne) Where ¶
func (ihuo *InvoiceHistoryUpdateOne) Where(ps ...predicate.InvoiceHistory) *InvoiceHistoryUpdateOne
Where appends a list predicates to the InvoiceHistoryUpdate builder.
type InvoiceMutation ¶
type InvoiceMutation struct {
// contains filtered or unexported fields
}
InvoiceMutation represents an operation that mutates the Invoice nodes in the graph.
func (*InvoiceMutation) AddField ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) AddTotal ¶
func (m *InvoiceMutation) AddTotal(d decimal.Decimal)
AddTotal adds d to the "total" field.
func (*InvoiceMutation) AddedEdges ¶
func (m *InvoiceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*InvoiceMutation) AddedField ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) AddedFields ¶
func (m *InvoiceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*InvoiceMutation) AddedIDs ¶
func (m *InvoiceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*InvoiceMutation) AddedTotal ¶
func (m *InvoiceMutation) AddedTotal() (r decimal.Decimal, exists bool)
AddedTotal returns the value that was added to the "total" field in this mutation.
func (*InvoiceMutation) ClearEdge ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) ClearField ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) ClearInvoiceStatus ¶
func (m *InvoiceMutation) ClearInvoiceStatus()
ClearInvoiceStatus clears the "invoice_status" edge to the InvoiceStatusCode entity.
func (*InvoiceMutation) ClearNote ¶
func (m *InvoiceMutation) ClearNote()
ClearNote clears the value of the "note" field.
func (*InvoiceMutation) ClearOrder ¶
func (m *InvoiceMutation) ClearOrder()
ClearOrder clears the "order" edge to the Order entity.
func (*InvoiceMutation) ClearedEdges ¶
func (m *InvoiceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*InvoiceMutation) ClearedFields ¶
func (m *InvoiceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (InvoiceMutation) Client ¶
func (m InvoiceMutation) 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 (*InvoiceMutation) CreatedAt ¶
func (m *InvoiceMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*InvoiceMutation) EdgeCleared ¶
func (m *InvoiceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*InvoiceMutation) Field ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) FieldCleared ¶
func (m *InvoiceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*InvoiceMutation) Fields ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) GetType ¶
func (m *InvoiceMutation) GetType() (r invoice.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*InvoiceMutation) ID ¶
func (m *InvoiceMutation) ID() (id uuid.UUID, 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 (*InvoiceMutation) IDs ¶
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 (*InvoiceMutation) InvoiceStatusCleared ¶
func (m *InvoiceMutation) InvoiceStatusCleared() bool
InvoiceStatusCleared reports if the "invoice_status" edge to the InvoiceStatusCode entity was cleared.
func (*InvoiceMutation) InvoiceStatusID ¶
func (m *InvoiceMutation) InvoiceStatusID() (id int, exists bool)
InvoiceStatusID returns the "invoice_status" edge ID in the mutation.
func (*InvoiceMutation) InvoiceStatusIDs ¶
func (m *InvoiceMutation) InvoiceStatusIDs() (ids []int)
InvoiceStatusIDs returns the "invoice_status" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InvoiceStatusID instead. It exists only for internal usage by the builders.
func (*InvoiceMutation) Note ¶
func (m *InvoiceMutation) Note() (r string, exists bool)
Note returns the value of the "note" field in the mutation.
func (*InvoiceMutation) NoteCleared ¶
func (m *InvoiceMutation) NoteCleared() bool
NoteCleared returns if the "note" field was cleared in this mutation.
func (*InvoiceMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) 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 (*InvoiceMutation) OldNote ¶
func (m *InvoiceMutation) OldNote(ctx context.Context) (v *string, err error)
OldNote returns the old "note" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OldOrderID ¶
OldOrderID returns the old "order_id" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OldPaymentMethod ¶
func (m *InvoiceMutation) OldPaymentMethod(ctx context.Context) (v *invoice.PaymentMethod, err error)
OldPaymentMethod returns the old "payment_method" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OldStatusCode ¶
func (m *InvoiceMutation) OldStatusCode(ctx context.Context) (v *int, err error)
OldStatusCode returns the old "status_code" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OldTotal ¶
OldTotal returns the old "total" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OldType ¶
OldType returns the old "type" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Invoice entity. If the Invoice 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 (*InvoiceMutation) OrderCleared ¶
func (m *InvoiceMutation) OrderCleared() bool
OrderCleared reports if the "order" edge to the Order entity was cleared.
func (*InvoiceMutation) OrderID ¶
func (m *InvoiceMutation) OrderID() (r uuid.UUID, exists bool)
OrderID returns the value of the "order_id" field in the mutation.
func (*InvoiceMutation) OrderIDs ¶
func (m *InvoiceMutation) OrderIDs() (ids []uuid.UUID)
OrderIDs returns the "order" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrderID instead. It exists only for internal usage by the builders.
func (*InvoiceMutation) PaymentMethod ¶
func (m *InvoiceMutation) PaymentMethod() (r invoice.PaymentMethod, exists bool)
PaymentMethod returns the value of the "payment_method" field in the mutation.
func (*InvoiceMutation) RemovedEdges ¶
func (m *InvoiceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*InvoiceMutation) RemovedIDs ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) ResetCreatedAt ¶
func (m *InvoiceMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*InvoiceMutation) ResetEdge ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) ResetField ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) ResetInvoiceStatus ¶
func (m *InvoiceMutation) ResetInvoiceStatus()
ResetInvoiceStatus resets all changes to the "invoice_status" edge.
func (*InvoiceMutation) ResetNote ¶
func (m *InvoiceMutation) ResetNote()
ResetNote resets all changes to the "note" field.
func (*InvoiceMutation) ResetOrder ¶
func (m *InvoiceMutation) ResetOrder()
ResetOrder resets all changes to the "order" edge.
func (*InvoiceMutation) ResetOrderID ¶
func (m *InvoiceMutation) ResetOrderID()
ResetOrderID resets all changes to the "order_id" field.
func (*InvoiceMutation) ResetPaymentMethod ¶
func (m *InvoiceMutation) ResetPaymentMethod()
ResetPaymentMethod resets all changes to the "payment_method" field.
func (*InvoiceMutation) ResetStatusCode ¶
func (m *InvoiceMutation) ResetStatusCode()
ResetStatusCode resets all changes to the "status_code" field.
func (*InvoiceMutation) ResetTotal ¶
func (m *InvoiceMutation) ResetTotal()
ResetTotal resets all changes to the "total" field.
func (*InvoiceMutation) ResetType ¶
func (m *InvoiceMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*InvoiceMutation) ResetUpdatedAt ¶
func (m *InvoiceMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*InvoiceMutation) SetCreatedAt ¶
func (m *InvoiceMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*InvoiceMutation) SetField ¶
func (m *InvoiceMutation) 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 (*InvoiceMutation) SetID ¶
func (m *InvoiceMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Invoice entities.
func (*InvoiceMutation) SetInvoiceStatusID ¶
func (m *InvoiceMutation) SetInvoiceStatusID(id int)
SetInvoiceStatusID sets the "invoice_status" edge to the InvoiceStatusCode entity by id.
func (*InvoiceMutation) SetNote ¶
func (m *InvoiceMutation) SetNote(s string)
SetNote sets the "note" field.
func (*InvoiceMutation) SetOp ¶
func (m *InvoiceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*InvoiceMutation) SetOrderID ¶
func (m *InvoiceMutation) SetOrderID(u uuid.UUID)
SetOrderID sets the "order_id" field.
func (*InvoiceMutation) SetPaymentMethod ¶
func (m *InvoiceMutation) SetPaymentMethod(im invoice.PaymentMethod)
SetPaymentMethod sets the "payment_method" field.
func (*InvoiceMutation) SetStatusCode ¶
func (m *InvoiceMutation) SetStatusCode(i int)
SetStatusCode sets the "status_code" field.
func (*InvoiceMutation) SetTotal ¶
func (m *InvoiceMutation) SetTotal(d decimal.Decimal)
SetTotal sets the "total" field.
func (*InvoiceMutation) SetType ¶
func (m *InvoiceMutation) SetType(i invoice.Type)
SetType sets the "type" field.
func (*InvoiceMutation) SetUpdatedAt ¶
func (m *InvoiceMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*InvoiceMutation) StatusCode ¶
func (m *InvoiceMutation) StatusCode() (r int, exists bool)
StatusCode returns the value of the "status_code" field in the mutation.
func (*InvoiceMutation) Total ¶
func (m *InvoiceMutation) Total() (r decimal.Decimal, exists bool)
Total returns the value of the "total" field in the mutation.
func (InvoiceMutation) Tx ¶
func (m InvoiceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*InvoiceMutation) Type ¶
func (m *InvoiceMutation) Type() string
Type returns the node type of this mutation (Invoice).
func (*InvoiceMutation) UpdatedAt ¶
func (m *InvoiceMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*InvoiceMutation) Where ¶
func (m *InvoiceMutation) Where(ps ...predicate.Invoice)
Where appends a list predicates to the InvoiceMutation builder.
func (*InvoiceMutation) WhereP ¶
func (m *InvoiceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the InvoiceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type InvoiceQuery ¶
type InvoiceQuery struct {
// contains filtered or unexported fields
}
InvoiceQuery is the builder for querying Invoice entities.
func (*InvoiceQuery) Aggregate ¶
func (iq *InvoiceQuery) Aggregate(fns ...AggregateFunc) *InvoiceSelect
Aggregate returns a InvoiceSelect configured with the given aggregations.
func (*InvoiceQuery) All ¶
func (iq *InvoiceQuery) All(ctx context.Context) ([]*Invoice, error)
All executes the query and returns a list of Invoices.
func (*InvoiceQuery) AllX ¶
func (iq *InvoiceQuery) AllX(ctx context.Context) []*Invoice
AllX is like All, but panics if an error occurs.
func (*InvoiceQuery) Clone ¶
func (iq *InvoiceQuery) Clone() *InvoiceQuery
Clone returns a duplicate of the InvoiceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*InvoiceQuery) Count ¶
func (iq *InvoiceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*InvoiceQuery) CountX ¶
func (iq *InvoiceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*InvoiceQuery) Exist ¶
func (iq *InvoiceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*InvoiceQuery) ExistX ¶
func (iq *InvoiceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*InvoiceQuery) First ¶
func (iq *InvoiceQuery) First(ctx context.Context) (*Invoice, error)
First returns the first Invoice entity from the query. Returns a *NotFoundError when no Invoice was found.
func (*InvoiceQuery) FirstID ¶
FirstID returns the first Invoice ID from the query. Returns a *NotFoundError when no Invoice ID was found.
func (*InvoiceQuery) FirstIDX ¶
func (iq *InvoiceQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*InvoiceQuery) FirstX ¶
func (iq *InvoiceQuery) FirstX(ctx context.Context) *Invoice
FirstX is like First, but panics if an error occurs.
func (*InvoiceQuery) GroupBy ¶
func (iq *InvoiceQuery) GroupBy(field string, fields ...string) *InvoiceGroupBy
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.Invoice.Query(). GroupBy(invoice.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*InvoiceQuery) IDsX ¶
func (iq *InvoiceQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*InvoiceQuery) Limit ¶
func (iq *InvoiceQuery) Limit(limit int) *InvoiceQuery
Limit the number of records to be returned by this query.
func (*InvoiceQuery) Offset ¶
func (iq *InvoiceQuery) Offset(offset int) *InvoiceQuery
Offset to start from.
func (*InvoiceQuery) Only ¶
func (iq *InvoiceQuery) Only(ctx context.Context) (*Invoice, error)
Only returns a single Invoice entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Invoice entity is found. Returns a *NotFoundError when no Invoice entities are found.
func (*InvoiceQuery) OnlyID ¶
OnlyID is like Only, but returns the only Invoice ID in the query. Returns a *NotSingularError when more than one Invoice ID is found. Returns a *NotFoundError when no entities are found.
func (*InvoiceQuery) OnlyIDX ¶
func (iq *InvoiceQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*InvoiceQuery) OnlyX ¶
func (iq *InvoiceQuery) OnlyX(ctx context.Context) *Invoice
OnlyX is like Only, but panics if an error occurs.
func (*InvoiceQuery) Order ¶
func (iq *InvoiceQuery) Order(o ...invoice.OrderOption) *InvoiceQuery
Order specifies how the records should be ordered.
func (*InvoiceQuery) QueryInvoiceStatus ¶
func (iq *InvoiceQuery) QueryInvoiceStatus() *InvoiceStatusCodeQuery
QueryInvoiceStatus chains the current query on the "invoice_status" edge.
func (*InvoiceQuery) QueryOrder ¶
func (iq *InvoiceQuery) QueryOrder() *OrderQuery
QueryOrder chains the current query on the "order" edge.
func (*InvoiceQuery) Select ¶
func (iq *InvoiceQuery) Select(fields ...string) *InvoiceSelect
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.Invoice.Query(). Select(invoice.FieldCreatedAt). Scan(ctx, &v)
func (*InvoiceQuery) Unique ¶
func (iq *InvoiceQuery) Unique(unique bool) *InvoiceQuery
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 (*InvoiceQuery) Where ¶
func (iq *InvoiceQuery) Where(ps ...predicate.Invoice) *InvoiceQuery
Where adds a new predicate for the InvoiceQuery builder.
func (*InvoiceQuery) WithInvoiceStatus ¶
func (iq *InvoiceQuery) WithInvoiceStatus(opts ...func(*InvoiceStatusCodeQuery)) *InvoiceQuery
WithInvoiceStatus tells the query-builder to eager-load the nodes that are connected to the "invoice_status" edge. The optional arguments are used to configure the query builder of the edge.
func (*InvoiceQuery) WithOrder ¶
func (iq *InvoiceQuery) WithOrder(opts ...func(*OrderQuery)) *InvoiceQuery
WithOrder tells the query-builder to eager-load the nodes that are connected to the "order" edge. The optional arguments are used to configure the query builder of the edge.
type InvoiceSelect ¶
type InvoiceSelect struct { *InvoiceQuery // contains filtered or unexported fields }
InvoiceSelect is the builder for selecting fields of Invoice entities.
func (*InvoiceSelect) Aggregate ¶
func (is *InvoiceSelect) Aggregate(fns ...AggregateFunc) *InvoiceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*InvoiceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InvoiceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InvoiceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InvoiceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InvoiceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InvoiceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InvoiceSelect) Scan ¶
func (is *InvoiceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InvoiceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InvoiceStatusCode ¶
type InvoiceStatusCode struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // InvoiceStatus holds the value of the "invoice_status" field. InvoiceStatus string `json:"invoice_status,omitempty"` // contains filtered or unexported fields }
InvoiceStatusCode is the model entity for the InvoiceStatusCode schema.
func (*InvoiceStatusCode) String ¶
func (isc *InvoiceStatusCode) String() string
String implements the fmt.Stringer.
func (*InvoiceStatusCode) Unwrap ¶
func (isc *InvoiceStatusCode) Unwrap() *InvoiceStatusCode
Unwrap unwraps the InvoiceStatusCode 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 (*InvoiceStatusCode) Update ¶
func (isc *InvoiceStatusCode) Update() *InvoiceStatusCodeUpdateOne
Update returns a builder for updating this InvoiceStatusCode. Note that you need to call InvoiceStatusCode.Unwrap() before calling this method if this InvoiceStatusCode was returned from a transaction, and the transaction was committed or rolled back.
type InvoiceStatusCodeClient ¶
type InvoiceStatusCodeClient struct {
// contains filtered or unexported fields
}
InvoiceStatusCodeClient is a client for the InvoiceStatusCode schema.
func NewInvoiceStatusCodeClient ¶
func NewInvoiceStatusCodeClient(c config) *InvoiceStatusCodeClient
NewInvoiceStatusCodeClient returns a client for the InvoiceStatusCode from the given config.
func (*InvoiceStatusCodeClient) Create ¶
func (c *InvoiceStatusCodeClient) Create() *InvoiceStatusCodeCreate
Create returns a builder for creating a InvoiceStatusCode entity.
func (*InvoiceStatusCodeClient) CreateBulk ¶
func (c *InvoiceStatusCodeClient) CreateBulk(builders ...*InvoiceStatusCodeCreate) *InvoiceStatusCodeCreateBulk
CreateBulk returns a builder for creating a bulk of InvoiceStatusCode entities.
func (*InvoiceStatusCodeClient) Delete ¶
func (c *InvoiceStatusCodeClient) Delete() *InvoiceStatusCodeDelete
Delete returns a delete builder for InvoiceStatusCode.
func (*InvoiceStatusCodeClient) DeleteOne ¶
func (c *InvoiceStatusCodeClient) DeleteOne(isc *InvoiceStatusCode) *InvoiceStatusCodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*InvoiceStatusCodeClient) DeleteOneID ¶
func (c *InvoiceStatusCodeClient) DeleteOneID(id int) *InvoiceStatusCodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*InvoiceStatusCodeClient) Get ¶
func (c *InvoiceStatusCodeClient) Get(ctx context.Context, id int) (*InvoiceStatusCode, error)
Get returns a InvoiceStatusCode entity by its id.
func (*InvoiceStatusCodeClient) GetX ¶
func (c *InvoiceStatusCodeClient) GetX(ctx context.Context, id int) *InvoiceStatusCode
GetX is like Get, but panics if an error occurs.
func (*InvoiceStatusCodeClient) Hooks ¶
func (c *InvoiceStatusCodeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*InvoiceStatusCodeClient) Intercept ¶
func (c *InvoiceStatusCodeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `invoicestatuscode.Intercept(f(g(h())))`.
func (*InvoiceStatusCodeClient) Interceptors ¶
func (c *InvoiceStatusCodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*InvoiceStatusCodeClient) MapCreateBulk ¶
func (c *InvoiceStatusCodeClient) MapCreateBulk(slice any, setFunc func(*InvoiceStatusCodeCreate, int)) *InvoiceStatusCodeCreateBulk
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 (*InvoiceStatusCodeClient) Query ¶
func (c *InvoiceStatusCodeClient) Query() *InvoiceStatusCodeQuery
Query returns a query builder for InvoiceStatusCode.
func (*InvoiceStatusCodeClient) Update ¶
func (c *InvoiceStatusCodeClient) Update() *InvoiceStatusCodeUpdate
Update returns an update builder for InvoiceStatusCode.
func (*InvoiceStatusCodeClient) UpdateOne ¶
func (c *InvoiceStatusCodeClient) UpdateOne(isc *InvoiceStatusCode) *InvoiceStatusCodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*InvoiceStatusCodeClient) UpdateOneID ¶
func (c *InvoiceStatusCodeClient) UpdateOneID(id int) *InvoiceStatusCodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*InvoiceStatusCodeClient) Use ¶
func (c *InvoiceStatusCodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `invoicestatuscode.Hooks(f(g(h())))`.
type InvoiceStatusCodeCreate ¶
type InvoiceStatusCodeCreate struct {
// contains filtered or unexported fields
}
InvoiceStatusCodeCreate is the builder for creating a InvoiceStatusCode entity.
func (*InvoiceStatusCodeCreate) Exec ¶
func (iscc *InvoiceStatusCodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceStatusCodeCreate) ExecX ¶
func (iscc *InvoiceStatusCodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceStatusCodeCreate) Mutation ¶
func (iscc *InvoiceStatusCodeCreate) Mutation() *InvoiceStatusCodeMutation
Mutation returns the InvoiceStatusCodeMutation object of the builder.
func (*InvoiceStatusCodeCreate) Save ¶
func (iscc *InvoiceStatusCodeCreate) Save(ctx context.Context) (*InvoiceStatusCode, error)
Save creates the InvoiceStatusCode in the database.
func (*InvoiceStatusCodeCreate) SaveX ¶
func (iscc *InvoiceStatusCodeCreate) SaveX(ctx context.Context) *InvoiceStatusCode
SaveX calls Save and panics if Save returns an error.
func (*InvoiceStatusCodeCreate) SetCreatedAt ¶
func (iscc *InvoiceStatusCodeCreate) SetCreatedAt(t time.Time) *InvoiceStatusCodeCreate
SetCreatedAt sets the "created_at" field.
func (*InvoiceStatusCodeCreate) SetID ¶
func (iscc *InvoiceStatusCodeCreate) SetID(i int) *InvoiceStatusCodeCreate
SetID sets the "id" field.
func (*InvoiceStatusCodeCreate) SetInvoiceStatus ¶
func (iscc *InvoiceStatusCodeCreate) SetInvoiceStatus(s string) *InvoiceStatusCodeCreate
SetInvoiceStatus sets the "invoice_status" field.
func (*InvoiceStatusCodeCreate) SetNillableCreatedAt ¶
func (iscc *InvoiceStatusCodeCreate) SetNillableCreatedAt(t *time.Time) *InvoiceStatusCodeCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*InvoiceStatusCodeCreate) SetNillableUpdatedAt ¶
func (iscc *InvoiceStatusCodeCreate) SetNillableUpdatedAt(t *time.Time) *InvoiceStatusCodeCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*InvoiceStatusCodeCreate) SetUpdatedAt ¶
func (iscc *InvoiceStatusCodeCreate) SetUpdatedAt(t time.Time) *InvoiceStatusCodeCreate
SetUpdatedAt sets the "updated_at" field.
type InvoiceStatusCodeCreateBulk ¶
type InvoiceStatusCodeCreateBulk struct {
// contains filtered or unexported fields
}
InvoiceStatusCodeCreateBulk is the builder for creating many InvoiceStatusCode entities in bulk.
func (*InvoiceStatusCodeCreateBulk) Exec ¶
func (isccb *InvoiceStatusCodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceStatusCodeCreateBulk) ExecX ¶
func (isccb *InvoiceStatusCodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceStatusCodeCreateBulk) Save ¶
func (isccb *InvoiceStatusCodeCreateBulk) Save(ctx context.Context) ([]*InvoiceStatusCode, error)
Save creates the InvoiceStatusCode entities in the database.
func (*InvoiceStatusCodeCreateBulk) SaveX ¶
func (isccb *InvoiceStatusCodeCreateBulk) SaveX(ctx context.Context) []*InvoiceStatusCode
SaveX is like Save, but panics if an error occurs.
type InvoiceStatusCodeDelete ¶
type InvoiceStatusCodeDelete struct {
// contains filtered or unexported fields
}
InvoiceStatusCodeDelete is the builder for deleting a InvoiceStatusCode entity.
func (*InvoiceStatusCodeDelete) Exec ¶
func (iscd *InvoiceStatusCodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*InvoiceStatusCodeDelete) ExecX ¶
func (iscd *InvoiceStatusCodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceStatusCodeDelete) Where ¶
func (iscd *InvoiceStatusCodeDelete) Where(ps ...predicate.InvoiceStatusCode) *InvoiceStatusCodeDelete
Where appends a list predicates to the InvoiceStatusCodeDelete builder.
type InvoiceStatusCodeDeleteOne ¶
type InvoiceStatusCodeDeleteOne struct {
// contains filtered or unexported fields
}
InvoiceStatusCodeDeleteOne is the builder for deleting a single InvoiceStatusCode entity.
func (*InvoiceStatusCodeDeleteOne) Exec ¶
func (iscdo *InvoiceStatusCodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*InvoiceStatusCodeDeleteOne) ExecX ¶
func (iscdo *InvoiceStatusCodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceStatusCodeDeleteOne) Where ¶
func (iscdo *InvoiceStatusCodeDeleteOne) Where(ps ...predicate.InvoiceStatusCode) *InvoiceStatusCodeDeleteOne
Where appends a list predicates to the InvoiceStatusCodeDelete builder.
type InvoiceStatusCodeGroupBy ¶
type InvoiceStatusCodeGroupBy struct {
// contains filtered or unexported fields
}
InvoiceStatusCodeGroupBy is the group-by builder for InvoiceStatusCode entities.
func (*InvoiceStatusCodeGroupBy) Aggregate ¶
func (iscgb *InvoiceStatusCodeGroupBy) Aggregate(fns ...AggregateFunc) *InvoiceStatusCodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*InvoiceStatusCodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InvoiceStatusCodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InvoiceStatusCodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InvoiceStatusCodeGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*InvoiceStatusCodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InvoiceStatusCodeGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*InvoiceStatusCodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InvoiceStatusCodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InvoiceStatusCodeGroupBy) Scan ¶
func (iscgb *InvoiceStatusCodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InvoiceStatusCodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InvoiceStatusCodeMutation ¶
type InvoiceStatusCodeMutation struct {
// contains filtered or unexported fields
}
InvoiceStatusCodeMutation represents an operation that mutates the InvoiceStatusCode nodes in the graph.
func (*InvoiceStatusCodeMutation) AddField ¶
func (m *InvoiceStatusCodeMutation) 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 (*InvoiceStatusCodeMutation) AddedEdges ¶
func (m *InvoiceStatusCodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*InvoiceStatusCodeMutation) AddedField ¶
func (m *InvoiceStatusCodeMutation) 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 (*InvoiceStatusCodeMutation) AddedFields ¶
func (m *InvoiceStatusCodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*InvoiceStatusCodeMutation) AddedIDs ¶
func (m *InvoiceStatusCodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*InvoiceStatusCodeMutation) ClearEdge ¶
func (m *InvoiceStatusCodeMutation) 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 (*InvoiceStatusCodeMutation) ClearField ¶
func (m *InvoiceStatusCodeMutation) 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 (*InvoiceStatusCodeMutation) ClearedEdges ¶
func (m *InvoiceStatusCodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*InvoiceStatusCodeMutation) ClearedFields ¶
func (m *InvoiceStatusCodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (InvoiceStatusCodeMutation) Client ¶
func (m InvoiceStatusCodeMutation) 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 (*InvoiceStatusCodeMutation) CreatedAt ¶
func (m *InvoiceStatusCodeMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*InvoiceStatusCodeMutation) EdgeCleared ¶
func (m *InvoiceStatusCodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*InvoiceStatusCodeMutation) Field ¶
func (m *InvoiceStatusCodeMutation) 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 (*InvoiceStatusCodeMutation) FieldCleared ¶
func (m *InvoiceStatusCodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*InvoiceStatusCodeMutation) Fields ¶
func (m *InvoiceStatusCodeMutation) 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 (*InvoiceStatusCodeMutation) ID ¶
func (m *InvoiceStatusCodeMutation) ID() (id int, 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 (*InvoiceStatusCodeMutation) IDs ¶
func (m *InvoiceStatusCodeMutation) IDs(ctx context.Context) ([]int, 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 (*InvoiceStatusCodeMutation) InvoiceStatus ¶
func (m *InvoiceStatusCodeMutation) InvoiceStatus() (r string, exists bool)
InvoiceStatus returns the value of the "invoice_status" field in the mutation.
func (*InvoiceStatusCodeMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the InvoiceStatusCode entity. If the InvoiceStatusCode 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 (*InvoiceStatusCodeMutation) 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 (*InvoiceStatusCodeMutation) OldInvoiceStatus ¶
func (m *InvoiceStatusCodeMutation) OldInvoiceStatus(ctx context.Context) (v string, err error)
OldInvoiceStatus returns the old "invoice_status" field's value of the InvoiceStatusCode entity. If the InvoiceStatusCode 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 (*InvoiceStatusCodeMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the InvoiceStatusCode entity. If the InvoiceStatusCode 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 (*InvoiceStatusCodeMutation) Op ¶
func (m *InvoiceStatusCodeMutation) Op() Op
Op returns the operation name.
func (*InvoiceStatusCodeMutation) RemovedEdges ¶
func (m *InvoiceStatusCodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*InvoiceStatusCodeMutation) RemovedIDs ¶
func (m *InvoiceStatusCodeMutation) 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 (*InvoiceStatusCodeMutation) ResetCreatedAt ¶
func (m *InvoiceStatusCodeMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*InvoiceStatusCodeMutation) ResetEdge ¶
func (m *InvoiceStatusCodeMutation) 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 (*InvoiceStatusCodeMutation) ResetField ¶
func (m *InvoiceStatusCodeMutation) 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 (*InvoiceStatusCodeMutation) ResetInvoiceStatus ¶
func (m *InvoiceStatusCodeMutation) ResetInvoiceStatus()
ResetInvoiceStatus resets all changes to the "invoice_status" field.
func (*InvoiceStatusCodeMutation) ResetUpdatedAt ¶
func (m *InvoiceStatusCodeMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*InvoiceStatusCodeMutation) SetCreatedAt ¶
func (m *InvoiceStatusCodeMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*InvoiceStatusCodeMutation) SetField ¶
func (m *InvoiceStatusCodeMutation) 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 (*InvoiceStatusCodeMutation) SetID ¶
func (m *InvoiceStatusCodeMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of InvoiceStatusCode entities.
func (*InvoiceStatusCodeMutation) SetInvoiceStatus ¶
func (m *InvoiceStatusCodeMutation) SetInvoiceStatus(s string)
SetInvoiceStatus sets the "invoice_status" field.
func (*InvoiceStatusCodeMutation) SetOp ¶
func (m *InvoiceStatusCodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*InvoiceStatusCodeMutation) SetUpdatedAt ¶
func (m *InvoiceStatusCodeMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (InvoiceStatusCodeMutation) Tx ¶
func (m InvoiceStatusCodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*InvoiceStatusCodeMutation) Type ¶
func (m *InvoiceStatusCodeMutation) Type() string
Type returns the node type of this mutation (InvoiceStatusCode).
func (*InvoiceStatusCodeMutation) UpdatedAt ¶
func (m *InvoiceStatusCodeMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*InvoiceStatusCodeMutation) Where ¶
func (m *InvoiceStatusCodeMutation) Where(ps ...predicate.InvoiceStatusCode)
Where appends a list predicates to the InvoiceStatusCodeMutation builder.
func (*InvoiceStatusCodeMutation) WhereP ¶
func (m *InvoiceStatusCodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the InvoiceStatusCodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type InvoiceStatusCodeQuery ¶
type InvoiceStatusCodeQuery struct {
// contains filtered or unexported fields
}
InvoiceStatusCodeQuery is the builder for querying InvoiceStatusCode entities.
func (*InvoiceStatusCodeQuery) Aggregate ¶
func (iscq *InvoiceStatusCodeQuery) Aggregate(fns ...AggregateFunc) *InvoiceStatusCodeSelect
Aggregate returns a InvoiceStatusCodeSelect configured with the given aggregations.
func (*InvoiceStatusCodeQuery) All ¶
func (iscq *InvoiceStatusCodeQuery) All(ctx context.Context) ([]*InvoiceStatusCode, error)
All executes the query and returns a list of InvoiceStatusCodes.
func (*InvoiceStatusCodeQuery) AllX ¶
func (iscq *InvoiceStatusCodeQuery) AllX(ctx context.Context) []*InvoiceStatusCode
AllX is like All, but panics if an error occurs.
func (*InvoiceStatusCodeQuery) Clone ¶
func (iscq *InvoiceStatusCodeQuery) Clone() *InvoiceStatusCodeQuery
Clone returns a duplicate of the InvoiceStatusCodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*InvoiceStatusCodeQuery) Count ¶
func (iscq *InvoiceStatusCodeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*InvoiceStatusCodeQuery) CountX ¶
func (iscq *InvoiceStatusCodeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*InvoiceStatusCodeQuery) Exist ¶
func (iscq *InvoiceStatusCodeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*InvoiceStatusCodeQuery) ExistX ¶
func (iscq *InvoiceStatusCodeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*InvoiceStatusCodeQuery) First ¶
func (iscq *InvoiceStatusCodeQuery) First(ctx context.Context) (*InvoiceStatusCode, error)
First returns the first InvoiceStatusCode entity from the query. Returns a *NotFoundError when no InvoiceStatusCode was found.
func (*InvoiceStatusCodeQuery) FirstID ¶
func (iscq *InvoiceStatusCodeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first InvoiceStatusCode ID from the query. Returns a *NotFoundError when no InvoiceStatusCode ID was found.
func (*InvoiceStatusCodeQuery) FirstIDX ¶
func (iscq *InvoiceStatusCodeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*InvoiceStatusCodeQuery) FirstX ¶
func (iscq *InvoiceStatusCodeQuery) FirstX(ctx context.Context) *InvoiceStatusCode
FirstX is like First, but panics if an error occurs.
func (*InvoiceStatusCodeQuery) GroupBy ¶
func (iscq *InvoiceStatusCodeQuery) GroupBy(field string, fields ...string) *InvoiceStatusCodeGroupBy
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.InvoiceStatusCode.Query(). GroupBy(invoicestatuscode.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*InvoiceStatusCodeQuery) IDs ¶
func (iscq *InvoiceStatusCodeQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of InvoiceStatusCode IDs.
func (*InvoiceStatusCodeQuery) IDsX ¶
func (iscq *InvoiceStatusCodeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*InvoiceStatusCodeQuery) Limit ¶
func (iscq *InvoiceStatusCodeQuery) Limit(limit int) *InvoiceStatusCodeQuery
Limit the number of records to be returned by this query.
func (*InvoiceStatusCodeQuery) Offset ¶
func (iscq *InvoiceStatusCodeQuery) Offset(offset int) *InvoiceStatusCodeQuery
Offset to start from.
func (*InvoiceStatusCodeQuery) Only ¶
func (iscq *InvoiceStatusCodeQuery) Only(ctx context.Context) (*InvoiceStatusCode, error)
Only returns a single InvoiceStatusCode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one InvoiceStatusCode entity is found. Returns a *NotFoundError when no InvoiceStatusCode entities are found.
func (*InvoiceStatusCodeQuery) OnlyID ¶
func (iscq *InvoiceStatusCodeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only InvoiceStatusCode ID in the query. Returns a *NotSingularError when more than one InvoiceStatusCode ID is found. Returns a *NotFoundError when no entities are found.
func (*InvoiceStatusCodeQuery) OnlyIDX ¶
func (iscq *InvoiceStatusCodeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*InvoiceStatusCodeQuery) OnlyX ¶
func (iscq *InvoiceStatusCodeQuery) OnlyX(ctx context.Context) *InvoiceStatusCode
OnlyX is like Only, but panics if an error occurs.
func (*InvoiceStatusCodeQuery) Order ¶
func (iscq *InvoiceStatusCodeQuery) Order(o ...invoicestatuscode.OrderOption) *InvoiceStatusCodeQuery
Order specifies how the records should be ordered.
func (*InvoiceStatusCodeQuery) Select ¶
func (iscq *InvoiceStatusCodeQuery) Select(fields ...string) *InvoiceStatusCodeSelect
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.InvoiceStatusCode.Query(). Select(invoicestatuscode.FieldCreatedAt). Scan(ctx, &v)
func (*InvoiceStatusCodeQuery) Unique ¶
func (iscq *InvoiceStatusCodeQuery) Unique(unique bool) *InvoiceStatusCodeQuery
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 (*InvoiceStatusCodeQuery) Where ¶
func (iscq *InvoiceStatusCodeQuery) Where(ps ...predicate.InvoiceStatusCode) *InvoiceStatusCodeQuery
Where adds a new predicate for the InvoiceStatusCodeQuery builder.
type InvoiceStatusCodeSelect ¶
type InvoiceStatusCodeSelect struct { *InvoiceStatusCodeQuery // contains filtered or unexported fields }
InvoiceStatusCodeSelect is the builder for selecting fields of InvoiceStatusCode entities.
func (*InvoiceStatusCodeSelect) Aggregate ¶
func (iscs *InvoiceStatusCodeSelect) Aggregate(fns ...AggregateFunc) *InvoiceStatusCodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*InvoiceStatusCodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InvoiceStatusCodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InvoiceStatusCodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InvoiceStatusCodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InvoiceStatusCodeSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*InvoiceStatusCodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InvoiceStatusCodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InvoiceStatusCodeSelect) Scan ¶
func (iscs *InvoiceStatusCodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InvoiceStatusCodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InvoiceStatusCodeUpdate ¶
type InvoiceStatusCodeUpdate struct {
// contains filtered or unexported fields
}
InvoiceStatusCodeUpdate is the builder for updating InvoiceStatusCode entities.
func (*InvoiceStatusCodeUpdate) Exec ¶
func (iscu *InvoiceStatusCodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceStatusCodeUpdate) ExecX ¶
func (iscu *InvoiceStatusCodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceStatusCodeUpdate) Mutation ¶
func (iscu *InvoiceStatusCodeUpdate) Mutation() *InvoiceStatusCodeMutation
Mutation returns the InvoiceStatusCodeMutation object of the builder.
func (*InvoiceStatusCodeUpdate) Save ¶
func (iscu *InvoiceStatusCodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*InvoiceStatusCodeUpdate) SaveX ¶
func (iscu *InvoiceStatusCodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*InvoiceStatusCodeUpdate) SetInvoiceStatus ¶
func (iscu *InvoiceStatusCodeUpdate) SetInvoiceStatus(s string) *InvoiceStatusCodeUpdate
SetInvoiceStatus sets the "invoice_status" field.
func (*InvoiceStatusCodeUpdate) SetNillableInvoiceStatus ¶
func (iscu *InvoiceStatusCodeUpdate) SetNillableInvoiceStatus(s *string) *InvoiceStatusCodeUpdate
SetNillableInvoiceStatus sets the "invoice_status" field if the given value is not nil.
func (*InvoiceStatusCodeUpdate) SetUpdatedAt ¶
func (iscu *InvoiceStatusCodeUpdate) SetUpdatedAt(t time.Time) *InvoiceStatusCodeUpdate
SetUpdatedAt sets the "updated_at" field.
func (*InvoiceStatusCodeUpdate) Where ¶
func (iscu *InvoiceStatusCodeUpdate) Where(ps ...predicate.InvoiceStatusCode) *InvoiceStatusCodeUpdate
Where appends a list predicates to the InvoiceStatusCodeUpdate builder.
type InvoiceStatusCodeUpdateOne ¶
type InvoiceStatusCodeUpdateOne struct {
// contains filtered or unexported fields
}
InvoiceStatusCodeUpdateOne is the builder for updating a single InvoiceStatusCode entity.
func (*InvoiceStatusCodeUpdateOne) Exec ¶
func (iscuo *InvoiceStatusCodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*InvoiceStatusCodeUpdateOne) ExecX ¶
func (iscuo *InvoiceStatusCodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceStatusCodeUpdateOne) Mutation ¶
func (iscuo *InvoiceStatusCodeUpdateOne) Mutation() *InvoiceStatusCodeMutation
Mutation returns the InvoiceStatusCodeMutation object of the builder.
func (*InvoiceStatusCodeUpdateOne) Save ¶
func (iscuo *InvoiceStatusCodeUpdateOne) Save(ctx context.Context) (*InvoiceStatusCode, error)
Save executes the query and returns the updated InvoiceStatusCode entity.
func (*InvoiceStatusCodeUpdateOne) SaveX ¶
func (iscuo *InvoiceStatusCodeUpdateOne) SaveX(ctx context.Context) *InvoiceStatusCode
SaveX is like Save, but panics if an error occurs.
func (*InvoiceStatusCodeUpdateOne) Select ¶
func (iscuo *InvoiceStatusCodeUpdateOne) Select(field string, fields ...string) *InvoiceStatusCodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*InvoiceStatusCodeUpdateOne) SetInvoiceStatus ¶
func (iscuo *InvoiceStatusCodeUpdateOne) SetInvoiceStatus(s string) *InvoiceStatusCodeUpdateOne
SetInvoiceStatus sets the "invoice_status" field.
func (*InvoiceStatusCodeUpdateOne) SetNillableInvoiceStatus ¶
func (iscuo *InvoiceStatusCodeUpdateOne) SetNillableInvoiceStatus(s *string) *InvoiceStatusCodeUpdateOne
SetNillableInvoiceStatus sets the "invoice_status" field if the given value is not nil.
func (*InvoiceStatusCodeUpdateOne) SetUpdatedAt ¶
func (iscuo *InvoiceStatusCodeUpdateOne) SetUpdatedAt(t time.Time) *InvoiceStatusCodeUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*InvoiceStatusCodeUpdateOne) Where ¶
func (iscuo *InvoiceStatusCodeUpdateOne) Where(ps ...predicate.InvoiceStatusCode) *InvoiceStatusCodeUpdateOne
Where appends a list predicates to the InvoiceStatusCodeUpdate builder.
type InvoiceStatusCodes ¶
type InvoiceStatusCodes []*InvoiceStatusCode
InvoiceStatusCodes is a parsable slice of InvoiceStatusCode.
type InvoiceUpdate ¶
type InvoiceUpdate struct {
// contains filtered or unexported fields
}
InvoiceUpdate is the builder for updating Invoice entities.
func (*InvoiceUpdate) ClearInvoiceStatus ¶
func (iu *InvoiceUpdate) ClearInvoiceStatus() *InvoiceUpdate
ClearInvoiceStatus clears the "invoice_status" edge to the InvoiceStatusCode entity.
func (*InvoiceUpdate) ClearNote ¶
func (iu *InvoiceUpdate) ClearNote() *InvoiceUpdate
ClearNote clears the value of the "note" field.
func (*InvoiceUpdate) Exec ¶
func (iu *InvoiceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*InvoiceUpdate) ExecX ¶
func (iu *InvoiceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceUpdate) Mutation ¶
func (iu *InvoiceUpdate) Mutation() *InvoiceMutation
Mutation returns the InvoiceMutation object of the builder.
func (*InvoiceUpdate) Save ¶
func (iu *InvoiceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*InvoiceUpdate) SaveX ¶
func (iu *InvoiceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*InvoiceUpdate) SetInvoiceStatus ¶
func (iu *InvoiceUpdate) SetInvoiceStatus(i *InvoiceStatusCode) *InvoiceUpdate
SetInvoiceStatus sets the "invoice_status" edge to the InvoiceStatusCode entity.
func (*InvoiceUpdate) SetInvoiceStatusID ¶
func (iu *InvoiceUpdate) SetInvoiceStatusID(id int) *InvoiceUpdate
SetInvoiceStatusID sets the "invoice_status" edge to the InvoiceStatusCode entity by ID.
func (*InvoiceUpdate) SetNillableNote ¶
func (iu *InvoiceUpdate) SetNillableNote(s *string) *InvoiceUpdate
SetNillableNote sets the "note" field if the given value is not nil.
func (*InvoiceUpdate) SetNillablePaymentMethod ¶
func (iu *InvoiceUpdate) SetNillablePaymentMethod(im *invoice.PaymentMethod) *InvoiceUpdate
SetNillablePaymentMethod sets the "payment_method" field if the given value is not nil.
func (*InvoiceUpdate) SetNillableStatusCode ¶
func (iu *InvoiceUpdate) SetNillableStatusCode(i *int) *InvoiceUpdate
SetNillableStatusCode sets the "status_code" field if the given value is not nil.
func (*InvoiceUpdate) SetNote ¶
func (iu *InvoiceUpdate) SetNote(s string) *InvoiceUpdate
SetNote sets the "note" field.
func (*InvoiceUpdate) SetPaymentMethod ¶
func (iu *InvoiceUpdate) SetPaymentMethod(im invoice.PaymentMethod) *InvoiceUpdate
SetPaymentMethod sets the "payment_method" field.
func (*InvoiceUpdate) SetStatusCode ¶
func (iu *InvoiceUpdate) SetStatusCode(i int) *InvoiceUpdate
SetStatusCode sets the "status_code" field.
func (*InvoiceUpdate) SetUpdatedAt ¶
func (iu *InvoiceUpdate) SetUpdatedAt(t time.Time) *InvoiceUpdate
SetUpdatedAt sets the "updated_at" field.
func (*InvoiceUpdate) Where ¶
func (iu *InvoiceUpdate) Where(ps ...predicate.Invoice) *InvoiceUpdate
Where appends a list predicates to the InvoiceUpdate builder.
type InvoiceUpdateOne ¶
type InvoiceUpdateOne struct {
// contains filtered or unexported fields
}
InvoiceUpdateOne is the builder for updating a single Invoice entity.
func (*InvoiceUpdateOne) ClearInvoiceStatus ¶
func (iuo *InvoiceUpdateOne) ClearInvoiceStatus() *InvoiceUpdateOne
ClearInvoiceStatus clears the "invoice_status" edge to the InvoiceStatusCode entity.
func (*InvoiceUpdateOne) ClearNote ¶
func (iuo *InvoiceUpdateOne) ClearNote() *InvoiceUpdateOne
ClearNote clears the value of the "note" field.
func (*InvoiceUpdateOne) Exec ¶
func (iuo *InvoiceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*InvoiceUpdateOne) ExecX ¶
func (iuo *InvoiceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InvoiceUpdateOne) Mutation ¶
func (iuo *InvoiceUpdateOne) Mutation() *InvoiceMutation
Mutation returns the InvoiceMutation object of the builder.
func (*InvoiceUpdateOne) Save ¶
func (iuo *InvoiceUpdateOne) Save(ctx context.Context) (*Invoice, error)
Save executes the query and returns the updated Invoice entity.
func (*InvoiceUpdateOne) SaveX ¶
func (iuo *InvoiceUpdateOne) SaveX(ctx context.Context) *Invoice
SaveX is like Save, but panics if an error occurs.
func (*InvoiceUpdateOne) Select ¶
func (iuo *InvoiceUpdateOne) Select(field string, fields ...string) *InvoiceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*InvoiceUpdateOne) SetInvoiceStatus ¶
func (iuo *InvoiceUpdateOne) SetInvoiceStatus(i *InvoiceStatusCode) *InvoiceUpdateOne
SetInvoiceStatus sets the "invoice_status" edge to the InvoiceStatusCode entity.
func (*InvoiceUpdateOne) SetInvoiceStatusID ¶
func (iuo *InvoiceUpdateOne) SetInvoiceStatusID(id int) *InvoiceUpdateOne
SetInvoiceStatusID sets the "invoice_status" edge to the InvoiceStatusCode entity by ID.
func (*InvoiceUpdateOne) SetNillableNote ¶
func (iuo *InvoiceUpdateOne) SetNillableNote(s *string) *InvoiceUpdateOne
SetNillableNote sets the "note" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillablePaymentMethod ¶
func (iuo *InvoiceUpdateOne) SetNillablePaymentMethod(im *invoice.PaymentMethod) *InvoiceUpdateOne
SetNillablePaymentMethod sets the "payment_method" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNillableStatusCode ¶
func (iuo *InvoiceUpdateOne) SetNillableStatusCode(i *int) *InvoiceUpdateOne
SetNillableStatusCode sets the "status_code" field if the given value is not nil.
func (*InvoiceUpdateOne) SetNote ¶
func (iuo *InvoiceUpdateOne) SetNote(s string) *InvoiceUpdateOne
SetNote sets the "note" field.
func (*InvoiceUpdateOne) SetPaymentMethod ¶
func (iuo *InvoiceUpdateOne) SetPaymentMethod(im invoice.PaymentMethod) *InvoiceUpdateOne
SetPaymentMethod sets the "payment_method" field.
func (*InvoiceUpdateOne) SetStatusCode ¶
func (iuo *InvoiceUpdateOne) SetStatusCode(i int) *InvoiceUpdateOne
SetStatusCode sets the "status_code" field.
func (*InvoiceUpdateOne) SetUpdatedAt ¶
func (iuo *InvoiceUpdateOne) SetUpdatedAt(t time.Time) *InvoiceUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*InvoiceUpdateOne) Where ¶
func (iuo *InvoiceUpdateOne) Where(ps ...predicate.Invoice) *InvoiceUpdateOne
Where appends a list predicates to the InvoiceUpdate builder.
type Message ¶
type Message struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // ConversationID holds the value of the "conversation_id" field. ConversationID uuid.UUID `json:"conversation_id,omitempty"` // SenderID holds the value of the "sender_id" field. SenderID uuid.UUID `json:"sender_id,omitempty"` // Type holds the value of the "type" field. Type *message.Type `json:"type,omitempty"` // Content holds the value of the "content" field. Content string `json:"content,omitempty"` // IsRead holds the value of the "is_read" field. IsRead *bool `json:"is_read,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MessageQuery when eager-loading is set. Edges MessageEdges `json:"edges"` // contains filtered or unexported fields }
Message is the model entity for the Message schema.
func (*Message) QueryConversation ¶
func (m *Message) QueryConversation() *ConversationQuery
QueryConversation queries the "conversation" edge of the Message entity.
func (*Message) QuerySender ¶
func (m *Message) QuerySender() *PersonQuery
QuerySender queries the "sender" edge of the Message entity.
func (*Message) Unwrap ¶
Unwrap unwraps the Message 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 (*Message) Update ¶
func (m *Message) Update() *MessageUpdateOne
Update returns a builder for updating this Message. Note that you need to call Message.Unwrap() before calling this method if this Message was returned from a transaction, and the transaction was committed or rolled back.
type MessageClient ¶
type MessageClient struct {
// contains filtered or unexported fields
}
MessageClient is a client for the Message schema.
func NewMessageClient ¶
func NewMessageClient(c config) *MessageClient
NewMessageClient returns a client for the Message from the given config.
func (*MessageClient) Create ¶
func (c *MessageClient) Create() *MessageCreate
Create returns a builder for creating a Message entity.
func (*MessageClient) CreateBulk ¶
func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
CreateBulk returns a builder for creating a bulk of Message entities.
func (*MessageClient) Delete ¶
func (c *MessageClient) Delete() *MessageDelete
Delete returns a delete builder for Message.
func (*MessageClient) DeleteOne ¶
func (c *MessageClient) DeleteOne(m *Message) *MessageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MessageClient) DeleteOneID ¶
func (c *MessageClient) DeleteOneID(id uuid.UUID) *MessageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MessageClient) Hooks ¶
func (c *MessageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MessageClient) Intercept ¶
func (c *MessageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `message.Intercept(f(g(h())))`.
func (*MessageClient) Interceptors ¶
func (c *MessageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MessageClient) MapCreateBulk ¶
func (c *MessageClient) MapCreateBulk(slice any, setFunc func(*MessageCreate, int)) *MessageCreateBulk
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 (*MessageClient) Query ¶
func (c *MessageClient) Query() *MessageQuery
Query returns a query builder for Message.
func (*MessageClient) QueryConversation ¶
func (c *MessageClient) QueryConversation(m *Message) *ConversationQuery
QueryConversation queries the conversation edge of a Message.
func (*MessageClient) QuerySender ¶
func (c *MessageClient) QuerySender(m *Message) *PersonQuery
QuerySender queries the sender edge of a Message.
func (*MessageClient) Update ¶
func (c *MessageClient) Update() *MessageUpdate
Update returns an update builder for Message.
func (*MessageClient) UpdateOne ¶
func (c *MessageClient) UpdateOne(m *Message) *MessageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MessageClient) UpdateOneID ¶
func (c *MessageClient) UpdateOneID(id uuid.UUID) *MessageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MessageClient) Use ¶
func (c *MessageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `message.Hooks(f(g(h())))`.
type MessageCreate ¶
type MessageCreate struct {
// contains filtered or unexported fields
}
MessageCreate is the builder for creating a Message entity.
func (*MessageCreate) Exec ¶
func (mc *MessageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreate) ExecX ¶
func (mc *MessageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageCreate) Mutation ¶
func (mc *MessageCreate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageCreate) Save ¶
func (mc *MessageCreate) Save(ctx context.Context) (*Message, error)
Save creates the Message in the database.
func (*MessageCreate) SaveX ¶
func (mc *MessageCreate) SaveX(ctx context.Context) *Message
SaveX calls Save and panics if Save returns an error.
func (*MessageCreate) SetContent ¶
func (mc *MessageCreate) SetContent(s string) *MessageCreate
SetContent sets the "content" field.
func (*MessageCreate) SetConversation ¶
func (mc *MessageCreate) SetConversation(c *Conversation) *MessageCreate
SetConversation sets the "conversation" edge to the Conversation entity.
func (*MessageCreate) SetConversationID ¶
func (mc *MessageCreate) SetConversationID(u uuid.UUID) *MessageCreate
SetConversationID sets the "conversation_id" field.
func (*MessageCreate) SetCreatedAt ¶
func (mc *MessageCreate) SetCreatedAt(t time.Time) *MessageCreate
SetCreatedAt sets the "created_at" field.
func (*MessageCreate) SetID ¶
func (mc *MessageCreate) SetID(u uuid.UUID) *MessageCreate
SetID sets the "id" field.
func (*MessageCreate) SetIsRead ¶
func (mc *MessageCreate) SetIsRead(b bool) *MessageCreate
SetIsRead sets the "is_read" field.
func (*MessageCreate) SetNillableCreatedAt ¶
func (mc *MessageCreate) SetNillableCreatedAt(t *time.Time) *MessageCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MessageCreate) SetNillableID ¶
func (mc *MessageCreate) SetNillableID(u *uuid.UUID) *MessageCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*MessageCreate) SetNillableIsRead ¶
func (mc *MessageCreate) SetNillableIsRead(b *bool) *MessageCreate
SetNillableIsRead sets the "is_read" field if the given value is not nil.
func (*MessageCreate) SetNillableType ¶
func (mc *MessageCreate) SetNillableType(m *message.Type) *MessageCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*MessageCreate) SetNillableUpdatedAt ¶
func (mc *MessageCreate) SetNillableUpdatedAt(t *time.Time) *MessageCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MessageCreate) SetSender ¶
func (mc *MessageCreate) SetSender(p *Person) *MessageCreate
SetSender sets the "sender" edge to the Person entity.
func (*MessageCreate) SetSenderID ¶
func (mc *MessageCreate) SetSenderID(u uuid.UUID) *MessageCreate
SetSenderID sets the "sender_id" field.
func (*MessageCreate) SetType ¶
func (mc *MessageCreate) SetType(m message.Type) *MessageCreate
SetType sets the "type" field.
func (*MessageCreate) SetUpdatedAt ¶
func (mc *MessageCreate) SetUpdatedAt(t time.Time) *MessageCreate
SetUpdatedAt sets the "updated_at" field.
type MessageCreateBulk ¶
type MessageCreateBulk struct {
// contains filtered or unexported fields
}
MessageCreateBulk is the builder for creating many Message entities in bulk.
func (*MessageCreateBulk) Exec ¶
func (mcb *MessageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreateBulk) ExecX ¶
func (mcb *MessageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MessageDelete ¶
type MessageDelete struct {
// contains filtered or unexported fields
}
MessageDelete is the builder for deleting a Message entity.
func (*MessageDelete) Exec ¶
func (md *MessageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MessageDelete) ExecX ¶
func (md *MessageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MessageDelete) Where ¶
func (md *MessageDelete) Where(ps ...predicate.Message) *MessageDelete
Where appends a list predicates to the MessageDelete builder.
type MessageDeleteOne ¶
type MessageDeleteOne struct {
// contains filtered or unexported fields
}
MessageDeleteOne is the builder for deleting a single Message entity.
func (*MessageDeleteOne) Exec ¶
func (mdo *MessageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MessageDeleteOne) ExecX ¶
func (mdo *MessageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageDeleteOne) Where ¶
func (mdo *MessageDeleteOne) Where(ps ...predicate.Message) *MessageDeleteOne
Where appends a list predicates to the MessageDelete builder.
type MessageEdges ¶
type MessageEdges struct { // Conversation holds the value of the conversation edge. Conversation *Conversation `json:"conversation,omitempty"` // Sender holds the value of the sender edge. Sender *Person `json:"sender,omitempty"` // contains filtered or unexported fields }
MessageEdges holds the relations/edges for other nodes in the graph.
func (MessageEdges) ConversationOrErr ¶
func (e MessageEdges) ConversationOrErr() (*Conversation, error)
ConversationOrErr returns the Conversation value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (MessageEdges) SenderOrErr ¶
func (e MessageEdges) SenderOrErr() (*Person, error)
SenderOrErr returns the Sender value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MessageGroupBy ¶
type MessageGroupBy struct {
// contains filtered or unexported fields
}
MessageGroupBy is the group-by builder for Message entities.
func (*MessageGroupBy) Aggregate ¶
func (mgb *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MessageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Scan ¶
func (mgb *MessageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MessageMutation ¶
type MessageMutation struct {
// contains filtered or unexported fields
}
MessageMutation represents an operation that mutates the Message nodes in the graph.
func (*MessageMutation) AddField ¶
func (m *MessageMutation) 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 (*MessageMutation) AddedEdges ¶
func (m *MessageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MessageMutation) AddedField ¶
func (m *MessageMutation) 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 (*MessageMutation) AddedFields ¶
func (m *MessageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MessageMutation) AddedIDs ¶
func (m *MessageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MessageMutation) ClearConversation ¶
func (m *MessageMutation) ClearConversation()
ClearConversation clears the "conversation" edge to the Conversation entity.
func (*MessageMutation) ClearEdge ¶
func (m *MessageMutation) 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 (*MessageMutation) ClearField ¶
func (m *MessageMutation) 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 (*MessageMutation) ClearSender ¶
func (m *MessageMutation) ClearSender()
ClearSender clears the "sender" edge to the Person entity.
func (*MessageMutation) ClearedEdges ¶
func (m *MessageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MessageMutation) ClearedFields ¶
func (m *MessageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MessageMutation) Client ¶
func (m MessageMutation) 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 (*MessageMutation) Content ¶
func (m *MessageMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*MessageMutation) ConversationCleared ¶
func (m *MessageMutation) ConversationCleared() bool
ConversationCleared reports if the "conversation" edge to the Conversation entity was cleared.
func (*MessageMutation) ConversationID ¶
func (m *MessageMutation) ConversationID() (r uuid.UUID, exists bool)
ConversationID returns the value of the "conversation_id" field in the mutation.
func (*MessageMutation) ConversationIDs ¶
func (m *MessageMutation) ConversationIDs() (ids []uuid.UUID)
ConversationIDs returns the "conversation" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ConversationID instead. It exists only for internal usage by the builders.
func (*MessageMutation) CreatedAt ¶
func (m *MessageMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MessageMutation) EdgeCleared ¶
func (m *MessageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MessageMutation) Field ¶
func (m *MessageMutation) 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 (*MessageMutation) FieldCleared ¶
func (m *MessageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MessageMutation) Fields ¶
func (m *MessageMutation) 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 (*MessageMutation) GetType ¶
func (m *MessageMutation) GetType() (r message.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*MessageMutation) ID ¶
func (m *MessageMutation) ID() (id uuid.UUID, 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 (*MessageMutation) IDs ¶
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 (*MessageMutation) IsRead ¶
func (m *MessageMutation) IsRead() (r bool, exists bool)
IsRead returns the value of the "is_read" field in the mutation.
func (*MessageMutation) OldContent ¶
func (m *MessageMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the Message entity. If the Message 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 (*MessageMutation) OldConversationID ¶
OldConversationID returns the old "conversation_id" field's value of the Message entity. If the Message 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 (*MessageMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Message entity. If the Message 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 (*MessageMutation) 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 (*MessageMutation) OldIsRead ¶
func (m *MessageMutation) OldIsRead(ctx context.Context) (v *bool, err error)
OldIsRead returns the old "is_read" field's value of the Message entity. If the Message 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 (*MessageMutation) OldSenderID ¶
OldSenderID returns the old "sender_id" field's value of the Message entity. If the Message 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 (*MessageMutation) OldType ¶
OldType returns the old "type" field's value of the Message entity. If the Message 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 (*MessageMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Message entity. If the Message 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 (*MessageMutation) RemovedEdges ¶
func (m *MessageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MessageMutation) RemovedIDs ¶
func (m *MessageMutation) 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 (*MessageMutation) ResetContent ¶
func (m *MessageMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*MessageMutation) ResetConversation ¶
func (m *MessageMutation) ResetConversation()
ResetConversation resets all changes to the "conversation" edge.
func (*MessageMutation) ResetConversationID ¶
func (m *MessageMutation) ResetConversationID()
ResetConversationID resets all changes to the "conversation_id" field.
func (*MessageMutation) ResetCreatedAt ¶
func (m *MessageMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MessageMutation) ResetEdge ¶
func (m *MessageMutation) 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 (*MessageMutation) ResetField ¶
func (m *MessageMutation) 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 (*MessageMutation) ResetIsRead ¶
func (m *MessageMutation) ResetIsRead()
ResetIsRead resets all changes to the "is_read" field.
func (*MessageMutation) ResetSender ¶
func (m *MessageMutation) ResetSender()
ResetSender resets all changes to the "sender" edge.
func (*MessageMutation) ResetSenderID ¶
func (m *MessageMutation) ResetSenderID()
ResetSenderID resets all changes to the "sender_id" field.
func (*MessageMutation) ResetType ¶
func (m *MessageMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*MessageMutation) ResetUpdatedAt ¶
func (m *MessageMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MessageMutation) SenderCleared ¶
func (m *MessageMutation) SenderCleared() bool
SenderCleared reports if the "sender" edge to the Person entity was cleared.
func (*MessageMutation) SenderID ¶
func (m *MessageMutation) SenderID() (r uuid.UUID, exists bool)
SenderID returns the value of the "sender_id" field in the mutation.
func (*MessageMutation) SenderIDs ¶
func (m *MessageMutation) SenderIDs() (ids []uuid.UUID)
SenderIDs returns the "sender" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SenderID instead. It exists only for internal usage by the builders.
func (*MessageMutation) SetContent ¶
func (m *MessageMutation) SetContent(s string)
SetContent sets the "content" field.
func (*MessageMutation) SetConversationID ¶
func (m *MessageMutation) SetConversationID(u uuid.UUID)
SetConversationID sets the "conversation_id" field.
func (*MessageMutation) SetCreatedAt ¶
func (m *MessageMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MessageMutation) SetField ¶
func (m *MessageMutation) 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 (*MessageMutation) SetID ¶
func (m *MessageMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Message entities.
func (*MessageMutation) SetIsRead ¶
func (m *MessageMutation) SetIsRead(b bool)
SetIsRead sets the "is_read" field.
func (*MessageMutation) SetOp ¶
func (m *MessageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MessageMutation) SetSenderID ¶
func (m *MessageMutation) SetSenderID(u uuid.UUID)
SetSenderID sets the "sender_id" field.
func (*MessageMutation) SetType ¶
func (m *MessageMutation) SetType(value message.Type)
SetType sets the "type" field.
func (*MessageMutation) SetUpdatedAt ¶
func (m *MessageMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (MessageMutation) Tx ¶
func (m MessageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MessageMutation) Type ¶
func (m *MessageMutation) Type() string
Type returns the node type of this mutation (Message).
func (*MessageMutation) UpdatedAt ¶
func (m *MessageMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MessageMutation) Where ¶
func (m *MessageMutation) Where(ps ...predicate.Message)
Where appends a list predicates to the MessageMutation builder.
func (*MessageMutation) WhereP ¶
func (m *MessageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MessageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MessageQuery ¶
type MessageQuery struct {
// contains filtered or unexported fields
}
MessageQuery is the builder for querying Message entities.
func (*MessageQuery) Aggregate ¶
func (mq *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate returns a MessageSelect configured with the given aggregations.
func (*MessageQuery) All ¶
func (mq *MessageQuery) All(ctx context.Context) ([]*Message, error)
All executes the query and returns a list of Messages.
func (*MessageQuery) AllX ¶
func (mq *MessageQuery) AllX(ctx context.Context) []*Message
AllX is like All, but panics if an error occurs.
func (*MessageQuery) Clone ¶
func (mq *MessageQuery) Clone() *MessageQuery
Clone returns a duplicate of the MessageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MessageQuery) Count ¶
func (mq *MessageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MessageQuery) CountX ¶
func (mq *MessageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MessageQuery) Exist ¶
func (mq *MessageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MessageQuery) ExistX ¶
func (mq *MessageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MessageQuery) First ¶
func (mq *MessageQuery) First(ctx context.Context) (*Message, error)
First returns the first Message entity from the query. Returns a *NotFoundError when no Message was found.
func (*MessageQuery) FirstID ¶
FirstID returns the first Message ID from the query. Returns a *NotFoundError when no Message ID was found.
func (*MessageQuery) FirstIDX ¶
func (mq *MessageQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*MessageQuery) FirstX ¶
func (mq *MessageQuery) FirstX(ctx context.Context) *Message
FirstX is like First, but panics if an error occurs.
func (*MessageQuery) GroupBy ¶
func (mq *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
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.Message.Query(). GroupBy(message.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MessageQuery) IDsX ¶
func (mq *MessageQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*MessageQuery) Limit ¶
func (mq *MessageQuery) Limit(limit int) *MessageQuery
Limit the number of records to be returned by this query.
func (*MessageQuery) Offset ¶
func (mq *MessageQuery) Offset(offset int) *MessageQuery
Offset to start from.
func (*MessageQuery) Only ¶
func (mq *MessageQuery) Only(ctx context.Context) (*Message, error)
Only returns a single Message entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Message entity is found. Returns a *NotFoundError when no Message entities are found.
func (*MessageQuery) OnlyID ¶
OnlyID is like Only, but returns the only Message ID in the query. Returns a *NotSingularError when more than one Message ID is found. Returns a *NotFoundError when no entities are found.
func (*MessageQuery) OnlyIDX ¶
func (mq *MessageQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MessageQuery) OnlyX ¶
func (mq *MessageQuery) OnlyX(ctx context.Context) *Message
OnlyX is like Only, but panics if an error occurs.
func (*MessageQuery) Order ¶
func (mq *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
Order specifies how the records should be ordered.
func (*MessageQuery) QueryConversation ¶
func (mq *MessageQuery) QueryConversation() *ConversationQuery
QueryConversation chains the current query on the "conversation" edge.
func (*MessageQuery) QuerySender ¶
func (mq *MessageQuery) QuerySender() *PersonQuery
QuerySender chains the current query on the "sender" edge.
func (*MessageQuery) Select ¶
func (mq *MessageQuery) Select(fields ...string) *MessageSelect
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.Message.Query(). Select(message.FieldCreatedAt). Scan(ctx, &v)
func (*MessageQuery) Unique ¶
func (mq *MessageQuery) Unique(unique bool) *MessageQuery
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 (*MessageQuery) Where ¶
func (mq *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
Where adds a new predicate for the MessageQuery builder.
func (*MessageQuery) WithConversation ¶
func (mq *MessageQuery) WithConversation(opts ...func(*ConversationQuery)) *MessageQuery
WithConversation tells the query-builder to eager-load the nodes that are connected to the "conversation" edge. The optional arguments are used to configure the query builder of the edge.
func (*MessageQuery) WithSender ¶
func (mq *MessageQuery) WithSender(opts ...func(*PersonQuery)) *MessageQuery
WithSender tells the query-builder to eager-load the nodes that are connected to the "sender" edge. The optional arguments are used to configure the query builder of the edge.
type MessageSelect ¶
type MessageSelect struct { *MessageQuery // contains filtered or unexported fields }
MessageSelect is the builder for selecting fields of Message entities.
func (*MessageSelect) Aggregate ¶
func (ms *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MessageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Scan ¶
func (ms *MessageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MessageUpdate ¶
type MessageUpdate struct {
// contains filtered or unexported fields
}
MessageUpdate is the builder for updating Message entities.
func (*MessageUpdate) Exec ¶
func (mu *MessageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageUpdate) ExecX ¶
func (mu *MessageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdate) Mutation ¶
func (mu *MessageUpdate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdate) Save ¶
func (mu *MessageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MessageUpdate) SaveX ¶
func (mu *MessageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdate) SetContent ¶
func (mu *MessageUpdate) SetContent(s string) *MessageUpdate
SetContent sets the "content" field.
func (*MessageUpdate) SetIsRead ¶
func (mu *MessageUpdate) SetIsRead(b bool) *MessageUpdate
SetIsRead sets the "is_read" field.
func (*MessageUpdate) SetNillableContent ¶
func (mu *MessageUpdate) SetNillableContent(s *string) *MessageUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*MessageUpdate) SetNillableIsRead ¶
func (mu *MessageUpdate) SetNillableIsRead(b *bool) *MessageUpdate
SetNillableIsRead sets the "is_read" field if the given value is not nil.
func (*MessageUpdate) SetUpdatedAt ¶
func (mu *MessageUpdate) SetUpdatedAt(t time.Time) *MessageUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MessageUpdate) Where ¶
func (mu *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
Where appends a list predicates to the MessageUpdate builder.
type MessageUpdateOne ¶
type MessageUpdateOne struct {
// contains filtered or unexported fields
}
MessageUpdateOne is the builder for updating a single Message entity.
func (*MessageUpdateOne) Exec ¶
func (muo *MessageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MessageUpdateOne) ExecX ¶
func (muo *MessageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdateOne) Mutation ¶
func (muo *MessageUpdateOne) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdateOne) Save ¶
func (muo *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
Save executes the query and returns the updated Message entity.
func (*MessageUpdateOne) SaveX ¶
func (muo *MessageUpdateOne) SaveX(ctx context.Context) *Message
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdateOne) Select ¶
func (muo *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MessageUpdateOne) SetContent ¶
func (muo *MessageUpdateOne) SetContent(s string) *MessageUpdateOne
SetContent sets the "content" field.
func (*MessageUpdateOne) SetIsRead ¶
func (muo *MessageUpdateOne) SetIsRead(b bool) *MessageUpdateOne
SetIsRead sets the "is_read" field.
func (*MessageUpdateOne) SetNillableContent ¶
func (muo *MessageUpdateOne) SetNillableContent(s *string) *MessageUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableIsRead ¶
func (muo *MessageUpdateOne) SetNillableIsRead(b *bool) *MessageUpdateOne
SetNillableIsRead sets the "is_read" field if the given value is not nil.
func (*MessageUpdateOne) SetUpdatedAt ¶
func (muo *MessageUpdateOne) SetUpdatedAt(t time.Time) *MessageUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MessageUpdateOne) Where ¶
func (muo *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
Where appends a list predicates to the MessageUpdate builder.
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 Order ¶
type Order struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // CustomerID holds the value of the "customer_id" field. CustomerID uuid.UUID `json:"customer_id,omitempty"` // Note holds the value of the "note" field. Note *string `json:"note,omitempty"` // CreatedBy holds the value of the "created_by" field. CreatedBy uuid.UUID `json:"created_by,omitempty"` // ParentOrderID holds the value of the "parent_order_id" field. ParentOrderID *uuid.UUID `json:"parent_order_id,omitempty"` // Priority holds the value of the "priority" field. Priority *int `json:"priority,omitempty"` // Type holds the value of the "type" field. Type *order.Type `json:"type,omitempty"` // StatusCode holds the value of the "status_code" field. StatusCode int `json:"status_code,omitempty"` // StaffID holds the value of the "staff_id" field. StaffID *uuid.UUID `json:"staff_id,omitempty"` // InternalNote holds the value of the "internal_note" field. InternalNote *string `json:"internal_note,omitempty"` // IsInternal holds the value of the "is_internal" field. IsInternal *bool `json:"is_internal,omitempty"` // AddressID holds the value of the "address_id" field. AddressID uuid.UUID `json:"address_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the OrderQuery when eager-loading is set. Edges OrderEdges `json:"edges"` // contains filtered or unexported fields }
Order is the model entity for the Order schema.
func (*Order) QueryCreator ¶
func (o *Order) QueryCreator() *PersonQuery
QueryCreator queries the "creator" edge of the Order entity.
func (*Order) QueryCustomer ¶
func (o *Order) QueryCustomer() *PersonQuery
QueryCustomer queries the "customer" edge of the Order entity.
func (*Order) QueryOrderAddress ¶
func (o *Order) QueryOrderAddress() *AddressQuery
QueryOrderAddress queries the "order_address" edge of the Order entity.
func (*Order) QueryOrderStatus ¶
func (o *Order) QueryOrderStatus() *OrderStatusCodeQuery
QueryOrderStatus queries the "order_status" edge of the Order entity.
func (*Order) QueryParentOrder ¶
func (o *Order) QueryParentOrder() *OrderQuery
QueryParentOrder queries the "parent_order" edge of the Order entity.
func (*Order) QueryStaff ¶
func (o *Order) QueryStaff() *PersonQuery
QueryStaff queries the "staff" edge of the Order entity.
func (*Order) Unwrap ¶
Unwrap unwraps the Order 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 (*Order) Update ¶
func (o *Order) Update() *OrderUpdateOne
Update returns a builder for updating this Order. Note that you need to call Order.Unwrap() before calling this method if this Order was returned from a transaction, and the transaction was committed or rolled back.
type OrderClient ¶
type OrderClient struct {
// contains filtered or unexported fields
}
OrderClient is a client for the Order schema.
func NewOrderClient ¶
func NewOrderClient(c config) *OrderClient
NewOrderClient returns a client for the Order from the given config.
func (*OrderClient) Create ¶
func (c *OrderClient) Create() *OrderCreate
Create returns a builder for creating a Order entity.
func (*OrderClient) CreateBulk ¶
func (c *OrderClient) CreateBulk(builders ...*OrderCreate) *OrderCreateBulk
CreateBulk returns a builder for creating a bulk of Order entities.
func (*OrderClient) Delete ¶
func (c *OrderClient) Delete() *OrderDelete
Delete returns a delete builder for Order.
func (*OrderClient) DeleteOne ¶
func (c *OrderClient) DeleteOne(o *Order) *OrderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OrderClient) DeleteOneID ¶
func (c *OrderClient) DeleteOneID(id uuid.UUID) *OrderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OrderClient) Intercept ¶
func (c *OrderClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `order.Intercept(f(g(h())))`.
func (*OrderClient) Interceptors ¶
func (c *OrderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OrderClient) MapCreateBulk ¶
func (c *OrderClient) MapCreateBulk(slice any, setFunc func(*OrderCreate, int)) *OrderCreateBulk
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 (*OrderClient) Query ¶
func (c *OrderClient) Query() *OrderQuery
Query returns a query builder for Order.
func (*OrderClient) QueryCreator ¶
func (c *OrderClient) QueryCreator(o *Order) *PersonQuery
QueryCreator queries the creator edge of a Order.
func (*OrderClient) QueryCustomer ¶
func (c *OrderClient) QueryCustomer(o *Order) *PersonQuery
QueryCustomer queries the customer edge of a Order.
func (*OrderClient) QueryOrderAddress ¶
func (c *OrderClient) QueryOrderAddress(o *Order) *AddressQuery
QueryOrderAddress queries the order_address edge of a Order.
func (*OrderClient) QueryOrderStatus ¶
func (c *OrderClient) QueryOrderStatus(o *Order) *OrderStatusCodeQuery
QueryOrderStatus queries the order_status edge of a Order.
func (*OrderClient) QueryParentOrder ¶
func (c *OrderClient) QueryParentOrder(o *Order) *OrderQuery
QueryParentOrder queries the parent_order edge of a Order.
func (*OrderClient) QueryStaff ¶
func (c *OrderClient) QueryStaff(o *Order) *PersonQuery
QueryStaff queries the staff edge of a Order.
func (*OrderClient) Update ¶
func (c *OrderClient) Update() *OrderUpdate
Update returns an update builder for Order.
func (*OrderClient) UpdateOne ¶
func (c *OrderClient) UpdateOne(o *Order) *OrderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OrderClient) UpdateOneID ¶
func (c *OrderClient) UpdateOneID(id uuid.UUID) *OrderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OrderClient) Use ¶
func (c *OrderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `order.Hooks(f(g(h())))`.
type OrderCreate ¶
type OrderCreate struct {
// contains filtered or unexported fields
}
OrderCreate is the builder for creating a Order entity.
func (*OrderCreate) Exec ¶
func (oc *OrderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderCreate) ExecX ¶
func (oc *OrderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderCreate) Mutation ¶
func (oc *OrderCreate) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderCreate) Save ¶
func (oc *OrderCreate) Save(ctx context.Context) (*Order, error)
Save creates the Order in the database.
func (*OrderCreate) SaveX ¶
func (oc *OrderCreate) SaveX(ctx context.Context) *Order
SaveX calls Save and panics if Save returns an error.
func (*OrderCreate) SetAddressID ¶
func (oc *OrderCreate) SetAddressID(u uuid.UUID) *OrderCreate
SetAddressID sets the "address_id" field.
func (*OrderCreate) SetCreatedAt ¶
func (oc *OrderCreate) SetCreatedAt(t time.Time) *OrderCreate
SetCreatedAt sets the "created_at" field.
func (*OrderCreate) SetCreatedBy ¶
func (oc *OrderCreate) SetCreatedBy(u uuid.UUID) *OrderCreate
SetCreatedBy sets the "created_by" field.
func (*OrderCreate) SetCreator ¶
func (oc *OrderCreate) SetCreator(p *Person) *OrderCreate
SetCreator sets the "creator" edge to the Person entity.
func (*OrderCreate) SetCreatorID ¶
func (oc *OrderCreate) SetCreatorID(id uuid.UUID) *OrderCreate
SetCreatorID sets the "creator" edge to the Person entity by ID.
func (*OrderCreate) SetCustomer ¶
func (oc *OrderCreate) SetCustomer(p *Person) *OrderCreate
SetCustomer sets the "customer" edge to the Person entity.
func (*OrderCreate) SetCustomerID ¶
func (oc *OrderCreate) SetCustomerID(u uuid.UUID) *OrderCreate
SetCustomerID sets the "customer_id" field.
func (*OrderCreate) SetID ¶
func (oc *OrderCreate) SetID(u uuid.UUID) *OrderCreate
SetID sets the "id" field.
func (*OrderCreate) SetInternalNote ¶
func (oc *OrderCreate) SetInternalNote(s string) *OrderCreate
SetInternalNote sets the "internal_note" field.
func (*OrderCreate) SetIsInternal ¶
func (oc *OrderCreate) SetIsInternal(b bool) *OrderCreate
SetIsInternal sets the "is_internal" field.
func (*OrderCreate) SetNillableCreatedAt ¶
func (oc *OrderCreate) SetNillableCreatedAt(t *time.Time) *OrderCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderCreate) SetNillableID ¶
func (oc *OrderCreate) SetNillableID(u *uuid.UUID) *OrderCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*OrderCreate) SetNillableInternalNote ¶
func (oc *OrderCreate) SetNillableInternalNote(s *string) *OrderCreate
SetNillableInternalNote sets the "internal_note" field if the given value is not nil.
func (*OrderCreate) SetNillableIsInternal ¶
func (oc *OrderCreate) SetNillableIsInternal(b *bool) *OrderCreate
SetNillableIsInternal sets the "is_internal" field if the given value is not nil.
func (*OrderCreate) SetNillableNote ¶
func (oc *OrderCreate) SetNillableNote(s *string) *OrderCreate
SetNillableNote sets the "note" field if the given value is not nil.
func (*OrderCreate) SetNillableParentOrderID ¶
func (oc *OrderCreate) SetNillableParentOrderID(u *uuid.UUID) *OrderCreate
SetNillableParentOrderID sets the "parent_order_id" field if the given value is not nil.
func (*OrderCreate) SetNillablePriority ¶
func (oc *OrderCreate) SetNillablePriority(i *int) *OrderCreate
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*OrderCreate) SetNillableStaffID ¶
func (oc *OrderCreate) SetNillableStaffID(u *uuid.UUID) *OrderCreate
SetNillableStaffID sets the "staff_id" field if the given value is not nil.
func (*OrderCreate) SetNillableStatusCode ¶
func (oc *OrderCreate) SetNillableStatusCode(i *int) *OrderCreate
SetNillableStatusCode sets the "status_code" field if the given value is not nil.
func (*OrderCreate) SetNillableType ¶
func (oc *OrderCreate) SetNillableType(o *order.Type) *OrderCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*OrderCreate) SetNillableUpdatedAt ¶
func (oc *OrderCreate) SetNillableUpdatedAt(t *time.Time) *OrderCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderCreate) SetNote ¶
func (oc *OrderCreate) SetNote(s string) *OrderCreate
SetNote sets the "note" field.
func (*OrderCreate) SetOrderAddress ¶
func (oc *OrderCreate) SetOrderAddress(a *Address) *OrderCreate
SetOrderAddress sets the "order_address" edge to the Address entity.
func (*OrderCreate) SetOrderAddressID ¶
func (oc *OrderCreate) SetOrderAddressID(id uuid.UUID) *OrderCreate
SetOrderAddressID sets the "order_address" edge to the Address entity by ID.
func (*OrderCreate) SetOrderStatus ¶
func (oc *OrderCreate) SetOrderStatus(o *OrderStatusCode) *OrderCreate
SetOrderStatus sets the "order_status" edge to the OrderStatusCode entity.
func (*OrderCreate) SetOrderStatusID ¶
func (oc *OrderCreate) SetOrderStatusID(id int) *OrderCreate
SetOrderStatusID sets the "order_status" edge to the OrderStatusCode entity by ID.
func (*OrderCreate) SetParentOrder ¶
func (oc *OrderCreate) SetParentOrder(o *Order) *OrderCreate
SetParentOrder sets the "parent_order" edge to the Order entity.
func (*OrderCreate) SetParentOrderID ¶
func (oc *OrderCreate) SetParentOrderID(u uuid.UUID) *OrderCreate
SetParentOrderID sets the "parent_order_id" field.
func (*OrderCreate) SetPriority ¶
func (oc *OrderCreate) SetPriority(i int) *OrderCreate
SetPriority sets the "priority" field.
func (*OrderCreate) SetStaff ¶
func (oc *OrderCreate) SetStaff(p *Person) *OrderCreate
SetStaff sets the "staff" edge to the Person entity.
func (*OrderCreate) SetStaffID ¶
func (oc *OrderCreate) SetStaffID(u uuid.UUID) *OrderCreate
SetStaffID sets the "staff_id" field.
func (*OrderCreate) SetStatusCode ¶
func (oc *OrderCreate) SetStatusCode(i int) *OrderCreate
SetStatusCode sets the "status_code" field.
func (*OrderCreate) SetType ¶
func (oc *OrderCreate) SetType(o order.Type) *OrderCreate
SetType sets the "type" field.
func (*OrderCreate) SetUpdatedAt ¶
func (oc *OrderCreate) SetUpdatedAt(t time.Time) *OrderCreate
SetUpdatedAt sets the "updated_at" field.
type OrderCreateBulk ¶
type OrderCreateBulk struct {
// contains filtered or unexported fields
}
OrderCreateBulk is the builder for creating many Order entities in bulk.
func (*OrderCreateBulk) Exec ¶
func (ocb *OrderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderCreateBulk) ExecX ¶
func (ocb *OrderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type OrderDelete ¶
type OrderDelete struct {
// contains filtered or unexported fields
}
OrderDelete is the builder for deleting a Order entity.
func (*OrderDelete) Exec ¶
func (od *OrderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OrderDelete) ExecX ¶
func (od *OrderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OrderDelete) Where ¶
func (od *OrderDelete) Where(ps ...predicate.Order) *OrderDelete
Where appends a list predicates to the OrderDelete builder.
type OrderDeleteOne ¶
type OrderDeleteOne struct {
// contains filtered or unexported fields
}
OrderDeleteOne is the builder for deleting a single Order entity.
func (*OrderDeleteOne) Exec ¶
func (odo *OrderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OrderDeleteOne) ExecX ¶
func (odo *OrderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderDeleteOne) Where ¶
func (odo *OrderDeleteOne) Where(ps ...predicate.Order) *OrderDeleteOne
Where appends a list predicates to the OrderDelete builder.
type OrderEdges ¶
type OrderEdges struct { // Customer holds the value of the customer edge. Customer *Person `json:"customer,omitempty"` // Creator holds the value of the creator edge. Creator *Person `json:"creator,omitempty"` // ParentOrder holds the value of the parent_order edge. ParentOrder *Order `json:"parent_order,omitempty"` // OrderStatus holds the value of the order_status edge. OrderStatus *OrderStatusCode `json:"order_status,omitempty"` // Staff holds the value of the staff edge. Staff *Person `json:"staff,omitempty"` // OrderAddress holds the value of the order_address edge. OrderAddress *Address `json:"order_address,omitempty"` // contains filtered or unexported fields }
OrderEdges holds the relations/edges for other nodes in the graph.
func (OrderEdges) CreatorOrErr ¶
func (e OrderEdges) CreatorOrErr() (*Person, error)
CreatorOrErr returns the Creator value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderEdges) CustomerOrErr ¶
func (e OrderEdges) CustomerOrErr() (*Person, error)
CustomerOrErr returns the Customer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderEdges) OrderAddressOrErr ¶
func (e OrderEdges) OrderAddressOrErr() (*Address, error)
OrderAddressOrErr returns the OrderAddress value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderEdges) OrderStatusOrErr ¶
func (e OrderEdges) OrderStatusOrErr() (*OrderStatusCode, error)
OrderStatusOrErr returns the OrderStatus value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderEdges) ParentOrderOrErr ¶
func (e OrderEdges) ParentOrderOrErr() (*Order, error)
ParentOrderOrErr returns the ParentOrder value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderEdges) StaffOrErr ¶
func (e OrderEdges) StaffOrErr() (*Person, error)
StaffOrErr returns the Staff value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type OrderGroupBy ¶
type OrderGroupBy struct {
// contains filtered or unexported fields
}
OrderGroupBy is the group-by builder for Order entities.
func (*OrderGroupBy) Aggregate ¶
func (ogb *OrderGroupBy) Aggregate(fns ...AggregateFunc) *OrderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OrderGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Scan ¶
func (ogb *OrderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderHistories ¶
type OrderHistories []*OrderHistory
OrderHistories is a parsable slice of OrderHistory.
type OrderHistory ¶
type OrderHistory struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // OrderID holds the value of the "order_id" field. OrderID uuid.UUID `json:"order_id,omitempty"` // PersonID holds the value of the "person_id" field. PersonID uuid.UUID `json:"person_id,omitempty"` // OldStatusCode holds the value of the "old_status_code" field. OldStatusCode *int `json:"old_status_code,omitempty"` // NewStatusCode holds the value of the "new_status_code" field. NewStatusCode *int `json:"new_status_code,omitempty"` // Description holds the value of the "description" field. Description *string `json:"description,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the OrderHistoryQuery when eager-loading is set. Edges OrderHistoryEdges `json:"edges"` // contains filtered or unexported fields }
OrderHistory is the model entity for the OrderHistory schema.
func (*OrderHistory) QueryNewStatus ¶
func (oh *OrderHistory) QueryNewStatus() *OrderStatusCodeQuery
QueryNewStatus queries the "new_status" edge of the OrderHistory entity.
func (*OrderHistory) QueryOldStatus ¶
func (oh *OrderHistory) QueryOldStatus() *OrderStatusCodeQuery
QueryOldStatus queries the "old_status" edge of the OrderHistory entity.
func (*OrderHistory) QueryOrder ¶
func (oh *OrderHistory) QueryOrder() *OrderQuery
QueryOrder queries the "order" edge of the OrderHistory entity.
func (*OrderHistory) QueryPerson ¶
func (oh *OrderHistory) QueryPerson() *PersonQuery
QueryPerson queries the "person" edge of the OrderHistory entity.
func (*OrderHistory) String ¶
func (oh *OrderHistory) String() string
String implements the fmt.Stringer.
func (*OrderHistory) Unwrap ¶
func (oh *OrderHistory) Unwrap() *OrderHistory
Unwrap unwraps the OrderHistory 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 (*OrderHistory) Update ¶
func (oh *OrderHistory) Update() *OrderHistoryUpdateOne
Update returns a builder for updating this OrderHistory. Note that you need to call OrderHistory.Unwrap() before calling this method if this OrderHistory was returned from a transaction, and the transaction was committed or rolled back.
type OrderHistoryClient ¶
type OrderHistoryClient struct {
// contains filtered or unexported fields
}
OrderHistoryClient is a client for the OrderHistory schema.
func NewOrderHistoryClient ¶
func NewOrderHistoryClient(c config) *OrderHistoryClient
NewOrderHistoryClient returns a client for the OrderHistory from the given config.
func (*OrderHistoryClient) Create ¶
func (c *OrderHistoryClient) Create() *OrderHistoryCreate
Create returns a builder for creating a OrderHistory entity.
func (*OrderHistoryClient) CreateBulk ¶
func (c *OrderHistoryClient) CreateBulk(builders ...*OrderHistoryCreate) *OrderHistoryCreateBulk
CreateBulk returns a builder for creating a bulk of OrderHistory entities.
func (*OrderHistoryClient) Delete ¶
func (c *OrderHistoryClient) Delete() *OrderHistoryDelete
Delete returns a delete builder for OrderHistory.
func (*OrderHistoryClient) DeleteOne ¶
func (c *OrderHistoryClient) DeleteOne(oh *OrderHistory) *OrderHistoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OrderHistoryClient) DeleteOneID ¶
func (c *OrderHistoryClient) DeleteOneID(id uuid.UUID) *OrderHistoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OrderHistoryClient) Get ¶
func (c *OrderHistoryClient) Get(ctx context.Context, id uuid.UUID) (*OrderHistory, error)
Get returns a OrderHistory entity by its id.
func (*OrderHistoryClient) GetX ¶
func (c *OrderHistoryClient) GetX(ctx context.Context, id uuid.UUID) *OrderHistory
GetX is like Get, but panics if an error occurs.
func (*OrderHistoryClient) Hooks ¶
func (c *OrderHistoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OrderHistoryClient) Intercept ¶
func (c *OrderHistoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orderhistory.Intercept(f(g(h())))`.
func (*OrderHistoryClient) Interceptors ¶
func (c *OrderHistoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OrderHistoryClient) MapCreateBulk ¶
func (c *OrderHistoryClient) MapCreateBulk(slice any, setFunc func(*OrderHistoryCreate, int)) *OrderHistoryCreateBulk
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 (*OrderHistoryClient) Query ¶
func (c *OrderHistoryClient) Query() *OrderHistoryQuery
Query returns a query builder for OrderHistory.
func (*OrderHistoryClient) QueryNewStatus ¶
func (c *OrderHistoryClient) QueryNewStatus(oh *OrderHistory) *OrderStatusCodeQuery
QueryNewStatus queries the new_status edge of a OrderHistory.
func (*OrderHistoryClient) QueryOldStatus ¶
func (c *OrderHistoryClient) QueryOldStatus(oh *OrderHistory) *OrderStatusCodeQuery
QueryOldStatus queries the old_status edge of a OrderHistory.
func (*OrderHistoryClient) QueryOrder ¶
func (c *OrderHistoryClient) QueryOrder(oh *OrderHistory) *OrderQuery
QueryOrder queries the order edge of a OrderHistory.
func (*OrderHistoryClient) QueryPerson ¶
func (c *OrderHistoryClient) QueryPerson(oh *OrderHistory) *PersonQuery
QueryPerson queries the person edge of a OrderHistory.
func (*OrderHistoryClient) Update ¶
func (c *OrderHistoryClient) Update() *OrderHistoryUpdate
Update returns an update builder for OrderHistory.
func (*OrderHistoryClient) UpdateOne ¶
func (c *OrderHistoryClient) UpdateOne(oh *OrderHistory) *OrderHistoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OrderHistoryClient) UpdateOneID ¶
func (c *OrderHistoryClient) UpdateOneID(id uuid.UUID) *OrderHistoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OrderHistoryClient) Use ¶
func (c *OrderHistoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orderhistory.Hooks(f(g(h())))`.
type OrderHistoryCreate ¶
type OrderHistoryCreate struct {
// contains filtered or unexported fields
}
OrderHistoryCreate is the builder for creating a OrderHistory entity.
func (*OrderHistoryCreate) Exec ¶
func (ohc *OrderHistoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderHistoryCreate) ExecX ¶
func (ohc *OrderHistoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderHistoryCreate) Mutation ¶
func (ohc *OrderHistoryCreate) Mutation() *OrderHistoryMutation
Mutation returns the OrderHistoryMutation object of the builder.
func (*OrderHistoryCreate) Save ¶
func (ohc *OrderHistoryCreate) Save(ctx context.Context) (*OrderHistory, error)
Save creates the OrderHistory in the database.
func (*OrderHistoryCreate) SaveX ¶
func (ohc *OrderHistoryCreate) SaveX(ctx context.Context) *OrderHistory
SaveX calls Save and panics if Save returns an error.
func (*OrderHistoryCreate) SetCreatedAt ¶
func (ohc *OrderHistoryCreate) SetCreatedAt(t time.Time) *OrderHistoryCreate
SetCreatedAt sets the "created_at" field.
func (*OrderHistoryCreate) SetDescription ¶
func (ohc *OrderHistoryCreate) SetDescription(s string) *OrderHistoryCreate
SetDescription sets the "description" field.
func (*OrderHistoryCreate) SetID ¶
func (ohc *OrderHistoryCreate) SetID(u uuid.UUID) *OrderHistoryCreate
SetID sets the "id" field.
func (*OrderHistoryCreate) SetNewStatus ¶
func (ohc *OrderHistoryCreate) SetNewStatus(o *OrderStatusCode) *OrderHistoryCreate
SetNewStatus sets the "new_status" edge to the OrderStatusCode entity.
func (*OrderHistoryCreate) SetNewStatusCode ¶
func (ohc *OrderHistoryCreate) SetNewStatusCode(i int) *OrderHistoryCreate
SetNewStatusCode sets the "new_status_code" field.
func (*OrderHistoryCreate) SetNewStatusID ¶
func (ohc *OrderHistoryCreate) SetNewStatusID(id int) *OrderHistoryCreate
SetNewStatusID sets the "new_status" edge to the OrderStatusCode entity by ID.
func (*OrderHistoryCreate) SetNillableCreatedAt ¶
func (ohc *OrderHistoryCreate) SetNillableCreatedAt(t *time.Time) *OrderHistoryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderHistoryCreate) SetNillableDescription ¶
func (ohc *OrderHistoryCreate) SetNillableDescription(s *string) *OrderHistoryCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*OrderHistoryCreate) SetNillableID ¶
func (ohc *OrderHistoryCreate) SetNillableID(u *uuid.UUID) *OrderHistoryCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*OrderHistoryCreate) SetNillableNewStatusCode ¶
func (ohc *OrderHistoryCreate) SetNillableNewStatusCode(i *int) *OrderHistoryCreate
SetNillableNewStatusCode sets the "new_status_code" field if the given value is not nil.
func (*OrderHistoryCreate) SetNillableNewStatusID ¶
func (ohc *OrderHistoryCreate) SetNillableNewStatusID(id *int) *OrderHistoryCreate
SetNillableNewStatusID sets the "new_status" edge to the OrderStatusCode entity by ID if the given value is not nil.
func (*OrderHistoryCreate) SetNillableOldStatusCode ¶
func (ohc *OrderHistoryCreate) SetNillableOldStatusCode(i *int) *OrderHistoryCreate
SetNillableOldStatusCode sets the "old_status_code" field if the given value is not nil.
func (*OrderHistoryCreate) SetNillableOldStatusID ¶
func (ohc *OrderHistoryCreate) SetNillableOldStatusID(id *int) *OrderHistoryCreate
SetNillableOldStatusID sets the "old_status" edge to the OrderStatusCode entity by ID if the given value is not nil.
func (*OrderHistoryCreate) SetOldStatus ¶
func (ohc *OrderHistoryCreate) SetOldStatus(o *OrderStatusCode) *OrderHistoryCreate
SetOldStatus sets the "old_status" edge to the OrderStatusCode entity.
func (*OrderHistoryCreate) SetOldStatusCode ¶
func (ohc *OrderHistoryCreate) SetOldStatusCode(i int) *OrderHistoryCreate
SetOldStatusCode sets the "old_status_code" field.
func (*OrderHistoryCreate) SetOldStatusID ¶
func (ohc *OrderHistoryCreate) SetOldStatusID(id int) *OrderHistoryCreate
SetOldStatusID sets the "old_status" edge to the OrderStatusCode entity by ID.
func (*OrderHistoryCreate) SetOrder ¶
func (ohc *OrderHistoryCreate) SetOrder(o *Order) *OrderHistoryCreate
SetOrder sets the "order" edge to the Order entity.
func (*OrderHistoryCreate) SetOrderID ¶
func (ohc *OrderHistoryCreate) SetOrderID(u uuid.UUID) *OrderHistoryCreate
SetOrderID sets the "order_id" field.
func (*OrderHistoryCreate) SetPerson ¶
func (ohc *OrderHistoryCreate) SetPerson(p *Person) *OrderHistoryCreate
SetPerson sets the "person" edge to the Person entity.
func (*OrderHistoryCreate) SetPersonID ¶
func (ohc *OrderHistoryCreate) SetPersonID(u uuid.UUID) *OrderHistoryCreate
SetPersonID sets the "person_id" field.
type OrderHistoryCreateBulk ¶
type OrderHistoryCreateBulk struct {
// contains filtered or unexported fields
}
OrderHistoryCreateBulk is the builder for creating many OrderHistory entities in bulk.
func (*OrderHistoryCreateBulk) Exec ¶
func (ohcb *OrderHistoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderHistoryCreateBulk) ExecX ¶
func (ohcb *OrderHistoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderHistoryCreateBulk) Save ¶
func (ohcb *OrderHistoryCreateBulk) Save(ctx context.Context) ([]*OrderHistory, error)
Save creates the OrderHistory entities in the database.
func (*OrderHistoryCreateBulk) SaveX ¶
func (ohcb *OrderHistoryCreateBulk) SaveX(ctx context.Context) []*OrderHistory
SaveX is like Save, but panics if an error occurs.
type OrderHistoryDelete ¶
type OrderHistoryDelete struct {
// contains filtered or unexported fields
}
OrderHistoryDelete is the builder for deleting a OrderHistory entity.
func (*OrderHistoryDelete) Exec ¶
func (ohd *OrderHistoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OrderHistoryDelete) ExecX ¶
func (ohd *OrderHistoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OrderHistoryDelete) Where ¶
func (ohd *OrderHistoryDelete) Where(ps ...predicate.OrderHistory) *OrderHistoryDelete
Where appends a list predicates to the OrderHistoryDelete builder.
type OrderHistoryDeleteOne ¶
type OrderHistoryDeleteOne struct {
// contains filtered or unexported fields
}
OrderHistoryDeleteOne is the builder for deleting a single OrderHistory entity.
func (*OrderHistoryDeleteOne) Exec ¶
func (ohdo *OrderHistoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OrderHistoryDeleteOne) ExecX ¶
func (ohdo *OrderHistoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderHistoryDeleteOne) Where ¶
func (ohdo *OrderHistoryDeleteOne) Where(ps ...predicate.OrderHistory) *OrderHistoryDeleteOne
Where appends a list predicates to the OrderHistoryDelete builder.
type OrderHistoryEdges ¶
type OrderHistoryEdges struct { // Order holds the value of the order edge. Order *Order `json:"order,omitempty"` // Person holds the value of the person edge. Person *Person `json:"person,omitempty"` // OldStatus holds the value of the old_status edge. OldStatus *OrderStatusCode `json:"old_status,omitempty"` // NewStatus holds the value of the new_status edge. NewStatus *OrderStatusCode `json:"new_status,omitempty"` // contains filtered or unexported fields }
OrderHistoryEdges holds the relations/edges for other nodes in the graph.
func (OrderHistoryEdges) NewStatusOrErr ¶
func (e OrderHistoryEdges) NewStatusOrErr() (*OrderStatusCode, error)
NewStatusOrErr returns the NewStatus value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderHistoryEdges) OldStatusOrErr ¶
func (e OrderHistoryEdges) OldStatusOrErr() (*OrderStatusCode, error)
OldStatusOrErr returns the OldStatus value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderHistoryEdges) OrderOrErr ¶
func (e OrderHistoryEdges) OrderOrErr() (*Order, error)
OrderOrErr returns the Order value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderHistoryEdges) PersonOrErr ¶
func (e OrderHistoryEdges) PersonOrErr() (*Person, error)
PersonOrErr returns the Person value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type OrderHistoryGroupBy ¶
type OrderHistoryGroupBy struct {
// contains filtered or unexported fields
}
OrderHistoryGroupBy is the group-by builder for OrderHistory entities.
func (*OrderHistoryGroupBy) Aggregate ¶
func (ohgb *OrderHistoryGroupBy) Aggregate(fns ...AggregateFunc) *OrderHistoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OrderHistoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderHistoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderHistoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderHistoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderHistoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderHistoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderHistoryGroupBy) Scan ¶
func (ohgb *OrderHistoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderHistoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderHistoryMutation ¶
type OrderHistoryMutation struct {
// contains filtered or unexported fields
}
OrderHistoryMutation represents an operation that mutates the OrderHistory nodes in the graph.
func (*OrderHistoryMutation) AddField ¶
func (m *OrderHistoryMutation) 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 (*OrderHistoryMutation) AddedEdges ¶
func (m *OrderHistoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrderHistoryMutation) AddedField ¶
func (m *OrderHistoryMutation) 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 (*OrderHistoryMutation) AddedFields ¶
func (m *OrderHistoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrderHistoryMutation) AddedIDs ¶
func (m *OrderHistoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OrderHistoryMutation) ClearDescription ¶
func (m *OrderHistoryMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*OrderHistoryMutation) ClearEdge ¶
func (m *OrderHistoryMutation) 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 (*OrderHistoryMutation) ClearField ¶
func (m *OrderHistoryMutation) 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 (*OrderHistoryMutation) ClearNewStatus ¶
func (m *OrderHistoryMutation) ClearNewStatus()
ClearNewStatus clears the "new_status" edge to the OrderStatusCode entity.
func (*OrderHistoryMutation) ClearNewStatusCode ¶
func (m *OrderHistoryMutation) ClearNewStatusCode()
ClearNewStatusCode clears the value of the "new_status_code" field.
func (*OrderHistoryMutation) ClearOldStatus ¶
func (m *OrderHistoryMutation) ClearOldStatus()
ClearOldStatus clears the "old_status" edge to the OrderStatusCode entity.
func (*OrderHistoryMutation) ClearOldStatusCode ¶
func (m *OrderHistoryMutation) ClearOldStatusCode()
ClearOldStatusCode clears the value of the "old_status_code" field.
func (*OrderHistoryMutation) ClearOrder ¶
func (m *OrderHistoryMutation) ClearOrder()
ClearOrder clears the "order" edge to the Order entity.
func (*OrderHistoryMutation) ClearPerson ¶
func (m *OrderHistoryMutation) ClearPerson()
ClearPerson clears the "person" edge to the Person entity.
func (*OrderHistoryMutation) ClearedEdges ¶
func (m *OrderHistoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrderHistoryMutation) ClearedFields ¶
func (m *OrderHistoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrderHistoryMutation) Client ¶
func (m OrderHistoryMutation) 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 (*OrderHistoryMutation) CreatedAt ¶
func (m *OrderHistoryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OrderHistoryMutation) Description ¶
func (m *OrderHistoryMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*OrderHistoryMutation) DescriptionCleared ¶
func (m *OrderHistoryMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*OrderHistoryMutation) EdgeCleared ¶
func (m *OrderHistoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OrderHistoryMutation) Field ¶
func (m *OrderHistoryMutation) 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 (*OrderHistoryMutation) FieldCleared ¶
func (m *OrderHistoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OrderHistoryMutation) Fields ¶
func (m *OrderHistoryMutation) 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 (*OrderHistoryMutation) ID ¶
func (m *OrderHistoryMutation) ID() (id uuid.UUID, 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 (*OrderHistoryMutation) IDs ¶
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 (*OrderHistoryMutation) NewStatusCleared ¶
func (m *OrderHistoryMutation) NewStatusCleared() bool
NewStatusCleared reports if the "new_status" edge to the OrderStatusCode entity was cleared.
func (*OrderHistoryMutation) NewStatusCode ¶
func (m *OrderHistoryMutation) NewStatusCode() (r int, exists bool)
NewStatusCode returns the value of the "new_status_code" field in the mutation.
func (*OrderHistoryMutation) NewStatusCodeCleared ¶
func (m *OrderHistoryMutation) NewStatusCodeCleared() bool
NewStatusCodeCleared returns if the "new_status_code" field was cleared in this mutation.
func (*OrderHistoryMutation) NewStatusID ¶
func (m *OrderHistoryMutation) NewStatusID() (id int, exists bool)
NewStatusID returns the "new_status" edge ID in the mutation.
func (*OrderHistoryMutation) NewStatusIDs ¶
func (m *OrderHistoryMutation) NewStatusIDs() (ids []int)
NewStatusIDs returns the "new_status" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NewStatusID instead. It exists only for internal usage by the builders.
func (*OrderHistoryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the OrderHistory entity. If the OrderHistory 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 (*OrderHistoryMutation) OldDescription ¶
func (m *OrderHistoryMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old "description" field's value of the OrderHistory entity. If the OrderHistory 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 (*OrderHistoryMutation) 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 (*OrderHistoryMutation) OldNewStatusCode ¶
func (m *OrderHistoryMutation) OldNewStatusCode(ctx context.Context) (v *int, err error)
OldNewStatusCode returns the old "new_status_code" field's value of the OrderHistory entity. If the OrderHistory 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 (*OrderHistoryMutation) OldOldStatusCode ¶
func (m *OrderHistoryMutation) OldOldStatusCode(ctx context.Context) (v *int, err error)
OldOldStatusCode returns the old "old_status_code" field's value of the OrderHistory entity. If the OrderHistory 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 (*OrderHistoryMutation) OldOrderID ¶
OldOrderID returns the old "order_id" field's value of the OrderHistory entity. If the OrderHistory 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 (*OrderHistoryMutation) OldPersonID ¶
OldPersonID returns the old "person_id" field's value of the OrderHistory entity. If the OrderHistory 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 (*OrderHistoryMutation) OldStatusCleared ¶
func (m *OrderHistoryMutation) OldStatusCleared() bool
OldStatusCleared reports if the "old_status" edge to the OrderStatusCode entity was cleared.
func (*OrderHistoryMutation) OldStatusCode ¶
func (m *OrderHistoryMutation) OldStatusCode() (r int, exists bool)
OldStatusCode returns the value of the "old_status_code" field in the mutation.
func (*OrderHistoryMutation) OldStatusCodeCleared ¶
func (m *OrderHistoryMutation) OldStatusCodeCleared() bool
OldStatusCodeCleared returns if the "old_status_code" field was cleared in this mutation.
func (*OrderHistoryMutation) OldStatusID ¶
func (m *OrderHistoryMutation) OldStatusID() (id int, exists bool)
OldStatusID returns the "old_status" edge ID in the mutation.
func (*OrderHistoryMutation) OldStatusIDs ¶
func (m *OrderHistoryMutation) OldStatusIDs() (ids []int)
OldStatusIDs returns the "old_status" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OldStatusID instead. It exists only for internal usage by the builders.
func (*OrderHistoryMutation) Op ¶
func (m *OrderHistoryMutation) Op() Op
Op returns the operation name.
func (*OrderHistoryMutation) OrderCleared ¶
func (m *OrderHistoryMutation) OrderCleared() bool
OrderCleared reports if the "order" edge to the Order entity was cleared.
func (*OrderHistoryMutation) OrderID ¶
func (m *OrderHistoryMutation) OrderID() (r uuid.UUID, exists bool)
OrderID returns the value of the "order_id" field in the mutation.
func (*OrderHistoryMutation) OrderIDs ¶
func (m *OrderHistoryMutation) OrderIDs() (ids []uuid.UUID)
OrderIDs returns the "order" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrderID instead. It exists only for internal usage by the builders.
func (*OrderHistoryMutation) PersonCleared ¶
func (m *OrderHistoryMutation) PersonCleared() bool
PersonCleared reports if the "person" edge to the Person entity was cleared.
func (*OrderHistoryMutation) PersonID ¶
func (m *OrderHistoryMutation) PersonID() (r uuid.UUID, exists bool)
PersonID returns the value of the "person_id" field in the mutation.
func (*OrderHistoryMutation) PersonIDs ¶
func (m *OrderHistoryMutation) PersonIDs() (ids []uuid.UUID)
PersonIDs returns the "person" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PersonID instead. It exists only for internal usage by the builders.
func (*OrderHistoryMutation) RemovedEdges ¶
func (m *OrderHistoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrderHistoryMutation) RemovedIDs ¶
func (m *OrderHistoryMutation) 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 (*OrderHistoryMutation) ResetCreatedAt ¶
func (m *OrderHistoryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OrderHistoryMutation) ResetDescription ¶
func (m *OrderHistoryMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*OrderHistoryMutation) ResetEdge ¶
func (m *OrderHistoryMutation) 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 (*OrderHistoryMutation) ResetField ¶
func (m *OrderHistoryMutation) 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 (*OrderHistoryMutation) ResetNewStatus ¶
func (m *OrderHistoryMutation) ResetNewStatus()
ResetNewStatus resets all changes to the "new_status" edge.
func (*OrderHistoryMutation) ResetNewStatusCode ¶
func (m *OrderHistoryMutation) ResetNewStatusCode()
ResetNewStatusCode resets all changes to the "new_status_code" field.
func (*OrderHistoryMutation) ResetOldStatus ¶
func (m *OrderHistoryMutation) ResetOldStatus()
ResetOldStatus resets all changes to the "old_status" edge.
func (*OrderHistoryMutation) ResetOldStatusCode ¶
func (m *OrderHistoryMutation) ResetOldStatusCode()
ResetOldStatusCode resets all changes to the "old_status_code" field.
func (*OrderHistoryMutation) ResetOrder ¶
func (m *OrderHistoryMutation) ResetOrder()
ResetOrder resets all changes to the "order" edge.
func (*OrderHistoryMutation) ResetOrderID ¶
func (m *OrderHistoryMutation) ResetOrderID()
ResetOrderID resets all changes to the "order_id" field.
func (*OrderHistoryMutation) ResetPerson ¶
func (m *OrderHistoryMutation) ResetPerson()
ResetPerson resets all changes to the "person" edge.
func (*OrderHistoryMutation) ResetPersonID ¶
func (m *OrderHistoryMutation) ResetPersonID()
ResetPersonID resets all changes to the "person_id" field.
func (*OrderHistoryMutation) SetCreatedAt ¶
func (m *OrderHistoryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OrderHistoryMutation) SetDescription ¶
func (m *OrderHistoryMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*OrderHistoryMutation) SetField ¶
func (m *OrderHistoryMutation) 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 (*OrderHistoryMutation) SetID ¶
func (m *OrderHistoryMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of OrderHistory entities.
func (*OrderHistoryMutation) SetNewStatusCode ¶
func (m *OrderHistoryMutation) SetNewStatusCode(i int)
SetNewStatusCode sets the "new_status_code" field.
func (*OrderHistoryMutation) SetNewStatusID ¶
func (m *OrderHistoryMutation) SetNewStatusID(id int)
SetNewStatusID sets the "new_status" edge to the OrderStatusCode entity by id.
func (*OrderHistoryMutation) SetOldStatusCode ¶
func (m *OrderHistoryMutation) SetOldStatusCode(i int)
SetOldStatusCode sets the "old_status_code" field.
func (*OrderHistoryMutation) SetOldStatusID ¶
func (m *OrderHistoryMutation) SetOldStatusID(id int)
SetOldStatusID sets the "old_status" edge to the OrderStatusCode entity by id.
func (*OrderHistoryMutation) SetOp ¶
func (m *OrderHistoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OrderHistoryMutation) SetOrderID ¶
func (m *OrderHistoryMutation) SetOrderID(u uuid.UUID)
SetOrderID sets the "order_id" field.
func (*OrderHistoryMutation) SetPersonID ¶
func (m *OrderHistoryMutation) SetPersonID(u uuid.UUID)
SetPersonID sets the "person_id" field.
func (OrderHistoryMutation) Tx ¶
func (m OrderHistoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrderHistoryMutation) Type ¶
func (m *OrderHistoryMutation) Type() string
Type returns the node type of this mutation (OrderHistory).
func (*OrderHistoryMutation) Where ¶
func (m *OrderHistoryMutation) Where(ps ...predicate.OrderHistory)
Where appends a list predicates to the OrderHistoryMutation builder.
func (*OrderHistoryMutation) WhereP ¶
func (m *OrderHistoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OrderHistoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OrderHistoryQuery ¶
type OrderHistoryQuery struct {
// contains filtered or unexported fields
}
OrderHistoryQuery is the builder for querying OrderHistory entities.
func (*OrderHistoryQuery) Aggregate ¶
func (ohq *OrderHistoryQuery) Aggregate(fns ...AggregateFunc) *OrderHistorySelect
Aggregate returns a OrderHistorySelect configured with the given aggregations.
func (*OrderHistoryQuery) All ¶
func (ohq *OrderHistoryQuery) All(ctx context.Context) ([]*OrderHistory, error)
All executes the query and returns a list of OrderHistories.
func (*OrderHistoryQuery) AllX ¶
func (ohq *OrderHistoryQuery) AllX(ctx context.Context) []*OrderHistory
AllX is like All, but panics if an error occurs.
func (*OrderHistoryQuery) Clone ¶
func (ohq *OrderHistoryQuery) Clone() *OrderHistoryQuery
Clone returns a duplicate of the OrderHistoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OrderHistoryQuery) Count ¶
func (ohq *OrderHistoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OrderHistoryQuery) CountX ¶
func (ohq *OrderHistoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OrderHistoryQuery) Exist ¶
func (ohq *OrderHistoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OrderHistoryQuery) ExistX ¶
func (ohq *OrderHistoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OrderHistoryQuery) First ¶
func (ohq *OrderHistoryQuery) First(ctx context.Context) (*OrderHistory, error)
First returns the first OrderHistory entity from the query. Returns a *NotFoundError when no OrderHistory was found.
func (*OrderHistoryQuery) FirstID ¶
FirstID returns the first OrderHistory ID from the query. Returns a *NotFoundError when no OrderHistory ID was found.
func (*OrderHistoryQuery) FirstIDX ¶
func (ohq *OrderHistoryQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*OrderHistoryQuery) FirstX ¶
func (ohq *OrderHistoryQuery) FirstX(ctx context.Context) *OrderHistory
FirstX is like First, but panics if an error occurs.
func (*OrderHistoryQuery) GroupBy ¶
func (ohq *OrderHistoryQuery) GroupBy(field string, fields ...string) *OrderHistoryGroupBy
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.OrderHistory.Query(). GroupBy(orderhistory.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrderHistoryQuery) IDsX ¶
func (ohq *OrderHistoryQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*OrderHistoryQuery) Limit ¶
func (ohq *OrderHistoryQuery) Limit(limit int) *OrderHistoryQuery
Limit the number of records to be returned by this query.
func (*OrderHistoryQuery) Offset ¶
func (ohq *OrderHistoryQuery) Offset(offset int) *OrderHistoryQuery
Offset to start from.
func (*OrderHistoryQuery) Only ¶
func (ohq *OrderHistoryQuery) Only(ctx context.Context) (*OrderHistory, error)
Only returns a single OrderHistory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrderHistory entity is found. Returns a *NotFoundError when no OrderHistory entities are found.
func (*OrderHistoryQuery) OnlyID ¶
OnlyID is like Only, but returns the only OrderHistory ID in the query. Returns a *NotSingularError when more than one OrderHistory ID is found. Returns a *NotFoundError when no entities are found.
func (*OrderHistoryQuery) OnlyIDX ¶
func (ohq *OrderHistoryQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OrderHistoryQuery) OnlyX ¶
func (ohq *OrderHistoryQuery) OnlyX(ctx context.Context) *OrderHistory
OnlyX is like Only, but panics if an error occurs.
func (*OrderHistoryQuery) Order ¶
func (ohq *OrderHistoryQuery) Order(o ...orderhistory.OrderOption) *OrderHistoryQuery
Order specifies how the records should be ordered.
func (*OrderHistoryQuery) QueryNewStatus ¶
func (ohq *OrderHistoryQuery) QueryNewStatus() *OrderStatusCodeQuery
QueryNewStatus chains the current query on the "new_status" edge.
func (*OrderHistoryQuery) QueryOldStatus ¶
func (ohq *OrderHistoryQuery) QueryOldStatus() *OrderStatusCodeQuery
QueryOldStatus chains the current query on the "old_status" edge.
func (*OrderHistoryQuery) QueryOrder ¶
func (ohq *OrderHistoryQuery) QueryOrder() *OrderQuery
QueryOrder chains the current query on the "order" edge.
func (*OrderHistoryQuery) QueryPerson ¶
func (ohq *OrderHistoryQuery) QueryPerson() *PersonQuery
QueryPerson chains the current query on the "person" edge.
func (*OrderHistoryQuery) Select ¶
func (ohq *OrderHistoryQuery) Select(fields ...string) *OrderHistorySelect
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.OrderHistory.Query(). Select(orderhistory.FieldCreatedAt). Scan(ctx, &v)
func (*OrderHistoryQuery) Unique ¶
func (ohq *OrderHistoryQuery) Unique(unique bool) *OrderHistoryQuery
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 (*OrderHistoryQuery) Where ¶
func (ohq *OrderHistoryQuery) Where(ps ...predicate.OrderHistory) *OrderHistoryQuery
Where adds a new predicate for the OrderHistoryQuery builder.
func (*OrderHistoryQuery) WithNewStatus ¶
func (ohq *OrderHistoryQuery) WithNewStatus(opts ...func(*OrderStatusCodeQuery)) *OrderHistoryQuery
WithNewStatus tells the query-builder to eager-load the nodes that are connected to the "new_status" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderHistoryQuery) WithOldStatus ¶
func (ohq *OrderHistoryQuery) WithOldStatus(opts ...func(*OrderStatusCodeQuery)) *OrderHistoryQuery
WithOldStatus tells the query-builder to eager-load the nodes that are connected to the "old_status" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderHistoryQuery) WithOrder ¶
func (ohq *OrderHistoryQuery) WithOrder(opts ...func(*OrderQuery)) *OrderHistoryQuery
WithOrder tells the query-builder to eager-load the nodes that are connected to the "order" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderHistoryQuery) WithPerson ¶
func (ohq *OrderHistoryQuery) WithPerson(opts ...func(*PersonQuery)) *OrderHistoryQuery
WithPerson tells the query-builder to eager-load the nodes that are connected to the "person" edge. The optional arguments are used to configure the query builder of the edge.
type OrderHistorySelect ¶
type OrderHistorySelect struct { *OrderHistoryQuery // contains filtered or unexported fields }
OrderHistorySelect is the builder for selecting fields of OrderHistory entities.
func (*OrderHistorySelect) Aggregate ¶
func (ohs *OrderHistorySelect) Aggregate(fns ...AggregateFunc) *OrderHistorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*OrderHistorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderHistorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderHistorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderHistorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderHistorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderHistorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderHistorySelect) Scan ¶
func (ohs *OrderHistorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderHistorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderHistoryUpdate ¶
type OrderHistoryUpdate struct {
// contains filtered or unexported fields
}
OrderHistoryUpdate is the builder for updating OrderHistory entities.
func (*OrderHistoryUpdate) Exec ¶
func (ohu *OrderHistoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderHistoryUpdate) ExecX ¶
func (ohu *OrderHistoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderHistoryUpdate) Mutation ¶
func (ohu *OrderHistoryUpdate) Mutation() *OrderHistoryMutation
Mutation returns the OrderHistoryMutation object of the builder.
func (*OrderHistoryUpdate) Save ¶
func (ohu *OrderHistoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrderHistoryUpdate) SaveX ¶
func (ohu *OrderHistoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrderHistoryUpdate) Where ¶
func (ohu *OrderHistoryUpdate) Where(ps ...predicate.OrderHistory) *OrderHistoryUpdate
Where appends a list predicates to the OrderHistoryUpdate builder.
type OrderHistoryUpdateOne ¶
type OrderHistoryUpdateOne struct {
// contains filtered or unexported fields
}
OrderHistoryUpdateOne is the builder for updating a single OrderHistory entity.
func (*OrderHistoryUpdateOne) Exec ¶
func (ohuo *OrderHistoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrderHistoryUpdateOne) ExecX ¶
func (ohuo *OrderHistoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderHistoryUpdateOne) Mutation ¶
func (ohuo *OrderHistoryUpdateOne) Mutation() *OrderHistoryMutation
Mutation returns the OrderHistoryMutation object of the builder.
func (*OrderHistoryUpdateOne) Save ¶
func (ohuo *OrderHistoryUpdateOne) Save(ctx context.Context) (*OrderHistory, error)
Save executes the query and returns the updated OrderHistory entity.
func (*OrderHistoryUpdateOne) SaveX ¶
func (ohuo *OrderHistoryUpdateOne) SaveX(ctx context.Context) *OrderHistory
SaveX is like Save, but panics if an error occurs.
func (*OrderHistoryUpdateOne) Select ¶
func (ohuo *OrderHistoryUpdateOne) Select(field string, fields ...string) *OrderHistoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrderHistoryUpdateOne) Where ¶
func (ohuo *OrderHistoryUpdateOne) Where(ps ...predicate.OrderHistory) *OrderHistoryUpdateOne
Where appends a list predicates to the OrderHistoryUpdate builder.
type OrderItem ¶
type OrderItem struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // OrderID holds the value of the "order_id" field. OrderID uuid.UUID `json:"order_id,omitempty"` // ProductID holds the value of the "product_id" field. ProductID string `json:"product_id,omitempty"` // ProductColorID holds the value of the "product_color_id" field. ProductColorID string `json:"product_color_id,omitempty"` // SrcUnitID holds the value of the "src_unit_id" field. SrcUnitID *uuid.UUID `json:"src_unit_id,omitempty"` // DstUnitID holds the value of the "dst_unit_id" field. DstUnitID *uuid.UUID `json:"dst_unit_id,omitempty"` // Qty holds the value of the "qty" field. Qty *decimal.Decimal `json:"qty,omitempty"` // PricePerUnit holds the value of the "price_per_unit" field. PricePerUnit *decimal.Decimal `json:"price_per_unit,omitempty"` // Status holds the value of the "status" field. Status *orderitem.Status `json:"status,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the OrderItemQuery when eager-loading is set. Edges OrderItemEdges `json:"edges"` // contains filtered or unexported fields }
OrderItem is the model entity for the OrderItem schema.
func (*OrderItem) QueryDestinationWorkUnit ¶
func (oi *OrderItem) QueryDestinationWorkUnit() *WorkUnitInfoQuery
QueryDestinationWorkUnit queries the "destination_work_unit" edge of the OrderItem entity.
func (*OrderItem) QueryOrder ¶
func (oi *OrderItem) QueryOrder() *OrderQuery
QueryOrder queries the "order" edge of the OrderItem entity.
func (*OrderItem) QueryProduct ¶
func (oi *OrderItem) QueryProduct() *ProductInfoQuery
QueryProduct queries the "product" edge of the OrderItem entity.
func (*OrderItem) QueryProductColor ¶
func (oi *OrderItem) QueryProductColor() *ProductColorQuery
QueryProductColor queries the "product_color" edge of the OrderItem entity.
func (*OrderItem) QuerySourceWorkUnit ¶
func (oi *OrderItem) QuerySourceWorkUnit() *WorkUnitInfoQuery
QuerySourceWorkUnit queries the "source_work_unit" edge of the OrderItem entity.
func (*OrderItem) Unwrap ¶
Unwrap unwraps the OrderItem 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 (*OrderItem) Update ¶
func (oi *OrderItem) Update() *OrderItemUpdateOne
Update returns a builder for updating this OrderItem. Note that you need to call OrderItem.Unwrap() before calling this method if this OrderItem was returned from a transaction, and the transaction was committed or rolled back.
type OrderItemClient ¶
type OrderItemClient struct {
// contains filtered or unexported fields
}
OrderItemClient is a client for the OrderItem schema.
func NewOrderItemClient ¶
func NewOrderItemClient(c config) *OrderItemClient
NewOrderItemClient returns a client for the OrderItem from the given config.
func (*OrderItemClient) Create ¶
func (c *OrderItemClient) Create() *OrderItemCreate
Create returns a builder for creating a OrderItem entity.
func (*OrderItemClient) CreateBulk ¶
func (c *OrderItemClient) CreateBulk(builders ...*OrderItemCreate) *OrderItemCreateBulk
CreateBulk returns a builder for creating a bulk of OrderItem entities.
func (*OrderItemClient) Delete ¶
func (c *OrderItemClient) Delete() *OrderItemDelete
Delete returns a delete builder for OrderItem.
func (*OrderItemClient) DeleteOne ¶
func (c *OrderItemClient) DeleteOne(oi *OrderItem) *OrderItemDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OrderItemClient) DeleteOneID ¶
func (c *OrderItemClient) DeleteOneID(id uuid.UUID) *OrderItemDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OrderItemClient) Hooks ¶
func (c *OrderItemClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OrderItemClient) Intercept ¶
func (c *OrderItemClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orderitem.Intercept(f(g(h())))`.
func (*OrderItemClient) Interceptors ¶
func (c *OrderItemClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OrderItemClient) MapCreateBulk ¶
func (c *OrderItemClient) MapCreateBulk(slice any, setFunc func(*OrderItemCreate, int)) *OrderItemCreateBulk
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 (*OrderItemClient) Query ¶
func (c *OrderItemClient) Query() *OrderItemQuery
Query returns a query builder for OrderItem.
func (*OrderItemClient) QueryDestinationWorkUnit ¶
func (c *OrderItemClient) QueryDestinationWorkUnit(oi *OrderItem) *WorkUnitInfoQuery
QueryDestinationWorkUnit queries the destination_work_unit edge of a OrderItem.
func (*OrderItemClient) QueryOrder ¶
func (c *OrderItemClient) QueryOrder(oi *OrderItem) *OrderQuery
QueryOrder queries the order edge of a OrderItem.
func (*OrderItemClient) QueryProduct ¶
func (c *OrderItemClient) QueryProduct(oi *OrderItem) *ProductInfoQuery
QueryProduct queries the product edge of a OrderItem.
func (*OrderItemClient) QueryProductColor ¶
func (c *OrderItemClient) QueryProductColor(oi *OrderItem) *ProductColorQuery
QueryProductColor queries the product_color edge of a OrderItem.
func (*OrderItemClient) QuerySourceWorkUnit ¶
func (c *OrderItemClient) QuerySourceWorkUnit(oi *OrderItem) *WorkUnitInfoQuery
QuerySourceWorkUnit queries the source_work_unit edge of a OrderItem.
func (*OrderItemClient) Update ¶
func (c *OrderItemClient) Update() *OrderItemUpdate
Update returns an update builder for OrderItem.
func (*OrderItemClient) UpdateOne ¶
func (c *OrderItemClient) UpdateOne(oi *OrderItem) *OrderItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OrderItemClient) UpdateOneID ¶
func (c *OrderItemClient) UpdateOneID(id uuid.UUID) *OrderItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OrderItemClient) Use ¶
func (c *OrderItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orderitem.Hooks(f(g(h())))`.
type OrderItemCreate ¶
type OrderItemCreate struct {
// contains filtered or unexported fields
}
OrderItemCreate is the builder for creating a OrderItem entity.
func (*OrderItemCreate) Exec ¶
func (oic *OrderItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderItemCreate) ExecX ¶
func (oic *OrderItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderItemCreate) Mutation ¶
func (oic *OrderItemCreate) Mutation() *OrderItemMutation
Mutation returns the OrderItemMutation object of the builder.
func (*OrderItemCreate) Save ¶
func (oic *OrderItemCreate) Save(ctx context.Context) (*OrderItem, error)
Save creates the OrderItem in the database.
func (*OrderItemCreate) SaveX ¶
func (oic *OrderItemCreate) SaveX(ctx context.Context) *OrderItem
SaveX calls Save and panics if Save returns an error.
func (*OrderItemCreate) SetCreatedAt ¶
func (oic *OrderItemCreate) SetCreatedAt(t time.Time) *OrderItemCreate
SetCreatedAt sets the "created_at" field.
func (*OrderItemCreate) SetDestinationWorkUnit ¶
func (oic *OrderItemCreate) SetDestinationWorkUnit(w *WorkUnitInfo) *OrderItemCreate
SetDestinationWorkUnit sets the "destination_work_unit" edge to the WorkUnitInfo entity.
func (*OrderItemCreate) SetDestinationWorkUnitID ¶
func (oic *OrderItemCreate) SetDestinationWorkUnitID(id uuid.UUID) *OrderItemCreate
SetDestinationWorkUnitID sets the "destination_work_unit" edge to the WorkUnitInfo entity by ID.
func (*OrderItemCreate) SetDstUnitID ¶
func (oic *OrderItemCreate) SetDstUnitID(u uuid.UUID) *OrderItemCreate
SetDstUnitID sets the "dst_unit_id" field.
func (*OrderItemCreate) SetID ¶
func (oic *OrderItemCreate) SetID(u uuid.UUID) *OrderItemCreate
SetID sets the "id" field.
func (*OrderItemCreate) SetNillableCreatedAt ¶
func (oic *OrderItemCreate) SetNillableCreatedAt(t *time.Time) *OrderItemCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderItemCreate) SetNillableDestinationWorkUnitID ¶
func (oic *OrderItemCreate) SetNillableDestinationWorkUnitID(id *uuid.UUID) *OrderItemCreate
SetNillableDestinationWorkUnitID sets the "destination_work_unit" edge to the WorkUnitInfo entity by ID if the given value is not nil.
func (*OrderItemCreate) SetNillableDstUnitID ¶
func (oic *OrderItemCreate) SetNillableDstUnitID(u *uuid.UUID) *OrderItemCreate
SetNillableDstUnitID sets the "dst_unit_id" field if the given value is not nil.
func (*OrderItemCreate) SetNillableID ¶
func (oic *OrderItemCreate) SetNillableID(u *uuid.UUID) *OrderItemCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*OrderItemCreate) SetNillableSourceWorkUnitID ¶
func (oic *OrderItemCreate) SetNillableSourceWorkUnitID(id *uuid.UUID) *OrderItemCreate
SetNillableSourceWorkUnitID sets the "source_work_unit" edge to the WorkUnitInfo entity by ID if the given value is not nil.
func (*OrderItemCreate) SetNillableSrcUnitID ¶
func (oic *OrderItemCreate) SetNillableSrcUnitID(u *uuid.UUID) *OrderItemCreate
SetNillableSrcUnitID sets the "src_unit_id" field if the given value is not nil.
func (*OrderItemCreate) SetNillableStatus ¶
func (oic *OrderItemCreate) SetNillableStatus(o *orderitem.Status) *OrderItemCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*OrderItemCreate) SetNillableUpdatedAt ¶
func (oic *OrderItemCreate) SetNillableUpdatedAt(t *time.Time) *OrderItemCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderItemCreate) SetOrder ¶
func (oic *OrderItemCreate) SetOrder(o *Order) *OrderItemCreate
SetOrder sets the "order" edge to the Order entity.
func (*OrderItemCreate) SetOrderID ¶
func (oic *OrderItemCreate) SetOrderID(u uuid.UUID) *OrderItemCreate
SetOrderID sets the "order_id" field.
func (*OrderItemCreate) SetPricePerUnit ¶
func (oic *OrderItemCreate) SetPricePerUnit(d decimal.Decimal) *OrderItemCreate
SetPricePerUnit sets the "price_per_unit" field.
func (*OrderItemCreate) SetProduct ¶
func (oic *OrderItemCreate) SetProduct(p *ProductInfo) *OrderItemCreate
SetProduct sets the "product" edge to the ProductInfo entity.
func (*OrderItemCreate) SetProductColor ¶
func (oic *OrderItemCreate) SetProductColor(p *ProductColor) *OrderItemCreate
SetProductColor sets the "product_color" edge to the ProductColor entity.
func (*OrderItemCreate) SetProductColorID ¶
func (oic *OrderItemCreate) SetProductColorID(s string) *OrderItemCreate
SetProductColorID sets the "product_color_id" field.
func (*OrderItemCreate) SetProductID ¶
func (oic *OrderItemCreate) SetProductID(s string) *OrderItemCreate
SetProductID sets the "product_id" field.
func (*OrderItemCreate) SetQty ¶
func (oic *OrderItemCreate) SetQty(d decimal.Decimal) *OrderItemCreate
SetQty sets the "qty" field.
func (*OrderItemCreate) SetSourceWorkUnit ¶
func (oic *OrderItemCreate) SetSourceWorkUnit(w *WorkUnitInfo) *OrderItemCreate
SetSourceWorkUnit sets the "source_work_unit" edge to the WorkUnitInfo entity.
func (*OrderItemCreate) SetSourceWorkUnitID ¶
func (oic *OrderItemCreate) SetSourceWorkUnitID(id uuid.UUID) *OrderItemCreate
SetSourceWorkUnitID sets the "source_work_unit" edge to the WorkUnitInfo entity by ID.
func (*OrderItemCreate) SetSrcUnitID ¶
func (oic *OrderItemCreate) SetSrcUnitID(u uuid.UUID) *OrderItemCreate
SetSrcUnitID sets the "src_unit_id" field.
func (*OrderItemCreate) SetStatus ¶
func (oic *OrderItemCreate) SetStatus(o orderitem.Status) *OrderItemCreate
SetStatus sets the "status" field.
func (*OrderItemCreate) SetUpdatedAt ¶
func (oic *OrderItemCreate) SetUpdatedAt(t time.Time) *OrderItemCreate
SetUpdatedAt sets the "updated_at" field.
type OrderItemCreateBulk ¶
type OrderItemCreateBulk struct {
// contains filtered or unexported fields
}
OrderItemCreateBulk is the builder for creating many OrderItem entities in bulk.
func (*OrderItemCreateBulk) Exec ¶
func (oicb *OrderItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderItemCreateBulk) ExecX ¶
func (oicb *OrderItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type OrderItemDelete ¶
type OrderItemDelete struct {
// contains filtered or unexported fields
}
OrderItemDelete is the builder for deleting a OrderItem entity.
func (*OrderItemDelete) Exec ¶
func (oid *OrderItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OrderItemDelete) ExecX ¶
func (oid *OrderItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OrderItemDelete) Where ¶
func (oid *OrderItemDelete) Where(ps ...predicate.OrderItem) *OrderItemDelete
Where appends a list predicates to the OrderItemDelete builder.
type OrderItemDeleteOne ¶
type OrderItemDeleteOne struct {
// contains filtered or unexported fields
}
OrderItemDeleteOne is the builder for deleting a single OrderItem entity.
func (*OrderItemDeleteOne) Exec ¶
func (oido *OrderItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OrderItemDeleteOne) ExecX ¶
func (oido *OrderItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderItemDeleteOne) Where ¶
func (oido *OrderItemDeleteOne) Where(ps ...predicate.OrderItem) *OrderItemDeleteOne
Where appends a list predicates to the OrderItemDelete builder.
type OrderItemEdges ¶
type OrderItemEdges struct { // Order holds the value of the order edge. Order *Order `json:"order,omitempty"` // Product holds the value of the product edge. Product *ProductInfo `json:"product,omitempty"` // ProductColor holds the value of the product_color edge. ProductColor *ProductColor `json:"product_color,omitempty"` // SourceWorkUnit holds the value of the source_work_unit edge. SourceWorkUnit *WorkUnitInfo `json:"source_work_unit,omitempty"` // DestinationWorkUnit holds the value of the destination_work_unit edge. DestinationWorkUnit *WorkUnitInfo `json:"destination_work_unit,omitempty"` // contains filtered or unexported fields }
OrderItemEdges holds the relations/edges for other nodes in the graph.
func (OrderItemEdges) DestinationWorkUnitOrErr ¶
func (e OrderItemEdges) DestinationWorkUnitOrErr() (*WorkUnitInfo, error)
DestinationWorkUnitOrErr returns the DestinationWorkUnit value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderItemEdges) OrderOrErr ¶
func (e OrderItemEdges) OrderOrErr() (*Order, error)
OrderOrErr returns the Order value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderItemEdges) ProductColorOrErr ¶
func (e OrderItemEdges) ProductColorOrErr() (*ProductColor, error)
ProductColorOrErr returns the ProductColor value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderItemEdges) ProductOrErr ¶
func (e OrderItemEdges) ProductOrErr() (*ProductInfo, error)
ProductOrErr returns the Product value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (OrderItemEdges) SourceWorkUnitOrErr ¶
func (e OrderItemEdges) SourceWorkUnitOrErr() (*WorkUnitInfo, error)
SourceWorkUnitOrErr returns the SourceWorkUnit value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type OrderItemGroupBy ¶
type OrderItemGroupBy struct {
// contains filtered or unexported fields
}
OrderItemGroupBy is the group-by builder for OrderItem entities.
func (*OrderItemGroupBy) Aggregate ¶
func (oigb *OrderItemGroupBy) Aggregate(fns ...AggregateFunc) *OrderItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OrderItemGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderItemGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderItemGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderItemGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderItemGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderItemGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderItemGroupBy) Scan ¶
func (oigb *OrderItemGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderItemGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderItemMutation ¶
type OrderItemMutation struct {
// contains filtered or unexported fields
}
OrderItemMutation represents an operation that mutates the OrderItem nodes in the graph.
func (*OrderItemMutation) AddField ¶
func (m *OrderItemMutation) 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 (*OrderItemMutation) AddPricePerUnit ¶
func (m *OrderItemMutation) AddPricePerUnit(d decimal.Decimal)
AddPricePerUnit adds d to the "price_per_unit" field.
func (*OrderItemMutation) AddQty ¶
func (m *OrderItemMutation) AddQty(d decimal.Decimal)
AddQty adds d to the "qty" field.
func (*OrderItemMutation) AddedEdges ¶
func (m *OrderItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrderItemMutation) AddedField ¶
func (m *OrderItemMutation) 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 (*OrderItemMutation) AddedFields ¶
func (m *OrderItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrderItemMutation) AddedIDs ¶
func (m *OrderItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OrderItemMutation) AddedPricePerUnit ¶
func (m *OrderItemMutation) AddedPricePerUnit() (r decimal.Decimal, exists bool)
AddedPricePerUnit returns the value that was added to the "price_per_unit" field in this mutation.
func (*OrderItemMutation) AddedQty ¶
func (m *OrderItemMutation) AddedQty() (r decimal.Decimal, exists bool)
AddedQty returns the value that was added to the "qty" field in this mutation.
func (*OrderItemMutation) ClearDestinationWorkUnit ¶
func (m *OrderItemMutation) ClearDestinationWorkUnit()
ClearDestinationWorkUnit clears the "destination_work_unit" edge to the WorkUnitInfo entity.
func (*OrderItemMutation) ClearDstUnitID ¶
func (m *OrderItemMutation) ClearDstUnitID()
ClearDstUnitID clears the value of the "dst_unit_id" field.
func (*OrderItemMutation) ClearEdge ¶
func (m *OrderItemMutation) 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 (*OrderItemMutation) ClearField ¶
func (m *OrderItemMutation) 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 (*OrderItemMutation) ClearOrder ¶
func (m *OrderItemMutation) ClearOrder()
ClearOrder clears the "order" edge to the Order entity.
func (*OrderItemMutation) ClearProduct ¶
func (m *OrderItemMutation) ClearProduct()
ClearProduct clears the "product" edge to the ProductInfo entity.
func (*OrderItemMutation) ClearProductColor ¶
func (m *OrderItemMutation) ClearProductColor()
ClearProductColor clears the "product_color" edge to the ProductColor entity.
func (*OrderItemMutation) ClearSourceWorkUnit ¶
func (m *OrderItemMutation) ClearSourceWorkUnit()
ClearSourceWorkUnit clears the "source_work_unit" edge to the WorkUnitInfo entity.
func (*OrderItemMutation) ClearSrcUnitID ¶
func (m *OrderItemMutation) ClearSrcUnitID()
ClearSrcUnitID clears the value of the "src_unit_id" field.
func (*OrderItemMutation) ClearedEdges ¶
func (m *OrderItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrderItemMutation) ClearedFields ¶
func (m *OrderItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrderItemMutation) Client ¶
func (m OrderItemMutation) 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 (*OrderItemMutation) CreatedAt ¶
func (m *OrderItemMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OrderItemMutation) DestinationWorkUnitCleared ¶
func (m *OrderItemMutation) DestinationWorkUnitCleared() bool
DestinationWorkUnitCleared reports if the "destination_work_unit" edge to the WorkUnitInfo entity was cleared.
func (*OrderItemMutation) DestinationWorkUnitID ¶
func (m *OrderItemMutation) DestinationWorkUnitID() (id uuid.UUID, exists bool)
DestinationWorkUnitID returns the "destination_work_unit" edge ID in the mutation.
func (*OrderItemMutation) DestinationWorkUnitIDs ¶
func (m *OrderItemMutation) DestinationWorkUnitIDs() (ids []uuid.UUID)
DestinationWorkUnitIDs returns the "destination_work_unit" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DestinationWorkUnitID instead. It exists only for internal usage by the builders.
func (*OrderItemMutation) DstUnitID ¶
func (m *OrderItemMutation) DstUnitID() (r uuid.UUID, exists bool)
DstUnitID returns the value of the "dst_unit_id" field in the mutation.
func (*OrderItemMutation) DstUnitIDCleared ¶
func (m *OrderItemMutation) DstUnitIDCleared() bool
DstUnitIDCleared returns if the "dst_unit_id" field was cleared in this mutation.
func (*OrderItemMutation) EdgeCleared ¶
func (m *OrderItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OrderItemMutation) Field ¶
func (m *OrderItemMutation) 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 (*OrderItemMutation) FieldCleared ¶
func (m *OrderItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OrderItemMutation) Fields ¶
func (m *OrderItemMutation) 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 (*OrderItemMutation) ID ¶
func (m *OrderItemMutation) ID() (id uuid.UUID, 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 (*OrderItemMutation) IDs ¶
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 (*OrderItemMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the OrderItem entity. If the OrderItem 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 (*OrderItemMutation) OldDstUnitID ¶
OldDstUnitID returns the old "dst_unit_id" field's value of the OrderItem entity. If the OrderItem 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 (*OrderItemMutation) 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 (*OrderItemMutation) OldOrderID ¶
OldOrderID returns the old "order_id" field's value of the OrderItem entity. If the OrderItem 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 (*OrderItemMutation) OldPricePerUnit ¶
OldPricePerUnit returns the old "price_per_unit" field's value of the OrderItem entity. If the OrderItem 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 (*OrderItemMutation) OldProductColorID ¶
func (m *OrderItemMutation) OldProductColorID(ctx context.Context) (v string, err error)
OldProductColorID returns the old "product_color_id" field's value of the OrderItem entity. If the OrderItem 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 (*OrderItemMutation) OldProductID ¶
func (m *OrderItemMutation) OldProductID(ctx context.Context) (v string, err error)
OldProductID returns the old "product_id" field's value of the OrderItem entity. If the OrderItem 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 (*OrderItemMutation) OldQty ¶
OldQty returns the old "qty" field's value of the OrderItem entity. If the OrderItem 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 (*OrderItemMutation) OldSrcUnitID ¶
OldSrcUnitID returns the old "src_unit_id" field's value of the OrderItem entity. If the OrderItem 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 (*OrderItemMutation) OldStatus ¶
OldStatus returns the old "status" field's value of the OrderItem entity. If the OrderItem 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 (*OrderItemMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the OrderItem entity. If the OrderItem 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 (*OrderItemMutation) OrderCleared ¶
func (m *OrderItemMutation) OrderCleared() bool
OrderCleared reports if the "order" edge to the Order entity was cleared.
func (*OrderItemMutation) OrderID ¶
func (m *OrderItemMutation) OrderID() (r uuid.UUID, exists bool)
OrderID returns the value of the "order_id" field in the mutation.
func (*OrderItemMutation) OrderIDs ¶
func (m *OrderItemMutation) OrderIDs() (ids []uuid.UUID)
OrderIDs returns the "order" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrderID instead. It exists only for internal usage by the builders.
func (*OrderItemMutation) PricePerUnit ¶
func (m *OrderItemMutation) PricePerUnit() (r decimal.Decimal, exists bool)
PricePerUnit returns the value of the "price_per_unit" field in the mutation.
func (*OrderItemMutation) ProductCleared ¶
func (m *OrderItemMutation) ProductCleared() bool
ProductCleared reports if the "product" edge to the ProductInfo entity was cleared.
func (*OrderItemMutation) ProductColorCleared ¶
func (m *OrderItemMutation) ProductColorCleared() bool
ProductColorCleared reports if the "product_color" edge to the ProductColor entity was cleared.
func (*OrderItemMutation) ProductColorID ¶
func (m *OrderItemMutation) ProductColorID() (r string, exists bool)
ProductColorID returns the value of the "product_color_id" field in the mutation.
func (*OrderItemMutation) ProductColorIDs ¶
func (m *OrderItemMutation) ProductColorIDs() (ids []string)
ProductColorIDs returns the "product_color" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProductColorID instead. It exists only for internal usage by the builders.
func (*OrderItemMutation) ProductID ¶
func (m *OrderItemMutation) ProductID() (r string, exists bool)
ProductID returns the value of the "product_id" field in the mutation.
func (*OrderItemMutation) ProductIDs ¶
func (m *OrderItemMutation) ProductIDs() (ids []string)
ProductIDs returns the "product" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProductID instead. It exists only for internal usage by the builders.
func (*OrderItemMutation) Qty ¶
func (m *OrderItemMutation) Qty() (r decimal.Decimal, exists bool)
Qty returns the value of the "qty" field in the mutation.
func (*OrderItemMutation) RemovedEdges ¶
func (m *OrderItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrderItemMutation) RemovedIDs ¶
func (m *OrderItemMutation) 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 (*OrderItemMutation) ResetCreatedAt ¶
func (m *OrderItemMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OrderItemMutation) ResetDestinationWorkUnit ¶
func (m *OrderItemMutation) ResetDestinationWorkUnit()
ResetDestinationWorkUnit resets all changes to the "destination_work_unit" edge.
func (*OrderItemMutation) ResetDstUnitID ¶
func (m *OrderItemMutation) ResetDstUnitID()
ResetDstUnitID resets all changes to the "dst_unit_id" field.
func (*OrderItemMutation) ResetEdge ¶
func (m *OrderItemMutation) 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 (*OrderItemMutation) ResetField ¶
func (m *OrderItemMutation) 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 (*OrderItemMutation) ResetOrder ¶
func (m *OrderItemMutation) ResetOrder()
ResetOrder resets all changes to the "order" edge.
func (*OrderItemMutation) ResetOrderID ¶
func (m *OrderItemMutation) ResetOrderID()
ResetOrderID resets all changes to the "order_id" field.
func (*OrderItemMutation) ResetPricePerUnit ¶
func (m *OrderItemMutation) ResetPricePerUnit()
ResetPricePerUnit resets all changes to the "price_per_unit" field.
func (*OrderItemMutation) ResetProduct ¶
func (m *OrderItemMutation) ResetProduct()
ResetProduct resets all changes to the "product" edge.
func (*OrderItemMutation) ResetProductColor ¶
func (m *OrderItemMutation) ResetProductColor()
ResetProductColor resets all changes to the "product_color" edge.
func (*OrderItemMutation) ResetProductColorID ¶
func (m *OrderItemMutation) ResetProductColorID()
ResetProductColorID resets all changes to the "product_color_id" field.
func (*OrderItemMutation) ResetProductID ¶
func (m *OrderItemMutation) ResetProductID()
ResetProductID resets all changes to the "product_id" field.
func (*OrderItemMutation) ResetQty ¶
func (m *OrderItemMutation) ResetQty()
ResetQty resets all changes to the "qty" field.
func (*OrderItemMutation) ResetSourceWorkUnit ¶
func (m *OrderItemMutation) ResetSourceWorkUnit()
ResetSourceWorkUnit resets all changes to the "source_work_unit" edge.
func (*OrderItemMutation) ResetSrcUnitID ¶
func (m *OrderItemMutation) ResetSrcUnitID()
ResetSrcUnitID resets all changes to the "src_unit_id" field.
func (*OrderItemMutation) ResetStatus ¶
func (m *OrderItemMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*OrderItemMutation) ResetUpdatedAt ¶
func (m *OrderItemMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OrderItemMutation) SetCreatedAt ¶
func (m *OrderItemMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OrderItemMutation) SetDestinationWorkUnitID ¶
func (m *OrderItemMutation) SetDestinationWorkUnitID(id uuid.UUID)
SetDestinationWorkUnitID sets the "destination_work_unit" edge to the WorkUnitInfo entity by id.
func (*OrderItemMutation) SetDstUnitID ¶
func (m *OrderItemMutation) SetDstUnitID(u uuid.UUID)
SetDstUnitID sets the "dst_unit_id" field.
func (*OrderItemMutation) SetField ¶
func (m *OrderItemMutation) 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 (*OrderItemMutation) SetID ¶
func (m *OrderItemMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of OrderItem entities.
func (*OrderItemMutation) SetOp ¶
func (m *OrderItemMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OrderItemMutation) SetOrderID ¶
func (m *OrderItemMutation) SetOrderID(u uuid.UUID)
SetOrderID sets the "order_id" field.
func (*OrderItemMutation) SetPricePerUnit ¶
func (m *OrderItemMutation) SetPricePerUnit(d decimal.Decimal)
SetPricePerUnit sets the "price_per_unit" field.
func (*OrderItemMutation) SetProductColorID ¶
func (m *OrderItemMutation) SetProductColorID(s string)
SetProductColorID sets the "product_color_id" field.
func (*OrderItemMutation) SetProductID ¶
func (m *OrderItemMutation) SetProductID(s string)
SetProductID sets the "product_id" field.
func (*OrderItemMutation) SetQty ¶
func (m *OrderItemMutation) SetQty(d decimal.Decimal)
SetQty sets the "qty" field.
func (*OrderItemMutation) SetSourceWorkUnitID ¶
func (m *OrderItemMutation) SetSourceWorkUnitID(id uuid.UUID)
SetSourceWorkUnitID sets the "source_work_unit" edge to the WorkUnitInfo entity by id.
func (*OrderItemMutation) SetSrcUnitID ¶
func (m *OrderItemMutation) SetSrcUnitID(u uuid.UUID)
SetSrcUnitID sets the "src_unit_id" field.
func (*OrderItemMutation) SetStatus ¶
func (m *OrderItemMutation) SetStatus(o orderitem.Status)
SetStatus sets the "status" field.
func (*OrderItemMutation) SetUpdatedAt ¶
func (m *OrderItemMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*OrderItemMutation) SourceWorkUnitCleared ¶
func (m *OrderItemMutation) SourceWorkUnitCleared() bool
SourceWorkUnitCleared reports if the "source_work_unit" edge to the WorkUnitInfo entity was cleared.
func (*OrderItemMutation) SourceWorkUnitID ¶
func (m *OrderItemMutation) SourceWorkUnitID() (id uuid.UUID, exists bool)
SourceWorkUnitID returns the "source_work_unit" edge ID in the mutation.
func (*OrderItemMutation) SourceWorkUnitIDs ¶
func (m *OrderItemMutation) SourceWorkUnitIDs() (ids []uuid.UUID)
SourceWorkUnitIDs returns the "source_work_unit" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SourceWorkUnitID instead. It exists only for internal usage by the builders.
func (*OrderItemMutation) SrcUnitID ¶
func (m *OrderItemMutation) SrcUnitID() (r uuid.UUID, exists bool)
SrcUnitID returns the value of the "src_unit_id" field in the mutation.
func (*OrderItemMutation) SrcUnitIDCleared ¶
func (m *OrderItemMutation) SrcUnitIDCleared() bool
SrcUnitIDCleared returns if the "src_unit_id" field was cleared in this mutation.
func (*OrderItemMutation) Status ¶
func (m *OrderItemMutation) Status() (r orderitem.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (OrderItemMutation) Tx ¶
func (m OrderItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrderItemMutation) Type ¶
func (m *OrderItemMutation) Type() string
Type returns the node type of this mutation (OrderItem).
func (*OrderItemMutation) UpdatedAt ¶
func (m *OrderItemMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OrderItemMutation) Where ¶
func (m *OrderItemMutation) Where(ps ...predicate.OrderItem)
Where appends a list predicates to the OrderItemMutation builder.
func (*OrderItemMutation) WhereP ¶
func (m *OrderItemMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OrderItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OrderItemQuery ¶
type OrderItemQuery struct {
// contains filtered or unexported fields
}
OrderItemQuery is the builder for querying OrderItem entities.
func (*OrderItemQuery) Aggregate ¶
func (oiq *OrderItemQuery) Aggregate(fns ...AggregateFunc) *OrderItemSelect
Aggregate returns a OrderItemSelect configured with the given aggregations.
func (*OrderItemQuery) All ¶
func (oiq *OrderItemQuery) All(ctx context.Context) ([]*OrderItem, error)
All executes the query and returns a list of OrderItems.
func (*OrderItemQuery) AllX ¶
func (oiq *OrderItemQuery) AllX(ctx context.Context) []*OrderItem
AllX is like All, but panics if an error occurs.
func (*OrderItemQuery) Clone ¶
func (oiq *OrderItemQuery) Clone() *OrderItemQuery
Clone returns a duplicate of the OrderItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OrderItemQuery) Count ¶
func (oiq *OrderItemQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OrderItemQuery) CountX ¶
func (oiq *OrderItemQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OrderItemQuery) Exist ¶
func (oiq *OrderItemQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OrderItemQuery) ExistX ¶
func (oiq *OrderItemQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OrderItemQuery) First ¶
func (oiq *OrderItemQuery) First(ctx context.Context) (*OrderItem, error)
First returns the first OrderItem entity from the query. Returns a *NotFoundError when no OrderItem was found.
func (*OrderItemQuery) FirstID ¶
FirstID returns the first OrderItem ID from the query. Returns a *NotFoundError when no OrderItem ID was found.
func (*OrderItemQuery) FirstIDX ¶
func (oiq *OrderItemQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*OrderItemQuery) FirstX ¶
func (oiq *OrderItemQuery) FirstX(ctx context.Context) *OrderItem
FirstX is like First, but panics if an error occurs.
func (*OrderItemQuery) GroupBy ¶
func (oiq *OrderItemQuery) GroupBy(field string, fields ...string) *OrderItemGroupBy
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.OrderItem.Query(). GroupBy(orderitem.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrderItemQuery) IDsX ¶
func (oiq *OrderItemQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*OrderItemQuery) Limit ¶
func (oiq *OrderItemQuery) Limit(limit int) *OrderItemQuery
Limit the number of records to be returned by this query.
func (*OrderItemQuery) Offset ¶
func (oiq *OrderItemQuery) Offset(offset int) *OrderItemQuery
Offset to start from.
func (*OrderItemQuery) Only ¶
func (oiq *OrderItemQuery) Only(ctx context.Context) (*OrderItem, error)
Only returns a single OrderItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrderItem entity is found. Returns a *NotFoundError when no OrderItem entities are found.
func (*OrderItemQuery) OnlyID ¶
OnlyID is like Only, but returns the only OrderItem ID in the query. Returns a *NotSingularError when more than one OrderItem ID is found. Returns a *NotFoundError when no entities are found.
func (*OrderItemQuery) OnlyIDX ¶
func (oiq *OrderItemQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OrderItemQuery) OnlyX ¶
func (oiq *OrderItemQuery) OnlyX(ctx context.Context) *OrderItem
OnlyX is like Only, but panics if an error occurs.
func (*OrderItemQuery) Order ¶
func (oiq *OrderItemQuery) Order(o ...orderitem.OrderOption) *OrderItemQuery
Order specifies how the records should be ordered.
func (*OrderItemQuery) QueryDestinationWorkUnit ¶
func (oiq *OrderItemQuery) QueryDestinationWorkUnit() *WorkUnitInfoQuery
QueryDestinationWorkUnit chains the current query on the "destination_work_unit" edge.
func (*OrderItemQuery) QueryOrder ¶
func (oiq *OrderItemQuery) QueryOrder() *OrderQuery
QueryOrder chains the current query on the "order" edge.
func (*OrderItemQuery) QueryProduct ¶
func (oiq *OrderItemQuery) QueryProduct() *ProductInfoQuery
QueryProduct chains the current query on the "product" edge.
func (*OrderItemQuery) QueryProductColor ¶
func (oiq *OrderItemQuery) QueryProductColor() *ProductColorQuery
QueryProductColor chains the current query on the "product_color" edge.
func (*OrderItemQuery) QuerySourceWorkUnit ¶
func (oiq *OrderItemQuery) QuerySourceWorkUnit() *WorkUnitInfoQuery
QuerySourceWorkUnit chains the current query on the "source_work_unit" edge.
func (*OrderItemQuery) Select ¶
func (oiq *OrderItemQuery) Select(fields ...string) *OrderItemSelect
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.OrderItem.Query(). Select(orderitem.FieldCreatedAt). Scan(ctx, &v)
func (*OrderItemQuery) Unique ¶
func (oiq *OrderItemQuery) Unique(unique bool) *OrderItemQuery
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 (*OrderItemQuery) Where ¶
func (oiq *OrderItemQuery) Where(ps ...predicate.OrderItem) *OrderItemQuery
Where adds a new predicate for the OrderItemQuery builder.
func (*OrderItemQuery) WithDestinationWorkUnit ¶
func (oiq *OrderItemQuery) WithDestinationWorkUnit(opts ...func(*WorkUnitInfoQuery)) *OrderItemQuery
WithDestinationWorkUnit tells the query-builder to eager-load the nodes that are connected to the "destination_work_unit" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderItemQuery) WithOrder ¶
func (oiq *OrderItemQuery) WithOrder(opts ...func(*OrderQuery)) *OrderItemQuery
WithOrder tells the query-builder to eager-load the nodes that are connected to the "order" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderItemQuery) WithProduct ¶
func (oiq *OrderItemQuery) WithProduct(opts ...func(*ProductInfoQuery)) *OrderItemQuery
WithProduct tells the query-builder to eager-load the nodes that are connected to the "product" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderItemQuery) WithProductColor ¶
func (oiq *OrderItemQuery) WithProductColor(opts ...func(*ProductColorQuery)) *OrderItemQuery
WithProductColor tells the query-builder to eager-load the nodes that are connected to the "product_color" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderItemQuery) WithSourceWorkUnit ¶
func (oiq *OrderItemQuery) WithSourceWorkUnit(opts ...func(*WorkUnitInfoQuery)) *OrderItemQuery
WithSourceWorkUnit tells the query-builder to eager-load the nodes that are connected to the "source_work_unit" edge. The optional arguments are used to configure the query builder of the edge.
type OrderItemSelect ¶
type OrderItemSelect struct { *OrderItemQuery // contains filtered or unexported fields }
OrderItemSelect is the builder for selecting fields of OrderItem entities.
func (*OrderItemSelect) Aggregate ¶
func (ois *OrderItemSelect) Aggregate(fns ...AggregateFunc) *OrderItemSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OrderItemSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderItemSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderItemSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderItemSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderItemSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderItemSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderItemSelect) Scan ¶
func (ois *OrderItemSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderItemSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderItemUpdate ¶
type OrderItemUpdate struct {
// contains filtered or unexported fields
}
OrderItemUpdate is the builder for updating OrderItem entities.
func (*OrderItemUpdate) AddPricePerUnit ¶
func (oiu *OrderItemUpdate) AddPricePerUnit(d decimal.Decimal) *OrderItemUpdate
AddPricePerUnit adds d to the "price_per_unit" field.
func (*OrderItemUpdate) AddQty ¶
func (oiu *OrderItemUpdate) AddQty(d decimal.Decimal) *OrderItemUpdate
AddQty adds d to the "qty" field.
func (*OrderItemUpdate) ClearDestinationWorkUnit ¶
func (oiu *OrderItemUpdate) ClearDestinationWorkUnit() *OrderItemUpdate
ClearDestinationWorkUnit clears the "destination_work_unit" edge to the WorkUnitInfo entity.
func (*OrderItemUpdate) ClearDstUnitID ¶
func (oiu *OrderItemUpdate) ClearDstUnitID() *OrderItemUpdate
ClearDstUnitID clears the value of the "dst_unit_id" field.
func (*OrderItemUpdate) ClearSourceWorkUnit ¶
func (oiu *OrderItemUpdate) ClearSourceWorkUnit() *OrderItemUpdate
ClearSourceWorkUnit clears the "source_work_unit" edge to the WorkUnitInfo entity.
func (*OrderItemUpdate) ClearSrcUnitID ¶
func (oiu *OrderItemUpdate) ClearSrcUnitID() *OrderItemUpdate
ClearSrcUnitID clears the value of the "src_unit_id" field.
func (*OrderItemUpdate) Exec ¶
func (oiu *OrderItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderItemUpdate) ExecX ¶
func (oiu *OrderItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderItemUpdate) Mutation ¶
func (oiu *OrderItemUpdate) Mutation() *OrderItemMutation
Mutation returns the OrderItemMutation object of the builder.
func (*OrderItemUpdate) Save ¶
func (oiu *OrderItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrderItemUpdate) SaveX ¶
func (oiu *OrderItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrderItemUpdate) SetDestinationWorkUnit ¶
func (oiu *OrderItemUpdate) SetDestinationWorkUnit(w *WorkUnitInfo) *OrderItemUpdate
SetDestinationWorkUnit sets the "destination_work_unit" edge to the WorkUnitInfo entity.
func (*OrderItemUpdate) SetDestinationWorkUnitID ¶
func (oiu *OrderItemUpdate) SetDestinationWorkUnitID(id uuid.UUID) *OrderItemUpdate
SetDestinationWorkUnitID sets the "destination_work_unit" edge to the WorkUnitInfo entity by ID.
func (*OrderItemUpdate) SetDstUnitID ¶
func (oiu *OrderItemUpdate) SetDstUnitID(u uuid.UUID) *OrderItemUpdate
SetDstUnitID sets the "dst_unit_id" field.
func (*OrderItemUpdate) SetNillableDestinationWorkUnitID ¶
func (oiu *OrderItemUpdate) SetNillableDestinationWorkUnitID(id *uuid.UUID) *OrderItemUpdate
SetNillableDestinationWorkUnitID sets the "destination_work_unit" edge to the WorkUnitInfo entity by ID if the given value is not nil.
func (*OrderItemUpdate) SetNillableDstUnitID ¶
func (oiu *OrderItemUpdate) SetNillableDstUnitID(u *uuid.UUID) *OrderItemUpdate
SetNillableDstUnitID sets the "dst_unit_id" field if the given value is not nil.
func (*OrderItemUpdate) SetNillablePricePerUnit ¶
func (oiu *OrderItemUpdate) SetNillablePricePerUnit(d *decimal.Decimal) *OrderItemUpdate
SetNillablePricePerUnit sets the "price_per_unit" field if the given value is not nil.
func (*OrderItemUpdate) SetNillableQty ¶
func (oiu *OrderItemUpdate) SetNillableQty(d *decimal.Decimal) *OrderItemUpdate
SetNillableQty sets the "qty" field if the given value is not nil.
func (*OrderItemUpdate) SetNillableSourceWorkUnitID ¶
func (oiu *OrderItemUpdate) SetNillableSourceWorkUnitID(id *uuid.UUID) *OrderItemUpdate
SetNillableSourceWorkUnitID sets the "source_work_unit" edge to the WorkUnitInfo entity by ID if the given value is not nil.
func (*OrderItemUpdate) SetNillableSrcUnitID ¶
func (oiu *OrderItemUpdate) SetNillableSrcUnitID(u *uuid.UUID) *OrderItemUpdate
SetNillableSrcUnitID sets the "src_unit_id" field if the given value is not nil.
func (*OrderItemUpdate) SetNillableStatus ¶
func (oiu *OrderItemUpdate) SetNillableStatus(o *orderitem.Status) *OrderItemUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*OrderItemUpdate) SetPricePerUnit ¶
func (oiu *OrderItemUpdate) SetPricePerUnit(d decimal.Decimal) *OrderItemUpdate
SetPricePerUnit sets the "price_per_unit" field.
func (*OrderItemUpdate) SetQty ¶
func (oiu *OrderItemUpdate) SetQty(d decimal.Decimal) *OrderItemUpdate
SetQty sets the "qty" field.
func (*OrderItemUpdate) SetSourceWorkUnit ¶
func (oiu *OrderItemUpdate) SetSourceWorkUnit(w *WorkUnitInfo) *OrderItemUpdate
SetSourceWorkUnit sets the "source_work_unit" edge to the WorkUnitInfo entity.
func (*OrderItemUpdate) SetSourceWorkUnitID ¶
func (oiu *OrderItemUpdate) SetSourceWorkUnitID(id uuid.UUID) *OrderItemUpdate
SetSourceWorkUnitID sets the "source_work_unit" edge to the WorkUnitInfo entity by ID.
func (*OrderItemUpdate) SetSrcUnitID ¶
func (oiu *OrderItemUpdate) SetSrcUnitID(u uuid.UUID) *OrderItemUpdate
SetSrcUnitID sets the "src_unit_id" field.
func (*OrderItemUpdate) SetStatus ¶
func (oiu *OrderItemUpdate) SetStatus(o orderitem.Status) *OrderItemUpdate
SetStatus sets the "status" field.
func (*OrderItemUpdate) SetUpdatedAt ¶
func (oiu *OrderItemUpdate) SetUpdatedAt(t time.Time) *OrderItemUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OrderItemUpdate) Where ¶
func (oiu *OrderItemUpdate) Where(ps ...predicate.OrderItem) *OrderItemUpdate
Where appends a list predicates to the OrderItemUpdate builder.
type OrderItemUpdateOne ¶
type OrderItemUpdateOne struct {
// contains filtered or unexported fields
}
OrderItemUpdateOne is the builder for updating a single OrderItem entity.
func (*OrderItemUpdateOne) AddPricePerUnit ¶
func (oiuo *OrderItemUpdateOne) AddPricePerUnit(d decimal.Decimal) *OrderItemUpdateOne
AddPricePerUnit adds d to the "price_per_unit" field.
func (*OrderItemUpdateOne) AddQty ¶
func (oiuo *OrderItemUpdateOne) AddQty(d decimal.Decimal) *OrderItemUpdateOne
AddQty adds d to the "qty" field.
func (*OrderItemUpdateOne) ClearDestinationWorkUnit ¶
func (oiuo *OrderItemUpdateOne) ClearDestinationWorkUnit() *OrderItemUpdateOne
ClearDestinationWorkUnit clears the "destination_work_unit" edge to the WorkUnitInfo entity.
func (*OrderItemUpdateOne) ClearDstUnitID ¶
func (oiuo *OrderItemUpdateOne) ClearDstUnitID() *OrderItemUpdateOne
ClearDstUnitID clears the value of the "dst_unit_id" field.
func (*OrderItemUpdateOne) ClearSourceWorkUnit ¶
func (oiuo *OrderItemUpdateOne) ClearSourceWorkUnit() *OrderItemUpdateOne
ClearSourceWorkUnit clears the "source_work_unit" edge to the WorkUnitInfo entity.
func (*OrderItemUpdateOne) ClearSrcUnitID ¶
func (oiuo *OrderItemUpdateOne) ClearSrcUnitID() *OrderItemUpdateOne
ClearSrcUnitID clears the value of the "src_unit_id" field.
func (*OrderItemUpdateOne) Exec ¶
func (oiuo *OrderItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrderItemUpdateOne) ExecX ¶
func (oiuo *OrderItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderItemUpdateOne) Mutation ¶
func (oiuo *OrderItemUpdateOne) Mutation() *OrderItemMutation
Mutation returns the OrderItemMutation object of the builder.
func (*OrderItemUpdateOne) Save ¶
func (oiuo *OrderItemUpdateOne) Save(ctx context.Context) (*OrderItem, error)
Save executes the query and returns the updated OrderItem entity.
func (*OrderItemUpdateOne) SaveX ¶
func (oiuo *OrderItemUpdateOne) SaveX(ctx context.Context) *OrderItem
SaveX is like Save, but panics if an error occurs.
func (*OrderItemUpdateOne) Select ¶
func (oiuo *OrderItemUpdateOne) Select(field string, fields ...string) *OrderItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrderItemUpdateOne) SetDestinationWorkUnit ¶
func (oiuo *OrderItemUpdateOne) SetDestinationWorkUnit(w *WorkUnitInfo) *OrderItemUpdateOne
SetDestinationWorkUnit sets the "destination_work_unit" edge to the WorkUnitInfo entity.
func (*OrderItemUpdateOne) SetDestinationWorkUnitID ¶
func (oiuo *OrderItemUpdateOne) SetDestinationWorkUnitID(id uuid.UUID) *OrderItemUpdateOne
SetDestinationWorkUnitID sets the "destination_work_unit" edge to the WorkUnitInfo entity by ID.
func (*OrderItemUpdateOne) SetDstUnitID ¶
func (oiuo *OrderItemUpdateOne) SetDstUnitID(u uuid.UUID) *OrderItemUpdateOne
SetDstUnitID sets the "dst_unit_id" field.
func (*OrderItemUpdateOne) SetNillableDestinationWorkUnitID ¶
func (oiuo *OrderItemUpdateOne) SetNillableDestinationWorkUnitID(id *uuid.UUID) *OrderItemUpdateOne
SetNillableDestinationWorkUnitID sets the "destination_work_unit" edge to the WorkUnitInfo entity by ID if the given value is not nil.
func (*OrderItemUpdateOne) SetNillableDstUnitID ¶
func (oiuo *OrderItemUpdateOne) SetNillableDstUnitID(u *uuid.UUID) *OrderItemUpdateOne
SetNillableDstUnitID sets the "dst_unit_id" field if the given value is not nil.
func (*OrderItemUpdateOne) SetNillablePricePerUnit ¶
func (oiuo *OrderItemUpdateOne) SetNillablePricePerUnit(d *decimal.Decimal) *OrderItemUpdateOne
SetNillablePricePerUnit sets the "price_per_unit" field if the given value is not nil.
func (*OrderItemUpdateOne) SetNillableQty ¶
func (oiuo *OrderItemUpdateOne) SetNillableQty(d *decimal.Decimal) *OrderItemUpdateOne
SetNillableQty sets the "qty" field if the given value is not nil.
func (*OrderItemUpdateOne) SetNillableSourceWorkUnitID ¶
func (oiuo *OrderItemUpdateOne) SetNillableSourceWorkUnitID(id *uuid.UUID) *OrderItemUpdateOne
SetNillableSourceWorkUnitID sets the "source_work_unit" edge to the WorkUnitInfo entity by ID if the given value is not nil.
func (*OrderItemUpdateOne) SetNillableSrcUnitID ¶
func (oiuo *OrderItemUpdateOne) SetNillableSrcUnitID(u *uuid.UUID) *OrderItemUpdateOne
SetNillableSrcUnitID sets the "src_unit_id" field if the given value is not nil.
func (*OrderItemUpdateOne) SetNillableStatus ¶
func (oiuo *OrderItemUpdateOne) SetNillableStatus(o *orderitem.Status) *OrderItemUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*OrderItemUpdateOne) SetPricePerUnit ¶
func (oiuo *OrderItemUpdateOne) SetPricePerUnit(d decimal.Decimal) *OrderItemUpdateOne
SetPricePerUnit sets the "price_per_unit" field.
func (*OrderItemUpdateOne) SetQty ¶
func (oiuo *OrderItemUpdateOne) SetQty(d decimal.Decimal) *OrderItemUpdateOne
SetQty sets the "qty" field.
func (*OrderItemUpdateOne) SetSourceWorkUnit ¶
func (oiuo *OrderItemUpdateOne) SetSourceWorkUnit(w *WorkUnitInfo) *OrderItemUpdateOne
SetSourceWorkUnit sets the "source_work_unit" edge to the WorkUnitInfo entity.
func (*OrderItemUpdateOne) SetSourceWorkUnitID ¶
func (oiuo *OrderItemUpdateOne) SetSourceWorkUnitID(id uuid.UUID) *OrderItemUpdateOne
SetSourceWorkUnitID sets the "source_work_unit" edge to the WorkUnitInfo entity by ID.
func (*OrderItemUpdateOne) SetSrcUnitID ¶
func (oiuo *OrderItemUpdateOne) SetSrcUnitID(u uuid.UUID) *OrderItemUpdateOne
SetSrcUnitID sets the "src_unit_id" field.
func (*OrderItemUpdateOne) SetStatus ¶
func (oiuo *OrderItemUpdateOne) SetStatus(o orderitem.Status) *OrderItemUpdateOne
SetStatus sets the "status" field.
func (*OrderItemUpdateOne) SetUpdatedAt ¶
func (oiuo *OrderItemUpdateOne) SetUpdatedAt(t time.Time) *OrderItemUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OrderItemUpdateOne) Where ¶
func (oiuo *OrderItemUpdateOne) Where(ps ...predicate.OrderItem) *OrderItemUpdateOne
Where appends a list predicates to the OrderItemUpdate builder.
type OrderMutation ¶
type OrderMutation struct {
// contains filtered or unexported fields
}
OrderMutation represents an operation that mutates the Order nodes in the graph.
func (*OrderMutation) AddField ¶
func (m *OrderMutation) 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 (*OrderMutation) AddPriority ¶
func (m *OrderMutation) AddPriority(i int)
AddPriority adds i to the "priority" field.
func (*OrderMutation) AddedEdges ¶
func (m *OrderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrderMutation) AddedField ¶
func (m *OrderMutation) 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 (*OrderMutation) AddedFields ¶
func (m *OrderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrderMutation) AddedIDs ¶
func (m *OrderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OrderMutation) AddedPriority ¶
func (m *OrderMutation) AddedPriority() (r int, exists bool)
AddedPriority returns the value that was added to the "priority" field in this mutation.
func (*OrderMutation) AddressID ¶
func (m *OrderMutation) AddressID() (r uuid.UUID, exists bool)
AddressID returns the value of the "address_id" field in the mutation.
func (*OrderMutation) ClearCreator ¶
func (m *OrderMutation) ClearCreator()
ClearCreator clears the "creator" edge to the Person entity.
func (*OrderMutation) ClearCustomer ¶
func (m *OrderMutation) ClearCustomer()
ClearCustomer clears the "customer" edge to the Person entity.
func (*OrderMutation) ClearEdge ¶
func (m *OrderMutation) 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 (*OrderMutation) ClearField ¶
func (m *OrderMutation) 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 (*OrderMutation) ClearInternalNote ¶
func (m *OrderMutation) ClearInternalNote()
ClearInternalNote clears the value of the "internal_note" field.
func (*OrderMutation) ClearNote ¶
func (m *OrderMutation) ClearNote()
ClearNote clears the value of the "note" field.
func (*OrderMutation) ClearOrderAddress ¶
func (m *OrderMutation) ClearOrderAddress()
ClearOrderAddress clears the "order_address" edge to the Address entity.
func (*OrderMutation) ClearOrderStatus ¶
func (m *OrderMutation) ClearOrderStatus()
ClearOrderStatus clears the "order_status" edge to the OrderStatusCode entity.
func (*OrderMutation) ClearParentOrder ¶
func (m *OrderMutation) ClearParentOrder()
ClearParentOrder clears the "parent_order" edge to the Order entity.
func (*OrderMutation) ClearParentOrderID ¶
func (m *OrderMutation) ClearParentOrderID()
ClearParentOrderID clears the value of the "parent_order_id" field.
func (*OrderMutation) ClearStaff ¶
func (m *OrderMutation) ClearStaff()
ClearStaff clears the "staff" edge to the Person entity.
func (*OrderMutation) ClearStaffID ¶
func (m *OrderMutation) ClearStaffID()
ClearStaffID clears the value of the "staff_id" field.
func (*OrderMutation) ClearedEdges ¶
func (m *OrderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrderMutation) ClearedFields ¶
func (m *OrderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrderMutation) Client ¶
func (m OrderMutation) 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 (*OrderMutation) CreatedAt ¶
func (m *OrderMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OrderMutation) CreatedBy ¶
func (m *OrderMutation) CreatedBy() (r uuid.UUID, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*OrderMutation) CreatorCleared ¶
func (m *OrderMutation) CreatorCleared() bool
CreatorCleared reports if the "creator" edge to the Person entity was cleared.
func (*OrderMutation) CreatorID ¶
func (m *OrderMutation) CreatorID() (id uuid.UUID, exists bool)
CreatorID returns the "creator" edge ID in the mutation.
func (*OrderMutation) CreatorIDs ¶
func (m *OrderMutation) CreatorIDs() (ids []uuid.UUID)
CreatorIDs returns the "creator" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CreatorID instead. It exists only for internal usage by the builders.
func (*OrderMutation) CustomerCleared ¶
func (m *OrderMutation) CustomerCleared() bool
CustomerCleared reports if the "customer" edge to the Person entity was cleared.
func (*OrderMutation) CustomerID ¶
func (m *OrderMutation) CustomerID() (r uuid.UUID, exists bool)
CustomerID returns the value of the "customer_id" field in the mutation.
func (*OrderMutation) CustomerIDs ¶
func (m *OrderMutation) CustomerIDs() (ids []uuid.UUID)
CustomerIDs returns the "customer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CustomerID instead. It exists only for internal usage by the builders.
func (*OrderMutation) EdgeCleared ¶
func (m *OrderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OrderMutation) Field ¶
func (m *OrderMutation) 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 (*OrderMutation) FieldCleared ¶
func (m *OrderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OrderMutation) Fields ¶
func (m *OrderMutation) 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 (*OrderMutation) GetType ¶
func (m *OrderMutation) GetType() (r order.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*OrderMutation) ID ¶
func (m *OrderMutation) ID() (id uuid.UUID, 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 (*OrderMutation) IDs ¶
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 (*OrderMutation) InternalNote ¶
func (m *OrderMutation) InternalNote() (r string, exists bool)
InternalNote returns the value of the "internal_note" field in the mutation.
func (*OrderMutation) InternalNoteCleared ¶
func (m *OrderMutation) InternalNoteCleared() bool
InternalNoteCleared returns if the "internal_note" field was cleared in this mutation.
func (*OrderMutation) IsInternal ¶
func (m *OrderMutation) IsInternal() (r bool, exists bool)
IsInternal returns the value of the "is_internal" field in the mutation.
func (*OrderMutation) Note ¶
func (m *OrderMutation) Note() (r string, exists bool)
Note returns the value of the "note" field in the mutation.
func (*OrderMutation) NoteCleared ¶
func (m *OrderMutation) NoteCleared() bool
NoteCleared returns if the "note" field was cleared in this mutation.
func (*OrderMutation) OldAddressID ¶
OldAddressID returns the old "address_id" field's value of the Order entity. If the Order 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 (*OrderMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Order entity. If the Order 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 (*OrderMutation) OldCreatedBy ¶
OldCreatedBy returns the old "created_by" field's value of the Order entity. If the Order 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 (*OrderMutation) OldCustomerID ¶
OldCustomerID returns the old "customer_id" field's value of the Order entity. If the Order 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 (*OrderMutation) 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 (*OrderMutation) OldInternalNote ¶
func (m *OrderMutation) OldInternalNote(ctx context.Context) (v *string, err error)
OldInternalNote returns the old "internal_note" field's value of the Order entity. If the Order 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 (*OrderMutation) OldIsInternal ¶
func (m *OrderMutation) OldIsInternal(ctx context.Context) (v *bool, err error)
OldIsInternal returns the old "is_internal" field's value of the Order entity. If the Order 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 (*OrderMutation) OldNote ¶
func (m *OrderMutation) OldNote(ctx context.Context) (v *string, err error)
OldNote returns the old "note" field's value of the Order entity. If the Order 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 (*OrderMutation) OldParentOrderID ¶
OldParentOrderID returns the old "parent_order_id" field's value of the Order entity. If the Order 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 (*OrderMutation) OldPriority ¶
func (m *OrderMutation) OldPriority(ctx context.Context) (v *int, err error)
OldPriority returns the old "priority" field's value of the Order entity. If the Order 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 (*OrderMutation) OldStaffID ¶
OldStaffID returns the old "staff_id" field's value of the Order entity. If the Order 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 (*OrderMutation) OldStatusCode ¶
func (m *OrderMutation) OldStatusCode(ctx context.Context) (v int, err error)
OldStatusCode returns the old "status_code" field's value of the Order entity. If the Order 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 (*OrderMutation) OldType ¶
OldType returns the old "type" field's value of the Order entity. If the Order 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 (*OrderMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Order entity. If the Order 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 (*OrderMutation) OrderAddressCleared ¶
func (m *OrderMutation) OrderAddressCleared() bool
OrderAddressCleared reports if the "order_address" edge to the Address entity was cleared.
func (*OrderMutation) OrderAddressID ¶
func (m *OrderMutation) OrderAddressID() (id uuid.UUID, exists bool)
OrderAddressID returns the "order_address" edge ID in the mutation.
func (*OrderMutation) OrderAddressIDs ¶
func (m *OrderMutation) OrderAddressIDs() (ids []uuid.UUID)
OrderAddressIDs returns the "order_address" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrderAddressID instead. It exists only for internal usage by the builders.
func (*OrderMutation) OrderStatusCleared ¶
func (m *OrderMutation) OrderStatusCleared() bool
OrderStatusCleared reports if the "order_status" edge to the OrderStatusCode entity was cleared.
func (*OrderMutation) OrderStatusID ¶
func (m *OrderMutation) OrderStatusID() (id int, exists bool)
OrderStatusID returns the "order_status" edge ID in the mutation.
func (*OrderMutation) OrderStatusIDs ¶
func (m *OrderMutation) OrderStatusIDs() (ids []int)
OrderStatusIDs returns the "order_status" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrderStatusID instead. It exists only for internal usage by the builders.
func (*OrderMutation) ParentOrderCleared ¶
func (m *OrderMutation) ParentOrderCleared() bool
ParentOrderCleared reports if the "parent_order" edge to the Order entity was cleared.
func (*OrderMutation) ParentOrderID ¶
func (m *OrderMutation) ParentOrderID() (r uuid.UUID, exists bool)
ParentOrderID returns the value of the "parent_order_id" field in the mutation.
func (*OrderMutation) ParentOrderIDCleared ¶
func (m *OrderMutation) ParentOrderIDCleared() bool
ParentOrderIDCleared returns if the "parent_order_id" field was cleared in this mutation.
func (*OrderMutation) ParentOrderIDs ¶
func (m *OrderMutation) ParentOrderIDs() (ids []uuid.UUID)
ParentOrderIDs returns the "parent_order" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentOrderID instead. It exists only for internal usage by the builders.
func (*OrderMutation) Priority ¶
func (m *OrderMutation) Priority() (r int, exists bool)
Priority returns the value of the "priority" field in the mutation.
func (*OrderMutation) RemovedEdges ¶
func (m *OrderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrderMutation) RemovedIDs ¶
func (m *OrderMutation) 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 (*OrderMutation) ResetAddressID ¶
func (m *OrderMutation) ResetAddressID()
ResetAddressID resets all changes to the "address_id" field.
func (*OrderMutation) ResetCreatedAt ¶
func (m *OrderMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OrderMutation) ResetCreatedBy ¶
func (m *OrderMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*OrderMutation) ResetCreator ¶
func (m *OrderMutation) ResetCreator()
ResetCreator resets all changes to the "creator" edge.
func (*OrderMutation) ResetCustomer ¶
func (m *OrderMutation) ResetCustomer()
ResetCustomer resets all changes to the "customer" edge.
func (*OrderMutation) ResetCustomerID ¶
func (m *OrderMutation) ResetCustomerID()
ResetCustomerID resets all changes to the "customer_id" field.
func (*OrderMutation) ResetEdge ¶
func (m *OrderMutation) 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 (*OrderMutation) ResetField ¶
func (m *OrderMutation) 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 (*OrderMutation) ResetInternalNote ¶
func (m *OrderMutation) ResetInternalNote()
ResetInternalNote resets all changes to the "internal_note" field.
func (*OrderMutation) ResetIsInternal ¶
func (m *OrderMutation) ResetIsInternal()
ResetIsInternal resets all changes to the "is_internal" field.
func (*OrderMutation) ResetNote ¶
func (m *OrderMutation) ResetNote()
ResetNote resets all changes to the "note" field.
func (*OrderMutation) ResetOrderAddress ¶
func (m *OrderMutation) ResetOrderAddress()
ResetOrderAddress resets all changes to the "order_address" edge.
func (*OrderMutation) ResetOrderStatus ¶
func (m *OrderMutation) ResetOrderStatus()
ResetOrderStatus resets all changes to the "order_status" edge.
func (*OrderMutation) ResetParentOrder ¶
func (m *OrderMutation) ResetParentOrder()
ResetParentOrder resets all changes to the "parent_order" edge.
func (*OrderMutation) ResetParentOrderID ¶
func (m *OrderMutation) ResetParentOrderID()
ResetParentOrderID resets all changes to the "parent_order_id" field.
func (*OrderMutation) ResetPriority ¶
func (m *OrderMutation) ResetPriority()
ResetPriority resets all changes to the "priority" field.
func (*OrderMutation) ResetStaff ¶
func (m *OrderMutation) ResetStaff()
ResetStaff resets all changes to the "staff" edge.
func (*OrderMutation) ResetStaffID ¶
func (m *OrderMutation) ResetStaffID()
ResetStaffID resets all changes to the "staff_id" field.
func (*OrderMutation) ResetStatusCode ¶
func (m *OrderMutation) ResetStatusCode()
ResetStatusCode resets all changes to the "status_code" field.
func (*OrderMutation) ResetType ¶
func (m *OrderMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*OrderMutation) ResetUpdatedAt ¶
func (m *OrderMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OrderMutation) SetAddressID ¶
func (m *OrderMutation) SetAddressID(u uuid.UUID)
SetAddressID sets the "address_id" field.
func (*OrderMutation) SetCreatedAt ¶
func (m *OrderMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OrderMutation) SetCreatedBy ¶
func (m *OrderMutation) SetCreatedBy(u uuid.UUID)
SetCreatedBy sets the "created_by" field.
func (*OrderMutation) SetCreatorID ¶
func (m *OrderMutation) SetCreatorID(id uuid.UUID)
SetCreatorID sets the "creator" edge to the Person entity by id.
func (*OrderMutation) SetCustomerID ¶
func (m *OrderMutation) SetCustomerID(u uuid.UUID)
SetCustomerID sets the "customer_id" field.
func (*OrderMutation) SetField ¶
func (m *OrderMutation) 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 (*OrderMutation) SetID ¶
func (m *OrderMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Order entities.
func (*OrderMutation) SetInternalNote ¶
func (m *OrderMutation) SetInternalNote(s string)
SetInternalNote sets the "internal_note" field.
func (*OrderMutation) SetIsInternal ¶
func (m *OrderMutation) SetIsInternal(b bool)
SetIsInternal sets the "is_internal" field.
func (*OrderMutation) SetNote ¶
func (m *OrderMutation) SetNote(s string)
SetNote sets the "note" field.
func (*OrderMutation) SetOp ¶
func (m *OrderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OrderMutation) SetOrderAddressID ¶
func (m *OrderMutation) SetOrderAddressID(id uuid.UUID)
SetOrderAddressID sets the "order_address" edge to the Address entity by id.
func (*OrderMutation) SetOrderStatusID ¶
func (m *OrderMutation) SetOrderStatusID(id int)
SetOrderStatusID sets the "order_status" edge to the OrderStatusCode entity by id.
func (*OrderMutation) SetParentOrderID ¶
func (m *OrderMutation) SetParentOrderID(u uuid.UUID)
SetParentOrderID sets the "parent_order_id" field.
func (*OrderMutation) SetPriority ¶
func (m *OrderMutation) SetPriority(i int)
SetPriority sets the "priority" field.
func (*OrderMutation) SetStaffID ¶
func (m *OrderMutation) SetStaffID(u uuid.UUID)
SetStaffID sets the "staff_id" field.
func (*OrderMutation) SetStatusCode ¶
func (m *OrderMutation) SetStatusCode(i int)
SetStatusCode sets the "status_code" field.
func (*OrderMutation) SetType ¶
func (m *OrderMutation) SetType(o order.Type)
SetType sets the "type" field.
func (*OrderMutation) SetUpdatedAt ¶
func (m *OrderMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*OrderMutation) StaffCleared ¶
func (m *OrderMutation) StaffCleared() bool
StaffCleared reports if the "staff" edge to the Person entity was cleared.
func (*OrderMutation) StaffID ¶
func (m *OrderMutation) StaffID() (r uuid.UUID, exists bool)
StaffID returns the value of the "staff_id" field in the mutation.
func (*OrderMutation) StaffIDCleared ¶
func (m *OrderMutation) StaffIDCleared() bool
StaffIDCleared returns if the "staff_id" field was cleared in this mutation.
func (*OrderMutation) StaffIDs ¶
func (m *OrderMutation) StaffIDs() (ids []uuid.UUID)
StaffIDs returns the "staff" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StaffID instead. It exists only for internal usage by the builders.
func (*OrderMutation) StatusCode ¶
func (m *OrderMutation) StatusCode() (r int, exists bool)
StatusCode returns the value of the "status_code" field in the mutation.
func (OrderMutation) Tx ¶
func (m OrderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrderMutation) Type ¶
func (m *OrderMutation) Type() string
Type returns the node type of this mutation (Order).
func (*OrderMutation) UpdatedAt ¶
func (m *OrderMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OrderMutation) Where ¶
func (m *OrderMutation) Where(ps ...predicate.Order)
Where appends a list predicates to the OrderMutation builder.
func (*OrderMutation) WhereP ¶
func (m *OrderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OrderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OrderQuery ¶
type OrderQuery struct {
// contains filtered or unexported fields
}
OrderQuery is the builder for querying Order entities.
func (*OrderQuery) Aggregate ¶
func (oq *OrderQuery) Aggregate(fns ...AggregateFunc) *OrderSelect
Aggregate returns a OrderSelect configured with the given aggregations.
func (*OrderQuery) All ¶
func (oq *OrderQuery) All(ctx context.Context) ([]*Order, error)
All executes the query and returns a list of Orders.
func (*OrderQuery) AllX ¶
func (oq *OrderQuery) AllX(ctx context.Context) []*Order
AllX is like All, but panics if an error occurs.
func (*OrderQuery) Clone ¶
func (oq *OrderQuery) Clone() *OrderQuery
Clone returns a duplicate of the OrderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OrderQuery) Count ¶
func (oq *OrderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OrderQuery) CountX ¶
func (oq *OrderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OrderQuery) Exist ¶
func (oq *OrderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OrderQuery) ExistX ¶
func (oq *OrderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OrderQuery) First ¶
func (oq *OrderQuery) First(ctx context.Context) (*Order, error)
First returns the first Order entity from the query. Returns a *NotFoundError when no Order was found.
func (*OrderQuery) FirstID ¶
FirstID returns the first Order ID from the query. Returns a *NotFoundError when no Order ID was found.
func (*OrderQuery) FirstIDX ¶
func (oq *OrderQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*OrderQuery) FirstX ¶
func (oq *OrderQuery) FirstX(ctx context.Context) *Order
FirstX is like First, but panics if an error occurs.
func (*OrderQuery) GroupBy ¶
func (oq *OrderQuery) GroupBy(field string, fields ...string) *OrderGroupBy
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.Order.Query(). GroupBy(order.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrderQuery) IDsX ¶
func (oq *OrderQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*OrderQuery) Limit ¶
func (oq *OrderQuery) Limit(limit int) *OrderQuery
Limit the number of records to be returned by this query.
func (*OrderQuery) Offset ¶
func (oq *OrderQuery) Offset(offset int) *OrderQuery
Offset to start from.
func (*OrderQuery) Only ¶
func (oq *OrderQuery) Only(ctx context.Context) (*Order, error)
Only returns a single Order entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Order entity is found. Returns a *NotFoundError when no Order entities are found.
func (*OrderQuery) OnlyID ¶
OnlyID is like Only, but returns the only Order ID in the query. Returns a *NotSingularError when more than one Order ID is found. Returns a *NotFoundError when no entities are found.
func (*OrderQuery) OnlyIDX ¶
func (oq *OrderQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OrderQuery) OnlyX ¶
func (oq *OrderQuery) OnlyX(ctx context.Context) *Order
OnlyX is like Only, but panics if an error occurs.
func (*OrderQuery) Order ¶
func (oq *OrderQuery) Order(o ...order.OrderOption) *OrderQuery
Order specifies how the records should be ordered.
func (*OrderQuery) QueryCreator ¶
func (oq *OrderQuery) QueryCreator() *PersonQuery
QueryCreator chains the current query on the "creator" edge.
func (*OrderQuery) QueryCustomer ¶
func (oq *OrderQuery) QueryCustomer() *PersonQuery
QueryCustomer chains the current query on the "customer" edge.
func (*OrderQuery) QueryOrderAddress ¶
func (oq *OrderQuery) QueryOrderAddress() *AddressQuery
QueryOrderAddress chains the current query on the "order_address" edge.
func (*OrderQuery) QueryOrderStatus ¶
func (oq *OrderQuery) QueryOrderStatus() *OrderStatusCodeQuery
QueryOrderStatus chains the current query on the "order_status" edge.
func (*OrderQuery) QueryParentOrder ¶
func (oq *OrderQuery) QueryParentOrder() *OrderQuery
QueryParentOrder chains the current query on the "parent_order" edge.
func (*OrderQuery) QueryStaff ¶
func (oq *OrderQuery) QueryStaff() *PersonQuery
QueryStaff chains the current query on the "staff" edge.
func (*OrderQuery) Select ¶
func (oq *OrderQuery) Select(fields ...string) *OrderSelect
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.Order.Query(). Select(order.FieldCreatedAt). Scan(ctx, &v)
func (*OrderQuery) Unique ¶
func (oq *OrderQuery) Unique(unique bool) *OrderQuery
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 (*OrderQuery) Where ¶
func (oq *OrderQuery) Where(ps ...predicate.Order) *OrderQuery
Where adds a new predicate for the OrderQuery builder.
func (*OrderQuery) WithCreator ¶
func (oq *OrderQuery) WithCreator(opts ...func(*PersonQuery)) *OrderQuery
WithCreator tells the query-builder to eager-load the nodes that are connected to the "creator" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithCustomer ¶
func (oq *OrderQuery) WithCustomer(opts ...func(*PersonQuery)) *OrderQuery
WithCustomer tells the query-builder to eager-load the nodes that are connected to the "customer" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithOrderAddress ¶
func (oq *OrderQuery) WithOrderAddress(opts ...func(*AddressQuery)) *OrderQuery
WithOrderAddress tells the query-builder to eager-load the nodes that are connected to the "order_address" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithOrderStatus ¶
func (oq *OrderQuery) WithOrderStatus(opts ...func(*OrderStatusCodeQuery)) *OrderQuery
WithOrderStatus tells the query-builder to eager-load the nodes that are connected to the "order_status" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithParentOrder ¶
func (oq *OrderQuery) WithParentOrder(opts ...func(*OrderQuery)) *OrderQuery
WithParentOrder tells the query-builder to eager-load the nodes that are connected to the "parent_order" edge. The optional arguments are used to configure the query builder of the edge.
func (*OrderQuery) WithStaff ¶
func (oq *OrderQuery) WithStaff(opts ...func(*PersonQuery)) *OrderQuery
WithStaff tells the query-builder to eager-load the nodes that are connected to the "staff" edge. The optional arguments are used to configure the query builder of the edge.
type OrderSelect ¶
type OrderSelect struct { *OrderQuery // contains filtered or unexported fields }
OrderSelect is the builder for selecting fields of Order entities.
func (*OrderSelect) Aggregate ¶
func (os *OrderSelect) Aggregate(fns ...AggregateFunc) *OrderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OrderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Scan ¶
func (os *OrderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderStatusCode ¶
type OrderStatusCode struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // OrderStatus holds the value of the "order_status" field. OrderStatus string `json:"order_status,omitempty"` // contains filtered or unexported fields }
OrderStatusCode is the model entity for the OrderStatusCode schema.
func (*OrderStatusCode) String ¶
func (osc *OrderStatusCode) String() string
String implements the fmt.Stringer.
func (*OrderStatusCode) Unwrap ¶
func (osc *OrderStatusCode) Unwrap() *OrderStatusCode
Unwrap unwraps the OrderStatusCode 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 (*OrderStatusCode) Update ¶
func (osc *OrderStatusCode) Update() *OrderStatusCodeUpdateOne
Update returns a builder for updating this OrderStatusCode. Note that you need to call OrderStatusCode.Unwrap() before calling this method if this OrderStatusCode was returned from a transaction, and the transaction was committed or rolled back.
type OrderStatusCodeClient ¶
type OrderStatusCodeClient struct {
// contains filtered or unexported fields
}
OrderStatusCodeClient is a client for the OrderStatusCode schema.
func NewOrderStatusCodeClient ¶
func NewOrderStatusCodeClient(c config) *OrderStatusCodeClient
NewOrderStatusCodeClient returns a client for the OrderStatusCode from the given config.
func (*OrderStatusCodeClient) Create ¶
func (c *OrderStatusCodeClient) Create() *OrderStatusCodeCreate
Create returns a builder for creating a OrderStatusCode entity.
func (*OrderStatusCodeClient) CreateBulk ¶
func (c *OrderStatusCodeClient) CreateBulk(builders ...*OrderStatusCodeCreate) *OrderStatusCodeCreateBulk
CreateBulk returns a builder for creating a bulk of OrderStatusCode entities.
func (*OrderStatusCodeClient) Delete ¶
func (c *OrderStatusCodeClient) Delete() *OrderStatusCodeDelete
Delete returns a delete builder for OrderStatusCode.
func (*OrderStatusCodeClient) DeleteOne ¶
func (c *OrderStatusCodeClient) DeleteOne(osc *OrderStatusCode) *OrderStatusCodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OrderStatusCodeClient) DeleteOneID ¶
func (c *OrderStatusCodeClient) DeleteOneID(id int) *OrderStatusCodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OrderStatusCodeClient) Get ¶
func (c *OrderStatusCodeClient) Get(ctx context.Context, id int) (*OrderStatusCode, error)
Get returns a OrderStatusCode entity by its id.
func (*OrderStatusCodeClient) GetX ¶
func (c *OrderStatusCodeClient) GetX(ctx context.Context, id int) *OrderStatusCode
GetX is like Get, but panics if an error occurs.
func (*OrderStatusCodeClient) Hooks ¶
func (c *OrderStatusCodeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OrderStatusCodeClient) Intercept ¶
func (c *OrderStatusCodeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orderstatuscode.Intercept(f(g(h())))`.
func (*OrderStatusCodeClient) Interceptors ¶
func (c *OrderStatusCodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OrderStatusCodeClient) MapCreateBulk ¶
func (c *OrderStatusCodeClient) MapCreateBulk(slice any, setFunc func(*OrderStatusCodeCreate, int)) *OrderStatusCodeCreateBulk
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 (*OrderStatusCodeClient) Query ¶
func (c *OrderStatusCodeClient) Query() *OrderStatusCodeQuery
Query returns a query builder for OrderStatusCode.
func (*OrderStatusCodeClient) Update ¶
func (c *OrderStatusCodeClient) Update() *OrderStatusCodeUpdate
Update returns an update builder for OrderStatusCode.
func (*OrderStatusCodeClient) UpdateOne ¶
func (c *OrderStatusCodeClient) UpdateOne(osc *OrderStatusCode) *OrderStatusCodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OrderStatusCodeClient) UpdateOneID ¶
func (c *OrderStatusCodeClient) UpdateOneID(id int) *OrderStatusCodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OrderStatusCodeClient) Use ¶
func (c *OrderStatusCodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orderstatuscode.Hooks(f(g(h())))`.
type OrderStatusCodeCreate ¶
type OrderStatusCodeCreate struct {
// contains filtered or unexported fields
}
OrderStatusCodeCreate is the builder for creating a OrderStatusCode entity.
func (*OrderStatusCodeCreate) Exec ¶
func (oscc *OrderStatusCodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderStatusCodeCreate) ExecX ¶
func (oscc *OrderStatusCodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderStatusCodeCreate) Mutation ¶
func (oscc *OrderStatusCodeCreate) Mutation() *OrderStatusCodeMutation
Mutation returns the OrderStatusCodeMutation object of the builder.
func (*OrderStatusCodeCreate) Save ¶
func (oscc *OrderStatusCodeCreate) Save(ctx context.Context) (*OrderStatusCode, error)
Save creates the OrderStatusCode in the database.
func (*OrderStatusCodeCreate) SaveX ¶
func (oscc *OrderStatusCodeCreate) SaveX(ctx context.Context) *OrderStatusCode
SaveX calls Save and panics if Save returns an error.
func (*OrderStatusCodeCreate) SetCreatedAt ¶
func (oscc *OrderStatusCodeCreate) SetCreatedAt(t time.Time) *OrderStatusCodeCreate
SetCreatedAt sets the "created_at" field.
func (*OrderStatusCodeCreate) SetID ¶
func (oscc *OrderStatusCodeCreate) SetID(i int) *OrderStatusCodeCreate
SetID sets the "id" field.
func (*OrderStatusCodeCreate) SetNillableCreatedAt ¶
func (oscc *OrderStatusCodeCreate) SetNillableCreatedAt(t *time.Time) *OrderStatusCodeCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderStatusCodeCreate) SetNillableUpdatedAt ¶
func (oscc *OrderStatusCodeCreate) SetNillableUpdatedAt(t *time.Time) *OrderStatusCodeCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderStatusCodeCreate) SetOrderStatus ¶
func (oscc *OrderStatusCodeCreate) SetOrderStatus(s string) *OrderStatusCodeCreate
SetOrderStatus sets the "order_status" field.
func (*OrderStatusCodeCreate) SetUpdatedAt ¶
func (oscc *OrderStatusCodeCreate) SetUpdatedAt(t time.Time) *OrderStatusCodeCreate
SetUpdatedAt sets the "updated_at" field.
type OrderStatusCodeCreateBulk ¶
type OrderStatusCodeCreateBulk struct {
// contains filtered or unexported fields
}
OrderStatusCodeCreateBulk is the builder for creating many OrderStatusCode entities in bulk.
func (*OrderStatusCodeCreateBulk) Exec ¶
func (osccb *OrderStatusCodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderStatusCodeCreateBulk) ExecX ¶
func (osccb *OrderStatusCodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderStatusCodeCreateBulk) Save ¶
func (osccb *OrderStatusCodeCreateBulk) Save(ctx context.Context) ([]*OrderStatusCode, error)
Save creates the OrderStatusCode entities in the database.
func (*OrderStatusCodeCreateBulk) SaveX ¶
func (osccb *OrderStatusCodeCreateBulk) SaveX(ctx context.Context) []*OrderStatusCode
SaveX is like Save, but panics if an error occurs.
type OrderStatusCodeDelete ¶
type OrderStatusCodeDelete struct {
// contains filtered or unexported fields
}
OrderStatusCodeDelete is the builder for deleting a OrderStatusCode entity.
func (*OrderStatusCodeDelete) Exec ¶
func (oscd *OrderStatusCodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OrderStatusCodeDelete) ExecX ¶
func (oscd *OrderStatusCodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OrderStatusCodeDelete) Where ¶
func (oscd *OrderStatusCodeDelete) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeDelete
Where appends a list predicates to the OrderStatusCodeDelete builder.
type OrderStatusCodeDeleteOne ¶
type OrderStatusCodeDeleteOne struct {
// contains filtered or unexported fields
}
OrderStatusCodeDeleteOne is the builder for deleting a single OrderStatusCode entity.
func (*OrderStatusCodeDeleteOne) Exec ¶
func (oscdo *OrderStatusCodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OrderStatusCodeDeleteOne) ExecX ¶
func (oscdo *OrderStatusCodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderStatusCodeDeleteOne) Where ¶
func (oscdo *OrderStatusCodeDeleteOne) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeDeleteOne
Where appends a list predicates to the OrderStatusCodeDelete builder.
type OrderStatusCodeGroupBy ¶
type OrderStatusCodeGroupBy struct {
// contains filtered or unexported fields
}
OrderStatusCodeGroupBy is the group-by builder for OrderStatusCode entities.
func (*OrderStatusCodeGroupBy) Aggregate ¶
func (oscgb *OrderStatusCodeGroupBy) Aggregate(fns ...AggregateFunc) *OrderStatusCodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OrderStatusCodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*OrderStatusCodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeGroupBy) Scan ¶
func (oscgb *OrderStatusCodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderStatusCodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderStatusCodeMutation ¶
type OrderStatusCodeMutation struct {
// contains filtered or unexported fields
}
OrderStatusCodeMutation represents an operation that mutates the OrderStatusCode nodes in the graph.
func (*OrderStatusCodeMutation) AddField ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) AddedEdges ¶
func (m *OrderStatusCodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrderStatusCodeMutation) AddedField ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) AddedFields ¶
func (m *OrderStatusCodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrderStatusCodeMutation) AddedIDs ¶
func (m *OrderStatusCodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OrderStatusCodeMutation) ClearEdge ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) ClearField ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) ClearedEdges ¶
func (m *OrderStatusCodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrderStatusCodeMutation) ClearedFields ¶
func (m *OrderStatusCodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrderStatusCodeMutation) Client ¶
func (m OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) CreatedAt ¶
func (m *OrderStatusCodeMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OrderStatusCodeMutation) EdgeCleared ¶
func (m *OrderStatusCodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OrderStatusCodeMutation) Field ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) FieldCleared ¶
func (m *OrderStatusCodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OrderStatusCodeMutation) Fields ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) ID ¶
func (m *OrderStatusCodeMutation) ID() (id int, 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 (*OrderStatusCodeMutation) IDs ¶
func (m *OrderStatusCodeMutation) IDs(ctx context.Context) ([]int, 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 (*OrderStatusCodeMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the OrderStatusCode entity. If the OrderStatusCode 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 (*OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) OldOrderStatus ¶
func (m *OrderStatusCodeMutation) OldOrderStatus(ctx context.Context) (v string, err error)
OldOrderStatus returns the old "order_status" field's value of the OrderStatusCode entity. If the OrderStatusCode 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 (*OrderStatusCodeMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the OrderStatusCode entity. If the OrderStatusCode 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 (*OrderStatusCodeMutation) Op ¶
func (m *OrderStatusCodeMutation) Op() Op
Op returns the operation name.
func (*OrderStatusCodeMutation) OrderStatus ¶
func (m *OrderStatusCodeMutation) OrderStatus() (r string, exists bool)
OrderStatus returns the value of the "order_status" field in the mutation.
func (*OrderStatusCodeMutation) RemovedEdges ¶
func (m *OrderStatusCodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrderStatusCodeMutation) RemovedIDs ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) ResetCreatedAt ¶
func (m *OrderStatusCodeMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OrderStatusCodeMutation) ResetEdge ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) ResetField ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) ResetOrderStatus ¶
func (m *OrderStatusCodeMutation) ResetOrderStatus()
ResetOrderStatus resets all changes to the "order_status" field.
func (*OrderStatusCodeMutation) ResetUpdatedAt ¶
func (m *OrderStatusCodeMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OrderStatusCodeMutation) SetCreatedAt ¶
func (m *OrderStatusCodeMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OrderStatusCodeMutation) SetField ¶
func (m *OrderStatusCodeMutation) 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 (*OrderStatusCodeMutation) SetID ¶
func (m *OrderStatusCodeMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of OrderStatusCode entities.
func (*OrderStatusCodeMutation) SetOp ¶
func (m *OrderStatusCodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OrderStatusCodeMutation) SetOrderStatus ¶
func (m *OrderStatusCodeMutation) SetOrderStatus(s string)
SetOrderStatus sets the "order_status" field.
func (*OrderStatusCodeMutation) SetUpdatedAt ¶
func (m *OrderStatusCodeMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (OrderStatusCodeMutation) Tx ¶
func (m OrderStatusCodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrderStatusCodeMutation) Type ¶
func (m *OrderStatusCodeMutation) Type() string
Type returns the node type of this mutation (OrderStatusCode).
func (*OrderStatusCodeMutation) UpdatedAt ¶
func (m *OrderStatusCodeMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OrderStatusCodeMutation) Where ¶
func (m *OrderStatusCodeMutation) Where(ps ...predicate.OrderStatusCode)
Where appends a list predicates to the OrderStatusCodeMutation builder.
func (*OrderStatusCodeMutation) WhereP ¶
func (m *OrderStatusCodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OrderStatusCodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OrderStatusCodeQuery ¶
type OrderStatusCodeQuery struct {
// contains filtered or unexported fields
}
OrderStatusCodeQuery is the builder for querying OrderStatusCode entities.
func (*OrderStatusCodeQuery) Aggregate ¶
func (oscq *OrderStatusCodeQuery) Aggregate(fns ...AggregateFunc) *OrderStatusCodeSelect
Aggregate returns a OrderStatusCodeSelect configured with the given aggregations.
func (*OrderStatusCodeQuery) All ¶
func (oscq *OrderStatusCodeQuery) All(ctx context.Context) ([]*OrderStatusCode, error)
All executes the query and returns a list of OrderStatusCodes.
func (*OrderStatusCodeQuery) AllX ¶
func (oscq *OrderStatusCodeQuery) AllX(ctx context.Context) []*OrderStatusCode
AllX is like All, but panics if an error occurs.
func (*OrderStatusCodeQuery) Clone ¶
func (oscq *OrderStatusCodeQuery) Clone() *OrderStatusCodeQuery
Clone returns a duplicate of the OrderStatusCodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OrderStatusCodeQuery) Count ¶
func (oscq *OrderStatusCodeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OrderStatusCodeQuery) CountX ¶
func (oscq *OrderStatusCodeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OrderStatusCodeQuery) Exist ¶
func (oscq *OrderStatusCodeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OrderStatusCodeQuery) ExistX ¶
func (oscq *OrderStatusCodeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OrderStatusCodeQuery) First ¶
func (oscq *OrderStatusCodeQuery) First(ctx context.Context) (*OrderStatusCode, error)
First returns the first OrderStatusCode entity from the query. Returns a *NotFoundError when no OrderStatusCode was found.
func (*OrderStatusCodeQuery) FirstID ¶
func (oscq *OrderStatusCodeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first OrderStatusCode ID from the query. Returns a *NotFoundError when no OrderStatusCode ID was found.
func (*OrderStatusCodeQuery) FirstIDX ¶
func (oscq *OrderStatusCodeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OrderStatusCodeQuery) FirstX ¶
func (oscq *OrderStatusCodeQuery) FirstX(ctx context.Context) *OrderStatusCode
FirstX is like First, but panics if an error occurs.
func (*OrderStatusCodeQuery) GroupBy ¶
func (oscq *OrderStatusCodeQuery) GroupBy(field string, fields ...string) *OrderStatusCodeGroupBy
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.OrderStatusCode.Query(). GroupBy(orderstatuscode.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrderStatusCodeQuery) IDs ¶
func (oscq *OrderStatusCodeQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of OrderStatusCode IDs.
func (*OrderStatusCodeQuery) IDsX ¶
func (oscq *OrderStatusCodeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OrderStatusCodeQuery) Limit ¶
func (oscq *OrderStatusCodeQuery) Limit(limit int) *OrderStatusCodeQuery
Limit the number of records to be returned by this query.
func (*OrderStatusCodeQuery) Offset ¶
func (oscq *OrderStatusCodeQuery) Offset(offset int) *OrderStatusCodeQuery
Offset to start from.
func (*OrderStatusCodeQuery) Only ¶
func (oscq *OrderStatusCodeQuery) Only(ctx context.Context) (*OrderStatusCode, error)
Only returns a single OrderStatusCode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrderStatusCode entity is found. Returns a *NotFoundError when no OrderStatusCode entities are found.
func (*OrderStatusCodeQuery) OnlyID ¶
func (oscq *OrderStatusCodeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only OrderStatusCode ID in the query. Returns a *NotSingularError when more than one OrderStatusCode ID is found. Returns a *NotFoundError when no entities are found.
func (*OrderStatusCodeQuery) OnlyIDX ¶
func (oscq *OrderStatusCodeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OrderStatusCodeQuery) OnlyX ¶
func (oscq *OrderStatusCodeQuery) OnlyX(ctx context.Context) *OrderStatusCode
OnlyX is like Only, but panics if an error occurs.
func (*OrderStatusCodeQuery) Order ¶
func (oscq *OrderStatusCodeQuery) Order(o ...orderstatuscode.OrderOption) *OrderStatusCodeQuery
Order specifies how the records should be ordered.
func (*OrderStatusCodeQuery) Select ¶
func (oscq *OrderStatusCodeQuery) Select(fields ...string) *OrderStatusCodeSelect
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.OrderStatusCode.Query(). Select(orderstatuscode.FieldCreatedAt). Scan(ctx, &v)
func (*OrderStatusCodeQuery) Unique ¶
func (oscq *OrderStatusCodeQuery) Unique(unique bool) *OrderStatusCodeQuery
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 (*OrderStatusCodeQuery) Where ¶
func (oscq *OrderStatusCodeQuery) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeQuery
Where adds a new predicate for the OrderStatusCodeQuery builder.
type OrderStatusCodeSelect ¶
type OrderStatusCodeSelect struct { *OrderStatusCodeQuery // contains filtered or unexported fields }
OrderStatusCodeSelect is the builder for selecting fields of OrderStatusCode entities.
func (*OrderStatusCodeSelect) Aggregate ¶
func (oscs *OrderStatusCodeSelect) Aggregate(fns ...AggregateFunc) *OrderStatusCodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OrderStatusCodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*OrderStatusCodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderStatusCodeSelect) Scan ¶
func (oscs *OrderStatusCodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderStatusCodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderStatusCodeUpdate ¶
type OrderStatusCodeUpdate struct {
// contains filtered or unexported fields
}
OrderStatusCodeUpdate is the builder for updating OrderStatusCode entities.
func (*OrderStatusCodeUpdate) Exec ¶
func (oscu *OrderStatusCodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderStatusCodeUpdate) ExecX ¶
func (oscu *OrderStatusCodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderStatusCodeUpdate) Mutation ¶
func (oscu *OrderStatusCodeUpdate) Mutation() *OrderStatusCodeMutation
Mutation returns the OrderStatusCodeMutation object of the builder.
func (*OrderStatusCodeUpdate) Save ¶
func (oscu *OrderStatusCodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrderStatusCodeUpdate) SaveX ¶
func (oscu *OrderStatusCodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrderStatusCodeUpdate) SetNillableOrderStatus ¶
func (oscu *OrderStatusCodeUpdate) SetNillableOrderStatus(s *string) *OrderStatusCodeUpdate
SetNillableOrderStatus sets the "order_status" field if the given value is not nil.
func (*OrderStatusCodeUpdate) SetOrderStatus ¶
func (oscu *OrderStatusCodeUpdate) SetOrderStatus(s string) *OrderStatusCodeUpdate
SetOrderStatus sets the "order_status" field.
func (*OrderStatusCodeUpdate) SetUpdatedAt ¶
func (oscu *OrderStatusCodeUpdate) SetUpdatedAt(t time.Time) *OrderStatusCodeUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OrderStatusCodeUpdate) Where ¶
func (oscu *OrderStatusCodeUpdate) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeUpdate
Where appends a list predicates to the OrderStatusCodeUpdate builder.
type OrderStatusCodeUpdateOne ¶
type OrderStatusCodeUpdateOne struct {
// contains filtered or unexported fields
}
OrderStatusCodeUpdateOne is the builder for updating a single OrderStatusCode entity.
func (*OrderStatusCodeUpdateOne) Exec ¶
func (oscuo *OrderStatusCodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrderStatusCodeUpdateOne) ExecX ¶
func (oscuo *OrderStatusCodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderStatusCodeUpdateOne) Mutation ¶
func (oscuo *OrderStatusCodeUpdateOne) Mutation() *OrderStatusCodeMutation
Mutation returns the OrderStatusCodeMutation object of the builder.
func (*OrderStatusCodeUpdateOne) Save ¶
func (oscuo *OrderStatusCodeUpdateOne) Save(ctx context.Context) (*OrderStatusCode, error)
Save executes the query and returns the updated OrderStatusCode entity.
func (*OrderStatusCodeUpdateOne) SaveX ¶
func (oscuo *OrderStatusCodeUpdateOne) SaveX(ctx context.Context) *OrderStatusCode
SaveX is like Save, but panics if an error occurs.
func (*OrderStatusCodeUpdateOne) Select ¶
func (oscuo *OrderStatusCodeUpdateOne) Select(field string, fields ...string) *OrderStatusCodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrderStatusCodeUpdateOne) SetNillableOrderStatus ¶
func (oscuo *OrderStatusCodeUpdateOne) SetNillableOrderStatus(s *string) *OrderStatusCodeUpdateOne
SetNillableOrderStatus sets the "order_status" field if the given value is not nil.
func (*OrderStatusCodeUpdateOne) SetOrderStatus ¶
func (oscuo *OrderStatusCodeUpdateOne) SetOrderStatus(s string) *OrderStatusCodeUpdateOne
SetOrderStatus sets the "order_status" field.
func (*OrderStatusCodeUpdateOne) SetUpdatedAt ¶
func (oscuo *OrderStatusCodeUpdateOne) SetUpdatedAt(t time.Time) *OrderStatusCodeUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OrderStatusCodeUpdateOne) Where ¶
func (oscuo *OrderStatusCodeUpdateOne) Where(ps ...predicate.OrderStatusCode) *OrderStatusCodeUpdateOne
Where appends a list predicates to the OrderStatusCodeUpdate builder.
type OrderStatusCodes ¶
type OrderStatusCodes []*OrderStatusCode
OrderStatusCodes is a parsable slice of OrderStatusCode.
type OrderUpdate ¶
type OrderUpdate struct {
// contains filtered or unexported fields
}
OrderUpdate is the builder for updating Order entities.
func (*OrderUpdate) AddPriority ¶
func (ou *OrderUpdate) AddPriority(i int) *OrderUpdate
AddPriority adds i to the "priority" field.
func (*OrderUpdate) ClearInternalNote ¶
func (ou *OrderUpdate) ClearInternalNote() *OrderUpdate
ClearInternalNote clears the value of the "internal_note" field.
func (*OrderUpdate) ClearNote ¶
func (ou *OrderUpdate) ClearNote() *OrderUpdate
ClearNote clears the value of the "note" field.
func (*OrderUpdate) ClearOrderAddress ¶
func (ou *OrderUpdate) ClearOrderAddress() *OrderUpdate
ClearOrderAddress clears the "order_address" edge to the Address entity.
func (*OrderUpdate) ClearOrderStatus ¶
func (ou *OrderUpdate) ClearOrderStatus() *OrderUpdate
ClearOrderStatus clears the "order_status" edge to the OrderStatusCode entity.
func (*OrderUpdate) ClearStaff ¶
func (ou *OrderUpdate) ClearStaff() *OrderUpdate
ClearStaff clears the "staff" edge to the Person entity.
func (*OrderUpdate) ClearStaffID ¶
func (ou *OrderUpdate) ClearStaffID() *OrderUpdate
ClearStaffID clears the value of the "staff_id" field.
func (*OrderUpdate) Exec ¶
func (ou *OrderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderUpdate) ExecX ¶
func (ou *OrderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpdate) Mutation ¶
func (ou *OrderUpdate) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderUpdate) Save ¶
func (ou *OrderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrderUpdate) SaveX ¶
func (ou *OrderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrderUpdate) SetAddressID ¶
func (ou *OrderUpdate) SetAddressID(u uuid.UUID) *OrderUpdate
SetAddressID sets the "address_id" field.
func (*OrderUpdate) SetInternalNote ¶
func (ou *OrderUpdate) SetInternalNote(s string) *OrderUpdate
SetInternalNote sets the "internal_note" field.
func (*OrderUpdate) SetNillableAddressID ¶
func (ou *OrderUpdate) SetNillableAddressID(u *uuid.UUID) *OrderUpdate
SetNillableAddressID sets the "address_id" field if the given value is not nil.
func (*OrderUpdate) SetNillableInternalNote ¶
func (ou *OrderUpdate) SetNillableInternalNote(s *string) *OrderUpdate
SetNillableInternalNote sets the "internal_note" field if the given value is not nil.
func (*OrderUpdate) SetNillableNote ¶
func (ou *OrderUpdate) SetNillableNote(s *string) *OrderUpdate
SetNillableNote sets the "note" field if the given value is not nil.
func (*OrderUpdate) SetNillablePriority ¶
func (ou *OrderUpdate) SetNillablePriority(i *int) *OrderUpdate
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*OrderUpdate) SetNillableStaffID ¶
func (ou *OrderUpdate) SetNillableStaffID(u *uuid.UUID) *OrderUpdate
SetNillableStaffID sets the "staff_id" field if the given value is not nil.
func (*OrderUpdate) SetNillableStatusCode ¶
func (ou *OrderUpdate) SetNillableStatusCode(i *int) *OrderUpdate
SetNillableStatusCode sets the "status_code" field if the given value is not nil.
func (*OrderUpdate) SetNote ¶
func (ou *OrderUpdate) SetNote(s string) *OrderUpdate
SetNote sets the "note" field.
func (*OrderUpdate) SetOrderAddress ¶
func (ou *OrderUpdate) SetOrderAddress(a *Address) *OrderUpdate
SetOrderAddress sets the "order_address" edge to the Address entity.
func (*OrderUpdate) SetOrderAddressID ¶
func (ou *OrderUpdate) SetOrderAddressID(id uuid.UUID) *OrderUpdate
SetOrderAddressID sets the "order_address" edge to the Address entity by ID.
func (*OrderUpdate) SetOrderStatus ¶
func (ou *OrderUpdate) SetOrderStatus(o *OrderStatusCode) *OrderUpdate
SetOrderStatus sets the "order_status" edge to the OrderStatusCode entity.
func (*OrderUpdate) SetOrderStatusID ¶
func (ou *OrderUpdate) SetOrderStatusID(id int) *OrderUpdate
SetOrderStatusID sets the "order_status" edge to the OrderStatusCode entity by ID.
func (*OrderUpdate) SetPriority ¶
func (ou *OrderUpdate) SetPriority(i int) *OrderUpdate
SetPriority sets the "priority" field.
func (*OrderUpdate) SetStaff ¶
func (ou *OrderUpdate) SetStaff(p *Person) *OrderUpdate
SetStaff sets the "staff" edge to the Person entity.
func (*OrderUpdate) SetStaffID ¶
func (ou *OrderUpdate) SetStaffID(u uuid.UUID) *OrderUpdate
SetStaffID sets the "staff_id" field.
func (*OrderUpdate) SetStatusCode ¶
func (ou *OrderUpdate) SetStatusCode(i int) *OrderUpdate
SetStatusCode sets the "status_code" field.
func (*OrderUpdate) SetUpdatedAt ¶
func (ou *OrderUpdate) SetUpdatedAt(t time.Time) *OrderUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OrderUpdate) Where ¶
func (ou *OrderUpdate) Where(ps ...predicate.Order) *OrderUpdate
Where appends a list predicates to the OrderUpdate builder.
type OrderUpdateOne ¶
type OrderUpdateOne struct {
// contains filtered or unexported fields
}
OrderUpdateOne is the builder for updating a single Order entity.
func (*OrderUpdateOne) AddPriority ¶
func (ouo *OrderUpdateOne) AddPriority(i int) *OrderUpdateOne
AddPriority adds i to the "priority" field.
func (*OrderUpdateOne) ClearInternalNote ¶
func (ouo *OrderUpdateOne) ClearInternalNote() *OrderUpdateOne
ClearInternalNote clears the value of the "internal_note" field.
func (*OrderUpdateOne) ClearNote ¶
func (ouo *OrderUpdateOne) ClearNote() *OrderUpdateOne
ClearNote clears the value of the "note" field.
func (*OrderUpdateOne) ClearOrderAddress ¶
func (ouo *OrderUpdateOne) ClearOrderAddress() *OrderUpdateOne
ClearOrderAddress clears the "order_address" edge to the Address entity.
func (*OrderUpdateOne) ClearOrderStatus ¶
func (ouo *OrderUpdateOne) ClearOrderStatus() *OrderUpdateOne
ClearOrderStatus clears the "order_status" edge to the OrderStatusCode entity.
func (*OrderUpdateOne) ClearStaff ¶
func (ouo *OrderUpdateOne) ClearStaff() *OrderUpdateOne
ClearStaff clears the "staff" edge to the Person entity.
func (*OrderUpdateOne) ClearStaffID ¶
func (ouo *OrderUpdateOne) ClearStaffID() *OrderUpdateOne
ClearStaffID clears the value of the "staff_id" field.
func (*OrderUpdateOne) Exec ¶
func (ouo *OrderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrderUpdateOne) ExecX ¶
func (ouo *OrderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpdateOne) Mutation ¶
func (ouo *OrderUpdateOne) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderUpdateOne) Save ¶
func (ouo *OrderUpdateOne) Save(ctx context.Context) (*Order, error)
Save executes the query and returns the updated Order entity.
func (*OrderUpdateOne) SaveX ¶
func (ouo *OrderUpdateOne) SaveX(ctx context.Context) *Order
SaveX is like Save, but panics if an error occurs.
func (*OrderUpdateOne) Select ¶
func (ouo *OrderUpdateOne) Select(field string, fields ...string) *OrderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrderUpdateOne) SetAddressID ¶
func (ouo *OrderUpdateOne) SetAddressID(u uuid.UUID) *OrderUpdateOne
SetAddressID sets the "address_id" field.
func (*OrderUpdateOne) SetInternalNote ¶
func (ouo *OrderUpdateOne) SetInternalNote(s string) *OrderUpdateOne
SetInternalNote sets the "internal_note" field.
func (*OrderUpdateOne) SetNillableAddressID ¶
func (ouo *OrderUpdateOne) SetNillableAddressID(u *uuid.UUID) *OrderUpdateOne
SetNillableAddressID sets the "address_id" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableInternalNote ¶
func (ouo *OrderUpdateOne) SetNillableInternalNote(s *string) *OrderUpdateOne
SetNillableInternalNote sets the "internal_note" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableNote ¶
func (ouo *OrderUpdateOne) SetNillableNote(s *string) *OrderUpdateOne
SetNillableNote sets the "note" field if the given value is not nil.
func (*OrderUpdateOne) SetNillablePriority ¶
func (ouo *OrderUpdateOne) SetNillablePriority(i *int) *OrderUpdateOne
SetNillablePriority sets the "priority" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableStaffID ¶
func (ouo *OrderUpdateOne) SetNillableStaffID(u *uuid.UUID) *OrderUpdateOne
SetNillableStaffID sets the "staff_id" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableStatusCode ¶
func (ouo *OrderUpdateOne) SetNillableStatusCode(i *int) *OrderUpdateOne
SetNillableStatusCode sets the "status_code" field if the given value is not nil.
func (*OrderUpdateOne) SetNote ¶
func (ouo *OrderUpdateOne) SetNote(s string) *OrderUpdateOne
SetNote sets the "note" field.
func (*OrderUpdateOne) SetOrderAddress ¶
func (ouo *OrderUpdateOne) SetOrderAddress(a *Address) *OrderUpdateOne
SetOrderAddress sets the "order_address" edge to the Address entity.
func (*OrderUpdateOne) SetOrderAddressID ¶
func (ouo *OrderUpdateOne) SetOrderAddressID(id uuid.UUID) *OrderUpdateOne
SetOrderAddressID sets the "order_address" edge to the Address entity by ID.
func (*OrderUpdateOne) SetOrderStatus ¶
func (ouo *OrderUpdateOne) SetOrderStatus(o *OrderStatusCode) *OrderUpdateOne
SetOrderStatus sets the "order_status" edge to the OrderStatusCode entity.
func (*OrderUpdateOne) SetOrderStatusID ¶
func (ouo *OrderUpdateOne) SetOrderStatusID(id int) *OrderUpdateOne
SetOrderStatusID sets the "order_status" edge to the OrderStatusCode entity by ID.
func (*OrderUpdateOne) SetPriority ¶
func (ouo *OrderUpdateOne) SetPriority(i int) *OrderUpdateOne
SetPriority sets the "priority" field.
func (*OrderUpdateOne) SetStaff ¶
func (ouo *OrderUpdateOne) SetStaff(p *Person) *OrderUpdateOne
SetStaff sets the "staff" edge to the Person entity.
func (*OrderUpdateOne) SetStaffID ¶
func (ouo *OrderUpdateOne) SetStaffID(u uuid.UUID) *OrderUpdateOne
SetStaffID sets the "staff_id" field.
func (*OrderUpdateOne) SetStatusCode ¶
func (ouo *OrderUpdateOne) SetStatusCode(i int) *OrderUpdateOne
SetStatusCode sets the "status_code" field.
func (*OrderUpdateOne) SetUpdatedAt ¶
func (ouo *OrderUpdateOne) SetUpdatedAt(t time.Time) *OrderUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OrderUpdateOne) Where ¶
func (ouo *OrderUpdateOne) Where(ps ...predicate.Order) *OrderUpdateOne
Where appends a list predicates to the OrderUpdate builder.
type Person ¶
type Person struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // AvatarURL holds the value of the "avatar_url" field. AvatarURL *string `json:"avatar_url,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Phone holds the value of the "phone" field. Phone *string `json:"phone,omitempty"` // Role holds the value of the "role" field. Role *person.Role `json:"role,omitempty"` // PasswordHash holds the value of the "password_hash" field. PasswordHash *[]byte `json:"-"` // IsEmailVerified holds the value of the "is_email_verified" field. IsEmailVerified *bool `json:"is_email_verified,omitempty"` // IsPhoneVerified holds the value of the "is_phone_verified" field. IsPhoneVerified *bool `json:"is_phone_verified,omitempty"` // WorkUnitID holds the value of the "work_unit_id" field. WorkUnitID *uuid.UUID `json:"work_unit_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PersonQuery when eager-loading is set. Edges PersonEdges `json:"edges"` // contains filtered or unexported fields }
Person is the model entity for the Person schema.
func (*Person) QueryAddresses ¶
func (pe *Person) QueryAddresses() *AddressQuery
QueryAddresses queries the "addresses" edge of the Person entity.
func (*Person) QueryPersonAddresses ¶
func (pe *Person) QueryPersonAddresses() *PersonAddressQuery
QueryPersonAddresses queries the "person_addresses" edge of the Person entity.
func (*Person) QueryWorkUnit ¶
func (pe *Person) QueryWorkUnit() *WorkUnitInfoQuery
QueryWorkUnit queries the "work_unit" edge of the Person entity.
func (*Person) Unwrap ¶
Unwrap unwraps the Person 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 (*Person) Update ¶
func (pe *Person) Update() *PersonUpdateOne
Update returns a builder for updating this Person. Note that you need to call Person.Unwrap() before calling this method if this Person was returned from a transaction, and the transaction was committed or rolled back.
type PersonAddress ¶
type PersonAddress struct { // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // PersonID holds the value of the "person_id" field. PersonID uuid.UUID `json:"person_id,omitempty"` // AddressID holds the value of the "address_id" field. AddressID uuid.UUID `json:"address_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PersonAddressQuery when eager-loading is set. Edges PersonAddressEdges `json:"edges"` // contains filtered or unexported fields }
PersonAddress is the model entity for the PersonAddress schema.
func (*PersonAddress) QueryAddresses ¶
func (pa *PersonAddress) QueryAddresses() *AddressQuery
QueryAddresses queries the "addresses" edge of the PersonAddress entity.
func (*PersonAddress) QueryPersons ¶
func (pa *PersonAddress) QueryPersons() *PersonQuery
QueryPersons queries the "persons" edge of the PersonAddress entity.
func (*PersonAddress) String ¶
func (pa *PersonAddress) String() string
String implements the fmt.Stringer.
func (*PersonAddress) Unwrap ¶
func (pa *PersonAddress) Unwrap() *PersonAddress
Unwrap unwraps the PersonAddress 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 (*PersonAddress) Update ¶
func (pa *PersonAddress) Update() *PersonAddressUpdateOne
Update returns a builder for updating this PersonAddress. Note that you need to call PersonAddress.Unwrap() before calling this method if this PersonAddress was returned from a transaction, and the transaction was committed or rolled back.
type PersonAddressClient ¶
type PersonAddressClient struct {
// contains filtered or unexported fields
}
PersonAddressClient is a client for the PersonAddress schema.
func NewPersonAddressClient ¶
func NewPersonAddressClient(c config) *PersonAddressClient
NewPersonAddressClient returns a client for the PersonAddress from the given config.
func (*PersonAddressClient) Create ¶
func (c *PersonAddressClient) Create() *PersonAddressCreate
Create returns a builder for creating a PersonAddress entity.
func (*PersonAddressClient) CreateBulk ¶
func (c *PersonAddressClient) CreateBulk(builders ...*PersonAddressCreate) *PersonAddressCreateBulk
CreateBulk returns a builder for creating a bulk of PersonAddress entities.
func (*PersonAddressClient) Delete ¶
func (c *PersonAddressClient) Delete() *PersonAddressDelete
Delete returns a delete builder for PersonAddress.
func (*PersonAddressClient) Hooks ¶
func (c *PersonAddressClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PersonAddressClient) Intercept ¶
func (c *PersonAddressClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `personaddress.Intercept(f(g(h())))`.
func (*PersonAddressClient) Interceptors ¶
func (c *PersonAddressClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PersonAddressClient) MapCreateBulk ¶
func (c *PersonAddressClient) MapCreateBulk(slice any, setFunc func(*PersonAddressCreate, int)) *PersonAddressCreateBulk
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 (*PersonAddressClient) Query ¶
func (c *PersonAddressClient) Query() *PersonAddressQuery
Query returns a query builder for PersonAddress.
func (*PersonAddressClient) QueryAddresses ¶
func (c *PersonAddressClient) QueryAddresses(pa *PersonAddress) *AddressQuery
QueryAddresses queries the addresses edge of a PersonAddress.
func (*PersonAddressClient) QueryPersons ¶
func (c *PersonAddressClient) QueryPersons(pa *PersonAddress) *PersonQuery
QueryPersons queries the persons edge of a PersonAddress.
func (*PersonAddressClient) Update ¶
func (c *PersonAddressClient) Update() *PersonAddressUpdate
Update returns an update builder for PersonAddress.
func (*PersonAddressClient) UpdateOne ¶
func (c *PersonAddressClient) UpdateOne(pa *PersonAddress) *PersonAddressUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PersonAddressClient) Use ¶
func (c *PersonAddressClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `personaddress.Hooks(f(g(h())))`.
type PersonAddressCreate ¶
type PersonAddressCreate struct {
// contains filtered or unexported fields
}
PersonAddressCreate is the builder for creating a PersonAddress entity.
func (*PersonAddressCreate) Exec ¶
func (pac *PersonAddressCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PersonAddressCreate) ExecX ¶
func (pac *PersonAddressCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonAddressCreate) Mutation ¶
func (pac *PersonAddressCreate) Mutation() *PersonAddressMutation
Mutation returns the PersonAddressMutation object of the builder.
func (*PersonAddressCreate) Save ¶
func (pac *PersonAddressCreate) Save(ctx context.Context) (*PersonAddress, error)
Save creates the PersonAddress in the database.
func (*PersonAddressCreate) SaveX ¶
func (pac *PersonAddressCreate) SaveX(ctx context.Context) *PersonAddress
SaveX calls Save and panics if Save returns an error.
func (*PersonAddressCreate) SetAddressID ¶
func (pac *PersonAddressCreate) SetAddressID(u uuid.UUID) *PersonAddressCreate
SetAddressID sets the "address_id" field.
func (*PersonAddressCreate) SetAddresses ¶
func (pac *PersonAddressCreate) SetAddresses(a *Address) *PersonAddressCreate
SetAddresses sets the "addresses" edge to the Address entity.
func (*PersonAddressCreate) SetAddressesID ¶
func (pac *PersonAddressCreate) SetAddressesID(id uuid.UUID) *PersonAddressCreate
SetAddressesID sets the "addresses" edge to the Address entity by ID.
func (*PersonAddressCreate) SetCreatedAt ¶
func (pac *PersonAddressCreate) SetCreatedAt(t time.Time) *PersonAddressCreate
SetCreatedAt sets the "created_at" field.
func (*PersonAddressCreate) SetNillableCreatedAt ¶
func (pac *PersonAddressCreate) SetNillableCreatedAt(t *time.Time) *PersonAddressCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PersonAddressCreate) SetNillableUpdatedAt ¶
func (pac *PersonAddressCreate) SetNillableUpdatedAt(t *time.Time) *PersonAddressCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PersonAddressCreate) SetPersonID ¶
func (pac *PersonAddressCreate) SetPersonID(u uuid.UUID) *PersonAddressCreate
SetPersonID sets the "person_id" field.
func (*PersonAddressCreate) SetPersons ¶
func (pac *PersonAddressCreate) SetPersons(p *Person) *PersonAddressCreate
SetPersons sets the "persons" edge to the Person entity.
func (*PersonAddressCreate) SetPersonsID ¶
func (pac *PersonAddressCreate) SetPersonsID(id uuid.UUID) *PersonAddressCreate
SetPersonsID sets the "persons" edge to the Person entity by ID.
func (*PersonAddressCreate) SetUpdatedAt ¶
func (pac *PersonAddressCreate) SetUpdatedAt(t time.Time) *PersonAddressCreate
SetUpdatedAt sets the "updated_at" field.
type PersonAddressCreateBulk ¶
type PersonAddressCreateBulk struct {
// contains filtered or unexported fields
}
PersonAddressCreateBulk is the builder for creating many PersonAddress entities in bulk.
func (*PersonAddressCreateBulk) Exec ¶
func (pacb *PersonAddressCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PersonAddressCreateBulk) ExecX ¶
func (pacb *PersonAddressCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonAddressCreateBulk) Save ¶
func (pacb *PersonAddressCreateBulk) Save(ctx context.Context) ([]*PersonAddress, error)
Save creates the PersonAddress entities in the database.
func (*PersonAddressCreateBulk) SaveX ¶
func (pacb *PersonAddressCreateBulk) SaveX(ctx context.Context) []*PersonAddress
SaveX is like Save, but panics if an error occurs.
type PersonAddressDelete ¶
type PersonAddressDelete struct {
// contains filtered or unexported fields
}
PersonAddressDelete is the builder for deleting a PersonAddress entity.
func (*PersonAddressDelete) Exec ¶
func (pad *PersonAddressDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PersonAddressDelete) ExecX ¶
func (pad *PersonAddressDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PersonAddressDelete) Where ¶
func (pad *PersonAddressDelete) Where(ps ...predicate.PersonAddress) *PersonAddressDelete
Where appends a list predicates to the PersonAddressDelete builder.
type PersonAddressDeleteOne ¶
type PersonAddressDeleteOne struct {
// contains filtered or unexported fields
}
PersonAddressDeleteOne is the builder for deleting a single PersonAddress entity.
func (*PersonAddressDeleteOne) Exec ¶
func (pado *PersonAddressDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PersonAddressDeleteOne) ExecX ¶
func (pado *PersonAddressDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonAddressDeleteOne) Where ¶
func (pado *PersonAddressDeleteOne) Where(ps ...predicate.PersonAddress) *PersonAddressDeleteOne
Where appends a list predicates to the PersonAddressDelete builder.
type PersonAddressEdges ¶
type PersonAddressEdges struct { // Persons holds the value of the persons edge. Persons *Person `json:"persons,omitempty"` // Addresses holds the value of the addresses edge. Addresses *Address `json:"addresses,omitempty"` // contains filtered or unexported fields }
PersonAddressEdges holds the relations/edges for other nodes in the graph.
func (PersonAddressEdges) AddressesOrErr ¶
func (e PersonAddressEdges) AddressesOrErr() (*Address, error)
AddressesOrErr returns the Addresses value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (PersonAddressEdges) PersonsOrErr ¶
func (e PersonAddressEdges) PersonsOrErr() (*Person, error)
PersonsOrErr returns the Persons value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PersonAddressGroupBy ¶
type PersonAddressGroupBy struct {
// contains filtered or unexported fields
}
PersonAddressGroupBy is the group-by builder for PersonAddress entities.
func (*PersonAddressGroupBy) Aggregate ¶
func (pagb *PersonAddressGroupBy) Aggregate(fns ...AggregateFunc) *PersonAddressGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PersonAddressGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PersonAddressGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PersonAddressGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PersonAddressGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PersonAddressGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PersonAddressGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PersonAddressGroupBy) Scan ¶
func (pagb *PersonAddressGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PersonAddressGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PersonAddressMutation ¶
type PersonAddressMutation struct {
// contains filtered or unexported fields
}
PersonAddressMutation represents an operation that mutates the PersonAddress nodes in the graph.
func (*PersonAddressMutation) AddField ¶
func (m *PersonAddressMutation) 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 (*PersonAddressMutation) AddedEdges ¶
func (m *PersonAddressMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PersonAddressMutation) AddedField ¶
func (m *PersonAddressMutation) 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 (*PersonAddressMutation) AddedFields ¶
func (m *PersonAddressMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PersonAddressMutation) AddedIDs ¶
func (m *PersonAddressMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PersonAddressMutation) AddressID ¶
func (m *PersonAddressMutation) AddressID() (r uuid.UUID, exists bool)
AddressID returns the value of the "address_id" field in the mutation.
func (*PersonAddressMutation) AddressesCleared ¶
func (m *PersonAddressMutation) AddressesCleared() bool
AddressesCleared reports if the "addresses" edge to the Address entity was cleared.
func (*PersonAddressMutation) AddressesID ¶
func (m *PersonAddressMutation) AddressesID() (id uuid.UUID, exists bool)
AddressesID returns the "addresses" edge ID in the mutation.
func (*PersonAddressMutation) AddressesIDs ¶
func (m *PersonAddressMutation) AddressesIDs() (ids []uuid.UUID)
AddressesIDs returns the "addresses" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AddressesID instead. It exists only for internal usage by the builders.
func (*PersonAddressMutation) ClearAddresses ¶
func (m *PersonAddressMutation) ClearAddresses()
ClearAddresses clears the "addresses" edge to the Address entity.
func (*PersonAddressMutation) ClearEdge ¶
func (m *PersonAddressMutation) 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 (*PersonAddressMutation) ClearField ¶
func (m *PersonAddressMutation) 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 (*PersonAddressMutation) ClearPersons ¶
func (m *PersonAddressMutation) ClearPersons()
ClearPersons clears the "persons" edge to the Person entity.
func (*PersonAddressMutation) ClearedEdges ¶
func (m *PersonAddressMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PersonAddressMutation) ClearedFields ¶
func (m *PersonAddressMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PersonAddressMutation) Client ¶
func (m PersonAddressMutation) 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 (*PersonAddressMutation) CreatedAt ¶
func (m *PersonAddressMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PersonAddressMutation) EdgeCleared ¶
func (m *PersonAddressMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PersonAddressMutation) Field ¶
func (m *PersonAddressMutation) 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 (*PersonAddressMutation) FieldCleared ¶
func (m *PersonAddressMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PersonAddressMutation) Fields ¶
func (m *PersonAddressMutation) 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 (*PersonAddressMutation) 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 (*PersonAddressMutation) Op ¶
func (m *PersonAddressMutation) Op() Op
Op returns the operation name.
func (*PersonAddressMutation) PersonID ¶
func (m *PersonAddressMutation) PersonID() (r uuid.UUID, exists bool)
PersonID returns the value of the "person_id" field in the mutation.
func (*PersonAddressMutation) PersonsCleared ¶
func (m *PersonAddressMutation) PersonsCleared() bool
PersonsCleared reports if the "persons" edge to the Person entity was cleared.
func (*PersonAddressMutation) PersonsID ¶
func (m *PersonAddressMutation) PersonsID() (id uuid.UUID, exists bool)
PersonsID returns the "persons" edge ID in the mutation.
func (*PersonAddressMutation) PersonsIDs ¶
func (m *PersonAddressMutation) PersonsIDs() (ids []uuid.UUID)
PersonsIDs returns the "persons" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PersonsID instead. It exists only for internal usage by the builders.
func (*PersonAddressMutation) RemovedEdges ¶
func (m *PersonAddressMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PersonAddressMutation) RemovedIDs ¶
func (m *PersonAddressMutation) 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 (*PersonAddressMutation) ResetAddressID ¶
func (m *PersonAddressMutation) ResetAddressID()
ResetAddressID resets all changes to the "address_id" field.
func (*PersonAddressMutation) ResetAddresses ¶
func (m *PersonAddressMutation) ResetAddresses()
ResetAddresses resets all changes to the "addresses" edge.
func (*PersonAddressMutation) ResetCreatedAt ¶
func (m *PersonAddressMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PersonAddressMutation) ResetEdge ¶
func (m *PersonAddressMutation) 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 (*PersonAddressMutation) ResetField ¶
func (m *PersonAddressMutation) 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 (*PersonAddressMutation) ResetPersonID ¶
func (m *PersonAddressMutation) ResetPersonID()
ResetPersonID resets all changes to the "person_id" field.
func (*PersonAddressMutation) ResetPersons ¶
func (m *PersonAddressMutation) ResetPersons()
ResetPersons resets all changes to the "persons" edge.
func (*PersonAddressMutation) ResetUpdatedAt ¶
func (m *PersonAddressMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PersonAddressMutation) SetAddressID ¶
func (m *PersonAddressMutation) SetAddressID(u uuid.UUID)
SetAddressID sets the "address_id" field.
func (*PersonAddressMutation) SetAddressesID ¶
func (m *PersonAddressMutation) SetAddressesID(id uuid.UUID)
SetAddressesID sets the "addresses" edge to the Address entity by id.
func (*PersonAddressMutation) SetCreatedAt ¶
func (m *PersonAddressMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PersonAddressMutation) SetField ¶
func (m *PersonAddressMutation) 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 (*PersonAddressMutation) SetOp ¶
func (m *PersonAddressMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PersonAddressMutation) SetPersonID ¶
func (m *PersonAddressMutation) SetPersonID(u uuid.UUID)
SetPersonID sets the "person_id" field.
func (*PersonAddressMutation) SetPersonsID ¶
func (m *PersonAddressMutation) SetPersonsID(id uuid.UUID)
SetPersonsID sets the "persons" edge to the Person entity by id.
func (*PersonAddressMutation) SetUpdatedAt ¶
func (m *PersonAddressMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (PersonAddressMutation) Tx ¶
func (m PersonAddressMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PersonAddressMutation) Type ¶
func (m *PersonAddressMutation) Type() string
Type returns the node type of this mutation (PersonAddress).
func (*PersonAddressMutation) UpdatedAt ¶
func (m *PersonAddressMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PersonAddressMutation) Where ¶
func (m *PersonAddressMutation) Where(ps ...predicate.PersonAddress)
Where appends a list predicates to the PersonAddressMutation builder.
func (*PersonAddressMutation) WhereP ¶
func (m *PersonAddressMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PersonAddressMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PersonAddressQuery ¶
type PersonAddressQuery struct {
// contains filtered or unexported fields
}
PersonAddressQuery is the builder for querying PersonAddress entities.
func (*PersonAddressQuery) Aggregate ¶
func (paq *PersonAddressQuery) Aggregate(fns ...AggregateFunc) *PersonAddressSelect
Aggregate returns a PersonAddressSelect configured with the given aggregations.
func (*PersonAddressQuery) All ¶
func (paq *PersonAddressQuery) All(ctx context.Context) ([]*PersonAddress, error)
All executes the query and returns a list of PersonAddresses.
func (*PersonAddressQuery) AllX ¶
func (paq *PersonAddressQuery) AllX(ctx context.Context) []*PersonAddress
AllX is like All, but panics if an error occurs.
func (*PersonAddressQuery) Clone ¶
func (paq *PersonAddressQuery) Clone() *PersonAddressQuery
Clone returns a duplicate of the PersonAddressQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PersonAddressQuery) Count ¶
func (paq *PersonAddressQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PersonAddressQuery) CountX ¶
func (paq *PersonAddressQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PersonAddressQuery) Exist ¶
func (paq *PersonAddressQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PersonAddressQuery) ExistX ¶
func (paq *PersonAddressQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PersonAddressQuery) First ¶
func (paq *PersonAddressQuery) First(ctx context.Context) (*PersonAddress, error)
First returns the first PersonAddress entity from the query. Returns a *NotFoundError when no PersonAddress was found.
func (*PersonAddressQuery) FirstX ¶
func (paq *PersonAddressQuery) FirstX(ctx context.Context) *PersonAddress
FirstX is like First, but panics if an error occurs.
func (*PersonAddressQuery) GroupBy ¶
func (paq *PersonAddressQuery) GroupBy(field string, fields ...string) *PersonAddressGroupBy
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.PersonAddress.Query(). GroupBy(personaddress.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PersonAddressQuery) Limit ¶
func (paq *PersonAddressQuery) Limit(limit int) *PersonAddressQuery
Limit the number of records to be returned by this query.
func (*PersonAddressQuery) Offset ¶
func (paq *PersonAddressQuery) Offset(offset int) *PersonAddressQuery
Offset to start from.
func (*PersonAddressQuery) Only ¶
func (paq *PersonAddressQuery) Only(ctx context.Context) (*PersonAddress, error)
Only returns a single PersonAddress entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PersonAddress entity is found. Returns a *NotFoundError when no PersonAddress entities are found.
func (*PersonAddressQuery) OnlyX ¶
func (paq *PersonAddressQuery) OnlyX(ctx context.Context) *PersonAddress
OnlyX is like Only, but panics if an error occurs.
func (*PersonAddressQuery) Order ¶
func (paq *PersonAddressQuery) Order(o ...personaddress.OrderOption) *PersonAddressQuery
Order specifies how the records should be ordered.
func (*PersonAddressQuery) QueryAddresses ¶
func (paq *PersonAddressQuery) QueryAddresses() *AddressQuery
QueryAddresses chains the current query on the "addresses" edge.
func (*PersonAddressQuery) QueryPersons ¶
func (paq *PersonAddressQuery) QueryPersons() *PersonQuery
QueryPersons chains the current query on the "persons" edge.
func (*PersonAddressQuery) Select ¶
func (paq *PersonAddressQuery) Select(fields ...string) *PersonAddressSelect
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.PersonAddress.Query(). Select(personaddress.FieldCreatedAt). Scan(ctx, &v)
func (*PersonAddressQuery) Unique ¶
func (paq *PersonAddressQuery) Unique(unique bool) *PersonAddressQuery
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 (*PersonAddressQuery) Where ¶
func (paq *PersonAddressQuery) Where(ps ...predicate.PersonAddress) *PersonAddressQuery
Where adds a new predicate for the PersonAddressQuery builder.
func (*PersonAddressQuery) WithAddresses ¶
func (paq *PersonAddressQuery) WithAddresses(opts ...func(*AddressQuery)) *PersonAddressQuery
WithAddresses tells the query-builder to eager-load the nodes that are connected to the "addresses" edge. The optional arguments are used to configure the query builder of the edge.
func (*PersonAddressQuery) WithPersons ¶
func (paq *PersonAddressQuery) WithPersons(opts ...func(*PersonQuery)) *PersonAddressQuery
WithPersons tells the query-builder to eager-load the nodes that are connected to the "persons" edge. The optional arguments are used to configure the query builder of the edge.
type PersonAddressSelect ¶
type PersonAddressSelect struct { *PersonAddressQuery // contains filtered or unexported fields }
PersonAddressSelect is the builder for selecting fields of PersonAddress entities.
func (*PersonAddressSelect) Aggregate ¶
func (pas *PersonAddressSelect) Aggregate(fns ...AggregateFunc) *PersonAddressSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PersonAddressSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PersonAddressSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PersonAddressSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PersonAddressSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PersonAddressSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PersonAddressSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PersonAddressSelect) Scan ¶
func (pas *PersonAddressSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PersonAddressSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PersonAddressUpdate ¶
type PersonAddressUpdate struct {
// contains filtered or unexported fields
}
PersonAddressUpdate is the builder for updating PersonAddress entities.
func (*PersonAddressUpdate) Exec ¶
func (pau *PersonAddressUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PersonAddressUpdate) ExecX ¶
func (pau *PersonAddressUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonAddressUpdate) Mutation ¶
func (pau *PersonAddressUpdate) Mutation() *PersonAddressMutation
Mutation returns the PersonAddressMutation object of the builder.
func (*PersonAddressUpdate) Save ¶
func (pau *PersonAddressUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PersonAddressUpdate) SaveX ¶
func (pau *PersonAddressUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PersonAddressUpdate) SetUpdatedAt ¶
func (pau *PersonAddressUpdate) SetUpdatedAt(t time.Time) *PersonAddressUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PersonAddressUpdate) Where ¶
func (pau *PersonAddressUpdate) Where(ps ...predicate.PersonAddress) *PersonAddressUpdate
Where appends a list predicates to the PersonAddressUpdate builder.
type PersonAddressUpdateOne ¶
type PersonAddressUpdateOne struct {
// contains filtered or unexported fields
}
PersonAddressUpdateOne is the builder for updating a single PersonAddress entity.
func (*PersonAddressUpdateOne) Exec ¶
func (pauo *PersonAddressUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PersonAddressUpdateOne) ExecX ¶
func (pauo *PersonAddressUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonAddressUpdateOne) Mutation ¶
func (pauo *PersonAddressUpdateOne) Mutation() *PersonAddressMutation
Mutation returns the PersonAddressMutation object of the builder.
func (*PersonAddressUpdateOne) Save ¶
func (pauo *PersonAddressUpdateOne) Save(ctx context.Context) (*PersonAddress, error)
Save executes the query and returns the updated PersonAddress entity.
func (*PersonAddressUpdateOne) SaveX ¶
func (pauo *PersonAddressUpdateOne) SaveX(ctx context.Context) *PersonAddress
SaveX is like Save, but panics if an error occurs.
func (*PersonAddressUpdateOne) Select ¶
func (pauo *PersonAddressUpdateOne) Select(field string, fields ...string) *PersonAddressUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PersonAddressUpdateOne) SetUpdatedAt ¶
func (pauo *PersonAddressUpdateOne) SetUpdatedAt(t time.Time) *PersonAddressUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PersonAddressUpdateOne) Where ¶
func (pauo *PersonAddressUpdateOne) Where(ps ...predicate.PersonAddress) *PersonAddressUpdateOne
Where appends a list predicates to the PersonAddressUpdate builder.
type PersonAddresses ¶
type PersonAddresses []*PersonAddress
PersonAddresses is a parsable slice of PersonAddress.
type PersonClient ¶
type PersonClient struct {
// contains filtered or unexported fields
}
PersonClient is a client for the Person schema.
func NewPersonClient ¶
func NewPersonClient(c config) *PersonClient
NewPersonClient returns a client for the Person from the given config.
func (*PersonClient) Create ¶
func (c *PersonClient) Create() *PersonCreate
Create returns a builder for creating a Person entity.
func (*PersonClient) CreateBulk ¶
func (c *PersonClient) CreateBulk(builders ...*PersonCreate) *PersonCreateBulk
CreateBulk returns a builder for creating a bulk of Person entities.
func (*PersonClient) Delete ¶
func (c *PersonClient) Delete() *PersonDelete
Delete returns a delete builder for Person.
func (*PersonClient) DeleteOne ¶
func (c *PersonClient) DeleteOne(pe *Person) *PersonDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PersonClient) DeleteOneID ¶
func (c *PersonClient) DeleteOneID(id uuid.UUID) *PersonDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PersonClient) Intercept ¶
func (c *PersonClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `person.Intercept(f(g(h())))`.
func (*PersonClient) Interceptors ¶
func (c *PersonClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PersonClient) MapCreateBulk ¶
func (c *PersonClient) MapCreateBulk(slice any, setFunc func(*PersonCreate, int)) *PersonCreateBulk
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 (*PersonClient) Query ¶
func (c *PersonClient) Query() *PersonQuery
Query returns a query builder for Person.
func (*PersonClient) QueryAddresses ¶
func (c *PersonClient) QueryAddresses(pe *Person) *AddressQuery
QueryAddresses queries the addresses edge of a Person.
func (*PersonClient) QueryPersonAddresses ¶
func (c *PersonClient) QueryPersonAddresses(pe *Person) *PersonAddressQuery
QueryPersonAddresses queries the person_addresses edge of a Person.
func (*PersonClient) QueryWorkUnit ¶
func (c *PersonClient) QueryWorkUnit(pe *Person) *WorkUnitInfoQuery
QueryWorkUnit queries the work_unit edge of a Person.
func (*PersonClient) Update ¶
func (c *PersonClient) Update() *PersonUpdate
Update returns an update builder for Person.
func (*PersonClient) UpdateOne ¶
func (c *PersonClient) UpdateOne(pe *Person) *PersonUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PersonClient) UpdateOneID ¶
func (c *PersonClient) UpdateOneID(id uuid.UUID) *PersonUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PersonClient) Use ¶
func (c *PersonClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `person.Hooks(f(g(h())))`.
type PersonCreate ¶
type PersonCreate struct {
// contains filtered or unexported fields
}
PersonCreate is the builder for creating a Person entity.
func (*PersonCreate) AddAddressIDs ¶
func (pc *PersonCreate) AddAddressIDs(ids ...uuid.UUID) *PersonCreate
AddAddressIDs adds the "addresses" edge to the Address entity by IDs.
func (*PersonCreate) AddAddresses ¶
func (pc *PersonCreate) AddAddresses(a ...*Address) *PersonCreate
AddAddresses adds the "addresses" edges to the Address entity.
func (*PersonCreate) Exec ¶
func (pc *PersonCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PersonCreate) ExecX ¶
func (pc *PersonCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonCreate) Mutation ¶
func (pc *PersonCreate) Mutation() *PersonMutation
Mutation returns the PersonMutation object of the builder.
func (*PersonCreate) Save ¶
func (pc *PersonCreate) Save(ctx context.Context) (*Person, error)
Save creates the Person in the database.
func (*PersonCreate) SaveX ¶
func (pc *PersonCreate) SaveX(ctx context.Context) *Person
SaveX calls Save and panics if Save returns an error.
func (*PersonCreate) SetAvatarURL ¶
func (pc *PersonCreate) SetAvatarURL(s string) *PersonCreate
SetAvatarURL sets the "avatar_url" field.
func (*PersonCreate) SetCreatedAt ¶
func (pc *PersonCreate) SetCreatedAt(t time.Time) *PersonCreate
SetCreatedAt sets the "created_at" field.
func (*PersonCreate) SetEmail ¶
func (pc *PersonCreate) SetEmail(s string) *PersonCreate
SetEmail sets the "email" field.
func (*PersonCreate) SetID ¶
func (pc *PersonCreate) SetID(u uuid.UUID) *PersonCreate
SetID sets the "id" field.
func (*PersonCreate) SetIsEmailVerified ¶
func (pc *PersonCreate) SetIsEmailVerified(b bool) *PersonCreate
SetIsEmailVerified sets the "is_email_verified" field.
func (*PersonCreate) SetIsPhoneVerified ¶
func (pc *PersonCreate) SetIsPhoneVerified(b bool) *PersonCreate
SetIsPhoneVerified sets the "is_phone_verified" field.
func (*PersonCreate) SetName ¶
func (pc *PersonCreate) SetName(s string) *PersonCreate
SetName sets the "name" field.
func (*PersonCreate) SetNillableAvatarURL ¶
func (pc *PersonCreate) SetNillableAvatarURL(s *string) *PersonCreate
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*PersonCreate) SetNillableCreatedAt ¶
func (pc *PersonCreate) SetNillableCreatedAt(t *time.Time) *PersonCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PersonCreate) SetNillableID ¶
func (pc *PersonCreate) SetNillableID(u *uuid.UUID) *PersonCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*PersonCreate) SetNillableIsEmailVerified ¶
func (pc *PersonCreate) SetNillableIsEmailVerified(b *bool) *PersonCreate
SetNillableIsEmailVerified sets the "is_email_verified" field if the given value is not nil.
func (*PersonCreate) SetNillableIsPhoneVerified ¶
func (pc *PersonCreate) SetNillableIsPhoneVerified(b *bool) *PersonCreate
SetNillableIsPhoneVerified sets the "is_phone_verified" field if the given value is not nil.
func (*PersonCreate) SetNillablePhone ¶
func (pc *PersonCreate) SetNillablePhone(s *string) *PersonCreate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*PersonCreate) SetNillableRole ¶
func (pc *PersonCreate) SetNillableRole(pe *person.Role) *PersonCreate
SetNillableRole sets the "role" field if the given value is not nil.
func (*PersonCreate) SetNillableUpdatedAt ¶
func (pc *PersonCreate) SetNillableUpdatedAt(t *time.Time) *PersonCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PersonCreate) SetNillableWorkUnitID ¶
func (pc *PersonCreate) SetNillableWorkUnitID(u *uuid.UUID) *PersonCreate
SetNillableWorkUnitID sets the "work_unit_id" field if the given value is not nil.
func (*PersonCreate) SetPasswordHash ¶
func (pc *PersonCreate) SetPasswordHash(b []byte) *PersonCreate
SetPasswordHash sets the "password_hash" field.
func (*PersonCreate) SetPhone ¶
func (pc *PersonCreate) SetPhone(s string) *PersonCreate
SetPhone sets the "phone" field.
func (*PersonCreate) SetRole ¶
func (pc *PersonCreate) SetRole(pe person.Role) *PersonCreate
SetRole sets the "role" field.
func (*PersonCreate) SetUpdatedAt ¶
func (pc *PersonCreate) SetUpdatedAt(t time.Time) *PersonCreate
SetUpdatedAt sets the "updated_at" field.
func (*PersonCreate) SetWorkUnit ¶
func (pc *PersonCreate) SetWorkUnit(w *WorkUnitInfo) *PersonCreate
SetWorkUnit sets the "work_unit" edge to the WorkUnitInfo entity.
func (*PersonCreate) SetWorkUnitID ¶
func (pc *PersonCreate) SetWorkUnitID(u uuid.UUID) *PersonCreate
SetWorkUnitID sets the "work_unit_id" field.
type PersonCreateBulk ¶
type PersonCreateBulk struct {
// contains filtered or unexported fields
}
PersonCreateBulk is the builder for creating many Person entities in bulk.
func (*PersonCreateBulk) Exec ¶
func (pcb *PersonCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PersonCreateBulk) ExecX ¶
func (pcb *PersonCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PersonDelete ¶
type PersonDelete struct {
// contains filtered or unexported fields
}
PersonDelete is the builder for deleting a Person entity.
func (*PersonDelete) Exec ¶
func (pd *PersonDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PersonDelete) ExecX ¶
func (pd *PersonDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PersonDelete) Where ¶
func (pd *PersonDelete) Where(ps ...predicate.Person) *PersonDelete
Where appends a list predicates to the PersonDelete builder.
type PersonDeleteOne ¶
type PersonDeleteOne struct {
// contains filtered or unexported fields
}
PersonDeleteOne is the builder for deleting a single Person entity.
func (*PersonDeleteOne) Exec ¶
func (pdo *PersonDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PersonDeleteOne) ExecX ¶
func (pdo *PersonDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonDeleteOne) Where ¶
func (pdo *PersonDeleteOne) Where(ps ...predicate.Person) *PersonDeleteOne
Where appends a list predicates to the PersonDelete builder.
type PersonEdges ¶
type PersonEdges struct { // WorkUnit holds the value of the work_unit edge. WorkUnit *WorkUnitInfo `json:"work_unit,omitempty"` // Addresses holds the value of the addresses edge. Addresses []*Address `json:"addresses,omitempty"` // PersonAddresses holds the value of the person_addresses edge. PersonAddresses []*PersonAddress `json:"person_addresses,omitempty"` // contains filtered or unexported fields }
PersonEdges holds the relations/edges for other nodes in the graph.
func (PersonEdges) AddressesOrErr ¶
func (e PersonEdges) AddressesOrErr() ([]*Address, error)
AddressesOrErr returns the Addresses value or an error if the edge was not loaded in eager-loading.
func (PersonEdges) PersonAddressesOrErr ¶
func (e PersonEdges) PersonAddressesOrErr() ([]*PersonAddress, error)
PersonAddressesOrErr returns the PersonAddresses value or an error if the edge was not loaded in eager-loading.
func (PersonEdges) WorkUnitOrErr ¶
func (e PersonEdges) WorkUnitOrErr() (*WorkUnitInfo, error)
WorkUnitOrErr returns the WorkUnit value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type PersonGroupBy ¶
type PersonGroupBy struct {
// contains filtered or unexported fields
}
PersonGroupBy is the group-by builder for Person entities.
func (*PersonGroupBy) Aggregate ¶
func (pgb *PersonGroupBy) Aggregate(fns ...AggregateFunc) *PersonGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PersonGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PersonGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PersonGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PersonGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PersonGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PersonGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PersonGroupBy) Scan ¶
func (pgb *PersonGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PersonGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PersonMutation ¶
type PersonMutation struct {
// contains filtered or unexported fields
}
PersonMutation represents an operation that mutates the Person nodes in the graph.
func (*PersonMutation) AddAddressIDs ¶
func (m *PersonMutation) AddAddressIDs(ids ...uuid.UUID)
AddAddressIDs adds the "addresses" edge to the Address entity by ids.
func (*PersonMutation) AddField ¶
func (m *PersonMutation) 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 (*PersonMutation) AddedEdges ¶
func (m *PersonMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PersonMutation) AddedField ¶
func (m *PersonMutation) 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 (*PersonMutation) AddedFields ¶
func (m *PersonMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PersonMutation) AddedIDs ¶
func (m *PersonMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PersonMutation) AddressesCleared ¶
func (m *PersonMutation) AddressesCleared() bool
AddressesCleared reports if the "addresses" edge to the Address entity was cleared.
func (*PersonMutation) AddressesIDs ¶
func (m *PersonMutation) AddressesIDs() (ids []uuid.UUID)
AddressesIDs returns the "addresses" edge IDs in the mutation.
func (*PersonMutation) AvatarURL ¶
func (m *PersonMutation) AvatarURL() (r string, exists bool)
AvatarURL returns the value of the "avatar_url" field in the mutation.
func (*PersonMutation) AvatarURLCleared ¶
func (m *PersonMutation) AvatarURLCleared() bool
AvatarURLCleared returns if the "avatar_url" field was cleared in this mutation.
func (*PersonMutation) ClearAddresses ¶
func (m *PersonMutation) ClearAddresses()
ClearAddresses clears the "addresses" edge to the Address entity.
func (*PersonMutation) ClearAvatarURL ¶
func (m *PersonMutation) ClearAvatarURL()
ClearAvatarURL clears the value of the "avatar_url" field.
func (*PersonMutation) ClearEdge ¶
func (m *PersonMutation) 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 (*PersonMutation) ClearField ¶
func (m *PersonMutation) 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 (*PersonMutation) ClearPasswordHash ¶
func (m *PersonMutation) ClearPasswordHash()
ClearPasswordHash clears the value of the "password_hash" field.
func (*PersonMutation) ClearPhone ¶
func (m *PersonMutation) ClearPhone()
ClearPhone clears the value of the "phone" field.
func (*PersonMutation) ClearWorkUnit ¶
func (m *PersonMutation) ClearWorkUnit()
ClearWorkUnit clears the "work_unit" edge to the WorkUnitInfo entity.
func (*PersonMutation) ClearWorkUnitID ¶
func (m *PersonMutation) ClearWorkUnitID()
ClearWorkUnitID clears the value of the "work_unit_id" field.
func (*PersonMutation) ClearedEdges ¶
func (m *PersonMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PersonMutation) ClearedFields ¶
func (m *PersonMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PersonMutation) Client ¶
func (m PersonMutation) 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 (*PersonMutation) CreatedAt ¶
func (m *PersonMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PersonMutation) EdgeCleared ¶
func (m *PersonMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PersonMutation) Email ¶
func (m *PersonMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*PersonMutation) Field ¶
func (m *PersonMutation) 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 (*PersonMutation) FieldCleared ¶
func (m *PersonMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PersonMutation) Fields ¶
func (m *PersonMutation) 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 (*PersonMutation) ID ¶
func (m *PersonMutation) ID() (id uuid.UUID, 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 (*PersonMutation) IDs ¶
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 (*PersonMutation) IsEmailVerified ¶
func (m *PersonMutation) IsEmailVerified() (r bool, exists bool)
IsEmailVerified returns the value of the "is_email_verified" field in the mutation.
func (*PersonMutation) IsPhoneVerified ¶
func (m *PersonMutation) IsPhoneVerified() (r bool, exists bool)
IsPhoneVerified returns the value of the "is_phone_verified" field in the mutation.
func (*PersonMutation) Name ¶
func (m *PersonMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PersonMutation) OldAvatarURL ¶
func (m *PersonMutation) OldAvatarURL(ctx context.Context) (v *string, err error)
OldAvatarURL returns the old "avatar_url" field's value of the Person entity. If the Person 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 (*PersonMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Person entity. If the Person 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 (*PersonMutation) OldEmail ¶
func (m *PersonMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the Person entity. If the Person 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 (*PersonMutation) 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 (*PersonMutation) OldIsEmailVerified ¶
func (m *PersonMutation) OldIsEmailVerified(ctx context.Context) (v *bool, err error)
OldIsEmailVerified returns the old "is_email_verified" field's value of the Person entity. If the Person 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 (*PersonMutation) OldIsPhoneVerified ¶
func (m *PersonMutation) OldIsPhoneVerified(ctx context.Context) (v *bool, err error)
OldIsPhoneVerified returns the old "is_phone_verified" field's value of the Person entity. If the Person 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 (*PersonMutation) OldName ¶
func (m *PersonMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Person entity. If the Person 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 (*PersonMutation) OldPasswordHash ¶
func (m *PersonMutation) OldPasswordHash(ctx context.Context) (v *[]byte, err error)
OldPasswordHash returns the old "password_hash" field's value of the Person entity. If the Person 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 (*PersonMutation) OldPhone ¶
func (m *PersonMutation) OldPhone(ctx context.Context) (v *string, err error)
OldPhone returns the old "phone" field's value of the Person entity. If the Person 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 (*PersonMutation) OldRole ¶
OldRole returns the old "role" field's value of the Person entity. If the Person 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 (*PersonMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Person entity. If the Person 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 (*PersonMutation) OldWorkUnitID ¶
OldWorkUnitID returns the old "work_unit_id" field's value of the Person entity. If the Person 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 (*PersonMutation) PasswordHash ¶
func (m *PersonMutation) PasswordHash() (r []byte, exists bool)
PasswordHash returns the value of the "password_hash" field in the mutation.
func (*PersonMutation) PasswordHashCleared ¶
func (m *PersonMutation) PasswordHashCleared() bool
PasswordHashCleared returns if the "password_hash" field was cleared in this mutation.
func (*PersonMutation) Phone ¶
func (m *PersonMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*PersonMutation) PhoneCleared ¶
func (m *PersonMutation) PhoneCleared() bool
PhoneCleared returns if the "phone" field was cleared in this mutation.
func (*PersonMutation) RemoveAddressIDs ¶
func (m *PersonMutation) RemoveAddressIDs(ids ...uuid.UUID)
RemoveAddressIDs removes the "addresses" edge to the Address entity by IDs.
func (*PersonMutation) RemovedAddressesIDs ¶
func (m *PersonMutation) RemovedAddressesIDs() (ids []uuid.UUID)
RemovedAddresses returns the removed IDs of the "addresses" edge to the Address entity.
func (*PersonMutation) RemovedEdges ¶
func (m *PersonMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PersonMutation) RemovedIDs ¶
func (m *PersonMutation) 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 (*PersonMutation) ResetAddresses ¶
func (m *PersonMutation) ResetAddresses()
ResetAddresses resets all changes to the "addresses" edge.
func (*PersonMutation) ResetAvatarURL ¶
func (m *PersonMutation) ResetAvatarURL()
ResetAvatarURL resets all changes to the "avatar_url" field.
func (*PersonMutation) ResetCreatedAt ¶
func (m *PersonMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PersonMutation) ResetEdge ¶
func (m *PersonMutation) 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 (*PersonMutation) ResetEmail ¶
func (m *PersonMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*PersonMutation) ResetField ¶
func (m *PersonMutation) 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 (*PersonMutation) ResetIsEmailVerified ¶
func (m *PersonMutation) ResetIsEmailVerified()
ResetIsEmailVerified resets all changes to the "is_email_verified" field.
func (*PersonMutation) ResetIsPhoneVerified ¶
func (m *PersonMutation) ResetIsPhoneVerified()
ResetIsPhoneVerified resets all changes to the "is_phone_verified" field.
func (*PersonMutation) ResetName ¶
func (m *PersonMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PersonMutation) ResetPasswordHash ¶
func (m *PersonMutation) ResetPasswordHash()
ResetPasswordHash resets all changes to the "password_hash" field.
func (*PersonMutation) ResetPhone ¶
func (m *PersonMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*PersonMutation) ResetRole ¶
func (m *PersonMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*PersonMutation) ResetUpdatedAt ¶
func (m *PersonMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PersonMutation) ResetWorkUnit ¶
func (m *PersonMutation) ResetWorkUnit()
ResetWorkUnit resets all changes to the "work_unit" edge.
func (*PersonMutation) ResetWorkUnitID ¶
func (m *PersonMutation) ResetWorkUnitID()
ResetWorkUnitID resets all changes to the "work_unit_id" field.
func (*PersonMutation) Role ¶
func (m *PersonMutation) Role() (r person.Role, exists bool)
Role returns the value of the "role" field in the mutation.
func (*PersonMutation) SetAvatarURL ¶
func (m *PersonMutation) SetAvatarURL(s string)
SetAvatarURL sets the "avatar_url" field.
func (*PersonMutation) SetCreatedAt ¶
func (m *PersonMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PersonMutation) SetEmail ¶
func (m *PersonMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*PersonMutation) SetField ¶
func (m *PersonMutation) 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 (*PersonMutation) SetID ¶
func (m *PersonMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Person entities.
func (*PersonMutation) SetIsEmailVerified ¶
func (m *PersonMutation) SetIsEmailVerified(b bool)
SetIsEmailVerified sets the "is_email_verified" field.
func (*PersonMutation) SetIsPhoneVerified ¶
func (m *PersonMutation) SetIsPhoneVerified(b bool)
SetIsPhoneVerified sets the "is_phone_verified" field.
func (*PersonMutation) SetName ¶
func (m *PersonMutation) SetName(s string)
SetName sets the "name" field.
func (*PersonMutation) SetOp ¶
func (m *PersonMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PersonMutation) SetPasswordHash ¶
func (m *PersonMutation) SetPasswordHash(b []byte)
SetPasswordHash sets the "password_hash" field.
func (*PersonMutation) SetPhone ¶
func (m *PersonMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*PersonMutation) SetRole ¶
func (m *PersonMutation) SetRole(pe person.Role)
SetRole sets the "role" field.
func (*PersonMutation) SetUpdatedAt ¶
func (m *PersonMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PersonMutation) SetWorkUnitID ¶
func (m *PersonMutation) SetWorkUnitID(u uuid.UUID)
SetWorkUnitID sets the "work_unit_id" field.
func (PersonMutation) Tx ¶
func (m PersonMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PersonMutation) Type ¶
func (m *PersonMutation) Type() string
Type returns the node type of this mutation (Person).
func (*PersonMutation) UpdatedAt ¶
func (m *PersonMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PersonMutation) Where ¶
func (m *PersonMutation) Where(ps ...predicate.Person)
Where appends a list predicates to the PersonMutation builder.
func (*PersonMutation) WhereP ¶
func (m *PersonMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PersonMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*PersonMutation) WorkUnitCleared ¶
func (m *PersonMutation) WorkUnitCleared() bool
WorkUnitCleared reports if the "work_unit" edge to the WorkUnitInfo entity was cleared.
func (*PersonMutation) WorkUnitID ¶
func (m *PersonMutation) WorkUnitID() (r uuid.UUID, exists bool)
WorkUnitID returns the value of the "work_unit_id" field in the mutation.
func (*PersonMutation) WorkUnitIDCleared ¶
func (m *PersonMutation) WorkUnitIDCleared() bool
WorkUnitIDCleared returns if the "work_unit_id" field was cleared in this mutation.
func (*PersonMutation) WorkUnitIDs ¶
func (m *PersonMutation) WorkUnitIDs() (ids []uuid.UUID)
WorkUnitIDs returns the "work_unit" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WorkUnitID instead. It exists only for internal usage by the builders.
type PersonQuery ¶
type PersonQuery struct {
// contains filtered or unexported fields
}
PersonQuery is the builder for querying Person entities.
func (*PersonQuery) Aggregate ¶
func (pq *PersonQuery) Aggregate(fns ...AggregateFunc) *PersonSelect
Aggregate returns a PersonSelect configured with the given aggregations.
func (*PersonQuery) All ¶
func (pq *PersonQuery) All(ctx context.Context) ([]*Person, error)
All executes the query and returns a list of Persons.
func (*PersonQuery) AllX ¶
func (pq *PersonQuery) AllX(ctx context.Context) []*Person
AllX is like All, but panics if an error occurs.
func (*PersonQuery) Clone ¶
func (pq *PersonQuery) Clone() *PersonQuery
Clone returns a duplicate of the PersonQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PersonQuery) Count ¶
func (pq *PersonQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PersonQuery) CountX ¶
func (pq *PersonQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PersonQuery) Exist ¶
func (pq *PersonQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PersonQuery) ExistX ¶
func (pq *PersonQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PersonQuery) First ¶
func (pq *PersonQuery) First(ctx context.Context) (*Person, error)
First returns the first Person entity from the query. Returns a *NotFoundError when no Person was found.
func (*PersonQuery) FirstID ¶
FirstID returns the first Person ID from the query. Returns a *NotFoundError when no Person ID was found.
func (*PersonQuery) FirstIDX ¶
func (pq *PersonQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*PersonQuery) FirstX ¶
func (pq *PersonQuery) FirstX(ctx context.Context) *Person
FirstX is like First, but panics if an error occurs.
func (*PersonQuery) GroupBy ¶
func (pq *PersonQuery) GroupBy(field string, fields ...string) *PersonGroupBy
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.Person.Query(). GroupBy(person.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PersonQuery) IDsX ¶
func (pq *PersonQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*PersonQuery) Limit ¶
func (pq *PersonQuery) Limit(limit int) *PersonQuery
Limit the number of records to be returned by this query.
func (*PersonQuery) Offset ¶
func (pq *PersonQuery) Offset(offset int) *PersonQuery
Offset to start from.
func (*PersonQuery) Only ¶
func (pq *PersonQuery) Only(ctx context.Context) (*Person, error)
Only returns a single Person entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Person entity is found. Returns a *NotFoundError when no Person entities are found.
func (*PersonQuery) OnlyID ¶
OnlyID is like Only, but returns the only Person ID in the query. Returns a *NotSingularError when more than one Person ID is found. Returns a *NotFoundError when no entities are found.
func (*PersonQuery) OnlyIDX ¶
func (pq *PersonQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PersonQuery) OnlyX ¶
func (pq *PersonQuery) OnlyX(ctx context.Context) *Person
OnlyX is like Only, but panics if an error occurs.
func (*PersonQuery) Order ¶
func (pq *PersonQuery) Order(o ...person.OrderOption) *PersonQuery
Order specifies how the records should be ordered.
func (*PersonQuery) QueryAddresses ¶
func (pq *PersonQuery) QueryAddresses() *AddressQuery
QueryAddresses chains the current query on the "addresses" edge.
func (*PersonQuery) QueryPersonAddresses ¶
func (pq *PersonQuery) QueryPersonAddresses() *PersonAddressQuery
QueryPersonAddresses chains the current query on the "person_addresses" edge.
func (*PersonQuery) QueryWorkUnit ¶
func (pq *PersonQuery) QueryWorkUnit() *WorkUnitInfoQuery
QueryWorkUnit chains the current query on the "work_unit" edge.
func (*PersonQuery) Select ¶
func (pq *PersonQuery) Select(fields ...string) *PersonSelect
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.Person.Query(). Select(person.FieldCreatedAt). Scan(ctx, &v)
func (*PersonQuery) Unique ¶
func (pq *PersonQuery) Unique(unique bool) *PersonQuery
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 (*PersonQuery) Where ¶
func (pq *PersonQuery) Where(ps ...predicate.Person) *PersonQuery
Where adds a new predicate for the PersonQuery builder.
func (*PersonQuery) WithAddresses ¶
func (pq *PersonQuery) WithAddresses(opts ...func(*AddressQuery)) *PersonQuery
WithAddresses tells the query-builder to eager-load the nodes that are connected to the "addresses" edge. The optional arguments are used to configure the query builder of the edge.
func (*PersonQuery) WithPersonAddresses ¶
func (pq *PersonQuery) WithPersonAddresses(opts ...func(*PersonAddressQuery)) *PersonQuery
WithPersonAddresses tells the query-builder to eager-load the nodes that are connected to the "person_addresses" edge. The optional arguments are used to configure the query builder of the edge.
func (*PersonQuery) WithWorkUnit ¶
func (pq *PersonQuery) WithWorkUnit(opts ...func(*WorkUnitInfoQuery)) *PersonQuery
WithWorkUnit tells the query-builder to eager-load the nodes that are connected to the "work_unit" edge. The optional arguments are used to configure the query builder of the edge.
type PersonSelect ¶
type PersonSelect struct { *PersonQuery // contains filtered or unexported fields }
PersonSelect is the builder for selecting fields of Person entities.
func (*PersonSelect) Aggregate ¶
func (ps *PersonSelect) Aggregate(fns ...AggregateFunc) *PersonSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PersonSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PersonSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PersonSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PersonSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PersonSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PersonSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PersonSelect) Scan ¶
func (ps *PersonSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PersonSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PersonUpdate ¶
type PersonUpdate struct {
// contains filtered or unexported fields
}
PersonUpdate is the builder for updating Person entities.
func (*PersonUpdate) AddAddressIDs ¶
func (pu *PersonUpdate) AddAddressIDs(ids ...uuid.UUID) *PersonUpdate
AddAddressIDs adds the "addresses" edge to the Address entity by IDs.
func (*PersonUpdate) AddAddresses ¶
func (pu *PersonUpdate) AddAddresses(a ...*Address) *PersonUpdate
AddAddresses adds the "addresses" edges to the Address entity.
func (*PersonUpdate) ClearAddresses ¶
func (pu *PersonUpdate) ClearAddresses() *PersonUpdate
ClearAddresses clears all "addresses" edges to the Address entity.
func (*PersonUpdate) ClearAvatarURL ¶
func (pu *PersonUpdate) ClearAvatarURL() *PersonUpdate
ClearAvatarURL clears the value of the "avatar_url" field.
func (*PersonUpdate) ClearPasswordHash ¶
func (pu *PersonUpdate) ClearPasswordHash() *PersonUpdate
ClearPasswordHash clears the value of the "password_hash" field.
func (*PersonUpdate) ClearPhone ¶
func (pu *PersonUpdate) ClearPhone() *PersonUpdate
ClearPhone clears the value of the "phone" field.
func (*PersonUpdate) ClearWorkUnit ¶
func (pu *PersonUpdate) ClearWorkUnit() *PersonUpdate
ClearWorkUnit clears the "work_unit" edge to the WorkUnitInfo entity.
func (*PersonUpdate) ClearWorkUnitID ¶
func (pu *PersonUpdate) ClearWorkUnitID() *PersonUpdate
ClearWorkUnitID clears the value of the "work_unit_id" field.
func (*PersonUpdate) Exec ¶
func (pu *PersonUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PersonUpdate) ExecX ¶
func (pu *PersonUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonUpdate) Mutation ¶
func (pu *PersonUpdate) Mutation() *PersonMutation
Mutation returns the PersonMutation object of the builder.
func (*PersonUpdate) RemoveAddressIDs ¶
func (pu *PersonUpdate) RemoveAddressIDs(ids ...uuid.UUID) *PersonUpdate
RemoveAddressIDs removes the "addresses" edge to Address entities by IDs.
func (*PersonUpdate) RemoveAddresses ¶
func (pu *PersonUpdate) RemoveAddresses(a ...*Address) *PersonUpdate
RemoveAddresses removes "addresses" edges to Address entities.
func (*PersonUpdate) Save ¶
func (pu *PersonUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PersonUpdate) SaveX ¶
func (pu *PersonUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PersonUpdate) SetAvatarURL ¶
func (pu *PersonUpdate) SetAvatarURL(s string) *PersonUpdate
SetAvatarURL sets the "avatar_url" field.
func (*PersonUpdate) SetEmail ¶
func (pu *PersonUpdate) SetEmail(s string) *PersonUpdate
SetEmail sets the "email" field.
func (*PersonUpdate) SetIsEmailVerified ¶
func (pu *PersonUpdate) SetIsEmailVerified(b bool) *PersonUpdate
SetIsEmailVerified sets the "is_email_verified" field.
func (*PersonUpdate) SetIsPhoneVerified ¶
func (pu *PersonUpdate) SetIsPhoneVerified(b bool) *PersonUpdate
SetIsPhoneVerified sets the "is_phone_verified" field.
func (*PersonUpdate) SetName ¶
func (pu *PersonUpdate) SetName(s string) *PersonUpdate
SetName sets the "name" field.
func (*PersonUpdate) SetNillableAvatarURL ¶
func (pu *PersonUpdate) SetNillableAvatarURL(s *string) *PersonUpdate
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*PersonUpdate) SetNillableEmail ¶
func (pu *PersonUpdate) SetNillableEmail(s *string) *PersonUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*PersonUpdate) SetNillableIsEmailVerified ¶
func (pu *PersonUpdate) SetNillableIsEmailVerified(b *bool) *PersonUpdate
SetNillableIsEmailVerified sets the "is_email_verified" field if the given value is not nil.
func (*PersonUpdate) SetNillableIsPhoneVerified ¶
func (pu *PersonUpdate) SetNillableIsPhoneVerified(b *bool) *PersonUpdate
SetNillableIsPhoneVerified sets the "is_phone_verified" field if the given value is not nil.
func (*PersonUpdate) SetNillableName ¶
func (pu *PersonUpdate) SetNillableName(s *string) *PersonUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*PersonUpdate) SetNillablePhone ¶
func (pu *PersonUpdate) SetNillablePhone(s *string) *PersonUpdate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*PersonUpdate) SetNillableRole ¶
func (pu *PersonUpdate) SetNillableRole(pe *person.Role) *PersonUpdate
SetNillableRole sets the "role" field if the given value is not nil.
func (*PersonUpdate) SetNillableWorkUnitID ¶
func (pu *PersonUpdate) SetNillableWorkUnitID(u *uuid.UUID) *PersonUpdate
SetNillableWorkUnitID sets the "work_unit_id" field if the given value is not nil.
func (*PersonUpdate) SetPasswordHash ¶
func (pu *PersonUpdate) SetPasswordHash(b []byte) *PersonUpdate
SetPasswordHash sets the "password_hash" field.
func (*PersonUpdate) SetPhone ¶
func (pu *PersonUpdate) SetPhone(s string) *PersonUpdate
SetPhone sets the "phone" field.
func (*PersonUpdate) SetRole ¶
func (pu *PersonUpdate) SetRole(pe person.Role) *PersonUpdate
SetRole sets the "role" field.
func (*PersonUpdate) SetUpdatedAt ¶
func (pu *PersonUpdate) SetUpdatedAt(t time.Time) *PersonUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PersonUpdate) SetWorkUnit ¶
func (pu *PersonUpdate) SetWorkUnit(w *WorkUnitInfo) *PersonUpdate
SetWorkUnit sets the "work_unit" edge to the WorkUnitInfo entity.
func (*PersonUpdate) SetWorkUnitID ¶
func (pu *PersonUpdate) SetWorkUnitID(u uuid.UUID) *PersonUpdate
SetWorkUnitID sets the "work_unit_id" field.
func (*PersonUpdate) Where ¶
func (pu *PersonUpdate) Where(ps ...predicate.Person) *PersonUpdate
Where appends a list predicates to the PersonUpdate builder.
type PersonUpdateOne ¶
type PersonUpdateOne struct {
// contains filtered or unexported fields
}
PersonUpdateOne is the builder for updating a single Person entity.
func (*PersonUpdateOne) AddAddressIDs ¶
func (puo *PersonUpdateOne) AddAddressIDs(ids ...uuid.UUID) *PersonUpdateOne
AddAddressIDs adds the "addresses" edge to the Address entity by IDs.
func (*PersonUpdateOne) AddAddresses ¶
func (puo *PersonUpdateOne) AddAddresses(a ...*Address) *PersonUpdateOne
AddAddresses adds the "addresses" edges to the Address entity.
func (*PersonUpdateOne) ClearAddresses ¶
func (puo *PersonUpdateOne) ClearAddresses() *PersonUpdateOne
ClearAddresses clears all "addresses" edges to the Address entity.
func (*PersonUpdateOne) ClearAvatarURL ¶
func (puo *PersonUpdateOne) ClearAvatarURL() *PersonUpdateOne
ClearAvatarURL clears the value of the "avatar_url" field.
func (*PersonUpdateOne) ClearPasswordHash ¶
func (puo *PersonUpdateOne) ClearPasswordHash() *PersonUpdateOne
ClearPasswordHash clears the value of the "password_hash" field.
func (*PersonUpdateOne) ClearPhone ¶
func (puo *PersonUpdateOne) ClearPhone() *PersonUpdateOne
ClearPhone clears the value of the "phone" field.
func (*PersonUpdateOne) ClearWorkUnit ¶
func (puo *PersonUpdateOne) ClearWorkUnit() *PersonUpdateOne
ClearWorkUnit clears the "work_unit" edge to the WorkUnitInfo entity.
func (*PersonUpdateOne) ClearWorkUnitID ¶
func (puo *PersonUpdateOne) ClearWorkUnitID() *PersonUpdateOne
ClearWorkUnitID clears the value of the "work_unit_id" field.
func (*PersonUpdateOne) Exec ¶
func (puo *PersonUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PersonUpdateOne) ExecX ¶
func (puo *PersonUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PersonUpdateOne) Mutation ¶
func (puo *PersonUpdateOne) Mutation() *PersonMutation
Mutation returns the PersonMutation object of the builder.
func (*PersonUpdateOne) RemoveAddressIDs ¶
func (puo *PersonUpdateOne) RemoveAddressIDs(ids ...uuid.UUID) *PersonUpdateOne
RemoveAddressIDs removes the "addresses" edge to Address entities by IDs.
func (*PersonUpdateOne) RemoveAddresses ¶
func (puo *PersonUpdateOne) RemoveAddresses(a ...*Address) *PersonUpdateOne
RemoveAddresses removes "addresses" edges to Address entities.
func (*PersonUpdateOne) Save ¶
func (puo *PersonUpdateOne) Save(ctx context.Context) (*Person, error)
Save executes the query and returns the updated Person entity.
func (*PersonUpdateOne) SaveX ¶
func (puo *PersonUpdateOne) SaveX(ctx context.Context) *Person
SaveX is like Save, but panics if an error occurs.
func (*PersonUpdateOne) Select ¶
func (puo *PersonUpdateOne) Select(field string, fields ...string) *PersonUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PersonUpdateOne) SetAvatarURL ¶
func (puo *PersonUpdateOne) SetAvatarURL(s string) *PersonUpdateOne
SetAvatarURL sets the "avatar_url" field.
func (*PersonUpdateOne) SetEmail ¶
func (puo *PersonUpdateOne) SetEmail(s string) *PersonUpdateOne
SetEmail sets the "email" field.
func (*PersonUpdateOne) SetIsEmailVerified ¶
func (puo *PersonUpdateOne) SetIsEmailVerified(b bool) *PersonUpdateOne
SetIsEmailVerified sets the "is_email_verified" field.
func (*PersonUpdateOne) SetIsPhoneVerified ¶
func (puo *PersonUpdateOne) SetIsPhoneVerified(b bool) *PersonUpdateOne
SetIsPhoneVerified sets the "is_phone_verified" field.
func (*PersonUpdateOne) SetName ¶
func (puo *PersonUpdateOne) SetName(s string) *PersonUpdateOne
SetName sets the "name" field.
func (*PersonUpdateOne) SetNillableAvatarURL ¶
func (puo *PersonUpdateOne) SetNillableAvatarURL(s *string) *PersonUpdateOne
SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.
func (*PersonUpdateOne) SetNillableEmail ¶
func (puo *PersonUpdateOne) SetNillableEmail(s *string) *PersonUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*PersonUpdateOne) SetNillableIsEmailVerified ¶
func (puo *PersonUpdateOne) SetNillableIsEmailVerified(b *bool) *PersonUpdateOne
SetNillableIsEmailVerified sets the "is_email_verified" field if the given value is not nil.
func (*PersonUpdateOne) SetNillableIsPhoneVerified ¶
func (puo *PersonUpdateOne) SetNillableIsPhoneVerified(b *bool) *PersonUpdateOne
SetNillableIsPhoneVerified sets the "is_phone_verified" field if the given value is not nil.
func (*PersonUpdateOne) SetNillableName ¶
func (puo *PersonUpdateOne) SetNillableName(s *string) *PersonUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*PersonUpdateOne) SetNillablePhone ¶
func (puo *PersonUpdateOne) SetNillablePhone(s *string) *PersonUpdateOne
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*PersonUpdateOne) SetNillableRole ¶
func (puo *PersonUpdateOne) SetNillableRole(pe *person.Role) *PersonUpdateOne
SetNillableRole sets the "role" field if the given value is not nil.
func (*PersonUpdateOne) SetNillableWorkUnitID ¶
func (puo *PersonUpdateOne) SetNillableWorkUnitID(u *uuid.UUID) *PersonUpdateOne
SetNillableWorkUnitID sets the "work_unit_id" field if the given value is not nil.
func (*PersonUpdateOne) SetPasswordHash ¶
func (puo *PersonUpdateOne) SetPasswordHash(b []byte) *PersonUpdateOne
SetPasswordHash sets the "password_hash" field.
func (*PersonUpdateOne) SetPhone ¶
func (puo *PersonUpdateOne) SetPhone(s string) *PersonUpdateOne
SetPhone sets the "phone" field.
func (*PersonUpdateOne) SetRole ¶
func (puo *PersonUpdateOne) SetRole(pe person.Role) *PersonUpdateOne
SetRole sets the "role" field.
func (*PersonUpdateOne) SetUpdatedAt ¶
func (puo *PersonUpdateOne) SetUpdatedAt(t time.Time) *PersonUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PersonUpdateOne) SetWorkUnit ¶
func (puo *PersonUpdateOne) SetWorkUnit(w *WorkUnitInfo) *PersonUpdateOne
SetWorkUnit sets the "work_unit" edge to the WorkUnitInfo entity.
func (*PersonUpdateOne) SetWorkUnitID ¶
func (puo *PersonUpdateOne) SetWorkUnitID(u uuid.UUID) *PersonUpdateOne
SetWorkUnitID sets the "work_unit_id" field.
func (*PersonUpdateOne) Where ¶
func (puo *PersonUpdateOne) Where(ps ...predicate.Person) *PersonUpdateOne
Where appends a list predicates to the PersonUpdate builder.
type ProductColor ¶
type ProductColor struct { // ID of the ent. ID string `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // ColorCode holds the value of the "color_code" field. ColorCode string `json:"color_code,omitempty"` // contains filtered or unexported fields }
ProductColor is the model entity for the ProductColor schema.
func (*ProductColor) String ¶
func (pc *ProductColor) String() string
String implements the fmt.Stringer.
func (*ProductColor) Unwrap ¶
func (pc *ProductColor) Unwrap() *ProductColor
Unwrap unwraps the ProductColor 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 (*ProductColor) Update ¶
func (pc *ProductColor) Update() *ProductColorUpdateOne
Update returns a builder for updating this ProductColor. Note that you need to call ProductColor.Unwrap() before calling this method if this ProductColor was returned from a transaction, and the transaction was committed or rolled back.
type ProductColorClient ¶
type ProductColorClient struct {
// contains filtered or unexported fields
}
ProductColorClient is a client for the ProductColor schema.
func NewProductColorClient ¶
func NewProductColorClient(c config) *ProductColorClient
NewProductColorClient returns a client for the ProductColor from the given config.
func (*ProductColorClient) Create ¶
func (c *ProductColorClient) Create() *ProductColorCreate
Create returns a builder for creating a ProductColor entity.
func (*ProductColorClient) CreateBulk ¶
func (c *ProductColorClient) CreateBulk(builders ...*ProductColorCreate) *ProductColorCreateBulk
CreateBulk returns a builder for creating a bulk of ProductColor entities.
func (*ProductColorClient) Delete ¶
func (c *ProductColorClient) Delete() *ProductColorDelete
Delete returns a delete builder for ProductColor.
func (*ProductColorClient) DeleteOne ¶
func (c *ProductColorClient) DeleteOne(pc *ProductColor) *ProductColorDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProductColorClient) DeleteOneID ¶
func (c *ProductColorClient) DeleteOneID(id string) *ProductColorDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProductColorClient) Get ¶
func (c *ProductColorClient) Get(ctx context.Context, id string) (*ProductColor, error)
Get returns a ProductColor entity by its id.
func (*ProductColorClient) GetX ¶
func (c *ProductColorClient) GetX(ctx context.Context, id string) *ProductColor
GetX is like Get, but panics if an error occurs.
func (*ProductColorClient) Hooks ¶
func (c *ProductColorClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProductColorClient) Intercept ¶
func (c *ProductColorClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `productcolor.Intercept(f(g(h())))`.
func (*ProductColorClient) Interceptors ¶
func (c *ProductColorClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProductColorClient) MapCreateBulk ¶
func (c *ProductColorClient) MapCreateBulk(slice any, setFunc func(*ProductColorCreate, int)) *ProductColorCreateBulk
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 (*ProductColorClient) Query ¶
func (c *ProductColorClient) Query() *ProductColorQuery
Query returns a query builder for ProductColor.
func (*ProductColorClient) Update ¶
func (c *ProductColorClient) Update() *ProductColorUpdate
Update returns an update builder for ProductColor.
func (*ProductColorClient) UpdateOne ¶
func (c *ProductColorClient) UpdateOne(pc *ProductColor) *ProductColorUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProductColorClient) UpdateOneID ¶
func (c *ProductColorClient) UpdateOneID(id string) *ProductColorUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProductColorClient) Use ¶
func (c *ProductColorClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `productcolor.Hooks(f(g(h())))`.
type ProductColorCreate ¶
type ProductColorCreate struct {
// contains filtered or unexported fields
}
ProductColorCreate is the builder for creating a ProductColor entity.
func (*ProductColorCreate) Exec ¶
func (pcc *ProductColorCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductColorCreate) ExecX ¶
func (pcc *ProductColorCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductColorCreate) Mutation ¶
func (pcc *ProductColorCreate) Mutation() *ProductColorMutation
Mutation returns the ProductColorMutation object of the builder.
func (*ProductColorCreate) Save ¶
func (pcc *ProductColorCreate) Save(ctx context.Context) (*ProductColor, error)
Save creates the ProductColor in the database.
func (*ProductColorCreate) SaveX ¶
func (pcc *ProductColorCreate) SaveX(ctx context.Context) *ProductColor
SaveX calls Save and panics if Save returns an error.
func (*ProductColorCreate) SetColorCode ¶
func (pcc *ProductColorCreate) SetColorCode(s string) *ProductColorCreate
SetColorCode sets the "color_code" field.
func (*ProductColorCreate) SetCreatedAt ¶
func (pcc *ProductColorCreate) SetCreatedAt(t time.Time) *ProductColorCreate
SetCreatedAt sets the "created_at" field.
func (*ProductColorCreate) SetID ¶
func (pcc *ProductColorCreate) SetID(s string) *ProductColorCreate
SetID sets the "id" field.
func (*ProductColorCreate) SetName ¶
func (pcc *ProductColorCreate) SetName(s string) *ProductColorCreate
SetName sets the "name" field.
func (*ProductColorCreate) SetNillableCreatedAt ¶
func (pcc *ProductColorCreate) SetNillableCreatedAt(t *time.Time) *ProductColorCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProductColorCreate) SetNillableUpdatedAt ¶
func (pcc *ProductColorCreate) SetNillableUpdatedAt(t *time.Time) *ProductColorCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ProductColorCreate) SetUpdatedAt ¶
func (pcc *ProductColorCreate) SetUpdatedAt(t time.Time) *ProductColorCreate
SetUpdatedAt sets the "updated_at" field.
type ProductColorCreateBulk ¶
type ProductColorCreateBulk struct {
// contains filtered or unexported fields
}
ProductColorCreateBulk is the builder for creating many ProductColor entities in bulk.
func (*ProductColorCreateBulk) Exec ¶
func (pccb *ProductColorCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductColorCreateBulk) ExecX ¶
func (pccb *ProductColorCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductColorCreateBulk) Save ¶
func (pccb *ProductColorCreateBulk) Save(ctx context.Context) ([]*ProductColor, error)
Save creates the ProductColor entities in the database.
func (*ProductColorCreateBulk) SaveX ¶
func (pccb *ProductColorCreateBulk) SaveX(ctx context.Context) []*ProductColor
SaveX is like Save, but panics if an error occurs.
type ProductColorDelete ¶
type ProductColorDelete struct {
// contains filtered or unexported fields
}
ProductColorDelete is the builder for deleting a ProductColor entity.
func (*ProductColorDelete) Exec ¶
func (pcd *ProductColorDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProductColorDelete) ExecX ¶
func (pcd *ProductColorDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProductColorDelete) Where ¶
func (pcd *ProductColorDelete) Where(ps ...predicate.ProductColor) *ProductColorDelete
Where appends a list predicates to the ProductColorDelete builder.
type ProductColorDeleteOne ¶
type ProductColorDeleteOne struct {
// contains filtered or unexported fields
}
ProductColorDeleteOne is the builder for deleting a single ProductColor entity.
func (*ProductColorDeleteOne) Exec ¶
func (pcdo *ProductColorDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProductColorDeleteOne) ExecX ¶
func (pcdo *ProductColorDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductColorDeleteOne) Where ¶
func (pcdo *ProductColorDeleteOne) Where(ps ...predicate.ProductColor) *ProductColorDeleteOne
Where appends a list predicates to the ProductColorDelete builder.
type ProductColorGroupBy ¶
type ProductColorGroupBy struct {
// contains filtered or unexported fields
}
ProductColorGroupBy is the group-by builder for ProductColor entities.
func (*ProductColorGroupBy) Aggregate ¶
func (pcgb *ProductColorGroupBy) Aggregate(fns ...AggregateFunc) *ProductColorGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProductColorGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductColorGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductColorGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductColorGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductColorGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductColorGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductColorGroupBy) Scan ¶
func (pcgb *ProductColorGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductColorGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductColorMutation ¶
type ProductColorMutation struct {
// contains filtered or unexported fields
}
ProductColorMutation represents an operation that mutates the ProductColor nodes in the graph.
func (*ProductColorMutation) AddField ¶
func (m *ProductColorMutation) 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 (*ProductColorMutation) AddedEdges ¶
func (m *ProductColorMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProductColorMutation) AddedField ¶
func (m *ProductColorMutation) 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 (*ProductColorMutation) AddedFields ¶
func (m *ProductColorMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProductColorMutation) AddedIDs ¶
func (m *ProductColorMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProductColorMutation) ClearEdge ¶
func (m *ProductColorMutation) 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 (*ProductColorMutation) ClearField ¶
func (m *ProductColorMutation) 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 (*ProductColorMutation) ClearedEdges ¶
func (m *ProductColorMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProductColorMutation) ClearedFields ¶
func (m *ProductColorMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProductColorMutation) Client ¶
func (m ProductColorMutation) 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 (*ProductColorMutation) ColorCode ¶
func (m *ProductColorMutation) ColorCode() (r string, exists bool)
ColorCode returns the value of the "color_code" field in the mutation.
func (*ProductColorMutation) CreatedAt ¶
func (m *ProductColorMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ProductColorMutation) EdgeCleared ¶
func (m *ProductColorMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProductColorMutation) Field ¶
func (m *ProductColorMutation) 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 (*ProductColorMutation) FieldCleared ¶
func (m *ProductColorMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProductColorMutation) Fields ¶
func (m *ProductColorMutation) 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 (*ProductColorMutation) ID ¶
func (m *ProductColorMutation) ID() (id string, 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 (*ProductColorMutation) IDs ¶
func (m *ProductColorMutation) IDs(ctx context.Context) ([]string, 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 (*ProductColorMutation) Name ¶
func (m *ProductColorMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ProductColorMutation) OldColorCode ¶
func (m *ProductColorMutation) OldColorCode(ctx context.Context) (v string, err error)
OldColorCode returns the old "color_code" field's value of the ProductColor entity. If the ProductColor 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 (*ProductColorMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ProductColor entity. If the ProductColor 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 (*ProductColorMutation) 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 (*ProductColorMutation) OldName ¶
func (m *ProductColorMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the ProductColor entity. If the ProductColor 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 (*ProductColorMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the ProductColor entity. If the ProductColor 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 (*ProductColorMutation) Op ¶
func (m *ProductColorMutation) Op() Op
Op returns the operation name.
func (*ProductColorMutation) RemovedEdges ¶
func (m *ProductColorMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProductColorMutation) RemovedIDs ¶
func (m *ProductColorMutation) 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 (*ProductColorMutation) ResetColorCode ¶
func (m *ProductColorMutation) ResetColorCode()
ResetColorCode resets all changes to the "color_code" field.
func (*ProductColorMutation) ResetCreatedAt ¶
func (m *ProductColorMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ProductColorMutation) ResetEdge ¶
func (m *ProductColorMutation) 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 (*ProductColorMutation) ResetField ¶
func (m *ProductColorMutation) 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 (*ProductColorMutation) ResetName ¶
func (m *ProductColorMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ProductColorMutation) ResetUpdatedAt ¶
func (m *ProductColorMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ProductColorMutation) SetColorCode ¶
func (m *ProductColorMutation) SetColorCode(s string)
SetColorCode sets the "color_code" field.
func (*ProductColorMutation) SetCreatedAt ¶
func (m *ProductColorMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ProductColorMutation) SetField ¶
func (m *ProductColorMutation) 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 (*ProductColorMutation) SetID ¶
func (m *ProductColorMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ProductColor entities.
func (*ProductColorMutation) SetName ¶
func (m *ProductColorMutation) SetName(s string)
SetName sets the "name" field.
func (*ProductColorMutation) SetOp ¶
func (m *ProductColorMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProductColorMutation) SetUpdatedAt ¶
func (m *ProductColorMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (ProductColorMutation) Tx ¶
func (m ProductColorMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProductColorMutation) Type ¶
func (m *ProductColorMutation) Type() string
Type returns the node type of this mutation (ProductColor).
func (*ProductColorMutation) UpdatedAt ¶
func (m *ProductColorMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ProductColorMutation) Where ¶
func (m *ProductColorMutation) Where(ps ...predicate.ProductColor)
Where appends a list predicates to the ProductColorMutation builder.
func (*ProductColorMutation) WhereP ¶
func (m *ProductColorMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProductColorMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProductColorQuery ¶
type ProductColorQuery struct {
// contains filtered or unexported fields
}
ProductColorQuery is the builder for querying ProductColor entities.
func (*ProductColorQuery) Aggregate ¶
func (pcq *ProductColorQuery) Aggregate(fns ...AggregateFunc) *ProductColorSelect
Aggregate returns a ProductColorSelect configured with the given aggregations.
func (*ProductColorQuery) All ¶
func (pcq *ProductColorQuery) All(ctx context.Context) ([]*ProductColor, error)
All executes the query and returns a list of ProductColors.
func (*ProductColorQuery) AllX ¶
func (pcq *ProductColorQuery) AllX(ctx context.Context) []*ProductColor
AllX is like All, but panics if an error occurs.
func (*ProductColorQuery) Clone ¶
func (pcq *ProductColorQuery) Clone() *ProductColorQuery
Clone returns a duplicate of the ProductColorQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProductColorQuery) Count ¶
func (pcq *ProductColorQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProductColorQuery) CountX ¶
func (pcq *ProductColorQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProductColorQuery) Exist ¶
func (pcq *ProductColorQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProductColorQuery) ExistX ¶
func (pcq *ProductColorQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProductColorQuery) First ¶
func (pcq *ProductColorQuery) First(ctx context.Context) (*ProductColor, error)
First returns the first ProductColor entity from the query. Returns a *NotFoundError when no ProductColor was found.
func (*ProductColorQuery) FirstID ¶
func (pcq *ProductColorQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first ProductColor ID from the query. Returns a *NotFoundError when no ProductColor ID was found.
func (*ProductColorQuery) FirstIDX ¶
func (pcq *ProductColorQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProductColorQuery) FirstX ¶
func (pcq *ProductColorQuery) FirstX(ctx context.Context) *ProductColor
FirstX is like First, but panics if an error occurs.
func (*ProductColorQuery) GroupBy ¶
func (pcq *ProductColorQuery) GroupBy(field string, fields ...string) *ProductColorGroupBy
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.ProductColor.Query(). GroupBy(productcolor.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProductColorQuery) IDs ¶
func (pcq *ProductColorQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of ProductColor IDs.
func (*ProductColorQuery) IDsX ¶
func (pcq *ProductColorQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*ProductColorQuery) Limit ¶
func (pcq *ProductColorQuery) Limit(limit int) *ProductColorQuery
Limit the number of records to be returned by this query.
func (*ProductColorQuery) Offset ¶
func (pcq *ProductColorQuery) Offset(offset int) *ProductColorQuery
Offset to start from.
func (*ProductColorQuery) Only ¶
func (pcq *ProductColorQuery) Only(ctx context.Context) (*ProductColor, error)
Only returns a single ProductColor entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ProductColor entity is found. Returns a *NotFoundError when no ProductColor entities are found.
func (*ProductColorQuery) OnlyID ¶
func (pcq *ProductColorQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only ProductColor ID in the query. Returns a *NotSingularError when more than one ProductColor ID is found. Returns a *NotFoundError when no entities are found.
func (*ProductColorQuery) OnlyIDX ¶
func (pcq *ProductColorQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProductColorQuery) OnlyX ¶
func (pcq *ProductColorQuery) OnlyX(ctx context.Context) *ProductColor
OnlyX is like Only, but panics if an error occurs.
func (*ProductColorQuery) Order ¶
func (pcq *ProductColorQuery) Order(o ...productcolor.OrderOption) *ProductColorQuery
Order specifies how the records should be ordered.
func (*ProductColorQuery) Select ¶
func (pcq *ProductColorQuery) Select(fields ...string) *ProductColorSelect
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.ProductColor.Query(). Select(productcolor.FieldCreatedAt). Scan(ctx, &v)
func (*ProductColorQuery) Unique ¶
func (pcq *ProductColorQuery) Unique(unique bool) *ProductColorQuery
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 (*ProductColorQuery) Where ¶
func (pcq *ProductColorQuery) Where(ps ...predicate.ProductColor) *ProductColorQuery
Where adds a new predicate for the ProductColorQuery builder.
type ProductColorSelect ¶
type ProductColorSelect struct { *ProductColorQuery // contains filtered or unexported fields }
ProductColorSelect is the builder for selecting fields of ProductColor entities.
func (*ProductColorSelect) Aggregate ¶
func (pcs *ProductColorSelect) Aggregate(fns ...AggregateFunc) *ProductColorSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProductColorSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductColorSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductColorSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductColorSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductColorSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductColorSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductColorSelect) Scan ¶
func (pcs *ProductColorSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductColorSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductColorUpdate ¶
type ProductColorUpdate struct {
// contains filtered or unexported fields
}
ProductColorUpdate is the builder for updating ProductColor entities.
func (*ProductColorUpdate) Exec ¶
func (pcu *ProductColorUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductColorUpdate) ExecX ¶
func (pcu *ProductColorUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductColorUpdate) Mutation ¶
func (pcu *ProductColorUpdate) Mutation() *ProductColorMutation
Mutation returns the ProductColorMutation object of the builder.
func (*ProductColorUpdate) Save ¶
func (pcu *ProductColorUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProductColorUpdate) SaveX ¶
func (pcu *ProductColorUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProductColorUpdate) SetColorCode ¶
func (pcu *ProductColorUpdate) SetColorCode(s string) *ProductColorUpdate
SetColorCode sets the "color_code" field.
func (*ProductColorUpdate) SetName ¶
func (pcu *ProductColorUpdate) SetName(s string) *ProductColorUpdate
SetName sets the "name" field.
func (*ProductColorUpdate) SetNillableColorCode ¶
func (pcu *ProductColorUpdate) SetNillableColorCode(s *string) *ProductColorUpdate
SetNillableColorCode sets the "color_code" field if the given value is not nil.
func (*ProductColorUpdate) SetNillableName ¶
func (pcu *ProductColorUpdate) SetNillableName(s *string) *ProductColorUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ProductColorUpdate) SetUpdatedAt ¶
func (pcu *ProductColorUpdate) SetUpdatedAt(t time.Time) *ProductColorUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ProductColorUpdate) Where ¶
func (pcu *ProductColorUpdate) Where(ps ...predicate.ProductColor) *ProductColorUpdate
Where appends a list predicates to the ProductColorUpdate builder.
type ProductColorUpdateOne ¶
type ProductColorUpdateOne struct {
// contains filtered or unexported fields
}
ProductColorUpdateOne is the builder for updating a single ProductColor entity.
func (*ProductColorUpdateOne) Exec ¶
func (pcuo *ProductColorUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProductColorUpdateOne) ExecX ¶
func (pcuo *ProductColorUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductColorUpdateOne) Mutation ¶
func (pcuo *ProductColorUpdateOne) Mutation() *ProductColorMutation
Mutation returns the ProductColorMutation object of the builder.
func (*ProductColorUpdateOne) Save ¶
func (pcuo *ProductColorUpdateOne) Save(ctx context.Context) (*ProductColor, error)
Save executes the query and returns the updated ProductColor entity.
func (*ProductColorUpdateOne) SaveX ¶
func (pcuo *ProductColorUpdateOne) SaveX(ctx context.Context) *ProductColor
SaveX is like Save, but panics if an error occurs.
func (*ProductColorUpdateOne) Select ¶
func (pcuo *ProductColorUpdateOne) Select(field string, fields ...string) *ProductColorUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProductColorUpdateOne) SetColorCode ¶
func (pcuo *ProductColorUpdateOne) SetColorCode(s string) *ProductColorUpdateOne
SetColorCode sets the "color_code" field.
func (*ProductColorUpdateOne) SetName ¶
func (pcuo *ProductColorUpdateOne) SetName(s string) *ProductColorUpdateOne
SetName sets the "name" field.
func (*ProductColorUpdateOne) SetNillableColorCode ¶
func (pcuo *ProductColorUpdateOne) SetNillableColorCode(s *string) *ProductColorUpdateOne
SetNillableColorCode sets the "color_code" field if the given value is not nil.
func (*ProductColorUpdateOne) SetNillableName ¶
func (pcuo *ProductColorUpdateOne) SetNillableName(s *string) *ProductColorUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ProductColorUpdateOne) SetUpdatedAt ¶
func (pcuo *ProductColorUpdateOne) SetUpdatedAt(t time.Time) *ProductColorUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ProductColorUpdateOne) Where ¶
func (pcuo *ProductColorUpdateOne) Where(ps ...predicate.ProductColor) *ProductColorUpdateOne
Where appends a list predicates to the ProductColorUpdate builder.
type ProductColors ¶
type ProductColors []*ProductColor
ProductColors is a parsable slice of ProductColor.
type ProductImage ¶
type ProductImage struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // ProductID holds the value of the "product_id" field. ProductID string `json:"product_id,omitempty"` // ImageURL holds the value of the "image_url" field. ImageURL string `json:"image_url,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ProductImageQuery when eager-loading is set. Edges ProductImageEdges `json:"edges"` // contains filtered or unexported fields }
ProductImage is the model entity for the ProductImage schema.
func (*ProductImage) QueryProduct ¶
func (pi *ProductImage) QueryProduct() *ProductInfoQuery
QueryProduct queries the "product" edge of the ProductImage entity.
func (*ProductImage) String ¶
func (pi *ProductImage) String() string
String implements the fmt.Stringer.
func (*ProductImage) Unwrap ¶
func (pi *ProductImage) Unwrap() *ProductImage
Unwrap unwraps the ProductImage 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 (*ProductImage) Update ¶
func (pi *ProductImage) Update() *ProductImageUpdateOne
Update returns a builder for updating this ProductImage. Note that you need to call ProductImage.Unwrap() before calling this method if this ProductImage was returned from a transaction, and the transaction was committed or rolled back.
type ProductImageClient ¶
type ProductImageClient struct {
// contains filtered or unexported fields
}
ProductImageClient is a client for the ProductImage schema.
func NewProductImageClient ¶
func NewProductImageClient(c config) *ProductImageClient
NewProductImageClient returns a client for the ProductImage from the given config.
func (*ProductImageClient) Create ¶
func (c *ProductImageClient) Create() *ProductImageCreate
Create returns a builder for creating a ProductImage entity.
func (*ProductImageClient) CreateBulk ¶
func (c *ProductImageClient) CreateBulk(builders ...*ProductImageCreate) *ProductImageCreateBulk
CreateBulk returns a builder for creating a bulk of ProductImage entities.
func (*ProductImageClient) Delete ¶
func (c *ProductImageClient) Delete() *ProductImageDelete
Delete returns a delete builder for ProductImage.
func (*ProductImageClient) DeleteOne ¶
func (c *ProductImageClient) DeleteOne(pi *ProductImage) *ProductImageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProductImageClient) DeleteOneID ¶
func (c *ProductImageClient) DeleteOneID(id uuid.UUID) *ProductImageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProductImageClient) Get ¶
func (c *ProductImageClient) Get(ctx context.Context, id uuid.UUID) (*ProductImage, error)
Get returns a ProductImage entity by its id.
func (*ProductImageClient) GetX ¶
func (c *ProductImageClient) GetX(ctx context.Context, id uuid.UUID) *ProductImage
GetX is like Get, but panics if an error occurs.
func (*ProductImageClient) Hooks ¶
func (c *ProductImageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProductImageClient) Intercept ¶
func (c *ProductImageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `productimage.Intercept(f(g(h())))`.
func (*ProductImageClient) Interceptors ¶
func (c *ProductImageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProductImageClient) MapCreateBulk ¶
func (c *ProductImageClient) MapCreateBulk(slice any, setFunc func(*ProductImageCreate, int)) *ProductImageCreateBulk
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 (*ProductImageClient) Query ¶
func (c *ProductImageClient) Query() *ProductImageQuery
Query returns a query builder for ProductImage.
func (*ProductImageClient) QueryProduct ¶
func (c *ProductImageClient) QueryProduct(pi *ProductImage) *ProductInfoQuery
QueryProduct queries the product edge of a ProductImage.
func (*ProductImageClient) Update ¶
func (c *ProductImageClient) Update() *ProductImageUpdate
Update returns an update builder for ProductImage.
func (*ProductImageClient) UpdateOne ¶
func (c *ProductImageClient) UpdateOne(pi *ProductImage) *ProductImageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProductImageClient) UpdateOneID ¶
func (c *ProductImageClient) UpdateOneID(id uuid.UUID) *ProductImageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProductImageClient) Use ¶
func (c *ProductImageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `productimage.Hooks(f(g(h())))`.
type ProductImageCreate ¶
type ProductImageCreate struct {
// contains filtered or unexported fields
}
ProductImageCreate is the builder for creating a ProductImage entity.
func (*ProductImageCreate) Exec ¶
func (pic *ProductImageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductImageCreate) ExecX ¶
func (pic *ProductImageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductImageCreate) Mutation ¶
func (pic *ProductImageCreate) Mutation() *ProductImageMutation
Mutation returns the ProductImageMutation object of the builder.
func (*ProductImageCreate) Save ¶
func (pic *ProductImageCreate) Save(ctx context.Context) (*ProductImage, error)
Save creates the ProductImage in the database.
func (*ProductImageCreate) SaveX ¶
func (pic *ProductImageCreate) SaveX(ctx context.Context) *ProductImage
SaveX calls Save and panics if Save returns an error.
func (*ProductImageCreate) SetCreatedAt ¶
func (pic *ProductImageCreate) SetCreatedAt(t time.Time) *ProductImageCreate
SetCreatedAt sets the "created_at" field.
func (*ProductImageCreate) SetID ¶
func (pic *ProductImageCreate) SetID(u uuid.UUID) *ProductImageCreate
SetID sets the "id" field.
func (*ProductImageCreate) SetImageURL ¶
func (pic *ProductImageCreate) SetImageURL(s string) *ProductImageCreate
SetImageURL sets the "image_url" field.
func (*ProductImageCreate) SetNillableCreatedAt ¶
func (pic *ProductImageCreate) SetNillableCreatedAt(t *time.Time) *ProductImageCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProductImageCreate) SetNillableID ¶
func (pic *ProductImageCreate) SetNillableID(u *uuid.UUID) *ProductImageCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ProductImageCreate) SetNillableUpdatedAt ¶
func (pic *ProductImageCreate) SetNillableUpdatedAt(t *time.Time) *ProductImageCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ProductImageCreate) SetProduct ¶
func (pic *ProductImageCreate) SetProduct(p *ProductInfo) *ProductImageCreate
SetProduct sets the "product" edge to the ProductInfo entity.
func (*ProductImageCreate) SetProductID ¶
func (pic *ProductImageCreate) SetProductID(s string) *ProductImageCreate
SetProductID sets the "product_id" field.
func (*ProductImageCreate) SetUpdatedAt ¶
func (pic *ProductImageCreate) SetUpdatedAt(t time.Time) *ProductImageCreate
SetUpdatedAt sets the "updated_at" field.
type ProductImageCreateBulk ¶
type ProductImageCreateBulk struct {
// contains filtered or unexported fields
}
ProductImageCreateBulk is the builder for creating many ProductImage entities in bulk.
func (*ProductImageCreateBulk) Exec ¶
func (picb *ProductImageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductImageCreateBulk) ExecX ¶
func (picb *ProductImageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductImageCreateBulk) Save ¶
func (picb *ProductImageCreateBulk) Save(ctx context.Context) ([]*ProductImage, error)
Save creates the ProductImage entities in the database.
func (*ProductImageCreateBulk) SaveX ¶
func (picb *ProductImageCreateBulk) SaveX(ctx context.Context) []*ProductImage
SaveX is like Save, but panics if an error occurs.
type ProductImageDelete ¶
type ProductImageDelete struct {
// contains filtered or unexported fields
}
ProductImageDelete is the builder for deleting a ProductImage entity.
func (*ProductImageDelete) Exec ¶
func (pid *ProductImageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProductImageDelete) ExecX ¶
func (pid *ProductImageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProductImageDelete) Where ¶
func (pid *ProductImageDelete) Where(ps ...predicate.ProductImage) *ProductImageDelete
Where appends a list predicates to the ProductImageDelete builder.
type ProductImageDeleteOne ¶
type ProductImageDeleteOne struct {
// contains filtered or unexported fields
}
ProductImageDeleteOne is the builder for deleting a single ProductImage entity.
func (*ProductImageDeleteOne) Exec ¶
func (pido *ProductImageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProductImageDeleteOne) ExecX ¶
func (pido *ProductImageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductImageDeleteOne) Where ¶
func (pido *ProductImageDeleteOne) Where(ps ...predicate.ProductImage) *ProductImageDeleteOne
Where appends a list predicates to the ProductImageDelete builder.
type ProductImageEdges ¶
type ProductImageEdges struct { // Product holds the value of the product edge. Product *ProductInfo `json:"product,omitempty"` // contains filtered or unexported fields }
ProductImageEdges holds the relations/edges for other nodes in the graph.
func (ProductImageEdges) ProductOrErr ¶
func (e ProductImageEdges) ProductOrErr() (*ProductInfo, error)
ProductOrErr returns the Product value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ProductImageGroupBy ¶
type ProductImageGroupBy struct {
// contains filtered or unexported fields
}
ProductImageGroupBy is the group-by builder for ProductImage entities.
func (*ProductImageGroupBy) Aggregate ¶
func (pigb *ProductImageGroupBy) Aggregate(fns ...AggregateFunc) *ProductImageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProductImageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductImageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductImageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductImageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductImageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductImageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductImageGroupBy) Scan ¶
func (pigb *ProductImageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductImageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductImageMutation ¶
type ProductImageMutation struct {
// contains filtered or unexported fields
}
ProductImageMutation represents an operation that mutates the ProductImage nodes in the graph.
func (*ProductImageMutation) AddField ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) AddedEdges ¶
func (m *ProductImageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProductImageMutation) AddedField ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) AddedFields ¶
func (m *ProductImageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProductImageMutation) AddedIDs ¶
func (m *ProductImageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProductImageMutation) ClearEdge ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) ClearField ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) ClearProduct ¶
func (m *ProductImageMutation) ClearProduct()
ClearProduct clears the "product" edge to the ProductInfo entity.
func (*ProductImageMutation) ClearedEdges ¶
func (m *ProductImageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProductImageMutation) ClearedFields ¶
func (m *ProductImageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProductImageMutation) Client ¶
func (m ProductImageMutation) 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 (*ProductImageMutation) CreatedAt ¶
func (m *ProductImageMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ProductImageMutation) EdgeCleared ¶
func (m *ProductImageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProductImageMutation) Field ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) FieldCleared ¶
func (m *ProductImageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProductImageMutation) Fields ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) ID ¶
func (m *ProductImageMutation) ID() (id uuid.UUID, 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 (*ProductImageMutation) IDs ¶
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 (*ProductImageMutation) ImageURL ¶
func (m *ProductImageMutation) ImageURL() (r string, exists bool)
ImageURL returns the value of the "image_url" field in the mutation.
func (*ProductImageMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ProductImage entity. If the ProductImage 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 (*ProductImageMutation) 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 (*ProductImageMutation) OldImageURL ¶
func (m *ProductImageMutation) OldImageURL(ctx context.Context) (v string, err error)
OldImageURL returns the old "image_url" field's value of the ProductImage entity. If the ProductImage 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 (*ProductImageMutation) OldProductID ¶
func (m *ProductImageMutation) OldProductID(ctx context.Context) (v string, err error)
OldProductID returns the old "product_id" field's value of the ProductImage entity. If the ProductImage 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 (*ProductImageMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the ProductImage entity. If the ProductImage 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 (*ProductImageMutation) Op ¶
func (m *ProductImageMutation) Op() Op
Op returns the operation name.
func (*ProductImageMutation) ProductCleared ¶
func (m *ProductImageMutation) ProductCleared() bool
ProductCleared reports if the "product" edge to the ProductInfo entity was cleared.
func (*ProductImageMutation) ProductID ¶
func (m *ProductImageMutation) ProductID() (r string, exists bool)
ProductID returns the value of the "product_id" field in the mutation.
func (*ProductImageMutation) ProductIDs ¶
func (m *ProductImageMutation) ProductIDs() (ids []string)
ProductIDs returns the "product" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProductID instead. It exists only for internal usage by the builders.
func (*ProductImageMutation) RemovedEdges ¶
func (m *ProductImageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProductImageMutation) RemovedIDs ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) ResetCreatedAt ¶
func (m *ProductImageMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ProductImageMutation) ResetEdge ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) ResetField ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) ResetImageURL ¶
func (m *ProductImageMutation) ResetImageURL()
ResetImageURL resets all changes to the "image_url" field.
func (*ProductImageMutation) ResetProduct ¶
func (m *ProductImageMutation) ResetProduct()
ResetProduct resets all changes to the "product" edge.
func (*ProductImageMutation) ResetProductID ¶
func (m *ProductImageMutation) ResetProductID()
ResetProductID resets all changes to the "product_id" field.
func (*ProductImageMutation) ResetUpdatedAt ¶
func (m *ProductImageMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ProductImageMutation) SetCreatedAt ¶
func (m *ProductImageMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ProductImageMutation) SetField ¶
func (m *ProductImageMutation) 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 (*ProductImageMutation) SetID ¶
func (m *ProductImageMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ProductImage entities.
func (*ProductImageMutation) SetImageURL ¶
func (m *ProductImageMutation) SetImageURL(s string)
SetImageURL sets the "image_url" field.
func (*ProductImageMutation) SetOp ¶
func (m *ProductImageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProductImageMutation) SetProductID ¶
func (m *ProductImageMutation) SetProductID(s string)
SetProductID sets the "product_id" field.
func (*ProductImageMutation) SetUpdatedAt ¶
func (m *ProductImageMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (ProductImageMutation) Tx ¶
func (m ProductImageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProductImageMutation) Type ¶
func (m *ProductImageMutation) Type() string
Type returns the node type of this mutation (ProductImage).
func (*ProductImageMutation) UpdatedAt ¶
func (m *ProductImageMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ProductImageMutation) Where ¶
func (m *ProductImageMutation) Where(ps ...predicate.ProductImage)
Where appends a list predicates to the ProductImageMutation builder.
func (*ProductImageMutation) WhereP ¶
func (m *ProductImageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProductImageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProductImageQuery ¶
type ProductImageQuery struct {
// contains filtered or unexported fields
}
ProductImageQuery is the builder for querying ProductImage entities.
func (*ProductImageQuery) Aggregate ¶
func (piq *ProductImageQuery) Aggregate(fns ...AggregateFunc) *ProductImageSelect
Aggregate returns a ProductImageSelect configured with the given aggregations.
func (*ProductImageQuery) All ¶
func (piq *ProductImageQuery) All(ctx context.Context) ([]*ProductImage, error)
All executes the query and returns a list of ProductImages.
func (*ProductImageQuery) AllX ¶
func (piq *ProductImageQuery) AllX(ctx context.Context) []*ProductImage
AllX is like All, but panics if an error occurs.
func (*ProductImageQuery) Clone ¶
func (piq *ProductImageQuery) Clone() *ProductImageQuery
Clone returns a duplicate of the ProductImageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProductImageQuery) Count ¶
func (piq *ProductImageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProductImageQuery) CountX ¶
func (piq *ProductImageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProductImageQuery) Exist ¶
func (piq *ProductImageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProductImageQuery) ExistX ¶
func (piq *ProductImageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProductImageQuery) First ¶
func (piq *ProductImageQuery) First(ctx context.Context) (*ProductImage, error)
First returns the first ProductImage entity from the query. Returns a *NotFoundError when no ProductImage was found.
func (*ProductImageQuery) FirstID ¶
FirstID returns the first ProductImage ID from the query. Returns a *NotFoundError when no ProductImage ID was found.
func (*ProductImageQuery) FirstIDX ¶
func (piq *ProductImageQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProductImageQuery) FirstX ¶
func (piq *ProductImageQuery) FirstX(ctx context.Context) *ProductImage
FirstX is like First, but panics if an error occurs.
func (*ProductImageQuery) GroupBy ¶
func (piq *ProductImageQuery) GroupBy(field string, fields ...string) *ProductImageGroupBy
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.ProductImage.Query(). GroupBy(productimage.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProductImageQuery) IDsX ¶
func (piq *ProductImageQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ProductImageQuery) Limit ¶
func (piq *ProductImageQuery) Limit(limit int) *ProductImageQuery
Limit the number of records to be returned by this query.
func (*ProductImageQuery) Offset ¶
func (piq *ProductImageQuery) Offset(offset int) *ProductImageQuery
Offset to start from.
func (*ProductImageQuery) Only ¶
func (piq *ProductImageQuery) Only(ctx context.Context) (*ProductImage, error)
Only returns a single ProductImage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ProductImage entity is found. Returns a *NotFoundError when no ProductImage entities are found.
func (*ProductImageQuery) OnlyID ¶
OnlyID is like Only, but returns the only ProductImage ID in the query. Returns a *NotSingularError when more than one ProductImage ID is found. Returns a *NotFoundError when no entities are found.
func (*ProductImageQuery) OnlyIDX ¶
func (piq *ProductImageQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProductImageQuery) OnlyX ¶
func (piq *ProductImageQuery) OnlyX(ctx context.Context) *ProductImage
OnlyX is like Only, but panics if an error occurs.
func (*ProductImageQuery) Order ¶
func (piq *ProductImageQuery) Order(o ...productimage.OrderOption) *ProductImageQuery
Order specifies how the records should be ordered.
func (*ProductImageQuery) QueryProduct ¶
func (piq *ProductImageQuery) QueryProduct() *ProductInfoQuery
QueryProduct chains the current query on the "product" edge.
func (*ProductImageQuery) Select ¶
func (piq *ProductImageQuery) Select(fields ...string) *ProductImageSelect
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.ProductImage.Query(). Select(productimage.FieldCreatedAt). Scan(ctx, &v)
func (*ProductImageQuery) Unique ¶
func (piq *ProductImageQuery) Unique(unique bool) *ProductImageQuery
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 (*ProductImageQuery) Where ¶
func (piq *ProductImageQuery) Where(ps ...predicate.ProductImage) *ProductImageQuery
Where adds a new predicate for the ProductImageQuery builder.
func (*ProductImageQuery) WithProduct ¶
func (piq *ProductImageQuery) WithProduct(opts ...func(*ProductInfoQuery)) *ProductImageQuery
WithProduct tells the query-builder to eager-load the nodes that are connected to the "product" edge. The optional arguments are used to configure the query builder of the edge.
type ProductImageSelect ¶
type ProductImageSelect struct { *ProductImageQuery // contains filtered or unexported fields }
ProductImageSelect is the builder for selecting fields of ProductImage entities.
func (*ProductImageSelect) Aggregate ¶
func (pis *ProductImageSelect) Aggregate(fns ...AggregateFunc) *ProductImageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProductImageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductImageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductImageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductImageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductImageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductImageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductImageSelect) Scan ¶
func (pis *ProductImageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductImageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductImageUpdate ¶
type ProductImageUpdate struct {
// contains filtered or unexported fields
}
ProductImageUpdate is the builder for updating ProductImage entities.
func (*ProductImageUpdate) Exec ¶
func (piu *ProductImageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductImageUpdate) ExecX ¶
func (piu *ProductImageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductImageUpdate) Mutation ¶
func (piu *ProductImageUpdate) Mutation() *ProductImageMutation
Mutation returns the ProductImageMutation object of the builder.
func (*ProductImageUpdate) Save ¶
func (piu *ProductImageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProductImageUpdate) SaveX ¶
func (piu *ProductImageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProductImageUpdate) SetUpdatedAt ¶
func (piu *ProductImageUpdate) SetUpdatedAt(t time.Time) *ProductImageUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ProductImageUpdate) Where ¶
func (piu *ProductImageUpdate) Where(ps ...predicate.ProductImage) *ProductImageUpdate
Where appends a list predicates to the ProductImageUpdate builder.
type ProductImageUpdateOne ¶
type ProductImageUpdateOne struct {
// contains filtered or unexported fields
}
ProductImageUpdateOne is the builder for updating a single ProductImage entity.
func (*ProductImageUpdateOne) Exec ¶
func (piuo *ProductImageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProductImageUpdateOne) ExecX ¶
func (piuo *ProductImageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductImageUpdateOne) Mutation ¶
func (piuo *ProductImageUpdateOne) Mutation() *ProductImageMutation
Mutation returns the ProductImageMutation object of the builder.
func (*ProductImageUpdateOne) Save ¶
func (piuo *ProductImageUpdateOne) Save(ctx context.Context) (*ProductImage, error)
Save executes the query and returns the updated ProductImage entity.
func (*ProductImageUpdateOne) SaveX ¶
func (piuo *ProductImageUpdateOne) SaveX(ctx context.Context) *ProductImage
SaveX is like Save, but panics if an error occurs.
func (*ProductImageUpdateOne) Select ¶
func (piuo *ProductImageUpdateOne) Select(field string, fields ...string) *ProductImageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProductImageUpdateOne) SetUpdatedAt ¶
func (piuo *ProductImageUpdateOne) SetUpdatedAt(t time.Time) *ProductImageUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ProductImageUpdateOne) Where ¶
func (piuo *ProductImageUpdateOne) Where(ps ...predicate.ProductImage) *ProductImageUpdateOne
Where appends a list predicates to the ProductImageUpdate builder.
type ProductImages ¶
type ProductImages []*ProductImage
ProductImages is a parsable slice of ProductImage.
type ProductInfo ¶
type ProductInfo struct { // ID of the ent. ID string `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description *string `json:"description,omitempty"` // Year holds the value of the "year" field. Year *int `json:"year,omitempty"` // Provider holds the value of the "provider" field. Provider *string `json:"provider,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ProductInfoQuery when eager-loading is set. Edges ProductInfoEdges `json:"edges"` // contains filtered or unexported fields }
ProductInfo is the model entity for the ProductInfo schema.
func (*ProductInfo) QueryProductTags ¶
func (pi *ProductInfo) QueryProductTags() *ProductTagQuery
QueryProductTags queries the "product_tags" edge of the ProductInfo entity.
func (*ProductInfo) QueryTags ¶
func (pi *ProductInfo) QueryTags() *TagQuery
QueryTags queries the "tags" edge of the ProductInfo entity.
func (*ProductInfo) String ¶
func (pi *ProductInfo) String() string
String implements the fmt.Stringer.
func (*ProductInfo) Unwrap ¶
func (pi *ProductInfo) Unwrap() *ProductInfo
Unwrap unwraps the ProductInfo 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 (*ProductInfo) Update ¶
func (pi *ProductInfo) Update() *ProductInfoUpdateOne
Update returns a builder for updating this ProductInfo. Note that you need to call ProductInfo.Unwrap() before calling this method if this ProductInfo was returned from a transaction, and the transaction was committed or rolled back.
type ProductInfoClient ¶
type ProductInfoClient struct {
// contains filtered or unexported fields
}
ProductInfoClient is a client for the ProductInfo schema.
func NewProductInfoClient ¶
func NewProductInfoClient(c config) *ProductInfoClient
NewProductInfoClient returns a client for the ProductInfo from the given config.
func (*ProductInfoClient) Create ¶
func (c *ProductInfoClient) Create() *ProductInfoCreate
Create returns a builder for creating a ProductInfo entity.
func (*ProductInfoClient) CreateBulk ¶
func (c *ProductInfoClient) CreateBulk(builders ...*ProductInfoCreate) *ProductInfoCreateBulk
CreateBulk returns a builder for creating a bulk of ProductInfo entities.
func (*ProductInfoClient) Delete ¶
func (c *ProductInfoClient) Delete() *ProductInfoDelete
Delete returns a delete builder for ProductInfo.
func (*ProductInfoClient) DeleteOne ¶
func (c *ProductInfoClient) DeleteOne(pi *ProductInfo) *ProductInfoDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProductInfoClient) DeleteOneID ¶
func (c *ProductInfoClient) DeleteOneID(id string) *ProductInfoDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProductInfoClient) Get ¶
func (c *ProductInfoClient) Get(ctx context.Context, id string) (*ProductInfo, error)
Get returns a ProductInfo entity by its id.
func (*ProductInfoClient) GetX ¶
func (c *ProductInfoClient) GetX(ctx context.Context, id string) *ProductInfo
GetX is like Get, but panics if an error occurs.
func (*ProductInfoClient) Hooks ¶
func (c *ProductInfoClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProductInfoClient) Intercept ¶
func (c *ProductInfoClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `productinfo.Intercept(f(g(h())))`.
func (*ProductInfoClient) Interceptors ¶
func (c *ProductInfoClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProductInfoClient) MapCreateBulk ¶
func (c *ProductInfoClient) MapCreateBulk(slice any, setFunc func(*ProductInfoCreate, int)) *ProductInfoCreateBulk
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 (*ProductInfoClient) Query ¶
func (c *ProductInfoClient) Query() *ProductInfoQuery
Query returns a query builder for ProductInfo.
func (*ProductInfoClient) QueryProductTags ¶
func (c *ProductInfoClient) QueryProductTags(pi *ProductInfo) *ProductTagQuery
QueryProductTags queries the product_tags edge of a ProductInfo.
func (*ProductInfoClient) QueryTags ¶
func (c *ProductInfoClient) QueryTags(pi *ProductInfo) *TagQuery
QueryTags queries the tags edge of a ProductInfo.
func (*ProductInfoClient) Update ¶
func (c *ProductInfoClient) Update() *ProductInfoUpdate
Update returns an update builder for ProductInfo.
func (*ProductInfoClient) UpdateOne ¶
func (c *ProductInfoClient) UpdateOne(pi *ProductInfo) *ProductInfoUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProductInfoClient) UpdateOneID ¶
func (c *ProductInfoClient) UpdateOneID(id string) *ProductInfoUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProductInfoClient) Use ¶
func (c *ProductInfoClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `productinfo.Hooks(f(g(h())))`.
type ProductInfoCreate ¶
type ProductInfoCreate struct {
// contains filtered or unexported fields
}
ProductInfoCreate is the builder for creating a ProductInfo entity.
func (*ProductInfoCreate) AddTagIDs ¶
func (pic *ProductInfoCreate) AddTagIDs(ids ...string) *ProductInfoCreate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*ProductInfoCreate) AddTags ¶
func (pic *ProductInfoCreate) AddTags(t ...*Tag) *ProductInfoCreate
AddTags adds the "tags" edges to the Tag entity.
func (*ProductInfoCreate) Exec ¶
func (pic *ProductInfoCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductInfoCreate) ExecX ¶
func (pic *ProductInfoCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductInfoCreate) Mutation ¶
func (pic *ProductInfoCreate) Mutation() *ProductInfoMutation
Mutation returns the ProductInfoMutation object of the builder.
func (*ProductInfoCreate) Save ¶
func (pic *ProductInfoCreate) Save(ctx context.Context) (*ProductInfo, error)
Save creates the ProductInfo in the database.
func (*ProductInfoCreate) SaveX ¶
func (pic *ProductInfoCreate) SaveX(ctx context.Context) *ProductInfo
SaveX calls Save and panics if Save returns an error.
func (*ProductInfoCreate) SetCreatedAt ¶
func (pic *ProductInfoCreate) SetCreatedAt(t time.Time) *ProductInfoCreate
SetCreatedAt sets the "created_at" field.
func (*ProductInfoCreate) SetDescription ¶
func (pic *ProductInfoCreate) SetDescription(s string) *ProductInfoCreate
SetDescription sets the "description" field.
func (*ProductInfoCreate) SetID ¶
func (pic *ProductInfoCreate) SetID(s string) *ProductInfoCreate
SetID sets the "id" field.
func (*ProductInfoCreate) SetName ¶
func (pic *ProductInfoCreate) SetName(s string) *ProductInfoCreate
SetName sets the "name" field.
func (*ProductInfoCreate) SetNillableCreatedAt ¶
func (pic *ProductInfoCreate) SetNillableCreatedAt(t *time.Time) *ProductInfoCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProductInfoCreate) SetNillableDescription ¶
func (pic *ProductInfoCreate) SetNillableDescription(s *string) *ProductInfoCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ProductInfoCreate) SetNillableProvider ¶
func (pic *ProductInfoCreate) SetNillableProvider(s *string) *ProductInfoCreate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*ProductInfoCreate) SetNillableUpdatedAt ¶
func (pic *ProductInfoCreate) SetNillableUpdatedAt(t *time.Time) *ProductInfoCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ProductInfoCreate) SetNillableYear ¶
func (pic *ProductInfoCreate) SetNillableYear(i *int) *ProductInfoCreate
SetNillableYear sets the "year" field if the given value is not nil.
func (*ProductInfoCreate) SetProvider ¶
func (pic *ProductInfoCreate) SetProvider(s string) *ProductInfoCreate
SetProvider sets the "provider" field.
func (*ProductInfoCreate) SetUpdatedAt ¶
func (pic *ProductInfoCreate) SetUpdatedAt(t time.Time) *ProductInfoCreate
SetUpdatedAt sets the "updated_at" field.
func (*ProductInfoCreate) SetYear ¶
func (pic *ProductInfoCreate) SetYear(i int) *ProductInfoCreate
SetYear sets the "year" field.
type ProductInfoCreateBulk ¶
type ProductInfoCreateBulk struct {
// contains filtered or unexported fields
}
ProductInfoCreateBulk is the builder for creating many ProductInfo entities in bulk.
func (*ProductInfoCreateBulk) Exec ¶
func (picb *ProductInfoCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductInfoCreateBulk) ExecX ¶
func (picb *ProductInfoCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductInfoCreateBulk) Save ¶
func (picb *ProductInfoCreateBulk) Save(ctx context.Context) ([]*ProductInfo, error)
Save creates the ProductInfo entities in the database.
func (*ProductInfoCreateBulk) SaveX ¶
func (picb *ProductInfoCreateBulk) SaveX(ctx context.Context) []*ProductInfo
SaveX is like Save, but panics if an error occurs.
type ProductInfoDelete ¶
type ProductInfoDelete struct {
// contains filtered or unexported fields
}
ProductInfoDelete is the builder for deleting a ProductInfo entity.
func (*ProductInfoDelete) Exec ¶
func (pid *ProductInfoDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProductInfoDelete) ExecX ¶
func (pid *ProductInfoDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProductInfoDelete) Where ¶
func (pid *ProductInfoDelete) Where(ps ...predicate.ProductInfo) *ProductInfoDelete
Where appends a list predicates to the ProductInfoDelete builder.
type ProductInfoDeleteOne ¶
type ProductInfoDeleteOne struct {
// contains filtered or unexported fields
}
ProductInfoDeleteOne is the builder for deleting a single ProductInfo entity.
func (*ProductInfoDeleteOne) Exec ¶
func (pido *ProductInfoDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProductInfoDeleteOne) ExecX ¶
func (pido *ProductInfoDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductInfoDeleteOne) Where ¶
func (pido *ProductInfoDeleteOne) Where(ps ...predicate.ProductInfo) *ProductInfoDeleteOne
Where appends a list predicates to the ProductInfoDelete builder.
type ProductInfoEdges ¶
type ProductInfoEdges struct { // Tags holds the value of the tags edge. Tags []*Tag `json:"tags,omitempty"` // ProductTags holds the value of the product_tags edge. ProductTags []*ProductTag `json:"product_tags,omitempty"` // contains filtered or unexported fields }
ProductInfoEdges holds the relations/edges for other nodes in the graph.
func (ProductInfoEdges) ProductTagsOrErr ¶
func (e ProductInfoEdges) ProductTagsOrErr() ([]*ProductTag, error)
ProductTagsOrErr returns the ProductTags value or an error if the edge was not loaded in eager-loading.
func (ProductInfoEdges) TagsOrErr ¶
func (e ProductInfoEdges) TagsOrErr() ([]*Tag, error)
TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading.
type ProductInfoGroupBy ¶
type ProductInfoGroupBy struct {
// contains filtered or unexported fields
}
ProductInfoGroupBy is the group-by builder for ProductInfo entities.
func (*ProductInfoGroupBy) Aggregate ¶
func (pigb *ProductInfoGroupBy) Aggregate(fns ...AggregateFunc) *ProductInfoGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProductInfoGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductInfoGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductInfoGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductInfoGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductInfoGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductInfoGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductInfoGroupBy) Scan ¶
func (pigb *ProductInfoGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductInfoGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductInfoMutation ¶
type ProductInfoMutation struct {
// contains filtered or unexported fields
}
ProductInfoMutation represents an operation that mutates the ProductInfo nodes in the graph.
func (*ProductInfoMutation) AddField ¶
func (m *ProductInfoMutation) 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 (*ProductInfoMutation) AddTagIDs ¶
func (m *ProductInfoMutation) AddTagIDs(ids ...string)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*ProductInfoMutation) AddYear ¶
func (m *ProductInfoMutation) AddYear(i int)
AddYear adds i to the "year" field.
func (*ProductInfoMutation) AddedEdges ¶
func (m *ProductInfoMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProductInfoMutation) AddedField ¶
func (m *ProductInfoMutation) 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 (*ProductInfoMutation) AddedFields ¶
func (m *ProductInfoMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProductInfoMutation) AddedIDs ¶
func (m *ProductInfoMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProductInfoMutation) AddedYear ¶
func (m *ProductInfoMutation) AddedYear() (r int, exists bool)
AddedYear returns the value that was added to the "year" field in this mutation.
func (*ProductInfoMutation) ClearDescription ¶
func (m *ProductInfoMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*ProductInfoMutation) ClearEdge ¶
func (m *ProductInfoMutation) 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 (*ProductInfoMutation) ClearField ¶
func (m *ProductInfoMutation) 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 (*ProductInfoMutation) ClearProvider ¶
func (m *ProductInfoMutation) ClearProvider()
ClearProvider clears the value of the "provider" field.
func (*ProductInfoMutation) ClearTags ¶
func (m *ProductInfoMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*ProductInfoMutation) ClearYear ¶
func (m *ProductInfoMutation) ClearYear()
ClearYear clears the value of the "year" field.
func (*ProductInfoMutation) ClearedEdges ¶
func (m *ProductInfoMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProductInfoMutation) ClearedFields ¶
func (m *ProductInfoMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProductInfoMutation) Client ¶
func (m ProductInfoMutation) 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 (*ProductInfoMutation) CreatedAt ¶
func (m *ProductInfoMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ProductInfoMutation) Description ¶
func (m *ProductInfoMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ProductInfoMutation) DescriptionCleared ¶
func (m *ProductInfoMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*ProductInfoMutation) EdgeCleared ¶
func (m *ProductInfoMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProductInfoMutation) Field ¶
func (m *ProductInfoMutation) 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 (*ProductInfoMutation) FieldCleared ¶
func (m *ProductInfoMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProductInfoMutation) Fields ¶
func (m *ProductInfoMutation) 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 (*ProductInfoMutation) ID ¶
func (m *ProductInfoMutation) ID() (id string, 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 (*ProductInfoMutation) IDs ¶
func (m *ProductInfoMutation) IDs(ctx context.Context) ([]string, 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 (*ProductInfoMutation) Name ¶
func (m *ProductInfoMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ProductInfoMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ProductInfo entity. If the ProductInfo 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 (*ProductInfoMutation) OldDescription ¶
func (m *ProductInfoMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old "description" field's value of the ProductInfo entity. If the ProductInfo 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 (*ProductInfoMutation) 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 (*ProductInfoMutation) OldName ¶
func (m *ProductInfoMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the ProductInfo entity. If the ProductInfo 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 (*ProductInfoMutation) OldProvider ¶
func (m *ProductInfoMutation) OldProvider(ctx context.Context) (v *string, err error)
OldProvider returns the old "provider" field's value of the ProductInfo entity. If the ProductInfo 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 (*ProductInfoMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the ProductInfo entity. If the ProductInfo 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 (*ProductInfoMutation) OldYear ¶
func (m *ProductInfoMutation) OldYear(ctx context.Context) (v *int, err error)
OldYear returns the old "year" field's value of the ProductInfo entity. If the ProductInfo 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 (*ProductInfoMutation) Op ¶
func (m *ProductInfoMutation) Op() Op
Op returns the operation name.
func (*ProductInfoMutation) Provider ¶
func (m *ProductInfoMutation) Provider() (r string, exists bool)
Provider returns the value of the "provider" field in the mutation.
func (*ProductInfoMutation) ProviderCleared ¶
func (m *ProductInfoMutation) ProviderCleared() bool
ProviderCleared returns if the "provider" field was cleared in this mutation.
func (*ProductInfoMutation) RemoveTagIDs ¶
func (m *ProductInfoMutation) RemoveTagIDs(ids ...string)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
func (*ProductInfoMutation) RemovedEdges ¶
func (m *ProductInfoMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProductInfoMutation) RemovedIDs ¶
func (m *ProductInfoMutation) 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 (*ProductInfoMutation) RemovedTagsIDs ¶
func (m *ProductInfoMutation) RemovedTagsIDs() (ids []string)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*ProductInfoMutation) ResetCreatedAt ¶
func (m *ProductInfoMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ProductInfoMutation) ResetDescription ¶
func (m *ProductInfoMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ProductInfoMutation) ResetEdge ¶
func (m *ProductInfoMutation) 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 (*ProductInfoMutation) ResetField ¶
func (m *ProductInfoMutation) 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 (*ProductInfoMutation) ResetName ¶
func (m *ProductInfoMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ProductInfoMutation) ResetProvider ¶
func (m *ProductInfoMutation) ResetProvider()
ResetProvider resets all changes to the "provider" field.
func (*ProductInfoMutation) ResetTags ¶
func (m *ProductInfoMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*ProductInfoMutation) ResetUpdatedAt ¶
func (m *ProductInfoMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ProductInfoMutation) ResetYear ¶
func (m *ProductInfoMutation) ResetYear()
ResetYear resets all changes to the "year" field.
func (*ProductInfoMutation) SetCreatedAt ¶
func (m *ProductInfoMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ProductInfoMutation) SetDescription ¶
func (m *ProductInfoMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ProductInfoMutation) SetField ¶
func (m *ProductInfoMutation) 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 (*ProductInfoMutation) SetID ¶
func (m *ProductInfoMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ProductInfo entities.
func (*ProductInfoMutation) SetName ¶
func (m *ProductInfoMutation) SetName(s string)
SetName sets the "name" field.
func (*ProductInfoMutation) SetOp ¶
func (m *ProductInfoMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProductInfoMutation) SetProvider ¶
func (m *ProductInfoMutation) SetProvider(s string)
SetProvider sets the "provider" field.
func (*ProductInfoMutation) SetUpdatedAt ¶
func (m *ProductInfoMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ProductInfoMutation) SetYear ¶
func (m *ProductInfoMutation) SetYear(i int)
SetYear sets the "year" field.
func (*ProductInfoMutation) TagsCleared ¶
func (m *ProductInfoMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*ProductInfoMutation) TagsIDs ¶
func (m *ProductInfoMutation) TagsIDs() (ids []string)
TagsIDs returns the "tags" edge IDs in the mutation.
func (ProductInfoMutation) Tx ¶
func (m ProductInfoMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProductInfoMutation) Type ¶
func (m *ProductInfoMutation) Type() string
Type returns the node type of this mutation (ProductInfo).
func (*ProductInfoMutation) UpdatedAt ¶
func (m *ProductInfoMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ProductInfoMutation) Where ¶
func (m *ProductInfoMutation) Where(ps ...predicate.ProductInfo)
Where appends a list predicates to the ProductInfoMutation builder.
func (*ProductInfoMutation) WhereP ¶
func (m *ProductInfoMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProductInfoMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*ProductInfoMutation) Year ¶
func (m *ProductInfoMutation) Year() (r int, exists bool)
Year returns the value of the "year" field in the mutation.
func (*ProductInfoMutation) YearCleared ¶
func (m *ProductInfoMutation) YearCleared() bool
YearCleared returns if the "year" field was cleared in this mutation.
type ProductInfoQuery ¶
type ProductInfoQuery struct {
// contains filtered or unexported fields
}
ProductInfoQuery is the builder for querying ProductInfo entities.
func (*ProductInfoQuery) Aggregate ¶
func (piq *ProductInfoQuery) Aggregate(fns ...AggregateFunc) *ProductInfoSelect
Aggregate returns a ProductInfoSelect configured with the given aggregations.
func (*ProductInfoQuery) All ¶
func (piq *ProductInfoQuery) All(ctx context.Context) ([]*ProductInfo, error)
All executes the query and returns a list of ProductInfos.
func (*ProductInfoQuery) AllX ¶
func (piq *ProductInfoQuery) AllX(ctx context.Context) []*ProductInfo
AllX is like All, but panics if an error occurs.
func (*ProductInfoQuery) Clone ¶
func (piq *ProductInfoQuery) Clone() *ProductInfoQuery
Clone returns a duplicate of the ProductInfoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProductInfoQuery) Count ¶
func (piq *ProductInfoQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProductInfoQuery) CountX ¶
func (piq *ProductInfoQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProductInfoQuery) Exist ¶
func (piq *ProductInfoQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProductInfoQuery) ExistX ¶
func (piq *ProductInfoQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProductInfoQuery) First ¶
func (piq *ProductInfoQuery) First(ctx context.Context) (*ProductInfo, error)
First returns the first ProductInfo entity from the query. Returns a *NotFoundError when no ProductInfo was found.
func (*ProductInfoQuery) FirstID ¶
func (piq *ProductInfoQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first ProductInfo ID from the query. Returns a *NotFoundError when no ProductInfo ID was found.
func (*ProductInfoQuery) FirstIDX ¶
func (piq *ProductInfoQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProductInfoQuery) FirstX ¶
func (piq *ProductInfoQuery) FirstX(ctx context.Context) *ProductInfo
FirstX is like First, but panics if an error occurs.
func (*ProductInfoQuery) GroupBy ¶
func (piq *ProductInfoQuery) GroupBy(field string, fields ...string) *ProductInfoGroupBy
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.ProductInfo.Query(). GroupBy(productinfo.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProductInfoQuery) IDs ¶
func (piq *ProductInfoQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of ProductInfo IDs.
func (*ProductInfoQuery) IDsX ¶
func (piq *ProductInfoQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*ProductInfoQuery) Limit ¶
func (piq *ProductInfoQuery) Limit(limit int) *ProductInfoQuery
Limit the number of records to be returned by this query.
func (*ProductInfoQuery) Offset ¶
func (piq *ProductInfoQuery) Offset(offset int) *ProductInfoQuery
Offset to start from.
func (*ProductInfoQuery) Only ¶
func (piq *ProductInfoQuery) Only(ctx context.Context) (*ProductInfo, error)
Only returns a single ProductInfo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ProductInfo entity is found. Returns a *NotFoundError when no ProductInfo entities are found.
func (*ProductInfoQuery) OnlyID ¶
func (piq *ProductInfoQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only ProductInfo ID in the query. Returns a *NotSingularError when more than one ProductInfo ID is found. Returns a *NotFoundError when no entities are found.
func (*ProductInfoQuery) OnlyIDX ¶
func (piq *ProductInfoQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProductInfoQuery) OnlyX ¶
func (piq *ProductInfoQuery) OnlyX(ctx context.Context) *ProductInfo
OnlyX is like Only, but panics if an error occurs.
func (*ProductInfoQuery) Order ¶
func (piq *ProductInfoQuery) Order(o ...productinfo.OrderOption) *ProductInfoQuery
Order specifies how the records should be ordered.
func (*ProductInfoQuery) QueryProductTags ¶
func (piq *ProductInfoQuery) QueryProductTags() *ProductTagQuery
QueryProductTags chains the current query on the "product_tags" edge.
func (*ProductInfoQuery) QueryTags ¶
func (piq *ProductInfoQuery) QueryTags() *TagQuery
QueryTags chains the current query on the "tags" edge.
func (*ProductInfoQuery) Select ¶
func (piq *ProductInfoQuery) Select(fields ...string) *ProductInfoSelect
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.ProductInfo.Query(). Select(productinfo.FieldCreatedAt). Scan(ctx, &v)
func (*ProductInfoQuery) Unique ¶
func (piq *ProductInfoQuery) Unique(unique bool) *ProductInfoQuery
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 (*ProductInfoQuery) Where ¶
func (piq *ProductInfoQuery) Where(ps ...predicate.ProductInfo) *ProductInfoQuery
Where adds a new predicate for the ProductInfoQuery builder.
func (*ProductInfoQuery) WithProductTags ¶
func (piq *ProductInfoQuery) WithProductTags(opts ...func(*ProductTagQuery)) *ProductInfoQuery
WithProductTags tells the query-builder to eager-load the nodes that are connected to the "product_tags" edge. The optional arguments are used to configure the query builder of the edge.
func (*ProductInfoQuery) WithTags ¶
func (piq *ProductInfoQuery) WithTags(opts ...func(*TagQuery)) *ProductInfoQuery
WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.
type ProductInfoSelect ¶
type ProductInfoSelect struct { *ProductInfoQuery // contains filtered or unexported fields }
ProductInfoSelect is the builder for selecting fields of ProductInfo entities.
func (*ProductInfoSelect) Aggregate ¶
func (pis *ProductInfoSelect) Aggregate(fns ...AggregateFunc) *ProductInfoSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProductInfoSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductInfoSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductInfoSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductInfoSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductInfoSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductInfoSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductInfoSelect) Scan ¶
func (pis *ProductInfoSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductInfoSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductInfoUpdate ¶
type ProductInfoUpdate struct {
// contains filtered or unexported fields
}
ProductInfoUpdate is the builder for updating ProductInfo entities.
func (*ProductInfoUpdate) AddTagIDs ¶
func (piu *ProductInfoUpdate) AddTagIDs(ids ...string) *ProductInfoUpdate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*ProductInfoUpdate) AddTags ¶
func (piu *ProductInfoUpdate) AddTags(t ...*Tag) *ProductInfoUpdate
AddTags adds the "tags" edges to the Tag entity.
func (*ProductInfoUpdate) AddYear ¶
func (piu *ProductInfoUpdate) AddYear(i int) *ProductInfoUpdate
AddYear adds i to the "year" field.
func (*ProductInfoUpdate) ClearDescription ¶
func (piu *ProductInfoUpdate) ClearDescription() *ProductInfoUpdate
ClearDescription clears the value of the "description" field.
func (*ProductInfoUpdate) ClearProvider ¶
func (piu *ProductInfoUpdate) ClearProvider() *ProductInfoUpdate
ClearProvider clears the value of the "provider" field.
func (*ProductInfoUpdate) ClearTags ¶
func (piu *ProductInfoUpdate) ClearTags() *ProductInfoUpdate
ClearTags clears all "tags" edges to the Tag entity.
func (*ProductInfoUpdate) ClearYear ¶
func (piu *ProductInfoUpdate) ClearYear() *ProductInfoUpdate
ClearYear clears the value of the "year" field.
func (*ProductInfoUpdate) Exec ¶
func (piu *ProductInfoUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductInfoUpdate) ExecX ¶
func (piu *ProductInfoUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductInfoUpdate) Mutation ¶
func (piu *ProductInfoUpdate) Mutation() *ProductInfoMutation
Mutation returns the ProductInfoMutation object of the builder.
func (*ProductInfoUpdate) RemoveTagIDs ¶
func (piu *ProductInfoUpdate) RemoveTagIDs(ids ...string) *ProductInfoUpdate
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*ProductInfoUpdate) RemoveTags ¶
func (piu *ProductInfoUpdate) RemoveTags(t ...*Tag) *ProductInfoUpdate
RemoveTags removes "tags" edges to Tag entities.
func (*ProductInfoUpdate) Save ¶
func (piu *ProductInfoUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProductInfoUpdate) SaveX ¶
func (piu *ProductInfoUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProductInfoUpdate) SetDescription ¶
func (piu *ProductInfoUpdate) SetDescription(s string) *ProductInfoUpdate
SetDescription sets the "description" field.
func (*ProductInfoUpdate) SetName ¶
func (piu *ProductInfoUpdate) SetName(s string) *ProductInfoUpdate
SetName sets the "name" field.
func (*ProductInfoUpdate) SetNillableDescription ¶
func (piu *ProductInfoUpdate) SetNillableDescription(s *string) *ProductInfoUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ProductInfoUpdate) SetNillableName ¶
func (piu *ProductInfoUpdate) SetNillableName(s *string) *ProductInfoUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ProductInfoUpdate) SetNillableProvider ¶
func (piu *ProductInfoUpdate) SetNillableProvider(s *string) *ProductInfoUpdate
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*ProductInfoUpdate) SetNillableYear ¶
func (piu *ProductInfoUpdate) SetNillableYear(i *int) *ProductInfoUpdate
SetNillableYear sets the "year" field if the given value is not nil.
func (*ProductInfoUpdate) SetProvider ¶
func (piu *ProductInfoUpdate) SetProvider(s string) *ProductInfoUpdate
SetProvider sets the "provider" field.
func (*ProductInfoUpdate) SetUpdatedAt ¶
func (piu *ProductInfoUpdate) SetUpdatedAt(t time.Time) *ProductInfoUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ProductInfoUpdate) SetYear ¶
func (piu *ProductInfoUpdate) SetYear(i int) *ProductInfoUpdate
SetYear sets the "year" field.
func (*ProductInfoUpdate) Where ¶
func (piu *ProductInfoUpdate) Where(ps ...predicate.ProductInfo) *ProductInfoUpdate
Where appends a list predicates to the ProductInfoUpdate builder.
type ProductInfoUpdateOne ¶
type ProductInfoUpdateOne struct {
// contains filtered or unexported fields
}
ProductInfoUpdateOne is the builder for updating a single ProductInfo entity.
func (*ProductInfoUpdateOne) AddTagIDs ¶
func (piuo *ProductInfoUpdateOne) AddTagIDs(ids ...string) *ProductInfoUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*ProductInfoUpdateOne) AddTags ¶
func (piuo *ProductInfoUpdateOne) AddTags(t ...*Tag) *ProductInfoUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*ProductInfoUpdateOne) AddYear ¶
func (piuo *ProductInfoUpdateOne) AddYear(i int) *ProductInfoUpdateOne
AddYear adds i to the "year" field.
func (*ProductInfoUpdateOne) ClearDescription ¶
func (piuo *ProductInfoUpdateOne) ClearDescription() *ProductInfoUpdateOne
ClearDescription clears the value of the "description" field.
func (*ProductInfoUpdateOne) ClearProvider ¶
func (piuo *ProductInfoUpdateOne) ClearProvider() *ProductInfoUpdateOne
ClearProvider clears the value of the "provider" field.
func (*ProductInfoUpdateOne) ClearTags ¶
func (piuo *ProductInfoUpdateOne) ClearTags() *ProductInfoUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*ProductInfoUpdateOne) ClearYear ¶
func (piuo *ProductInfoUpdateOne) ClearYear() *ProductInfoUpdateOne
ClearYear clears the value of the "year" field.
func (*ProductInfoUpdateOne) Exec ¶
func (piuo *ProductInfoUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProductInfoUpdateOne) ExecX ¶
func (piuo *ProductInfoUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductInfoUpdateOne) Mutation ¶
func (piuo *ProductInfoUpdateOne) Mutation() *ProductInfoMutation
Mutation returns the ProductInfoMutation object of the builder.
func (*ProductInfoUpdateOne) RemoveTagIDs ¶
func (piuo *ProductInfoUpdateOne) RemoveTagIDs(ids ...string) *ProductInfoUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*ProductInfoUpdateOne) RemoveTags ¶
func (piuo *ProductInfoUpdateOne) RemoveTags(t ...*Tag) *ProductInfoUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*ProductInfoUpdateOne) Save ¶
func (piuo *ProductInfoUpdateOne) Save(ctx context.Context) (*ProductInfo, error)
Save executes the query and returns the updated ProductInfo entity.
func (*ProductInfoUpdateOne) SaveX ¶
func (piuo *ProductInfoUpdateOne) SaveX(ctx context.Context) *ProductInfo
SaveX is like Save, but panics if an error occurs.
func (*ProductInfoUpdateOne) Select ¶
func (piuo *ProductInfoUpdateOne) Select(field string, fields ...string) *ProductInfoUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProductInfoUpdateOne) SetDescription ¶
func (piuo *ProductInfoUpdateOne) SetDescription(s string) *ProductInfoUpdateOne
SetDescription sets the "description" field.
func (*ProductInfoUpdateOne) SetName ¶
func (piuo *ProductInfoUpdateOne) SetName(s string) *ProductInfoUpdateOne
SetName sets the "name" field.
func (*ProductInfoUpdateOne) SetNillableDescription ¶
func (piuo *ProductInfoUpdateOne) SetNillableDescription(s *string) *ProductInfoUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ProductInfoUpdateOne) SetNillableName ¶
func (piuo *ProductInfoUpdateOne) SetNillableName(s *string) *ProductInfoUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ProductInfoUpdateOne) SetNillableProvider ¶
func (piuo *ProductInfoUpdateOne) SetNillableProvider(s *string) *ProductInfoUpdateOne
SetNillableProvider sets the "provider" field if the given value is not nil.
func (*ProductInfoUpdateOne) SetNillableYear ¶
func (piuo *ProductInfoUpdateOne) SetNillableYear(i *int) *ProductInfoUpdateOne
SetNillableYear sets the "year" field if the given value is not nil.
func (*ProductInfoUpdateOne) SetProvider ¶
func (piuo *ProductInfoUpdateOne) SetProvider(s string) *ProductInfoUpdateOne
SetProvider sets the "provider" field.
func (*ProductInfoUpdateOne) SetUpdatedAt ¶
func (piuo *ProductInfoUpdateOne) SetUpdatedAt(t time.Time) *ProductInfoUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ProductInfoUpdateOne) SetYear ¶
func (piuo *ProductInfoUpdateOne) SetYear(i int) *ProductInfoUpdateOne
SetYear sets the "year" field.
func (*ProductInfoUpdateOne) Where ¶
func (piuo *ProductInfoUpdateOne) Where(ps ...predicate.ProductInfo) *ProductInfoUpdateOne
Where appends a list predicates to the ProductInfoUpdate builder.
type ProductInfos ¶
type ProductInfos []*ProductInfo
ProductInfos is a parsable slice of ProductInfo.
type ProductQty ¶
type ProductQty struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // WorkUnitID holds the value of the "work_unit_id" field. WorkUnitID uuid.UUID `json:"work_unit_id,omitempty"` // ProductID holds the value of the "product_id" field. ProductID string `json:"product_id,omitempty"` // ProductColorID holds the value of the "product_color_id" field. ProductColorID string `json:"product_color_id,omitempty"` // PricePerUnit holds the value of the "price_per_unit" field. PricePerUnit *decimal.Decimal `json:"price_per_unit,omitempty"` // Qty holds the value of the "qty" field. Qty *decimal.Decimal `json:"qty,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ProductQtyQuery when eager-loading is set. Edges ProductQtyEdges `json:"edges"` // contains filtered or unexported fields }
ProductQty is the model entity for the ProductQty schema.
func (*ProductQty) QueryProduct ¶
func (pq *ProductQty) QueryProduct() *ProductInfoQuery
QueryProduct queries the "product" edge of the ProductQty entity.
func (*ProductQty) QueryProductColor ¶
func (pq *ProductQty) QueryProductColor() *ProductColorQuery
QueryProductColor queries the "product_color" edge of the ProductQty entity.
func (*ProductQty) QueryWorkUnit ¶
func (pq *ProductQty) QueryWorkUnit() *WorkUnitInfoQuery
QueryWorkUnit queries the "work_unit" edge of the ProductQty entity.
func (*ProductQty) String ¶
func (pq *ProductQty) String() string
String implements the fmt.Stringer.
func (*ProductQty) Unwrap ¶
func (pq *ProductQty) Unwrap() *ProductQty
Unwrap unwraps the ProductQty 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 (*ProductQty) Update ¶
func (pq *ProductQty) Update() *ProductQtyUpdateOne
Update returns a builder for updating this ProductQty. Note that you need to call ProductQty.Unwrap() before calling this method if this ProductQty was returned from a transaction, and the transaction was committed or rolled back.
type ProductQtyClient ¶
type ProductQtyClient struct {
// contains filtered or unexported fields
}
ProductQtyClient is a client for the ProductQty schema.
func NewProductQtyClient ¶
func NewProductQtyClient(c config) *ProductQtyClient
NewProductQtyClient returns a client for the ProductQty from the given config.
func (*ProductQtyClient) Create ¶
func (c *ProductQtyClient) Create() *ProductQtyCreate
Create returns a builder for creating a ProductQty entity.
func (*ProductQtyClient) CreateBulk ¶
func (c *ProductQtyClient) CreateBulk(builders ...*ProductQtyCreate) *ProductQtyCreateBulk
CreateBulk returns a builder for creating a bulk of ProductQty entities.
func (*ProductQtyClient) Delete ¶
func (c *ProductQtyClient) Delete() *ProductQtyDelete
Delete returns a delete builder for ProductQty.
func (*ProductQtyClient) DeleteOne ¶
func (c *ProductQtyClient) DeleteOne(pq *ProductQty) *ProductQtyDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProductQtyClient) DeleteOneID ¶
func (c *ProductQtyClient) DeleteOneID(id uuid.UUID) *ProductQtyDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProductQtyClient) Get ¶
func (c *ProductQtyClient) Get(ctx context.Context, id uuid.UUID) (*ProductQty, error)
Get returns a ProductQty entity by its id.
func (*ProductQtyClient) GetX ¶
func (c *ProductQtyClient) GetX(ctx context.Context, id uuid.UUID) *ProductQty
GetX is like Get, but panics if an error occurs.
func (*ProductQtyClient) Hooks ¶
func (c *ProductQtyClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProductQtyClient) Intercept ¶
func (c *ProductQtyClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `productqty.Intercept(f(g(h())))`.
func (*ProductQtyClient) Interceptors ¶
func (c *ProductQtyClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProductQtyClient) MapCreateBulk ¶
func (c *ProductQtyClient) MapCreateBulk(slice any, setFunc func(*ProductQtyCreate, int)) *ProductQtyCreateBulk
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 (*ProductQtyClient) Query ¶
func (c *ProductQtyClient) Query() *ProductQtyQuery
Query returns a query builder for ProductQty.
func (*ProductQtyClient) QueryProduct ¶
func (c *ProductQtyClient) QueryProduct(pq *ProductQty) *ProductInfoQuery
QueryProduct queries the product edge of a ProductQty.
func (*ProductQtyClient) QueryProductColor ¶
func (c *ProductQtyClient) QueryProductColor(pq *ProductQty) *ProductColorQuery
QueryProductColor queries the product_color edge of a ProductQty.
func (*ProductQtyClient) QueryWorkUnit ¶
func (c *ProductQtyClient) QueryWorkUnit(pq *ProductQty) *WorkUnitInfoQuery
QueryWorkUnit queries the work_unit edge of a ProductQty.
func (*ProductQtyClient) Update ¶
func (c *ProductQtyClient) Update() *ProductQtyUpdate
Update returns an update builder for ProductQty.
func (*ProductQtyClient) UpdateOne ¶
func (c *ProductQtyClient) UpdateOne(pq *ProductQty) *ProductQtyUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProductQtyClient) UpdateOneID ¶
func (c *ProductQtyClient) UpdateOneID(id uuid.UUID) *ProductQtyUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProductQtyClient) Use ¶
func (c *ProductQtyClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `productqty.Hooks(f(g(h())))`.
type ProductQtyCreate ¶
type ProductQtyCreate struct {
// contains filtered or unexported fields
}
ProductQtyCreate is the builder for creating a ProductQty entity.
func (*ProductQtyCreate) Exec ¶
func (pqc *ProductQtyCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductQtyCreate) ExecX ¶
func (pqc *ProductQtyCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductQtyCreate) Mutation ¶
func (pqc *ProductQtyCreate) Mutation() *ProductQtyMutation
Mutation returns the ProductQtyMutation object of the builder.
func (*ProductQtyCreate) Save ¶
func (pqc *ProductQtyCreate) Save(ctx context.Context) (*ProductQty, error)
Save creates the ProductQty in the database.
func (*ProductQtyCreate) SaveX ¶
func (pqc *ProductQtyCreate) SaveX(ctx context.Context) *ProductQty
SaveX calls Save and panics if Save returns an error.
func (*ProductQtyCreate) SetCreatedAt ¶
func (pqc *ProductQtyCreate) SetCreatedAt(t time.Time) *ProductQtyCreate
SetCreatedAt sets the "created_at" field.
func (*ProductQtyCreate) SetID ¶
func (pqc *ProductQtyCreate) SetID(u uuid.UUID) *ProductQtyCreate
SetID sets the "id" field.
func (*ProductQtyCreate) SetNillableCreatedAt ¶
func (pqc *ProductQtyCreate) SetNillableCreatedAt(t *time.Time) *ProductQtyCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProductQtyCreate) SetNillableID ¶
func (pqc *ProductQtyCreate) SetNillableID(u *uuid.UUID) *ProductQtyCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ProductQtyCreate) SetNillableUpdatedAt ¶
func (pqc *ProductQtyCreate) SetNillableUpdatedAt(t *time.Time) *ProductQtyCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ProductQtyCreate) SetPricePerUnit ¶
func (pqc *ProductQtyCreate) SetPricePerUnit(d decimal.Decimal) *ProductQtyCreate
SetPricePerUnit sets the "price_per_unit" field.
func (*ProductQtyCreate) SetProduct ¶
func (pqc *ProductQtyCreate) SetProduct(p *ProductInfo) *ProductQtyCreate
SetProduct sets the "product" edge to the ProductInfo entity.
func (*ProductQtyCreate) SetProductColor ¶
func (pqc *ProductQtyCreate) SetProductColor(p *ProductColor) *ProductQtyCreate
SetProductColor sets the "product_color" edge to the ProductColor entity.
func (*ProductQtyCreate) SetProductColorID ¶
func (pqc *ProductQtyCreate) SetProductColorID(s string) *ProductQtyCreate
SetProductColorID sets the "product_color_id" field.
func (*ProductQtyCreate) SetProductID ¶
func (pqc *ProductQtyCreate) SetProductID(s string) *ProductQtyCreate
SetProductID sets the "product_id" field.
func (*ProductQtyCreate) SetQty ¶
func (pqc *ProductQtyCreate) SetQty(d decimal.Decimal) *ProductQtyCreate
SetQty sets the "qty" field.
func (*ProductQtyCreate) SetUpdatedAt ¶
func (pqc *ProductQtyCreate) SetUpdatedAt(t time.Time) *ProductQtyCreate
SetUpdatedAt sets the "updated_at" field.
func (*ProductQtyCreate) SetWorkUnit ¶
func (pqc *ProductQtyCreate) SetWorkUnit(w *WorkUnitInfo) *ProductQtyCreate
SetWorkUnit sets the "work_unit" edge to the WorkUnitInfo entity.
func (*ProductQtyCreate) SetWorkUnitID ¶
func (pqc *ProductQtyCreate) SetWorkUnitID(u uuid.UUID) *ProductQtyCreate
SetWorkUnitID sets the "work_unit_id" field.
type ProductQtyCreateBulk ¶
type ProductQtyCreateBulk struct {
// contains filtered or unexported fields
}
ProductQtyCreateBulk is the builder for creating many ProductQty entities in bulk.
func (*ProductQtyCreateBulk) Exec ¶
func (pqcb *ProductQtyCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductQtyCreateBulk) ExecX ¶
func (pqcb *ProductQtyCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductQtyCreateBulk) Save ¶
func (pqcb *ProductQtyCreateBulk) Save(ctx context.Context) ([]*ProductQty, error)
Save creates the ProductQty entities in the database.
func (*ProductQtyCreateBulk) SaveX ¶
func (pqcb *ProductQtyCreateBulk) SaveX(ctx context.Context) []*ProductQty
SaveX is like Save, but panics if an error occurs.
type ProductQtyDelete ¶
type ProductQtyDelete struct {
// contains filtered or unexported fields
}
ProductQtyDelete is the builder for deleting a ProductQty entity.
func (*ProductQtyDelete) Exec ¶
func (pqd *ProductQtyDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProductQtyDelete) ExecX ¶
func (pqd *ProductQtyDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProductQtyDelete) Where ¶
func (pqd *ProductQtyDelete) Where(ps ...predicate.ProductQty) *ProductQtyDelete
Where appends a list predicates to the ProductQtyDelete builder.
type ProductQtyDeleteOne ¶
type ProductQtyDeleteOne struct {
// contains filtered or unexported fields
}
ProductQtyDeleteOne is the builder for deleting a single ProductQty entity.
func (*ProductQtyDeleteOne) Exec ¶
func (pqdo *ProductQtyDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProductQtyDeleteOne) ExecX ¶
func (pqdo *ProductQtyDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductQtyDeleteOne) Where ¶
func (pqdo *ProductQtyDeleteOne) Where(ps ...predicate.ProductQty) *ProductQtyDeleteOne
Where appends a list predicates to the ProductQtyDelete builder.
type ProductQtyEdges ¶
type ProductQtyEdges struct { // WorkUnit holds the value of the work_unit edge. WorkUnit *WorkUnitInfo `json:"work_unit,omitempty"` // Product holds the value of the product edge. Product *ProductInfo `json:"product,omitempty"` // ProductColor holds the value of the product_color edge. ProductColor *ProductColor `json:"product_color,omitempty"` // contains filtered or unexported fields }
ProductQtyEdges holds the relations/edges for other nodes in the graph.
func (ProductQtyEdges) ProductColorOrErr ¶
func (e ProductQtyEdges) ProductColorOrErr() (*ProductColor, error)
ProductColorOrErr returns the ProductColor value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ProductQtyEdges) ProductOrErr ¶
func (e ProductQtyEdges) ProductOrErr() (*ProductInfo, error)
ProductOrErr returns the Product value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ProductQtyEdges) WorkUnitOrErr ¶
func (e ProductQtyEdges) WorkUnitOrErr() (*WorkUnitInfo, error)
WorkUnitOrErr returns the WorkUnit value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ProductQtyGroupBy ¶
type ProductQtyGroupBy struct {
// contains filtered or unexported fields
}
ProductQtyGroupBy is the group-by builder for ProductQty entities.
func (*ProductQtyGroupBy) Aggregate ¶
func (pqgb *ProductQtyGroupBy) Aggregate(fns ...AggregateFunc) *ProductQtyGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProductQtyGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductQtyGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductQtyGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductQtyGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductQtyGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductQtyGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductQtyGroupBy) Scan ¶
func (pqgb *ProductQtyGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductQtyGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductQtyMutation ¶
type ProductQtyMutation struct {
// contains filtered or unexported fields
}
ProductQtyMutation represents an operation that mutates the ProductQty nodes in the graph.
func (*ProductQtyMutation) AddField ¶
func (m *ProductQtyMutation) 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 (*ProductQtyMutation) AddPricePerUnit ¶
func (m *ProductQtyMutation) AddPricePerUnit(d decimal.Decimal)
AddPricePerUnit adds d to the "price_per_unit" field.
func (*ProductQtyMutation) AddQty ¶
func (m *ProductQtyMutation) AddQty(d decimal.Decimal)
AddQty adds d to the "qty" field.
func (*ProductQtyMutation) AddedEdges ¶
func (m *ProductQtyMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProductQtyMutation) AddedField ¶
func (m *ProductQtyMutation) 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 (*ProductQtyMutation) AddedFields ¶
func (m *ProductQtyMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProductQtyMutation) AddedIDs ¶
func (m *ProductQtyMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProductQtyMutation) AddedPricePerUnit ¶
func (m *ProductQtyMutation) AddedPricePerUnit() (r decimal.Decimal, exists bool)
AddedPricePerUnit returns the value that was added to the "price_per_unit" field in this mutation.
func (*ProductQtyMutation) AddedQty ¶
func (m *ProductQtyMutation) AddedQty() (r decimal.Decimal, exists bool)
AddedQty returns the value that was added to the "qty" field in this mutation.
func (*ProductQtyMutation) ClearEdge ¶
func (m *ProductQtyMutation) 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 (*ProductQtyMutation) ClearField ¶
func (m *ProductQtyMutation) 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 (*ProductQtyMutation) ClearProduct ¶
func (m *ProductQtyMutation) ClearProduct()
ClearProduct clears the "product" edge to the ProductInfo entity.
func (*ProductQtyMutation) ClearProductColor ¶
func (m *ProductQtyMutation) ClearProductColor()
ClearProductColor clears the "product_color" edge to the ProductColor entity.
func (*ProductQtyMutation) ClearWorkUnit ¶
func (m *ProductQtyMutation) ClearWorkUnit()
ClearWorkUnit clears the "work_unit" edge to the WorkUnitInfo entity.
func (*ProductQtyMutation) ClearedEdges ¶
func (m *ProductQtyMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProductQtyMutation) ClearedFields ¶
func (m *ProductQtyMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProductQtyMutation) Client ¶
func (m ProductQtyMutation) 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 (*ProductQtyMutation) CreatedAt ¶
func (m *ProductQtyMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ProductQtyMutation) EdgeCleared ¶
func (m *ProductQtyMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProductQtyMutation) Field ¶
func (m *ProductQtyMutation) 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 (*ProductQtyMutation) FieldCleared ¶
func (m *ProductQtyMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProductQtyMutation) Fields ¶
func (m *ProductQtyMutation) 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 (*ProductQtyMutation) ID ¶
func (m *ProductQtyMutation) ID() (id uuid.UUID, 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 (*ProductQtyMutation) IDs ¶
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 (*ProductQtyMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ProductQty entity. If the ProductQty 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 (*ProductQtyMutation) 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 (*ProductQtyMutation) OldPricePerUnit ¶
OldPricePerUnit returns the old "price_per_unit" field's value of the ProductQty entity. If the ProductQty 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 (*ProductQtyMutation) OldProductColorID ¶
func (m *ProductQtyMutation) OldProductColorID(ctx context.Context) (v string, err error)
OldProductColorID returns the old "product_color_id" field's value of the ProductQty entity. If the ProductQty 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 (*ProductQtyMutation) OldProductID ¶
func (m *ProductQtyMutation) OldProductID(ctx context.Context) (v string, err error)
OldProductID returns the old "product_id" field's value of the ProductQty entity. If the ProductQty 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 (*ProductQtyMutation) OldQty ¶
OldQty returns the old "qty" field's value of the ProductQty entity. If the ProductQty 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 (*ProductQtyMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the ProductQty entity. If the ProductQty 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 (*ProductQtyMutation) OldWorkUnitID ¶
OldWorkUnitID returns the old "work_unit_id" field's value of the ProductQty entity. If the ProductQty 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 (*ProductQtyMutation) PricePerUnit ¶
func (m *ProductQtyMutation) PricePerUnit() (r decimal.Decimal, exists bool)
PricePerUnit returns the value of the "price_per_unit" field in the mutation.
func (*ProductQtyMutation) ProductCleared ¶
func (m *ProductQtyMutation) ProductCleared() bool
ProductCleared reports if the "product" edge to the ProductInfo entity was cleared.
func (*ProductQtyMutation) ProductColorCleared ¶
func (m *ProductQtyMutation) ProductColorCleared() bool
ProductColorCleared reports if the "product_color" edge to the ProductColor entity was cleared.
func (*ProductQtyMutation) ProductColorID ¶
func (m *ProductQtyMutation) ProductColorID() (r string, exists bool)
ProductColorID returns the value of the "product_color_id" field in the mutation.
func (*ProductQtyMutation) ProductColorIDs ¶
func (m *ProductQtyMutation) ProductColorIDs() (ids []string)
ProductColorIDs returns the "product_color" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProductColorID instead. It exists only for internal usage by the builders.
func (*ProductQtyMutation) ProductID ¶
func (m *ProductQtyMutation) ProductID() (r string, exists bool)
ProductID returns the value of the "product_id" field in the mutation.
func (*ProductQtyMutation) ProductIDs ¶
func (m *ProductQtyMutation) ProductIDs() (ids []string)
ProductIDs returns the "product" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProductID instead. It exists only for internal usage by the builders.
func (*ProductQtyMutation) Qty ¶
func (m *ProductQtyMutation) Qty() (r decimal.Decimal, exists bool)
Qty returns the value of the "qty" field in the mutation.
func (*ProductQtyMutation) RemovedEdges ¶
func (m *ProductQtyMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProductQtyMutation) RemovedIDs ¶
func (m *ProductQtyMutation) 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 (*ProductQtyMutation) ResetCreatedAt ¶
func (m *ProductQtyMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ProductQtyMutation) ResetEdge ¶
func (m *ProductQtyMutation) 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 (*ProductQtyMutation) ResetField ¶
func (m *ProductQtyMutation) 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 (*ProductQtyMutation) ResetPricePerUnit ¶
func (m *ProductQtyMutation) ResetPricePerUnit()
ResetPricePerUnit resets all changes to the "price_per_unit" field.
func (*ProductQtyMutation) ResetProduct ¶
func (m *ProductQtyMutation) ResetProduct()
ResetProduct resets all changes to the "product" edge.
func (*ProductQtyMutation) ResetProductColor ¶
func (m *ProductQtyMutation) ResetProductColor()
ResetProductColor resets all changes to the "product_color" edge.
func (*ProductQtyMutation) ResetProductColorID ¶
func (m *ProductQtyMutation) ResetProductColorID()
ResetProductColorID resets all changes to the "product_color_id" field.
func (*ProductQtyMutation) ResetProductID ¶
func (m *ProductQtyMutation) ResetProductID()
ResetProductID resets all changes to the "product_id" field.
func (*ProductQtyMutation) ResetQty ¶
func (m *ProductQtyMutation) ResetQty()
ResetQty resets all changes to the "qty" field.
func (*ProductQtyMutation) ResetUpdatedAt ¶
func (m *ProductQtyMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ProductQtyMutation) ResetWorkUnit ¶
func (m *ProductQtyMutation) ResetWorkUnit()
ResetWorkUnit resets all changes to the "work_unit" edge.
func (*ProductQtyMutation) ResetWorkUnitID ¶
func (m *ProductQtyMutation) ResetWorkUnitID()
ResetWorkUnitID resets all changes to the "work_unit_id" field.
func (*ProductQtyMutation) SetCreatedAt ¶
func (m *ProductQtyMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ProductQtyMutation) SetField ¶
func (m *ProductQtyMutation) 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 (*ProductQtyMutation) SetID ¶
func (m *ProductQtyMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ProductQty entities.
func (*ProductQtyMutation) SetOp ¶
func (m *ProductQtyMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProductQtyMutation) SetPricePerUnit ¶
func (m *ProductQtyMutation) SetPricePerUnit(d decimal.Decimal)
SetPricePerUnit sets the "price_per_unit" field.
func (*ProductQtyMutation) SetProductColorID ¶
func (m *ProductQtyMutation) SetProductColorID(s string)
SetProductColorID sets the "product_color_id" field.
func (*ProductQtyMutation) SetProductID ¶
func (m *ProductQtyMutation) SetProductID(s string)
SetProductID sets the "product_id" field.
func (*ProductQtyMutation) SetQty ¶
func (m *ProductQtyMutation) SetQty(d decimal.Decimal)
SetQty sets the "qty" field.
func (*ProductQtyMutation) SetUpdatedAt ¶
func (m *ProductQtyMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ProductQtyMutation) SetWorkUnitID ¶
func (m *ProductQtyMutation) SetWorkUnitID(u uuid.UUID)
SetWorkUnitID sets the "work_unit_id" field.
func (ProductQtyMutation) Tx ¶
func (m ProductQtyMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProductQtyMutation) Type ¶
func (m *ProductQtyMutation) Type() string
Type returns the node type of this mutation (ProductQty).
func (*ProductQtyMutation) UpdatedAt ¶
func (m *ProductQtyMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ProductQtyMutation) Where ¶
func (m *ProductQtyMutation) Where(ps ...predicate.ProductQty)
Where appends a list predicates to the ProductQtyMutation builder.
func (*ProductQtyMutation) WhereP ¶
func (m *ProductQtyMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProductQtyMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*ProductQtyMutation) WorkUnitCleared ¶
func (m *ProductQtyMutation) WorkUnitCleared() bool
WorkUnitCleared reports if the "work_unit" edge to the WorkUnitInfo entity was cleared.
func (*ProductQtyMutation) WorkUnitID ¶
func (m *ProductQtyMutation) WorkUnitID() (r uuid.UUID, exists bool)
WorkUnitID returns the value of the "work_unit_id" field in the mutation.
func (*ProductQtyMutation) WorkUnitIDs ¶
func (m *ProductQtyMutation) WorkUnitIDs() (ids []uuid.UUID)
WorkUnitIDs returns the "work_unit" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WorkUnitID instead. It exists only for internal usage by the builders.
type ProductQtyQuery ¶
type ProductQtyQuery struct {
// contains filtered or unexported fields
}
ProductQtyQuery is the builder for querying ProductQty entities.
func (*ProductQtyQuery) Aggregate ¶
func (pqq *ProductQtyQuery) Aggregate(fns ...AggregateFunc) *ProductQtySelect
Aggregate returns a ProductQtySelect configured with the given aggregations.
func (*ProductQtyQuery) All ¶
func (pqq *ProductQtyQuery) All(ctx context.Context) ([]*ProductQty, error)
All executes the query and returns a list of ProductQties.
func (*ProductQtyQuery) AllX ¶
func (pqq *ProductQtyQuery) AllX(ctx context.Context) []*ProductQty
AllX is like All, but panics if an error occurs.
func (*ProductQtyQuery) Clone ¶
func (pqq *ProductQtyQuery) Clone() *ProductQtyQuery
Clone returns a duplicate of the ProductQtyQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProductQtyQuery) Count ¶
func (pqq *ProductQtyQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProductQtyQuery) CountX ¶
func (pqq *ProductQtyQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProductQtyQuery) Exist ¶
func (pqq *ProductQtyQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProductQtyQuery) ExistX ¶
func (pqq *ProductQtyQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProductQtyQuery) First ¶
func (pqq *ProductQtyQuery) First(ctx context.Context) (*ProductQty, error)
First returns the first ProductQty entity from the query. Returns a *NotFoundError when no ProductQty was found.
func (*ProductQtyQuery) FirstID ¶
FirstID returns the first ProductQty ID from the query. Returns a *NotFoundError when no ProductQty ID was found.
func (*ProductQtyQuery) FirstIDX ¶
func (pqq *ProductQtyQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProductQtyQuery) FirstX ¶
func (pqq *ProductQtyQuery) FirstX(ctx context.Context) *ProductQty
FirstX is like First, but panics if an error occurs.
func (*ProductQtyQuery) GroupBy ¶
func (pqq *ProductQtyQuery) GroupBy(field string, fields ...string) *ProductQtyGroupBy
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.ProductQty.Query(). GroupBy(productqty.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProductQtyQuery) IDsX ¶
func (pqq *ProductQtyQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ProductQtyQuery) Limit ¶
func (pqq *ProductQtyQuery) Limit(limit int) *ProductQtyQuery
Limit the number of records to be returned by this query.
func (*ProductQtyQuery) Offset ¶
func (pqq *ProductQtyQuery) Offset(offset int) *ProductQtyQuery
Offset to start from.
func (*ProductQtyQuery) Only ¶
func (pqq *ProductQtyQuery) Only(ctx context.Context) (*ProductQty, error)
Only returns a single ProductQty entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ProductQty entity is found. Returns a *NotFoundError when no ProductQty entities are found.
func (*ProductQtyQuery) OnlyID ¶
OnlyID is like Only, but returns the only ProductQty ID in the query. Returns a *NotSingularError when more than one ProductQty ID is found. Returns a *NotFoundError when no entities are found.
func (*ProductQtyQuery) OnlyIDX ¶
func (pqq *ProductQtyQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProductQtyQuery) OnlyX ¶
func (pqq *ProductQtyQuery) OnlyX(ctx context.Context) *ProductQty
OnlyX is like Only, but panics if an error occurs.
func (*ProductQtyQuery) Order ¶
func (pqq *ProductQtyQuery) Order(o ...productqty.OrderOption) *ProductQtyQuery
Order specifies how the records should be ordered.
func (*ProductQtyQuery) QueryProduct ¶
func (pqq *ProductQtyQuery) QueryProduct() *ProductInfoQuery
QueryProduct chains the current query on the "product" edge.
func (*ProductQtyQuery) QueryProductColor ¶
func (pqq *ProductQtyQuery) QueryProductColor() *ProductColorQuery
QueryProductColor chains the current query on the "product_color" edge.
func (*ProductQtyQuery) QueryWorkUnit ¶
func (pqq *ProductQtyQuery) QueryWorkUnit() *WorkUnitInfoQuery
QueryWorkUnit chains the current query on the "work_unit" edge.
func (*ProductQtyQuery) Select ¶
func (pqq *ProductQtyQuery) Select(fields ...string) *ProductQtySelect
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.ProductQty.Query(). Select(productqty.FieldCreatedAt). Scan(ctx, &v)
func (*ProductQtyQuery) Unique ¶
func (pqq *ProductQtyQuery) Unique(unique bool) *ProductQtyQuery
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 (*ProductQtyQuery) Where ¶
func (pqq *ProductQtyQuery) Where(ps ...predicate.ProductQty) *ProductQtyQuery
Where adds a new predicate for the ProductQtyQuery builder.
func (*ProductQtyQuery) WithProduct ¶
func (pqq *ProductQtyQuery) WithProduct(opts ...func(*ProductInfoQuery)) *ProductQtyQuery
WithProduct tells the query-builder to eager-load the nodes that are connected to the "product" edge. The optional arguments are used to configure the query builder of the edge.
func (*ProductQtyQuery) WithProductColor ¶
func (pqq *ProductQtyQuery) WithProductColor(opts ...func(*ProductColorQuery)) *ProductQtyQuery
WithProductColor tells the query-builder to eager-load the nodes that are connected to the "product_color" edge. The optional arguments are used to configure the query builder of the edge.
func (*ProductQtyQuery) WithWorkUnit ¶
func (pqq *ProductQtyQuery) WithWorkUnit(opts ...func(*WorkUnitInfoQuery)) *ProductQtyQuery
WithWorkUnit tells the query-builder to eager-load the nodes that are connected to the "work_unit" edge. The optional arguments are used to configure the query builder of the edge.
type ProductQtySelect ¶
type ProductQtySelect struct { *ProductQtyQuery // contains filtered or unexported fields }
ProductQtySelect is the builder for selecting fields of ProductQty entities.
func (*ProductQtySelect) Aggregate ¶
func (pqs *ProductQtySelect) Aggregate(fns ...AggregateFunc) *ProductQtySelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProductQtySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductQtySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductQtySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductQtySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductQtySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductQtySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductQtySelect) Scan ¶
func (pqs *ProductQtySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductQtySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductQtyUpdate ¶
type ProductQtyUpdate struct {
// contains filtered or unexported fields
}
ProductQtyUpdate is the builder for updating ProductQty entities.
func (*ProductQtyUpdate) AddPricePerUnit ¶
func (pqu *ProductQtyUpdate) AddPricePerUnit(d decimal.Decimal) *ProductQtyUpdate
AddPricePerUnit adds d to the "price_per_unit" field.
func (*ProductQtyUpdate) AddQty ¶
func (pqu *ProductQtyUpdate) AddQty(d decimal.Decimal) *ProductQtyUpdate
AddQty adds d to the "qty" field.
func (*ProductQtyUpdate) Exec ¶
func (pqu *ProductQtyUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductQtyUpdate) ExecX ¶
func (pqu *ProductQtyUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductQtyUpdate) Mutation ¶
func (pqu *ProductQtyUpdate) Mutation() *ProductQtyMutation
Mutation returns the ProductQtyMutation object of the builder.
func (*ProductQtyUpdate) Save ¶
func (pqu *ProductQtyUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProductQtyUpdate) SaveX ¶
func (pqu *ProductQtyUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProductQtyUpdate) SetNillablePricePerUnit ¶
func (pqu *ProductQtyUpdate) SetNillablePricePerUnit(d *decimal.Decimal) *ProductQtyUpdate
SetNillablePricePerUnit sets the "price_per_unit" field if the given value is not nil.
func (*ProductQtyUpdate) SetNillableQty ¶
func (pqu *ProductQtyUpdate) SetNillableQty(d *decimal.Decimal) *ProductQtyUpdate
SetNillableQty sets the "qty" field if the given value is not nil.
func (*ProductQtyUpdate) SetPricePerUnit ¶
func (pqu *ProductQtyUpdate) SetPricePerUnit(d decimal.Decimal) *ProductQtyUpdate
SetPricePerUnit sets the "price_per_unit" field.
func (*ProductQtyUpdate) SetQty ¶
func (pqu *ProductQtyUpdate) SetQty(d decimal.Decimal) *ProductQtyUpdate
SetQty sets the "qty" field.
func (*ProductQtyUpdate) SetUpdatedAt ¶
func (pqu *ProductQtyUpdate) SetUpdatedAt(t time.Time) *ProductQtyUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ProductQtyUpdate) Where ¶
func (pqu *ProductQtyUpdate) Where(ps ...predicate.ProductQty) *ProductQtyUpdate
Where appends a list predicates to the ProductQtyUpdate builder.
type ProductQtyUpdateOne ¶
type ProductQtyUpdateOne struct {
// contains filtered or unexported fields
}
ProductQtyUpdateOne is the builder for updating a single ProductQty entity.
func (*ProductQtyUpdateOne) AddPricePerUnit ¶
func (pquo *ProductQtyUpdateOne) AddPricePerUnit(d decimal.Decimal) *ProductQtyUpdateOne
AddPricePerUnit adds d to the "price_per_unit" field.
func (*ProductQtyUpdateOne) AddQty ¶
func (pquo *ProductQtyUpdateOne) AddQty(d decimal.Decimal) *ProductQtyUpdateOne
AddQty adds d to the "qty" field.
func (*ProductQtyUpdateOne) Exec ¶
func (pquo *ProductQtyUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProductQtyUpdateOne) ExecX ¶
func (pquo *ProductQtyUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductQtyUpdateOne) Mutation ¶
func (pquo *ProductQtyUpdateOne) Mutation() *ProductQtyMutation
Mutation returns the ProductQtyMutation object of the builder.
func (*ProductQtyUpdateOne) Save ¶
func (pquo *ProductQtyUpdateOne) Save(ctx context.Context) (*ProductQty, error)
Save executes the query and returns the updated ProductQty entity.
func (*ProductQtyUpdateOne) SaveX ¶
func (pquo *ProductQtyUpdateOne) SaveX(ctx context.Context) *ProductQty
SaveX is like Save, but panics if an error occurs.
func (*ProductQtyUpdateOne) Select ¶
func (pquo *ProductQtyUpdateOne) Select(field string, fields ...string) *ProductQtyUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProductQtyUpdateOne) SetNillablePricePerUnit ¶
func (pquo *ProductQtyUpdateOne) SetNillablePricePerUnit(d *decimal.Decimal) *ProductQtyUpdateOne
SetNillablePricePerUnit sets the "price_per_unit" field if the given value is not nil.
func (*ProductQtyUpdateOne) SetNillableQty ¶
func (pquo *ProductQtyUpdateOne) SetNillableQty(d *decimal.Decimal) *ProductQtyUpdateOne
SetNillableQty sets the "qty" field if the given value is not nil.
func (*ProductQtyUpdateOne) SetPricePerUnit ¶
func (pquo *ProductQtyUpdateOne) SetPricePerUnit(d decimal.Decimal) *ProductQtyUpdateOne
SetPricePerUnit sets the "price_per_unit" field.
func (*ProductQtyUpdateOne) SetQty ¶
func (pquo *ProductQtyUpdateOne) SetQty(d decimal.Decimal) *ProductQtyUpdateOne
SetQty sets the "qty" field.
func (*ProductQtyUpdateOne) SetUpdatedAt ¶
func (pquo *ProductQtyUpdateOne) SetUpdatedAt(t time.Time) *ProductQtyUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ProductQtyUpdateOne) Where ¶
func (pquo *ProductQtyUpdateOne) Where(ps ...predicate.ProductQty) *ProductQtyUpdateOne
Where appends a list predicates to the ProductQtyUpdate builder.
type ProductTag ¶
type ProductTag struct { // ProductID holds the value of the "product_id" field. ProductID string `json:"product_id,omitempty"` // TagID holds the value of the "tag_id" field. TagID string `json:"tag_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ProductTagQuery when eager-loading is set. Edges ProductTagEdges `json:"edges"` // contains filtered or unexported fields }
ProductTag is the model entity for the ProductTag schema.
func (*ProductTag) QueryProducts ¶
func (pt *ProductTag) QueryProducts() *ProductInfoQuery
QueryProducts queries the "products" edge of the ProductTag entity.
func (*ProductTag) QueryTags ¶
func (pt *ProductTag) QueryTags() *TagQuery
QueryTags queries the "tags" edge of the ProductTag entity.
func (*ProductTag) String ¶
func (pt *ProductTag) String() string
String implements the fmt.Stringer.
func (*ProductTag) Unwrap ¶
func (pt *ProductTag) Unwrap() *ProductTag
Unwrap unwraps the ProductTag 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 (*ProductTag) Update ¶
func (pt *ProductTag) Update() *ProductTagUpdateOne
Update returns a builder for updating this ProductTag. Note that you need to call ProductTag.Unwrap() before calling this method if this ProductTag was returned from a transaction, and the transaction was committed or rolled back.
type ProductTagClient ¶
type ProductTagClient struct {
// contains filtered or unexported fields
}
ProductTagClient is a client for the ProductTag schema.
func NewProductTagClient ¶
func NewProductTagClient(c config) *ProductTagClient
NewProductTagClient returns a client for the ProductTag from the given config.
func (*ProductTagClient) Create ¶
func (c *ProductTagClient) Create() *ProductTagCreate
Create returns a builder for creating a ProductTag entity.
func (*ProductTagClient) CreateBulk ¶
func (c *ProductTagClient) CreateBulk(builders ...*ProductTagCreate) *ProductTagCreateBulk
CreateBulk returns a builder for creating a bulk of ProductTag entities.
func (*ProductTagClient) Delete ¶
func (c *ProductTagClient) Delete() *ProductTagDelete
Delete returns a delete builder for ProductTag.
func (*ProductTagClient) Hooks ¶
func (c *ProductTagClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProductTagClient) Intercept ¶
func (c *ProductTagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `producttag.Intercept(f(g(h())))`.
func (*ProductTagClient) Interceptors ¶
func (c *ProductTagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProductTagClient) MapCreateBulk ¶
func (c *ProductTagClient) MapCreateBulk(slice any, setFunc func(*ProductTagCreate, int)) *ProductTagCreateBulk
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 (*ProductTagClient) Query ¶
func (c *ProductTagClient) Query() *ProductTagQuery
Query returns a query builder for ProductTag.
func (*ProductTagClient) QueryProducts ¶
func (c *ProductTagClient) QueryProducts(pt *ProductTag) *ProductInfoQuery
QueryProducts queries the products edge of a ProductTag.
func (*ProductTagClient) QueryTags ¶
func (c *ProductTagClient) QueryTags(pt *ProductTag) *TagQuery
QueryTags queries the tags edge of a ProductTag.
func (*ProductTagClient) Update ¶
func (c *ProductTagClient) Update() *ProductTagUpdate
Update returns an update builder for ProductTag.
func (*ProductTagClient) UpdateOne ¶
func (c *ProductTagClient) UpdateOne(pt *ProductTag) *ProductTagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProductTagClient) Use ¶
func (c *ProductTagClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `producttag.Hooks(f(g(h())))`.
type ProductTagCreate ¶
type ProductTagCreate struct {
// contains filtered or unexported fields
}
ProductTagCreate is the builder for creating a ProductTag entity.
func (*ProductTagCreate) Exec ¶
func (ptc *ProductTagCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductTagCreate) ExecX ¶
func (ptc *ProductTagCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductTagCreate) Mutation ¶
func (ptc *ProductTagCreate) Mutation() *ProductTagMutation
Mutation returns the ProductTagMutation object of the builder.
func (*ProductTagCreate) Save ¶
func (ptc *ProductTagCreate) Save(ctx context.Context) (*ProductTag, error)
Save creates the ProductTag in the database.
func (*ProductTagCreate) SaveX ¶
func (ptc *ProductTagCreate) SaveX(ctx context.Context) *ProductTag
SaveX calls Save and panics if Save returns an error.
func (*ProductTagCreate) SetProductID ¶
func (ptc *ProductTagCreate) SetProductID(s string) *ProductTagCreate
SetProductID sets the "product_id" field.
func (*ProductTagCreate) SetProducts ¶
func (ptc *ProductTagCreate) SetProducts(p *ProductInfo) *ProductTagCreate
SetProducts sets the "products" edge to the ProductInfo entity.
func (*ProductTagCreate) SetProductsID ¶
func (ptc *ProductTagCreate) SetProductsID(id string) *ProductTagCreate
SetProductsID sets the "products" edge to the ProductInfo entity by ID.
func (*ProductTagCreate) SetTagID ¶
func (ptc *ProductTagCreate) SetTagID(s string) *ProductTagCreate
SetTagID sets the "tag_id" field.
func (*ProductTagCreate) SetTags ¶
func (ptc *ProductTagCreate) SetTags(t *Tag) *ProductTagCreate
SetTags sets the "tags" edge to the Tag entity.
func (*ProductTagCreate) SetTagsID ¶
func (ptc *ProductTagCreate) SetTagsID(id string) *ProductTagCreate
SetTagsID sets the "tags" edge to the Tag entity by ID.
type ProductTagCreateBulk ¶
type ProductTagCreateBulk struct {
// contains filtered or unexported fields
}
ProductTagCreateBulk is the builder for creating many ProductTag entities in bulk.
func (*ProductTagCreateBulk) Exec ¶
func (ptcb *ProductTagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductTagCreateBulk) ExecX ¶
func (ptcb *ProductTagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductTagCreateBulk) Save ¶
func (ptcb *ProductTagCreateBulk) Save(ctx context.Context) ([]*ProductTag, error)
Save creates the ProductTag entities in the database.
func (*ProductTagCreateBulk) SaveX ¶
func (ptcb *ProductTagCreateBulk) SaveX(ctx context.Context) []*ProductTag
SaveX is like Save, but panics if an error occurs.
type ProductTagDelete ¶
type ProductTagDelete struct {
// contains filtered or unexported fields
}
ProductTagDelete is the builder for deleting a ProductTag entity.
func (*ProductTagDelete) Exec ¶
func (ptd *ProductTagDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProductTagDelete) ExecX ¶
func (ptd *ProductTagDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProductTagDelete) Where ¶
func (ptd *ProductTagDelete) Where(ps ...predicate.ProductTag) *ProductTagDelete
Where appends a list predicates to the ProductTagDelete builder.
type ProductTagDeleteOne ¶
type ProductTagDeleteOne struct {
// contains filtered or unexported fields
}
ProductTagDeleteOne is the builder for deleting a single ProductTag entity.
func (*ProductTagDeleteOne) Exec ¶
func (ptdo *ProductTagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProductTagDeleteOne) ExecX ¶
func (ptdo *ProductTagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductTagDeleteOne) Where ¶
func (ptdo *ProductTagDeleteOne) Where(ps ...predicate.ProductTag) *ProductTagDeleteOne
Where appends a list predicates to the ProductTagDelete builder.
type ProductTagEdges ¶
type ProductTagEdges struct { // Products holds the value of the products edge. Products *ProductInfo `json:"products,omitempty"` // Tags holds the value of the tags edge. Tags *Tag `json:"tags,omitempty"` // contains filtered or unexported fields }
ProductTagEdges holds the relations/edges for other nodes in the graph.
func (ProductTagEdges) ProductsOrErr ¶
func (e ProductTagEdges) ProductsOrErr() (*ProductInfo, error)
ProductsOrErr returns the Products value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ProductTagEdges) TagsOrErr ¶
func (e ProductTagEdges) TagsOrErr() (*Tag, error)
TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ProductTagGroupBy ¶
type ProductTagGroupBy struct {
// contains filtered or unexported fields
}
ProductTagGroupBy is the group-by builder for ProductTag entities.
func (*ProductTagGroupBy) Aggregate ¶
func (ptgb *ProductTagGroupBy) Aggregate(fns ...AggregateFunc) *ProductTagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProductTagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductTagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductTagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductTagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductTagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductTagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductTagGroupBy) Scan ¶
func (ptgb *ProductTagGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductTagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductTagMutation ¶
type ProductTagMutation struct {
// contains filtered or unexported fields
}
ProductTagMutation represents an operation that mutates the ProductTag nodes in the graph.
func (*ProductTagMutation) AddField ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) AddedEdges ¶
func (m *ProductTagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProductTagMutation) AddedField ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) AddedFields ¶
func (m *ProductTagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProductTagMutation) AddedIDs ¶
func (m *ProductTagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProductTagMutation) ClearEdge ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) ClearField ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) ClearProducts ¶
func (m *ProductTagMutation) ClearProducts()
ClearProducts clears the "products" edge to the ProductInfo entity.
func (*ProductTagMutation) ClearTags ¶
func (m *ProductTagMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*ProductTagMutation) ClearedEdges ¶
func (m *ProductTagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProductTagMutation) ClearedFields ¶
func (m *ProductTagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProductTagMutation) Client ¶
func (m ProductTagMutation) 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 (*ProductTagMutation) EdgeCleared ¶
func (m *ProductTagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProductTagMutation) Field ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) FieldCleared ¶
func (m *ProductTagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProductTagMutation) Fields ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) 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 (*ProductTagMutation) ProductID ¶
func (m *ProductTagMutation) ProductID() (r string, exists bool)
ProductID returns the value of the "product_id" field in the mutation.
func (*ProductTagMutation) ProductsCleared ¶
func (m *ProductTagMutation) ProductsCleared() bool
ProductsCleared reports if the "products" edge to the ProductInfo entity was cleared.
func (*ProductTagMutation) ProductsID ¶
func (m *ProductTagMutation) ProductsID() (id string, exists bool)
ProductsID returns the "products" edge ID in the mutation.
func (*ProductTagMutation) ProductsIDs ¶
func (m *ProductTagMutation) ProductsIDs() (ids []string)
ProductsIDs returns the "products" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProductsID instead. It exists only for internal usage by the builders.
func (*ProductTagMutation) RemovedEdges ¶
func (m *ProductTagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProductTagMutation) RemovedIDs ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) ResetEdge ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) ResetField ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) ResetProductID ¶
func (m *ProductTagMutation) ResetProductID()
ResetProductID resets all changes to the "product_id" field.
func (*ProductTagMutation) ResetProducts ¶
func (m *ProductTagMutation) ResetProducts()
ResetProducts resets all changes to the "products" edge.
func (*ProductTagMutation) ResetTagID ¶
func (m *ProductTagMutation) ResetTagID()
ResetTagID resets all changes to the "tag_id" field.
func (*ProductTagMutation) ResetTags ¶
func (m *ProductTagMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*ProductTagMutation) SetField ¶
func (m *ProductTagMutation) 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 (*ProductTagMutation) SetOp ¶
func (m *ProductTagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProductTagMutation) SetProductID ¶
func (m *ProductTagMutation) SetProductID(s string)
SetProductID sets the "product_id" field.
func (*ProductTagMutation) SetProductsID ¶
func (m *ProductTagMutation) SetProductsID(id string)
SetProductsID sets the "products" edge to the ProductInfo entity by id.
func (*ProductTagMutation) SetTagID ¶
func (m *ProductTagMutation) SetTagID(s string)
SetTagID sets the "tag_id" field.
func (*ProductTagMutation) SetTagsID ¶
func (m *ProductTagMutation) SetTagsID(id string)
SetTagsID sets the "tags" edge to the Tag entity by id.
func (*ProductTagMutation) TagID ¶
func (m *ProductTagMutation) TagID() (r string, exists bool)
TagID returns the value of the "tag_id" field in the mutation.
func (*ProductTagMutation) TagsCleared ¶
func (m *ProductTagMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*ProductTagMutation) TagsID ¶
func (m *ProductTagMutation) TagsID() (id string, exists bool)
TagsID returns the "tags" edge ID in the mutation.
func (*ProductTagMutation) TagsIDs ¶
func (m *ProductTagMutation) TagsIDs() (ids []string)
TagsIDs returns the "tags" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TagsID instead. It exists only for internal usage by the builders.
func (ProductTagMutation) Tx ¶
func (m ProductTagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProductTagMutation) Type ¶
func (m *ProductTagMutation) Type() string
Type returns the node type of this mutation (ProductTag).
func (*ProductTagMutation) Where ¶
func (m *ProductTagMutation) Where(ps ...predicate.ProductTag)
Where appends a list predicates to the ProductTagMutation builder.
func (*ProductTagMutation) WhereP ¶
func (m *ProductTagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProductTagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProductTagQuery ¶
type ProductTagQuery struct {
// contains filtered or unexported fields
}
ProductTagQuery is the builder for querying ProductTag entities.
func (*ProductTagQuery) Aggregate ¶
func (ptq *ProductTagQuery) Aggregate(fns ...AggregateFunc) *ProductTagSelect
Aggregate returns a ProductTagSelect configured with the given aggregations.
func (*ProductTagQuery) All ¶
func (ptq *ProductTagQuery) All(ctx context.Context) ([]*ProductTag, error)
All executes the query and returns a list of ProductTags.
func (*ProductTagQuery) AllX ¶
func (ptq *ProductTagQuery) AllX(ctx context.Context) []*ProductTag
AllX is like All, but panics if an error occurs.
func (*ProductTagQuery) Clone ¶
func (ptq *ProductTagQuery) Clone() *ProductTagQuery
Clone returns a duplicate of the ProductTagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProductTagQuery) Count ¶
func (ptq *ProductTagQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProductTagQuery) CountX ¶
func (ptq *ProductTagQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProductTagQuery) Exist ¶
func (ptq *ProductTagQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProductTagQuery) ExistX ¶
func (ptq *ProductTagQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProductTagQuery) First ¶
func (ptq *ProductTagQuery) First(ctx context.Context) (*ProductTag, error)
First returns the first ProductTag entity from the query. Returns a *NotFoundError when no ProductTag was found.
func (*ProductTagQuery) FirstX ¶
func (ptq *ProductTagQuery) FirstX(ctx context.Context) *ProductTag
FirstX is like First, but panics if an error occurs.
func (*ProductTagQuery) GroupBy ¶
func (ptq *ProductTagQuery) GroupBy(field string, fields ...string) *ProductTagGroupBy
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 { ProductID string `json:"product_id,omitempty"` Count int `json:"count,omitempty"` } client.ProductTag.Query(). GroupBy(producttag.FieldProductID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProductTagQuery) Limit ¶
func (ptq *ProductTagQuery) Limit(limit int) *ProductTagQuery
Limit the number of records to be returned by this query.
func (*ProductTagQuery) Offset ¶
func (ptq *ProductTagQuery) Offset(offset int) *ProductTagQuery
Offset to start from.
func (*ProductTagQuery) Only ¶
func (ptq *ProductTagQuery) Only(ctx context.Context) (*ProductTag, error)
Only returns a single ProductTag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ProductTag entity is found. Returns a *NotFoundError when no ProductTag entities are found.
func (*ProductTagQuery) OnlyX ¶
func (ptq *ProductTagQuery) OnlyX(ctx context.Context) *ProductTag
OnlyX is like Only, but panics if an error occurs.
func (*ProductTagQuery) Order ¶
func (ptq *ProductTagQuery) Order(o ...producttag.OrderOption) *ProductTagQuery
Order specifies how the records should be ordered.
func (*ProductTagQuery) QueryProducts ¶
func (ptq *ProductTagQuery) QueryProducts() *ProductInfoQuery
QueryProducts chains the current query on the "products" edge.
func (*ProductTagQuery) QueryTags ¶
func (ptq *ProductTagQuery) QueryTags() *TagQuery
QueryTags chains the current query on the "tags" edge.
func (*ProductTagQuery) Select ¶
func (ptq *ProductTagQuery) Select(fields ...string) *ProductTagSelect
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 { ProductID string `json:"product_id,omitempty"` } client.ProductTag.Query(). Select(producttag.FieldProductID). Scan(ctx, &v)
func (*ProductTagQuery) Unique ¶
func (ptq *ProductTagQuery) Unique(unique bool) *ProductTagQuery
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 (*ProductTagQuery) Where ¶
func (ptq *ProductTagQuery) Where(ps ...predicate.ProductTag) *ProductTagQuery
Where adds a new predicate for the ProductTagQuery builder.
func (*ProductTagQuery) WithProducts ¶
func (ptq *ProductTagQuery) WithProducts(opts ...func(*ProductInfoQuery)) *ProductTagQuery
WithProducts tells the query-builder to eager-load the nodes that are connected to the "products" edge. The optional arguments are used to configure the query builder of the edge.
func (*ProductTagQuery) WithTags ¶
func (ptq *ProductTagQuery) WithTags(opts ...func(*TagQuery)) *ProductTagQuery
WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.
type ProductTagSelect ¶
type ProductTagSelect struct { *ProductTagQuery // contains filtered or unexported fields }
ProductTagSelect is the builder for selecting fields of ProductTag entities.
func (*ProductTagSelect) Aggregate ¶
func (pts *ProductTagSelect) Aggregate(fns ...AggregateFunc) *ProductTagSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProductTagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProductTagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProductTagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProductTagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProductTagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProductTagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProductTagSelect) Scan ¶
func (pts *ProductTagSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProductTagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProductTagUpdate ¶
type ProductTagUpdate struct {
// contains filtered or unexported fields
}
ProductTagUpdate is the builder for updating ProductTag entities.
func (*ProductTagUpdate) Exec ¶
func (ptu *ProductTagUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProductTagUpdate) ExecX ¶
func (ptu *ProductTagUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductTagUpdate) Mutation ¶
func (ptu *ProductTagUpdate) Mutation() *ProductTagMutation
Mutation returns the ProductTagMutation object of the builder.
func (*ProductTagUpdate) Save ¶
func (ptu *ProductTagUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProductTagUpdate) SaveX ¶
func (ptu *ProductTagUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProductTagUpdate) Where ¶
func (ptu *ProductTagUpdate) Where(ps ...predicate.ProductTag) *ProductTagUpdate
Where appends a list predicates to the ProductTagUpdate builder.
type ProductTagUpdateOne ¶
type ProductTagUpdateOne struct {
// contains filtered or unexported fields
}
ProductTagUpdateOne is the builder for updating a single ProductTag entity.
func (*ProductTagUpdateOne) Exec ¶
func (ptuo *ProductTagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProductTagUpdateOne) ExecX ¶
func (ptuo *ProductTagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProductTagUpdateOne) Mutation ¶
func (ptuo *ProductTagUpdateOne) Mutation() *ProductTagMutation
Mutation returns the ProductTagMutation object of the builder.
func (*ProductTagUpdateOne) Save ¶
func (ptuo *ProductTagUpdateOne) Save(ctx context.Context) (*ProductTag, error)
Save executes the query and returns the updated ProductTag entity.
func (*ProductTagUpdateOne) SaveX ¶
func (ptuo *ProductTagUpdateOne) SaveX(ctx context.Context) *ProductTag
SaveX is like Save, but panics if an error occurs.
func (*ProductTagUpdateOne) Select ¶
func (ptuo *ProductTagUpdateOne) Select(field string, fields ...string) *ProductTagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProductTagUpdateOne) Where ¶
func (ptuo *ProductTagUpdateOne) Where(ps ...predicate.ProductTag) *ProductTagUpdateOne
Where appends a list predicates to the ProductTagUpdate builder.
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 Shipment ¶
type Shipment struct { // ID of the ent. ID string `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // OrderID holds the value of the "order_id" field. OrderID uuid.UUID `json:"order_id,omitempty"` // InvoiceID holds the value of the "invoice_id" field. InvoiceID uuid.UUID `json:"invoice_id,omitempty"` // StaffID holds the value of the "staff_id" field. StaffID uuid.UUID `json:"staff_id,omitempty"` // ShipmentDate holds the value of the "shipment_date" field. ShipmentDate *time.Time `json:"shipment_date,omitempty"` // Note holds the value of the "note" field. Note *string `json:"note,omitempty"` // StatusCode holds the value of the "status_code" field. StatusCode *int `json:"status_code,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ShipmentQuery when eager-loading is set. Edges ShipmentEdges `json:"edges"` // contains filtered or unexported fields }
Shipment is the model entity for the Shipment schema.
func (*Shipment) QueryInvoice ¶
func (s *Shipment) QueryInvoice() *InvoiceQuery
QueryInvoice queries the "invoice" edge of the Shipment entity.
func (*Shipment) QueryOrder ¶
func (s *Shipment) QueryOrder() *OrderQuery
QueryOrder queries the "order" edge of the Shipment entity.
func (*Shipment) QueryShipmentStatus ¶
func (s *Shipment) QueryShipmentStatus() *ShipmentStatusCodeQuery
QueryShipmentStatus queries the "shipment_status" edge of the Shipment entity.
func (*Shipment) QueryStaff ¶
func (s *Shipment) QueryStaff() *PersonQuery
QueryStaff queries the "staff" edge of the Shipment entity.
func (*Shipment) Unwrap ¶
Unwrap unwraps the Shipment 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 (*Shipment) Update ¶
func (s *Shipment) Update() *ShipmentUpdateOne
Update returns a builder for updating this Shipment. Note that you need to call Shipment.Unwrap() before calling this method if this Shipment was returned from a transaction, and the transaction was committed or rolled back.
type ShipmentClient ¶
type ShipmentClient struct {
// contains filtered or unexported fields
}
ShipmentClient is a client for the Shipment schema.
func NewShipmentClient ¶
func NewShipmentClient(c config) *ShipmentClient
NewShipmentClient returns a client for the Shipment from the given config.
func (*ShipmentClient) Create ¶
func (c *ShipmentClient) Create() *ShipmentCreate
Create returns a builder for creating a Shipment entity.
func (*ShipmentClient) CreateBulk ¶
func (c *ShipmentClient) CreateBulk(builders ...*ShipmentCreate) *ShipmentCreateBulk
CreateBulk returns a builder for creating a bulk of Shipment entities.
func (*ShipmentClient) Delete ¶
func (c *ShipmentClient) Delete() *ShipmentDelete
Delete returns a delete builder for Shipment.
func (*ShipmentClient) DeleteOne ¶
func (c *ShipmentClient) DeleteOne(s *Shipment) *ShipmentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ShipmentClient) DeleteOneID ¶
func (c *ShipmentClient) DeleteOneID(id string) *ShipmentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ShipmentClient) GetX ¶
func (c *ShipmentClient) GetX(ctx context.Context, id string) *Shipment
GetX is like Get, but panics if an error occurs.
func (*ShipmentClient) Hooks ¶
func (c *ShipmentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ShipmentClient) Intercept ¶
func (c *ShipmentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `shipment.Intercept(f(g(h())))`.
func (*ShipmentClient) Interceptors ¶
func (c *ShipmentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ShipmentClient) MapCreateBulk ¶
func (c *ShipmentClient) MapCreateBulk(slice any, setFunc func(*ShipmentCreate, int)) *ShipmentCreateBulk
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 (*ShipmentClient) Query ¶
func (c *ShipmentClient) Query() *ShipmentQuery
Query returns a query builder for Shipment.
func (*ShipmentClient) QueryInvoice ¶
func (c *ShipmentClient) QueryInvoice(s *Shipment) *InvoiceQuery
QueryInvoice queries the invoice edge of a Shipment.
func (*ShipmentClient) QueryOrder ¶
func (c *ShipmentClient) QueryOrder(s *Shipment) *OrderQuery
QueryOrder queries the order edge of a Shipment.
func (*ShipmentClient) QueryShipmentStatus ¶
func (c *ShipmentClient) QueryShipmentStatus(s *Shipment) *ShipmentStatusCodeQuery
QueryShipmentStatus queries the shipment_status edge of a Shipment.
func (*ShipmentClient) QueryStaff ¶
func (c *ShipmentClient) QueryStaff(s *Shipment) *PersonQuery
QueryStaff queries the staff edge of a Shipment.
func (*ShipmentClient) Update ¶
func (c *ShipmentClient) Update() *ShipmentUpdate
Update returns an update builder for Shipment.
func (*ShipmentClient) UpdateOne ¶
func (c *ShipmentClient) UpdateOne(s *Shipment) *ShipmentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ShipmentClient) UpdateOneID ¶
func (c *ShipmentClient) UpdateOneID(id string) *ShipmentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ShipmentClient) Use ¶
func (c *ShipmentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `shipment.Hooks(f(g(h())))`.
type ShipmentCreate ¶
type ShipmentCreate struct {
// contains filtered or unexported fields
}
ShipmentCreate is the builder for creating a Shipment entity.
func (*ShipmentCreate) Exec ¶
func (sc *ShipmentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShipmentCreate) ExecX ¶
func (sc *ShipmentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentCreate) Mutation ¶
func (sc *ShipmentCreate) Mutation() *ShipmentMutation
Mutation returns the ShipmentMutation object of the builder.
func (*ShipmentCreate) Save ¶
func (sc *ShipmentCreate) Save(ctx context.Context) (*Shipment, error)
Save creates the Shipment in the database.
func (*ShipmentCreate) SaveX ¶
func (sc *ShipmentCreate) SaveX(ctx context.Context) *Shipment
SaveX calls Save and panics if Save returns an error.
func (*ShipmentCreate) SetCreatedAt ¶
func (sc *ShipmentCreate) SetCreatedAt(t time.Time) *ShipmentCreate
SetCreatedAt sets the "created_at" field.
func (*ShipmentCreate) SetID ¶
func (sc *ShipmentCreate) SetID(s string) *ShipmentCreate
SetID sets the "id" field.
func (*ShipmentCreate) SetInvoice ¶
func (sc *ShipmentCreate) SetInvoice(i *Invoice) *ShipmentCreate
SetInvoice sets the "invoice" edge to the Invoice entity.
func (*ShipmentCreate) SetInvoiceID ¶
func (sc *ShipmentCreate) SetInvoiceID(u uuid.UUID) *ShipmentCreate
SetInvoiceID sets the "invoice_id" field.
func (*ShipmentCreate) SetNillableCreatedAt ¶
func (sc *ShipmentCreate) SetNillableCreatedAt(t *time.Time) *ShipmentCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ShipmentCreate) SetNillableNote ¶
func (sc *ShipmentCreate) SetNillableNote(s *string) *ShipmentCreate
SetNillableNote sets the "note" field if the given value is not nil.
func (*ShipmentCreate) SetNillableStatusCode ¶
func (sc *ShipmentCreate) SetNillableStatusCode(i *int) *ShipmentCreate
SetNillableStatusCode sets the "status_code" field if the given value is not nil.
func (*ShipmentCreate) SetNillableUpdatedAt ¶
func (sc *ShipmentCreate) SetNillableUpdatedAt(t *time.Time) *ShipmentCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ShipmentCreate) SetNote ¶
func (sc *ShipmentCreate) SetNote(s string) *ShipmentCreate
SetNote sets the "note" field.
func (*ShipmentCreate) SetOrder ¶
func (sc *ShipmentCreate) SetOrder(o *Order) *ShipmentCreate
SetOrder sets the "order" edge to the Order entity.
func (*ShipmentCreate) SetOrderID ¶
func (sc *ShipmentCreate) SetOrderID(u uuid.UUID) *ShipmentCreate
SetOrderID sets the "order_id" field.
func (*ShipmentCreate) SetShipmentDate ¶
func (sc *ShipmentCreate) SetShipmentDate(t time.Time) *ShipmentCreate
SetShipmentDate sets the "shipment_date" field.
func (*ShipmentCreate) SetShipmentStatus ¶
func (sc *ShipmentCreate) SetShipmentStatus(s *ShipmentStatusCode) *ShipmentCreate
SetShipmentStatus sets the "shipment_status" edge to the ShipmentStatusCode entity.
func (*ShipmentCreate) SetShipmentStatusID ¶
func (sc *ShipmentCreate) SetShipmentStatusID(id int) *ShipmentCreate
SetShipmentStatusID sets the "shipment_status" edge to the ShipmentStatusCode entity by ID.
func (*ShipmentCreate) SetStaff ¶
func (sc *ShipmentCreate) SetStaff(p *Person) *ShipmentCreate
SetStaff sets the "staff" edge to the Person entity.
func (*ShipmentCreate) SetStaffID ¶
func (sc *ShipmentCreate) SetStaffID(u uuid.UUID) *ShipmentCreate
SetStaffID sets the "staff_id" field.
func (*ShipmentCreate) SetStatusCode ¶
func (sc *ShipmentCreate) SetStatusCode(i int) *ShipmentCreate
SetStatusCode sets the "status_code" field.
func (*ShipmentCreate) SetUpdatedAt ¶
func (sc *ShipmentCreate) SetUpdatedAt(t time.Time) *ShipmentCreate
SetUpdatedAt sets the "updated_at" field.
type ShipmentCreateBulk ¶
type ShipmentCreateBulk struct {
// contains filtered or unexported fields
}
ShipmentCreateBulk is the builder for creating many Shipment entities in bulk.
func (*ShipmentCreateBulk) Exec ¶
func (scb *ShipmentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ShipmentCreateBulk) ExecX ¶
func (scb *ShipmentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ShipmentDelete ¶
type ShipmentDelete struct {
// contains filtered or unexported fields
}
ShipmentDelete is the builder for deleting a Shipment entity.
func (*ShipmentDelete) Exec ¶
func (sd *ShipmentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ShipmentDelete) ExecX ¶
func (sd *ShipmentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentDelete) Where ¶
func (sd *ShipmentDelete) Where(ps ...predicate.Shipment) *ShipmentDelete
Where appends a list predicates to the ShipmentDelete builder.
type ShipmentDeleteOne ¶
type ShipmentDeleteOne struct {
// contains filtered or unexported fields
}
ShipmentDeleteOne is the builder for deleting a single Shipment entity.
func (*ShipmentDeleteOne) Exec ¶
func (sdo *ShipmentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ShipmentDeleteOne) ExecX ¶
func (sdo *ShipmentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentDeleteOne) Where ¶
func (sdo *ShipmentDeleteOne) Where(ps ...predicate.Shipment) *ShipmentDeleteOne
Where appends a list predicates to the ShipmentDelete builder.
type ShipmentEdges ¶
type ShipmentEdges struct { // Order holds the value of the order edge. Order *Order `json:"order,omitempty"` // Invoice holds the value of the invoice edge. Invoice *Invoice `json:"invoice,omitempty"` // Staff holds the value of the staff edge. Staff *Person `json:"staff,omitempty"` // ShipmentStatus holds the value of the shipment_status edge. ShipmentStatus *ShipmentStatusCode `json:"shipment_status,omitempty"` // contains filtered or unexported fields }
ShipmentEdges holds the relations/edges for other nodes in the graph.
func (ShipmentEdges) InvoiceOrErr ¶
func (e ShipmentEdges) InvoiceOrErr() (*Invoice, error)
InvoiceOrErr returns the Invoice value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ShipmentEdges) OrderOrErr ¶
func (e ShipmentEdges) OrderOrErr() (*Order, error)
OrderOrErr returns the Order value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ShipmentEdges) ShipmentStatusOrErr ¶
func (e ShipmentEdges) ShipmentStatusOrErr() (*ShipmentStatusCode, error)
ShipmentStatusOrErr returns the ShipmentStatus value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ShipmentEdges) StaffOrErr ¶
func (e ShipmentEdges) StaffOrErr() (*Person, error)
StaffOrErr returns the Staff value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ShipmentGroupBy ¶
type ShipmentGroupBy struct {
// contains filtered or unexported fields
}
ShipmentGroupBy is the group-by builder for Shipment entities.
func (*ShipmentGroupBy) Aggregate ¶
func (sgb *ShipmentGroupBy) Aggregate(fns ...AggregateFunc) *ShipmentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ShipmentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ShipmentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ShipmentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ShipmentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ShipmentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ShipmentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ShipmentGroupBy) Scan ¶
func (sgb *ShipmentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ShipmentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ShipmentHistories ¶
type ShipmentHistories []*ShipmentHistory
ShipmentHistories is a parsable slice of ShipmentHistory.
type ShipmentHistory ¶
type ShipmentHistory struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // ShipmentID holds the value of the "shipment_id" field. ShipmentID string `json:"shipment_id,omitempty"` // PersonID holds the value of the "person_id" field. PersonID uuid.UUID `json:"person_id,omitempty"` // OldStatusCode holds the value of the "old_status_code" field. OldStatusCode *int `json:"old_status_code,omitempty"` // NewStatusCode holds the value of the "new_status_code" field. NewStatusCode *int `json:"new_status_code,omitempty"` // Description holds the value of the "description" field. Description *string `json:"description,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ShipmentHistoryQuery when eager-loading is set. Edges ShipmentHistoryEdges `json:"edges"` // contains filtered or unexported fields }
ShipmentHistory is the model entity for the ShipmentHistory schema.
func (*ShipmentHistory) QueryNewStatus ¶
func (sh *ShipmentHistory) QueryNewStatus() *ShipmentStatusCodeQuery
QueryNewStatus queries the "new_status" edge of the ShipmentHistory entity.
func (*ShipmentHistory) QueryOldStatus ¶
func (sh *ShipmentHistory) QueryOldStatus() *ShipmentStatusCodeQuery
QueryOldStatus queries the "old_status" edge of the ShipmentHistory entity.
func (*ShipmentHistory) QueryPerson ¶
func (sh *ShipmentHistory) QueryPerson() *PersonQuery
QueryPerson queries the "person" edge of the ShipmentHistory entity.
func (*ShipmentHistory) QueryShipment ¶
func (sh *ShipmentHistory) QueryShipment() *ShipmentQuery
QueryShipment queries the "shipment" edge of the ShipmentHistory entity.
func (*ShipmentHistory) String ¶
func (sh *ShipmentHistory) String() string
String implements the fmt.Stringer.
func (*ShipmentHistory) Unwrap ¶
func (sh *ShipmentHistory) Unwrap() *ShipmentHistory
Unwrap unwraps the ShipmentHistory 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 (*ShipmentHistory) Update ¶
func (sh *ShipmentHistory) Update() *ShipmentHistoryUpdateOne
Update returns a builder for updating this ShipmentHistory. Note that you need to call ShipmentHistory.Unwrap() before calling this method if this ShipmentHistory was returned from a transaction, and the transaction was committed or rolled back.
type ShipmentHistoryClient ¶
type ShipmentHistoryClient struct {
// contains filtered or unexported fields
}
ShipmentHistoryClient is a client for the ShipmentHistory schema.
func NewShipmentHistoryClient ¶
func NewShipmentHistoryClient(c config) *ShipmentHistoryClient
NewShipmentHistoryClient returns a client for the ShipmentHistory from the given config.
func (*ShipmentHistoryClient) Create ¶
func (c *ShipmentHistoryClient) Create() *ShipmentHistoryCreate
Create returns a builder for creating a ShipmentHistory entity.
func (*ShipmentHistoryClient) CreateBulk ¶
func (c *ShipmentHistoryClient) CreateBulk(builders ...*ShipmentHistoryCreate) *ShipmentHistoryCreateBulk
CreateBulk returns a builder for creating a bulk of ShipmentHistory entities.
func (*ShipmentHistoryClient) Delete ¶
func (c *ShipmentHistoryClient) Delete() *ShipmentHistoryDelete
Delete returns a delete builder for ShipmentHistory.
func (*ShipmentHistoryClient) DeleteOne ¶
func (c *ShipmentHistoryClient) DeleteOne(sh *ShipmentHistory) *ShipmentHistoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ShipmentHistoryClient) DeleteOneID ¶
func (c *ShipmentHistoryClient) DeleteOneID(id uuid.UUID) *ShipmentHistoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ShipmentHistoryClient) Get ¶
func (c *ShipmentHistoryClient) Get(ctx context.Context, id uuid.UUID) (*ShipmentHistory, error)
Get returns a ShipmentHistory entity by its id.
func (*ShipmentHistoryClient) GetX ¶
func (c *ShipmentHistoryClient) GetX(ctx context.Context, id uuid.UUID) *ShipmentHistory
GetX is like Get, but panics if an error occurs.
func (*ShipmentHistoryClient) Hooks ¶
func (c *ShipmentHistoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ShipmentHistoryClient) Intercept ¶
func (c *ShipmentHistoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `shipmenthistory.Intercept(f(g(h())))`.
func (*ShipmentHistoryClient) Interceptors ¶
func (c *ShipmentHistoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ShipmentHistoryClient) MapCreateBulk ¶
func (c *ShipmentHistoryClient) MapCreateBulk(slice any, setFunc func(*ShipmentHistoryCreate, int)) *ShipmentHistoryCreateBulk
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 (*ShipmentHistoryClient) Query ¶
func (c *ShipmentHistoryClient) Query() *ShipmentHistoryQuery
Query returns a query builder for ShipmentHistory.
func (*ShipmentHistoryClient) QueryNewStatus ¶
func (c *ShipmentHistoryClient) QueryNewStatus(sh *ShipmentHistory) *ShipmentStatusCodeQuery
QueryNewStatus queries the new_status edge of a ShipmentHistory.
func (*ShipmentHistoryClient) QueryOldStatus ¶
func (c *ShipmentHistoryClient) QueryOldStatus(sh *ShipmentHistory) *ShipmentStatusCodeQuery
QueryOldStatus queries the old_status edge of a ShipmentHistory.
func (*ShipmentHistoryClient) QueryPerson ¶
func (c *ShipmentHistoryClient) QueryPerson(sh *ShipmentHistory) *PersonQuery
QueryPerson queries the person edge of a ShipmentHistory.
func (*ShipmentHistoryClient) QueryShipment ¶
func (c *ShipmentHistoryClient) QueryShipment(sh *ShipmentHistory) *ShipmentQuery
QueryShipment queries the shipment edge of a ShipmentHistory.
func (*ShipmentHistoryClient) Update ¶
func (c *ShipmentHistoryClient) Update() *ShipmentHistoryUpdate
Update returns an update builder for ShipmentHistory.
func (*ShipmentHistoryClient) UpdateOne ¶
func (c *ShipmentHistoryClient) UpdateOne(sh *ShipmentHistory) *ShipmentHistoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ShipmentHistoryClient) UpdateOneID ¶
func (c *ShipmentHistoryClient) UpdateOneID(id uuid.UUID) *ShipmentHistoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ShipmentHistoryClient) Use ¶
func (c *ShipmentHistoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `shipmenthistory.Hooks(f(g(h())))`.
type ShipmentHistoryCreate ¶
type ShipmentHistoryCreate struct {
// contains filtered or unexported fields
}
ShipmentHistoryCreate is the builder for creating a ShipmentHistory entity.
func (*ShipmentHistoryCreate) Exec ¶
func (shc *ShipmentHistoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShipmentHistoryCreate) ExecX ¶
func (shc *ShipmentHistoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentHistoryCreate) Mutation ¶
func (shc *ShipmentHistoryCreate) Mutation() *ShipmentHistoryMutation
Mutation returns the ShipmentHistoryMutation object of the builder.
func (*ShipmentHistoryCreate) Save ¶
func (shc *ShipmentHistoryCreate) Save(ctx context.Context) (*ShipmentHistory, error)
Save creates the ShipmentHistory in the database.
func (*ShipmentHistoryCreate) SaveX ¶
func (shc *ShipmentHistoryCreate) SaveX(ctx context.Context) *ShipmentHistory
SaveX calls Save and panics if Save returns an error.
func (*ShipmentHistoryCreate) SetCreatedAt ¶
func (shc *ShipmentHistoryCreate) SetCreatedAt(t time.Time) *ShipmentHistoryCreate
SetCreatedAt sets the "created_at" field.
func (*ShipmentHistoryCreate) SetDescription ¶
func (shc *ShipmentHistoryCreate) SetDescription(s string) *ShipmentHistoryCreate
SetDescription sets the "description" field.
func (*ShipmentHistoryCreate) SetID ¶
func (shc *ShipmentHistoryCreate) SetID(u uuid.UUID) *ShipmentHistoryCreate
SetID sets the "id" field.
func (*ShipmentHistoryCreate) SetNewStatus ¶
func (shc *ShipmentHistoryCreate) SetNewStatus(s *ShipmentStatusCode) *ShipmentHistoryCreate
SetNewStatus sets the "new_status" edge to the ShipmentStatusCode entity.
func (*ShipmentHistoryCreate) SetNewStatusCode ¶
func (shc *ShipmentHistoryCreate) SetNewStatusCode(i int) *ShipmentHistoryCreate
SetNewStatusCode sets the "new_status_code" field.
func (*ShipmentHistoryCreate) SetNewStatusID ¶
func (shc *ShipmentHistoryCreate) SetNewStatusID(id int) *ShipmentHistoryCreate
SetNewStatusID sets the "new_status" edge to the ShipmentStatusCode entity by ID.
func (*ShipmentHistoryCreate) SetNillableCreatedAt ¶
func (shc *ShipmentHistoryCreate) SetNillableCreatedAt(t *time.Time) *ShipmentHistoryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ShipmentHistoryCreate) SetNillableDescription ¶
func (shc *ShipmentHistoryCreate) SetNillableDescription(s *string) *ShipmentHistoryCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ShipmentHistoryCreate) SetNillableID ¶
func (shc *ShipmentHistoryCreate) SetNillableID(u *uuid.UUID) *ShipmentHistoryCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ShipmentHistoryCreate) SetNillableNewStatusCode ¶
func (shc *ShipmentHistoryCreate) SetNillableNewStatusCode(i *int) *ShipmentHistoryCreate
SetNillableNewStatusCode sets the "new_status_code" field if the given value is not nil.
func (*ShipmentHistoryCreate) SetNillableNewStatusID ¶
func (shc *ShipmentHistoryCreate) SetNillableNewStatusID(id *int) *ShipmentHistoryCreate
SetNillableNewStatusID sets the "new_status" edge to the ShipmentStatusCode entity by ID if the given value is not nil.
func (*ShipmentHistoryCreate) SetNillableOldStatusCode ¶
func (shc *ShipmentHistoryCreate) SetNillableOldStatusCode(i *int) *ShipmentHistoryCreate
SetNillableOldStatusCode sets the "old_status_code" field if the given value is not nil.
func (*ShipmentHistoryCreate) SetNillableOldStatusID ¶
func (shc *ShipmentHistoryCreate) SetNillableOldStatusID(id *int) *ShipmentHistoryCreate
SetNillableOldStatusID sets the "old_status" edge to the ShipmentStatusCode entity by ID if the given value is not nil.
func (*ShipmentHistoryCreate) SetOldStatus ¶
func (shc *ShipmentHistoryCreate) SetOldStatus(s *ShipmentStatusCode) *ShipmentHistoryCreate
SetOldStatus sets the "old_status" edge to the ShipmentStatusCode entity.
func (*ShipmentHistoryCreate) SetOldStatusCode ¶
func (shc *ShipmentHistoryCreate) SetOldStatusCode(i int) *ShipmentHistoryCreate
SetOldStatusCode sets the "old_status_code" field.
func (*ShipmentHistoryCreate) SetOldStatusID ¶
func (shc *ShipmentHistoryCreate) SetOldStatusID(id int) *ShipmentHistoryCreate
SetOldStatusID sets the "old_status" edge to the ShipmentStatusCode entity by ID.
func (*ShipmentHistoryCreate) SetPerson ¶
func (shc *ShipmentHistoryCreate) SetPerson(p *Person) *ShipmentHistoryCreate
SetPerson sets the "person" edge to the Person entity.
func (*ShipmentHistoryCreate) SetPersonID ¶
func (shc *ShipmentHistoryCreate) SetPersonID(u uuid.UUID) *ShipmentHistoryCreate
SetPersonID sets the "person_id" field.
func (*ShipmentHistoryCreate) SetShipment ¶
func (shc *ShipmentHistoryCreate) SetShipment(s *Shipment) *ShipmentHistoryCreate
SetShipment sets the "shipment" edge to the Shipment entity.
func (*ShipmentHistoryCreate) SetShipmentID ¶
func (shc *ShipmentHistoryCreate) SetShipmentID(s string) *ShipmentHistoryCreate
SetShipmentID sets the "shipment_id" field.
type ShipmentHistoryCreateBulk ¶
type ShipmentHistoryCreateBulk struct {
// contains filtered or unexported fields
}
ShipmentHistoryCreateBulk is the builder for creating many ShipmentHistory entities in bulk.
func (*ShipmentHistoryCreateBulk) Exec ¶
func (shcb *ShipmentHistoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ShipmentHistoryCreateBulk) ExecX ¶
func (shcb *ShipmentHistoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentHistoryCreateBulk) Save ¶
func (shcb *ShipmentHistoryCreateBulk) Save(ctx context.Context) ([]*ShipmentHistory, error)
Save creates the ShipmentHistory entities in the database.
func (*ShipmentHistoryCreateBulk) SaveX ¶
func (shcb *ShipmentHistoryCreateBulk) SaveX(ctx context.Context) []*ShipmentHistory
SaveX is like Save, but panics if an error occurs.
type ShipmentHistoryDelete ¶
type ShipmentHistoryDelete struct {
// contains filtered or unexported fields
}
ShipmentHistoryDelete is the builder for deleting a ShipmentHistory entity.
func (*ShipmentHistoryDelete) Exec ¶
func (shd *ShipmentHistoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ShipmentHistoryDelete) ExecX ¶
func (shd *ShipmentHistoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentHistoryDelete) Where ¶
func (shd *ShipmentHistoryDelete) Where(ps ...predicate.ShipmentHistory) *ShipmentHistoryDelete
Where appends a list predicates to the ShipmentHistoryDelete builder.
type ShipmentHistoryDeleteOne ¶
type ShipmentHistoryDeleteOne struct {
// contains filtered or unexported fields
}
ShipmentHistoryDeleteOne is the builder for deleting a single ShipmentHistory entity.
func (*ShipmentHistoryDeleteOne) Exec ¶
func (shdo *ShipmentHistoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ShipmentHistoryDeleteOne) ExecX ¶
func (shdo *ShipmentHistoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentHistoryDeleteOne) Where ¶
func (shdo *ShipmentHistoryDeleteOne) Where(ps ...predicate.ShipmentHistory) *ShipmentHistoryDeleteOne
Where appends a list predicates to the ShipmentHistoryDelete builder.
type ShipmentHistoryEdges ¶
type ShipmentHistoryEdges struct { // Shipment holds the value of the shipment edge. Shipment *Shipment `json:"shipment,omitempty"` // Person holds the value of the person edge. Person *Person `json:"person,omitempty"` // OldStatus holds the value of the old_status edge. OldStatus *ShipmentStatusCode `json:"old_status,omitempty"` // NewStatus holds the value of the new_status edge. NewStatus *ShipmentStatusCode `json:"new_status,omitempty"` // contains filtered or unexported fields }
ShipmentHistoryEdges holds the relations/edges for other nodes in the graph.
func (ShipmentHistoryEdges) NewStatusOrErr ¶
func (e ShipmentHistoryEdges) NewStatusOrErr() (*ShipmentStatusCode, error)
NewStatusOrErr returns the NewStatus value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ShipmentHistoryEdges) OldStatusOrErr ¶
func (e ShipmentHistoryEdges) OldStatusOrErr() (*ShipmentStatusCode, error)
OldStatusOrErr returns the OldStatus value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ShipmentHistoryEdges) PersonOrErr ¶
func (e ShipmentHistoryEdges) PersonOrErr() (*Person, error)
PersonOrErr returns the Person value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ShipmentHistoryEdges) ShipmentOrErr ¶
func (e ShipmentHistoryEdges) ShipmentOrErr() (*Shipment, error)
ShipmentOrErr returns the Shipment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ShipmentHistoryGroupBy ¶
type ShipmentHistoryGroupBy struct {
// contains filtered or unexported fields
}
ShipmentHistoryGroupBy is the group-by builder for ShipmentHistory entities.
func (*ShipmentHistoryGroupBy) Aggregate ¶
func (shgb *ShipmentHistoryGroupBy) Aggregate(fns ...AggregateFunc) *ShipmentHistoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ShipmentHistoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ShipmentHistoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ShipmentHistoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ShipmentHistoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ShipmentHistoryGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ShipmentHistoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ShipmentHistoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ShipmentHistoryGroupBy) Scan ¶
func (shgb *ShipmentHistoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ShipmentHistoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ShipmentHistoryMutation ¶
type ShipmentHistoryMutation struct {
// contains filtered or unexported fields
}
ShipmentHistoryMutation represents an operation that mutates the ShipmentHistory nodes in the graph.
func (*ShipmentHistoryMutation) AddField ¶
func (m *ShipmentHistoryMutation) 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 (*ShipmentHistoryMutation) AddedEdges ¶
func (m *ShipmentHistoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ShipmentHistoryMutation) AddedField ¶
func (m *ShipmentHistoryMutation) 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 (*ShipmentHistoryMutation) AddedFields ¶
func (m *ShipmentHistoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ShipmentHistoryMutation) AddedIDs ¶
func (m *ShipmentHistoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ShipmentHistoryMutation) ClearDescription ¶
func (m *ShipmentHistoryMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*ShipmentHistoryMutation) ClearEdge ¶
func (m *ShipmentHistoryMutation) 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 (*ShipmentHistoryMutation) ClearField ¶
func (m *ShipmentHistoryMutation) 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 (*ShipmentHistoryMutation) ClearNewStatus ¶
func (m *ShipmentHistoryMutation) ClearNewStatus()
ClearNewStatus clears the "new_status" edge to the ShipmentStatusCode entity.
func (*ShipmentHistoryMutation) ClearNewStatusCode ¶
func (m *ShipmentHistoryMutation) ClearNewStatusCode()
ClearNewStatusCode clears the value of the "new_status_code" field.
func (*ShipmentHistoryMutation) ClearOldStatus ¶
func (m *ShipmentHistoryMutation) ClearOldStatus()
ClearOldStatus clears the "old_status" edge to the ShipmentStatusCode entity.
func (*ShipmentHistoryMutation) ClearOldStatusCode ¶
func (m *ShipmentHistoryMutation) ClearOldStatusCode()
ClearOldStatusCode clears the value of the "old_status_code" field.
func (*ShipmentHistoryMutation) ClearPerson ¶
func (m *ShipmentHistoryMutation) ClearPerson()
ClearPerson clears the "person" edge to the Person entity.
func (*ShipmentHistoryMutation) ClearShipment ¶
func (m *ShipmentHistoryMutation) ClearShipment()
ClearShipment clears the "shipment" edge to the Shipment entity.
func (*ShipmentHistoryMutation) ClearedEdges ¶
func (m *ShipmentHistoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ShipmentHistoryMutation) ClearedFields ¶
func (m *ShipmentHistoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ShipmentHistoryMutation) Client ¶
func (m ShipmentHistoryMutation) 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 (*ShipmentHistoryMutation) CreatedAt ¶
func (m *ShipmentHistoryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ShipmentHistoryMutation) Description ¶
func (m *ShipmentHistoryMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ShipmentHistoryMutation) DescriptionCleared ¶
func (m *ShipmentHistoryMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*ShipmentHistoryMutation) EdgeCleared ¶
func (m *ShipmentHistoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ShipmentHistoryMutation) Field ¶
func (m *ShipmentHistoryMutation) 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 (*ShipmentHistoryMutation) FieldCleared ¶
func (m *ShipmentHistoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ShipmentHistoryMutation) Fields ¶
func (m *ShipmentHistoryMutation) 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 (*ShipmentHistoryMutation) ID ¶
func (m *ShipmentHistoryMutation) ID() (id uuid.UUID, 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 (*ShipmentHistoryMutation) IDs ¶
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 (*ShipmentHistoryMutation) NewStatusCleared ¶
func (m *ShipmentHistoryMutation) NewStatusCleared() bool
NewStatusCleared reports if the "new_status" edge to the ShipmentStatusCode entity was cleared.
func (*ShipmentHistoryMutation) NewStatusCode ¶
func (m *ShipmentHistoryMutation) NewStatusCode() (r int, exists bool)
NewStatusCode returns the value of the "new_status_code" field in the mutation.
func (*ShipmentHistoryMutation) NewStatusCodeCleared ¶
func (m *ShipmentHistoryMutation) NewStatusCodeCleared() bool
NewStatusCodeCleared returns if the "new_status_code" field was cleared in this mutation.
func (*ShipmentHistoryMutation) NewStatusID ¶
func (m *ShipmentHistoryMutation) NewStatusID() (id int, exists bool)
NewStatusID returns the "new_status" edge ID in the mutation.
func (*ShipmentHistoryMutation) NewStatusIDs ¶
func (m *ShipmentHistoryMutation) NewStatusIDs() (ids []int)
NewStatusIDs returns the "new_status" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NewStatusID instead. It exists only for internal usage by the builders.
func (*ShipmentHistoryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ShipmentHistory entity. If the ShipmentHistory 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 (*ShipmentHistoryMutation) OldDescription ¶
func (m *ShipmentHistoryMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old "description" field's value of the ShipmentHistory entity. If the ShipmentHistory 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 (*ShipmentHistoryMutation) 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 (*ShipmentHistoryMutation) OldNewStatusCode ¶
func (m *ShipmentHistoryMutation) OldNewStatusCode(ctx context.Context) (v *int, err error)
OldNewStatusCode returns the old "new_status_code" field's value of the ShipmentHistory entity. If the ShipmentHistory 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 (*ShipmentHistoryMutation) OldOldStatusCode ¶
func (m *ShipmentHistoryMutation) OldOldStatusCode(ctx context.Context) (v *int, err error)
OldOldStatusCode returns the old "old_status_code" field's value of the ShipmentHistory entity. If the ShipmentHistory 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 (*ShipmentHistoryMutation) OldPersonID ¶
OldPersonID returns the old "person_id" field's value of the ShipmentHistory entity. If the ShipmentHistory 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 (*ShipmentHistoryMutation) OldShipmentID ¶
func (m *ShipmentHistoryMutation) OldShipmentID(ctx context.Context) (v string, err error)
OldShipmentID returns the old "shipment_id" field's value of the ShipmentHistory entity. If the ShipmentHistory 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 (*ShipmentHistoryMutation) OldStatusCleared ¶
func (m *ShipmentHistoryMutation) OldStatusCleared() bool
OldStatusCleared reports if the "old_status" edge to the ShipmentStatusCode entity was cleared.
func (*ShipmentHistoryMutation) OldStatusCode ¶
func (m *ShipmentHistoryMutation) OldStatusCode() (r int, exists bool)
OldStatusCode returns the value of the "old_status_code" field in the mutation.
func (*ShipmentHistoryMutation) OldStatusCodeCleared ¶
func (m *ShipmentHistoryMutation) OldStatusCodeCleared() bool
OldStatusCodeCleared returns if the "old_status_code" field was cleared in this mutation.
func (*ShipmentHistoryMutation) OldStatusID ¶
func (m *ShipmentHistoryMutation) OldStatusID() (id int, exists bool)
OldStatusID returns the "old_status" edge ID in the mutation.
func (*ShipmentHistoryMutation) OldStatusIDs ¶
func (m *ShipmentHistoryMutation) OldStatusIDs() (ids []int)
OldStatusIDs returns the "old_status" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OldStatusID instead. It exists only for internal usage by the builders.
func (*ShipmentHistoryMutation) Op ¶
func (m *ShipmentHistoryMutation) Op() Op
Op returns the operation name.
func (*ShipmentHistoryMutation) PersonCleared ¶
func (m *ShipmentHistoryMutation) PersonCleared() bool
PersonCleared reports if the "person" edge to the Person entity was cleared.
func (*ShipmentHistoryMutation) PersonID ¶
func (m *ShipmentHistoryMutation) PersonID() (r uuid.UUID, exists bool)
PersonID returns the value of the "person_id" field in the mutation.
func (*ShipmentHistoryMutation) PersonIDs ¶
func (m *ShipmentHistoryMutation) PersonIDs() (ids []uuid.UUID)
PersonIDs returns the "person" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PersonID instead. It exists only for internal usage by the builders.
func (*ShipmentHistoryMutation) RemovedEdges ¶
func (m *ShipmentHistoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ShipmentHistoryMutation) RemovedIDs ¶
func (m *ShipmentHistoryMutation) 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 (*ShipmentHistoryMutation) ResetCreatedAt ¶
func (m *ShipmentHistoryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ShipmentHistoryMutation) ResetDescription ¶
func (m *ShipmentHistoryMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ShipmentHistoryMutation) ResetEdge ¶
func (m *ShipmentHistoryMutation) 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 (*ShipmentHistoryMutation) ResetField ¶
func (m *ShipmentHistoryMutation) 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 (*ShipmentHistoryMutation) ResetNewStatus ¶
func (m *ShipmentHistoryMutation) ResetNewStatus()
ResetNewStatus resets all changes to the "new_status" edge.
func (*ShipmentHistoryMutation) ResetNewStatusCode ¶
func (m *ShipmentHistoryMutation) ResetNewStatusCode()
ResetNewStatusCode resets all changes to the "new_status_code" field.
func (*ShipmentHistoryMutation) ResetOldStatus ¶
func (m *ShipmentHistoryMutation) ResetOldStatus()
ResetOldStatus resets all changes to the "old_status" edge.
func (*ShipmentHistoryMutation) ResetOldStatusCode ¶
func (m *ShipmentHistoryMutation) ResetOldStatusCode()
ResetOldStatusCode resets all changes to the "old_status_code" field.
func (*ShipmentHistoryMutation) ResetPerson ¶
func (m *ShipmentHistoryMutation) ResetPerson()
ResetPerson resets all changes to the "person" edge.
func (*ShipmentHistoryMutation) ResetPersonID ¶
func (m *ShipmentHistoryMutation) ResetPersonID()
ResetPersonID resets all changes to the "person_id" field.
func (*ShipmentHistoryMutation) ResetShipment ¶
func (m *ShipmentHistoryMutation) ResetShipment()
ResetShipment resets all changes to the "shipment" edge.
func (*ShipmentHistoryMutation) ResetShipmentID ¶
func (m *ShipmentHistoryMutation) ResetShipmentID()
ResetShipmentID resets all changes to the "shipment_id" field.
func (*ShipmentHistoryMutation) SetCreatedAt ¶
func (m *ShipmentHistoryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ShipmentHistoryMutation) SetDescription ¶
func (m *ShipmentHistoryMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ShipmentHistoryMutation) SetField ¶
func (m *ShipmentHistoryMutation) 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 (*ShipmentHistoryMutation) SetID ¶
func (m *ShipmentHistoryMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ShipmentHistory entities.
func (*ShipmentHistoryMutation) SetNewStatusCode ¶
func (m *ShipmentHistoryMutation) SetNewStatusCode(i int)
SetNewStatusCode sets the "new_status_code" field.
func (*ShipmentHistoryMutation) SetNewStatusID ¶
func (m *ShipmentHistoryMutation) SetNewStatusID(id int)
SetNewStatusID sets the "new_status" edge to the ShipmentStatusCode entity by id.
func (*ShipmentHistoryMutation) SetOldStatusCode ¶
func (m *ShipmentHistoryMutation) SetOldStatusCode(i int)
SetOldStatusCode sets the "old_status_code" field.
func (*ShipmentHistoryMutation) SetOldStatusID ¶
func (m *ShipmentHistoryMutation) SetOldStatusID(id int)
SetOldStatusID sets the "old_status" edge to the ShipmentStatusCode entity by id.
func (*ShipmentHistoryMutation) SetOp ¶
func (m *ShipmentHistoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ShipmentHistoryMutation) SetPersonID ¶
func (m *ShipmentHistoryMutation) SetPersonID(u uuid.UUID)
SetPersonID sets the "person_id" field.
func (*ShipmentHistoryMutation) SetShipmentID ¶
func (m *ShipmentHistoryMutation) SetShipmentID(s string)
SetShipmentID sets the "shipment_id" field.
func (*ShipmentHistoryMutation) ShipmentCleared ¶
func (m *ShipmentHistoryMutation) ShipmentCleared() bool
ShipmentCleared reports if the "shipment" edge to the Shipment entity was cleared.
func (*ShipmentHistoryMutation) ShipmentID ¶
func (m *ShipmentHistoryMutation) ShipmentID() (r string, exists bool)
ShipmentID returns the value of the "shipment_id" field in the mutation.
func (*ShipmentHistoryMutation) ShipmentIDs ¶
func (m *ShipmentHistoryMutation) ShipmentIDs() (ids []string)
ShipmentIDs returns the "shipment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ShipmentID instead. It exists only for internal usage by the builders.
func (ShipmentHistoryMutation) Tx ¶
func (m ShipmentHistoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ShipmentHistoryMutation) Type ¶
func (m *ShipmentHistoryMutation) Type() string
Type returns the node type of this mutation (ShipmentHistory).
func (*ShipmentHistoryMutation) Where ¶
func (m *ShipmentHistoryMutation) Where(ps ...predicate.ShipmentHistory)
Where appends a list predicates to the ShipmentHistoryMutation builder.
func (*ShipmentHistoryMutation) WhereP ¶
func (m *ShipmentHistoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ShipmentHistoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ShipmentHistoryQuery ¶
type ShipmentHistoryQuery struct {
// contains filtered or unexported fields
}
ShipmentHistoryQuery is the builder for querying ShipmentHistory entities.
func (*ShipmentHistoryQuery) Aggregate ¶
func (shq *ShipmentHistoryQuery) Aggregate(fns ...AggregateFunc) *ShipmentHistorySelect
Aggregate returns a ShipmentHistorySelect configured with the given aggregations.
func (*ShipmentHistoryQuery) All ¶
func (shq *ShipmentHistoryQuery) All(ctx context.Context) ([]*ShipmentHistory, error)
All executes the query and returns a list of ShipmentHistories.
func (*ShipmentHistoryQuery) AllX ¶
func (shq *ShipmentHistoryQuery) AllX(ctx context.Context) []*ShipmentHistory
AllX is like All, but panics if an error occurs.
func (*ShipmentHistoryQuery) Clone ¶
func (shq *ShipmentHistoryQuery) Clone() *ShipmentHistoryQuery
Clone returns a duplicate of the ShipmentHistoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ShipmentHistoryQuery) Count ¶
func (shq *ShipmentHistoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ShipmentHistoryQuery) CountX ¶
func (shq *ShipmentHistoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ShipmentHistoryQuery) Exist ¶
func (shq *ShipmentHistoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ShipmentHistoryQuery) ExistX ¶
func (shq *ShipmentHistoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ShipmentHistoryQuery) First ¶
func (shq *ShipmentHistoryQuery) First(ctx context.Context) (*ShipmentHistory, error)
First returns the first ShipmentHistory entity from the query. Returns a *NotFoundError when no ShipmentHistory was found.
func (*ShipmentHistoryQuery) FirstID ¶
FirstID returns the first ShipmentHistory ID from the query. Returns a *NotFoundError when no ShipmentHistory ID was found.
func (*ShipmentHistoryQuery) FirstIDX ¶
func (shq *ShipmentHistoryQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ShipmentHistoryQuery) FirstX ¶
func (shq *ShipmentHistoryQuery) FirstX(ctx context.Context) *ShipmentHistory
FirstX is like First, but panics if an error occurs.
func (*ShipmentHistoryQuery) GroupBy ¶
func (shq *ShipmentHistoryQuery) GroupBy(field string, fields ...string) *ShipmentHistoryGroupBy
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.ShipmentHistory.Query(). GroupBy(shipmenthistory.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ShipmentHistoryQuery) IDs ¶
IDs executes the query and returns a list of ShipmentHistory IDs.
func (*ShipmentHistoryQuery) IDsX ¶
func (shq *ShipmentHistoryQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ShipmentHistoryQuery) Limit ¶
func (shq *ShipmentHistoryQuery) Limit(limit int) *ShipmentHistoryQuery
Limit the number of records to be returned by this query.
func (*ShipmentHistoryQuery) Offset ¶
func (shq *ShipmentHistoryQuery) Offset(offset int) *ShipmentHistoryQuery
Offset to start from.
func (*ShipmentHistoryQuery) Only ¶
func (shq *ShipmentHistoryQuery) Only(ctx context.Context) (*ShipmentHistory, error)
Only returns a single ShipmentHistory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ShipmentHistory entity is found. Returns a *NotFoundError when no ShipmentHistory entities are found.
func (*ShipmentHistoryQuery) OnlyID ¶
OnlyID is like Only, but returns the only ShipmentHistory ID in the query. Returns a *NotSingularError when more than one ShipmentHistory ID is found. Returns a *NotFoundError when no entities are found.
func (*ShipmentHistoryQuery) OnlyIDX ¶
func (shq *ShipmentHistoryQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ShipmentHistoryQuery) OnlyX ¶
func (shq *ShipmentHistoryQuery) OnlyX(ctx context.Context) *ShipmentHistory
OnlyX is like Only, but panics if an error occurs.
func (*ShipmentHistoryQuery) Order ¶
func (shq *ShipmentHistoryQuery) Order(o ...shipmenthistory.OrderOption) *ShipmentHistoryQuery
Order specifies how the records should be ordered.
func (*ShipmentHistoryQuery) QueryNewStatus ¶
func (shq *ShipmentHistoryQuery) QueryNewStatus() *ShipmentStatusCodeQuery
QueryNewStatus chains the current query on the "new_status" edge.
func (*ShipmentHistoryQuery) QueryOldStatus ¶
func (shq *ShipmentHistoryQuery) QueryOldStatus() *ShipmentStatusCodeQuery
QueryOldStatus chains the current query on the "old_status" edge.
func (*ShipmentHistoryQuery) QueryPerson ¶
func (shq *ShipmentHistoryQuery) QueryPerson() *PersonQuery
QueryPerson chains the current query on the "person" edge.
func (*ShipmentHistoryQuery) QueryShipment ¶
func (shq *ShipmentHistoryQuery) QueryShipment() *ShipmentQuery
QueryShipment chains the current query on the "shipment" edge.
func (*ShipmentHistoryQuery) Select ¶
func (shq *ShipmentHistoryQuery) Select(fields ...string) *ShipmentHistorySelect
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.ShipmentHistory.Query(). Select(shipmenthistory.FieldCreatedAt). Scan(ctx, &v)
func (*ShipmentHistoryQuery) Unique ¶
func (shq *ShipmentHistoryQuery) Unique(unique bool) *ShipmentHistoryQuery
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 (*ShipmentHistoryQuery) Where ¶
func (shq *ShipmentHistoryQuery) Where(ps ...predicate.ShipmentHistory) *ShipmentHistoryQuery
Where adds a new predicate for the ShipmentHistoryQuery builder.
func (*ShipmentHistoryQuery) WithNewStatus ¶
func (shq *ShipmentHistoryQuery) WithNewStatus(opts ...func(*ShipmentStatusCodeQuery)) *ShipmentHistoryQuery
WithNewStatus tells the query-builder to eager-load the nodes that are connected to the "new_status" edge. The optional arguments are used to configure the query builder of the edge.
func (*ShipmentHistoryQuery) WithOldStatus ¶
func (shq *ShipmentHistoryQuery) WithOldStatus(opts ...func(*ShipmentStatusCodeQuery)) *ShipmentHistoryQuery
WithOldStatus tells the query-builder to eager-load the nodes that are connected to the "old_status" edge. The optional arguments are used to configure the query builder of the edge.
func (*ShipmentHistoryQuery) WithPerson ¶
func (shq *ShipmentHistoryQuery) WithPerson(opts ...func(*PersonQuery)) *ShipmentHistoryQuery
WithPerson tells the query-builder to eager-load the nodes that are connected to the "person" edge. The optional arguments are used to configure the query builder of the edge.
func (*ShipmentHistoryQuery) WithShipment ¶
func (shq *ShipmentHistoryQuery) WithShipment(opts ...func(*ShipmentQuery)) *ShipmentHistoryQuery
WithShipment tells the query-builder to eager-load the nodes that are connected to the "shipment" edge. The optional arguments are used to configure the query builder of the edge.
type ShipmentHistorySelect ¶
type ShipmentHistorySelect struct { *ShipmentHistoryQuery // contains filtered or unexported fields }
ShipmentHistorySelect is the builder for selecting fields of ShipmentHistory entities.
func (*ShipmentHistorySelect) Aggregate ¶
func (shs *ShipmentHistorySelect) Aggregate(fns ...AggregateFunc) *ShipmentHistorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*ShipmentHistorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ShipmentHistorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ShipmentHistorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ShipmentHistorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ShipmentHistorySelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ShipmentHistorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ShipmentHistorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ShipmentHistorySelect) Scan ¶
func (shs *ShipmentHistorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ShipmentHistorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ShipmentHistoryUpdate ¶
type ShipmentHistoryUpdate struct {
// contains filtered or unexported fields
}
ShipmentHistoryUpdate is the builder for updating ShipmentHistory entities.
func (*ShipmentHistoryUpdate) Exec ¶
func (shu *ShipmentHistoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShipmentHistoryUpdate) ExecX ¶
func (shu *ShipmentHistoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentHistoryUpdate) Mutation ¶
func (shu *ShipmentHistoryUpdate) Mutation() *ShipmentHistoryMutation
Mutation returns the ShipmentHistoryMutation object of the builder.
func (*ShipmentHistoryUpdate) Save ¶
func (shu *ShipmentHistoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ShipmentHistoryUpdate) SaveX ¶
func (shu *ShipmentHistoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ShipmentHistoryUpdate) Where ¶
func (shu *ShipmentHistoryUpdate) Where(ps ...predicate.ShipmentHistory) *ShipmentHistoryUpdate
Where appends a list predicates to the ShipmentHistoryUpdate builder.
type ShipmentHistoryUpdateOne ¶
type ShipmentHistoryUpdateOne struct {
// contains filtered or unexported fields
}
ShipmentHistoryUpdateOne is the builder for updating a single ShipmentHistory entity.
func (*ShipmentHistoryUpdateOne) Exec ¶
func (shuo *ShipmentHistoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ShipmentHistoryUpdateOne) ExecX ¶
func (shuo *ShipmentHistoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentHistoryUpdateOne) Mutation ¶
func (shuo *ShipmentHistoryUpdateOne) Mutation() *ShipmentHistoryMutation
Mutation returns the ShipmentHistoryMutation object of the builder.
func (*ShipmentHistoryUpdateOne) Save ¶
func (shuo *ShipmentHistoryUpdateOne) Save(ctx context.Context) (*ShipmentHistory, error)
Save executes the query and returns the updated ShipmentHistory entity.
func (*ShipmentHistoryUpdateOne) SaveX ¶
func (shuo *ShipmentHistoryUpdateOne) SaveX(ctx context.Context) *ShipmentHistory
SaveX is like Save, but panics if an error occurs.
func (*ShipmentHistoryUpdateOne) Select ¶
func (shuo *ShipmentHistoryUpdateOne) Select(field string, fields ...string) *ShipmentHistoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ShipmentHistoryUpdateOne) Where ¶
func (shuo *ShipmentHistoryUpdateOne) Where(ps ...predicate.ShipmentHistory) *ShipmentHistoryUpdateOne
Where appends a list predicates to the ShipmentHistoryUpdate builder.
type ShipmentItem ¶
type ShipmentItem struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // ShipmentID holds the value of the "shipment_id" field. ShipmentID string `json:"shipment_id,omitempty"` // OrderItemID holds the value of the "order_item_id" field. OrderItemID uuid.UUID `json:"order_item_id,omitempty"` // Qty holds the value of the "qty" field. Qty *decimal.Decimal `json:"qty,omitempty"` // Total holds the value of the "total" field. Total *decimal.Decimal `json:"total,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ShipmentItemQuery when eager-loading is set. Edges ShipmentItemEdges `json:"edges"` // contains filtered or unexported fields }
ShipmentItem is the model entity for the ShipmentItem schema.
func (*ShipmentItem) QueryOrderItem ¶
func (si *ShipmentItem) QueryOrderItem() *OrderItemQuery
QueryOrderItem queries the "order_item" edge of the ShipmentItem entity.
func (*ShipmentItem) QueryShipment ¶
func (si *ShipmentItem) QueryShipment() *ShipmentQuery
QueryShipment queries the "shipment" edge of the ShipmentItem entity.
func (*ShipmentItem) String ¶
func (si *ShipmentItem) String() string
String implements the fmt.Stringer.
func (*ShipmentItem) Unwrap ¶
func (si *ShipmentItem) Unwrap() *ShipmentItem
Unwrap unwraps the ShipmentItem 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 (*ShipmentItem) Update ¶
func (si *ShipmentItem) Update() *ShipmentItemUpdateOne
Update returns a builder for updating this ShipmentItem. Note that you need to call ShipmentItem.Unwrap() before calling this method if this ShipmentItem was returned from a transaction, and the transaction was committed or rolled back.
type ShipmentItemClient ¶
type ShipmentItemClient struct {
// contains filtered or unexported fields
}
ShipmentItemClient is a client for the ShipmentItem schema.
func NewShipmentItemClient ¶
func NewShipmentItemClient(c config) *ShipmentItemClient
NewShipmentItemClient returns a client for the ShipmentItem from the given config.
func (*ShipmentItemClient) Create ¶
func (c *ShipmentItemClient) Create() *ShipmentItemCreate
Create returns a builder for creating a ShipmentItem entity.
func (*ShipmentItemClient) CreateBulk ¶
func (c *ShipmentItemClient) CreateBulk(builders ...*ShipmentItemCreate) *ShipmentItemCreateBulk
CreateBulk returns a builder for creating a bulk of ShipmentItem entities.
func (*ShipmentItemClient) Delete ¶
func (c *ShipmentItemClient) Delete() *ShipmentItemDelete
Delete returns a delete builder for ShipmentItem.
func (*ShipmentItemClient) DeleteOne ¶
func (c *ShipmentItemClient) DeleteOne(si *ShipmentItem) *ShipmentItemDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ShipmentItemClient) DeleteOneID ¶
func (c *ShipmentItemClient) DeleteOneID(id uuid.UUID) *ShipmentItemDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ShipmentItemClient) Get ¶
func (c *ShipmentItemClient) Get(ctx context.Context, id uuid.UUID) (*ShipmentItem, error)
Get returns a ShipmentItem entity by its id.
func (*ShipmentItemClient) GetX ¶
func (c *ShipmentItemClient) GetX(ctx context.Context, id uuid.UUID) *ShipmentItem
GetX is like Get, but panics if an error occurs.
func (*ShipmentItemClient) Hooks ¶
func (c *ShipmentItemClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ShipmentItemClient) Intercept ¶
func (c *ShipmentItemClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `shipmentitem.Intercept(f(g(h())))`.
func (*ShipmentItemClient) Interceptors ¶
func (c *ShipmentItemClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ShipmentItemClient) MapCreateBulk ¶
func (c *ShipmentItemClient) MapCreateBulk(slice any, setFunc func(*ShipmentItemCreate, int)) *ShipmentItemCreateBulk
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 (*ShipmentItemClient) Query ¶
func (c *ShipmentItemClient) Query() *ShipmentItemQuery
Query returns a query builder for ShipmentItem.
func (*ShipmentItemClient) QueryOrderItem ¶
func (c *ShipmentItemClient) QueryOrderItem(si *ShipmentItem) *OrderItemQuery
QueryOrderItem queries the order_item edge of a ShipmentItem.
func (*ShipmentItemClient) QueryShipment ¶
func (c *ShipmentItemClient) QueryShipment(si *ShipmentItem) *ShipmentQuery
QueryShipment queries the shipment edge of a ShipmentItem.
func (*ShipmentItemClient) Update ¶
func (c *ShipmentItemClient) Update() *ShipmentItemUpdate
Update returns an update builder for ShipmentItem.
func (*ShipmentItemClient) UpdateOne ¶
func (c *ShipmentItemClient) UpdateOne(si *ShipmentItem) *ShipmentItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ShipmentItemClient) UpdateOneID ¶
func (c *ShipmentItemClient) UpdateOneID(id uuid.UUID) *ShipmentItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ShipmentItemClient) Use ¶
func (c *ShipmentItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `shipmentitem.Hooks(f(g(h())))`.
type ShipmentItemCreate ¶
type ShipmentItemCreate struct {
// contains filtered or unexported fields
}
ShipmentItemCreate is the builder for creating a ShipmentItem entity.
func (*ShipmentItemCreate) Exec ¶
func (sic *ShipmentItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShipmentItemCreate) ExecX ¶
func (sic *ShipmentItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentItemCreate) Mutation ¶
func (sic *ShipmentItemCreate) Mutation() *ShipmentItemMutation
Mutation returns the ShipmentItemMutation object of the builder.
func (*ShipmentItemCreate) Save ¶
func (sic *ShipmentItemCreate) Save(ctx context.Context) (*ShipmentItem, error)
Save creates the ShipmentItem in the database.
func (*ShipmentItemCreate) SaveX ¶
func (sic *ShipmentItemCreate) SaveX(ctx context.Context) *ShipmentItem
SaveX calls Save and panics if Save returns an error.
func (*ShipmentItemCreate) SetCreatedAt ¶
func (sic *ShipmentItemCreate) SetCreatedAt(t time.Time) *ShipmentItemCreate
SetCreatedAt sets the "created_at" field.
func (*ShipmentItemCreate) SetID ¶
func (sic *ShipmentItemCreate) SetID(u uuid.UUID) *ShipmentItemCreate
SetID sets the "id" field.
func (*ShipmentItemCreate) SetNillableCreatedAt ¶
func (sic *ShipmentItemCreate) SetNillableCreatedAt(t *time.Time) *ShipmentItemCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ShipmentItemCreate) SetNillableID ¶
func (sic *ShipmentItemCreate) SetNillableID(u *uuid.UUID) *ShipmentItemCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ShipmentItemCreate) SetNillableUpdatedAt ¶
func (sic *ShipmentItemCreate) SetNillableUpdatedAt(t *time.Time) *ShipmentItemCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ShipmentItemCreate) SetOrderItem ¶
func (sic *ShipmentItemCreate) SetOrderItem(o *OrderItem) *ShipmentItemCreate
SetOrderItem sets the "order_item" edge to the OrderItem entity.
func (*ShipmentItemCreate) SetOrderItemID ¶
func (sic *ShipmentItemCreate) SetOrderItemID(u uuid.UUID) *ShipmentItemCreate
SetOrderItemID sets the "order_item_id" field.
func (*ShipmentItemCreate) SetQty ¶
func (sic *ShipmentItemCreate) SetQty(d decimal.Decimal) *ShipmentItemCreate
SetQty sets the "qty" field.
func (*ShipmentItemCreate) SetShipment ¶
func (sic *ShipmentItemCreate) SetShipment(s *Shipment) *ShipmentItemCreate
SetShipment sets the "shipment" edge to the Shipment entity.
func (*ShipmentItemCreate) SetShipmentID ¶
func (sic *ShipmentItemCreate) SetShipmentID(s string) *ShipmentItemCreate
SetShipmentID sets the "shipment_id" field.
func (*ShipmentItemCreate) SetTotal ¶
func (sic *ShipmentItemCreate) SetTotal(d decimal.Decimal) *ShipmentItemCreate
SetTotal sets the "total" field.
func (*ShipmentItemCreate) SetUpdatedAt ¶
func (sic *ShipmentItemCreate) SetUpdatedAt(t time.Time) *ShipmentItemCreate
SetUpdatedAt sets the "updated_at" field.
type ShipmentItemCreateBulk ¶
type ShipmentItemCreateBulk struct {
// contains filtered or unexported fields
}
ShipmentItemCreateBulk is the builder for creating many ShipmentItem entities in bulk.
func (*ShipmentItemCreateBulk) Exec ¶
func (sicb *ShipmentItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ShipmentItemCreateBulk) ExecX ¶
func (sicb *ShipmentItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentItemCreateBulk) Save ¶
func (sicb *ShipmentItemCreateBulk) Save(ctx context.Context) ([]*ShipmentItem, error)
Save creates the ShipmentItem entities in the database.
func (*ShipmentItemCreateBulk) SaveX ¶
func (sicb *ShipmentItemCreateBulk) SaveX(ctx context.Context) []*ShipmentItem
SaveX is like Save, but panics if an error occurs.
type ShipmentItemDelete ¶
type ShipmentItemDelete struct {
// contains filtered or unexported fields
}
ShipmentItemDelete is the builder for deleting a ShipmentItem entity.
func (*ShipmentItemDelete) Exec ¶
func (sid *ShipmentItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ShipmentItemDelete) ExecX ¶
func (sid *ShipmentItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentItemDelete) Where ¶
func (sid *ShipmentItemDelete) Where(ps ...predicate.ShipmentItem) *ShipmentItemDelete
Where appends a list predicates to the ShipmentItemDelete builder.
type ShipmentItemDeleteOne ¶
type ShipmentItemDeleteOne struct {
// contains filtered or unexported fields
}
ShipmentItemDeleteOne is the builder for deleting a single ShipmentItem entity.
func (*ShipmentItemDeleteOne) Exec ¶
func (sido *ShipmentItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ShipmentItemDeleteOne) ExecX ¶
func (sido *ShipmentItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentItemDeleteOne) Where ¶
func (sido *ShipmentItemDeleteOne) Where(ps ...predicate.ShipmentItem) *ShipmentItemDeleteOne
Where appends a list predicates to the ShipmentItemDelete builder.
type ShipmentItemEdges ¶
type ShipmentItemEdges struct { // Shipment holds the value of the shipment edge. Shipment *Shipment `json:"shipment,omitempty"` // OrderItem holds the value of the order_item edge. OrderItem *OrderItem `json:"order_item,omitempty"` // contains filtered or unexported fields }
ShipmentItemEdges holds the relations/edges for other nodes in the graph.
func (ShipmentItemEdges) OrderItemOrErr ¶
func (e ShipmentItemEdges) OrderItemOrErr() (*OrderItem, error)
OrderItemOrErr returns the OrderItem value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ShipmentItemEdges) ShipmentOrErr ¶
func (e ShipmentItemEdges) ShipmentOrErr() (*Shipment, error)
ShipmentOrErr returns the Shipment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ShipmentItemGroupBy ¶
type ShipmentItemGroupBy struct {
// contains filtered or unexported fields
}
ShipmentItemGroupBy is the group-by builder for ShipmentItem entities.
func (*ShipmentItemGroupBy) Aggregate ¶
func (sigb *ShipmentItemGroupBy) Aggregate(fns ...AggregateFunc) *ShipmentItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ShipmentItemGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ShipmentItemGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ShipmentItemGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ShipmentItemGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ShipmentItemGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ShipmentItemGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ShipmentItemGroupBy) Scan ¶
func (sigb *ShipmentItemGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ShipmentItemGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ShipmentItemMutation ¶
type ShipmentItemMutation struct {
// contains filtered or unexported fields
}
ShipmentItemMutation represents an operation that mutates the ShipmentItem nodes in the graph.
func (*ShipmentItemMutation) AddField ¶
func (m *ShipmentItemMutation) 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 (*ShipmentItemMutation) AddQty ¶
func (m *ShipmentItemMutation) AddQty(d decimal.Decimal)
AddQty adds d to the "qty" field.
func (*ShipmentItemMutation) AddTotal ¶
func (m *ShipmentItemMutation) AddTotal(d decimal.Decimal)
AddTotal adds d to the "total" field.
func (*ShipmentItemMutation) AddedEdges ¶
func (m *ShipmentItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ShipmentItemMutation) AddedField ¶
func (m *ShipmentItemMutation) 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 (*ShipmentItemMutation) AddedFields ¶
func (m *ShipmentItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ShipmentItemMutation) AddedIDs ¶
func (m *ShipmentItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ShipmentItemMutation) AddedQty ¶
func (m *ShipmentItemMutation) AddedQty() (r decimal.Decimal, exists bool)
AddedQty returns the value that was added to the "qty" field in this mutation.
func (*ShipmentItemMutation) AddedTotal ¶
func (m *ShipmentItemMutation) AddedTotal() (r decimal.Decimal, exists bool)
AddedTotal returns the value that was added to the "total" field in this mutation.
func (*ShipmentItemMutation) ClearEdge ¶
func (m *ShipmentItemMutation) 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 (*ShipmentItemMutation) ClearField ¶
func (m *ShipmentItemMutation) 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 (*ShipmentItemMutation) ClearOrderItem ¶
func (m *ShipmentItemMutation) ClearOrderItem()
ClearOrderItem clears the "order_item" edge to the OrderItem entity.
func (*ShipmentItemMutation) ClearShipment ¶
func (m *ShipmentItemMutation) ClearShipment()
ClearShipment clears the "shipment" edge to the Shipment entity.
func (*ShipmentItemMutation) ClearedEdges ¶
func (m *ShipmentItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ShipmentItemMutation) ClearedFields ¶
func (m *ShipmentItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ShipmentItemMutation) Client ¶
func (m ShipmentItemMutation) 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 (*ShipmentItemMutation) CreatedAt ¶
func (m *ShipmentItemMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ShipmentItemMutation) EdgeCleared ¶
func (m *ShipmentItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ShipmentItemMutation) Field ¶
func (m *ShipmentItemMutation) 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 (*ShipmentItemMutation) FieldCleared ¶
func (m *ShipmentItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ShipmentItemMutation) Fields ¶
func (m *ShipmentItemMutation) 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 (*ShipmentItemMutation) ID ¶
func (m *ShipmentItemMutation) ID() (id uuid.UUID, 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 (*ShipmentItemMutation) IDs ¶
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 (*ShipmentItemMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ShipmentItem entity. If the ShipmentItem 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 (*ShipmentItemMutation) 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 (*ShipmentItemMutation) OldOrderItemID ¶
OldOrderItemID returns the old "order_item_id" field's value of the ShipmentItem entity. If the ShipmentItem 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 (*ShipmentItemMutation) OldQty ¶
OldQty returns the old "qty" field's value of the ShipmentItem entity. If the ShipmentItem 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 (*ShipmentItemMutation) OldShipmentID ¶
func (m *ShipmentItemMutation) OldShipmentID(ctx context.Context) (v string, err error)
OldShipmentID returns the old "shipment_id" field's value of the ShipmentItem entity. If the ShipmentItem 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 (*ShipmentItemMutation) OldTotal ¶
OldTotal returns the old "total" field's value of the ShipmentItem entity. If the ShipmentItem 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 (*ShipmentItemMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the ShipmentItem entity. If the ShipmentItem 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 (*ShipmentItemMutation) Op ¶
func (m *ShipmentItemMutation) Op() Op
Op returns the operation name.
func (*ShipmentItemMutation) OrderItemCleared ¶
func (m *ShipmentItemMutation) OrderItemCleared() bool
OrderItemCleared reports if the "order_item" edge to the OrderItem entity was cleared.
func (*ShipmentItemMutation) OrderItemID ¶
func (m *ShipmentItemMutation) OrderItemID() (r uuid.UUID, exists bool)
OrderItemID returns the value of the "order_item_id" field in the mutation.
func (*ShipmentItemMutation) OrderItemIDs ¶
func (m *ShipmentItemMutation) OrderItemIDs() (ids []uuid.UUID)
OrderItemIDs returns the "order_item" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrderItemID instead. It exists only for internal usage by the builders.
func (*ShipmentItemMutation) Qty ¶
func (m *ShipmentItemMutation) Qty() (r decimal.Decimal, exists bool)
Qty returns the value of the "qty" field in the mutation.
func (*ShipmentItemMutation) RemovedEdges ¶
func (m *ShipmentItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ShipmentItemMutation) RemovedIDs ¶
func (m *ShipmentItemMutation) 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 (*ShipmentItemMutation) ResetCreatedAt ¶
func (m *ShipmentItemMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ShipmentItemMutation) ResetEdge ¶
func (m *ShipmentItemMutation) 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 (*ShipmentItemMutation) ResetField ¶
func (m *ShipmentItemMutation) 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 (*ShipmentItemMutation) ResetOrderItem ¶
func (m *ShipmentItemMutation) ResetOrderItem()
ResetOrderItem resets all changes to the "order_item" edge.
func (*ShipmentItemMutation) ResetOrderItemID ¶
func (m *ShipmentItemMutation) ResetOrderItemID()
ResetOrderItemID resets all changes to the "order_item_id" field.
func (*ShipmentItemMutation) ResetQty ¶
func (m *ShipmentItemMutation) ResetQty()
ResetQty resets all changes to the "qty" field.
func (*ShipmentItemMutation) ResetShipment ¶
func (m *ShipmentItemMutation) ResetShipment()
ResetShipment resets all changes to the "shipment" edge.
func (*ShipmentItemMutation) ResetShipmentID ¶
func (m *ShipmentItemMutation) ResetShipmentID()
ResetShipmentID resets all changes to the "shipment_id" field.
func (*ShipmentItemMutation) ResetTotal ¶
func (m *ShipmentItemMutation) ResetTotal()
ResetTotal resets all changes to the "total" field.
func (*ShipmentItemMutation) ResetUpdatedAt ¶
func (m *ShipmentItemMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ShipmentItemMutation) SetCreatedAt ¶
func (m *ShipmentItemMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ShipmentItemMutation) SetField ¶
func (m *ShipmentItemMutation) 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 (*ShipmentItemMutation) SetID ¶
func (m *ShipmentItemMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ShipmentItem entities.
func (*ShipmentItemMutation) SetOp ¶
func (m *ShipmentItemMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ShipmentItemMutation) SetOrderItemID ¶
func (m *ShipmentItemMutation) SetOrderItemID(u uuid.UUID)
SetOrderItemID sets the "order_item_id" field.
func (*ShipmentItemMutation) SetQty ¶
func (m *ShipmentItemMutation) SetQty(d decimal.Decimal)
SetQty sets the "qty" field.
func (*ShipmentItemMutation) SetShipmentID ¶
func (m *ShipmentItemMutation) SetShipmentID(s string)
SetShipmentID sets the "shipment_id" field.
func (*ShipmentItemMutation) SetTotal ¶
func (m *ShipmentItemMutation) SetTotal(d decimal.Decimal)
SetTotal sets the "total" field.
func (*ShipmentItemMutation) SetUpdatedAt ¶
func (m *ShipmentItemMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ShipmentItemMutation) ShipmentCleared ¶
func (m *ShipmentItemMutation) ShipmentCleared() bool
ShipmentCleared reports if the "shipment" edge to the Shipment entity was cleared.
func (*ShipmentItemMutation) ShipmentID ¶
func (m *ShipmentItemMutation) ShipmentID() (r string, exists bool)
ShipmentID returns the value of the "shipment_id" field in the mutation.
func (*ShipmentItemMutation) ShipmentIDs ¶
func (m *ShipmentItemMutation) ShipmentIDs() (ids []string)
ShipmentIDs returns the "shipment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ShipmentID instead. It exists only for internal usage by the builders.
func (*ShipmentItemMutation) Total ¶
func (m *ShipmentItemMutation) Total() (r decimal.Decimal, exists bool)
Total returns the value of the "total" field in the mutation.
func (ShipmentItemMutation) Tx ¶
func (m ShipmentItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ShipmentItemMutation) Type ¶
func (m *ShipmentItemMutation) Type() string
Type returns the node type of this mutation (ShipmentItem).
func (*ShipmentItemMutation) UpdatedAt ¶
func (m *ShipmentItemMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ShipmentItemMutation) Where ¶
func (m *ShipmentItemMutation) Where(ps ...predicate.ShipmentItem)
Where appends a list predicates to the ShipmentItemMutation builder.
func (*ShipmentItemMutation) WhereP ¶
func (m *ShipmentItemMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ShipmentItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ShipmentItemQuery ¶
type ShipmentItemQuery struct {
// contains filtered or unexported fields
}
ShipmentItemQuery is the builder for querying ShipmentItem entities.
func (*ShipmentItemQuery) Aggregate ¶
func (siq *ShipmentItemQuery) Aggregate(fns ...AggregateFunc) *ShipmentItemSelect
Aggregate returns a ShipmentItemSelect configured with the given aggregations.
func (*ShipmentItemQuery) All ¶
func (siq *ShipmentItemQuery) All(ctx context.Context) ([]*ShipmentItem, error)
All executes the query and returns a list of ShipmentItems.
func (*ShipmentItemQuery) AllX ¶
func (siq *ShipmentItemQuery) AllX(ctx context.Context) []*ShipmentItem
AllX is like All, but panics if an error occurs.
func (*ShipmentItemQuery) Clone ¶
func (siq *ShipmentItemQuery) Clone() *ShipmentItemQuery
Clone returns a duplicate of the ShipmentItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ShipmentItemQuery) Count ¶
func (siq *ShipmentItemQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ShipmentItemQuery) CountX ¶
func (siq *ShipmentItemQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ShipmentItemQuery) Exist ¶
func (siq *ShipmentItemQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ShipmentItemQuery) ExistX ¶
func (siq *ShipmentItemQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ShipmentItemQuery) First ¶
func (siq *ShipmentItemQuery) First(ctx context.Context) (*ShipmentItem, error)
First returns the first ShipmentItem entity from the query. Returns a *NotFoundError when no ShipmentItem was found.
func (*ShipmentItemQuery) FirstID ¶
FirstID returns the first ShipmentItem ID from the query. Returns a *NotFoundError when no ShipmentItem ID was found.
func (*ShipmentItemQuery) FirstIDX ¶
func (siq *ShipmentItemQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ShipmentItemQuery) FirstX ¶
func (siq *ShipmentItemQuery) FirstX(ctx context.Context) *ShipmentItem
FirstX is like First, but panics if an error occurs.
func (*ShipmentItemQuery) GroupBy ¶
func (siq *ShipmentItemQuery) GroupBy(field string, fields ...string) *ShipmentItemGroupBy
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.ShipmentItem.Query(). GroupBy(shipmentitem.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ShipmentItemQuery) IDsX ¶
func (siq *ShipmentItemQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ShipmentItemQuery) Limit ¶
func (siq *ShipmentItemQuery) Limit(limit int) *ShipmentItemQuery
Limit the number of records to be returned by this query.
func (*ShipmentItemQuery) Offset ¶
func (siq *ShipmentItemQuery) Offset(offset int) *ShipmentItemQuery
Offset to start from.
func (*ShipmentItemQuery) Only ¶
func (siq *ShipmentItemQuery) Only(ctx context.Context) (*ShipmentItem, error)
Only returns a single ShipmentItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ShipmentItem entity is found. Returns a *NotFoundError when no ShipmentItem entities are found.
func (*ShipmentItemQuery) OnlyID ¶
OnlyID is like Only, but returns the only ShipmentItem ID in the query. Returns a *NotSingularError when more than one ShipmentItem ID is found. Returns a *NotFoundError when no entities are found.
func (*ShipmentItemQuery) OnlyIDX ¶
func (siq *ShipmentItemQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ShipmentItemQuery) OnlyX ¶
func (siq *ShipmentItemQuery) OnlyX(ctx context.Context) *ShipmentItem
OnlyX is like Only, but panics if an error occurs.
func (*ShipmentItemQuery) Order ¶
func (siq *ShipmentItemQuery) Order(o ...shipmentitem.OrderOption) *ShipmentItemQuery
Order specifies how the records should be ordered.
func (*ShipmentItemQuery) QueryOrderItem ¶
func (siq *ShipmentItemQuery) QueryOrderItem() *OrderItemQuery
QueryOrderItem chains the current query on the "order_item" edge.
func (*ShipmentItemQuery) QueryShipment ¶
func (siq *ShipmentItemQuery) QueryShipment() *ShipmentQuery
QueryShipment chains the current query on the "shipment" edge.
func (*ShipmentItemQuery) Select ¶
func (siq *ShipmentItemQuery) Select(fields ...string) *ShipmentItemSelect
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.ShipmentItem.Query(). Select(shipmentitem.FieldCreatedAt). Scan(ctx, &v)
func (*ShipmentItemQuery) Unique ¶
func (siq *ShipmentItemQuery) Unique(unique bool) *ShipmentItemQuery
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 (*ShipmentItemQuery) Where ¶
func (siq *ShipmentItemQuery) Where(ps ...predicate.ShipmentItem) *ShipmentItemQuery
Where adds a new predicate for the ShipmentItemQuery builder.
func (*ShipmentItemQuery) WithOrderItem ¶
func (siq *ShipmentItemQuery) WithOrderItem(opts ...func(*OrderItemQuery)) *ShipmentItemQuery
WithOrderItem tells the query-builder to eager-load the nodes that are connected to the "order_item" edge. The optional arguments are used to configure the query builder of the edge.
func (*ShipmentItemQuery) WithShipment ¶
func (siq *ShipmentItemQuery) WithShipment(opts ...func(*ShipmentQuery)) *ShipmentItemQuery
WithShipment tells the query-builder to eager-load the nodes that are connected to the "shipment" edge. The optional arguments are used to configure the query builder of the edge.
type ShipmentItemSelect ¶
type ShipmentItemSelect struct { *ShipmentItemQuery // contains filtered or unexported fields }
ShipmentItemSelect is the builder for selecting fields of ShipmentItem entities.
func (*ShipmentItemSelect) Aggregate ¶
func (sis *ShipmentItemSelect) Aggregate(fns ...AggregateFunc) *ShipmentItemSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ShipmentItemSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ShipmentItemSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ShipmentItemSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ShipmentItemSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ShipmentItemSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ShipmentItemSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ShipmentItemSelect) Scan ¶
func (sis *ShipmentItemSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ShipmentItemSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ShipmentItemUpdate ¶
type ShipmentItemUpdate struct {
// contains filtered or unexported fields
}
ShipmentItemUpdate is the builder for updating ShipmentItem entities.
func (*ShipmentItemUpdate) Exec ¶
func (siu *ShipmentItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShipmentItemUpdate) ExecX ¶
func (siu *ShipmentItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentItemUpdate) Mutation ¶
func (siu *ShipmentItemUpdate) Mutation() *ShipmentItemMutation
Mutation returns the ShipmentItemMutation object of the builder.
func (*ShipmentItemUpdate) Save ¶
func (siu *ShipmentItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ShipmentItemUpdate) SaveX ¶
func (siu *ShipmentItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ShipmentItemUpdate) SetUpdatedAt ¶
func (siu *ShipmentItemUpdate) SetUpdatedAt(t time.Time) *ShipmentItemUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ShipmentItemUpdate) Where ¶
func (siu *ShipmentItemUpdate) Where(ps ...predicate.ShipmentItem) *ShipmentItemUpdate
Where appends a list predicates to the ShipmentItemUpdate builder.
type ShipmentItemUpdateOne ¶
type ShipmentItemUpdateOne struct {
// contains filtered or unexported fields
}
ShipmentItemUpdateOne is the builder for updating a single ShipmentItem entity.
func (*ShipmentItemUpdateOne) Exec ¶
func (siuo *ShipmentItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ShipmentItemUpdateOne) ExecX ¶
func (siuo *ShipmentItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentItemUpdateOne) Mutation ¶
func (siuo *ShipmentItemUpdateOne) Mutation() *ShipmentItemMutation
Mutation returns the ShipmentItemMutation object of the builder.
func (*ShipmentItemUpdateOne) Save ¶
func (siuo *ShipmentItemUpdateOne) Save(ctx context.Context) (*ShipmentItem, error)
Save executes the query and returns the updated ShipmentItem entity.
func (*ShipmentItemUpdateOne) SaveX ¶
func (siuo *ShipmentItemUpdateOne) SaveX(ctx context.Context) *ShipmentItem
SaveX is like Save, but panics if an error occurs.
func (*ShipmentItemUpdateOne) Select ¶
func (siuo *ShipmentItemUpdateOne) Select(field string, fields ...string) *ShipmentItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ShipmentItemUpdateOne) SetUpdatedAt ¶
func (siuo *ShipmentItemUpdateOne) SetUpdatedAt(t time.Time) *ShipmentItemUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ShipmentItemUpdateOne) Where ¶
func (siuo *ShipmentItemUpdateOne) Where(ps ...predicate.ShipmentItem) *ShipmentItemUpdateOne
Where appends a list predicates to the ShipmentItemUpdate builder.
type ShipmentItems ¶
type ShipmentItems []*ShipmentItem
ShipmentItems is a parsable slice of ShipmentItem.
type ShipmentMutation ¶
type ShipmentMutation struct {
// contains filtered or unexported fields
}
ShipmentMutation represents an operation that mutates the Shipment nodes in the graph.
func (*ShipmentMutation) AddField ¶
func (m *ShipmentMutation) 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 (*ShipmentMutation) AddedEdges ¶
func (m *ShipmentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ShipmentMutation) AddedField ¶
func (m *ShipmentMutation) 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 (*ShipmentMutation) AddedFields ¶
func (m *ShipmentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ShipmentMutation) AddedIDs ¶
func (m *ShipmentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ShipmentMutation) ClearEdge ¶
func (m *ShipmentMutation) 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 (*ShipmentMutation) ClearField ¶
func (m *ShipmentMutation) 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 (*ShipmentMutation) ClearInvoice ¶
func (m *ShipmentMutation) ClearInvoice()
ClearInvoice clears the "invoice" edge to the Invoice entity.
func (*ShipmentMutation) ClearNote ¶
func (m *ShipmentMutation) ClearNote()
ClearNote clears the value of the "note" field.
func (*ShipmentMutation) ClearOrder ¶
func (m *ShipmentMutation) ClearOrder()
ClearOrder clears the "order" edge to the Order entity.
func (*ShipmentMutation) ClearShipmentStatus ¶
func (m *ShipmentMutation) ClearShipmentStatus()
ClearShipmentStatus clears the "shipment_status" edge to the ShipmentStatusCode entity.
func (*ShipmentMutation) ClearStaff ¶
func (m *ShipmentMutation) ClearStaff()
ClearStaff clears the "staff" edge to the Person entity.
func (*ShipmentMutation) ClearedEdges ¶
func (m *ShipmentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ShipmentMutation) ClearedFields ¶
func (m *ShipmentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ShipmentMutation) Client ¶
func (m ShipmentMutation) 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 (*ShipmentMutation) CreatedAt ¶
func (m *ShipmentMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ShipmentMutation) EdgeCleared ¶
func (m *ShipmentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ShipmentMutation) Field ¶
func (m *ShipmentMutation) 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 (*ShipmentMutation) FieldCleared ¶
func (m *ShipmentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ShipmentMutation) Fields ¶
func (m *ShipmentMutation) 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 (*ShipmentMutation) ID ¶
func (m *ShipmentMutation) ID() (id string, 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 (*ShipmentMutation) IDs ¶
func (m *ShipmentMutation) IDs(ctx context.Context) ([]string, 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 (*ShipmentMutation) InvoiceCleared ¶
func (m *ShipmentMutation) InvoiceCleared() bool
InvoiceCleared reports if the "invoice" edge to the Invoice entity was cleared.
func (*ShipmentMutation) InvoiceID ¶
func (m *ShipmentMutation) InvoiceID() (r uuid.UUID, exists bool)
InvoiceID returns the value of the "invoice_id" field in the mutation.
func (*ShipmentMutation) InvoiceIDs ¶
func (m *ShipmentMutation) InvoiceIDs() (ids []uuid.UUID)
InvoiceIDs returns the "invoice" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InvoiceID instead. It exists only for internal usage by the builders.
func (*ShipmentMutation) Note ¶
func (m *ShipmentMutation) Note() (r string, exists bool)
Note returns the value of the "note" field in the mutation.
func (*ShipmentMutation) NoteCleared ¶
func (m *ShipmentMutation) NoteCleared() bool
NoteCleared returns if the "note" field was cleared in this mutation.
func (*ShipmentMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Shipment entity. If the Shipment 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 (*ShipmentMutation) 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 (*ShipmentMutation) OldInvoiceID ¶
OldInvoiceID returns the old "invoice_id" field's value of the Shipment entity. If the Shipment 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 (*ShipmentMutation) OldNote ¶
func (m *ShipmentMutation) OldNote(ctx context.Context) (v *string, err error)
OldNote returns the old "note" field's value of the Shipment entity. If the Shipment 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 (*ShipmentMutation) OldOrderID ¶
OldOrderID returns the old "order_id" field's value of the Shipment entity. If the Shipment 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 (*ShipmentMutation) OldShipmentDate ¶
OldShipmentDate returns the old "shipment_date" field's value of the Shipment entity. If the Shipment 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 (*ShipmentMutation) OldStaffID ¶
OldStaffID returns the old "staff_id" field's value of the Shipment entity. If the Shipment 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 (*ShipmentMutation) OldStatusCode ¶
func (m *ShipmentMutation) OldStatusCode(ctx context.Context) (v *int, err error)
OldStatusCode returns the old "status_code" field's value of the Shipment entity. If the Shipment 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 (*ShipmentMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Shipment entity. If the Shipment 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 (*ShipmentMutation) OrderCleared ¶
func (m *ShipmentMutation) OrderCleared() bool
OrderCleared reports if the "order" edge to the Order entity was cleared.
func (*ShipmentMutation) OrderID ¶
func (m *ShipmentMutation) OrderID() (r uuid.UUID, exists bool)
OrderID returns the value of the "order_id" field in the mutation.
func (*ShipmentMutation) OrderIDs ¶
func (m *ShipmentMutation) OrderIDs() (ids []uuid.UUID)
OrderIDs returns the "order" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrderID instead. It exists only for internal usage by the builders.
func (*ShipmentMutation) RemovedEdges ¶
func (m *ShipmentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ShipmentMutation) RemovedIDs ¶
func (m *ShipmentMutation) 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 (*ShipmentMutation) ResetCreatedAt ¶
func (m *ShipmentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ShipmentMutation) ResetEdge ¶
func (m *ShipmentMutation) 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 (*ShipmentMutation) ResetField ¶
func (m *ShipmentMutation) 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 (*ShipmentMutation) ResetInvoice ¶
func (m *ShipmentMutation) ResetInvoice()
ResetInvoice resets all changes to the "invoice" edge.
func (*ShipmentMutation) ResetInvoiceID ¶
func (m *ShipmentMutation) ResetInvoiceID()
ResetInvoiceID resets all changes to the "invoice_id" field.
func (*ShipmentMutation) ResetNote ¶
func (m *ShipmentMutation) ResetNote()
ResetNote resets all changes to the "note" field.
func (*ShipmentMutation) ResetOrder ¶
func (m *ShipmentMutation) ResetOrder()
ResetOrder resets all changes to the "order" edge.
func (*ShipmentMutation) ResetOrderID ¶
func (m *ShipmentMutation) ResetOrderID()
ResetOrderID resets all changes to the "order_id" field.
func (*ShipmentMutation) ResetShipmentDate ¶
func (m *ShipmentMutation) ResetShipmentDate()
ResetShipmentDate resets all changes to the "shipment_date" field.
func (*ShipmentMutation) ResetShipmentStatus ¶
func (m *ShipmentMutation) ResetShipmentStatus()
ResetShipmentStatus resets all changes to the "shipment_status" edge.
func (*ShipmentMutation) ResetStaff ¶
func (m *ShipmentMutation) ResetStaff()
ResetStaff resets all changes to the "staff" edge.
func (*ShipmentMutation) ResetStaffID ¶
func (m *ShipmentMutation) ResetStaffID()
ResetStaffID resets all changes to the "staff_id" field.
func (*ShipmentMutation) ResetStatusCode ¶
func (m *ShipmentMutation) ResetStatusCode()
ResetStatusCode resets all changes to the "status_code" field.
func (*ShipmentMutation) ResetUpdatedAt ¶
func (m *ShipmentMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ShipmentMutation) SetCreatedAt ¶
func (m *ShipmentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ShipmentMutation) SetField ¶
func (m *ShipmentMutation) 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 (*ShipmentMutation) SetID ¶
func (m *ShipmentMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Shipment entities.
func (*ShipmentMutation) SetInvoiceID ¶
func (m *ShipmentMutation) SetInvoiceID(u uuid.UUID)
SetInvoiceID sets the "invoice_id" field.
func (*ShipmentMutation) SetNote ¶
func (m *ShipmentMutation) SetNote(s string)
SetNote sets the "note" field.
func (*ShipmentMutation) SetOp ¶
func (m *ShipmentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ShipmentMutation) SetOrderID ¶
func (m *ShipmentMutation) SetOrderID(u uuid.UUID)
SetOrderID sets the "order_id" field.
func (*ShipmentMutation) SetShipmentDate ¶
func (m *ShipmentMutation) SetShipmentDate(t time.Time)
SetShipmentDate sets the "shipment_date" field.
func (*ShipmentMutation) SetShipmentStatusID ¶
func (m *ShipmentMutation) SetShipmentStatusID(id int)
SetShipmentStatusID sets the "shipment_status" edge to the ShipmentStatusCode entity by id.
func (*ShipmentMutation) SetStaffID ¶
func (m *ShipmentMutation) SetStaffID(u uuid.UUID)
SetStaffID sets the "staff_id" field.
func (*ShipmentMutation) SetStatusCode ¶
func (m *ShipmentMutation) SetStatusCode(i int)
SetStatusCode sets the "status_code" field.
func (*ShipmentMutation) SetUpdatedAt ¶
func (m *ShipmentMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ShipmentMutation) ShipmentDate ¶
func (m *ShipmentMutation) ShipmentDate() (r time.Time, exists bool)
ShipmentDate returns the value of the "shipment_date" field in the mutation.
func (*ShipmentMutation) ShipmentStatusCleared ¶
func (m *ShipmentMutation) ShipmentStatusCleared() bool
ShipmentStatusCleared reports if the "shipment_status" edge to the ShipmentStatusCode entity was cleared.
func (*ShipmentMutation) ShipmentStatusID ¶
func (m *ShipmentMutation) ShipmentStatusID() (id int, exists bool)
ShipmentStatusID returns the "shipment_status" edge ID in the mutation.
func (*ShipmentMutation) ShipmentStatusIDs ¶
func (m *ShipmentMutation) ShipmentStatusIDs() (ids []int)
ShipmentStatusIDs returns the "shipment_status" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ShipmentStatusID instead. It exists only for internal usage by the builders.
func (*ShipmentMutation) StaffCleared ¶
func (m *ShipmentMutation) StaffCleared() bool
StaffCleared reports if the "staff" edge to the Person entity was cleared.
func (*ShipmentMutation) StaffID ¶
func (m *ShipmentMutation) StaffID() (r uuid.UUID, exists bool)
StaffID returns the value of the "staff_id" field in the mutation.
func (*ShipmentMutation) StaffIDs ¶
func (m *ShipmentMutation) StaffIDs() (ids []uuid.UUID)
StaffIDs returns the "staff" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StaffID instead. It exists only for internal usage by the builders.
func (*ShipmentMutation) StatusCode ¶
func (m *ShipmentMutation) StatusCode() (r int, exists bool)
StatusCode returns the value of the "status_code" field in the mutation.
func (ShipmentMutation) Tx ¶
func (m ShipmentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ShipmentMutation) Type ¶
func (m *ShipmentMutation) Type() string
Type returns the node type of this mutation (Shipment).
func (*ShipmentMutation) UpdatedAt ¶
func (m *ShipmentMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ShipmentMutation) Where ¶
func (m *ShipmentMutation) Where(ps ...predicate.Shipment)
Where appends a list predicates to the ShipmentMutation builder.
func (*ShipmentMutation) WhereP ¶
func (m *ShipmentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ShipmentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ShipmentQuery ¶
type ShipmentQuery struct {
// contains filtered or unexported fields
}
ShipmentQuery is the builder for querying Shipment entities.
func (*ShipmentQuery) Aggregate ¶
func (sq *ShipmentQuery) Aggregate(fns ...AggregateFunc) *ShipmentSelect
Aggregate returns a ShipmentSelect configured with the given aggregations.
func (*ShipmentQuery) All ¶
func (sq *ShipmentQuery) All(ctx context.Context) ([]*Shipment, error)
All executes the query and returns a list of Shipments.
func (*ShipmentQuery) AllX ¶
func (sq *ShipmentQuery) AllX(ctx context.Context) []*Shipment
AllX is like All, but panics if an error occurs.
func (*ShipmentQuery) Clone ¶
func (sq *ShipmentQuery) Clone() *ShipmentQuery
Clone returns a duplicate of the ShipmentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ShipmentQuery) Count ¶
func (sq *ShipmentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ShipmentQuery) CountX ¶
func (sq *ShipmentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ShipmentQuery) Exist ¶
func (sq *ShipmentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ShipmentQuery) ExistX ¶
func (sq *ShipmentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ShipmentQuery) First ¶
func (sq *ShipmentQuery) First(ctx context.Context) (*Shipment, error)
First returns the first Shipment entity from the query. Returns a *NotFoundError when no Shipment was found.
func (*ShipmentQuery) FirstID ¶
func (sq *ShipmentQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Shipment ID from the query. Returns a *NotFoundError when no Shipment ID was found.
func (*ShipmentQuery) FirstIDX ¶
func (sq *ShipmentQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*ShipmentQuery) FirstX ¶
func (sq *ShipmentQuery) FirstX(ctx context.Context) *Shipment
FirstX is like First, but panics if an error occurs.
func (*ShipmentQuery) GroupBy ¶
func (sq *ShipmentQuery) GroupBy(field string, fields ...string) *ShipmentGroupBy
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.Shipment.Query(). GroupBy(shipment.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ShipmentQuery) IDs ¶
func (sq *ShipmentQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of Shipment IDs.
func (*ShipmentQuery) IDsX ¶
func (sq *ShipmentQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*ShipmentQuery) Limit ¶
func (sq *ShipmentQuery) Limit(limit int) *ShipmentQuery
Limit the number of records to be returned by this query.
func (*ShipmentQuery) Offset ¶
func (sq *ShipmentQuery) Offset(offset int) *ShipmentQuery
Offset to start from.
func (*ShipmentQuery) Only ¶
func (sq *ShipmentQuery) Only(ctx context.Context) (*Shipment, error)
Only returns a single Shipment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Shipment entity is found. Returns a *NotFoundError when no Shipment entities are found.
func (*ShipmentQuery) OnlyID ¶
func (sq *ShipmentQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Shipment ID in the query. Returns a *NotSingularError when more than one Shipment ID is found. Returns a *NotFoundError when no entities are found.
func (*ShipmentQuery) OnlyIDX ¶
func (sq *ShipmentQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ShipmentQuery) OnlyX ¶
func (sq *ShipmentQuery) OnlyX(ctx context.Context) *Shipment
OnlyX is like Only, but panics if an error occurs.
func (*ShipmentQuery) Order ¶
func (sq *ShipmentQuery) Order(o ...shipment.OrderOption) *ShipmentQuery
Order specifies how the records should be ordered.
func (*ShipmentQuery) QueryInvoice ¶
func (sq *ShipmentQuery) QueryInvoice() *InvoiceQuery
QueryInvoice chains the current query on the "invoice" edge.
func (*ShipmentQuery) QueryOrder ¶
func (sq *ShipmentQuery) QueryOrder() *OrderQuery
QueryOrder chains the current query on the "order" edge.
func (*ShipmentQuery) QueryShipmentStatus ¶
func (sq *ShipmentQuery) QueryShipmentStatus() *ShipmentStatusCodeQuery
QueryShipmentStatus chains the current query on the "shipment_status" edge.
func (*ShipmentQuery) QueryStaff ¶
func (sq *ShipmentQuery) QueryStaff() *PersonQuery
QueryStaff chains the current query on the "staff" edge.
func (*ShipmentQuery) Select ¶
func (sq *ShipmentQuery) Select(fields ...string) *ShipmentSelect
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.Shipment.Query(). Select(shipment.FieldCreatedAt). Scan(ctx, &v)
func (*ShipmentQuery) Unique ¶
func (sq *ShipmentQuery) Unique(unique bool) *ShipmentQuery
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 (*ShipmentQuery) Where ¶
func (sq *ShipmentQuery) Where(ps ...predicate.Shipment) *ShipmentQuery
Where adds a new predicate for the ShipmentQuery builder.
func (*ShipmentQuery) WithInvoice ¶
func (sq *ShipmentQuery) WithInvoice(opts ...func(*InvoiceQuery)) *ShipmentQuery
WithInvoice tells the query-builder to eager-load the nodes that are connected to the "invoice" edge. The optional arguments are used to configure the query builder of the edge.
func (*ShipmentQuery) WithOrder ¶
func (sq *ShipmentQuery) WithOrder(opts ...func(*OrderQuery)) *ShipmentQuery
WithOrder tells the query-builder to eager-load the nodes that are connected to the "order" edge. The optional arguments are used to configure the query builder of the edge.
func (*ShipmentQuery) WithShipmentStatus ¶
func (sq *ShipmentQuery) WithShipmentStatus(opts ...func(*ShipmentStatusCodeQuery)) *ShipmentQuery
WithShipmentStatus tells the query-builder to eager-load the nodes that are connected to the "shipment_status" edge. The optional arguments are used to configure the query builder of the edge.
func (*ShipmentQuery) WithStaff ¶
func (sq *ShipmentQuery) WithStaff(opts ...func(*PersonQuery)) *ShipmentQuery
WithStaff tells the query-builder to eager-load the nodes that are connected to the "staff" edge. The optional arguments are used to configure the query builder of the edge.
type ShipmentSelect ¶
type ShipmentSelect struct { *ShipmentQuery // contains filtered or unexported fields }
ShipmentSelect is the builder for selecting fields of Shipment entities.
func (*ShipmentSelect) Aggregate ¶
func (ss *ShipmentSelect) Aggregate(fns ...AggregateFunc) *ShipmentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ShipmentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ShipmentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ShipmentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ShipmentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ShipmentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ShipmentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ShipmentSelect) Scan ¶
func (ss *ShipmentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ShipmentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ShipmentStatusCode ¶
type ShipmentStatusCode struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // ShipmentStatus holds the value of the "shipment_status" field. ShipmentStatus string `json:"shipment_status,omitempty"` // contains filtered or unexported fields }
ShipmentStatusCode is the model entity for the ShipmentStatusCode schema.
func (*ShipmentStatusCode) String ¶
func (ssc *ShipmentStatusCode) String() string
String implements the fmt.Stringer.
func (*ShipmentStatusCode) Unwrap ¶
func (ssc *ShipmentStatusCode) Unwrap() *ShipmentStatusCode
Unwrap unwraps the ShipmentStatusCode 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 (*ShipmentStatusCode) Update ¶
func (ssc *ShipmentStatusCode) Update() *ShipmentStatusCodeUpdateOne
Update returns a builder for updating this ShipmentStatusCode. Note that you need to call ShipmentStatusCode.Unwrap() before calling this method if this ShipmentStatusCode was returned from a transaction, and the transaction was committed or rolled back.
type ShipmentStatusCodeClient ¶
type ShipmentStatusCodeClient struct {
// contains filtered or unexported fields
}
ShipmentStatusCodeClient is a client for the ShipmentStatusCode schema.
func NewShipmentStatusCodeClient ¶
func NewShipmentStatusCodeClient(c config) *ShipmentStatusCodeClient
NewShipmentStatusCodeClient returns a client for the ShipmentStatusCode from the given config.
func (*ShipmentStatusCodeClient) Create ¶
func (c *ShipmentStatusCodeClient) Create() *ShipmentStatusCodeCreate
Create returns a builder for creating a ShipmentStatusCode entity.
func (*ShipmentStatusCodeClient) CreateBulk ¶
func (c *ShipmentStatusCodeClient) CreateBulk(builders ...*ShipmentStatusCodeCreate) *ShipmentStatusCodeCreateBulk
CreateBulk returns a builder for creating a bulk of ShipmentStatusCode entities.
func (*ShipmentStatusCodeClient) Delete ¶
func (c *ShipmentStatusCodeClient) Delete() *ShipmentStatusCodeDelete
Delete returns a delete builder for ShipmentStatusCode.
func (*ShipmentStatusCodeClient) DeleteOne ¶
func (c *ShipmentStatusCodeClient) DeleteOne(ssc *ShipmentStatusCode) *ShipmentStatusCodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ShipmentStatusCodeClient) DeleteOneID ¶
func (c *ShipmentStatusCodeClient) DeleteOneID(id int) *ShipmentStatusCodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ShipmentStatusCodeClient) Get ¶
func (c *ShipmentStatusCodeClient) Get(ctx context.Context, id int) (*ShipmentStatusCode, error)
Get returns a ShipmentStatusCode entity by its id.
func (*ShipmentStatusCodeClient) GetX ¶
func (c *ShipmentStatusCodeClient) GetX(ctx context.Context, id int) *ShipmentStatusCode
GetX is like Get, but panics if an error occurs.
func (*ShipmentStatusCodeClient) Hooks ¶
func (c *ShipmentStatusCodeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ShipmentStatusCodeClient) Intercept ¶
func (c *ShipmentStatusCodeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `shipmentstatuscode.Intercept(f(g(h())))`.
func (*ShipmentStatusCodeClient) Interceptors ¶
func (c *ShipmentStatusCodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ShipmentStatusCodeClient) MapCreateBulk ¶
func (c *ShipmentStatusCodeClient) MapCreateBulk(slice any, setFunc func(*ShipmentStatusCodeCreate, int)) *ShipmentStatusCodeCreateBulk
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 (*ShipmentStatusCodeClient) Query ¶
func (c *ShipmentStatusCodeClient) Query() *ShipmentStatusCodeQuery
Query returns a query builder for ShipmentStatusCode.
func (*ShipmentStatusCodeClient) Update ¶
func (c *ShipmentStatusCodeClient) Update() *ShipmentStatusCodeUpdate
Update returns an update builder for ShipmentStatusCode.
func (*ShipmentStatusCodeClient) UpdateOne ¶
func (c *ShipmentStatusCodeClient) UpdateOne(ssc *ShipmentStatusCode) *ShipmentStatusCodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ShipmentStatusCodeClient) UpdateOneID ¶
func (c *ShipmentStatusCodeClient) UpdateOneID(id int) *ShipmentStatusCodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ShipmentStatusCodeClient) Use ¶
func (c *ShipmentStatusCodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `shipmentstatuscode.Hooks(f(g(h())))`.
type ShipmentStatusCodeCreate ¶
type ShipmentStatusCodeCreate struct {
// contains filtered or unexported fields
}
ShipmentStatusCodeCreate is the builder for creating a ShipmentStatusCode entity.
func (*ShipmentStatusCodeCreate) Exec ¶
func (sscc *ShipmentStatusCodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShipmentStatusCodeCreate) ExecX ¶
func (sscc *ShipmentStatusCodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentStatusCodeCreate) Mutation ¶
func (sscc *ShipmentStatusCodeCreate) Mutation() *ShipmentStatusCodeMutation
Mutation returns the ShipmentStatusCodeMutation object of the builder.
func (*ShipmentStatusCodeCreate) Save ¶
func (sscc *ShipmentStatusCodeCreate) Save(ctx context.Context) (*ShipmentStatusCode, error)
Save creates the ShipmentStatusCode in the database.
func (*ShipmentStatusCodeCreate) SaveX ¶
func (sscc *ShipmentStatusCodeCreate) SaveX(ctx context.Context) *ShipmentStatusCode
SaveX calls Save and panics if Save returns an error.
func (*ShipmentStatusCodeCreate) SetCreatedAt ¶
func (sscc *ShipmentStatusCodeCreate) SetCreatedAt(t time.Time) *ShipmentStatusCodeCreate
SetCreatedAt sets the "created_at" field.
func (*ShipmentStatusCodeCreate) SetID ¶
func (sscc *ShipmentStatusCodeCreate) SetID(i int) *ShipmentStatusCodeCreate
SetID sets the "id" field.
func (*ShipmentStatusCodeCreate) SetNillableCreatedAt ¶
func (sscc *ShipmentStatusCodeCreate) SetNillableCreatedAt(t *time.Time) *ShipmentStatusCodeCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ShipmentStatusCodeCreate) SetNillableUpdatedAt ¶
func (sscc *ShipmentStatusCodeCreate) SetNillableUpdatedAt(t *time.Time) *ShipmentStatusCodeCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ShipmentStatusCodeCreate) SetShipmentStatus ¶
func (sscc *ShipmentStatusCodeCreate) SetShipmentStatus(s string) *ShipmentStatusCodeCreate
SetShipmentStatus sets the "shipment_status" field.
func (*ShipmentStatusCodeCreate) SetUpdatedAt ¶
func (sscc *ShipmentStatusCodeCreate) SetUpdatedAt(t time.Time) *ShipmentStatusCodeCreate
SetUpdatedAt sets the "updated_at" field.
type ShipmentStatusCodeCreateBulk ¶
type ShipmentStatusCodeCreateBulk struct {
// contains filtered or unexported fields
}
ShipmentStatusCodeCreateBulk is the builder for creating many ShipmentStatusCode entities in bulk.
func (*ShipmentStatusCodeCreateBulk) Exec ¶
func (ssccb *ShipmentStatusCodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ShipmentStatusCodeCreateBulk) ExecX ¶
func (ssccb *ShipmentStatusCodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentStatusCodeCreateBulk) Save ¶
func (ssccb *ShipmentStatusCodeCreateBulk) Save(ctx context.Context) ([]*ShipmentStatusCode, error)
Save creates the ShipmentStatusCode entities in the database.
func (*ShipmentStatusCodeCreateBulk) SaveX ¶
func (ssccb *ShipmentStatusCodeCreateBulk) SaveX(ctx context.Context) []*ShipmentStatusCode
SaveX is like Save, but panics if an error occurs.
type ShipmentStatusCodeDelete ¶
type ShipmentStatusCodeDelete struct {
// contains filtered or unexported fields
}
ShipmentStatusCodeDelete is the builder for deleting a ShipmentStatusCode entity.
func (*ShipmentStatusCodeDelete) Exec ¶
func (sscd *ShipmentStatusCodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ShipmentStatusCodeDelete) ExecX ¶
func (sscd *ShipmentStatusCodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentStatusCodeDelete) Where ¶
func (sscd *ShipmentStatusCodeDelete) Where(ps ...predicate.ShipmentStatusCode) *ShipmentStatusCodeDelete
Where appends a list predicates to the ShipmentStatusCodeDelete builder.
type ShipmentStatusCodeDeleteOne ¶
type ShipmentStatusCodeDeleteOne struct {
// contains filtered or unexported fields
}
ShipmentStatusCodeDeleteOne is the builder for deleting a single ShipmentStatusCode entity.
func (*ShipmentStatusCodeDeleteOne) Exec ¶
func (sscdo *ShipmentStatusCodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ShipmentStatusCodeDeleteOne) ExecX ¶
func (sscdo *ShipmentStatusCodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentStatusCodeDeleteOne) Where ¶
func (sscdo *ShipmentStatusCodeDeleteOne) Where(ps ...predicate.ShipmentStatusCode) *ShipmentStatusCodeDeleteOne
Where appends a list predicates to the ShipmentStatusCodeDelete builder.
type ShipmentStatusCodeGroupBy ¶
type ShipmentStatusCodeGroupBy struct {
// contains filtered or unexported fields
}
ShipmentStatusCodeGroupBy is the group-by builder for ShipmentStatusCode entities.
func (*ShipmentStatusCodeGroupBy) Aggregate ¶
func (sscgb *ShipmentStatusCodeGroupBy) Aggregate(fns ...AggregateFunc) *ShipmentStatusCodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ShipmentStatusCodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ShipmentStatusCodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ShipmentStatusCodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ShipmentStatusCodeGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*ShipmentStatusCodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ShipmentStatusCodeGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ShipmentStatusCodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ShipmentStatusCodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ShipmentStatusCodeGroupBy) Scan ¶
func (sscgb *ShipmentStatusCodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ShipmentStatusCodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ShipmentStatusCodeMutation ¶
type ShipmentStatusCodeMutation struct {
// contains filtered or unexported fields
}
ShipmentStatusCodeMutation represents an operation that mutates the ShipmentStatusCode nodes in the graph.
func (*ShipmentStatusCodeMutation) AddField ¶
func (m *ShipmentStatusCodeMutation) 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 (*ShipmentStatusCodeMutation) AddedEdges ¶
func (m *ShipmentStatusCodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ShipmentStatusCodeMutation) AddedField ¶
func (m *ShipmentStatusCodeMutation) 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 (*ShipmentStatusCodeMutation) AddedFields ¶
func (m *ShipmentStatusCodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ShipmentStatusCodeMutation) AddedIDs ¶
func (m *ShipmentStatusCodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ShipmentStatusCodeMutation) ClearEdge ¶
func (m *ShipmentStatusCodeMutation) 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 (*ShipmentStatusCodeMutation) ClearField ¶
func (m *ShipmentStatusCodeMutation) 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 (*ShipmentStatusCodeMutation) ClearedEdges ¶
func (m *ShipmentStatusCodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ShipmentStatusCodeMutation) ClearedFields ¶
func (m *ShipmentStatusCodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ShipmentStatusCodeMutation) Client ¶
func (m ShipmentStatusCodeMutation) 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 (*ShipmentStatusCodeMutation) CreatedAt ¶
func (m *ShipmentStatusCodeMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ShipmentStatusCodeMutation) EdgeCleared ¶
func (m *ShipmentStatusCodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ShipmentStatusCodeMutation) Field ¶
func (m *ShipmentStatusCodeMutation) 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 (*ShipmentStatusCodeMutation) FieldCleared ¶
func (m *ShipmentStatusCodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ShipmentStatusCodeMutation) Fields ¶
func (m *ShipmentStatusCodeMutation) 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 (*ShipmentStatusCodeMutation) ID ¶
func (m *ShipmentStatusCodeMutation) ID() (id int, 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 (*ShipmentStatusCodeMutation) IDs ¶
func (m *ShipmentStatusCodeMutation) IDs(ctx context.Context) ([]int, 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 (*ShipmentStatusCodeMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the ShipmentStatusCode entity. If the ShipmentStatusCode 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 (*ShipmentStatusCodeMutation) 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 (*ShipmentStatusCodeMutation) OldShipmentStatus ¶
func (m *ShipmentStatusCodeMutation) OldShipmentStatus(ctx context.Context) (v string, err error)
OldShipmentStatus returns the old "shipment_status" field's value of the ShipmentStatusCode entity. If the ShipmentStatusCode 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 (*ShipmentStatusCodeMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the ShipmentStatusCode entity. If the ShipmentStatusCode 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 (*ShipmentStatusCodeMutation) Op ¶
func (m *ShipmentStatusCodeMutation) Op() Op
Op returns the operation name.
func (*ShipmentStatusCodeMutation) RemovedEdges ¶
func (m *ShipmentStatusCodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ShipmentStatusCodeMutation) RemovedIDs ¶
func (m *ShipmentStatusCodeMutation) 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 (*ShipmentStatusCodeMutation) ResetCreatedAt ¶
func (m *ShipmentStatusCodeMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ShipmentStatusCodeMutation) ResetEdge ¶
func (m *ShipmentStatusCodeMutation) 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 (*ShipmentStatusCodeMutation) ResetField ¶
func (m *ShipmentStatusCodeMutation) 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 (*ShipmentStatusCodeMutation) ResetShipmentStatus ¶
func (m *ShipmentStatusCodeMutation) ResetShipmentStatus()
ResetShipmentStatus resets all changes to the "shipment_status" field.
func (*ShipmentStatusCodeMutation) ResetUpdatedAt ¶
func (m *ShipmentStatusCodeMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ShipmentStatusCodeMutation) SetCreatedAt ¶
func (m *ShipmentStatusCodeMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ShipmentStatusCodeMutation) SetField ¶
func (m *ShipmentStatusCodeMutation) 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 (*ShipmentStatusCodeMutation) SetID ¶
func (m *ShipmentStatusCodeMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ShipmentStatusCode entities.
func (*ShipmentStatusCodeMutation) SetOp ¶
func (m *ShipmentStatusCodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ShipmentStatusCodeMutation) SetShipmentStatus ¶
func (m *ShipmentStatusCodeMutation) SetShipmentStatus(s string)
SetShipmentStatus sets the "shipment_status" field.
func (*ShipmentStatusCodeMutation) SetUpdatedAt ¶
func (m *ShipmentStatusCodeMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ShipmentStatusCodeMutation) ShipmentStatus ¶
func (m *ShipmentStatusCodeMutation) ShipmentStatus() (r string, exists bool)
ShipmentStatus returns the value of the "shipment_status" field in the mutation.
func (ShipmentStatusCodeMutation) Tx ¶
func (m ShipmentStatusCodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ShipmentStatusCodeMutation) Type ¶
func (m *ShipmentStatusCodeMutation) Type() string
Type returns the node type of this mutation (ShipmentStatusCode).
func (*ShipmentStatusCodeMutation) UpdatedAt ¶
func (m *ShipmentStatusCodeMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ShipmentStatusCodeMutation) Where ¶
func (m *ShipmentStatusCodeMutation) Where(ps ...predicate.ShipmentStatusCode)
Where appends a list predicates to the ShipmentStatusCodeMutation builder.
func (*ShipmentStatusCodeMutation) WhereP ¶
func (m *ShipmentStatusCodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ShipmentStatusCodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ShipmentStatusCodeQuery ¶
type ShipmentStatusCodeQuery struct {
// contains filtered or unexported fields
}
ShipmentStatusCodeQuery is the builder for querying ShipmentStatusCode entities.
func (*ShipmentStatusCodeQuery) Aggregate ¶
func (sscq *ShipmentStatusCodeQuery) Aggregate(fns ...AggregateFunc) *ShipmentStatusCodeSelect
Aggregate returns a ShipmentStatusCodeSelect configured with the given aggregations.
func (*ShipmentStatusCodeQuery) All ¶
func (sscq *ShipmentStatusCodeQuery) All(ctx context.Context) ([]*ShipmentStatusCode, error)
All executes the query and returns a list of ShipmentStatusCodes.
func (*ShipmentStatusCodeQuery) AllX ¶
func (sscq *ShipmentStatusCodeQuery) AllX(ctx context.Context) []*ShipmentStatusCode
AllX is like All, but panics if an error occurs.
func (*ShipmentStatusCodeQuery) Clone ¶
func (sscq *ShipmentStatusCodeQuery) Clone() *ShipmentStatusCodeQuery
Clone returns a duplicate of the ShipmentStatusCodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ShipmentStatusCodeQuery) Count ¶
func (sscq *ShipmentStatusCodeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ShipmentStatusCodeQuery) CountX ¶
func (sscq *ShipmentStatusCodeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ShipmentStatusCodeQuery) Exist ¶
func (sscq *ShipmentStatusCodeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ShipmentStatusCodeQuery) ExistX ¶
func (sscq *ShipmentStatusCodeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ShipmentStatusCodeQuery) First ¶
func (sscq *ShipmentStatusCodeQuery) First(ctx context.Context) (*ShipmentStatusCode, error)
First returns the first ShipmentStatusCode entity from the query. Returns a *NotFoundError when no ShipmentStatusCode was found.
func (*ShipmentStatusCodeQuery) FirstID ¶
func (sscq *ShipmentStatusCodeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ShipmentStatusCode ID from the query. Returns a *NotFoundError when no ShipmentStatusCode ID was found.
func (*ShipmentStatusCodeQuery) FirstIDX ¶
func (sscq *ShipmentStatusCodeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ShipmentStatusCodeQuery) FirstX ¶
func (sscq *ShipmentStatusCodeQuery) FirstX(ctx context.Context) *ShipmentStatusCode
FirstX is like First, but panics if an error occurs.
func (*ShipmentStatusCodeQuery) GroupBy ¶
func (sscq *ShipmentStatusCodeQuery) GroupBy(field string, fields ...string) *ShipmentStatusCodeGroupBy
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.ShipmentStatusCode.Query(). GroupBy(shipmentstatuscode.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ShipmentStatusCodeQuery) IDs ¶
func (sscq *ShipmentStatusCodeQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of ShipmentStatusCode IDs.
func (*ShipmentStatusCodeQuery) IDsX ¶
func (sscq *ShipmentStatusCodeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ShipmentStatusCodeQuery) Limit ¶
func (sscq *ShipmentStatusCodeQuery) Limit(limit int) *ShipmentStatusCodeQuery
Limit the number of records to be returned by this query.
func (*ShipmentStatusCodeQuery) Offset ¶
func (sscq *ShipmentStatusCodeQuery) Offset(offset int) *ShipmentStatusCodeQuery
Offset to start from.
func (*ShipmentStatusCodeQuery) Only ¶
func (sscq *ShipmentStatusCodeQuery) Only(ctx context.Context) (*ShipmentStatusCode, error)
Only returns a single ShipmentStatusCode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ShipmentStatusCode entity is found. Returns a *NotFoundError when no ShipmentStatusCode entities are found.
func (*ShipmentStatusCodeQuery) OnlyID ¶
func (sscq *ShipmentStatusCodeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ShipmentStatusCode ID in the query. Returns a *NotSingularError when more than one ShipmentStatusCode ID is found. Returns a *NotFoundError when no entities are found.
func (*ShipmentStatusCodeQuery) OnlyIDX ¶
func (sscq *ShipmentStatusCodeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ShipmentStatusCodeQuery) OnlyX ¶
func (sscq *ShipmentStatusCodeQuery) OnlyX(ctx context.Context) *ShipmentStatusCode
OnlyX is like Only, but panics if an error occurs.
func (*ShipmentStatusCodeQuery) Order ¶
func (sscq *ShipmentStatusCodeQuery) Order(o ...shipmentstatuscode.OrderOption) *ShipmentStatusCodeQuery
Order specifies how the records should be ordered.
func (*ShipmentStatusCodeQuery) Select ¶
func (sscq *ShipmentStatusCodeQuery) Select(fields ...string) *ShipmentStatusCodeSelect
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.ShipmentStatusCode.Query(). Select(shipmentstatuscode.FieldCreatedAt). Scan(ctx, &v)
func (*ShipmentStatusCodeQuery) Unique ¶
func (sscq *ShipmentStatusCodeQuery) Unique(unique bool) *ShipmentStatusCodeQuery
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 (*ShipmentStatusCodeQuery) Where ¶
func (sscq *ShipmentStatusCodeQuery) Where(ps ...predicate.ShipmentStatusCode) *ShipmentStatusCodeQuery
Where adds a new predicate for the ShipmentStatusCodeQuery builder.
type ShipmentStatusCodeSelect ¶
type ShipmentStatusCodeSelect struct { *ShipmentStatusCodeQuery // contains filtered or unexported fields }
ShipmentStatusCodeSelect is the builder for selecting fields of ShipmentStatusCode entities.
func (*ShipmentStatusCodeSelect) Aggregate ¶
func (sscs *ShipmentStatusCodeSelect) Aggregate(fns ...AggregateFunc) *ShipmentStatusCodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ShipmentStatusCodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ShipmentStatusCodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ShipmentStatusCodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ShipmentStatusCodeSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*ShipmentStatusCodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ShipmentStatusCodeSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ShipmentStatusCodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ShipmentStatusCodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ShipmentStatusCodeSelect) Scan ¶
func (sscs *ShipmentStatusCodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ShipmentStatusCodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ShipmentStatusCodeUpdate ¶
type ShipmentStatusCodeUpdate struct {
// contains filtered or unexported fields
}
ShipmentStatusCodeUpdate is the builder for updating ShipmentStatusCode entities.
func (*ShipmentStatusCodeUpdate) Exec ¶
func (sscu *ShipmentStatusCodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShipmentStatusCodeUpdate) ExecX ¶
func (sscu *ShipmentStatusCodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentStatusCodeUpdate) Mutation ¶
func (sscu *ShipmentStatusCodeUpdate) Mutation() *ShipmentStatusCodeMutation
Mutation returns the ShipmentStatusCodeMutation object of the builder.
func (*ShipmentStatusCodeUpdate) Save ¶
func (sscu *ShipmentStatusCodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ShipmentStatusCodeUpdate) SaveX ¶
func (sscu *ShipmentStatusCodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ShipmentStatusCodeUpdate) SetNillableShipmentStatus ¶
func (sscu *ShipmentStatusCodeUpdate) SetNillableShipmentStatus(s *string) *ShipmentStatusCodeUpdate
SetNillableShipmentStatus sets the "shipment_status" field if the given value is not nil.
func (*ShipmentStatusCodeUpdate) SetShipmentStatus ¶
func (sscu *ShipmentStatusCodeUpdate) SetShipmentStatus(s string) *ShipmentStatusCodeUpdate
SetShipmentStatus sets the "shipment_status" field.
func (*ShipmentStatusCodeUpdate) SetUpdatedAt ¶
func (sscu *ShipmentStatusCodeUpdate) SetUpdatedAt(t time.Time) *ShipmentStatusCodeUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ShipmentStatusCodeUpdate) Where ¶
func (sscu *ShipmentStatusCodeUpdate) Where(ps ...predicate.ShipmentStatusCode) *ShipmentStatusCodeUpdate
Where appends a list predicates to the ShipmentStatusCodeUpdate builder.
type ShipmentStatusCodeUpdateOne ¶
type ShipmentStatusCodeUpdateOne struct {
// contains filtered or unexported fields
}
ShipmentStatusCodeUpdateOne is the builder for updating a single ShipmentStatusCode entity.
func (*ShipmentStatusCodeUpdateOne) Exec ¶
func (sscuo *ShipmentStatusCodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ShipmentStatusCodeUpdateOne) ExecX ¶
func (sscuo *ShipmentStatusCodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentStatusCodeUpdateOne) Mutation ¶
func (sscuo *ShipmentStatusCodeUpdateOne) Mutation() *ShipmentStatusCodeMutation
Mutation returns the ShipmentStatusCodeMutation object of the builder.
func (*ShipmentStatusCodeUpdateOne) Save ¶
func (sscuo *ShipmentStatusCodeUpdateOne) Save(ctx context.Context) (*ShipmentStatusCode, error)
Save executes the query and returns the updated ShipmentStatusCode entity.
func (*ShipmentStatusCodeUpdateOne) SaveX ¶
func (sscuo *ShipmentStatusCodeUpdateOne) SaveX(ctx context.Context) *ShipmentStatusCode
SaveX is like Save, but panics if an error occurs.
func (*ShipmentStatusCodeUpdateOne) Select ¶
func (sscuo *ShipmentStatusCodeUpdateOne) Select(field string, fields ...string) *ShipmentStatusCodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ShipmentStatusCodeUpdateOne) SetNillableShipmentStatus ¶
func (sscuo *ShipmentStatusCodeUpdateOne) SetNillableShipmentStatus(s *string) *ShipmentStatusCodeUpdateOne
SetNillableShipmentStatus sets the "shipment_status" field if the given value is not nil.
func (*ShipmentStatusCodeUpdateOne) SetShipmentStatus ¶
func (sscuo *ShipmentStatusCodeUpdateOne) SetShipmentStatus(s string) *ShipmentStatusCodeUpdateOne
SetShipmentStatus sets the "shipment_status" field.
func (*ShipmentStatusCodeUpdateOne) SetUpdatedAt ¶
func (sscuo *ShipmentStatusCodeUpdateOne) SetUpdatedAt(t time.Time) *ShipmentStatusCodeUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ShipmentStatusCodeUpdateOne) Where ¶
func (sscuo *ShipmentStatusCodeUpdateOne) Where(ps ...predicate.ShipmentStatusCode) *ShipmentStatusCodeUpdateOne
Where appends a list predicates to the ShipmentStatusCodeUpdate builder.
type ShipmentStatusCodes ¶
type ShipmentStatusCodes []*ShipmentStatusCode
ShipmentStatusCodes is a parsable slice of ShipmentStatusCode.
type ShipmentUpdate ¶
type ShipmentUpdate struct {
// contains filtered or unexported fields
}
ShipmentUpdate is the builder for updating Shipment entities.
func (*ShipmentUpdate) ClearNote ¶
func (su *ShipmentUpdate) ClearNote() *ShipmentUpdate
ClearNote clears the value of the "note" field.
func (*ShipmentUpdate) ClearShipmentStatus ¶
func (su *ShipmentUpdate) ClearShipmentStatus() *ShipmentUpdate
ClearShipmentStatus clears the "shipment_status" edge to the ShipmentStatusCode entity.
func (*ShipmentUpdate) Exec ¶
func (su *ShipmentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ShipmentUpdate) ExecX ¶
func (su *ShipmentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentUpdate) Mutation ¶
func (su *ShipmentUpdate) Mutation() *ShipmentMutation
Mutation returns the ShipmentMutation object of the builder.
func (*ShipmentUpdate) Save ¶
func (su *ShipmentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ShipmentUpdate) SaveX ¶
func (su *ShipmentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ShipmentUpdate) SetNillableNote ¶
func (su *ShipmentUpdate) SetNillableNote(s *string) *ShipmentUpdate
SetNillableNote sets the "note" field if the given value is not nil.
func (*ShipmentUpdate) SetNillableShipmentDate ¶
func (su *ShipmentUpdate) SetNillableShipmentDate(t *time.Time) *ShipmentUpdate
SetNillableShipmentDate sets the "shipment_date" field if the given value is not nil.
func (*ShipmentUpdate) SetNillableStatusCode ¶
func (su *ShipmentUpdate) SetNillableStatusCode(i *int) *ShipmentUpdate
SetNillableStatusCode sets the "status_code" field if the given value is not nil.
func (*ShipmentUpdate) SetNote ¶
func (su *ShipmentUpdate) SetNote(s string) *ShipmentUpdate
SetNote sets the "note" field.
func (*ShipmentUpdate) SetShipmentDate ¶
func (su *ShipmentUpdate) SetShipmentDate(t time.Time) *ShipmentUpdate
SetShipmentDate sets the "shipment_date" field.
func (*ShipmentUpdate) SetShipmentStatus ¶
func (su *ShipmentUpdate) SetShipmentStatus(s *ShipmentStatusCode) *ShipmentUpdate
SetShipmentStatus sets the "shipment_status" edge to the ShipmentStatusCode entity.
func (*ShipmentUpdate) SetShipmentStatusID ¶
func (su *ShipmentUpdate) SetShipmentStatusID(id int) *ShipmentUpdate
SetShipmentStatusID sets the "shipment_status" edge to the ShipmentStatusCode entity by ID.
func (*ShipmentUpdate) SetStatusCode ¶
func (su *ShipmentUpdate) SetStatusCode(i int) *ShipmentUpdate
SetStatusCode sets the "status_code" field.
func (*ShipmentUpdate) SetUpdatedAt ¶
func (su *ShipmentUpdate) SetUpdatedAt(t time.Time) *ShipmentUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ShipmentUpdate) Where ¶
func (su *ShipmentUpdate) Where(ps ...predicate.Shipment) *ShipmentUpdate
Where appends a list predicates to the ShipmentUpdate builder.
type ShipmentUpdateOne ¶
type ShipmentUpdateOne struct {
// contains filtered or unexported fields
}
ShipmentUpdateOne is the builder for updating a single Shipment entity.
func (*ShipmentUpdateOne) ClearNote ¶
func (suo *ShipmentUpdateOne) ClearNote() *ShipmentUpdateOne
ClearNote clears the value of the "note" field.
func (*ShipmentUpdateOne) ClearShipmentStatus ¶
func (suo *ShipmentUpdateOne) ClearShipmentStatus() *ShipmentUpdateOne
ClearShipmentStatus clears the "shipment_status" edge to the ShipmentStatusCode entity.
func (*ShipmentUpdateOne) Exec ¶
func (suo *ShipmentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ShipmentUpdateOne) ExecX ¶
func (suo *ShipmentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ShipmentUpdateOne) Mutation ¶
func (suo *ShipmentUpdateOne) Mutation() *ShipmentMutation
Mutation returns the ShipmentMutation object of the builder.
func (*ShipmentUpdateOne) Save ¶
func (suo *ShipmentUpdateOne) Save(ctx context.Context) (*Shipment, error)
Save executes the query and returns the updated Shipment entity.
func (*ShipmentUpdateOne) SaveX ¶
func (suo *ShipmentUpdateOne) SaveX(ctx context.Context) *Shipment
SaveX is like Save, but panics if an error occurs.
func (*ShipmentUpdateOne) Select ¶
func (suo *ShipmentUpdateOne) Select(field string, fields ...string) *ShipmentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ShipmentUpdateOne) SetNillableNote ¶
func (suo *ShipmentUpdateOne) SetNillableNote(s *string) *ShipmentUpdateOne
SetNillableNote sets the "note" field if the given value is not nil.
func (*ShipmentUpdateOne) SetNillableShipmentDate ¶
func (suo *ShipmentUpdateOne) SetNillableShipmentDate(t *time.Time) *ShipmentUpdateOne
SetNillableShipmentDate sets the "shipment_date" field if the given value is not nil.
func (*ShipmentUpdateOne) SetNillableStatusCode ¶
func (suo *ShipmentUpdateOne) SetNillableStatusCode(i *int) *ShipmentUpdateOne
SetNillableStatusCode sets the "status_code" field if the given value is not nil.
func (*ShipmentUpdateOne) SetNote ¶
func (suo *ShipmentUpdateOne) SetNote(s string) *ShipmentUpdateOne
SetNote sets the "note" field.
func (*ShipmentUpdateOne) SetShipmentDate ¶
func (suo *ShipmentUpdateOne) SetShipmentDate(t time.Time) *ShipmentUpdateOne
SetShipmentDate sets the "shipment_date" field.
func (*ShipmentUpdateOne) SetShipmentStatus ¶
func (suo *ShipmentUpdateOne) SetShipmentStatus(s *ShipmentStatusCode) *ShipmentUpdateOne
SetShipmentStatus sets the "shipment_status" edge to the ShipmentStatusCode entity.
func (*ShipmentUpdateOne) SetShipmentStatusID ¶
func (suo *ShipmentUpdateOne) SetShipmentStatusID(id int) *ShipmentUpdateOne
SetShipmentStatusID sets the "shipment_status" edge to the ShipmentStatusCode entity by ID.
func (*ShipmentUpdateOne) SetStatusCode ¶
func (suo *ShipmentUpdateOne) SetStatusCode(i int) *ShipmentUpdateOne
SetStatusCode sets the "status_code" field.
func (*ShipmentUpdateOne) SetUpdatedAt ¶
func (suo *ShipmentUpdateOne) SetUpdatedAt(t time.Time) *ShipmentUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ShipmentUpdateOne) Where ¶
func (suo *ShipmentUpdateOne) Where(ps ...predicate.Shipment) *ShipmentUpdateOne
Where appends a list predicates to the ShipmentUpdate builder.
type Tag ¶
type Tag struct { // ID of the ent. ID string `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // Title holds the value of the "title" field. Title string `json:"title,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TagQuery when eager-loading is set. Edges TagEdges `json:"edges"` // contains filtered or unexported fields }
Tag is the model entity for the Tag schema.
func (*Tag) QueryProductTags ¶
func (t *Tag) QueryProductTags() *ProductTagQuery
QueryProductTags queries the "product_tags" edge of the Tag entity.
func (*Tag) QueryProducts ¶
func (t *Tag) QueryProducts() *ProductInfoQuery
QueryProducts queries the "products" edge of the Tag entity.
func (*Tag) Unwrap ¶
Unwrap unwraps the Tag 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 (*Tag) Update ¶
func (t *Tag) Update() *TagUpdateOne
Update returns a builder for updating this Tag. Note that you need to call Tag.Unwrap() before calling this method if this Tag was returned from a transaction, and the transaction was committed or rolled back.
type TagClient ¶
type TagClient struct {
// contains filtered or unexported fields
}
TagClient is a client for the Tag schema.
func NewTagClient ¶
func NewTagClient(c config) *TagClient
NewTagClient returns a client for the Tag from the given config.
func (*TagClient) CreateBulk ¶
func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
CreateBulk returns a builder for creating a bulk of Tag entities.
func (*TagClient) DeleteOne ¶
func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TagClient) DeleteOneID ¶
func (c *TagClient) DeleteOneID(id string) *TagDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TagClient) Intercept ¶
func (c *TagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tag.Intercept(f(g(h())))`.
func (*TagClient) Interceptors ¶
func (c *TagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TagClient) MapCreateBulk ¶
func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
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 (*TagClient) QueryProductTags ¶
func (c *TagClient) QueryProductTags(t *Tag) *ProductTagQuery
QueryProductTags queries the product_tags edge of a Tag.
func (*TagClient) QueryProducts ¶
func (c *TagClient) QueryProducts(t *Tag) *ProductInfoQuery
QueryProducts queries the products edge of a Tag.
func (*TagClient) UpdateOne ¶
func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TagClient) UpdateOneID ¶
func (c *TagClient) UpdateOneID(id string) *TagUpdateOne
UpdateOneID returns an update builder for the given id.
type TagCreate ¶
type TagCreate struct {
// contains filtered or unexported fields
}
TagCreate is the builder for creating a Tag entity.
func (*TagCreate) AddProductIDs ¶
AddProductIDs adds the "products" edge to the ProductInfo entity by IDs.
func (*TagCreate) AddProducts ¶
func (tc *TagCreate) AddProducts(p ...*ProductInfo) *TagCreate
AddProducts adds the "products" edges to the ProductInfo entity.
func (*TagCreate) Mutation ¶
func (tc *TagCreate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*TagCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TagCreate) SetNillableUpdatedAt ¶
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
type TagCreateBulk ¶
type TagCreateBulk struct {
// contains filtered or unexported fields
}
TagCreateBulk is the builder for creating many Tag entities in bulk.
func (*TagCreateBulk) Exec ¶
func (tcb *TagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagCreateBulk) ExecX ¶
func (tcb *TagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type TagDelete ¶
type TagDelete struct {
// contains filtered or unexported fields
}
TagDelete is the builder for deleting a Tag entity.
func (*TagDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type TagDeleteOne ¶
type TagDeleteOne struct {
// contains filtered or unexported fields
}
TagDeleteOne is the builder for deleting a single Tag entity.
func (*TagDeleteOne) Exec ¶
func (tdo *TagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TagDeleteOne) ExecX ¶
func (tdo *TagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagDeleteOne) Where ¶
func (tdo *TagDeleteOne) Where(ps ...predicate.Tag) *TagDeleteOne
Where appends a list predicates to the TagDelete builder.
type TagEdges ¶
type TagEdges struct { // Products holds the value of the products edge. Products []*ProductInfo `json:"products,omitempty"` // ProductTags holds the value of the product_tags edge. ProductTags []*ProductTag `json:"product_tags,omitempty"` // contains filtered or unexported fields }
TagEdges holds the relations/edges for other nodes in the graph.
func (TagEdges) ProductTagsOrErr ¶
func (e TagEdges) ProductTagsOrErr() ([]*ProductTag, error)
ProductTagsOrErr returns the ProductTags value or an error if the edge was not loaded in eager-loading.
func (TagEdges) ProductsOrErr ¶
func (e TagEdges) ProductsOrErr() ([]*ProductInfo, error)
ProductsOrErr returns the Products value or an error if the edge was not loaded in eager-loading.
type TagGroupBy ¶
type TagGroupBy struct {
// contains filtered or unexported fields
}
TagGroupBy is the group-by builder for Tag entities.
func (*TagGroupBy) Aggregate ¶
func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Scan ¶
func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagMutation ¶
type TagMutation struct {
// contains filtered or unexported fields
}
TagMutation represents an operation that mutates the Tag nodes in the graph.
func (*TagMutation) AddField ¶
func (m *TagMutation) 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 (*TagMutation) AddProductIDs ¶
func (m *TagMutation) AddProductIDs(ids ...string)
AddProductIDs adds the "products" edge to the ProductInfo entity by ids.
func (*TagMutation) AddedEdges ¶
func (m *TagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TagMutation) AddedField ¶
func (m *TagMutation) 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 (*TagMutation) AddedFields ¶
func (m *TagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TagMutation) AddedIDs ¶
func (m *TagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TagMutation) ClearEdge ¶
func (m *TagMutation) 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 (*TagMutation) ClearField ¶
func (m *TagMutation) 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 (*TagMutation) ClearProducts ¶
func (m *TagMutation) ClearProducts()
ClearProducts clears the "products" edge to the ProductInfo entity.
func (*TagMutation) ClearedEdges ¶
func (m *TagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TagMutation) ClearedFields ¶
func (m *TagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TagMutation) Client ¶
func (m TagMutation) 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 (*TagMutation) CreatedAt ¶
func (m *TagMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TagMutation) EdgeCleared ¶
func (m *TagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TagMutation) Field ¶
func (m *TagMutation) 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 (*TagMutation) FieldCleared ¶
func (m *TagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TagMutation) Fields ¶
func (m *TagMutation) 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 (*TagMutation) ID ¶
func (m *TagMutation) ID() (id string, 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 (*TagMutation) IDs ¶
func (m *TagMutation) IDs(ctx context.Context) ([]string, 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 (*TagMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Tag entity. If the Tag 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 (*TagMutation) 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 (*TagMutation) OldTitle ¶
func (m *TagMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Tag entity. If the Tag 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 (*TagMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Tag entity. If the Tag 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 (*TagMutation) ProductsCleared ¶
func (m *TagMutation) ProductsCleared() bool
ProductsCleared reports if the "products" edge to the ProductInfo entity was cleared.
func (*TagMutation) ProductsIDs ¶
func (m *TagMutation) ProductsIDs() (ids []string)
ProductsIDs returns the "products" edge IDs in the mutation.
func (*TagMutation) RemoveProductIDs ¶
func (m *TagMutation) RemoveProductIDs(ids ...string)
RemoveProductIDs removes the "products" edge to the ProductInfo entity by IDs.
func (*TagMutation) RemovedEdges ¶
func (m *TagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TagMutation) RemovedIDs ¶
func (m *TagMutation) 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 (*TagMutation) RemovedProductsIDs ¶
func (m *TagMutation) RemovedProductsIDs() (ids []string)
RemovedProducts returns the removed IDs of the "products" edge to the ProductInfo entity.
func (*TagMutation) ResetCreatedAt ¶
func (m *TagMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TagMutation) ResetEdge ¶
func (m *TagMutation) 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 (*TagMutation) ResetField ¶
func (m *TagMutation) 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 (*TagMutation) ResetProducts ¶
func (m *TagMutation) ResetProducts()
ResetProducts resets all changes to the "products" edge.
func (*TagMutation) ResetTitle ¶
func (m *TagMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*TagMutation) ResetUpdatedAt ¶
func (m *TagMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*TagMutation) SetCreatedAt ¶
func (m *TagMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TagMutation) SetField ¶
func (m *TagMutation) 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 (*TagMutation) SetID ¶
func (m *TagMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Tag entities.
func (*TagMutation) SetOp ¶
func (m *TagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TagMutation) SetTitle ¶
func (m *TagMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*TagMutation) SetUpdatedAt ¶
func (m *TagMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*TagMutation) Title ¶
func (m *TagMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (TagMutation) Tx ¶
func (m TagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TagMutation) Type ¶
func (m *TagMutation) Type() string
Type returns the node type of this mutation (Tag).
func (*TagMutation) UpdatedAt ¶
func (m *TagMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*TagMutation) Where ¶
func (m *TagMutation) Where(ps ...predicate.Tag)
Where appends a list predicates to the TagMutation builder.
func (*TagMutation) WhereP ¶
func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TagQuery ¶
type TagQuery struct {
// contains filtered or unexported fields
}
TagQuery is the builder for querying Tag entities.
func (*TagQuery) Aggregate ¶
func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate returns a TagSelect configured with the given aggregations.
func (*TagQuery) Clone ¶
Clone returns a duplicate of the TagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TagQuery) First ¶
First returns the first Tag entity from the query. Returns a *NotFoundError when no Tag was found.
func (*TagQuery) FirstID ¶
FirstID returns the first Tag ID from the query. Returns a *NotFoundError when no Tag ID was found.
func (*TagQuery) GroupBy ¶
func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
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.Tag.Query(). GroupBy(tag.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TagQuery) Only ¶
Only returns a single Tag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tag entity is found. Returns a *NotFoundError when no Tag entities are found.
func (*TagQuery) OnlyID ¶
OnlyID is like Only, but returns the only Tag ID in the query. Returns a *NotSingularError when more than one Tag ID is found. Returns a *NotFoundError when no entities are found.
func (*TagQuery) Order ¶
func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
Order specifies how the records should be ordered.
func (*TagQuery) QueryProductTags ¶
func (tq *TagQuery) QueryProductTags() *ProductTagQuery
QueryProductTags chains the current query on the "product_tags" edge.
func (*TagQuery) QueryProducts ¶
func (tq *TagQuery) QueryProducts() *ProductInfoQuery
QueryProducts chains the current query on the "products" edge.
func (*TagQuery) 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.Tag.Query(). Select(tag.FieldCreatedAt). Scan(ctx, &v)
func (*TagQuery) 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 (*TagQuery) WithProductTags ¶
func (tq *TagQuery) WithProductTags(opts ...func(*ProductTagQuery)) *TagQuery
WithProductTags tells the query-builder to eager-load the nodes that are connected to the "product_tags" edge. The optional arguments are used to configure the query builder of the edge.
func (*TagQuery) WithProducts ¶
func (tq *TagQuery) WithProducts(opts ...func(*ProductInfoQuery)) *TagQuery
WithProducts tells the query-builder to eager-load the nodes that are connected to the "products" edge. The optional arguments are used to configure the query builder of the edge.
type TagSelect ¶
type TagSelect struct { *TagQuery // contains filtered or unexported fields }
TagSelect is the builder for selecting fields of Tag entities.
func (*TagSelect) Aggregate ¶
func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagUpdate ¶
type TagUpdate struct {
// contains filtered or unexported fields
}
TagUpdate is the builder for updating Tag entities.
func (*TagUpdate) AddProductIDs ¶
AddProductIDs adds the "products" edge to the ProductInfo entity by IDs.
func (*TagUpdate) AddProducts ¶
func (tu *TagUpdate) AddProducts(p ...*ProductInfo) *TagUpdate
AddProducts adds the "products" edges to the ProductInfo entity.
func (*TagUpdate) ClearProducts ¶
ClearProducts clears all "products" edges to the ProductInfo entity.
func (*TagUpdate) Mutation ¶
func (tu *TagUpdate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdate) RemoveProductIDs ¶
RemoveProductIDs removes the "products" edge to ProductInfo entities by IDs.
func (*TagUpdate) RemoveProducts ¶
func (tu *TagUpdate) RemoveProducts(p ...*ProductInfo) *TagUpdate
RemoveProducts removes "products" edges to ProductInfo entities.
func (*TagUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*TagUpdate) SetNillableTitle ¶
SetNillableTitle sets the "title" field if the given value is not nil.
func (*TagUpdate) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
type TagUpdateOne ¶
type TagUpdateOne struct {
// contains filtered or unexported fields
}
TagUpdateOne is the builder for updating a single Tag entity.
func (*TagUpdateOne) AddProductIDs ¶
func (tuo *TagUpdateOne) AddProductIDs(ids ...string) *TagUpdateOne
AddProductIDs adds the "products" edge to the ProductInfo entity by IDs.
func (*TagUpdateOne) AddProducts ¶
func (tuo *TagUpdateOne) AddProducts(p ...*ProductInfo) *TagUpdateOne
AddProducts adds the "products" edges to the ProductInfo entity.
func (*TagUpdateOne) ClearProducts ¶
func (tuo *TagUpdateOne) ClearProducts() *TagUpdateOne
ClearProducts clears all "products" edges to the ProductInfo entity.
func (*TagUpdateOne) Exec ¶
func (tuo *TagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TagUpdateOne) ExecX ¶
func (tuo *TagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpdateOne) Mutation ¶
func (tuo *TagUpdateOne) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdateOne) RemoveProductIDs ¶
func (tuo *TagUpdateOne) RemoveProductIDs(ids ...string) *TagUpdateOne
RemoveProductIDs removes the "products" edge to ProductInfo entities by IDs.
func (*TagUpdateOne) RemoveProducts ¶
func (tuo *TagUpdateOne) RemoveProducts(p ...*ProductInfo) *TagUpdateOne
RemoveProducts removes "products" edges to ProductInfo entities.
func (*TagUpdateOne) Save ¶
func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
Save executes the query and returns the updated Tag entity.
func (*TagUpdateOne) SaveX ¶
func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
SaveX is like Save, but panics if an error occurs.
func (*TagUpdateOne) Select ¶
func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TagUpdateOne) SetNillableTitle ¶
func (tuo *TagUpdateOne) SetNillableTitle(s *string) *TagUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*TagUpdateOne) SetTitle ¶
func (tuo *TagUpdateOne) SetTitle(s string) *TagUpdateOne
SetTitle sets the "title" field.
func (*TagUpdateOne) SetUpdatedAt ¶
func (tuo *TagUpdateOne) SetUpdatedAt(t time.Time) *TagUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*TagUpdateOne) Where ¶
func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
Where appends a list predicates to the TagUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Address is the client for interacting with the Address builders. Address *AddressClient // Conversation is the client for interacting with the Conversation builders. Conversation *ConversationClient // Invoice is the client for interacting with the Invoice builders. Invoice *InvoiceClient // InvoiceHistory is the client for interacting with the InvoiceHistory builders. InvoiceHistory *InvoiceHistoryClient // InvoiceStatusCode is the client for interacting with the InvoiceStatusCode builders. InvoiceStatusCode *InvoiceStatusCodeClient // Message is the client for interacting with the Message builders. Message *MessageClient // Order is the client for interacting with the Order builders. Order *OrderClient // OrderHistory is the client for interacting with the OrderHistory builders. OrderHistory *OrderHistoryClient // OrderItem is the client for interacting with the OrderItem builders. OrderItem *OrderItemClient // OrderStatusCode is the client for interacting with the OrderStatusCode builders. OrderStatusCode *OrderStatusCodeClient // Person is the client for interacting with the Person builders. Person *PersonClient // PersonAddress is the client for interacting with the PersonAddress builders. PersonAddress *PersonAddressClient // ProductColor is the client for interacting with the ProductColor builders. ProductColor *ProductColorClient // ProductImage is the client for interacting with the ProductImage builders. ProductImage *ProductImageClient // ProductInfo is the client for interacting with the ProductInfo builders. ProductInfo *ProductInfoClient // ProductQty is the client for interacting with the ProductQty builders. ProductQty *ProductQtyClient // ProductTag is the client for interacting with the ProductTag builders. ProductTag *ProductTagClient // Shipment is the client for interacting with the Shipment builders. Shipment *ShipmentClient // ShipmentHistory is the client for interacting with the ShipmentHistory builders. ShipmentHistory *ShipmentHistoryClient // ShipmentItem is the client for interacting with the ShipmentItem builders. ShipmentItem *ShipmentItemClient // ShipmentStatusCode is the client for interacting with the ShipmentStatusCode builders. ShipmentStatusCode *ShipmentStatusCodeClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // WarehouseAssignment is the client for interacting with the WarehouseAssignment builders. WarehouseAssignment *WarehouseAssignmentClient // WorkUnitInfo is the client for interacting with the WorkUnitInfo builders. WorkUnitInfo *WorkUnitInfoClient // 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.
type WarehouseAssignment ¶
type WarehouseAssignment struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // OrderID holds the value of the "order_id" field. OrderID uuid.UUID `json:"order_id,omitempty"` // WorkUnitID holds the value of the "work_unit_id" field. WorkUnitID uuid.UUID `json:"work_unit_id,omitempty"` // StaffID holds the value of the "staff_id" field. StaffID *uuid.UUID `json:"staff_id,omitempty"` // Status holds the value of the "status" field. Status *warehouseassignment.Status `json:"status,omitempty"` // Note holds the value of the "note" field. Note *string `json:"note,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the WarehouseAssignmentQuery when eager-loading is set. Edges WarehouseAssignmentEdges `json:"edges"` // contains filtered or unexported fields }
WarehouseAssignment is the model entity for the WarehouseAssignment schema.
func (*WarehouseAssignment) QueryOrder ¶
func (wa *WarehouseAssignment) QueryOrder() *OrderQuery
QueryOrder queries the "order" edge of the WarehouseAssignment entity.
func (*WarehouseAssignment) QueryStaff ¶
func (wa *WarehouseAssignment) QueryStaff() *PersonQuery
QueryStaff queries the "staff" edge of the WarehouseAssignment entity.
func (*WarehouseAssignment) QueryWorkUnit ¶
func (wa *WarehouseAssignment) QueryWorkUnit() *WorkUnitInfoQuery
QueryWorkUnit queries the "work_unit" edge of the WarehouseAssignment entity.
func (*WarehouseAssignment) String ¶
func (wa *WarehouseAssignment) String() string
String implements the fmt.Stringer.
func (*WarehouseAssignment) Unwrap ¶
func (wa *WarehouseAssignment) Unwrap() *WarehouseAssignment
Unwrap unwraps the WarehouseAssignment 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 (*WarehouseAssignment) Update ¶
func (wa *WarehouseAssignment) Update() *WarehouseAssignmentUpdateOne
Update returns a builder for updating this WarehouseAssignment. Note that you need to call WarehouseAssignment.Unwrap() before calling this method if this WarehouseAssignment was returned from a transaction, and the transaction was committed or rolled back.
type WarehouseAssignmentClient ¶
type WarehouseAssignmentClient struct {
// contains filtered or unexported fields
}
WarehouseAssignmentClient is a client for the WarehouseAssignment schema.
func NewWarehouseAssignmentClient ¶
func NewWarehouseAssignmentClient(c config) *WarehouseAssignmentClient
NewWarehouseAssignmentClient returns a client for the WarehouseAssignment from the given config.
func (*WarehouseAssignmentClient) Create ¶
func (c *WarehouseAssignmentClient) Create() *WarehouseAssignmentCreate
Create returns a builder for creating a WarehouseAssignment entity.
func (*WarehouseAssignmentClient) CreateBulk ¶
func (c *WarehouseAssignmentClient) CreateBulk(builders ...*WarehouseAssignmentCreate) *WarehouseAssignmentCreateBulk
CreateBulk returns a builder for creating a bulk of WarehouseAssignment entities.
func (*WarehouseAssignmentClient) Delete ¶
func (c *WarehouseAssignmentClient) Delete() *WarehouseAssignmentDelete
Delete returns a delete builder for WarehouseAssignment.
func (*WarehouseAssignmentClient) DeleteOne ¶
func (c *WarehouseAssignmentClient) DeleteOne(wa *WarehouseAssignment) *WarehouseAssignmentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WarehouseAssignmentClient) DeleteOneID ¶
func (c *WarehouseAssignmentClient) DeleteOneID(id uuid.UUID) *WarehouseAssignmentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*WarehouseAssignmentClient) Get ¶
func (c *WarehouseAssignmentClient) Get(ctx context.Context, id uuid.UUID) (*WarehouseAssignment, error)
Get returns a WarehouseAssignment entity by its id.
func (*WarehouseAssignmentClient) GetX ¶
func (c *WarehouseAssignmentClient) GetX(ctx context.Context, id uuid.UUID) *WarehouseAssignment
GetX is like Get, but panics if an error occurs.
func (*WarehouseAssignmentClient) Hooks ¶
func (c *WarehouseAssignmentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WarehouseAssignmentClient) Intercept ¶
func (c *WarehouseAssignmentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `warehouseassignment.Intercept(f(g(h())))`.
func (*WarehouseAssignmentClient) Interceptors ¶
func (c *WarehouseAssignmentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*WarehouseAssignmentClient) MapCreateBulk ¶
func (c *WarehouseAssignmentClient) MapCreateBulk(slice any, setFunc func(*WarehouseAssignmentCreate, int)) *WarehouseAssignmentCreateBulk
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 (*WarehouseAssignmentClient) Query ¶
func (c *WarehouseAssignmentClient) Query() *WarehouseAssignmentQuery
Query returns a query builder for WarehouseAssignment.
func (*WarehouseAssignmentClient) QueryOrder ¶
func (c *WarehouseAssignmentClient) QueryOrder(wa *WarehouseAssignment) *OrderQuery
QueryOrder queries the order edge of a WarehouseAssignment.
func (*WarehouseAssignmentClient) QueryStaff ¶
func (c *WarehouseAssignmentClient) QueryStaff(wa *WarehouseAssignment) *PersonQuery
QueryStaff queries the staff edge of a WarehouseAssignment.
func (*WarehouseAssignmentClient) QueryWorkUnit ¶
func (c *WarehouseAssignmentClient) QueryWorkUnit(wa *WarehouseAssignment) *WorkUnitInfoQuery
QueryWorkUnit queries the work_unit edge of a WarehouseAssignment.
func (*WarehouseAssignmentClient) Update ¶
func (c *WarehouseAssignmentClient) Update() *WarehouseAssignmentUpdate
Update returns an update builder for WarehouseAssignment.
func (*WarehouseAssignmentClient) UpdateOne ¶
func (c *WarehouseAssignmentClient) UpdateOne(wa *WarehouseAssignment) *WarehouseAssignmentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WarehouseAssignmentClient) UpdateOneID ¶
func (c *WarehouseAssignmentClient) UpdateOneID(id uuid.UUID) *WarehouseAssignmentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WarehouseAssignmentClient) Use ¶
func (c *WarehouseAssignmentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `warehouseassignment.Hooks(f(g(h())))`.
type WarehouseAssignmentCreate ¶
type WarehouseAssignmentCreate struct {
// contains filtered or unexported fields
}
WarehouseAssignmentCreate is the builder for creating a WarehouseAssignment entity.
func (*WarehouseAssignmentCreate) Exec ¶
func (wac *WarehouseAssignmentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WarehouseAssignmentCreate) ExecX ¶
func (wac *WarehouseAssignmentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WarehouseAssignmentCreate) Mutation ¶
func (wac *WarehouseAssignmentCreate) Mutation() *WarehouseAssignmentMutation
Mutation returns the WarehouseAssignmentMutation object of the builder.
func (*WarehouseAssignmentCreate) Save ¶
func (wac *WarehouseAssignmentCreate) Save(ctx context.Context) (*WarehouseAssignment, error)
Save creates the WarehouseAssignment in the database.
func (*WarehouseAssignmentCreate) SaveX ¶
func (wac *WarehouseAssignmentCreate) SaveX(ctx context.Context) *WarehouseAssignment
SaveX calls Save and panics if Save returns an error.
func (*WarehouseAssignmentCreate) SetCreatedAt ¶
func (wac *WarehouseAssignmentCreate) SetCreatedAt(t time.Time) *WarehouseAssignmentCreate
SetCreatedAt sets the "created_at" field.
func (*WarehouseAssignmentCreate) SetID ¶
func (wac *WarehouseAssignmentCreate) SetID(u uuid.UUID) *WarehouseAssignmentCreate
SetID sets the "id" field.
func (*WarehouseAssignmentCreate) SetNillableCreatedAt ¶
func (wac *WarehouseAssignmentCreate) SetNillableCreatedAt(t *time.Time) *WarehouseAssignmentCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*WarehouseAssignmentCreate) SetNillableID ¶
func (wac *WarehouseAssignmentCreate) SetNillableID(u *uuid.UUID) *WarehouseAssignmentCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*WarehouseAssignmentCreate) SetNillableNote ¶
func (wac *WarehouseAssignmentCreate) SetNillableNote(s *string) *WarehouseAssignmentCreate
SetNillableNote sets the "note" field if the given value is not nil.
func (*WarehouseAssignmentCreate) SetNillableStaffID ¶
func (wac *WarehouseAssignmentCreate) SetNillableStaffID(u *uuid.UUID) *WarehouseAssignmentCreate
SetNillableStaffID sets the "staff_id" field if the given value is not nil.
func (*WarehouseAssignmentCreate) SetNillableStatus ¶
func (wac *WarehouseAssignmentCreate) SetNillableStatus(w *warehouseassignment.Status) *WarehouseAssignmentCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*WarehouseAssignmentCreate) SetNillableUpdatedAt ¶
func (wac *WarehouseAssignmentCreate) SetNillableUpdatedAt(t *time.Time) *WarehouseAssignmentCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*WarehouseAssignmentCreate) SetNote ¶
func (wac *WarehouseAssignmentCreate) SetNote(s string) *WarehouseAssignmentCreate
SetNote sets the "note" field.
func (*WarehouseAssignmentCreate) SetOrder ¶
func (wac *WarehouseAssignmentCreate) SetOrder(o *Order) *WarehouseAssignmentCreate
SetOrder sets the "order" edge to the Order entity.
func (*WarehouseAssignmentCreate) SetOrderID ¶
func (wac *WarehouseAssignmentCreate) SetOrderID(u uuid.UUID) *WarehouseAssignmentCreate
SetOrderID sets the "order_id" field.
func (*WarehouseAssignmentCreate) SetStaff ¶
func (wac *WarehouseAssignmentCreate) SetStaff(p *Person) *WarehouseAssignmentCreate
SetStaff sets the "staff" edge to the Person entity.
func (*WarehouseAssignmentCreate) SetStaffID ¶
func (wac *WarehouseAssignmentCreate) SetStaffID(u uuid.UUID) *WarehouseAssignmentCreate
SetStaffID sets the "staff_id" field.
func (*WarehouseAssignmentCreate) SetStatus ¶
func (wac *WarehouseAssignmentCreate) SetStatus(w warehouseassignment.Status) *WarehouseAssignmentCreate
SetStatus sets the "status" field.
func (*WarehouseAssignmentCreate) SetUpdatedAt ¶
func (wac *WarehouseAssignmentCreate) SetUpdatedAt(t time.Time) *WarehouseAssignmentCreate
SetUpdatedAt sets the "updated_at" field.
func (*WarehouseAssignmentCreate) SetWorkUnit ¶
func (wac *WarehouseAssignmentCreate) SetWorkUnit(w *WorkUnitInfo) *WarehouseAssignmentCreate
SetWorkUnit sets the "work_unit" edge to the WorkUnitInfo entity.
func (*WarehouseAssignmentCreate) SetWorkUnitID ¶
func (wac *WarehouseAssignmentCreate) SetWorkUnitID(u uuid.UUID) *WarehouseAssignmentCreate
SetWorkUnitID sets the "work_unit_id" field.
type WarehouseAssignmentCreateBulk ¶
type WarehouseAssignmentCreateBulk struct {
// contains filtered or unexported fields
}
WarehouseAssignmentCreateBulk is the builder for creating many WarehouseAssignment entities in bulk.
func (*WarehouseAssignmentCreateBulk) Exec ¶
func (wacb *WarehouseAssignmentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WarehouseAssignmentCreateBulk) ExecX ¶
func (wacb *WarehouseAssignmentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WarehouseAssignmentCreateBulk) Save ¶
func (wacb *WarehouseAssignmentCreateBulk) Save(ctx context.Context) ([]*WarehouseAssignment, error)
Save creates the WarehouseAssignment entities in the database.
func (*WarehouseAssignmentCreateBulk) SaveX ¶
func (wacb *WarehouseAssignmentCreateBulk) SaveX(ctx context.Context) []*WarehouseAssignment
SaveX is like Save, but panics if an error occurs.
type WarehouseAssignmentDelete ¶
type WarehouseAssignmentDelete struct {
// contains filtered or unexported fields
}
WarehouseAssignmentDelete is the builder for deleting a WarehouseAssignment entity.
func (*WarehouseAssignmentDelete) Exec ¶
func (wad *WarehouseAssignmentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WarehouseAssignmentDelete) ExecX ¶
func (wad *WarehouseAssignmentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WarehouseAssignmentDelete) Where ¶
func (wad *WarehouseAssignmentDelete) Where(ps ...predicate.WarehouseAssignment) *WarehouseAssignmentDelete
Where appends a list predicates to the WarehouseAssignmentDelete builder.
type WarehouseAssignmentDeleteOne ¶
type WarehouseAssignmentDeleteOne struct {
// contains filtered or unexported fields
}
WarehouseAssignmentDeleteOne is the builder for deleting a single WarehouseAssignment entity.
func (*WarehouseAssignmentDeleteOne) Exec ¶
func (wado *WarehouseAssignmentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WarehouseAssignmentDeleteOne) ExecX ¶
func (wado *WarehouseAssignmentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WarehouseAssignmentDeleteOne) Where ¶
func (wado *WarehouseAssignmentDeleteOne) Where(ps ...predicate.WarehouseAssignment) *WarehouseAssignmentDeleteOne
Where appends a list predicates to the WarehouseAssignmentDelete builder.
type WarehouseAssignmentEdges ¶
type WarehouseAssignmentEdges struct { // Order holds the value of the order edge. Order *Order `json:"order,omitempty"` // WorkUnit holds the value of the work_unit edge. WorkUnit *WorkUnitInfo `json:"work_unit,omitempty"` // Staff holds the value of the staff edge. Staff *Person `json:"staff,omitempty"` // contains filtered or unexported fields }
WarehouseAssignmentEdges holds the relations/edges for other nodes in the graph.
func (WarehouseAssignmentEdges) OrderOrErr ¶
func (e WarehouseAssignmentEdges) OrderOrErr() (*Order, error)
OrderOrErr returns the Order value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (WarehouseAssignmentEdges) StaffOrErr ¶
func (e WarehouseAssignmentEdges) StaffOrErr() (*Person, error)
StaffOrErr returns the Staff value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (WarehouseAssignmentEdges) WorkUnitOrErr ¶
func (e WarehouseAssignmentEdges) WorkUnitOrErr() (*WorkUnitInfo, error)
WorkUnitOrErr returns the WorkUnit value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type WarehouseAssignmentGroupBy ¶
type WarehouseAssignmentGroupBy struct {
// contains filtered or unexported fields
}
WarehouseAssignmentGroupBy is the group-by builder for WarehouseAssignment entities.
func (*WarehouseAssignmentGroupBy) Aggregate ¶
func (wagb *WarehouseAssignmentGroupBy) Aggregate(fns ...AggregateFunc) *WarehouseAssignmentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WarehouseAssignmentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WarehouseAssignmentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WarehouseAssignmentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WarehouseAssignmentGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*WarehouseAssignmentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WarehouseAssignmentGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*WarehouseAssignmentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WarehouseAssignmentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WarehouseAssignmentGroupBy) Scan ¶
func (wagb *WarehouseAssignmentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WarehouseAssignmentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WarehouseAssignmentMutation ¶
type WarehouseAssignmentMutation struct {
// contains filtered or unexported fields
}
WarehouseAssignmentMutation represents an operation that mutates the WarehouseAssignment nodes in the graph.
func (*WarehouseAssignmentMutation) AddField ¶
func (m *WarehouseAssignmentMutation) 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 (*WarehouseAssignmentMutation) AddedEdges ¶
func (m *WarehouseAssignmentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WarehouseAssignmentMutation) AddedField ¶
func (m *WarehouseAssignmentMutation) 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 (*WarehouseAssignmentMutation) AddedFields ¶
func (m *WarehouseAssignmentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WarehouseAssignmentMutation) AddedIDs ¶
func (m *WarehouseAssignmentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WarehouseAssignmentMutation) ClearEdge ¶
func (m *WarehouseAssignmentMutation) 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 (*WarehouseAssignmentMutation) ClearField ¶
func (m *WarehouseAssignmentMutation) 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 (*WarehouseAssignmentMutation) ClearNote ¶
func (m *WarehouseAssignmentMutation) ClearNote()
ClearNote clears the value of the "note" field.
func (*WarehouseAssignmentMutation) ClearOrder ¶
func (m *WarehouseAssignmentMutation) ClearOrder()
ClearOrder clears the "order" edge to the Order entity.
func (*WarehouseAssignmentMutation) ClearStaff ¶
func (m *WarehouseAssignmentMutation) ClearStaff()
ClearStaff clears the "staff" edge to the Person entity.
func (*WarehouseAssignmentMutation) ClearStaffID ¶
func (m *WarehouseAssignmentMutation) ClearStaffID()
ClearStaffID clears the value of the "staff_id" field.
func (*WarehouseAssignmentMutation) ClearWorkUnit ¶
func (m *WarehouseAssignmentMutation) ClearWorkUnit()
ClearWorkUnit clears the "work_unit" edge to the WorkUnitInfo entity.
func (*WarehouseAssignmentMutation) ClearedEdges ¶
func (m *WarehouseAssignmentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WarehouseAssignmentMutation) ClearedFields ¶
func (m *WarehouseAssignmentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WarehouseAssignmentMutation) Client ¶
func (m WarehouseAssignmentMutation) 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 (*WarehouseAssignmentMutation) CreatedAt ¶
func (m *WarehouseAssignmentMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*WarehouseAssignmentMutation) EdgeCleared ¶
func (m *WarehouseAssignmentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WarehouseAssignmentMutation) Field ¶
func (m *WarehouseAssignmentMutation) 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 (*WarehouseAssignmentMutation) FieldCleared ¶
func (m *WarehouseAssignmentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WarehouseAssignmentMutation) Fields ¶
func (m *WarehouseAssignmentMutation) 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 (*WarehouseAssignmentMutation) ID ¶
func (m *WarehouseAssignmentMutation) ID() (id uuid.UUID, 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 (*WarehouseAssignmentMutation) IDs ¶
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 (*WarehouseAssignmentMutation) Note ¶
func (m *WarehouseAssignmentMutation) Note() (r string, exists bool)
Note returns the value of the "note" field in the mutation.
func (*WarehouseAssignmentMutation) NoteCleared ¶
func (m *WarehouseAssignmentMutation) NoteCleared() bool
NoteCleared returns if the "note" field was cleared in this mutation.
func (*WarehouseAssignmentMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the WarehouseAssignment entity. If the WarehouseAssignment 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 (*WarehouseAssignmentMutation) 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 (*WarehouseAssignmentMutation) OldNote ¶
func (m *WarehouseAssignmentMutation) OldNote(ctx context.Context) (v *string, err error)
OldNote returns the old "note" field's value of the WarehouseAssignment entity. If the WarehouseAssignment 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 (*WarehouseAssignmentMutation) OldOrderID ¶
OldOrderID returns the old "order_id" field's value of the WarehouseAssignment entity. If the WarehouseAssignment 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 (*WarehouseAssignmentMutation) OldStaffID ¶
OldStaffID returns the old "staff_id" field's value of the WarehouseAssignment entity. If the WarehouseAssignment 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 (*WarehouseAssignmentMutation) OldStatus ¶
func (m *WarehouseAssignmentMutation) OldStatus(ctx context.Context) (v *warehouseassignment.Status, err error)
OldStatus returns the old "status" field's value of the WarehouseAssignment entity. If the WarehouseAssignment 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 (*WarehouseAssignmentMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the WarehouseAssignment entity. If the WarehouseAssignment 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 (*WarehouseAssignmentMutation) OldWorkUnitID ¶
OldWorkUnitID returns the old "work_unit_id" field's value of the WarehouseAssignment entity. If the WarehouseAssignment 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 (*WarehouseAssignmentMutation) Op ¶
func (m *WarehouseAssignmentMutation) Op() Op
Op returns the operation name.
func (*WarehouseAssignmentMutation) OrderCleared ¶
func (m *WarehouseAssignmentMutation) OrderCleared() bool
OrderCleared reports if the "order" edge to the Order entity was cleared.
func (*WarehouseAssignmentMutation) OrderID ¶
func (m *WarehouseAssignmentMutation) OrderID() (r uuid.UUID, exists bool)
OrderID returns the value of the "order_id" field in the mutation.
func (*WarehouseAssignmentMutation) OrderIDs ¶
func (m *WarehouseAssignmentMutation) OrderIDs() (ids []uuid.UUID)
OrderIDs returns the "order" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OrderID instead. It exists only for internal usage by the builders.
func (*WarehouseAssignmentMutation) RemovedEdges ¶
func (m *WarehouseAssignmentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WarehouseAssignmentMutation) RemovedIDs ¶
func (m *WarehouseAssignmentMutation) 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 (*WarehouseAssignmentMutation) ResetCreatedAt ¶
func (m *WarehouseAssignmentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*WarehouseAssignmentMutation) ResetEdge ¶
func (m *WarehouseAssignmentMutation) 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 (*WarehouseAssignmentMutation) ResetField ¶
func (m *WarehouseAssignmentMutation) 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 (*WarehouseAssignmentMutation) ResetNote ¶
func (m *WarehouseAssignmentMutation) ResetNote()
ResetNote resets all changes to the "note" field.
func (*WarehouseAssignmentMutation) ResetOrder ¶
func (m *WarehouseAssignmentMutation) ResetOrder()
ResetOrder resets all changes to the "order" edge.
func (*WarehouseAssignmentMutation) ResetOrderID ¶
func (m *WarehouseAssignmentMutation) ResetOrderID()
ResetOrderID resets all changes to the "order_id" field.
func (*WarehouseAssignmentMutation) ResetStaff ¶
func (m *WarehouseAssignmentMutation) ResetStaff()
ResetStaff resets all changes to the "staff" edge.
func (*WarehouseAssignmentMutation) ResetStaffID ¶
func (m *WarehouseAssignmentMutation) ResetStaffID()
ResetStaffID resets all changes to the "staff_id" field.
func (*WarehouseAssignmentMutation) ResetStatus ¶
func (m *WarehouseAssignmentMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*WarehouseAssignmentMutation) ResetUpdatedAt ¶
func (m *WarehouseAssignmentMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*WarehouseAssignmentMutation) ResetWorkUnit ¶
func (m *WarehouseAssignmentMutation) ResetWorkUnit()
ResetWorkUnit resets all changes to the "work_unit" edge.
func (*WarehouseAssignmentMutation) ResetWorkUnitID ¶
func (m *WarehouseAssignmentMutation) ResetWorkUnitID()
ResetWorkUnitID resets all changes to the "work_unit_id" field.
func (*WarehouseAssignmentMutation) SetCreatedAt ¶
func (m *WarehouseAssignmentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*WarehouseAssignmentMutation) SetField ¶
func (m *WarehouseAssignmentMutation) 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 (*WarehouseAssignmentMutation) SetID ¶
func (m *WarehouseAssignmentMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of WarehouseAssignment entities.
func (*WarehouseAssignmentMutation) SetNote ¶
func (m *WarehouseAssignmentMutation) SetNote(s string)
SetNote sets the "note" field.
func (*WarehouseAssignmentMutation) SetOp ¶
func (m *WarehouseAssignmentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*WarehouseAssignmentMutation) SetOrderID ¶
func (m *WarehouseAssignmentMutation) SetOrderID(u uuid.UUID)
SetOrderID sets the "order_id" field.
func (*WarehouseAssignmentMutation) SetStaffID ¶
func (m *WarehouseAssignmentMutation) SetStaffID(u uuid.UUID)
SetStaffID sets the "staff_id" field.
func (*WarehouseAssignmentMutation) SetStatus ¶
func (m *WarehouseAssignmentMutation) SetStatus(w warehouseassignment.Status)
SetStatus sets the "status" field.
func (*WarehouseAssignmentMutation) SetUpdatedAt ¶
func (m *WarehouseAssignmentMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*WarehouseAssignmentMutation) SetWorkUnitID ¶
func (m *WarehouseAssignmentMutation) SetWorkUnitID(u uuid.UUID)
SetWorkUnitID sets the "work_unit_id" field.
func (*WarehouseAssignmentMutation) StaffCleared ¶
func (m *WarehouseAssignmentMutation) StaffCleared() bool
StaffCleared reports if the "staff" edge to the Person entity was cleared.
func (*WarehouseAssignmentMutation) StaffID ¶
func (m *WarehouseAssignmentMutation) StaffID() (r uuid.UUID, exists bool)
StaffID returns the value of the "staff_id" field in the mutation.
func (*WarehouseAssignmentMutation) StaffIDCleared ¶
func (m *WarehouseAssignmentMutation) StaffIDCleared() bool
StaffIDCleared returns if the "staff_id" field was cleared in this mutation.
func (*WarehouseAssignmentMutation) StaffIDs ¶
func (m *WarehouseAssignmentMutation) StaffIDs() (ids []uuid.UUID)
StaffIDs returns the "staff" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StaffID instead. It exists only for internal usage by the builders.
func (*WarehouseAssignmentMutation) Status ¶
func (m *WarehouseAssignmentMutation) Status() (r warehouseassignment.Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (WarehouseAssignmentMutation) Tx ¶
func (m WarehouseAssignmentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WarehouseAssignmentMutation) Type ¶
func (m *WarehouseAssignmentMutation) Type() string
Type returns the node type of this mutation (WarehouseAssignment).
func (*WarehouseAssignmentMutation) UpdatedAt ¶
func (m *WarehouseAssignmentMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*WarehouseAssignmentMutation) Where ¶
func (m *WarehouseAssignmentMutation) Where(ps ...predicate.WarehouseAssignment)
Where appends a list predicates to the WarehouseAssignmentMutation builder.
func (*WarehouseAssignmentMutation) WhereP ¶
func (m *WarehouseAssignmentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the WarehouseAssignmentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
func (*WarehouseAssignmentMutation) WorkUnitCleared ¶
func (m *WarehouseAssignmentMutation) WorkUnitCleared() bool
WorkUnitCleared reports if the "work_unit" edge to the WorkUnitInfo entity was cleared.
func (*WarehouseAssignmentMutation) WorkUnitID ¶
func (m *WarehouseAssignmentMutation) WorkUnitID() (r uuid.UUID, exists bool)
WorkUnitID returns the value of the "work_unit_id" field in the mutation.
func (*WarehouseAssignmentMutation) WorkUnitIDs ¶
func (m *WarehouseAssignmentMutation) WorkUnitIDs() (ids []uuid.UUID)
WorkUnitIDs returns the "work_unit" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use WorkUnitID instead. It exists only for internal usage by the builders.
type WarehouseAssignmentQuery ¶
type WarehouseAssignmentQuery struct {
// contains filtered or unexported fields
}
WarehouseAssignmentQuery is the builder for querying WarehouseAssignment entities.
func (*WarehouseAssignmentQuery) Aggregate ¶
func (waq *WarehouseAssignmentQuery) Aggregate(fns ...AggregateFunc) *WarehouseAssignmentSelect
Aggregate returns a WarehouseAssignmentSelect configured with the given aggregations.
func (*WarehouseAssignmentQuery) All ¶
func (waq *WarehouseAssignmentQuery) All(ctx context.Context) ([]*WarehouseAssignment, error)
All executes the query and returns a list of WarehouseAssignments.
func (*WarehouseAssignmentQuery) AllX ¶
func (waq *WarehouseAssignmentQuery) AllX(ctx context.Context) []*WarehouseAssignment
AllX is like All, but panics if an error occurs.
func (*WarehouseAssignmentQuery) Clone ¶
func (waq *WarehouseAssignmentQuery) Clone() *WarehouseAssignmentQuery
Clone returns a duplicate of the WarehouseAssignmentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WarehouseAssignmentQuery) Count ¶
func (waq *WarehouseAssignmentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WarehouseAssignmentQuery) CountX ¶
func (waq *WarehouseAssignmentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WarehouseAssignmentQuery) Exist ¶
func (waq *WarehouseAssignmentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WarehouseAssignmentQuery) ExistX ¶
func (waq *WarehouseAssignmentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WarehouseAssignmentQuery) First ¶
func (waq *WarehouseAssignmentQuery) First(ctx context.Context) (*WarehouseAssignment, error)
First returns the first WarehouseAssignment entity from the query. Returns a *NotFoundError when no WarehouseAssignment was found.
func (*WarehouseAssignmentQuery) FirstID ¶
FirstID returns the first WarehouseAssignment ID from the query. Returns a *NotFoundError when no WarehouseAssignment ID was found.
func (*WarehouseAssignmentQuery) FirstIDX ¶
func (waq *WarehouseAssignmentQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*WarehouseAssignmentQuery) FirstX ¶
func (waq *WarehouseAssignmentQuery) FirstX(ctx context.Context) *WarehouseAssignment
FirstX is like First, but panics if an error occurs.
func (*WarehouseAssignmentQuery) GroupBy ¶
func (waq *WarehouseAssignmentQuery) GroupBy(field string, fields ...string) *WarehouseAssignmentGroupBy
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.WarehouseAssignment.Query(). GroupBy(warehouseassignment.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*WarehouseAssignmentQuery) IDs ¶
IDs executes the query and returns a list of WarehouseAssignment IDs.
func (*WarehouseAssignmentQuery) IDsX ¶
func (waq *WarehouseAssignmentQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*WarehouseAssignmentQuery) Limit ¶
func (waq *WarehouseAssignmentQuery) Limit(limit int) *WarehouseAssignmentQuery
Limit the number of records to be returned by this query.
func (*WarehouseAssignmentQuery) Offset ¶
func (waq *WarehouseAssignmentQuery) Offset(offset int) *WarehouseAssignmentQuery
Offset to start from.
func (*WarehouseAssignmentQuery) Only ¶
func (waq *WarehouseAssignmentQuery) Only(ctx context.Context) (*WarehouseAssignment, error)
Only returns a single WarehouseAssignment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WarehouseAssignment entity is found. Returns a *NotFoundError when no WarehouseAssignment entities are found.
func (*WarehouseAssignmentQuery) OnlyID ¶
OnlyID is like Only, but returns the only WarehouseAssignment ID in the query. Returns a *NotSingularError when more than one WarehouseAssignment ID is found. Returns a *NotFoundError when no entities are found.
func (*WarehouseAssignmentQuery) OnlyIDX ¶
func (waq *WarehouseAssignmentQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WarehouseAssignmentQuery) OnlyX ¶
func (waq *WarehouseAssignmentQuery) OnlyX(ctx context.Context) *WarehouseAssignment
OnlyX is like Only, but panics if an error occurs.
func (*WarehouseAssignmentQuery) Order ¶
func (waq *WarehouseAssignmentQuery) Order(o ...warehouseassignment.OrderOption) *WarehouseAssignmentQuery
Order specifies how the records should be ordered.
func (*WarehouseAssignmentQuery) QueryOrder ¶
func (waq *WarehouseAssignmentQuery) QueryOrder() *OrderQuery
QueryOrder chains the current query on the "order" edge.
func (*WarehouseAssignmentQuery) QueryStaff ¶
func (waq *WarehouseAssignmentQuery) QueryStaff() *PersonQuery
QueryStaff chains the current query on the "staff" edge.
func (*WarehouseAssignmentQuery) QueryWorkUnit ¶
func (waq *WarehouseAssignmentQuery) QueryWorkUnit() *WorkUnitInfoQuery
QueryWorkUnit chains the current query on the "work_unit" edge.
func (*WarehouseAssignmentQuery) Select ¶
func (waq *WarehouseAssignmentQuery) Select(fields ...string) *WarehouseAssignmentSelect
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.WarehouseAssignment.Query(). Select(warehouseassignment.FieldCreatedAt). Scan(ctx, &v)
func (*WarehouseAssignmentQuery) Unique ¶
func (waq *WarehouseAssignmentQuery) Unique(unique bool) *WarehouseAssignmentQuery
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 (*WarehouseAssignmentQuery) Where ¶
func (waq *WarehouseAssignmentQuery) Where(ps ...predicate.WarehouseAssignment) *WarehouseAssignmentQuery
Where adds a new predicate for the WarehouseAssignmentQuery builder.
func (*WarehouseAssignmentQuery) WithOrder ¶
func (waq *WarehouseAssignmentQuery) WithOrder(opts ...func(*OrderQuery)) *WarehouseAssignmentQuery
WithOrder tells the query-builder to eager-load the nodes that are connected to the "order" edge. The optional arguments are used to configure the query builder of the edge.
func (*WarehouseAssignmentQuery) WithStaff ¶
func (waq *WarehouseAssignmentQuery) WithStaff(opts ...func(*PersonQuery)) *WarehouseAssignmentQuery
WithStaff tells the query-builder to eager-load the nodes that are connected to the "staff" edge. The optional arguments are used to configure the query builder of the edge.
func (*WarehouseAssignmentQuery) WithWorkUnit ¶
func (waq *WarehouseAssignmentQuery) WithWorkUnit(opts ...func(*WorkUnitInfoQuery)) *WarehouseAssignmentQuery
WithWorkUnit tells the query-builder to eager-load the nodes that are connected to the "work_unit" edge. The optional arguments are used to configure the query builder of the edge.
type WarehouseAssignmentSelect ¶
type WarehouseAssignmentSelect struct { *WarehouseAssignmentQuery // contains filtered or unexported fields }
WarehouseAssignmentSelect is the builder for selecting fields of WarehouseAssignment entities.
func (*WarehouseAssignmentSelect) Aggregate ¶
func (was *WarehouseAssignmentSelect) Aggregate(fns ...AggregateFunc) *WarehouseAssignmentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*WarehouseAssignmentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WarehouseAssignmentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WarehouseAssignmentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WarehouseAssignmentSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*WarehouseAssignmentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WarehouseAssignmentSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*WarehouseAssignmentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WarehouseAssignmentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WarehouseAssignmentSelect) Scan ¶
func (was *WarehouseAssignmentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WarehouseAssignmentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WarehouseAssignmentUpdate ¶
type WarehouseAssignmentUpdate struct {
// contains filtered or unexported fields
}
WarehouseAssignmentUpdate is the builder for updating WarehouseAssignment entities.
func (*WarehouseAssignmentUpdate) ClearNote ¶
func (wau *WarehouseAssignmentUpdate) ClearNote() *WarehouseAssignmentUpdate
ClearNote clears the value of the "note" field.
func (*WarehouseAssignmentUpdate) ClearStaff ¶
func (wau *WarehouseAssignmentUpdate) ClearStaff() *WarehouseAssignmentUpdate
ClearStaff clears the "staff" edge to the Person entity.
func (*WarehouseAssignmentUpdate) ClearStaffID ¶
func (wau *WarehouseAssignmentUpdate) ClearStaffID() *WarehouseAssignmentUpdate
ClearStaffID clears the value of the "staff_id" field.
func (*WarehouseAssignmentUpdate) Exec ¶
func (wau *WarehouseAssignmentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WarehouseAssignmentUpdate) ExecX ¶
func (wau *WarehouseAssignmentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WarehouseAssignmentUpdate) Mutation ¶
func (wau *WarehouseAssignmentUpdate) Mutation() *WarehouseAssignmentMutation
Mutation returns the WarehouseAssignmentMutation object of the builder.
func (*WarehouseAssignmentUpdate) Save ¶
func (wau *WarehouseAssignmentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WarehouseAssignmentUpdate) SaveX ¶
func (wau *WarehouseAssignmentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WarehouseAssignmentUpdate) SetNillableNote ¶
func (wau *WarehouseAssignmentUpdate) SetNillableNote(s *string) *WarehouseAssignmentUpdate
SetNillableNote sets the "note" field if the given value is not nil.
func (*WarehouseAssignmentUpdate) SetNillableStaffID ¶
func (wau *WarehouseAssignmentUpdate) SetNillableStaffID(u *uuid.UUID) *WarehouseAssignmentUpdate
SetNillableStaffID sets the "staff_id" field if the given value is not nil.
func (*WarehouseAssignmentUpdate) SetNillableStatus ¶
func (wau *WarehouseAssignmentUpdate) SetNillableStatus(w *warehouseassignment.Status) *WarehouseAssignmentUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*WarehouseAssignmentUpdate) SetNote ¶
func (wau *WarehouseAssignmentUpdate) SetNote(s string) *WarehouseAssignmentUpdate
SetNote sets the "note" field.
func (*WarehouseAssignmentUpdate) SetStaff ¶
func (wau *WarehouseAssignmentUpdate) SetStaff(p *Person) *WarehouseAssignmentUpdate
SetStaff sets the "staff" edge to the Person entity.
func (*WarehouseAssignmentUpdate) SetStaffID ¶
func (wau *WarehouseAssignmentUpdate) SetStaffID(u uuid.UUID) *WarehouseAssignmentUpdate
SetStaffID sets the "staff_id" field.
func (*WarehouseAssignmentUpdate) SetStatus ¶
func (wau *WarehouseAssignmentUpdate) SetStatus(w warehouseassignment.Status) *WarehouseAssignmentUpdate
SetStatus sets the "status" field.
func (*WarehouseAssignmentUpdate) SetUpdatedAt ¶
func (wau *WarehouseAssignmentUpdate) SetUpdatedAt(t time.Time) *WarehouseAssignmentUpdate
SetUpdatedAt sets the "updated_at" field.
func (*WarehouseAssignmentUpdate) Where ¶
func (wau *WarehouseAssignmentUpdate) Where(ps ...predicate.WarehouseAssignment) *WarehouseAssignmentUpdate
Where appends a list predicates to the WarehouseAssignmentUpdate builder.
type WarehouseAssignmentUpdateOne ¶
type WarehouseAssignmentUpdateOne struct {
// contains filtered or unexported fields
}
WarehouseAssignmentUpdateOne is the builder for updating a single WarehouseAssignment entity.
func (*WarehouseAssignmentUpdateOne) ClearNote ¶
func (wauo *WarehouseAssignmentUpdateOne) ClearNote() *WarehouseAssignmentUpdateOne
ClearNote clears the value of the "note" field.
func (*WarehouseAssignmentUpdateOne) ClearStaff ¶
func (wauo *WarehouseAssignmentUpdateOne) ClearStaff() *WarehouseAssignmentUpdateOne
ClearStaff clears the "staff" edge to the Person entity.
func (*WarehouseAssignmentUpdateOne) ClearStaffID ¶
func (wauo *WarehouseAssignmentUpdateOne) ClearStaffID() *WarehouseAssignmentUpdateOne
ClearStaffID clears the value of the "staff_id" field.
func (*WarehouseAssignmentUpdateOne) Exec ¶
func (wauo *WarehouseAssignmentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WarehouseAssignmentUpdateOne) ExecX ¶
func (wauo *WarehouseAssignmentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WarehouseAssignmentUpdateOne) Mutation ¶
func (wauo *WarehouseAssignmentUpdateOne) Mutation() *WarehouseAssignmentMutation
Mutation returns the WarehouseAssignmentMutation object of the builder.
func (*WarehouseAssignmentUpdateOne) Save ¶
func (wauo *WarehouseAssignmentUpdateOne) Save(ctx context.Context) (*WarehouseAssignment, error)
Save executes the query and returns the updated WarehouseAssignment entity.
func (*WarehouseAssignmentUpdateOne) SaveX ¶
func (wauo *WarehouseAssignmentUpdateOne) SaveX(ctx context.Context) *WarehouseAssignment
SaveX is like Save, but panics if an error occurs.
func (*WarehouseAssignmentUpdateOne) Select ¶
func (wauo *WarehouseAssignmentUpdateOne) Select(field string, fields ...string) *WarehouseAssignmentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*WarehouseAssignmentUpdateOne) SetNillableNote ¶
func (wauo *WarehouseAssignmentUpdateOne) SetNillableNote(s *string) *WarehouseAssignmentUpdateOne
SetNillableNote sets the "note" field if the given value is not nil.
func (*WarehouseAssignmentUpdateOne) SetNillableStaffID ¶
func (wauo *WarehouseAssignmentUpdateOne) SetNillableStaffID(u *uuid.UUID) *WarehouseAssignmentUpdateOne
SetNillableStaffID sets the "staff_id" field if the given value is not nil.
func (*WarehouseAssignmentUpdateOne) SetNillableStatus ¶
func (wauo *WarehouseAssignmentUpdateOne) SetNillableStatus(w *warehouseassignment.Status) *WarehouseAssignmentUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*WarehouseAssignmentUpdateOne) SetNote ¶
func (wauo *WarehouseAssignmentUpdateOne) SetNote(s string) *WarehouseAssignmentUpdateOne
SetNote sets the "note" field.
func (*WarehouseAssignmentUpdateOne) SetStaff ¶
func (wauo *WarehouseAssignmentUpdateOne) SetStaff(p *Person) *WarehouseAssignmentUpdateOne
SetStaff sets the "staff" edge to the Person entity.
func (*WarehouseAssignmentUpdateOne) SetStaffID ¶
func (wauo *WarehouseAssignmentUpdateOne) SetStaffID(u uuid.UUID) *WarehouseAssignmentUpdateOne
SetStaffID sets the "staff_id" field.
func (*WarehouseAssignmentUpdateOne) SetStatus ¶
func (wauo *WarehouseAssignmentUpdateOne) SetStatus(w warehouseassignment.Status) *WarehouseAssignmentUpdateOne
SetStatus sets the "status" field.
func (*WarehouseAssignmentUpdateOne) SetUpdatedAt ¶
func (wauo *WarehouseAssignmentUpdateOne) SetUpdatedAt(t time.Time) *WarehouseAssignmentUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*WarehouseAssignmentUpdateOne) Where ¶
func (wauo *WarehouseAssignmentUpdateOne) Where(ps ...predicate.WarehouseAssignment) *WarehouseAssignmentUpdateOne
Where appends a list predicates to the WarehouseAssignmentUpdate builder.
type WarehouseAssignments ¶
type WarehouseAssignments []*WarehouseAssignment
WarehouseAssignments is a parsable slice of WarehouseAssignment.
type WorkUnitInfo ¶
type WorkUnitInfo struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // AddressID holds the value of the "address_id" field. AddressID *uuid.UUID `json:"address_id,omitempty"` // Type holds the value of the "type" field. Type *workunitinfo.Type `json:"type,omitempty"` // ImageURL holds the value of the "image_url" field. ImageURL *string `json:"image_url,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the WorkUnitInfoQuery when eager-loading is set. Edges WorkUnitInfoEdges `json:"edges"` // contains filtered or unexported fields }
WorkUnitInfo is the model entity for the WorkUnitInfo schema.
func (*WorkUnitInfo) QueryAddress ¶
func (wui *WorkUnitInfo) QueryAddress() *AddressQuery
QueryAddress queries the "address" edge of the WorkUnitInfo entity.
func (*WorkUnitInfo) String ¶
func (wui *WorkUnitInfo) String() string
String implements the fmt.Stringer.
func (*WorkUnitInfo) Unwrap ¶
func (wui *WorkUnitInfo) Unwrap() *WorkUnitInfo
Unwrap unwraps the WorkUnitInfo 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 (*WorkUnitInfo) Update ¶
func (wui *WorkUnitInfo) Update() *WorkUnitInfoUpdateOne
Update returns a builder for updating this WorkUnitInfo. Note that you need to call WorkUnitInfo.Unwrap() before calling this method if this WorkUnitInfo was returned from a transaction, and the transaction was committed or rolled back.
type WorkUnitInfoClient ¶
type WorkUnitInfoClient struct {
// contains filtered or unexported fields
}
WorkUnitInfoClient is a client for the WorkUnitInfo schema.
func NewWorkUnitInfoClient ¶
func NewWorkUnitInfoClient(c config) *WorkUnitInfoClient
NewWorkUnitInfoClient returns a client for the WorkUnitInfo from the given config.
func (*WorkUnitInfoClient) Create ¶
func (c *WorkUnitInfoClient) Create() *WorkUnitInfoCreate
Create returns a builder for creating a WorkUnitInfo entity.
func (*WorkUnitInfoClient) CreateBulk ¶
func (c *WorkUnitInfoClient) CreateBulk(builders ...*WorkUnitInfoCreate) *WorkUnitInfoCreateBulk
CreateBulk returns a builder for creating a bulk of WorkUnitInfo entities.
func (*WorkUnitInfoClient) Delete ¶
func (c *WorkUnitInfoClient) Delete() *WorkUnitInfoDelete
Delete returns a delete builder for WorkUnitInfo.
func (*WorkUnitInfoClient) DeleteOne ¶
func (c *WorkUnitInfoClient) DeleteOne(wui *WorkUnitInfo) *WorkUnitInfoDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*WorkUnitInfoClient) DeleteOneID ¶
func (c *WorkUnitInfoClient) DeleteOneID(id uuid.UUID) *WorkUnitInfoDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*WorkUnitInfoClient) Get ¶
func (c *WorkUnitInfoClient) Get(ctx context.Context, id uuid.UUID) (*WorkUnitInfo, error)
Get returns a WorkUnitInfo entity by its id.
func (*WorkUnitInfoClient) GetX ¶
func (c *WorkUnitInfoClient) GetX(ctx context.Context, id uuid.UUID) *WorkUnitInfo
GetX is like Get, but panics if an error occurs.
func (*WorkUnitInfoClient) Hooks ¶
func (c *WorkUnitInfoClient) Hooks() []Hook
Hooks returns the client hooks.
func (*WorkUnitInfoClient) Intercept ¶
func (c *WorkUnitInfoClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `workunitinfo.Intercept(f(g(h())))`.
func (*WorkUnitInfoClient) Interceptors ¶
func (c *WorkUnitInfoClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*WorkUnitInfoClient) MapCreateBulk ¶
func (c *WorkUnitInfoClient) MapCreateBulk(slice any, setFunc func(*WorkUnitInfoCreate, int)) *WorkUnitInfoCreateBulk
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 (*WorkUnitInfoClient) Query ¶
func (c *WorkUnitInfoClient) Query() *WorkUnitInfoQuery
Query returns a query builder for WorkUnitInfo.
func (*WorkUnitInfoClient) QueryAddress ¶
func (c *WorkUnitInfoClient) QueryAddress(wui *WorkUnitInfo) *AddressQuery
QueryAddress queries the address edge of a WorkUnitInfo.
func (*WorkUnitInfoClient) Update ¶
func (c *WorkUnitInfoClient) Update() *WorkUnitInfoUpdate
Update returns an update builder for WorkUnitInfo.
func (*WorkUnitInfoClient) UpdateOne ¶
func (c *WorkUnitInfoClient) UpdateOne(wui *WorkUnitInfo) *WorkUnitInfoUpdateOne
UpdateOne returns an update builder for the given entity.
func (*WorkUnitInfoClient) UpdateOneID ¶
func (c *WorkUnitInfoClient) UpdateOneID(id uuid.UUID) *WorkUnitInfoUpdateOne
UpdateOneID returns an update builder for the given id.
func (*WorkUnitInfoClient) Use ¶
func (c *WorkUnitInfoClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `workunitinfo.Hooks(f(g(h())))`.
type WorkUnitInfoCreate ¶
type WorkUnitInfoCreate struct {
// contains filtered or unexported fields
}
WorkUnitInfoCreate is the builder for creating a WorkUnitInfo entity.
func (*WorkUnitInfoCreate) Exec ¶
func (wuic *WorkUnitInfoCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkUnitInfoCreate) ExecX ¶
func (wuic *WorkUnitInfoCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkUnitInfoCreate) Mutation ¶
func (wuic *WorkUnitInfoCreate) Mutation() *WorkUnitInfoMutation
Mutation returns the WorkUnitInfoMutation object of the builder.
func (*WorkUnitInfoCreate) Save ¶
func (wuic *WorkUnitInfoCreate) Save(ctx context.Context) (*WorkUnitInfo, error)
Save creates the WorkUnitInfo in the database.
func (*WorkUnitInfoCreate) SaveX ¶
func (wuic *WorkUnitInfoCreate) SaveX(ctx context.Context) *WorkUnitInfo
SaveX calls Save and panics if Save returns an error.
func (*WorkUnitInfoCreate) SetAddress ¶
func (wuic *WorkUnitInfoCreate) SetAddress(a *Address) *WorkUnitInfoCreate
SetAddress sets the "address" edge to the Address entity.
func (*WorkUnitInfoCreate) SetAddressID ¶
func (wuic *WorkUnitInfoCreate) SetAddressID(u uuid.UUID) *WorkUnitInfoCreate
SetAddressID sets the "address_id" field.
func (*WorkUnitInfoCreate) SetCreatedAt ¶
func (wuic *WorkUnitInfoCreate) SetCreatedAt(t time.Time) *WorkUnitInfoCreate
SetCreatedAt sets the "created_at" field.
func (*WorkUnitInfoCreate) SetID ¶
func (wuic *WorkUnitInfoCreate) SetID(u uuid.UUID) *WorkUnitInfoCreate
SetID sets the "id" field.
func (*WorkUnitInfoCreate) SetImageURL ¶
func (wuic *WorkUnitInfoCreate) SetImageURL(s string) *WorkUnitInfoCreate
SetImageURL sets the "image_url" field.
func (*WorkUnitInfoCreate) SetName ¶
func (wuic *WorkUnitInfoCreate) SetName(s string) *WorkUnitInfoCreate
SetName sets the "name" field.
func (*WorkUnitInfoCreate) SetNillableAddressID ¶
func (wuic *WorkUnitInfoCreate) SetNillableAddressID(u *uuid.UUID) *WorkUnitInfoCreate
SetNillableAddressID sets the "address_id" field if the given value is not nil.
func (*WorkUnitInfoCreate) SetNillableCreatedAt ¶
func (wuic *WorkUnitInfoCreate) SetNillableCreatedAt(t *time.Time) *WorkUnitInfoCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*WorkUnitInfoCreate) SetNillableID ¶
func (wuic *WorkUnitInfoCreate) SetNillableID(u *uuid.UUID) *WorkUnitInfoCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*WorkUnitInfoCreate) SetNillableImageURL ¶
func (wuic *WorkUnitInfoCreate) SetNillableImageURL(s *string) *WorkUnitInfoCreate
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (*WorkUnitInfoCreate) SetNillableType ¶
func (wuic *WorkUnitInfoCreate) SetNillableType(w *workunitinfo.Type) *WorkUnitInfoCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*WorkUnitInfoCreate) SetNillableUpdatedAt ¶
func (wuic *WorkUnitInfoCreate) SetNillableUpdatedAt(t *time.Time) *WorkUnitInfoCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*WorkUnitInfoCreate) SetType ¶
func (wuic *WorkUnitInfoCreate) SetType(w workunitinfo.Type) *WorkUnitInfoCreate
SetType sets the "type" field.
func (*WorkUnitInfoCreate) SetUpdatedAt ¶
func (wuic *WorkUnitInfoCreate) SetUpdatedAt(t time.Time) *WorkUnitInfoCreate
SetUpdatedAt sets the "updated_at" field.
type WorkUnitInfoCreateBulk ¶
type WorkUnitInfoCreateBulk struct {
// contains filtered or unexported fields
}
WorkUnitInfoCreateBulk is the builder for creating many WorkUnitInfo entities in bulk.
func (*WorkUnitInfoCreateBulk) Exec ¶
func (wuicb *WorkUnitInfoCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkUnitInfoCreateBulk) ExecX ¶
func (wuicb *WorkUnitInfoCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkUnitInfoCreateBulk) Save ¶
func (wuicb *WorkUnitInfoCreateBulk) Save(ctx context.Context) ([]*WorkUnitInfo, error)
Save creates the WorkUnitInfo entities in the database.
func (*WorkUnitInfoCreateBulk) SaveX ¶
func (wuicb *WorkUnitInfoCreateBulk) SaveX(ctx context.Context) []*WorkUnitInfo
SaveX is like Save, but panics if an error occurs.
type WorkUnitInfoDelete ¶
type WorkUnitInfoDelete struct {
// contains filtered or unexported fields
}
WorkUnitInfoDelete is the builder for deleting a WorkUnitInfo entity.
func (*WorkUnitInfoDelete) Exec ¶
func (wuid *WorkUnitInfoDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*WorkUnitInfoDelete) ExecX ¶
func (wuid *WorkUnitInfoDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*WorkUnitInfoDelete) Where ¶
func (wuid *WorkUnitInfoDelete) Where(ps ...predicate.WorkUnitInfo) *WorkUnitInfoDelete
Where appends a list predicates to the WorkUnitInfoDelete builder.
type WorkUnitInfoDeleteOne ¶
type WorkUnitInfoDeleteOne struct {
// contains filtered or unexported fields
}
WorkUnitInfoDeleteOne is the builder for deleting a single WorkUnitInfo entity.
func (*WorkUnitInfoDeleteOne) Exec ¶
func (wuido *WorkUnitInfoDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*WorkUnitInfoDeleteOne) ExecX ¶
func (wuido *WorkUnitInfoDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkUnitInfoDeleteOne) Where ¶
func (wuido *WorkUnitInfoDeleteOne) Where(ps ...predicate.WorkUnitInfo) *WorkUnitInfoDeleteOne
Where appends a list predicates to the WorkUnitInfoDelete builder.
type WorkUnitInfoEdges ¶
type WorkUnitInfoEdges struct { // Address holds the value of the address edge. Address *Address `json:"address,omitempty"` // contains filtered or unexported fields }
WorkUnitInfoEdges holds the relations/edges for other nodes in the graph.
func (WorkUnitInfoEdges) AddressOrErr ¶
func (e WorkUnitInfoEdges) AddressOrErr() (*Address, error)
AddressOrErr returns the Address value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type WorkUnitInfoGroupBy ¶
type WorkUnitInfoGroupBy struct {
// contains filtered or unexported fields
}
WorkUnitInfoGroupBy is the group-by builder for WorkUnitInfo entities.
func (*WorkUnitInfoGroupBy) Aggregate ¶
func (wuigb *WorkUnitInfoGroupBy) Aggregate(fns ...AggregateFunc) *WorkUnitInfoGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*WorkUnitInfoGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkUnitInfoGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkUnitInfoGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkUnitInfoGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkUnitInfoGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkUnitInfoGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkUnitInfoGroupBy) Scan ¶
func (wuigb *WorkUnitInfoGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkUnitInfoGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkUnitInfoMutation ¶
type WorkUnitInfoMutation struct {
// contains filtered or unexported fields
}
WorkUnitInfoMutation represents an operation that mutates the WorkUnitInfo nodes in the graph.
func (*WorkUnitInfoMutation) AddField ¶
func (m *WorkUnitInfoMutation) 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 (*WorkUnitInfoMutation) AddedEdges ¶
func (m *WorkUnitInfoMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*WorkUnitInfoMutation) AddedField ¶
func (m *WorkUnitInfoMutation) 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 (*WorkUnitInfoMutation) AddedFields ¶
func (m *WorkUnitInfoMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*WorkUnitInfoMutation) AddedIDs ¶
func (m *WorkUnitInfoMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*WorkUnitInfoMutation) AddressCleared ¶
func (m *WorkUnitInfoMutation) AddressCleared() bool
AddressCleared reports if the "address" edge to the Address entity was cleared.
func (*WorkUnitInfoMutation) AddressID ¶
func (m *WorkUnitInfoMutation) AddressID() (r uuid.UUID, exists bool)
AddressID returns the value of the "address_id" field in the mutation.
func (*WorkUnitInfoMutation) AddressIDCleared ¶
func (m *WorkUnitInfoMutation) AddressIDCleared() bool
AddressIDCleared returns if the "address_id" field was cleared in this mutation.
func (*WorkUnitInfoMutation) AddressIDs ¶
func (m *WorkUnitInfoMutation) AddressIDs() (ids []uuid.UUID)
AddressIDs returns the "address" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AddressID instead. It exists only for internal usage by the builders.
func (*WorkUnitInfoMutation) ClearAddress ¶
func (m *WorkUnitInfoMutation) ClearAddress()
ClearAddress clears the "address" edge to the Address entity.
func (*WorkUnitInfoMutation) ClearAddressID ¶
func (m *WorkUnitInfoMutation) ClearAddressID()
ClearAddressID clears the value of the "address_id" field.
func (*WorkUnitInfoMutation) ClearEdge ¶
func (m *WorkUnitInfoMutation) 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 (*WorkUnitInfoMutation) ClearField ¶
func (m *WorkUnitInfoMutation) 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 (*WorkUnitInfoMutation) ClearImageURL ¶
func (m *WorkUnitInfoMutation) ClearImageURL()
ClearImageURL clears the value of the "image_url" field.
func (*WorkUnitInfoMutation) ClearedEdges ¶
func (m *WorkUnitInfoMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*WorkUnitInfoMutation) ClearedFields ¶
func (m *WorkUnitInfoMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (WorkUnitInfoMutation) Client ¶
func (m WorkUnitInfoMutation) 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 (*WorkUnitInfoMutation) CreatedAt ¶
func (m *WorkUnitInfoMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*WorkUnitInfoMutation) EdgeCleared ¶
func (m *WorkUnitInfoMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*WorkUnitInfoMutation) Field ¶
func (m *WorkUnitInfoMutation) 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 (*WorkUnitInfoMutation) FieldCleared ¶
func (m *WorkUnitInfoMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*WorkUnitInfoMutation) Fields ¶
func (m *WorkUnitInfoMutation) 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 (*WorkUnitInfoMutation) GetType ¶
func (m *WorkUnitInfoMutation) GetType() (r workunitinfo.Type, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*WorkUnitInfoMutation) ID ¶
func (m *WorkUnitInfoMutation) ID() (id uuid.UUID, 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 (*WorkUnitInfoMutation) IDs ¶
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 (*WorkUnitInfoMutation) ImageURL ¶
func (m *WorkUnitInfoMutation) ImageURL() (r string, exists bool)
ImageURL returns the value of the "image_url" field in the mutation.
func (*WorkUnitInfoMutation) ImageURLCleared ¶
func (m *WorkUnitInfoMutation) ImageURLCleared() bool
ImageURLCleared returns if the "image_url" field was cleared in this mutation.
func (*WorkUnitInfoMutation) Name ¶
func (m *WorkUnitInfoMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*WorkUnitInfoMutation) OldAddressID ¶
OldAddressID returns the old "address_id" field's value of the WorkUnitInfo entity. If the WorkUnitInfo 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 (*WorkUnitInfoMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the WorkUnitInfo entity. If the WorkUnitInfo 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 (*WorkUnitInfoMutation) 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 (*WorkUnitInfoMutation) OldImageURL ¶
func (m *WorkUnitInfoMutation) OldImageURL(ctx context.Context) (v *string, err error)
OldImageURL returns the old "image_url" field's value of the WorkUnitInfo entity. If the WorkUnitInfo 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 (*WorkUnitInfoMutation) OldName ¶
func (m *WorkUnitInfoMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the WorkUnitInfo entity. If the WorkUnitInfo 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 (*WorkUnitInfoMutation) OldType ¶
func (m *WorkUnitInfoMutation) OldType(ctx context.Context) (v *workunitinfo.Type, err error)
OldType returns the old "type" field's value of the WorkUnitInfo entity. If the WorkUnitInfo 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 (*WorkUnitInfoMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the WorkUnitInfo entity. If the WorkUnitInfo 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 (*WorkUnitInfoMutation) Op ¶
func (m *WorkUnitInfoMutation) Op() Op
Op returns the operation name.
func (*WorkUnitInfoMutation) RemovedEdges ¶
func (m *WorkUnitInfoMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*WorkUnitInfoMutation) RemovedIDs ¶
func (m *WorkUnitInfoMutation) 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 (*WorkUnitInfoMutation) ResetAddress ¶
func (m *WorkUnitInfoMutation) ResetAddress()
ResetAddress resets all changes to the "address" edge.
func (*WorkUnitInfoMutation) ResetAddressID ¶
func (m *WorkUnitInfoMutation) ResetAddressID()
ResetAddressID resets all changes to the "address_id" field.
func (*WorkUnitInfoMutation) ResetCreatedAt ¶
func (m *WorkUnitInfoMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*WorkUnitInfoMutation) ResetEdge ¶
func (m *WorkUnitInfoMutation) 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 (*WorkUnitInfoMutation) ResetField ¶
func (m *WorkUnitInfoMutation) 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 (*WorkUnitInfoMutation) ResetImageURL ¶
func (m *WorkUnitInfoMutation) ResetImageURL()
ResetImageURL resets all changes to the "image_url" field.
func (*WorkUnitInfoMutation) ResetName ¶
func (m *WorkUnitInfoMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*WorkUnitInfoMutation) ResetType ¶
func (m *WorkUnitInfoMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*WorkUnitInfoMutation) ResetUpdatedAt ¶
func (m *WorkUnitInfoMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*WorkUnitInfoMutation) SetAddressID ¶
func (m *WorkUnitInfoMutation) SetAddressID(u uuid.UUID)
SetAddressID sets the "address_id" field.
func (*WorkUnitInfoMutation) SetCreatedAt ¶
func (m *WorkUnitInfoMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*WorkUnitInfoMutation) SetField ¶
func (m *WorkUnitInfoMutation) 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 (*WorkUnitInfoMutation) SetID ¶
func (m *WorkUnitInfoMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of WorkUnitInfo entities.
func (*WorkUnitInfoMutation) SetImageURL ¶
func (m *WorkUnitInfoMutation) SetImageURL(s string)
SetImageURL sets the "image_url" field.
func (*WorkUnitInfoMutation) SetName ¶
func (m *WorkUnitInfoMutation) SetName(s string)
SetName sets the "name" field.
func (*WorkUnitInfoMutation) SetOp ¶
func (m *WorkUnitInfoMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*WorkUnitInfoMutation) SetType ¶
func (m *WorkUnitInfoMutation) SetType(w workunitinfo.Type)
SetType sets the "type" field.
func (*WorkUnitInfoMutation) SetUpdatedAt ¶
func (m *WorkUnitInfoMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (WorkUnitInfoMutation) Tx ¶
func (m WorkUnitInfoMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*WorkUnitInfoMutation) Type ¶
func (m *WorkUnitInfoMutation) Type() string
Type returns the node type of this mutation (WorkUnitInfo).
func (*WorkUnitInfoMutation) UpdatedAt ¶
func (m *WorkUnitInfoMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*WorkUnitInfoMutation) Where ¶
func (m *WorkUnitInfoMutation) Where(ps ...predicate.WorkUnitInfo)
Where appends a list predicates to the WorkUnitInfoMutation builder.
func (*WorkUnitInfoMutation) WhereP ¶
func (m *WorkUnitInfoMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the WorkUnitInfoMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type WorkUnitInfoQuery ¶
type WorkUnitInfoQuery struct {
// contains filtered or unexported fields
}
WorkUnitInfoQuery is the builder for querying WorkUnitInfo entities.
func (*WorkUnitInfoQuery) Aggregate ¶
func (wuiq *WorkUnitInfoQuery) Aggregate(fns ...AggregateFunc) *WorkUnitInfoSelect
Aggregate returns a WorkUnitInfoSelect configured with the given aggregations.
func (*WorkUnitInfoQuery) All ¶
func (wuiq *WorkUnitInfoQuery) All(ctx context.Context) ([]*WorkUnitInfo, error)
All executes the query and returns a list of WorkUnitInfos.
func (*WorkUnitInfoQuery) AllX ¶
func (wuiq *WorkUnitInfoQuery) AllX(ctx context.Context) []*WorkUnitInfo
AllX is like All, but panics if an error occurs.
func (*WorkUnitInfoQuery) Clone ¶
func (wuiq *WorkUnitInfoQuery) Clone() *WorkUnitInfoQuery
Clone returns a duplicate of the WorkUnitInfoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*WorkUnitInfoQuery) Count ¶
func (wuiq *WorkUnitInfoQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*WorkUnitInfoQuery) CountX ¶
func (wuiq *WorkUnitInfoQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*WorkUnitInfoQuery) Exist ¶
func (wuiq *WorkUnitInfoQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*WorkUnitInfoQuery) ExistX ¶
func (wuiq *WorkUnitInfoQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*WorkUnitInfoQuery) First ¶
func (wuiq *WorkUnitInfoQuery) First(ctx context.Context) (*WorkUnitInfo, error)
First returns the first WorkUnitInfo entity from the query. Returns a *NotFoundError when no WorkUnitInfo was found.
func (*WorkUnitInfoQuery) FirstID ¶
FirstID returns the first WorkUnitInfo ID from the query. Returns a *NotFoundError when no WorkUnitInfo ID was found.
func (*WorkUnitInfoQuery) FirstIDX ¶
func (wuiq *WorkUnitInfoQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*WorkUnitInfoQuery) FirstX ¶
func (wuiq *WorkUnitInfoQuery) FirstX(ctx context.Context) *WorkUnitInfo
FirstX is like First, but panics if an error occurs.
func (*WorkUnitInfoQuery) GroupBy ¶
func (wuiq *WorkUnitInfoQuery) GroupBy(field string, fields ...string) *WorkUnitInfoGroupBy
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.WorkUnitInfo.Query(). GroupBy(workunitinfo.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*WorkUnitInfoQuery) IDsX ¶
func (wuiq *WorkUnitInfoQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*WorkUnitInfoQuery) Limit ¶
func (wuiq *WorkUnitInfoQuery) Limit(limit int) *WorkUnitInfoQuery
Limit the number of records to be returned by this query.
func (*WorkUnitInfoQuery) Offset ¶
func (wuiq *WorkUnitInfoQuery) Offset(offset int) *WorkUnitInfoQuery
Offset to start from.
func (*WorkUnitInfoQuery) Only ¶
func (wuiq *WorkUnitInfoQuery) Only(ctx context.Context) (*WorkUnitInfo, error)
Only returns a single WorkUnitInfo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one WorkUnitInfo entity is found. Returns a *NotFoundError when no WorkUnitInfo entities are found.
func (*WorkUnitInfoQuery) OnlyID ¶
OnlyID is like Only, but returns the only WorkUnitInfo ID in the query. Returns a *NotSingularError when more than one WorkUnitInfo ID is found. Returns a *NotFoundError when no entities are found.
func (*WorkUnitInfoQuery) OnlyIDX ¶
func (wuiq *WorkUnitInfoQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*WorkUnitInfoQuery) OnlyX ¶
func (wuiq *WorkUnitInfoQuery) OnlyX(ctx context.Context) *WorkUnitInfo
OnlyX is like Only, but panics if an error occurs.
func (*WorkUnitInfoQuery) Order ¶
func (wuiq *WorkUnitInfoQuery) Order(o ...workunitinfo.OrderOption) *WorkUnitInfoQuery
Order specifies how the records should be ordered.
func (*WorkUnitInfoQuery) QueryAddress ¶
func (wuiq *WorkUnitInfoQuery) QueryAddress() *AddressQuery
QueryAddress chains the current query on the "address" edge.
func (*WorkUnitInfoQuery) Select ¶
func (wuiq *WorkUnitInfoQuery) Select(fields ...string) *WorkUnitInfoSelect
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.WorkUnitInfo.Query(). Select(workunitinfo.FieldCreatedAt). Scan(ctx, &v)
func (*WorkUnitInfoQuery) Unique ¶
func (wuiq *WorkUnitInfoQuery) Unique(unique bool) *WorkUnitInfoQuery
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 (*WorkUnitInfoQuery) Where ¶
func (wuiq *WorkUnitInfoQuery) Where(ps ...predicate.WorkUnitInfo) *WorkUnitInfoQuery
Where adds a new predicate for the WorkUnitInfoQuery builder.
func (*WorkUnitInfoQuery) WithAddress ¶
func (wuiq *WorkUnitInfoQuery) WithAddress(opts ...func(*AddressQuery)) *WorkUnitInfoQuery
WithAddress tells the query-builder to eager-load the nodes that are connected to the "address" edge. The optional arguments are used to configure the query builder of the edge.
type WorkUnitInfoSelect ¶
type WorkUnitInfoSelect struct { *WorkUnitInfoQuery // contains filtered or unexported fields }
WorkUnitInfoSelect is the builder for selecting fields of WorkUnitInfo entities.
func (*WorkUnitInfoSelect) Aggregate ¶
func (wuis *WorkUnitInfoSelect) Aggregate(fns ...AggregateFunc) *WorkUnitInfoSelect
Aggregate adds the given aggregation functions to the selector query.
func (*WorkUnitInfoSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*WorkUnitInfoSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*WorkUnitInfoSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*WorkUnitInfoSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*WorkUnitInfoSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*WorkUnitInfoSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*WorkUnitInfoSelect) Scan ¶
func (wuis *WorkUnitInfoSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*WorkUnitInfoSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type WorkUnitInfoUpdate ¶
type WorkUnitInfoUpdate struct {
// contains filtered or unexported fields
}
WorkUnitInfoUpdate is the builder for updating WorkUnitInfo entities.
func (*WorkUnitInfoUpdate) ClearAddress ¶
func (wuiu *WorkUnitInfoUpdate) ClearAddress() *WorkUnitInfoUpdate
ClearAddress clears the "address" edge to the Address entity.
func (*WorkUnitInfoUpdate) ClearAddressID ¶
func (wuiu *WorkUnitInfoUpdate) ClearAddressID() *WorkUnitInfoUpdate
ClearAddressID clears the value of the "address_id" field.
func (*WorkUnitInfoUpdate) ClearImageURL ¶
func (wuiu *WorkUnitInfoUpdate) ClearImageURL() *WorkUnitInfoUpdate
ClearImageURL clears the value of the "image_url" field.
func (*WorkUnitInfoUpdate) Exec ¶
func (wuiu *WorkUnitInfoUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*WorkUnitInfoUpdate) ExecX ¶
func (wuiu *WorkUnitInfoUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkUnitInfoUpdate) Mutation ¶
func (wuiu *WorkUnitInfoUpdate) Mutation() *WorkUnitInfoMutation
Mutation returns the WorkUnitInfoMutation object of the builder.
func (*WorkUnitInfoUpdate) Save ¶
func (wuiu *WorkUnitInfoUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*WorkUnitInfoUpdate) SaveX ¶
func (wuiu *WorkUnitInfoUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*WorkUnitInfoUpdate) SetAddress ¶
func (wuiu *WorkUnitInfoUpdate) SetAddress(a *Address) *WorkUnitInfoUpdate
SetAddress sets the "address" edge to the Address entity.
func (*WorkUnitInfoUpdate) SetAddressID ¶
func (wuiu *WorkUnitInfoUpdate) SetAddressID(u uuid.UUID) *WorkUnitInfoUpdate
SetAddressID sets the "address_id" field.
func (*WorkUnitInfoUpdate) SetImageURL ¶
func (wuiu *WorkUnitInfoUpdate) SetImageURL(s string) *WorkUnitInfoUpdate
SetImageURL sets the "image_url" field.
func (*WorkUnitInfoUpdate) SetName ¶
func (wuiu *WorkUnitInfoUpdate) SetName(s string) *WorkUnitInfoUpdate
SetName sets the "name" field.
func (*WorkUnitInfoUpdate) SetNillableAddressID ¶
func (wuiu *WorkUnitInfoUpdate) SetNillableAddressID(u *uuid.UUID) *WorkUnitInfoUpdate
SetNillableAddressID sets the "address_id" field if the given value is not nil.
func (*WorkUnitInfoUpdate) SetNillableImageURL ¶
func (wuiu *WorkUnitInfoUpdate) SetNillableImageURL(s *string) *WorkUnitInfoUpdate
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (*WorkUnitInfoUpdate) SetNillableName ¶
func (wuiu *WorkUnitInfoUpdate) SetNillableName(s *string) *WorkUnitInfoUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*WorkUnitInfoUpdate) SetNillableType ¶
func (wuiu *WorkUnitInfoUpdate) SetNillableType(w *workunitinfo.Type) *WorkUnitInfoUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*WorkUnitInfoUpdate) SetType ¶
func (wuiu *WorkUnitInfoUpdate) SetType(w workunitinfo.Type) *WorkUnitInfoUpdate
SetType sets the "type" field.
func (*WorkUnitInfoUpdate) SetUpdatedAt ¶
func (wuiu *WorkUnitInfoUpdate) SetUpdatedAt(t time.Time) *WorkUnitInfoUpdate
SetUpdatedAt sets the "updated_at" field.
func (*WorkUnitInfoUpdate) Where ¶
func (wuiu *WorkUnitInfoUpdate) Where(ps ...predicate.WorkUnitInfo) *WorkUnitInfoUpdate
Where appends a list predicates to the WorkUnitInfoUpdate builder.
type WorkUnitInfoUpdateOne ¶
type WorkUnitInfoUpdateOne struct {
// contains filtered or unexported fields
}
WorkUnitInfoUpdateOne is the builder for updating a single WorkUnitInfo entity.
func (*WorkUnitInfoUpdateOne) ClearAddress ¶
func (wuiuo *WorkUnitInfoUpdateOne) ClearAddress() *WorkUnitInfoUpdateOne
ClearAddress clears the "address" edge to the Address entity.
func (*WorkUnitInfoUpdateOne) ClearAddressID ¶
func (wuiuo *WorkUnitInfoUpdateOne) ClearAddressID() *WorkUnitInfoUpdateOne
ClearAddressID clears the value of the "address_id" field.
func (*WorkUnitInfoUpdateOne) ClearImageURL ¶
func (wuiuo *WorkUnitInfoUpdateOne) ClearImageURL() *WorkUnitInfoUpdateOne
ClearImageURL clears the value of the "image_url" field.
func (*WorkUnitInfoUpdateOne) Exec ¶
func (wuiuo *WorkUnitInfoUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*WorkUnitInfoUpdateOne) ExecX ¶
func (wuiuo *WorkUnitInfoUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*WorkUnitInfoUpdateOne) Mutation ¶
func (wuiuo *WorkUnitInfoUpdateOne) Mutation() *WorkUnitInfoMutation
Mutation returns the WorkUnitInfoMutation object of the builder.
func (*WorkUnitInfoUpdateOne) Save ¶
func (wuiuo *WorkUnitInfoUpdateOne) Save(ctx context.Context) (*WorkUnitInfo, error)
Save executes the query and returns the updated WorkUnitInfo entity.
func (*WorkUnitInfoUpdateOne) SaveX ¶
func (wuiuo *WorkUnitInfoUpdateOne) SaveX(ctx context.Context) *WorkUnitInfo
SaveX is like Save, but panics if an error occurs.
func (*WorkUnitInfoUpdateOne) Select ¶
func (wuiuo *WorkUnitInfoUpdateOne) Select(field string, fields ...string) *WorkUnitInfoUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*WorkUnitInfoUpdateOne) SetAddress ¶
func (wuiuo *WorkUnitInfoUpdateOne) SetAddress(a *Address) *WorkUnitInfoUpdateOne
SetAddress sets the "address" edge to the Address entity.
func (*WorkUnitInfoUpdateOne) SetAddressID ¶
func (wuiuo *WorkUnitInfoUpdateOne) SetAddressID(u uuid.UUID) *WorkUnitInfoUpdateOne
SetAddressID sets the "address_id" field.
func (*WorkUnitInfoUpdateOne) SetImageURL ¶
func (wuiuo *WorkUnitInfoUpdateOne) SetImageURL(s string) *WorkUnitInfoUpdateOne
SetImageURL sets the "image_url" field.
func (*WorkUnitInfoUpdateOne) SetName ¶
func (wuiuo *WorkUnitInfoUpdateOne) SetName(s string) *WorkUnitInfoUpdateOne
SetName sets the "name" field.
func (*WorkUnitInfoUpdateOne) SetNillableAddressID ¶
func (wuiuo *WorkUnitInfoUpdateOne) SetNillableAddressID(u *uuid.UUID) *WorkUnitInfoUpdateOne
SetNillableAddressID sets the "address_id" field if the given value is not nil.
func (*WorkUnitInfoUpdateOne) SetNillableImageURL ¶
func (wuiuo *WorkUnitInfoUpdateOne) SetNillableImageURL(s *string) *WorkUnitInfoUpdateOne
SetNillableImageURL sets the "image_url" field if the given value is not nil.
func (*WorkUnitInfoUpdateOne) SetNillableName ¶
func (wuiuo *WorkUnitInfoUpdateOne) SetNillableName(s *string) *WorkUnitInfoUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*WorkUnitInfoUpdateOne) SetNillableType ¶
func (wuiuo *WorkUnitInfoUpdateOne) SetNillableType(w *workunitinfo.Type) *WorkUnitInfoUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*WorkUnitInfoUpdateOne) SetType ¶
func (wuiuo *WorkUnitInfoUpdateOne) SetType(w workunitinfo.Type) *WorkUnitInfoUpdateOne
SetType sets the "type" field.
func (*WorkUnitInfoUpdateOne) SetUpdatedAt ¶
func (wuiuo *WorkUnitInfoUpdateOne) SetUpdatedAt(t time.Time) *WorkUnitInfoUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*WorkUnitInfoUpdateOne) Where ¶
func (wuiuo *WorkUnitInfoUpdateOne) Where(ps ...predicate.WorkUnitInfo) *WorkUnitInfoUpdateOne
Where appends a list predicates to the WorkUnitInfoUpdate builder.
type WorkUnitInfos ¶
type WorkUnitInfos []*WorkUnitInfo
WorkUnitInfos is a parsable slice of WorkUnitInfo.
Source Files
¶
- address.go
- address_create.go
- address_delete.go
- address_query.go
- address_update.go
- client.go
- conversation.go
- conversation_create.go
- conversation_delete.go
- conversation_query.go
- conversation_update.go
- ent.go
- generate.go
- invoice.go
- invoice_create.go
- invoice_delete.go
- invoice_query.go
- invoice_update.go
- invoicehistory.go
- invoicehistory_create.go
- invoicehistory_delete.go
- invoicehistory_query.go
- invoicehistory_update.go
- invoicestatuscode.go
- invoicestatuscode_create.go
- invoicestatuscode_delete.go
- invoicestatuscode_query.go
- invoicestatuscode_update.go
- message.go
- message_create.go
- message_delete.go
- message_query.go
- message_update.go
- mutation.go
- order.go
- order_create.go
- order_delete.go
- order_query.go
- order_update.go
- orderhistory.go
- orderhistory_create.go
- orderhistory_delete.go
- orderhistory_query.go
- orderhistory_update.go
- orderitem.go
- orderitem_create.go
- orderitem_delete.go
- orderitem_query.go
- orderitem_update.go
- orderstatuscode.go
- orderstatuscode_create.go
- orderstatuscode_delete.go
- orderstatuscode_query.go
- orderstatuscode_update.go
- person.go
- person_create.go
- person_delete.go
- person_query.go
- person_update.go
- personaddress.go
- personaddress_create.go
- personaddress_delete.go
- personaddress_query.go
- personaddress_update.go
- productcolor.go
- productcolor_create.go
- productcolor_delete.go
- productcolor_query.go
- productcolor_update.go
- productimage.go
- productimage_create.go
- productimage_delete.go
- productimage_query.go
- productimage_update.go
- productinfo.go
- productinfo_create.go
- productinfo_delete.go
- productinfo_query.go
- productinfo_update.go
- productqty.go
- productqty_create.go
- productqty_delete.go
- productqty_query.go
- productqty_update.go
- producttag.go
- producttag_create.go
- producttag_delete.go
- producttag_query.go
- producttag_update.go
- runtime.go
- shipment.go
- shipment_create.go
- shipment_delete.go
- shipment_query.go
- shipment_update.go
- shipmenthistory.go
- shipmenthistory_create.go
- shipmenthistory_delete.go
- shipmenthistory_query.go
- shipmenthistory_update.go
- shipmentitem.go
- shipmentitem_create.go
- shipmentitem_delete.go
- shipmentitem_query.go
- shipmentitem_update.go
- shipmentstatuscode.go
- shipmentstatuscode_create.go
- shipmentstatuscode_delete.go
- shipmentstatuscode_query.go
- shipmentstatuscode_update.go
- tag.go
- tag_create.go
- tag_delete.go
- tag_query.go
- tag_update.go
- tx.go
- warehouseassignment.go
- warehouseassignment_create.go
- warehouseassignment_delete.go
- warehouseassignment_query.go
- warehouseassignment_update.go
- workunitinfo.go
- workunitinfo_create.go
- workunitinfo_delete.go
- workunitinfo_query.go
- workunitinfo_update.go