Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type 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 Hook
- type InterceptFunc
- type Interceptor
- type Merchant
- type MerchantAccount
- type MerchantAccountClient
- func (c *MerchantAccountClient) Create() *MerchantAccountCreate
- func (c *MerchantAccountClient) CreateBulk(builders ...*MerchantAccountCreate) *MerchantAccountCreateBulk
- func (c *MerchantAccountClient) Delete() *MerchantAccountDelete
- func (c *MerchantAccountClient) DeleteOne(ma *MerchantAccount) *MerchantAccountDeleteOne
- func (c *MerchantAccountClient) DeleteOneID(id uint64) *MerchantAccountDeleteOne
- func (c *MerchantAccountClient) Get(ctx context.Context, id uint64) (*MerchantAccount, error)
- func (c *MerchantAccountClient) GetX(ctx context.Context, id uint64) *MerchantAccount
- func (c *MerchantAccountClient) Hooks() []Hook
- func (c *MerchantAccountClient) Intercept(interceptors ...Interceptor)
- func (c *MerchantAccountClient) Interceptors() []Interceptor
- func (c *MerchantAccountClient) MapCreateBulk(slice any, setFunc func(*MerchantAccountCreate, int)) *MerchantAccountCreateBulk
- func (c *MerchantAccountClient) Query() *MerchantAccountQuery
- func (c *MerchantAccountClient) Update() *MerchantAccountUpdate
- func (c *MerchantAccountClient) UpdateOne(ma *MerchantAccount) *MerchantAccountUpdateOne
- func (c *MerchantAccountClient) UpdateOneID(id uint64) *MerchantAccountUpdateOne
- func (c *MerchantAccountClient) Use(hooks ...Hook)
- type MerchantAccountCreate
- func (mac *MerchantAccountCreate) Exec(ctx context.Context) error
- func (mac *MerchantAccountCreate) ExecX(ctx context.Context)
- func (mac *MerchantAccountCreate) Mutation() *MerchantAccountMutation
- func (mac *MerchantAccountCreate) Save(ctx context.Context) (*MerchantAccount, error)
- func (mac *MerchantAccountCreate) SaveX(ctx context.Context) *MerchantAccount
- func (mac *MerchantAccountCreate) SetCreatedAt(t time.Time) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetDeletedAt(t time.Time) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetEmail(s string) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetID(u uint64) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetIsMainAccount(b bool) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetNillableCreatedAt(t *time.Time) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetNillableDeletedAt(t *time.Time) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetNillableEmail(s *string) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetNillableID(u *uint64) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetNillableIsMainAccount(b *bool) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetNillablePhone(s *string) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetNillableUpdatedAt(t *time.Time) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetPassword(s string) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetPhone(s string) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetUpdatedAt(t time.Time) *MerchantAccountCreate
- func (mac *MerchantAccountCreate) SetUsername(s string) *MerchantAccountCreate
- type MerchantAccountCreateBulk
- func (macb *MerchantAccountCreateBulk) Exec(ctx context.Context) error
- func (macb *MerchantAccountCreateBulk) ExecX(ctx context.Context)
- func (macb *MerchantAccountCreateBulk) Save(ctx context.Context) ([]*MerchantAccount, error)
- func (macb *MerchantAccountCreateBulk) SaveX(ctx context.Context) []*MerchantAccount
- type MerchantAccountDelete
- type MerchantAccountDeleteOne
- type MerchantAccountGroupBy
- func (magb *MerchantAccountGroupBy) Aggregate(fns ...AggregateFunc) *MerchantAccountGroupBy
- func (s *MerchantAccountGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MerchantAccountGroupBy) BoolX(ctx context.Context) bool
- func (s *MerchantAccountGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MerchantAccountGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MerchantAccountGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MerchantAccountGroupBy) Float64X(ctx context.Context) float64
- func (s *MerchantAccountGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MerchantAccountGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MerchantAccountGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MerchantAccountGroupBy) IntX(ctx context.Context) int
- func (s *MerchantAccountGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MerchantAccountGroupBy) IntsX(ctx context.Context) []int
- func (magb *MerchantAccountGroupBy) Scan(ctx context.Context, v any) error
- func (s *MerchantAccountGroupBy) ScanX(ctx context.Context, v any)
- func (s *MerchantAccountGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MerchantAccountGroupBy) StringX(ctx context.Context) string
- func (s *MerchantAccountGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MerchantAccountGroupBy) StringsX(ctx context.Context) []string
- type MerchantAccountMutation
- func (m *MerchantAccountMutation) AddField(name string, value ent.Value) error
- func (m *MerchantAccountMutation) AddedEdges() []string
- func (m *MerchantAccountMutation) AddedField(name string) (ent.Value, bool)
- func (m *MerchantAccountMutation) AddedFields() []string
- func (m *MerchantAccountMutation) AddedIDs(name string) []ent.Value
- func (m *MerchantAccountMutation) ClearDeletedAt()
- func (m *MerchantAccountMutation) ClearEdge(name string) error
- func (m *MerchantAccountMutation) ClearEmail()
- func (m *MerchantAccountMutation) ClearField(name string) error
- func (m *MerchantAccountMutation) ClearPhone()
- func (m *MerchantAccountMutation) ClearedEdges() []string
- func (m *MerchantAccountMutation) ClearedFields() []string
- func (m MerchantAccountMutation) Client() *Client
- func (m *MerchantAccountMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MerchantAccountMutation) DeletedAt() (r time.Time, exists bool)
- func (m *MerchantAccountMutation) DeletedAtCleared() bool
- func (m *MerchantAccountMutation) EdgeCleared(name string) bool
- func (m *MerchantAccountMutation) Email() (r string, exists bool)
- func (m *MerchantAccountMutation) EmailCleared() bool
- func (m *MerchantAccountMutation) Field(name string) (ent.Value, bool)
- func (m *MerchantAccountMutation) FieldCleared(name string) bool
- func (m *MerchantAccountMutation) Fields() []string
- func (m *MerchantAccountMutation) ID() (id uint64, exists bool)
- func (m *MerchantAccountMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *MerchantAccountMutation) IsMainAccount() (r bool, exists bool)
- func (m *MerchantAccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MerchantAccountMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *MerchantAccountMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *MerchantAccountMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MerchantAccountMutation) OldIsMainAccount(ctx context.Context) (v bool, err error)
- func (m *MerchantAccountMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *MerchantAccountMutation) OldPhone(ctx context.Context) (v string, err error)
- func (m *MerchantAccountMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MerchantAccountMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *MerchantAccountMutation) Op() Op
- func (m *MerchantAccountMutation) Password() (r string, exists bool)
- func (m *MerchantAccountMutation) Phone() (r string, exists bool)
- func (m *MerchantAccountMutation) PhoneCleared() bool
- func (m *MerchantAccountMutation) RemovedEdges() []string
- func (m *MerchantAccountMutation) RemovedIDs(name string) []ent.Value
- func (m *MerchantAccountMutation) ResetCreatedAt()
- func (m *MerchantAccountMutation) ResetDeletedAt()
- func (m *MerchantAccountMutation) ResetEdge(name string) error
- func (m *MerchantAccountMutation) ResetEmail()
- func (m *MerchantAccountMutation) ResetField(name string) error
- func (m *MerchantAccountMutation) ResetIsMainAccount()
- func (m *MerchantAccountMutation) ResetPassword()
- func (m *MerchantAccountMutation) ResetPhone()
- func (m *MerchantAccountMutation) ResetUpdatedAt()
- func (m *MerchantAccountMutation) ResetUsername()
- func (m *MerchantAccountMutation) SetCreatedAt(t time.Time)
- func (m *MerchantAccountMutation) SetDeletedAt(t time.Time)
- func (m *MerchantAccountMutation) SetEmail(s string)
- func (m *MerchantAccountMutation) SetField(name string, value ent.Value) error
- func (m *MerchantAccountMutation) SetID(id uint64)
- func (m *MerchantAccountMutation) SetIsMainAccount(b bool)
- func (m *MerchantAccountMutation) SetOp(op Op)
- func (m *MerchantAccountMutation) SetPassword(s string)
- func (m *MerchantAccountMutation) SetPhone(s string)
- func (m *MerchantAccountMutation) SetUpdatedAt(t time.Time)
- func (m *MerchantAccountMutation) SetUsername(s string)
- func (m MerchantAccountMutation) Tx() (*Tx, error)
- func (m *MerchantAccountMutation) Type() string
- func (m *MerchantAccountMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MerchantAccountMutation) Username() (r string, exists bool)
- func (m *MerchantAccountMutation) Where(ps ...predicate.MerchantAccount)
- func (m *MerchantAccountMutation) WhereP(ps ...func(*sql.Selector))
- type MerchantAccountQuery
- func (maq *MerchantAccountQuery) Aggregate(fns ...AggregateFunc) *MerchantAccountSelect
- func (maq *MerchantAccountQuery) All(ctx context.Context) ([]*MerchantAccount, error)
- func (maq *MerchantAccountQuery) AllX(ctx context.Context) []*MerchantAccount
- func (maq *MerchantAccountQuery) Clone() *MerchantAccountQuery
- func (maq *MerchantAccountQuery) Count(ctx context.Context) (int, error)
- func (maq *MerchantAccountQuery) CountX(ctx context.Context) int
- func (maq *MerchantAccountQuery) Exist(ctx context.Context) (bool, error)
- func (maq *MerchantAccountQuery) ExistX(ctx context.Context) bool
- func (maq *MerchantAccountQuery) First(ctx context.Context) (*MerchantAccount, error)
- func (maq *MerchantAccountQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (maq *MerchantAccountQuery) FirstIDX(ctx context.Context) uint64
- func (maq *MerchantAccountQuery) FirstX(ctx context.Context) *MerchantAccount
- func (maq *MerchantAccountQuery) GroupBy(field string, fields ...string) *MerchantAccountGroupBy
- func (maq *MerchantAccountQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (maq *MerchantAccountQuery) IDsX(ctx context.Context) []uint64
- func (maq *MerchantAccountQuery) Limit(limit int) *MerchantAccountQuery
- func (maq *MerchantAccountQuery) Offset(offset int) *MerchantAccountQuery
- func (maq *MerchantAccountQuery) Only(ctx context.Context) (*MerchantAccount, error)
- func (maq *MerchantAccountQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (maq *MerchantAccountQuery) OnlyIDX(ctx context.Context) uint64
- func (maq *MerchantAccountQuery) OnlyX(ctx context.Context) *MerchantAccount
- func (maq *MerchantAccountQuery) Order(o ...merchantaccount.OrderOption) *MerchantAccountQuery
- func (maq *MerchantAccountQuery) Select(fields ...string) *MerchantAccountSelect
- func (maq *MerchantAccountQuery) Unique(unique bool) *MerchantAccountQuery
- func (maq *MerchantAccountQuery) Where(ps ...predicate.MerchantAccount) *MerchantAccountQuery
- type MerchantAccountSelect
- func (mas *MerchantAccountSelect) Aggregate(fns ...AggregateFunc) *MerchantAccountSelect
- func (s *MerchantAccountSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MerchantAccountSelect) BoolX(ctx context.Context) bool
- func (s *MerchantAccountSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MerchantAccountSelect) BoolsX(ctx context.Context) []bool
- func (s *MerchantAccountSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MerchantAccountSelect) Float64X(ctx context.Context) float64
- func (s *MerchantAccountSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MerchantAccountSelect) Float64sX(ctx context.Context) []float64
- func (s *MerchantAccountSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MerchantAccountSelect) IntX(ctx context.Context) int
- func (s *MerchantAccountSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MerchantAccountSelect) IntsX(ctx context.Context) []int
- func (mas *MerchantAccountSelect) Scan(ctx context.Context, v any) error
- func (s *MerchantAccountSelect) ScanX(ctx context.Context, v any)
- func (s *MerchantAccountSelect) String(ctx context.Context) (_ string, err error)
- func (s *MerchantAccountSelect) StringX(ctx context.Context) string
- func (s *MerchantAccountSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MerchantAccountSelect) StringsX(ctx context.Context) []string
- type MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) ClearDeletedAt() *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) ClearEmail() *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) ClearPhone() *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) Exec(ctx context.Context) error
- func (mau *MerchantAccountUpdate) ExecX(ctx context.Context)
- func (mau *MerchantAccountUpdate) Mutation() *MerchantAccountMutation
- func (mau *MerchantAccountUpdate) Save(ctx context.Context) (int, error)
- func (mau *MerchantAccountUpdate) SaveX(ctx context.Context) int
- func (mau *MerchantAccountUpdate) SetDeletedAt(t time.Time) *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) SetEmail(s string) *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) SetIsMainAccount(b bool) *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) SetNillableDeletedAt(t *time.Time) *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) SetNillableEmail(s *string) *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) SetNillableIsMainAccount(b *bool) *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) SetNillablePassword(s *string) *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) SetNillablePhone(s *string) *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) SetNillableUsername(s *string) *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) SetPassword(s string) *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) SetPhone(s string) *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) SetUpdatedAt(t time.Time) *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) SetUsername(s string) *MerchantAccountUpdate
- func (mau *MerchantAccountUpdate) Where(ps ...predicate.MerchantAccount) *MerchantAccountUpdate
- type MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) ClearDeletedAt() *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) ClearEmail() *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) ClearPhone() *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) Exec(ctx context.Context) error
- func (mauo *MerchantAccountUpdateOne) ExecX(ctx context.Context)
- func (mauo *MerchantAccountUpdateOne) Mutation() *MerchantAccountMutation
- func (mauo *MerchantAccountUpdateOne) Save(ctx context.Context) (*MerchantAccount, error)
- func (mauo *MerchantAccountUpdateOne) SaveX(ctx context.Context) *MerchantAccount
- func (mauo *MerchantAccountUpdateOne) Select(field string, fields ...string) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) SetDeletedAt(t time.Time) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) SetEmail(s string) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) SetIsMainAccount(b bool) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) SetNillableDeletedAt(t *time.Time) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) SetNillableEmail(s *string) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) SetNillableIsMainAccount(b *bool) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) SetNillablePassword(s *string) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) SetNillablePhone(s *string) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) SetNillableUsername(s *string) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) SetPassword(s string) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) SetPhone(s string) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) SetUpdatedAt(t time.Time) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) SetUsername(s string) *MerchantAccountUpdateOne
- func (mauo *MerchantAccountUpdateOne) Where(ps ...predicate.MerchantAccount) *MerchantAccountUpdateOne
- type MerchantAccounts
- type MerchantClient
- func (c *MerchantClient) Create() *MerchantCreate
- func (c *MerchantClient) CreateBulk(builders ...*MerchantCreate) *MerchantCreateBulk
- func (c *MerchantClient) Delete() *MerchantDelete
- func (c *MerchantClient) DeleteOne(m *Merchant) *MerchantDeleteOne
- func (c *MerchantClient) DeleteOneID(id uint64) *MerchantDeleteOne
- func (c *MerchantClient) Get(ctx context.Context, id uint64) (*Merchant, error)
- func (c *MerchantClient) GetX(ctx context.Context, id uint64) *Merchant
- func (c *MerchantClient) Hooks() []Hook
- func (c *MerchantClient) Intercept(interceptors ...Interceptor)
- func (c *MerchantClient) Interceptors() []Interceptor
- func (c *MerchantClient) MapCreateBulk(slice any, setFunc func(*MerchantCreate, int)) *MerchantCreateBulk
- func (c *MerchantClient) Query() *MerchantQuery
- func (c *MerchantClient) QueryAccounts(m *Merchant) *MerchantAccountQuery
- func (c *MerchantClient) Update() *MerchantUpdate
- func (c *MerchantClient) UpdateOne(m *Merchant) *MerchantUpdateOne
- func (c *MerchantClient) UpdateOneID(id uint64) *MerchantUpdateOne
- func (c *MerchantClient) Use(hooks ...Hook)
- type MerchantCreate
- func (mc *MerchantCreate) AddAccountIDs(ids ...uint64) *MerchantCreate
- func (mc *MerchantCreate) AddAccounts(m ...*MerchantAccount) *MerchantCreate
- func (mc *MerchantCreate) Exec(ctx context.Context) error
- func (mc *MerchantCreate) ExecX(ctx context.Context)
- func (mc *MerchantCreate) Mutation() *MerchantMutation
- func (mc *MerchantCreate) Save(ctx context.Context) (*Merchant, error)
- func (mc *MerchantCreate) SaveX(ctx context.Context) *Merchant
- func (mc *MerchantCreate) SetAddress(s string) *MerchantCreate
- func (mc *MerchantCreate) SetCity(s string) *MerchantCreate
- func (mc *MerchantCreate) SetContactPerson(s string) *MerchantCreate
- func (mc *MerchantCreate) SetContactPhone(s string) *MerchantCreate
- func (mc *MerchantCreate) SetCountry(s string) *MerchantCreate
- func (mc *MerchantCreate) SetCreatedAt(t time.Time) *MerchantCreate
- func (mc *MerchantCreate) SetDeletedAt(t time.Time) *MerchantCreate
- func (mc *MerchantCreate) SetDistrict(s string) *MerchantCreate
- func (mc *MerchantCreate) SetID(u uint64) *MerchantCreate
- func (mc *MerchantCreate) SetMerchantName(s string) *MerchantCreate
- func (mc *MerchantCreate) SetNillableAddress(s *string) *MerchantCreate
- func (mc *MerchantCreate) SetNillableCity(s *string) *MerchantCreate
- func (mc *MerchantCreate) SetNillableContactPerson(s *string) *MerchantCreate
- func (mc *MerchantCreate) SetNillableContactPhone(s *string) *MerchantCreate
- func (mc *MerchantCreate) SetNillableCountry(s *string) *MerchantCreate
- func (mc *MerchantCreate) SetNillableCreatedAt(t *time.Time) *MerchantCreate
- func (mc *MerchantCreate) SetNillableDeletedAt(t *time.Time) *MerchantCreate
- func (mc *MerchantCreate) SetNillableDistrict(s *string) *MerchantCreate
- func (mc *MerchantCreate) SetNillableID(u *uint64) *MerchantCreate
- func (mc *MerchantCreate) SetNillableProvince(s *string) *MerchantCreate
- func (mc *MerchantCreate) SetNillableUpdatedAt(t *time.Time) *MerchantCreate
- func (mc *MerchantCreate) SetProvince(s string) *MerchantCreate
- func (mc *MerchantCreate) SetUpdatedAt(t time.Time) *MerchantCreate
- type MerchantCreateBulk
- type MerchantDelete
- type MerchantDeleteOne
- type MerchantEdges
- type MerchantGroupBy
- func (mgb *MerchantGroupBy) Aggregate(fns ...AggregateFunc) *MerchantGroupBy
- func (s *MerchantGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MerchantGroupBy) BoolX(ctx context.Context) bool
- func (s *MerchantGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MerchantGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MerchantGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MerchantGroupBy) Float64X(ctx context.Context) float64
- func (s *MerchantGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MerchantGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MerchantGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MerchantGroupBy) IntX(ctx context.Context) int
- func (s *MerchantGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MerchantGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MerchantGroupBy) Scan(ctx context.Context, v any) error
- func (s *MerchantGroupBy) ScanX(ctx context.Context, v any)
- func (s *MerchantGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MerchantGroupBy) StringX(ctx context.Context) string
- func (s *MerchantGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MerchantGroupBy) StringsX(ctx context.Context) []string
- type MerchantMutation
- func (m *MerchantMutation) AccountsCleared() bool
- func (m *MerchantMutation) AccountsIDs() (ids []uint64)
- func (m *MerchantMutation) AddAccountIDs(ids ...uint64)
- func (m *MerchantMutation) AddField(name string, value ent.Value) error
- func (m *MerchantMutation) AddedEdges() []string
- func (m *MerchantMutation) AddedField(name string) (ent.Value, bool)
- func (m *MerchantMutation) AddedFields() []string
- func (m *MerchantMutation) AddedIDs(name string) []ent.Value
- func (m *MerchantMutation) Address() (r string, exists bool)
- func (m *MerchantMutation) AddressCleared() bool
- func (m *MerchantMutation) City() (r string, exists bool)
- func (m *MerchantMutation) CityCleared() bool
- func (m *MerchantMutation) ClearAccounts()
- func (m *MerchantMutation) ClearAddress()
- func (m *MerchantMutation) ClearCity()
- func (m *MerchantMutation) ClearContactPerson()
- func (m *MerchantMutation) ClearContactPhone()
- func (m *MerchantMutation) ClearCountry()
- func (m *MerchantMutation) ClearDeletedAt()
- func (m *MerchantMutation) ClearDistrict()
- func (m *MerchantMutation) ClearEdge(name string) error
- func (m *MerchantMutation) ClearField(name string) error
- func (m *MerchantMutation) ClearProvince()
- func (m *MerchantMutation) ClearedEdges() []string
- func (m *MerchantMutation) ClearedFields() []string
- func (m MerchantMutation) Client() *Client
- func (m *MerchantMutation) ContactPerson() (r string, exists bool)
- func (m *MerchantMutation) ContactPersonCleared() bool
- func (m *MerchantMutation) ContactPhone() (r string, exists bool)
- func (m *MerchantMutation) ContactPhoneCleared() bool
- func (m *MerchantMutation) Country() (r string, exists bool)
- func (m *MerchantMutation) CountryCleared() bool
- func (m *MerchantMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MerchantMutation) DeletedAt() (r time.Time, exists bool)
- func (m *MerchantMutation) DeletedAtCleared() bool
- func (m *MerchantMutation) District() (r string, exists bool)
- func (m *MerchantMutation) DistrictCleared() bool
- func (m *MerchantMutation) EdgeCleared(name string) bool
- func (m *MerchantMutation) Field(name string) (ent.Value, bool)
- func (m *MerchantMutation) FieldCleared(name string) bool
- func (m *MerchantMutation) Fields() []string
- func (m *MerchantMutation) ID() (id uint64, exists bool)
- func (m *MerchantMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *MerchantMutation) MerchantName() (r string, exists bool)
- func (m *MerchantMutation) OldAddress(ctx context.Context) (v string, err error)
- func (m *MerchantMutation) OldCity(ctx context.Context) (v string, err error)
- func (m *MerchantMutation) OldContactPerson(ctx context.Context) (v string, err error)
- func (m *MerchantMutation) OldContactPhone(ctx context.Context) (v string, err error)
- func (m *MerchantMutation) OldCountry(ctx context.Context) (v string, err error)
- func (m *MerchantMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MerchantMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *MerchantMutation) OldDistrict(ctx context.Context) (v string, err error)
- func (m *MerchantMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MerchantMutation) OldMerchantName(ctx context.Context) (v string, err error)
- func (m *MerchantMutation) OldProvince(ctx context.Context) (v string, err error)
- func (m *MerchantMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MerchantMutation) Op() Op
- func (m *MerchantMutation) Province() (r string, exists bool)
- func (m *MerchantMutation) ProvinceCleared() bool
- func (m *MerchantMutation) RemoveAccountIDs(ids ...uint64)
- func (m *MerchantMutation) RemovedAccountsIDs() (ids []uint64)
- func (m *MerchantMutation) RemovedEdges() []string
- func (m *MerchantMutation) RemovedIDs(name string) []ent.Value
- func (m *MerchantMutation) ResetAccounts()
- func (m *MerchantMutation) ResetAddress()
- func (m *MerchantMutation) ResetCity()
- func (m *MerchantMutation) ResetContactPerson()
- func (m *MerchantMutation) ResetContactPhone()
- func (m *MerchantMutation) ResetCountry()
- func (m *MerchantMutation) ResetCreatedAt()
- func (m *MerchantMutation) ResetDeletedAt()
- func (m *MerchantMutation) ResetDistrict()
- func (m *MerchantMutation) ResetEdge(name string) error
- func (m *MerchantMutation) ResetField(name string) error
- func (m *MerchantMutation) ResetMerchantName()
- func (m *MerchantMutation) ResetProvince()
- func (m *MerchantMutation) ResetUpdatedAt()
- func (m *MerchantMutation) SetAddress(s string)
- func (m *MerchantMutation) SetCity(s string)
- func (m *MerchantMutation) SetContactPerson(s string)
- func (m *MerchantMutation) SetContactPhone(s string)
- func (m *MerchantMutation) SetCountry(s string)
- func (m *MerchantMutation) SetCreatedAt(t time.Time)
- func (m *MerchantMutation) SetDeletedAt(t time.Time)
- func (m *MerchantMutation) SetDistrict(s string)
- func (m *MerchantMutation) SetField(name string, value ent.Value) error
- func (m *MerchantMutation) SetID(id uint64)
- func (m *MerchantMutation) SetMerchantName(s string)
- func (m *MerchantMutation) SetOp(op Op)
- func (m *MerchantMutation) SetProvince(s string)
- func (m *MerchantMutation) SetUpdatedAt(t time.Time)
- func (m MerchantMutation) Tx() (*Tx, error)
- func (m *MerchantMutation) Type() string
- func (m *MerchantMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MerchantMutation) Where(ps ...predicate.Merchant)
- func (m *MerchantMutation) WhereP(ps ...func(*sql.Selector))
- type MerchantQuery
- func (mq *MerchantQuery) Aggregate(fns ...AggregateFunc) *MerchantSelect
- func (mq *MerchantQuery) All(ctx context.Context) ([]*Merchant, error)
- func (mq *MerchantQuery) AllX(ctx context.Context) []*Merchant
- func (mq *MerchantQuery) Clone() *MerchantQuery
- func (mq *MerchantQuery) Count(ctx context.Context) (int, error)
- func (mq *MerchantQuery) CountX(ctx context.Context) int
- func (mq *MerchantQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MerchantQuery) ExistX(ctx context.Context) bool
- func (mq *MerchantQuery) First(ctx context.Context) (*Merchant, error)
- func (mq *MerchantQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (mq *MerchantQuery) FirstIDX(ctx context.Context) uint64
- func (mq *MerchantQuery) FirstX(ctx context.Context) *Merchant
- func (mq *MerchantQuery) GroupBy(field string, fields ...string) *MerchantGroupBy
- func (mq *MerchantQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (mq *MerchantQuery) IDsX(ctx context.Context) []uint64
- func (mq *MerchantQuery) Limit(limit int) *MerchantQuery
- func (mq *MerchantQuery) Offset(offset int) *MerchantQuery
- func (mq *MerchantQuery) Only(ctx context.Context) (*Merchant, error)
- func (mq *MerchantQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (mq *MerchantQuery) OnlyIDX(ctx context.Context) uint64
- func (mq *MerchantQuery) OnlyX(ctx context.Context) *Merchant
- func (mq *MerchantQuery) Order(o ...merchant.OrderOption) *MerchantQuery
- func (mq *MerchantQuery) QueryAccounts() *MerchantAccountQuery
- func (mq *MerchantQuery) Select(fields ...string) *MerchantSelect
- func (mq *MerchantQuery) Unique(unique bool) *MerchantQuery
- func (mq *MerchantQuery) Where(ps ...predicate.Merchant) *MerchantQuery
- func (mq *MerchantQuery) WithAccounts(opts ...func(*MerchantAccountQuery)) *MerchantQuery
- type MerchantSelect
- func (ms *MerchantSelect) Aggregate(fns ...AggregateFunc) *MerchantSelect
- func (s *MerchantSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MerchantSelect) BoolX(ctx context.Context) bool
- func (s *MerchantSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MerchantSelect) BoolsX(ctx context.Context) []bool
- func (s *MerchantSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MerchantSelect) Float64X(ctx context.Context) float64
- func (s *MerchantSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MerchantSelect) Float64sX(ctx context.Context) []float64
- func (s *MerchantSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MerchantSelect) IntX(ctx context.Context) int
- func (s *MerchantSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MerchantSelect) IntsX(ctx context.Context) []int
- func (ms *MerchantSelect) Scan(ctx context.Context, v any) error
- func (s *MerchantSelect) ScanX(ctx context.Context, v any)
- func (s *MerchantSelect) String(ctx context.Context) (_ string, err error)
- func (s *MerchantSelect) StringX(ctx context.Context) string
- func (s *MerchantSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MerchantSelect) StringsX(ctx context.Context) []string
- type MerchantUpdate
- func (mu *MerchantUpdate) AddAccountIDs(ids ...uint64) *MerchantUpdate
- func (mu *MerchantUpdate) AddAccounts(m ...*MerchantAccount) *MerchantUpdate
- func (mu *MerchantUpdate) ClearAccounts() *MerchantUpdate
- func (mu *MerchantUpdate) ClearAddress() *MerchantUpdate
- func (mu *MerchantUpdate) ClearCity() *MerchantUpdate
- func (mu *MerchantUpdate) ClearContactPerson() *MerchantUpdate
- func (mu *MerchantUpdate) ClearContactPhone() *MerchantUpdate
- func (mu *MerchantUpdate) ClearCountry() *MerchantUpdate
- func (mu *MerchantUpdate) ClearDeletedAt() *MerchantUpdate
- func (mu *MerchantUpdate) ClearDistrict() *MerchantUpdate
- func (mu *MerchantUpdate) ClearProvince() *MerchantUpdate
- func (mu *MerchantUpdate) Exec(ctx context.Context) error
- func (mu *MerchantUpdate) ExecX(ctx context.Context)
- func (mu *MerchantUpdate) Mutation() *MerchantMutation
- func (mu *MerchantUpdate) RemoveAccountIDs(ids ...uint64) *MerchantUpdate
- func (mu *MerchantUpdate) RemoveAccounts(m ...*MerchantAccount) *MerchantUpdate
- func (mu *MerchantUpdate) Save(ctx context.Context) (int, error)
- func (mu *MerchantUpdate) SaveX(ctx context.Context) int
- func (mu *MerchantUpdate) SetAddress(s string) *MerchantUpdate
- func (mu *MerchantUpdate) SetCity(s string) *MerchantUpdate
- func (mu *MerchantUpdate) SetContactPerson(s string) *MerchantUpdate
- func (mu *MerchantUpdate) SetContactPhone(s string) *MerchantUpdate
- func (mu *MerchantUpdate) SetCountry(s string) *MerchantUpdate
- func (mu *MerchantUpdate) SetDeletedAt(t time.Time) *MerchantUpdate
- func (mu *MerchantUpdate) SetDistrict(s string) *MerchantUpdate
- func (mu *MerchantUpdate) SetMerchantName(s string) *MerchantUpdate
- func (mu *MerchantUpdate) SetNillableAddress(s *string) *MerchantUpdate
- func (mu *MerchantUpdate) SetNillableCity(s *string) *MerchantUpdate
- func (mu *MerchantUpdate) SetNillableContactPerson(s *string) *MerchantUpdate
- func (mu *MerchantUpdate) SetNillableContactPhone(s *string) *MerchantUpdate
- func (mu *MerchantUpdate) SetNillableCountry(s *string) *MerchantUpdate
- func (mu *MerchantUpdate) SetNillableDeletedAt(t *time.Time) *MerchantUpdate
- func (mu *MerchantUpdate) SetNillableDistrict(s *string) *MerchantUpdate
- func (mu *MerchantUpdate) SetNillableMerchantName(s *string) *MerchantUpdate
- func (mu *MerchantUpdate) SetNillableProvince(s *string) *MerchantUpdate
- func (mu *MerchantUpdate) SetProvince(s string) *MerchantUpdate
- func (mu *MerchantUpdate) SetUpdatedAt(t time.Time) *MerchantUpdate
- func (mu *MerchantUpdate) Where(ps ...predicate.Merchant) *MerchantUpdate
- type MerchantUpdateOne
- func (muo *MerchantUpdateOne) AddAccountIDs(ids ...uint64) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) AddAccounts(m ...*MerchantAccount) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) ClearAccounts() *MerchantUpdateOne
- func (muo *MerchantUpdateOne) ClearAddress() *MerchantUpdateOne
- func (muo *MerchantUpdateOne) ClearCity() *MerchantUpdateOne
- func (muo *MerchantUpdateOne) ClearContactPerson() *MerchantUpdateOne
- func (muo *MerchantUpdateOne) ClearContactPhone() *MerchantUpdateOne
- func (muo *MerchantUpdateOne) ClearCountry() *MerchantUpdateOne
- func (muo *MerchantUpdateOne) ClearDeletedAt() *MerchantUpdateOne
- func (muo *MerchantUpdateOne) ClearDistrict() *MerchantUpdateOne
- func (muo *MerchantUpdateOne) ClearProvince() *MerchantUpdateOne
- func (muo *MerchantUpdateOne) Exec(ctx context.Context) error
- func (muo *MerchantUpdateOne) ExecX(ctx context.Context)
- func (muo *MerchantUpdateOne) Mutation() *MerchantMutation
- func (muo *MerchantUpdateOne) RemoveAccountIDs(ids ...uint64) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) RemoveAccounts(m ...*MerchantAccount) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) Save(ctx context.Context) (*Merchant, error)
- func (muo *MerchantUpdateOne) SaveX(ctx context.Context) *Merchant
- func (muo *MerchantUpdateOne) Select(field string, fields ...string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetAddress(s string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetCity(s string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetContactPerson(s string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetContactPhone(s string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetCountry(s string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetDeletedAt(t time.Time) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetDistrict(s string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetMerchantName(s string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetNillableAddress(s *string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetNillableCity(s *string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetNillableContactPerson(s *string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetNillableContactPhone(s *string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetNillableCountry(s *string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetNillableDeletedAt(t *time.Time) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetNillableDistrict(s *string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetNillableMerchantName(s *string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetNillableProvince(s *string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetProvince(s string) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) SetUpdatedAt(t time.Time) *MerchantUpdateOne
- func (muo *MerchantUpdateOne) Where(ps ...predicate.Merchant) *MerchantUpdateOne
- type Merchants
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type PlatformAccount
- type PlatformAccountClient
- func (c *PlatformAccountClient) Create() *PlatformAccountCreate
- func (c *PlatformAccountClient) CreateBulk(builders ...*PlatformAccountCreate) *PlatformAccountCreateBulk
- func (c *PlatformAccountClient) Delete() *PlatformAccountDelete
- func (c *PlatformAccountClient) DeleteOne(pa *PlatformAccount) *PlatformAccountDeleteOne
- func (c *PlatformAccountClient) DeleteOneID(id uint64) *PlatformAccountDeleteOne
- func (c *PlatformAccountClient) Get(ctx context.Context, id uint64) (*PlatformAccount, error)
- func (c *PlatformAccountClient) GetX(ctx context.Context, id uint64) *PlatformAccount
- func (c *PlatformAccountClient) Hooks() []Hook
- func (c *PlatformAccountClient) Intercept(interceptors ...Interceptor)
- func (c *PlatformAccountClient) Interceptors() []Interceptor
- func (c *PlatformAccountClient) MapCreateBulk(slice any, setFunc func(*PlatformAccountCreate, int)) *PlatformAccountCreateBulk
- func (c *PlatformAccountClient) Query() *PlatformAccountQuery
- func (c *PlatformAccountClient) Update() *PlatformAccountUpdate
- func (c *PlatformAccountClient) UpdateOne(pa *PlatformAccount) *PlatformAccountUpdateOne
- func (c *PlatformAccountClient) UpdateOneID(id uint64) *PlatformAccountUpdateOne
- func (c *PlatformAccountClient) Use(hooks ...Hook)
- type PlatformAccountCreate
- func (pac *PlatformAccountCreate) Exec(ctx context.Context) error
- func (pac *PlatformAccountCreate) ExecX(ctx context.Context)
- func (pac *PlatformAccountCreate) Mutation() *PlatformAccountMutation
- func (pac *PlatformAccountCreate) Save(ctx context.Context) (*PlatformAccount, error)
- func (pac *PlatformAccountCreate) SaveX(ctx context.Context) *PlatformAccount
- func (pac *PlatformAccountCreate) SetCreatedAt(t time.Time) *PlatformAccountCreate
- func (pac *PlatformAccountCreate) SetDeletedAt(t time.Time) *PlatformAccountCreate
- func (pac *PlatformAccountCreate) SetEmail(s string) *PlatformAccountCreate
- func (pac *PlatformAccountCreate) SetID(u uint64) *PlatformAccountCreate
- func (pac *PlatformAccountCreate) SetNillableCreatedAt(t *time.Time) *PlatformAccountCreate
- func (pac *PlatformAccountCreate) SetNillableDeletedAt(t *time.Time) *PlatformAccountCreate
- func (pac *PlatformAccountCreate) SetNillableEmail(s *string) *PlatformAccountCreate
- func (pac *PlatformAccountCreate) SetNillableID(u *uint64) *PlatformAccountCreate
- func (pac *PlatformAccountCreate) SetNillableUpdatedAt(t *time.Time) *PlatformAccountCreate
- func (pac *PlatformAccountCreate) SetPassword(s string) *PlatformAccountCreate
- func (pac *PlatformAccountCreate) SetUpdatedAt(t time.Time) *PlatformAccountCreate
- func (pac *PlatformAccountCreate) SetUsername(s string) *PlatformAccountCreate
- type PlatformAccountCreateBulk
- func (pacb *PlatformAccountCreateBulk) Exec(ctx context.Context) error
- func (pacb *PlatformAccountCreateBulk) ExecX(ctx context.Context)
- func (pacb *PlatformAccountCreateBulk) Save(ctx context.Context) ([]*PlatformAccount, error)
- func (pacb *PlatformAccountCreateBulk) SaveX(ctx context.Context) []*PlatformAccount
- type PlatformAccountDelete
- type PlatformAccountDeleteOne
- type PlatformAccountGroupBy
- func (pagb *PlatformAccountGroupBy) Aggregate(fns ...AggregateFunc) *PlatformAccountGroupBy
- func (s *PlatformAccountGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PlatformAccountGroupBy) BoolX(ctx context.Context) bool
- func (s *PlatformAccountGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PlatformAccountGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PlatformAccountGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PlatformAccountGroupBy) Float64X(ctx context.Context) float64
- func (s *PlatformAccountGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PlatformAccountGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PlatformAccountGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PlatformAccountGroupBy) IntX(ctx context.Context) int
- func (s *PlatformAccountGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PlatformAccountGroupBy) IntsX(ctx context.Context) []int
- func (pagb *PlatformAccountGroupBy) Scan(ctx context.Context, v any) error
- func (s *PlatformAccountGroupBy) ScanX(ctx context.Context, v any)
- func (s *PlatformAccountGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PlatformAccountGroupBy) StringX(ctx context.Context) string
- func (s *PlatformAccountGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PlatformAccountGroupBy) StringsX(ctx context.Context) []string
- type PlatformAccountMutation
- func (m *PlatformAccountMutation) AddField(name string, value ent.Value) error
- func (m *PlatformAccountMutation) AddedEdges() []string
- func (m *PlatformAccountMutation) AddedField(name string) (ent.Value, bool)
- func (m *PlatformAccountMutation) AddedFields() []string
- func (m *PlatformAccountMutation) AddedIDs(name string) []ent.Value
- func (m *PlatformAccountMutation) ClearDeletedAt()
- func (m *PlatformAccountMutation) ClearEdge(name string) error
- func (m *PlatformAccountMutation) ClearEmail()
- func (m *PlatformAccountMutation) ClearField(name string) error
- func (m *PlatformAccountMutation) ClearedEdges() []string
- func (m *PlatformAccountMutation) ClearedFields() []string
- func (m PlatformAccountMutation) Client() *Client
- func (m *PlatformAccountMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PlatformAccountMutation) DeletedAt() (r time.Time, exists bool)
- func (m *PlatformAccountMutation) DeletedAtCleared() bool
- func (m *PlatformAccountMutation) EdgeCleared(name string) bool
- func (m *PlatformAccountMutation) Email() (r string, exists bool)
- func (m *PlatformAccountMutation) EmailCleared() bool
- func (m *PlatformAccountMutation) Field(name string) (ent.Value, bool)
- func (m *PlatformAccountMutation) FieldCleared(name string) bool
- func (m *PlatformAccountMutation) Fields() []string
- func (m *PlatformAccountMutation) ID() (id uint64, exists bool)
- func (m *PlatformAccountMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *PlatformAccountMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PlatformAccountMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *PlatformAccountMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *PlatformAccountMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PlatformAccountMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *PlatformAccountMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PlatformAccountMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *PlatformAccountMutation) Op() Op
- func (m *PlatformAccountMutation) Password() (r string, exists bool)
- func (m *PlatformAccountMutation) RemovedEdges() []string
- func (m *PlatformAccountMutation) RemovedIDs(name string) []ent.Value
- func (m *PlatformAccountMutation) ResetCreatedAt()
- func (m *PlatformAccountMutation) ResetDeletedAt()
- func (m *PlatformAccountMutation) ResetEdge(name string) error
- func (m *PlatformAccountMutation) ResetEmail()
- func (m *PlatformAccountMutation) ResetField(name string) error
- func (m *PlatformAccountMutation) ResetPassword()
- func (m *PlatformAccountMutation) ResetUpdatedAt()
- func (m *PlatformAccountMutation) ResetUsername()
- func (m *PlatformAccountMutation) SetCreatedAt(t time.Time)
- func (m *PlatformAccountMutation) SetDeletedAt(t time.Time)
- func (m *PlatformAccountMutation) SetEmail(s string)
- func (m *PlatformAccountMutation) SetField(name string, value ent.Value) error
- func (m *PlatformAccountMutation) SetID(id uint64)
- func (m *PlatformAccountMutation) SetOp(op Op)
- func (m *PlatformAccountMutation) SetPassword(s string)
- func (m *PlatformAccountMutation) SetUpdatedAt(t time.Time)
- func (m *PlatformAccountMutation) SetUsername(s string)
- func (m PlatformAccountMutation) Tx() (*Tx, error)
- func (m *PlatformAccountMutation) Type() string
- func (m *PlatformAccountMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PlatformAccountMutation) Username() (r string, exists bool)
- func (m *PlatformAccountMutation) Where(ps ...predicate.PlatformAccount)
- func (m *PlatformAccountMutation) WhereP(ps ...func(*sql.Selector))
- type PlatformAccountQuery
- func (paq *PlatformAccountQuery) Aggregate(fns ...AggregateFunc) *PlatformAccountSelect
- func (paq *PlatformAccountQuery) All(ctx context.Context) ([]*PlatformAccount, error)
- func (paq *PlatformAccountQuery) AllX(ctx context.Context) []*PlatformAccount
- func (paq *PlatformAccountQuery) Clone() *PlatformAccountQuery
- func (paq *PlatformAccountQuery) Count(ctx context.Context) (int, error)
- func (paq *PlatformAccountQuery) CountX(ctx context.Context) int
- func (paq *PlatformAccountQuery) Exist(ctx context.Context) (bool, error)
- func (paq *PlatformAccountQuery) ExistX(ctx context.Context) bool
- func (paq *PlatformAccountQuery) First(ctx context.Context) (*PlatformAccount, error)
- func (paq *PlatformAccountQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (paq *PlatformAccountQuery) FirstIDX(ctx context.Context) uint64
- func (paq *PlatformAccountQuery) FirstX(ctx context.Context) *PlatformAccount
- func (paq *PlatformAccountQuery) GroupBy(field string, fields ...string) *PlatformAccountGroupBy
- func (paq *PlatformAccountQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (paq *PlatformAccountQuery) IDsX(ctx context.Context) []uint64
- func (paq *PlatformAccountQuery) Limit(limit int) *PlatformAccountQuery
- func (paq *PlatformAccountQuery) Offset(offset int) *PlatformAccountQuery
- func (paq *PlatformAccountQuery) Only(ctx context.Context) (*PlatformAccount, error)
- func (paq *PlatformAccountQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (paq *PlatformAccountQuery) OnlyIDX(ctx context.Context) uint64
- func (paq *PlatformAccountQuery) OnlyX(ctx context.Context) *PlatformAccount
- func (paq *PlatformAccountQuery) Order(o ...platformaccount.OrderOption) *PlatformAccountQuery
- func (paq *PlatformAccountQuery) Select(fields ...string) *PlatformAccountSelect
- func (paq *PlatformAccountQuery) Unique(unique bool) *PlatformAccountQuery
- func (paq *PlatformAccountQuery) Where(ps ...predicate.PlatformAccount) *PlatformAccountQuery
- type PlatformAccountSelect
- func (pas *PlatformAccountSelect) Aggregate(fns ...AggregateFunc) *PlatformAccountSelect
- func (s *PlatformAccountSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PlatformAccountSelect) BoolX(ctx context.Context) bool
- func (s *PlatformAccountSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PlatformAccountSelect) BoolsX(ctx context.Context) []bool
- func (s *PlatformAccountSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PlatformAccountSelect) Float64X(ctx context.Context) float64
- func (s *PlatformAccountSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PlatformAccountSelect) Float64sX(ctx context.Context) []float64
- func (s *PlatformAccountSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PlatformAccountSelect) IntX(ctx context.Context) int
- func (s *PlatformAccountSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PlatformAccountSelect) IntsX(ctx context.Context) []int
- func (pas *PlatformAccountSelect) Scan(ctx context.Context, v any) error
- func (s *PlatformAccountSelect) ScanX(ctx context.Context, v any)
- func (s *PlatformAccountSelect) String(ctx context.Context) (_ string, err error)
- func (s *PlatformAccountSelect) StringX(ctx context.Context) string
- func (s *PlatformAccountSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PlatformAccountSelect) StringsX(ctx context.Context) []string
- type PlatformAccountUpdate
- func (pau *PlatformAccountUpdate) ClearDeletedAt() *PlatformAccountUpdate
- func (pau *PlatformAccountUpdate) ClearEmail() *PlatformAccountUpdate
- func (pau *PlatformAccountUpdate) Exec(ctx context.Context) error
- func (pau *PlatformAccountUpdate) ExecX(ctx context.Context)
- func (pau *PlatformAccountUpdate) Mutation() *PlatformAccountMutation
- func (pau *PlatformAccountUpdate) Save(ctx context.Context) (int, error)
- func (pau *PlatformAccountUpdate) SaveX(ctx context.Context) int
- func (pau *PlatformAccountUpdate) SetDeletedAt(t time.Time) *PlatformAccountUpdate
- func (pau *PlatformAccountUpdate) SetEmail(s string) *PlatformAccountUpdate
- func (pau *PlatformAccountUpdate) SetNillableDeletedAt(t *time.Time) *PlatformAccountUpdate
- func (pau *PlatformAccountUpdate) SetNillableEmail(s *string) *PlatformAccountUpdate
- func (pau *PlatformAccountUpdate) SetNillablePassword(s *string) *PlatformAccountUpdate
- func (pau *PlatformAccountUpdate) SetNillableUsername(s *string) *PlatformAccountUpdate
- func (pau *PlatformAccountUpdate) SetPassword(s string) *PlatformAccountUpdate
- func (pau *PlatformAccountUpdate) SetUpdatedAt(t time.Time) *PlatformAccountUpdate
- func (pau *PlatformAccountUpdate) SetUsername(s string) *PlatformAccountUpdate
- func (pau *PlatformAccountUpdate) Where(ps ...predicate.PlatformAccount) *PlatformAccountUpdate
- type PlatformAccountUpdateOne
- func (pauo *PlatformAccountUpdateOne) ClearDeletedAt() *PlatformAccountUpdateOne
- func (pauo *PlatformAccountUpdateOne) ClearEmail() *PlatformAccountUpdateOne
- func (pauo *PlatformAccountUpdateOne) Exec(ctx context.Context) error
- func (pauo *PlatformAccountUpdateOne) ExecX(ctx context.Context)
- func (pauo *PlatformAccountUpdateOne) Mutation() *PlatformAccountMutation
- func (pauo *PlatformAccountUpdateOne) Save(ctx context.Context) (*PlatformAccount, error)
- func (pauo *PlatformAccountUpdateOne) SaveX(ctx context.Context) *PlatformAccount
- func (pauo *PlatformAccountUpdateOne) Select(field string, fields ...string) *PlatformAccountUpdateOne
- func (pauo *PlatformAccountUpdateOne) SetDeletedAt(t time.Time) *PlatformAccountUpdateOne
- func (pauo *PlatformAccountUpdateOne) SetEmail(s string) *PlatformAccountUpdateOne
- func (pauo *PlatformAccountUpdateOne) SetNillableDeletedAt(t *time.Time) *PlatformAccountUpdateOne
- func (pauo *PlatformAccountUpdateOne) SetNillableEmail(s *string) *PlatformAccountUpdateOne
- func (pauo *PlatformAccountUpdateOne) SetNillablePassword(s *string) *PlatformAccountUpdateOne
- func (pauo *PlatformAccountUpdateOne) SetNillableUsername(s *string) *PlatformAccountUpdateOne
- func (pauo *PlatformAccountUpdateOne) SetPassword(s string) *PlatformAccountUpdateOne
- func (pauo *PlatformAccountUpdateOne) SetUpdatedAt(t time.Time) *PlatformAccountUpdateOne
- func (pauo *PlatformAccountUpdateOne) SetUsername(s string) *PlatformAccountUpdateOne
- func (pauo *PlatformAccountUpdateOne) Where(ps ...predicate.PlatformAccount) *PlatformAccountUpdateOne
- type PlatformAccounts
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type User
- func (u *User) QueryDefaultMerchant() *MerchantQuery
- func (u *User) QueryIntroducer() *UserLoginMethodQuery
- func (u *User) QueryLoginMethods() *UserLoginMethodQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- func (u *User) Value(name string) (ent.Value, error)
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uint64) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uint64) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uint64) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryDefaultMerchant(u *User) *MerchantQuery
- func (c *UserClient) QueryIntroducer(u *User) *UserLoginMethodQuery
- func (c *UserClient) QueryLoginMethods(u *User) *UserLoginMethodQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uint64) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddLoginMethodIDs(ids ...uint64) *UserCreate
- func (uc *UserCreate) AddLoginMethods(u ...*UserLoginMethod) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDefaultMerchant(m *Merchant) *UserCreate
- func (uc *UserCreate) SetDefaultMerchantID(id uint64) *UserCreate
- func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetID(u uint64) *UserCreate
- func (uc *UserCreate) SetIntroducer(u *UserLoginMethod) *UserCreate
- func (uc *UserCreate) SetIntroducerID(id uint64) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDefaultMerchantID(id *uint64) *UserCreate
- func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableEmail(s *string) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uint64) *UserCreate
- func (uc *UserCreate) SetNillableIntroducerID(id *uint64) *UserCreate
- func (uc *UserCreate) SetNillablePhone(s *string) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPhone(s string) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserLoginMethod
- type UserLoginMethodClient
- func (c *UserLoginMethodClient) Create() *UserLoginMethodCreate
- func (c *UserLoginMethodClient) CreateBulk(builders ...*UserLoginMethodCreate) *UserLoginMethodCreateBulk
- func (c *UserLoginMethodClient) Delete() *UserLoginMethodDelete
- func (c *UserLoginMethodClient) DeleteOne(ulm *UserLoginMethod) *UserLoginMethodDeleteOne
- func (c *UserLoginMethodClient) DeleteOneID(id uint64) *UserLoginMethodDeleteOne
- func (c *UserLoginMethodClient) Get(ctx context.Context, id uint64) (*UserLoginMethod, error)
- func (c *UserLoginMethodClient) GetX(ctx context.Context, id uint64) *UserLoginMethod
- func (c *UserLoginMethodClient) Hooks() []Hook
- func (c *UserLoginMethodClient) Intercept(interceptors ...Interceptor)
- func (c *UserLoginMethodClient) Interceptors() []Interceptor
- func (c *UserLoginMethodClient) MapCreateBulk(slice any, setFunc func(*UserLoginMethodCreate, int)) *UserLoginMethodCreateBulk
- func (c *UserLoginMethodClient) Query() *UserLoginMethodQuery
- func (c *UserLoginMethodClient) Update() *UserLoginMethodUpdate
- func (c *UserLoginMethodClient) UpdateOne(ulm *UserLoginMethod) *UserLoginMethodUpdateOne
- func (c *UserLoginMethodClient) UpdateOneID(id uint64) *UserLoginMethodUpdateOne
- func (c *UserLoginMethodClient) Use(hooks ...Hook)
- type UserLoginMethodCreate
- func (ulmc *UserLoginMethodCreate) Exec(ctx context.Context) error
- func (ulmc *UserLoginMethodCreate) ExecX(ctx context.Context)
- func (ulmc *UserLoginMethodCreate) Mutation() *UserLoginMethodMutation
- func (ulmc *UserLoginMethodCreate) Save(ctx context.Context) (*UserLoginMethod, error)
- func (ulmc *UserLoginMethodCreate) SaveX(ctx context.Context) *UserLoginMethod
- func (ulmc *UserLoginMethodCreate) SetCreatedAt(t time.Time) *UserLoginMethodCreate
- func (ulmc *UserLoginMethodCreate) SetDeletedAt(t time.Time) *UserLoginMethodCreate
- func (ulmc *UserLoginMethodCreate) SetID(u uint64) *UserLoginMethodCreate
- func (ulmc *UserLoginMethodCreate) SetIdentifier(s string) *UserLoginMethodCreate
- func (ulmc *UserLoginMethodCreate) SetLoginType(s string) *UserLoginMethodCreate
- func (ulmc *UserLoginMethodCreate) SetNillableCreatedAt(t *time.Time) *UserLoginMethodCreate
- func (ulmc *UserLoginMethodCreate) SetNillableDeletedAt(t *time.Time) *UserLoginMethodCreate
- func (ulmc *UserLoginMethodCreate) SetNillableID(u *uint64) *UserLoginMethodCreate
- func (ulmc *UserLoginMethodCreate) SetNillableUpdatedAt(t *time.Time) *UserLoginMethodCreate
- func (ulmc *UserLoginMethodCreate) SetUpdatedAt(t time.Time) *UserLoginMethodCreate
- type UserLoginMethodCreateBulk
- func (ulmcb *UserLoginMethodCreateBulk) Exec(ctx context.Context) error
- func (ulmcb *UserLoginMethodCreateBulk) ExecX(ctx context.Context)
- func (ulmcb *UserLoginMethodCreateBulk) Save(ctx context.Context) ([]*UserLoginMethod, error)
- func (ulmcb *UserLoginMethodCreateBulk) SaveX(ctx context.Context) []*UserLoginMethod
- type UserLoginMethodDelete
- type UserLoginMethodDeleteOne
- type UserLoginMethodGroupBy
- func (ulmgb *UserLoginMethodGroupBy) Aggregate(fns ...AggregateFunc) *UserLoginMethodGroupBy
- func (s *UserLoginMethodGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserLoginMethodGroupBy) BoolX(ctx context.Context) bool
- func (s *UserLoginMethodGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserLoginMethodGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserLoginMethodGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserLoginMethodGroupBy) Float64X(ctx context.Context) float64
- func (s *UserLoginMethodGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserLoginMethodGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserLoginMethodGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserLoginMethodGroupBy) IntX(ctx context.Context) int
- func (s *UserLoginMethodGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserLoginMethodGroupBy) IntsX(ctx context.Context) []int
- func (ulmgb *UserLoginMethodGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserLoginMethodGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserLoginMethodGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserLoginMethodGroupBy) StringX(ctx context.Context) string
- func (s *UserLoginMethodGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserLoginMethodGroupBy) StringsX(ctx context.Context) []string
- type UserLoginMethodMutation
- func (m *UserLoginMethodMutation) AddField(name string, value ent.Value) error
- func (m *UserLoginMethodMutation) AddedEdges() []string
- func (m *UserLoginMethodMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserLoginMethodMutation) AddedFields() []string
- func (m *UserLoginMethodMutation) AddedIDs(name string) []ent.Value
- func (m *UserLoginMethodMutation) ClearDeletedAt()
- func (m *UserLoginMethodMutation) ClearEdge(name string) error
- func (m *UserLoginMethodMutation) ClearField(name string) error
- func (m *UserLoginMethodMutation) ClearedEdges() []string
- func (m *UserLoginMethodMutation) ClearedFields() []string
- func (m UserLoginMethodMutation) Client() *Client
- func (m *UserLoginMethodMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserLoginMethodMutation) DeletedAt() (r time.Time, exists bool)
- func (m *UserLoginMethodMutation) DeletedAtCleared() bool
- func (m *UserLoginMethodMutation) EdgeCleared(name string) bool
- func (m *UserLoginMethodMutation) Field(name string) (ent.Value, bool)
- func (m *UserLoginMethodMutation) FieldCleared(name string) bool
- func (m *UserLoginMethodMutation) Fields() []string
- func (m *UserLoginMethodMutation) ID() (id uint64, exists bool)
- func (m *UserLoginMethodMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *UserLoginMethodMutation) Identifier() (r string, exists bool)
- func (m *UserLoginMethodMutation) LoginType() (r string, exists bool)
- func (m *UserLoginMethodMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserLoginMethodMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserLoginMethodMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserLoginMethodMutation) OldIdentifier(ctx context.Context) (v string, err error)
- func (m *UserLoginMethodMutation) OldLoginType(ctx context.Context) (v string, err error)
- func (m *UserLoginMethodMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserLoginMethodMutation) Op() Op
- func (m *UserLoginMethodMutation) RemovedEdges() []string
- func (m *UserLoginMethodMutation) RemovedIDs(name string) []ent.Value
- func (m *UserLoginMethodMutation) ResetCreatedAt()
- func (m *UserLoginMethodMutation) ResetDeletedAt()
- func (m *UserLoginMethodMutation) ResetEdge(name string) error
- func (m *UserLoginMethodMutation) ResetField(name string) error
- func (m *UserLoginMethodMutation) ResetIdentifier()
- func (m *UserLoginMethodMutation) ResetLoginType()
- func (m *UserLoginMethodMutation) ResetUpdatedAt()
- func (m *UserLoginMethodMutation) SetCreatedAt(t time.Time)
- func (m *UserLoginMethodMutation) SetDeletedAt(t time.Time)
- func (m *UserLoginMethodMutation) SetField(name string, value ent.Value) error
- func (m *UserLoginMethodMutation) SetID(id uint64)
- func (m *UserLoginMethodMutation) SetIdentifier(s string)
- func (m *UserLoginMethodMutation) SetLoginType(s string)
- func (m *UserLoginMethodMutation) SetOp(op Op)
- func (m *UserLoginMethodMutation) SetUpdatedAt(t time.Time)
- func (m UserLoginMethodMutation) Tx() (*Tx, error)
- func (m *UserLoginMethodMutation) Type() string
- func (m *UserLoginMethodMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserLoginMethodMutation) Where(ps ...predicate.UserLoginMethod)
- func (m *UserLoginMethodMutation) WhereP(ps ...func(*sql.Selector))
- type UserLoginMethodQuery
- func (ulmq *UserLoginMethodQuery) Aggregate(fns ...AggregateFunc) *UserLoginMethodSelect
- func (ulmq *UserLoginMethodQuery) All(ctx context.Context) ([]*UserLoginMethod, error)
- func (ulmq *UserLoginMethodQuery) AllX(ctx context.Context) []*UserLoginMethod
- func (ulmq *UserLoginMethodQuery) Clone() *UserLoginMethodQuery
- func (ulmq *UserLoginMethodQuery) Count(ctx context.Context) (int, error)
- func (ulmq *UserLoginMethodQuery) CountX(ctx context.Context) int
- func (ulmq *UserLoginMethodQuery) Exist(ctx context.Context) (bool, error)
- func (ulmq *UserLoginMethodQuery) ExistX(ctx context.Context) bool
- func (ulmq *UserLoginMethodQuery) First(ctx context.Context) (*UserLoginMethod, error)
- func (ulmq *UserLoginMethodQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (ulmq *UserLoginMethodQuery) FirstIDX(ctx context.Context) uint64
- func (ulmq *UserLoginMethodQuery) FirstX(ctx context.Context) *UserLoginMethod
- func (ulmq *UserLoginMethodQuery) GroupBy(field string, fields ...string) *UserLoginMethodGroupBy
- func (ulmq *UserLoginMethodQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (ulmq *UserLoginMethodQuery) IDsX(ctx context.Context) []uint64
- func (ulmq *UserLoginMethodQuery) Limit(limit int) *UserLoginMethodQuery
- func (ulmq *UserLoginMethodQuery) Offset(offset int) *UserLoginMethodQuery
- func (ulmq *UserLoginMethodQuery) Only(ctx context.Context) (*UserLoginMethod, error)
- func (ulmq *UserLoginMethodQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (ulmq *UserLoginMethodQuery) OnlyIDX(ctx context.Context) uint64
- func (ulmq *UserLoginMethodQuery) OnlyX(ctx context.Context) *UserLoginMethod
- func (ulmq *UserLoginMethodQuery) Order(o ...userloginmethod.OrderOption) *UserLoginMethodQuery
- func (ulmq *UserLoginMethodQuery) Select(fields ...string) *UserLoginMethodSelect
- func (ulmq *UserLoginMethodQuery) Unique(unique bool) *UserLoginMethodQuery
- func (ulmq *UserLoginMethodQuery) Where(ps ...predicate.UserLoginMethod) *UserLoginMethodQuery
- type UserLoginMethodSelect
- func (ulms *UserLoginMethodSelect) Aggregate(fns ...AggregateFunc) *UserLoginMethodSelect
- func (s *UserLoginMethodSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserLoginMethodSelect) BoolX(ctx context.Context) bool
- func (s *UserLoginMethodSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserLoginMethodSelect) BoolsX(ctx context.Context) []bool
- func (s *UserLoginMethodSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserLoginMethodSelect) Float64X(ctx context.Context) float64
- func (s *UserLoginMethodSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserLoginMethodSelect) Float64sX(ctx context.Context) []float64
- func (s *UserLoginMethodSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserLoginMethodSelect) IntX(ctx context.Context) int
- func (s *UserLoginMethodSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserLoginMethodSelect) IntsX(ctx context.Context) []int
- func (ulms *UserLoginMethodSelect) Scan(ctx context.Context, v any) error
- func (s *UserLoginMethodSelect) ScanX(ctx context.Context, v any)
- func (s *UserLoginMethodSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserLoginMethodSelect) StringX(ctx context.Context) string
- func (s *UserLoginMethodSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserLoginMethodSelect) StringsX(ctx context.Context) []string
- type UserLoginMethodUpdate
- func (ulmu *UserLoginMethodUpdate) ClearDeletedAt() *UserLoginMethodUpdate
- func (ulmu *UserLoginMethodUpdate) Exec(ctx context.Context) error
- func (ulmu *UserLoginMethodUpdate) ExecX(ctx context.Context)
- func (ulmu *UserLoginMethodUpdate) Mutation() *UserLoginMethodMutation
- func (ulmu *UserLoginMethodUpdate) Save(ctx context.Context) (int, error)
- func (ulmu *UserLoginMethodUpdate) SaveX(ctx context.Context) int
- func (ulmu *UserLoginMethodUpdate) SetDeletedAt(t time.Time) *UserLoginMethodUpdate
- func (ulmu *UserLoginMethodUpdate) SetIdentifier(s string) *UserLoginMethodUpdate
- func (ulmu *UserLoginMethodUpdate) SetLoginType(s string) *UserLoginMethodUpdate
- func (ulmu *UserLoginMethodUpdate) SetNillableDeletedAt(t *time.Time) *UserLoginMethodUpdate
- func (ulmu *UserLoginMethodUpdate) SetNillableIdentifier(s *string) *UserLoginMethodUpdate
- func (ulmu *UserLoginMethodUpdate) SetNillableLoginType(s *string) *UserLoginMethodUpdate
- func (ulmu *UserLoginMethodUpdate) SetUpdatedAt(t time.Time) *UserLoginMethodUpdate
- func (ulmu *UserLoginMethodUpdate) Where(ps ...predicate.UserLoginMethod) *UserLoginMethodUpdate
- type UserLoginMethodUpdateOne
- func (ulmuo *UserLoginMethodUpdateOne) ClearDeletedAt() *UserLoginMethodUpdateOne
- func (ulmuo *UserLoginMethodUpdateOne) Exec(ctx context.Context) error
- func (ulmuo *UserLoginMethodUpdateOne) ExecX(ctx context.Context)
- func (ulmuo *UserLoginMethodUpdateOne) Mutation() *UserLoginMethodMutation
- func (ulmuo *UserLoginMethodUpdateOne) Save(ctx context.Context) (*UserLoginMethod, error)
- func (ulmuo *UserLoginMethodUpdateOne) SaveX(ctx context.Context) *UserLoginMethod
- func (ulmuo *UserLoginMethodUpdateOne) Select(field string, fields ...string) *UserLoginMethodUpdateOne
- func (ulmuo *UserLoginMethodUpdateOne) SetDeletedAt(t time.Time) *UserLoginMethodUpdateOne
- func (ulmuo *UserLoginMethodUpdateOne) SetIdentifier(s string) *UserLoginMethodUpdateOne
- func (ulmuo *UserLoginMethodUpdateOne) SetLoginType(s string) *UserLoginMethodUpdateOne
- func (ulmuo *UserLoginMethodUpdateOne) SetNillableDeletedAt(t *time.Time) *UserLoginMethodUpdateOne
- func (ulmuo *UserLoginMethodUpdateOne) SetNillableIdentifier(s *string) *UserLoginMethodUpdateOne
- func (ulmuo *UserLoginMethodUpdateOne) SetNillableLoginType(s *string) *UserLoginMethodUpdateOne
- func (ulmuo *UserLoginMethodUpdateOne) SetUpdatedAt(t time.Time) *UserLoginMethodUpdateOne
- func (ulmuo *UserLoginMethodUpdateOne) Where(ps ...predicate.UserLoginMethod) *UserLoginMethodUpdateOne
- type UserLoginMethods
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddLoginMethodIDs(ids ...uint64)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearDefaultMerchant()
- func (m *UserMutation) ClearDeletedAt()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearEmail()
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearIntroducer()
- func (m *UserMutation) ClearLoginMethods()
- func (m *UserMutation) ClearPhone()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) DefaultMerchantCleared() bool
- func (m *UserMutation) DefaultMerchantID() (id uint64, exists bool)
- func (m *UserMutation) DefaultMerchantIDs() (ids []uint64)
- func (m *UserMutation) DeletedAt() (r time.Time, exists bool)
- func (m *UserMutation) DeletedAtCleared() bool
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) EmailCleared() bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id uint64, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *UserMutation) IntroducerCleared() bool
- func (m *UserMutation) IntroducerID() (id uint64, exists bool)
- func (m *UserMutation) IntroducerIDs() (ids []uint64)
- func (m *UserMutation) LoginMethodsCleared() bool
- func (m *UserMutation) LoginMethodsIDs() (ids []uint64)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldPhone(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Phone() (r string, exists bool)
- func (m *UserMutation) PhoneCleared() bool
- func (m *UserMutation) RemoveLoginMethodIDs(ids ...uint64)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedLoginMethodsIDs() (ids []uint64)
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetDefaultMerchant()
- func (m *UserMutation) ResetDeletedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetIntroducer()
- func (m *UserMutation) ResetLoginMethods()
- func (m *UserMutation) ResetPhone()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetDefaultMerchantID(id uint64)
- func (m *UserMutation) SetDeletedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uint64)
- func (m *UserMutation) SetIntroducerID(id uint64)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPhone(s string)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) SetUsername(s string)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Username() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uint64
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uint64
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uint64
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryDefaultMerchant() *MerchantQuery
- func (uq *UserQuery) QueryIntroducer() *UserLoginMethodQuery
- func (uq *UserQuery) QueryLoginMethods() *UserLoginMethodQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithDefaultMerchant(opts ...func(*MerchantQuery)) *UserQuery
- func (uq *UserQuery) WithIntroducer(opts ...func(*UserLoginMethodQuery)) *UserQuery
- func (uq *UserQuery) WithLoginMethods(opts ...func(*UserLoginMethodQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddLoginMethodIDs(ids ...uint64) *UserUpdate
- func (uu *UserUpdate) AddLoginMethods(u ...*UserLoginMethod) *UserUpdate
- func (uu *UserUpdate) ClearDefaultMerchant() *UserUpdate
- func (uu *UserUpdate) ClearDeletedAt() *UserUpdate
- func (uu *UserUpdate) ClearEmail() *UserUpdate
- func (uu *UserUpdate) ClearIntroducer() *UserUpdate
- func (uu *UserUpdate) ClearLoginMethods() *UserUpdate
- func (uu *UserUpdate) ClearPhone() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveLoginMethodIDs(ids ...uint64) *UserUpdate
- func (uu *UserUpdate) RemoveLoginMethods(u ...*UserLoginMethod) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetDefaultMerchant(m *Merchant) *UserUpdate
- func (uu *UserUpdate) SetDefaultMerchantID(id uint64) *UserUpdate
- func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetIntroducer(u *UserLoginMethod) *UserUpdate
- func (uu *UserUpdate) SetIntroducerID(id uint64) *UserUpdate
- func (uu *UserUpdate) SetNillableDefaultMerchantID(id *uint64) *UserUpdate
- func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableIntroducerID(id *uint64) *UserUpdate
- func (uu *UserUpdate) SetNillablePhone(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableUsername(s *string) *UserUpdate
- func (uu *UserUpdate) SetPhone(s string) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddLoginMethodIDs(ids ...uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddLoginMethods(u ...*UserLoginMethod) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDefaultMerchant() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearEmail() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearIntroducer() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearLoginMethods() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPhone() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveLoginMethodIDs(ids ...uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveLoginMethods(u ...*UserLoginMethod) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDefaultMerchant(m *Merchant) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDefaultMerchantID(id uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIntroducer(u *UserLoginMethod) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIntroducerID(id uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDefaultMerchantID(id *uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIntroducerID(id *uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePhone(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUsername(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPhone(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeMerchant = "Merchant" TypeMerchantAccount = "MerchantAccount" TypePlatformAccount = "PlatformAccount" TypeUser = "User" TypeUserLoginMethod = "UserLoginMethod" )
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 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 // Merchant is the client for interacting with the Merchant builders. Merchant *MerchantClient // MerchantAccount is the client for interacting with the MerchantAccount builders. MerchantAccount *MerchantAccountClient // PlatformAccount is the client for interacting with the PlatformAccount builders. PlatformAccount *PlatformAccountClient // User is the client for interacting with the User builders. User *UserClient // UserLoginMethod is the client for interacting with the UserLoginMethod builders. UserLoginMethod *UserLoginMethodClient // 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(). Merchant. 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 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 Merchant ¶
type Merchant struct { // ID of the ent. ID uint64 `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"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at,omitempty"` // MerchantName holds the value of the "merchant_name" field. MerchantName string `json:"merchant_name,omitempty"` // ContactPerson holds the value of the "contact_person" field. ContactPerson string `json:"contact_person,omitempty"` // ContactPhone holds the value of the "contact_phone" field. ContactPhone string `json:"contact_phone,omitempty"` // Country holds the value of the "country" field. Country string `json:"country,omitempty"` // Province holds the value of the "province" field. Province string `json:"province,omitempty"` // City holds the value of the "city" field. City string `json:"city,omitempty"` // District holds the value of the "district" field. District string `json:"district,omitempty"` // Address holds the value of the "address" field. Address string `json:"address,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MerchantQuery when eager-loading is set. Edges MerchantEdges `json:"edges"` // contains filtered or unexported fields }
Merchant is the model entity for the Merchant schema.
func (*Merchant) QueryAccounts ¶
func (m *Merchant) QueryAccounts() *MerchantAccountQuery
QueryAccounts queries the "accounts" edge of the Merchant entity.
func (*Merchant) Unwrap ¶
Unwrap unwraps the Merchant 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 (*Merchant) Update ¶
func (m *Merchant) Update() *MerchantUpdateOne
Update returns a builder for updating this Merchant. Note that you need to call Merchant.Unwrap() before calling this method if this Merchant was returned from a transaction, and the transaction was committed or rolled back.
type MerchantAccount ¶
type MerchantAccount struct { // ID of the ent. ID uint64 `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"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Phone holds the value of the "phone" field. Phone string `json:"phone,omitempty"` // IsMainAccount holds the value of the "is_main_account" field. IsMainAccount bool `json:"is_main_account,omitempty"` // contains filtered or unexported fields }
MerchantAccount is the model entity for the MerchantAccount schema.
func (*MerchantAccount) String ¶
func (ma *MerchantAccount) String() string
String implements the fmt.Stringer.
func (*MerchantAccount) Unwrap ¶
func (ma *MerchantAccount) Unwrap() *MerchantAccount
Unwrap unwraps the MerchantAccount 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 (*MerchantAccount) Update ¶
func (ma *MerchantAccount) Update() *MerchantAccountUpdateOne
Update returns a builder for updating this MerchantAccount. Note that you need to call MerchantAccount.Unwrap() before calling this method if this MerchantAccount was returned from a transaction, and the transaction was committed or rolled back.
type MerchantAccountClient ¶
type MerchantAccountClient struct {
// contains filtered or unexported fields
}
MerchantAccountClient is a client for the MerchantAccount schema.
func NewMerchantAccountClient ¶
func NewMerchantAccountClient(c config) *MerchantAccountClient
NewMerchantAccountClient returns a client for the MerchantAccount from the given config.
func (*MerchantAccountClient) Create ¶
func (c *MerchantAccountClient) Create() *MerchantAccountCreate
Create returns a builder for creating a MerchantAccount entity.
func (*MerchantAccountClient) CreateBulk ¶
func (c *MerchantAccountClient) CreateBulk(builders ...*MerchantAccountCreate) *MerchantAccountCreateBulk
CreateBulk returns a builder for creating a bulk of MerchantAccount entities.
func (*MerchantAccountClient) Delete ¶
func (c *MerchantAccountClient) Delete() *MerchantAccountDelete
Delete returns a delete builder for MerchantAccount.
func (*MerchantAccountClient) DeleteOne ¶
func (c *MerchantAccountClient) DeleteOne(ma *MerchantAccount) *MerchantAccountDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MerchantAccountClient) DeleteOneID ¶
func (c *MerchantAccountClient) DeleteOneID(id uint64) *MerchantAccountDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MerchantAccountClient) Get ¶
func (c *MerchantAccountClient) Get(ctx context.Context, id uint64) (*MerchantAccount, error)
Get returns a MerchantAccount entity by its id.
func (*MerchantAccountClient) GetX ¶
func (c *MerchantAccountClient) GetX(ctx context.Context, id uint64) *MerchantAccount
GetX is like Get, but panics if an error occurs.
func (*MerchantAccountClient) Hooks ¶
func (c *MerchantAccountClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MerchantAccountClient) Intercept ¶
func (c *MerchantAccountClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `merchantaccount.Intercept(f(g(h())))`.
func (*MerchantAccountClient) Interceptors ¶
func (c *MerchantAccountClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MerchantAccountClient) MapCreateBulk ¶
func (c *MerchantAccountClient) MapCreateBulk(slice any, setFunc func(*MerchantAccountCreate, int)) *MerchantAccountCreateBulk
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 (*MerchantAccountClient) Query ¶
func (c *MerchantAccountClient) Query() *MerchantAccountQuery
Query returns a query builder for MerchantAccount.
func (*MerchantAccountClient) Update ¶
func (c *MerchantAccountClient) Update() *MerchantAccountUpdate
Update returns an update builder for MerchantAccount.
func (*MerchantAccountClient) UpdateOne ¶
func (c *MerchantAccountClient) UpdateOne(ma *MerchantAccount) *MerchantAccountUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MerchantAccountClient) UpdateOneID ¶
func (c *MerchantAccountClient) UpdateOneID(id uint64) *MerchantAccountUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MerchantAccountClient) Use ¶
func (c *MerchantAccountClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `merchantaccount.Hooks(f(g(h())))`.
type MerchantAccountCreate ¶
type MerchantAccountCreate struct {
// contains filtered or unexported fields
}
MerchantAccountCreate is the builder for creating a MerchantAccount entity.
func (*MerchantAccountCreate) Exec ¶
func (mac *MerchantAccountCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MerchantAccountCreate) ExecX ¶
func (mac *MerchantAccountCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MerchantAccountCreate) Mutation ¶
func (mac *MerchantAccountCreate) Mutation() *MerchantAccountMutation
Mutation returns the MerchantAccountMutation object of the builder.
func (*MerchantAccountCreate) Save ¶
func (mac *MerchantAccountCreate) Save(ctx context.Context) (*MerchantAccount, error)
Save creates the MerchantAccount in the database.
func (*MerchantAccountCreate) SaveX ¶
func (mac *MerchantAccountCreate) SaveX(ctx context.Context) *MerchantAccount
SaveX calls Save and panics if Save returns an error.
func (*MerchantAccountCreate) SetCreatedAt ¶
func (mac *MerchantAccountCreate) SetCreatedAt(t time.Time) *MerchantAccountCreate
SetCreatedAt sets the "created_at" field.
func (*MerchantAccountCreate) SetDeletedAt ¶
func (mac *MerchantAccountCreate) SetDeletedAt(t time.Time) *MerchantAccountCreate
SetDeletedAt sets the "deleted_at" field.
func (*MerchantAccountCreate) SetEmail ¶
func (mac *MerchantAccountCreate) SetEmail(s string) *MerchantAccountCreate
SetEmail sets the "email" field.
func (*MerchantAccountCreate) SetID ¶
func (mac *MerchantAccountCreate) SetID(u uint64) *MerchantAccountCreate
SetID sets the "id" field.
func (*MerchantAccountCreate) SetIsMainAccount ¶
func (mac *MerchantAccountCreate) SetIsMainAccount(b bool) *MerchantAccountCreate
SetIsMainAccount sets the "is_main_account" field.
func (*MerchantAccountCreate) SetNillableCreatedAt ¶
func (mac *MerchantAccountCreate) SetNillableCreatedAt(t *time.Time) *MerchantAccountCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MerchantAccountCreate) SetNillableDeletedAt ¶
func (mac *MerchantAccountCreate) SetNillableDeletedAt(t *time.Time) *MerchantAccountCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MerchantAccountCreate) SetNillableEmail ¶
func (mac *MerchantAccountCreate) SetNillableEmail(s *string) *MerchantAccountCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*MerchantAccountCreate) SetNillableID ¶
func (mac *MerchantAccountCreate) SetNillableID(u *uint64) *MerchantAccountCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*MerchantAccountCreate) SetNillableIsMainAccount ¶
func (mac *MerchantAccountCreate) SetNillableIsMainAccount(b *bool) *MerchantAccountCreate
SetNillableIsMainAccount sets the "is_main_account" field if the given value is not nil.
func (*MerchantAccountCreate) SetNillablePhone ¶
func (mac *MerchantAccountCreate) SetNillablePhone(s *string) *MerchantAccountCreate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*MerchantAccountCreate) SetNillableUpdatedAt ¶
func (mac *MerchantAccountCreate) SetNillableUpdatedAt(t *time.Time) *MerchantAccountCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MerchantAccountCreate) SetPassword ¶
func (mac *MerchantAccountCreate) SetPassword(s string) *MerchantAccountCreate
SetPassword sets the "password" field.
func (*MerchantAccountCreate) SetPhone ¶
func (mac *MerchantAccountCreate) SetPhone(s string) *MerchantAccountCreate
SetPhone sets the "phone" field.
func (*MerchantAccountCreate) SetUpdatedAt ¶
func (mac *MerchantAccountCreate) SetUpdatedAt(t time.Time) *MerchantAccountCreate
SetUpdatedAt sets the "updated_at" field.
func (*MerchantAccountCreate) SetUsername ¶
func (mac *MerchantAccountCreate) SetUsername(s string) *MerchantAccountCreate
SetUsername sets the "username" field.
type MerchantAccountCreateBulk ¶
type MerchantAccountCreateBulk struct {
// contains filtered or unexported fields
}
MerchantAccountCreateBulk is the builder for creating many MerchantAccount entities in bulk.
func (*MerchantAccountCreateBulk) Exec ¶
func (macb *MerchantAccountCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MerchantAccountCreateBulk) ExecX ¶
func (macb *MerchantAccountCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MerchantAccountCreateBulk) Save ¶
func (macb *MerchantAccountCreateBulk) Save(ctx context.Context) ([]*MerchantAccount, error)
Save creates the MerchantAccount entities in the database.
func (*MerchantAccountCreateBulk) SaveX ¶
func (macb *MerchantAccountCreateBulk) SaveX(ctx context.Context) []*MerchantAccount
SaveX is like Save, but panics if an error occurs.
type MerchantAccountDelete ¶
type MerchantAccountDelete struct {
// contains filtered or unexported fields
}
MerchantAccountDelete is the builder for deleting a MerchantAccount entity.
func (*MerchantAccountDelete) Exec ¶
func (mad *MerchantAccountDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MerchantAccountDelete) ExecX ¶
func (mad *MerchantAccountDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MerchantAccountDelete) Where ¶
func (mad *MerchantAccountDelete) Where(ps ...predicate.MerchantAccount) *MerchantAccountDelete
Where appends a list predicates to the MerchantAccountDelete builder.
type MerchantAccountDeleteOne ¶
type MerchantAccountDeleteOne struct {
// contains filtered or unexported fields
}
MerchantAccountDeleteOne is the builder for deleting a single MerchantAccount entity.
func (*MerchantAccountDeleteOne) Exec ¶
func (mado *MerchantAccountDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MerchantAccountDeleteOne) ExecX ¶
func (mado *MerchantAccountDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MerchantAccountDeleteOne) Where ¶
func (mado *MerchantAccountDeleteOne) Where(ps ...predicate.MerchantAccount) *MerchantAccountDeleteOne
Where appends a list predicates to the MerchantAccountDelete builder.
type MerchantAccountGroupBy ¶
type MerchantAccountGroupBy struct {
// contains filtered or unexported fields
}
MerchantAccountGroupBy is the group-by builder for MerchantAccount entities.
func (*MerchantAccountGroupBy) Aggregate ¶
func (magb *MerchantAccountGroupBy) Aggregate(fns ...AggregateFunc) *MerchantAccountGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MerchantAccountGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MerchantAccountGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MerchantAccountGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MerchantAccountGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MerchantAccountGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*MerchantAccountGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MerchantAccountGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MerchantAccountGroupBy) Scan ¶
func (magb *MerchantAccountGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MerchantAccountGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MerchantAccountMutation ¶
type MerchantAccountMutation struct {
// contains filtered or unexported fields
}
MerchantAccountMutation represents an operation that mutates the MerchantAccount nodes in the graph.
func (*MerchantAccountMutation) AddField ¶
func (m *MerchantAccountMutation) 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 (*MerchantAccountMutation) AddedEdges ¶
func (m *MerchantAccountMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MerchantAccountMutation) AddedField ¶
func (m *MerchantAccountMutation) 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 (*MerchantAccountMutation) AddedFields ¶
func (m *MerchantAccountMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MerchantAccountMutation) AddedIDs ¶
func (m *MerchantAccountMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MerchantAccountMutation) ClearDeletedAt ¶
func (m *MerchantAccountMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MerchantAccountMutation) ClearEdge ¶
func (m *MerchantAccountMutation) 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 (*MerchantAccountMutation) ClearEmail ¶
func (m *MerchantAccountMutation) ClearEmail()
ClearEmail clears the value of the "email" field.
func (*MerchantAccountMutation) ClearField ¶
func (m *MerchantAccountMutation) 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 (*MerchantAccountMutation) ClearPhone ¶
func (m *MerchantAccountMutation) ClearPhone()
ClearPhone clears the value of the "phone" field.
func (*MerchantAccountMutation) ClearedEdges ¶
func (m *MerchantAccountMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MerchantAccountMutation) ClearedFields ¶
func (m *MerchantAccountMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MerchantAccountMutation) Client ¶
func (m MerchantAccountMutation) 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 (*MerchantAccountMutation) CreatedAt ¶
func (m *MerchantAccountMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MerchantAccountMutation) DeletedAt ¶
func (m *MerchantAccountMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*MerchantAccountMutation) DeletedAtCleared ¶
func (m *MerchantAccountMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*MerchantAccountMutation) EdgeCleared ¶
func (m *MerchantAccountMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MerchantAccountMutation) Email ¶
func (m *MerchantAccountMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*MerchantAccountMutation) EmailCleared ¶
func (m *MerchantAccountMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*MerchantAccountMutation) Field ¶
func (m *MerchantAccountMutation) 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 (*MerchantAccountMutation) FieldCleared ¶
func (m *MerchantAccountMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MerchantAccountMutation) Fields ¶
func (m *MerchantAccountMutation) 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 (*MerchantAccountMutation) ID ¶
func (m *MerchantAccountMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MerchantAccountMutation) IDs ¶
func (m *MerchantAccountMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MerchantAccountMutation) IsMainAccount ¶
func (m *MerchantAccountMutation) IsMainAccount() (r bool, exists bool)
IsMainAccount returns the value of the "is_main_account" field in the mutation.
func (*MerchantAccountMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the MerchantAccount entity. If the MerchantAccount 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 (*MerchantAccountMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the MerchantAccount entity. If the MerchantAccount 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 (*MerchantAccountMutation) OldEmail ¶
func (m *MerchantAccountMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the MerchantAccount entity. If the MerchantAccount 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 (*MerchantAccountMutation) 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 (*MerchantAccountMutation) OldIsMainAccount ¶
func (m *MerchantAccountMutation) OldIsMainAccount(ctx context.Context) (v bool, err error)
OldIsMainAccount returns the old "is_main_account" field's value of the MerchantAccount entity. If the MerchantAccount 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 (*MerchantAccountMutation) OldPassword ¶
func (m *MerchantAccountMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the MerchantAccount entity. If the MerchantAccount 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 (*MerchantAccountMutation) OldPhone ¶
func (m *MerchantAccountMutation) OldPhone(ctx context.Context) (v string, err error)
OldPhone returns the old "phone" field's value of the MerchantAccount entity. If the MerchantAccount 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 (*MerchantAccountMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the MerchantAccount entity. If the MerchantAccount 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 (*MerchantAccountMutation) OldUsername ¶
func (m *MerchantAccountMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the MerchantAccount entity. If the MerchantAccount 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 (*MerchantAccountMutation) Op ¶
func (m *MerchantAccountMutation) Op() Op
Op returns the operation name.
func (*MerchantAccountMutation) Password ¶
func (m *MerchantAccountMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*MerchantAccountMutation) Phone ¶
func (m *MerchantAccountMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*MerchantAccountMutation) PhoneCleared ¶
func (m *MerchantAccountMutation) PhoneCleared() bool
PhoneCleared returns if the "phone" field was cleared in this mutation.
func (*MerchantAccountMutation) RemovedEdges ¶
func (m *MerchantAccountMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MerchantAccountMutation) RemovedIDs ¶
func (m *MerchantAccountMutation) 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 (*MerchantAccountMutation) ResetCreatedAt ¶
func (m *MerchantAccountMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MerchantAccountMutation) ResetDeletedAt ¶
func (m *MerchantAccountMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*MerchantAccountMutation) ResetEdge ¶
func (m *MerchantAccountMutation) 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 (*MerchantAccountMutation) ResetEmail ¶
func (m *MerchantAccountMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*MerchantAccountMutation) ResetField ¶
func (m *MerchantAccountMutation) 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 (*MerchantAccountMutation) ResetIsMainAccount ¶
func (m *MerchantAccountMutation) ResetIsMainAccount()
ResetIsMainAccount resets all changes to the "is_main_account" field.
func (*MerchantAccountMutation) ResetPassword ¶
func (m *MerchantAccountMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*MerchantAccountMutation) ResetPhone ¶
func (m *MerchantAccountMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*MerchantAccountMutation) ResetUpdatedAt ¶
func (m *MerchantAccountMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MerchantAccountMutation) ResetUsername ¶
func (m *MerchantAccountMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*MerchantAccountMutation) SetCreatedAt ¶
func (m *MerchantAccountMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MerchantAccountMutation) SetDeletedAt ¶
func (m *MerchantAccountMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*MerchantAccountMutation) SetEmail ¶
func (m *MerchantAccountMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*MerchantAccountMutation) SetField ¶
func (m *MerchantAccountMutation) 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 (*MerchantAccountMutation) SetID ¶
func (m *MerchantAccountMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of MerchantAccount entities.
func (*MerchantAccountMutation) SetIsMainAccount ¶
func (m *MerchantAccountMutation) SetIsMainAccount(b bool)
SetIsMainAccount sets the "is_main_account" field.
func (*MerchantAccountMutation) SetOp ¶
func (m *MerchantAccountMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MerchantAccountMutation) SetPassword ¶
func (m *MerchantAccountMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*MerchantAccountMutation) SetPhone ¶
func (m *MerchantAccountMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*MerchantAccountMutation) SetUpdatedAt ¶
func (m *MerchantAccountMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*MerchantAccountMutation) SetUsername ¶
func (m *MerchantAccountMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (MerchantAccountMutation) Tx ¶
func (m MerchantAccountMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MerchantAccountMutation) Type ¶
func (m *MerchantAccountMutation) Type() string
Type returns the node type of this mutation (MerchantAccount).
func (*MerchantAccountMutation) UpdatedAt ¶
func (m *MerchantAccountMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MerchantAccountMutation) Username ¶
func (m *MerchantAccountMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*MerchantAccountMutation) Where ¶
func (m *MerchantAccountMutation) Where(ps ...predicate.MerchantAccount)
Where appends a list predicates to the MerchantAccountMutation builder.
func (*MerchantAccountMutation) WhereP ¶
func (m *MerchantAccountMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MerchantAccountMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MerchantAccountQuery ¶
type MerchantAccountQuery struct {
// contains filtered or unexported fields
}
MerchantAccountQuery is the builder for querying MerchantAccount entities.
func (*MerchantAccountQuery) Aggregate ¶
func (maq *MerchantAccountQuery) Aggregate(fns ...AggregateFunc) *MerchantAccountSelect
Aggregate returns a MerchantAccountSelect configured with the given aggregations.
func (*MerchantAccountQuery) All ¶
func (maq *MerchantAccountQuery) All(ctx context.Context) ([]*MerchantAccount, error)
All executes the query and returns a list of MerchantAccounts.
func (*MerchantAccountQuery) AllX ¶
func (maq *MerchantAccountQuery) AllX(ctx context.Context) []*MerchantAccount
AllX is like All, but panics if an error occurs.
func (*MerchantAccountQuery) Clone ¶
func (maq *MerchantAccountQuery) Clone() *MerchantAccountQuery
Clone returns a duplicate of the MerchantAccountQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MerchantAccountQuery) Count ¶
func (maq *MerchantAccountQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MerchantAccountQuery) CountX ¶
func (maq *MerchantAccountQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MerchantAccountQuery) Exist ¶
func (maq *MerchantAccountQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MerchantAccountQuery) ExistX ¶
func (maq *MerchantAccountQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MerchantAccountQuery) First ¶
func (maq *MerchantAccountQuery) First(ctx context.Context) (*MerchantAccount, error)
First returns the first MerchantAccount entity from the query. Returns a *NotFoundError when no MerchantAccount was found.
func (*MerchantAccountQuery) FirstID ¶
func (maq *MerchantAccountQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first MerchantAccount ID from the query. Returns a *NotFoundError when no MerchantAccount ID was found.
func (*MerchantAccountQuery) FirstIDX ¶
func (maq *MerchantAccountQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*MerchantAccountQuery) FirstX ¶
func (maq *MerchantAccountQuery) FirstX(ctx context.Context) *MerchantAccount
FirstX is like First, but panics if an error occurs.
func (*MerchantAccountQuery) GroupBy ¶
func (maq *MerchantAccountQuery) GroupBy(field string, fields ...string) *MerchantAccountGroupBy
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.MerchantAccount.Query(). GroupBy(merchantaccount.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MerchantAccountQuery) IDs ¶
func (maq *MerchantAccountQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of MerchantAccount IDs.
func (*MerchantAccountQuery) IDsX ¶
func (maq *MerchantAccountQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*MerchantAccountQuery) Limit ¶
func (maq *MerchantAccountQuery) Limit(limit int) *MerchantAccountQuery
Limit the number of records to be returned by this query.
func (*MerchantAccountQuery) Offset ¶
func (maq *MerchantAccountQuery) Offset(offset int) *MerchantAccountQuery
Offset to start from.
func (*MerchantAccountQuery) Only ¶
func (maq *MerchantAccountQuery) Only(ctx context.Context) (*MerchantAccount, error)
Only returns a single MerchantAccount entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MerchantAccount entity is found. Returns a *NotFoundError when no MerchantAccount entities are found.
func (*MerchantAccountQuery) OnlyID ¶
func (maq *MerchantAccountQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only MerchantAccount ID in the query. Returns a *NotSingularError when more than one MerchantAccount ID is found. Returns a *NotFoundError when no entities are found.
func (*MerchantAccountQuery) OnlyIDX ¶
func (maq *MerchantAccountQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MerchantAccountQuery) OnlyX ¶
func (maq *MerchantAccountQuery) OnlyX(ctx context.Context) *MerchantAccount
OnlyX is like Only, but panics if an error occurs.
func (*MerchantAccountQuery) Order ¶
func (maq *MerchantAccountQuery) Order(o ...merchantaccount.OrderOption) *MerchantAccountQuery
Order specifies how the records should be ordered.
func (*MerchantAccountQuery) Select ¶
func (maq *MerchantAccountQuery) Select(fields ...string) *MerchantAccountSelect
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.MerchantAccount.Query(). Select(merchantaccount.FieldCreatedAt). Scan(ctx, &v)
func (*MerchantAccountQuery) Unique ¶
func (maq *MerchantAccountQuery) Unique(unique bool) *MerchantAccountQuery
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 (*MerchantAccountQuery) Where ¶
func (maq *MerchantAccountQuery) Where(ps ...predicate.MerchantAccount) *MerchantAccountQuery
Where adds a new predicate for the MerchantAccountQuery builder.
type MerchantAccountSelect ¶
type MerchantAccountSelect struct { *MerchantAccountQuery // contains filtered or unexported fields }
MerchantAccountSelect is the builder for selecting fields of MerchantAccount entities.
func (*MerchantAccountSelect) Aggregate ¶
func (mas *MerchantAccountSelect) Aggregate(fns ...AggregateFunc) *MerchantAccountSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MerchantAccountSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MerchantAccountSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MerchantAccountSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MerchantAccountSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MerchantAccountSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*MerchantAccountSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MerchantAccountSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MerchantAccountSelect) Scan ¶
func (mas *MerchantAccountSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MerchantAccountSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MerchantAccountUpdate ¶
type MerchantAccountUpdate struct {
// contains filtered or unexported fields
}
MerchantAccountUpdate is the builder for updating MerchantAccount entities.
func (*MerchantAccountUpdate) ClearDeletedAt ¶
func (mau *MerchantAccountUpdate) ClearDeletedAt() *MerchantAccountUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MerchantAccountUpdate) ClearEmail ¶
func (mau *MerchantAccountUpdate) ClearEmail() *MerchantAccountUpdate
ClearEmail clears the value of the "email" field.
func (*MerchantAccountUpdate) ClearPhone ¶
func (mau *MerchantAccountUpdate) ClearPhone() *MerchantAccountUpdate
ClearPhone clears the value of the "phone" field.
func (*MerchantAccountUpdate) Exec ¶
func (mau *MerchantAccountUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MerchantAccountUpdate) ExecX ¶
func (mau *MerchantAccountUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MerchantAccountUpdate) Mutation ¶
func (mau *MerchantAccountUpdate) Mutation() *MerchantAccountMutation
Mutation returns the MerchantAccountMutation object of the builder.
func (*MerchantAccountUpdate) Save ¶
func (mau *MerchantAccountUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MerchantAccountUpdate) SaveX ¶
func (mau *MerchantAccountUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MerchantAccountUpdate) SetDeletedAt ¶
func (mau *MerchantAccountUpdate) SetDeletedAt(t time.Time) *MerchantAccountUpdate
SetDeletedAt sets the "deleted_at" field.
func (*MerchantAccountUpdate) SetEmail ¶
func (mau *MerchantAccountUpdate) SetEmail(s string) *MerchantAccountUpdate
SetEmail sets the "email" field.
func (*MerchantAccountUpdate) SetIsMainAccount ¶
func (mau *MerchantAccountUpdate) SetIsMainAccount(b bool) *MerchantAccountUpdate
SetIsMainAccount sets the "is_main_account" field.
func (*MerchantAccountUpdate) SetNillableDeletedAt ¶
func (mau *MerchantAccountUpdate) SetNillableDeletedAt(t *time.Time) *MerchantAccountUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MerchantAccountUpdate) SetNillableEmail ¶
func (mau *MerchantAccountUpdate) SetNillableEmail(s *string) *MerchantAccountUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*MerchantAccountUpdate) SetNillableIsMainAccount ¶
func (mau *MerchantAccountUpdate) SetNillableIsMainAccount(b *bool) *MerchantAccountUpdate
SetNillableIsMainAccount sets the "is_main_account" field if the given value is not nil.
func (*MerchantAccountUpdate) SetNillablePassword ¶
func (mau *MerchantAccountUpdate) SetNillablePassword(s *string) *MerchantAccountUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*MerchantAccountUpdate) SetNillablePhone ¶
func (mau *MerchantAccountUpdate) SetNillablePhone(s *string) *MerchantAccountUpdate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*MerchantAccountUpdate) SetNillableUsername ¶
func (mau *MerchantAccountUpdate) SetNillableUsername(s *string) *MerchantAccountUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*MerchantAccountUpdate) SetPassword ¶
func (mau *MerchantAccountUpdate) SetPassword(s string) *MerchantAccountUpdate
SetPassword sets the "password" field.
func (*MerchantAccountUpdate) SetPhone ¶
func (mau *MerchantAccountUpdate) SetPhone(s string) *MerchantAccountUpdate
SetPhone sets the "phone" field.
func (*MerchantAccountUpdate) SetUpdatedAt ¶
func (mau *MerchantAccountUpdate) SetUpdatedAt(t time.Time) *MerchantAccountUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MerchantAccountUpdate) SetUsername ¶
func (mau *MerchantAccountUpdate) SetUsername(s string) *MerchantAccountUpdate
SetUsername sets the "username" field.
func (*MerchantAccountUpdate) Where ¶
func (mau *MerchantAccountUpdate) Where(ps ...predicate.MerchantAccount) *MerchantAccountUpdate
Where appends a list predicates to the MerchantAccountUpdate builder.
type MerchantAccountUpdateOne ¶
type MerchantAccountUpdateOne struct {
// contains filtered or unexported fields
}
MerchantAccountUpdateOne is the builder for updating a single MerchantAccount entity.
func (*MerchantAccountUpdateOne) ClearDeletedAt ¶
func (mauo *MerchantAccountUpdateOne) ClearDeletedAt() *MerchantAccountUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MerchantAccountUpdateOne) ClearEmail ¶
func (mauo *MerchantAccountUpdateOne) ClearEmail() *MerchantAccountUpdateOne
ClearEmail clears the value of the "email" field.
func (*MerchantAccountUpdateOne) ClearPhone ¶
func (mauo *MerchantAccountUpdateOne) ClearPhone() *MerchantAccountUpdateOne
ClearPhone clears the value of the "phone" field.
func (*MerchantAccountUpdateOne) Exec ¶
func (mauo *MerchantAccountUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MerchantAccountUpdateOne) ExecX ¶
func (mauo *MerchantAccountUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MerchantAccountUpdateOne) Mutation ¶
func (mauo *MerchantAccountUpdateOne) Mutation() *MerchantAccountMutation
Mutation returns the MerchantAccountMutation object of the builder.
func (*MerchantAccountUpdateOne) Save ¶
func (mauo *MerchantAccountUpdateOne) Save(ctx context.Context) (*MerchantAccount, error)
Save executes the query and returns the updated MerchantAccount entity.
func (*MerchantAccountUpdateOne) SaveX ¶
func (mauo *MerchantAccountUpdateOne) SaveX(ctx context.Context) *MerchantAccount
SaveX is like Save, but panics if an error occurs.
func (*MerchantAccountUpdateOne) Select ¶
func (mauo *MerchantAccountUpdateOne) Select(field string, fields ...string) *MerchantAccountUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MerchantAccountUpdateOne) SetDeletedAt ¶
func (mauo *MerchantAccountUpdateOne) SetDeletedAt(t time.Time) *MerchantAccountUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*MerchantAccountUpdateOne) SetEmail ¶
func (mauo *MerchantAccountUpdateOne) SetEmail(s string) *MerchantAccountUpdateOne
SetEmail sets the "email" field.
func (*MerchantAccountUpdateOne) SetIsMainAccount ¶
func (mauo *MerchantAccountUpdateOne) SetIsMainAccount(b bool) *MerchantAccountUpdateOne
SetIsMainAccount sets the "is_main_account" field.
func (*MerchantAccountUpdateOne) SetNillableDeletedAt ¶
func (mauo *MerchantAccountUpdateOne) SetNillableDeletedAt(t *time.Time) *MerchantAccountUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MerchantAccountUpdateOne) SetNillableEmail ¶
func (mauo *MerchantAccountUpdateOne) SetNillableEmail(s *string) *MerchantAccountUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*MerchantAccountUpdateOne) SetNillableIsMainAccount ¶
func (mauo *MerchantAccountUpdateOne) SetNillableIsMainAccount(b *bool) *MerchantAccountUpdateOne
SetNillableIsMainAccount sets the "is_main_account" field if the given value is not nil.
func (*MerchantAccountUpdateOne) SetNillablePassword ¶
func (mauo *MerchantAccountUpdateOne) SetNillablePassword(s *string) *MerchantAccountUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*MerchantAccountUpdateOne) SetNillablePhone ¶
func (mauo *MerchantAccountUpdateOne) SetNillablePhone(s *string) *MerchantAccountUpdateOne
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*MerchantAccountUpdateOne) SetNillableUsername ¶
func (mauo *MerchantAccountUpdateOne) SetNillableUsername(s *string) *MerchantAccountUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*MerchantAccountUpdateOne) SetPassword ¶
func (mauo *MerchantAccountUpdateOne) SetPassword(s string) *MerchantAccountUpdateOne
SetPassword sets the "password" field.
func (*MerchantAccountUpdateOne) SetPhone ¶
func (mauo *MerchantAccountUpdateOne) SetPhone(s string) *MerchantAccountUpdateOne
SetPhone sets the "phone" field.
func (*MerchantAccountUpdateOne) SetUpdatedAt ¶
func (mauo *MerchantAccountUpdateOne) SetUpdatedAt(t time.Time) *MerchantAccountUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MerchantAccountUpdateOne) SetUsername ¶
func (mauo *MerchantAccountUpdateOne) SetUsername(s string) *MerchantAccountUpdateOne
SetUsername sets the "username" field.
func (*MerchantAccountUpdateOne) Where ¶
func (mauo *MerchantAccountUpdateOne) Where(ps ...predicate.MerchantAccount) *MerchantAccountUpdateOne
Where appends a list predicates to the MerchantAccountUpdate builder.
type MerchantAccounts ¶
type MerchantAccounts []*MerchantAccount
MerchantAccounts is a parsable slice of MerchantAccount.
type MerchantClient ¶
type MerchantClient struct {
// contains filtered or unexported fields
}
MerchantClient is a client for the Merchant schema.
func NewMerchantClient ¶
func NewMerchantClient(c config) *MerchantClient
NewMerchantClient returns a client for the Merchant from the given config.
func (*MerchantClient) Create ¶
func (c *MerchantClient) Create() *MerchantCreate
Create returns a builder for creating a Merchant entity.
func (*MerchantClient) CreateBulk ¶
func (c *MerchantClient) CreateBulk(builders ...*MerchantCreate) *MerchantCreateBulk
CreateBulk returns a builder for creating a bulk of Merchant entities.
func (*MerchantClient) Delete ¶
func (c *MerchantClient) Delete() *MerchantDelete
Delete returns a delete builder for Merchant.
func (*MerchantClient) DeleteOne ¶
func (c *MerchantClient) DeleteOne(m *Merchant) *MerchantDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MerchantClient) DeleteOneID ¶
func (c *MerchantClient) DeleteOneID(id uint64) *MerchantDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MerchantClient) GetX ¶
func (c *MerchantClient) GetX(ctx context.Context, id uint64) *Merchant
GetX is like Get, but panics if an error occurs.
func (*MerchantClient) Hooks ¶
func (c *MerchantClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MerchantClient) Intercept ¶
func (c *MerchantClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `merchant.Intercept(f(g(h())))`.
func (*MerchantClient) Interceptors ¶
func (c *MerchantClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MerchantClient) MapCreateBulk ¶
func (c *MerchantClient) MapCreateBulk(slice any, setFunc func(*MerchantCreate, int)) *MerchantCreateBulk
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 (*MerchantClient) Query ¶
func (c *MerchantClient) Query() *MerchantQuery
Query returns a query builder for Merchant.
func (*MerchantClient) QueryAccounts ¶
func (c *MerchantClient) QueryAccounts(m *Merchant) *MerchantAccountQuery
QueryAccounts queries the accounts edge of a Merchant.
func (*MerchantClient) Update ¶
func (c *MerchantClient) Update() *MerchantUpdate
Update returns an update builder for Merchant.
func (*MerchantClient) UpdateOne ¶
func (c *MerchantClient) UpdateOne(m *Merchant) *MerchantUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MerchantClient) UpdateOneID ¶
func (c *MerchantClient) UpdateOneID(id uint64) *MerchantUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MerchantClient) Use ¶
func (c *MerchantClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `merchant.Hooks(f(g(h())))`.
type MerchantCreate ¶
type MerchantCreate struct {
// contains filtered or unexported fields
}
MerchantCreate is the builder for creating a Merchant entity.
func (*MerchantCreate) AddAccountIDs ¶
func (mc *MerchantCreate) AddAccountIDs(ids ...uint64) *MerchantCreate
AddAccountIDs adds the "accounts" edge to the MerchantAccount entity by IDs.
func (*MerchantCreate) AddAccounts ¶
func (mc *MerchantCreate) AddAccounts(m ...*MerchantAccount) *MerchantCreate
AddAccounts adds the "accounts" edges to the MerchantAccount entity.
func (*MerchantCreate) Exec ¶
func (mc *MerchantCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MerchantCreate) ExecX ¶
func (mc *MerchantCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MerchantCreate) Mutation ¶
func (mc *MerchantCreate) Mutation() *MerchantMutation
Mutation returns the MerchantMutation object of the builder.
func (*MerchantCreate) Save ¶
func (mc *MerchantCreate) Save(ctx context.Context) (*Merchant, error)
Save creates the Merchant in the database.
func (*MerchantCreate) SaveX ¶
func (mc *MerchantCreate) SaveX(ctx context.Context) *Merchant
SaveX calls Save and panics if Save returns an error.
func (*MerchantCreate) SetAddress ¶
func (mc *MerchantCreate) SetAddress(s string) *MerchantCreate
SetAddress sets the "address" field.
func (*MerchantCreate) SetCity ¶
func (mc *MerchantCreate) SetCity(s string) *MerchantCreate
SetCity sets the "city" field.
func (*MerchantCreate) SetContactPerson ¶
func (mc *MerchantCreate) SetContactPerson(s string) *MerchantCreate
SetContactPerson sets the "contact_person" field.
func (*MerchantCreate) SetContactPhone ¶
func (mc *MerchantCreate) SetContactPhone(s string) *MerchantCreate
SetContactPhone sets the "contact_phone" field.
func (*MerchantCreate) SetCountry ¶
func (mc *MerchantCreate) SetCountry(s string) *MerchantCreate
SetCountry sets the "country" field.
func (*MerchantCreate) SetCreatedAt ¶
func (mc *MerchantCreate) SetCreatedAt(t time.Time) *MerchantCreate
SetCreatedAt sets the "created_at" field.
func (*MerchantCreate) SetDeletedAt ¶
func (mc *MerchantCreate) SetDeletedAt(t time.Time) *MerchantCreate
SetDeletedAt sets the "deleted_at" field.
func (*MerchantCreate) SetDistrict ¶
func (mc *MerchantCreate) SetDistrict(s string) *MerchantCreate
SetDistrict sets the "district" field.
func (*MerchantCreate) SetID ¶
func (mc *MerchantCreate) SetID(u uint64) *MerchantCreate
SetID sets the "id" field.
func (*MerchantCreate) SetMerchantName ¶
func (mc *MerchantCreate) SetMerchantName(s string) *MerchantCreate
SetMerchantName sets the "merchant_name" field.
func (*MerchantCreate) SetNillableAddress ¶
func (mc *MerchantCreate) SetNillableAddress(s *string) *MerchantCreate
SetNillableAddress sets the "address" field if the given value is not nil.
func (*MerchantCreate) SetNillableCity ¶
func (mc *MerchantCreate) SetNillableCity(s *string) *MerchantCreate
SetNillableCity sets the "city" field if the given value is not nil.
func (*MerchantCreate) SetNillableContactPerson ¶
func (mc *MerchantCreate) SetNillableContactPerson(s *string) *MerchantCreate
SetNillableContactPerson sets the "contact_person" field if the given value is not nil.
func (*MerchantCreate) SetNillableContactPhone ¶
func (mc *MerchantCreate) SetNillableContactPhone(s *string) *MerchantCreate
SetNillableContactPhone sets the "contact_phone" field if the given value is not nil.
func (*MerchantCreate) SetNillableCountry ¶
func (mc *MerchantCreate) SetNillableCountry(s *string) *MerchantCreate
SetNillableCountry sets the "country" field if the given value is not nil.
func (*MerchantCreate) SetNillableCreatedAt ¶
func (mc *MerchantCreate) SetNillableCreatedAt(t *time.Time) *MerchantCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MerchantCreate) SetNillableDeletedAt ¶
func (mc *MerchantCreate) SetNillableDeletedAt(t *time.Time) *MerchantCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MerchantCreate) SetNillableDistrict ¶
func (mc *MerchantCreate) SetNillableDistrict(s *string) *MerchantCreate
SetNillableDistrict sets the "district" field if the given value is not nil.
func (*MerchantCreate) SetNillableID ¶
func (mc *MerchantCreate) SetNillableID(u *uint64) *MerchantCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*MerchantCreate) SetNillableProvince ¶
func (mc *MerchantCreate) SetNillableProvince(s *string) *MerchantCreate
SetNillableProvince sets the "province" field if the given value is not nil.
func (*MerchantCreate) SetNillableUpdatedAt ¶
func (mc *MerchantCreate) SetNillableUpdatedAt(t *time.Time) *MerchantCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MerchantCreate) SetProvince ¶
func (mc *MerchantCreate) SetProvince(s string) *MerchantCreate
SetProvince sets the "province" field.
func (*MerchantCreate) SetUpdatedAt ¶
func (mc *MerchantCreate) SetUpdatedAt(t time.Time) *MerchantCreate
SetUpdatedAt sets the "updated_at" field.
type MerchantCreateBulk ¶
type MerchantCreateBulk struct {
// contains filtered or unexported fields
}
MerchantCreateBulk is the builder for creating many Merchant entities in bulk.
func (*MerchantCreateBulk) Exec ¶
func (mcb *MerchantCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MerchantCreateBulk) ExecX ¶
func (mcb *MerchantCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MerchantDelete ¶
type MerchantDelete struct {
// contains filtered or unexported fields
}
MerchantDelete is the builder for deleting a Merchant entity.
func (*MerchantDelete) Exec ¶
func (md *MerchantDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MerchantDelete) ExecX ¶
func (md *MerchantDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MerchantDelete) Where ¶
func (md *MerchantDelete) Where(ps ...predicate.Merchant) *MerchantDelete
Where appends a list predicates to the MerchantDelete builder.
type MerchantDeleteOne ¶
type MerchantDeleteOne struct {
// contains filtered or unexported fields
}
MerchantDeleteOne is the builder for deleting a single Merchant entity.
func (*MerchantDeleteOne) Exec ¶
func (mdo *MerchantDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MerchantDeleteOne) ExecX ¶
func (mdo *MerchantDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MerchantDeleteOne) Where ¶
func (mdo *MerchantDeleteOne) Where(ps ...predicate.Merchant) *MerchantDeleteOne
Where appends a list predicates to the MerchantDelete builder.
type MerchantEdges ¶
type MerchantEdges struct { // Accounts holds the value of the accounts edge. Accounts []*MerchantAccount `json:"accounts,omitempty"` // contains filtered or unexported fields }
MerchantEdges holds the relations/edges for other nodes in the graph.
func (MerchantEdges) AccountsOrErr ¶
func (e MerchantEdges) AccountsOrErr() ([]*MerchantAccount, error)
AccountsOrErr returns the Accounts value or an error if the edge was not loaded in eager-loading.
type MerchantGroupBy ¶
type MerchantGroupBy struct {
// contains filtered or unexported fields
}
MerchantGroupBy is the group-by builder for Merchant entities.
func (*MerchantGroupBy) Aggregate ¶
func (mgb *MerchantGroupBy) Aggregate(fns ...AggregateFunc) *MerchantGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MerchantGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MerchantGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MerchantGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MerchantGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MerchantGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MerchantGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MerchantGroupBy) Scan ¶
func (mgb *MerchantGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MerchantGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MerchantMutation ¶
type MerchantMutation struct {
// contains filtered or unexported fields
}
MerchantMutation represents an operation that mutates the Merchant nodes in the graph.
func (*MerchantMutation) AccountsCleared ¶
func (m *MerchantMutation) AccountsCleared() bool
AccountsCleared reports if the "accounts" edge to the MerchantAccount entity was cleared.
func (*MerchantMutation) AccountsIDs ¶
func (m *MerchantMutation) AccountsIDs() (ids []uint64)
AccountsIDs returns the "accounts" edge IDs in the mutation.
func (*MerchantMutation) AddAccountIDs ¶
func (m *MerchantMutation) AddAccountIDs(ids ...uint64)
AddAccountIDs adds the "accounts" edge to the MerchantAccount entity by ids.
func (*MerchantMutation) AddField ¶
func (m *MerchantMutation) 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 (*MerchantMutation) AddedEdges ¶
func (m *MerchantMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MerchantMutation) AddedField ¶
func (m *MerchantMutation) 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 (*MerchantMutation) AddedFields ¶
func (m *MerchantMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MerchantMutation) AddedIDs ¶
func (m *MerchantMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MerchantMutation) Address ¶
func (m *MerchantMutation) Address() (r string, exists bool)
Address returns the value of the "address" field in the mutation.
func (*MerchantMutation) AddressCleared ¶
func (m *MerchantMutation) AddressCleared() bool
AddressCleared returns if the "address" field was cleared in this mutation.
func (*MerchantMutation) City ¶
func (m *MerchantMutation) City() (r string, exists bool)
City returns the value of the "city" field in the mutation.
func (*MerchantMutation) CityCleared ¶
func (m *MerchantMutation) CityCleared() bool
CityCleared returns if the "city" field was cleared in this mutation.
func (*MerchantMutation) ClearAccounts ¶
func (m *MerchantMutation) ClearAccounts()
ClearAccounts clears the "accounts" edge to the MerchantAccount entity.
func (*MerchantMutation) ClearAddress ¶
func (m *MerchantMutation) ClearAddress()
ClearAddress clears the value of the "address" field.
func (*MerchantMutation) ClearCity ¶
func (m *MerchantMutation) ClearCity()
ClearCity clears the value of the "city" field.
func (*MerchantMutation) ClearContactPerson ¶
func (m *MerchantMutation) ClearContactPerson()
ClearContactPerson clears the value of the "contact_person" field.
func (*MerchantMutation) ClearContactPhone ¶
func (m *MerchantMutation) ClearContactPhone()
ClearContactPhone clears the value of the "contact_phone" field.
func (*MerchantMutation) ClearCountry ¶
func (m *MerchantMutation) ClearCountry()
ClearCountry clears the value of the "country" field.
func (*MerchantMutation) ClearDeletedAt ¶
func (m *MerchantMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MerchantMutation) ClearDistrict ¶
func (m *MerchantMutation) ClearDistrict()
ClearDistrict clears the value of the "district" field.
func (*MerchantMutation) ClearEdge ¶
func (m *MerchantMutation) 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 (*MerchantMutation) ClearField ¶
func (m *MerchantMutation) 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 (*MerchantMutation) ClearProvince ¶
func (m *MerchantMutation) ClearProvince()
ClearProvince clears the value of the "province" field.
func (*MerchantMutation) ClearedEdges ¶
func (m *MerchantMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MerchantMutation) ClearedFields ¶
func (m *MerchantMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MerchantMutation) Client ¶
func (m MerchantMutation) 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 (*MerchantMutation) ContactPerson ¶
func (m *MerchantMutation) ContactPerson() (r string, exists bool)
ContactPerson returns the value of the "contact_person" field in the mutation.
func (*MerchantMutation) ContactPersonCleared ¶
func (m *MerchantMutation) ContactPersonCleared() bool
ContactPersonCleared returns if the "contact_person" field was cleared in this mutation.
func (*MerchantMutation) ContactPhone ¶
func (m *MerchantMutation) ContactPhone() (r string, exists bool)
ContactPhone returns the value of the "contact_phone" field in the mutation.
func (*MerchantMutation) ContactPhoneCleared ¶
func (m *MerchantMutation) ContactPhoneCleared() bool
ContactPhoneCleared returns if the "contact_phone" field was cleared in this mutation.
func (*MerchantMutation) Country ¶
func (m *MerchantMutation) Country() (r string, exists bool)
Country returns the value of the "country" field in the mutation.
func (*MerchantMutation) CountryCleared ¶
func (m *MerchantMutation) CountryCleared() bool
CountryCleared returns if the "country" field was cleared in this mutation.
func (*MerchantMutation) CreatedAt ¶
func (m *MerchantMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MerchantMutation) DeletedAt ¶
func (m *MerchantMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*MerchantMutation) DeletedAtCleared ¶
func (m *MerchantMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*MerchantMutation) District ¶
func (m *MerchantMutation) District() (r string, exists bool)
District returns the value of the "district" field in the mutation.
func (*MerchantMutation) DistrictCleared ¶
func (m *MerchantMutation) DistrictCleared() bool
DistrictCleared returns if the "district" field was cleared in this mutation.
func (*MerchantMutation) EdgeCleared ¶
func (m *MerchantMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MerchantMutation) Field ¶
func (m *MerchantMutation) 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 (*MerchantMutation) FieldCleared ¶
func (m *MerchantMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MerchantMutation) Fields ¶
func (m *MerchantMutation) 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 (*MerchantMutation) ID ¶
func (m *MerchantMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MerchantMutation) IDs ¶
func (m *MerchantMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MerchantMutation) MerchantName ¶
func (m *MerchantMutation) MerchantName() (r string, exists bool)
MerchantName returns the value of the "merchant_name" field in the mutation.
func (*MerchantMutation) OldAddress ¶
func (m *MerchantMutation) OldAddress(ctx context.Context) (v string, err error)
OldAddress returns the old "address" field's value of the Merchant entity. If the Merchant 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 (*MerchantMutation) OldCity ¶
func (m *MerchantMutation) OldCity(ctx context.Context) (v string, err error)
OldCity returns the old "city" field's value of the Merchant entity. If the Merchant 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 (*MerchantMutation) OldContactPerson ¶
func (m *MerchantMutation) OldContactPerson(ctx context.Context) (v string, err error)
OldContactPerson returns the old "contact_person" field's value of the Merchant entity. If the Merchant 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 (*MerchantMutation) OldContactPhone ¶
func (m *MerchantMutation) OldContactPhone(ctx context.Context) (v string, err error)
OldContactPhone returns the old "contact_phone" field's value of the Merchant entity. If the Merchant 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 (*MerchantMutation) OldCountry ¶
func (m *MerchantMutation) OldCountry(ctx context.Context) (v string, err error)
OldCountry returns the old "country" field's value of the Merchant entity. If the Merchant 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 (*MerchantMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Merchant entity. If the Merchant 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 (*MerchantMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Merchant entity. If the Merchant 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 (*MerchantMutation) OldDistrict ¶
func (m *MerchantMutation) OldDistrict(ctx context.Context) (v string, err error)
OldDistrict returns the old "district" field's value of the Merchant entity. If the Merchant 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 (*MerchantMutation) 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 (*MerchantMutation) OldMerchantName ¶
func (m *MerchantMutation) OldMerchantName(ctx context.Context) (v string, err error)
OldMerchantName returns the old "merchant_name" field's value of the Merchant entity. If the Merchant 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 (*MerchantMutation) OldProvince ¶
func (m *MerchantMutation) OldProvince(ctx context.Context) (v string, err error)
OldProvince returns the old "province" field's value of the Merchant entity. If the Merchant 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 (*MerchantMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Merchant entity. If the Merchant 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 (*MerchantMutation) Province ¶
func (m *MerchantMutation) Province() (r string, exists bool)
Province returns the value of the "province" field in the mutation.
func (*MerchantMutation) ProvinceCleared ¶
func (m *MerchantMutation) ProvinceCleared() bool
ProvinceCleared returns if the "province" field was cleared in this mutation.
func (*MerchantMutation) RemoveAccountIDs ¶
func (m *MerchantMutation) RemoveAccountIDs(ids ...uint64)
RemoveAccountIDs removes the "accounts" edge to the MerchantAccount entity by IDs.
func (*MerchantMutation) RemovedAccountsIDs ¶
func (m *MerchantMutation) RemovedAccountsIDs() (ids []uint64)
RemovedAccounts returns the removed IDs of the "accounts" edge to the MerchantAccount entity.
func (*MerchantMutation) RemovedEdges ¶
func (m *MerchantMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MerchantMutation) RemovedIDs ¶
func (m *MerchantMutation) 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 (*MerchantMutation) ResetAccounts ¶
func (m *MerchantMutation) ResetAccounts()
ResetAccounts resets all changes to the "accounts" edge.
func (*MerchantMutation) ResetAddress ¶
func (m *MerchantMutation) ResetAddress()
ResetAddress resets all changes to the "address" field.
func (*MerchantMutation) ResetCity ¶
func (m *MerchantMutation) ResetCity()
ResetCity resets all changes to the "city" field.
func (*MerchantMutation) ResetContactPerson ¶
func (m *MerchantMutation) ResetContactPerson()
ResetContactPerson resets all changes to the "contact_person" field.
func (*MerchantMutation) ResetContactPhone ¶
func (m *MerchantMutation) ResetContactPhone()
ResetContactPhone resets all changes to the "contact_phone" field.
func (*MerchantMutation) ResetCountry ¶
func (m *MerchantMutation) ResetCountry()
ResetCountry resets all changes to the "country" field.
func (*MerchantMutation) ResetCreatedAt ¶
func (m *MerchantMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MerchantMutation) ResetDeletedAt ¶
func (m *MerchantMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*MerchantMutation) ResetDistrict ¶
func (m *MerchantMutation) ResetDistrict()
ResetDistrict resets all changes to the "district" field.
func (*MerchantMutation) ResetEdge ¶
func (m *MerchantMutation) 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 (*MerchantMutation) ResetField ¶
func (m *MerchantMutation) 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 (*MerchantMutation) ResetMerchantName ¶
func (m *MerchantMutation) ResetMerchantName()
ResetMerchantName resets all changes to the "merchant_name" field.
func (*MerchantMutation) ResetProvince ¶
func (m *MerchantMutation) ResetProvince()
ResetProvince resets all changes to the "province" field.
func (*MerchantMutation) ResetUpdatedAt ¶
func (m *MerchantMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MerchantMutation) SetAddress ¶
func (m *MerchantMutation) SetAddress(s string)
SetAddress sets the "address" field.
func (*MerchantMutation) SetCity ¶
func (m *MerchantMutation) SetCity(s string)
SetCity sets the "city" field.
func (*MerchantMutation) SetContactPerson ¶
func (m *MerchantMutation) SetContactPerson(s string)
SetContactPerson sets the "contact_person" field.
func (*MerchantMutation) SetContactPhone ¶
func (m *MerchantMutation) SetContactPhone(s string)
SetContactPhone sets the "contact_phone" field.
func (*MerchantMutation) SetCountry ¶
func (m *MerchantMutation) SetCountry(s string)
SetCountry sets the "country" field.
func (*MerchantMutation) SetCreatedAt ¶
func (m *MerchantMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MerchantMutation) SetDeletedAt ¶
func (m *MerchantMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*MerchantMutation) SetDistrict ¶
func (m *MerchantMutation) SetDistrict(s string)
SetDistrict sets the "district" field.
func (*MerchantMutation) SetField ¶
func (m *MerchantMutation) 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 (*MerchantMutation) SetID ¶
func (m *MerchantMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Merchant entities.
func (*MerchantMutation) SetMerchantName ¶
func (m *MerchantMutation) SetMerchantName(s string)
SetMerchantName sets the "merchant_name" field.
func (*MerchantMutation) SetOp ¶
func (m *MerchantMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MerchantMutation) SetProvince ¶
func (m *MerchantMutation) SetProvince(s string)
SetProvince sets the "province" field.
func (*MerchantMutation) SetUpdatedAt ¶
func (m *MerchantMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (MerchantMutation) Tx ¶
func (m MerchantMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MerchantMutation) Type ¶
func (m *MerchantMutation) Type() string
Type returns the node type of this mutation (Merchant).
func (*MerchantMutation) UpdatedAt ¶
func (m *MerchantMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MerchantMutation) Where ¶
func (m *MerchantMutation) Where(ps ...predicate.Merchant)
Where appends a list predicates to the MerchantMutation builder.
func (*MerchantMutation) WhereP ¶
func (m *MerchantMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MerchantMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MerchantQuery ¶
type MerchantQuery struct {
// contains filtered or unexported fields
}
MerchantQuery is the builder for querying Merchant entities.
func (*MerchantQuery) Aggregate ¶
func (mq *MerchantQuery) Aggregate(fns ...AggregateFunc) *MerchantSelect
Aggregate returns a MerchantSelect configured with the given aggregations.
func (*MerchantQuery) All ¶
func (mq *MerchantQuery) All(ctx context.Context) ([]*Merchant, error)
All executes the query and returns a list of Merchants.
func (*MerchantQuery) AllX ¶
func (mq *MerchantQuery) AllX(ctx context.Context) []*Merchant
AllX is like All, but panics if an error occurs.
func (*MerchantQuery) Clone ¶
func (mq *MerchantQuery) Clone() *MerchantQuery
Clone returns a duplicate of the MerchantQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MerchantQuery) Count ¶
func (mq *MerchantQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MerchantQuery) CountX ¶
func (mq *MerchantQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MerchantQuery) Exist ¶
func (mq *MerchantQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MerchantQuery) ExistX ¶
func (mq *MerchantQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MerchantQuery) First ¶
func (mq *MerchantQuery) First(ctx context.Context) (*Merchant, error)
First returns the first Merchant entity from the query. Returns a *NotFoundError when no Merchant was found.
func (*MerchantQuery) FirstID ¶
func (mq *MerchantQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Merchant ID from the query. Returns a *NotFoundError when no Merchant ID was found.
func (*MerchantQuery) FirstIDX ¶
func (mq *MerchantQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*MerchantQuery) FirstX ¶
func (mq *MerchantQuery) FirstX(ctx context.Context) *Merchant
FirstX is like First, but panics if an error occurs.
func (*MerchantQuery) GroupBy ¶
func (mq *MerchantQuery) GroupBy(field string, fields ...string) *MerchantGroupBy
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.Merchant.Query(). GroupBy(merchant.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MerchantQuery) IDs ¶
func (mq *MerchantQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Merchant IDs.
func (*MerchantQuery) IDsX ¶
func (mq *MerchantQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*MerchantQuery) Limit ¶
func (mq *MerchantQuery) Limit(limit int) *MerchantQuery
Limit the number of records to be returned by this query.
func (*MerchantQuery) Offset ¶
func (mq *MerchantQuery) Offset(offset int) *MerchantQuery
Offset to start from.
func (*MerchantQuery) Only ¶
func (mq *MerchantQuery) Only(ctx context.Context) (*Merchant, error)
Only returns a single Merchant entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Merchant entity is found. Returns a *NotFoundError when no Merchant entities are found.
func (*MerchantQuery) OnlyID ¶
func (mq *MerchantQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Merchant ID in the query. Returns a *NotSingularError when more than one Merchant ID is found. Returns a *NotFoundError when no entities are found.
func (*MerchantQuery) OnlyIDX ¶
func (mq *MerchantQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MerchantQuery) OnlyX ¶
func (mq *MerchantQuery) OnlyX(ctx context.Context) *Merchant
OnlyX is like Only, but panics if an error occurs.
func (*MerchantQuery) Order ¶
func (mq *MerchantQuery) Order(o ...merchant.OrderOption) *MerchantQuery
Order specifies how the records should be ordered.
func (*MerchantQuery) QueryAccounts ¶
func (mq *MerchantQuery) QueryAccounts() *MerchantAccountQuery
QueryAccounts chains the current query on the "accounts" edge.
func (*MerchantQuery) Select ¶
func (mq *MerchantQuery) Select(fields ...string) *MerchantSelect
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.Merchant.Query(). Select(merchant.FieldCreatedAt). Scan(ctx, &v)
func (*MerchantQuery) Unique ¶
func (mq *MerchantQuery) Unique(unique bool) *MerchantQuery
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 (*MerchantQuery) Where ¶
func (mq *MerchantQuery) Where(ps ...predicate.Merchant) *MerchantQuery
Where adds a new predicate for the MerchantQuery builder.
func (*MerchantQuery) WithAccounts ¶
func (mq *MerchantQuery) WithAccounts(opts ...func(*MerchantAccountQuery)) *MerchantQuery
WithAccounts tells the query-builder to eager-load the nodes that are connected to the "accounts" edge. The optional arguments are used to configure the query builder of the edge.
type MerchantSelect ¶
type MerchantSelect struct { *MerchantQuery // contains filtered or unexported fields }
MerchantSelect is the builder for selecting fields of Merchant entities.
func (*MerchantSelect) Aggregate ¶
func (ms *MerchantSelect) Aggregate(fns ...AggregateFunc) *MerchantSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MerchantSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MerchantSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MerchantSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MerchantSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MerchantSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MerchantSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MerchantSelect) Scan ¶
func (ms *MerchantSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MerchantSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MerchantUpdate ¶
type MerchantUpdate struct {
// contains filtered or unexported fields
}
MerchantUpdate is the builder for updating Merchant entities.
func (*MerchantUpdate) AddAccountIDs ¶
func (mu *MerchantUpdate) AddAccountIDs(ids ...uint64) *MerchantUpdate
AddAccountIDs adds the "accounts" edge to the MerchantAccount entity by IDs.
func (*MerchantUpdate) AddAccounts ¶
func (mu *MerchantUpdate) AddAccounts(m ...*MerchantAccount) *MerchantUpdate
AddAccounts adds the "accounts" edges to the MerchantAccount entity.
func (*MerchantUpdate) ClearAccounts ¶
func (mu *MerchantUpdate) ClearAccounts() *MerchantUpdate
ClearAccounts clears all "accounts" edges to the MerchantAccount entity.
func (*MerchantUpdate) ClearAddress ¶
func (mu *MerchantUpdate) ClearAddress() *MerchantUpdate
ClearAddress clears the value of the "address" field.
func (*MerchantUpdate) ClearCity ¶
func (mu *MerchantUpdate) ClearCity() *MerchantUpdate
ClearCity clears the value of the "city" field.
func (*MerchantUpdate) ClearContactPerson ¶
func (mu *MerchantUpdate) ClearContactPerson() *MerchantUpdate
ClearContactPerson clears the value of the "contact_person" field.
func (*MerchantUpdate) ClearContactPhone ¶
func (mu *MerchantUpdate) ClearContactPhone() *MerchantUpdate
ClearContactPhone clears the value of the "contact_phone" field.
func (*MerchantUpdate) ClearCountry ¶
func (mu *MerchantUpdate) ClearCountry() *MerchantUpdate
ClearCountry clears the value of the "country" field.
func (*MerchantUpdate) ClearDeletedAt ¶
func (mu *MerchantUpdate) ClearDeletedAt() *MerchantUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MerchantUpdate) ClearDistrict ¶
func (mu *MerchantUpdate) ClearDistrict() *MerchantUpdate
ClearDistrict clears the value of the "district" field.
func (*MerchantUpdate) ClearProvince ¶
func (mu *MerchantUpdate) ClearProvince() *MerchantUpdate
ClearProvince clears the value of the "province" field.
func (*MerchantUpdate) Exec ¶
func (mu *MerchantUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MerchantUpdate) ExecX ¶
func (mu *MerchantUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MerchantUpdate) Mutation ¶
func (mu *MerchantUpdate) Mutation() *MerchantMutation
Mutation returns the MerchantMutation object of the builder.
func (*MerchantUpdate) RemoveAccountIDs ¶
func (mu *MerchantUpdate) RemoveAccountIDs(ids ...uint64) *MerchantUpdate
RemoveAccountIDs removes the "accounts" edge to MerchantAccount entities by IDs.
func (*MerchantUpdate) RemoveAccounts ¶
func (mu *MerchantUpdate) RemoveAccounts(m ...*MerchantAccount) *MerchantUpdate
RemoveAccounts removes "accounts" edges to MerchantAccount entities.
func (*MerchantUpdate) Save ¶
func (mu *MerchantUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MerchantUpdate) SaveX ¶
func (mu *MerchantUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MerchantUpdate) SetAddress ¶
func (mu *MerchantUpdate) SetAddress(s string) *MerchantUpdate
SetAddress sets the "address" field.
func (*MerchantUpdate) SetCity ¶
func (mu *MerchantUpdate) SetCity(s string) *MerchantUpdate
SetCity sets the "city" field.
func (*MerchantUpdate) SetContactPerson ¶
func (mu *MerchantUpdate) SetContactPerson(s string) *MerchantUpdate
SetContactPerson sets the "contact_person" field.
func (*MerchantUpdate) SetContactPhone ¶
func (mu *MerchantUpdate) SetContactPhone(s string) *MerchantUpdate
SetContactPhone sets the "contact_phone" field.
func (*MerchantUpdate) SetCountry ¶
func (mu *MerchantUpdate) SetCountry(s string) *MerchantUpdate
SetCountry sets the "country" field.
func (*MerchantUpdate) SetDeletedAt ¶
func (mu *MerchantUpdate) SetDeletedAt(t time.Time) *MerchantUpdate
SetDeletedAt sets the "deleted_at" field.
func (*MerchantUpdate) SetDistrict ¶
func (mu *MerchantUpdate) SetDistrict(s string) *MerchantUpdate
SetDistrict sets the "district" field.
func (*MerchantUpdate) SetMerchantName ¶
func (mu *MerchantUpdate) SetMerchantName(s string) *MerchantUpdate
SetMerchantName sets the "merchant_name" field.
func (*MerchantUpdate) SetNillableAddress ¶
func (mu *MerchantUpdate) SetNillableAddress(s *string) *MerchantUpdate
SetNillableAddress sets the "address" field if the given value is not nil.
func (*MerchantUpdate) SetNillableCity ¶
func (mu *MerchantUpdate) SetNillableCity(s *string) *MerchantUpdate
SetNillableCity sets the "city" field if the given value is not nil.
func (*MerchantUpdate) SetNillableContactPerson ¶
func (mu *MerchantUpdate) SetNillableContactPerson(s *string) *MerchantUpdate
SetNillableContactPerson sets the "contact_person" field if the given value is not nil.
func (*MerchantUpdate) SetNillableContactPhone ¶
func (mu *MerchantUpdate) SetNillableContactPhone(s *string) *MerchantUpdate
SetNillableContactPhone sets the "contact_phone" field if the given value is not nil.
func (*MerchantUpdate) SetNillableCountry ¶
func (mu *MerchantUpdate) SetNillableCountry(s *string) *MerchantUpdate
SetNillableCountry sets the "country" field if the given value is not nil.
func (*MerchantUpdate) SetNillableDeletedAt ¶
func (mu *MerchantUpdate) SetNillableDeletedAt(t *time.Time) *MerchantUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MerchantUpdate) SetNillableDistrict ¶
func (mu *MerchantUpdate) SetNillableDistrict(s *string) *MerchantUpdate
SetNillableDistrict sets the "district" field if the given value is not nil.
func (*MerchantUpdate) SetNillableMerchantName ¶
func (mu *MerchantUpdate) SetNillableMerchantName(s *string) *MerchantUpdate
SetNillableMerchantName sets the "merchant_name" field if the given value is not nil.
func (*MerchantUpdate) SetNillableProvince ¶
func (mu *MerchantUpdate) SetNillableProvince(s *string) *MerchantUpdate
SetNillableProvince sets the "province" field if the given value is not nil.
func (*MerchantUpdate) SetProvince ¶
func (mu *MerchantUpdate) SetProvince(s string) *MerchantUpdate
SetProvince sets the "province" field.
func (*MerchantUpdate) SetUpdatedAt ¶
func (mu *MerchantUpdate) SetUpdatedAt(t time.Time) *MerchantUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MerchantUpdate) Where ¶
func (mu *MerchantUpdate) Where(ps ...predicate.Merchant) *MerchantUpdate
Where appends a list predicates to the MerchantUpdate builder.
type MerchantUpdateOne ¶
type MerchantUpdateOne struct {
// contains filtered or unexported fields
}
MerchantUpdateOne is the builder for updating a single Merchant entity.
func (*MerchantUpdateOne) AddAccountIDs ¶
func (muo *MerchantUpdateOne) AddAccountIDs(ids ...uint64) *MerchantUpdateOne
AddAccountIDs adds the "accounts" edge to the MerchantAccount entity by IDs.
func (*MerchantUpdateOne) AddAccounts ¶
func (muo *MerchantUpdateOne) AddAccounts(m ...*MerchantAccount) *MerchantUpdateOne
AddAccounts adds the "accounts" edges to the MerchantAccount entity.
func (*MerchantUpdateOne) ClearAccounts ¶
func (muo *MerchantUpdateOne) ClearAccounts() *MerchantUpdateOne
ClearAccounts clears all "accounts" edges to the MerchantAccount entity.
func (*MerchantUpdateOne) ClearAddress ¶
func (muo *MerchantUpdateOne) ClearAddress() *MerchantUpdateOne
ClearAddress clears the value of the "address" field.
func (*MerchantUpdateOne) ClearCity ¶
func (muo *MerchantUpdateOne) ClearCity() *MerchantUpdateOne
ClearCity clears the value of the "city" field.
func (*MerchantUpdateOne) ClearContactPerson ¶
func (muo *MerchantUpdateOne) ClearContactPerson() *MerchantUpdateOne
ClearContactPerson clears the value of the "contact_person" field.
func (*MerchantUpdateOne) ClearContactPhone ¶
func (muo *MerchantUpdateOne) ClearContactPhone() *MerchantUpdateOne
ClearContactPhone clears the value of the "contact_phone" field.
func (*MerchantUpdateOne) ClearCountry ¶
func (muo *MerchantUpdateOne) ClearCountry() *MerchantUpdateOne
ClearCountry clears the value of the "country" field.
func (*MerchantUpdateOne) ClearDeletedAt ¶
func (muo *MerchantUpdateOne) ClearDeletedAt() *MerchantUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MerchantUpdateOne) ClearDistrict ¶
func (muo *MerchantUpdateOne) ClearDistrict() *MerchantUpdateOne
ClearDistrict clears the value of the "district" field.
func (*MerchantUpdateOne) ClearProvince ¶
func (muo *MerchantUpdateOne) ClearProvince() *MerchantUpdateOne
ClearProvince clears the value of the "province" field.
func (*MerchantUpdateOne) Exec ¶
func (muo *MerchantUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MerchantUpdateOne) ExecX ¶
func (muo *MerchantUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MerchantUpdateOne) Mutation ¶
func (muo *MerchantUpdateOne) Mutation() *MerchantMutation
Mutation returns the MerchantMutation object of the builder.
func (*MerchantUpdateOne) RemoveAccountIDs ¶
func (muo *MerchantUpdateOne) RemoveAccountIDs(ids ...uint64) *MerchantUpdateOne
RemoveAccountIDs removes the "accounts" edge to MerchantAccount entities by IDs.
func (*MerchantUpdateOne) RemoveAccounts ¶
func (muo *MerchantUpdateOne) RemoveAccounts(m ...*MerchantAccount) *MerchantUpdateOne
RemoveAccounts removes "accounts" edges to MerchantAccount entities.
func (*MerchantUpdateOne) Save ¶
func (muo *MerchantUpdateOne) Save(ctx context.Context) (*Merchant, error)
Save executes the query and returns the updated Merchant entity.
func (*MerchantUpdateOne) SaveX ¶
func (muo *MerchantUpdateOne) SaveX(ctx context.Context) *Merchant
SaveX is like Save, but panics if an error occurs.
func (*MerchantUpdateOne) Select ¶
func (muo *MerchantUpdateOne) Select(field string, fields ...string) *MerchantUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MerchantUpdateOne) SetAddress ¶
func (muo *MerchantUpdateOne) SetAddress(s string) *MerchantUpdateOne
SetAddress sets the "address" field.
func (*MerchantUpdateOne) SetCity ¶
func (muo *MerchantUpdateOne) SetCity(s string) *MerchantUpdateOne
SetCity sets the "city" field.
func (*MerchantUpdateOne) SetContactPerson ¶
func (muo *MerchantUpdateOne) SetContactPerson(s string) *MerchantUpdateOne
SetContactPerson sets the "contact_person" field.
func (*MerchantUpdateOne) SetContactPhone ¶
func (muo *MerchantUpdateOne) SetContactPhone(s string) *MerchantUpdateOne
SetContactPhone sets the "contact_phone" field.
func (*MerchantUpdateOne) SetCountry ¶
func (muo *MerchantUpdateOne) SetCountry(s string) *MerchantUpdateOne
SetCountry sets the "country" field.
func (*MerchantUpdateOne) SetDeletedAt ¶
func (muo *MerchantUpdateOne) SetDeletedAt(t time.Time) *MerchantUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*MerchantUpdateOne) SetDistrict ¶
func (muo *MerchantUpdateOne) SetDistrict(s string) *MerchantUpdateOne
SetDistrict sets the "district" field.
func (*MerchantUpdateOne) SetMerchantName ¶
func (muo *MerchantUpdateOne) SetMerchantName(s string) *MerchantUpdateOne
SetMerchantName sets the "merchant_name" field.
func (*MerchantUpdateOne) SetNillableAddress ¶
func (muo *MerchantUpdateOne) SetNillableAddress(s *string) *MerchantUpdateOne
SetNillableAddress sets the "address" field if the given value is not nil.
func (*MerchantUpdateOne) SetNillableCity ¶
func (muo *MerchantUpdateOne) SetNillableCity(s *string) *MerchantUpdateOne
SetNillableCity sets the "city" field if the given value is not nil.
func (*MerchantUpdateOne) SetNillableContactPerson ¶
func (muo *MerchantUpdateOne) SetNillableContactPerson(s *string) *MerchantUpdateOne
SetNillableContactPerson sets the "contact_person" field if the given value is not nil.
func (*MerchantUpdateOne) SetNillableContactPhone ¶
func (muo *MerchantUpdateOne) SetNillableContactPhone(s *string) *MerchantUpdateOne
SetNillableContactPhone sets the "contact_phone" field if the given value is not nil.
func (*MerchantUpdateOne) SetNillableCountry ¶
func (muo *MerchantUpdateOne) SetNillableCountry(s *string) *MerchantUpdateOne
SetNillableCountry sets the "country" field if the given value is not nil.
func (*MerchantUpdateOne) SetNillableDeletedAt ¶
func (muo *MerchantUpdateOne) SetNillableDeletedAt(t *time.Time) *MerchantUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MerchantUpdateOne) SetNillableDistrict ¶
func (muo *MerchantUpdateOne) SetNillableDistrict(s *string) *MerchantUpdateOne
SetNillableDistrict sets the "district" field if the given value is not nil.
func (*MerchantUpdateOne) SetNillableMerchantName ¶
func (muo *MerchantUpdateOne) SetNillableMerchantName(s *string) *MerchantUpdateOne
SetNillableMerchantName sets the "merchant_name" field if the given value is not nil.
func (*MerchantUpdateOne) SetNillableProvince ¶
func (muo *MerchantUpdateOne) SetNillableProvince(s *string) *MerchantUpdateOne
SetNillableProvince sets the "province" field if the given value is not nil.
func (*MerchantUpdateOne) SetProvince ¶
func (muo *MerchantUpdateOne) SetProvince(s string) *MerchantUpdateOne
SetProvince sets the "province" field.
func (*MerchantUpdateOne) SetUpdatedAt ¶
func (muo *MerchantUpdateOne) SetUpdatedAt(t time.Time) *MerchantUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MerchantUpdateOne) Where ¶
func (muo *MerchantUpdateOne) Where(ps ...predicate.Merchant) *MerchantUpdateOne
Where appends a list predicates to the MerchantUpdate 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 OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type PlatformAccount ¶
type PlatformAccount struct { // ID of the ent. ID uint64 `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"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // contains filtered or unexported fields }
PlatformAccount is the model entity for the PlatformAccount schema.
func (*PlatformAccount) String ¶
func (pa *PlatformAccount) String() string
String implements the fmt.Stringer.
func (*PlatformAccount) Unwrap ¶
func (pa *PlatformAccount) Unwrap() *PlatformAccount
Unwrap unwraps the PlatformAccount 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 (*PlatformAccount) Update ¶
func (pa *PlatformAccount) Update() *PlatformAccountUpdateOne
Update returns a builder for updating this PlatformAccount. Note that you need to call PlatformAccount.Unwrap() before calling this method if this PlatformAccount was returned from a transaction, and the transaction was committed or rolled back.
type PlatformAccountClient ¶
type PlatformAccountClient struct {
// contains filtered or unexported fields
}
PlatformAccountClient is a client for the PlatformAccount schema.
func NewPlatformAccountClient ¶
func NewPlatformAccountClient(c config) *PlatformAccountClient
NewPlatformAccountClient returns a client for the PlatformAccount from the given config.
func (*PlatformAccountClient) Create ¶
func (c *PlatformAccountClient) Create() *PlatformAccountCreate
Create returns a builder for creating a PlatformAccount entity.
func (*PlatformAccountClient) CreateBulk ¶
func (c *PlatformAccountClient) CreateBulk(builders ...*PlatformAccountCreate) *PlatformAccountCreateBulk
CreateBulk returns a builder for creating a bulk of PlatformAccount entities.
func (*PlatformAccountClient) Delete ¶
func (c *PlatformAccountClient) Delete() *PlatformAccountDelete
Delete returns a delete builder for PlatformAccount.
func (*PlatformAccountClient) DeleteOne ¶
func (c *PlatformAccountClient) DeleteOne(pa *PlatformAccount) *PlatformAccountDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PlatformAccountClient) DeleteOneID ¶
func (c *PlatformAccountClient) DeleteOneID(id uint64) *PlatformAccountDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PlatformAccountClient) Get ¶
func (c *PlatformAccountClient) Get(ctx context.Context, id uint64) (*PlatformAccount, error)
Get returns a PlatformAccount entity by its id.
func (*PlatformAccountClient) GetX ¶
func (c *PlatformAccountClient) GetX(ctx context.Context, id uint64) *PlatformAccount
GetX is like Get, but panics if an error occurs.
func (*PlatformAccountClient) Hooks ¶
func (c *PlatformAccountClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PlatformAccountClient) Intercept ¶
func (c *PlatformAccountClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `platformaccount.Intercept(f(g(h())))`.
func (*PlatformAccountClient) Interceptors ¶
func (c *PlatformAccountClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PlatformAccountClient) MapCreateBulk ¶
func (c *PlatformAccountClient) MapCreateBulk(slice any, setFunc func(*PlatformAccountCreate, int)) *PlatformAccountCreateBulk
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 (*PlatformAccountClient) Query ¶
func (c *PlatformAccountClient) Query() *PlatformAccountQuery
Query returns a query builder for PlatformAccount.
func (*PlatformAccountClient) Update ¶
func (c *PlatformAccountClient) Update() *PlatformAccountUpdate
Update returns an update builder for PlatformAccount.
func (*PlatformAccountClient) UpdateOne ¶
func (c *PlatformAccountClient) UpdateOne(pa *PlatformAccount) *PlatformAccountUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PlatformAccountClient) UpdateOneID ¶
func (c *PlatformAccountClient) UpdateOneID(id uint64) *PlatformAccountUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PlatformAccountClient) Use ¶
func (c *PlatformAccountClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `platformaccount.Hooks(f(g(h())))`.
type PlatformAccountCreate ¶
type PlatformAccountCreate struct {
// contains filtered or unexported fields
}
PlatformAccountCreate is the builder for creating a PlatformAccount entity.
func (*PlatformAccountCreate) Exec ¶
func (pac *PlatformAccountCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PlatformAccountCreate) ExecX ¶
func (pac *PlatformAccountCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlatformAccountCreate) Mutation ¶
func (pac *PlatformAccountCreate) Mutation() *PlatformAccountMutation
Mutation returns the PlatformAccountMutation object of the builder.
func (*PlatformAccountCreate) Save ¶
func (pac *PlatformAccountCreate) Save(ctx context.Context) (*PlatformAccount, error)
Save creates the PlatformAccount in the database.
func (*PlatformAccountCreate) SaveX ¶
func (pac *PlatformAccountCreate) SaveX(ctx context.Context) *PlatformAccount
SaveX calls Save and panics if Save returns an error.
func (*PlatformAccountCreate) SetCreatedAt ¶
func (pac *PlatformAccountCreate) SetCreatedAt(t time.Time) *PlatformAccountCreate
SetCreatedAt sets the "created_at" field.
func (*PlatformAccountCreate) SetDeletedAt ¶
func (pac *PlatformAccountCreate) SetDeletedAt(t time.Time) *PlatformAccountCreate
SetDeletedAt sets the "deleted_at" field.
func (*PlatformAccountCreate) SetEmail ¶
func (pac *PlatformAccountCreate) SetEmail(s string) *PlatformAccountCreate
SetEmail sets the "email" field.
func (*PlatformAccountCreate) SetID ¶
func (pac *PlatformAccountCreate) SetID(u uint64) *PlatformAccountCreate
SetID sets the "id" field.
func (*PlatformAccountCreate) SetNillableCreatedAt ¶
func (pac *PlatformAccountCreate) SetNillableCreatedAt(t *time.Time) *PlatformAccountCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PlatformAccountCreate) SetNillableDeletedAt ¶
func (pac *PlatformAccountCreate) SetNillableDeletedAt(t *time.Time) *PlatformAccountCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PlatformAccountCreate) SetNillableEmail ¶
func (pac *PlatformAccountCreate) SetNillableEmail(s *string) *PlatformAccountCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*PlatformAccountCreate) SetNillableID ¶
func (pac *PlatformAccountCreate) SetNillableID(u *uint64) *PlatformAccountCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*PlatformAccountCreate) SetNillableUpdatedAt ¶
func (pac *PlatformAccountCreate) SetNillableUpdatedAt(t *time.Time) *PlatformAccountCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PlatformAccountCreate) SetPassword ¶
func (pac *PlatformAccountCreate) SetPassword(s string) *PlatformAccountCreate
SetPassword sets the "password" field.
func (*PlatformAccountCreate) SetUpdatedAt ¶
func (pac *PlatformAccountCreate) SetUpdatedAt(t time.Time) *PlatformAccountCreate
SetUpdatedAt sets the "updated_at" field.
func (*PlatformAccountCreate) SetUsername ¶
func (pac *PlatformAccountCreate) SetUsername(s string) *PlatformAccountCreate
SetUsername sets the "username" field.
type PlatformAccountCreateBulk ¶
type PlatformAccountCreateBulk struct {
// contains filtered or unexported fields
}
PlatformAccountCreateBulk is the builder for creating many PlatformAccount entities in bulk.
func (*PlatformAccountCreateBulk) Exec ¶
func (pacb *PlatformAccountCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PlatformAccountCreateBulk) ExecX ¶
func (pacb *PlatformAccountCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlatformAccountCreateBulk) Save ¶
func (pacb *PlatformAccountCreateBulk) Save(ctx context.Context) ([]*PlatformAccount, error)
Save creates the PlatformAccount entities in the database.
func (*PlatformAccountCreateBulk) SaveX ¶
func (pacb *PlatformAccountCreateBulk) SaveX(ctx context.Context) []*PlatformAccount
SaveX is like Save, but panics if an error occurs.
type PlatformAccountDelete ¶
type PlatformAccountDelete struct {
// contains filtered or unexported fields
}
PlatformAccountDelete is the builder for deleting a PlatformAccount entity.
func (*PlatformAccountDelete) Exec ¶
func (pad *PlatformAccountDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PlatformAccountDelete) ExecX ¶
func (pad *PlatformAccountDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PlatformAccountDelete) Where ¶
func (pad *PlatformAccountDelete) Where(ps ...predicate.PlatformAccount) *PlatformAccountDelete
Where appends a list predicates to the PlatformAccountDelete builder.
type PlatformAccountDeleteOne ¶
type PlatformAccountDeleteOne struct {
// contains filtered or unexported fields
}
PlatformAccountDeleteOne is the builder for deleting a single PlatformAccount entity.
func (*PlatformAccountDeleteOne) Exec ¶
func (pado *PlatformAccountDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PlatformAccountDeleteOne) ExecX ¶
func (pado *PlatformAccountDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlatformAccountDeleteOne) Where ¶
func (pado *PlatformAccountDeleteOne) Where(ps ...predicate.PlatformAccount) *PlatformAccountDeleteOne
Where appends a list predicates to the PlatformAccountDelete builder.
type PlatformAccountGroupBy ¶
type PlatformAccountGroupBy struct {
// contains filtered or unexported fields
}
PlatformAccountGroupBy is the group-by builder for PlatformAccount entities.
func (*PlatformAccountGroupBy) Aggregate ¶
func (pagb *PlatformAccountGroupBy) Aggregate(fns ...AggregateFunc) *PlatformAccountGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PlatformAccountGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PlatformAccountGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PlatformAccountGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PlatformAccountGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PlatformAccountGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*PlatformAccountGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PlatformAccountGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PlatformAccountGroupBy) Scan ¶
func (pagb *PlatformAccountGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PlatformAccountGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PlatformAccountMutation ¶
type PlatformAccountMutation struct {
// contains filtered or unexported fields
}
PlatformAccountMutation represents an operation that mutates the PlatformAccount nodes in the graph.
func (*PlatformAccountMutation) AddField ¶
func (m *PlatformAccountMutation) 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 (*PlatformAccountMutation) AddedEdges ¶
func (m *PlatformAccountMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PlatformAccountMutation) AddedField ¶
func (m *PlatformAccountMutation) 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 (*PlatformAccountMutation) AddedFields ¶
func (m *PlatformAccountMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PlatformAccountMutation) AddedIDs ¶
func (m *PlatformAccountMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PlatformAccountMutation) ClearDeletedAt ¶
func (m *PlatformAccountMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PlatformAccountMutation) ClearEdge ¶
func (m *PlatformAccountMutation) 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 (*PlatformAccountMutation) ClearEmail ¶
func (m *PlatformAccountMutation) ClearEmail()
ClearEmail clears the value of the "email" field.
func (*PlatformAccountMutation) ClearField ¶
func (m *PlatformAccountMutation) 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 (*PlatformAccountMutation) ClearedEdges ¶
func (m *PlatformAccountMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PlatformAccountMutation) ClearedFields ¶
func (m *PlatformAccountMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PlatformAccountMutation) Client ¶
func (m PlatformAccountMutation) 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 (*PlatformAccountMutation) CreatedAt ¶
func (m *PlatformAccountMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PlatformAccountMutation) DeletedAt ¶
func (m *PlatformAccountMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*PlatformAccountMutation) DeletedAtCleared ¶
func (m *PlatformAccountMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*PlatformAccountMutation) EdgeCleared ¶
func (m *PlatformAccountMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PlatformAccountMutation) Email ¶
func (m *PlatformAccountMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*PlatformAccountMutation) EmailCleared ¶
func (m *PlatformAccountMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*PlatformAccountMutation) Field ¶
func (m *PlatformAccountMutation) 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 (*PlatformAccountMutation) FieldCleared ¶
func (m *PlatformAccountMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PlatformAccountMutation) Fields ¶
func (m *PlatformAccountMutation) 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 (*PlatformAccountMutation) ID ¶
func (m *PlatformAccountMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PlatformAccountMutation) IDs ¶
func (m *PlatformAccountMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PlatformAccountMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the PlatformAccount entity. If the PlatformAccount 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 (*PlatformAccountMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the PlatformAccount entity. If the PlatformAccount 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 (*PlatformAccountMutation) OldEmail ¶
func (m *PlatformAccountMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the PlatformAccount entity. If the PlatformAccount 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 (*PlatformAccountMutation) 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 (*PlatformAccountMutation) OldPassword ¶
func (m *PlatformAccountMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the PlatformAccount entity. If the PlatformAccount 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 (*PlatformAccountMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the PlatformAccount entity. If the PlatformAccount 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 (*PlatformAccountMutation) OldUsername ¶
func (m *PlatformAccountMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the PlatformAccount entity. If the PlatformAccount 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 (*PlatformAccountMutation) Op ¶
func (m *PlatformAccountMutation) Op() Op
Op returns the operation name.
func (*PlatformAccountMutation) Password ¶
func (m *PlatformAccountMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*PlatformAccountMutation) RemovedEdges ¶
func (m *PlatformAccountMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PlatformAccountMutation) RemovedIDs ¶
func (m *PlatformAccountMutation) 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 (*PlatformAccountMutation) ResetCreatedAt ¶
func (m *PlatformAccountMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PlatformAccountMutation) ResetDeletedAt ¶
func (m *PlatformAccountMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*PlatformAccountMutation) ResetEdge ¶
func (m *PlatformAccountMutation) 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 (*PlatformAccountMutation) ResetEmail ¶
func (m *PlatformAccountMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*PlatformAccountMutation) ResetField ¶
func (m *PlatformAccountMutation) 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 (*PlatformAccountMutation) ResetPassword ¶
func (m *PlatformAccountMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*PlatformAccountMutation) ResetUpdatedAt ¶
func (m *PlatformAccountMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PlatformAccountMutation) ResetUsername ¶
func (m *PlatformAccountMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*PlatformAccountMutation) SetCreatedAt ¶
func (m *PlatformAccountMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PlatformAccountMutation) SetDeletedAt ¶
func (m *PlatformAccountMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*PlatformAccountMutation) SetEmail ¶
func (m *PlatformAccountMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*PlatformAccountMutation) SetField ¶
func (m *PlatformAccountMutation) 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 (*PlatformAccountMutation) SetID ¶
func (m *PlatformAccountMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of PlatformAccount entities.
func (*PlatformAccountMutation) SetOp ¶
func (m *PlatformAccountMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PlatformAccountMutation) SetPassword ¶
func (m *PlatformAccountMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*PlatformAccountMutation) SetUpdatedAt ¶
func (m *PlatformAccountMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PlatformAccountMutation) SetUsername ¶
func (m *PlatformAccountMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (PlatformAccountMutation) Tx ¶
func (m PlatformAccountMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PlatformAccountMutation) Type ¶
func (m *PlatformAccountMutation) Type() string
Type returns the node type of this mutation (PlatformAccount).
func (*PlatformAccountMutation) UpdatedAt ¶
func (m *PlatformAccountMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PlatformAccountMutation) Username ¶
func (m *PlatformAccountMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*PlatformAccountMutation) Where ¶
func (m *PlatformAccountMutation) Where(ps ...predicate.PlatformAccount)
Where appends a list predicates to the PlatformAccountMutation builder.
func (*PlatformAccountMutation) WhereP ¶
func (m *PlatformAccountMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PlatformAccountMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PlatformAccountQuery ¶
type PlatformAccountQuery struct {
// contains filtered or unexported fields
}
PlatformAccountQuery is the builder for querying PlatformAccount entities.
func (*PlatformAccountQuery) Aggregate ¶
func (paq *PlatformAccountQuery) Aggregate(fns ...AggregateFunc) *PlatformAccountSelect
Aggregate returns a PlatformAccountSelect configured with the given aggregations.
func (*PlatformAccountQuery) All ¶
func (paq *PlatformAccountQuery) All(ctx context.Context) ([]*PlatformAccount, error)
All executes the query and returns a list of PlatformAccounts.
func (*PlatformAccountQuery) AllX ¶
func (paq *PlatformAccountQuery) AllX(ctx context.Context) []*PlatformAccount
AllX is like All, but panics if an error occurs.
func (*PlatformAccountQuery) Clone ¶
func (paq *PlatformAccountQuery) Clone() *PlatformAccountQuery
Clone returns a duplicate of the PlatformAccountQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PlatformAccountQuery) Count ¶
func (paq *PlatformAccountQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PlatformAccountQuery) CountX ¶
func (paq *PlatformAccountQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PlatformAccountQuery) Exist ¶
func (paq *PlatformAccountQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PlatformAccountQuery) ExistX ¶
func (paq *PlatformAccountQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PlatformAccountQuery) First ¶
func (paq *PlatformAccountQuery) First(ctx context.Context) (*PlatformAccount, error)
First returns the first PlatformAccount entity from the query. Returns a *NotFoundError when no PlatformAccount was found.
func (*PlatformAccountQuery) FirstID ¶
func (paq *PlatformAccountQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first PlatformAccount ID from the query. Returns a *NotFoundError when no PlatformAccount ID was found.
func (*PlatformAccountQuery) FirstIDX ¶
func (paq *PlatformAccountQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*PlatformAccountQuery) FirstX ¶
func (paq *PlatformAccountQuery) FirstX(ctx context.Context) *PlatformAccount
FirstX is like First, but panics if an error occurs.
func (*PlatformAccountQuery) GroupBy ¶
func (paq *PlatformAccountQuery) GroupBy(field string, fields ...string) *PlatformAccountGroupBy
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.PlatformAccount.Query(). GroupBy(platformaccount.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PlatformAccountQuery) IDs ¶
func (paq *PlatformAccountQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of PlatformAccount IDs.
func (*PlatformAccountQuery) IDsX ¶
func (paq *PlatformAccountQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*PlatformAccountQuery) Limit ¶
func (paq *PlatformAccountQuery) Limit(limit int) *PlatformAccountQuery
Limit the number of records to be returned by this query.
func (*PlatformAccountQuery) Offset ¶
func (paq *PlatformAccountQuery) Offset(offset int) *PlatformAccountQuery
Offset to start from.
func (*PlatformAccountQuery) Only ¶
func (paq *PlatformAccountQuery) Only(ctx context.Context) (*PlatformAccount, error)
Only returns a single PlatformAccount entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one PlatformAccount entity is found. Returns a *NotFoundError when no PlatformAccount entities are found.
func (*PlatformAccountQuery) OnlyID ¶
func (paq *PlatformAccountQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only PlatformAccount ID in the query. Returns a *NotSingularError when more than one PlatformAccount ID is found. Returns a *NotFoundError when no entities are found.
func (*PlatformAccountQuery) OnlyIDX ¶
func (paq *PlatformAccountQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PlatformAccountQuery) OnlyX ¶
func (paq *PlatformAccountQuery) OnlyX(ctx context.Context) *PlatformAccount
OnlyX is like Only, but panics if an error occurs.
func (*PlatformAccountQuery) Order ¶
func (paq *PlatformAccountQuery) Order(o ...platformaccount.OrderOption) *PlatformAccountQuery
Order specifies how the records should be ordered.
func (*PlatformAccountQuery) Select ¶
func (paq *PlatformAccountQuery) Select(fields ...string) *PlatformAccountSelect
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.PlatformAccount.Query(). Select(platformaccount.FieldCreatedAt). Scan(ctx, &v)
func (*PlatformAccountQuery) Unique ¶
func (paq *PlatformAccountQuery) Unique(unique bool) *PlatformAccountQuery
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 (*PlatformAccountQuery) Where ¶
func (paq *PlatformAccountQuery) Where(ps ...predicate.PlatformAccount) *PlatformAccountQuery
Where adds a new predicate for the PlatformAccountQuery builder.
type PlatformAccountSelect ¶
type PlatformAccountSelect struct { *PlatformAccountQuery // contains filtered or unexported fields }
PlatformAccountSelect is the builder for selecting fields of PlatformAccount entities.
func (*PlatformAccountSelect) Aggregate ¶
func (pas *PlatformAccountSelect) Aggregate(fns ...AggregateFunc) *PlatformAccountSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PlatformAccountSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PlatformAccountSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PlatformAccountSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PlatformAccountSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PlatformAccountSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*PlatformAccountSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PlatformAccountSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PlatformAccountSelect) Scan ¶
func (pas *PlatformAccountSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PlatformAccountSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PlatformAccountUpdate ¶
type PlatformAccountUpdate struct {
// contains filtered or unexported fields
}
PlatformAccountUpdate is the builder for updating PlatformAccount entities.
func (*PlatformAccountUpdate) ClearDeletedAt ¶
func (pau *PlatformAccountUpdate) ClearDeletedAt() *PlatformAccountUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PlatformAccountUpdate) ClearEmail ¶
func (pau *PlatformAccountUpdate) ClearEmail() *PlatformAccountUpdate
ClearEmail clears the value of the "email" field.
func (*PlatformAccountUpdate) Exec ¶
func (pau *PlatformAccountUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PlatformAccountUpdate) ExecX ¶
func (pau *PlatformAccountUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlatformAccountUpdate) Mutation ¶
func (pau *PlatformAccountUpdate) Mutation() *PlatformAccountMutation
Mutation returns the PlatformAccountMutation object of the builder.
func (*PlatformAccountUpdate) Save ¶
func (pau *PlatformAccountUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PlatformAccountUpdate) SaveX ¶
func (pau *PlatformAccountUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PlatformAccountUpdate) SetDeletedAt ¶
func (pau *PlatformAccountUpdate) SetDeletedAt(t time.Time) *PlatformAccountUpdate
SetDeletedAt sets the "deleted_at" field.
func (*PlatformAccountUpdate) SetEmail ¶
func (pau *PlatformAccountUpdate) SetEmail(s string) *PlatformAccountUpdate
SetEmail sets the "email" field.
func (*PlatformAccountUpdate) SetNillableDeletedAt ¶
func (pau *PlatformAccountUpdate) SetNillableDeletedAt(t *time.Time) *PlatformAccountUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PlatformAccountUpdate) SetNillableEmail ¶
func (pau *PlatformAccountUpdate) SetNillableEmail(s *string) *PlatformAccountUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*PlatformAccountUpdate) SetNillablePassword ¶
func (pau *PlatformAccountUpdate) SetNillablePassword(s *string) *PlatformAccountUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*PlatformAccountUpdate) SetNillableUsername ¶
func (pau *PlatformAccountUpdate) SetNillableUsername(s *string) *PlatformAccountUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*PlatformAccountUpdate) SetPassword ¶
func (pau *PlatformAccountUpdate) SetPassword(s string) *PlatformAccountUpdate
SetPassword sets the "password" field.
func (*PlatformAccountUpdate) SetUpdatedAt ¶
func (pau *PlatformAccountUpdate) SetUpdatedAt(t time.Time) *PlatformAccountUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PlatformAccountUpdate) SetUsername ¶
func (pau *PlatformAccountUpdate) SetUsername(s string) *PlatformAccountUpdate
SetUsername sets the "username" field.
func (*PlatformAccountUpdate) Where ¶
func (pau *PlatformAccountUpdate) Where(ps ...predicate.PlatformAccount) *PlatformAccountUpdate
Where appends a list predicates to the PlatformAccountUpdate builder.
type PlatformAccountUpdateOne ¶
type PlatformAccountUpdateOne struct {
// contains filtered or unexported fields
}
PlatformAccountUpdateOne is the builder for updating a single PlatformAccount entity.
func (*PlatformAccountUpdateOne) ClearDeletedAt ¶
func (pauo *PlatformAccountUpdateOne) ClearDeletedAt() *PlatformAccountUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PlatformAccountUpdateOne) ClearEmail ¶
func (pauo *PlatformAccountUpdateOne) ClearEmail() *PlatformAccountUpdateOne
ClearEmail clears the value of the "email" field.
func (*PlatformAccountUpdateOne) Exec ¶
func (pauo *PlatformAccountUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PlatformAccountUpdateOne) ExecX ¶
func (pauo *PlatformAccountUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PlatformAccountUpdateOne) Mutation ¶
func (pauo *PlatformAccountUpdateOne) Mutation() *PlatformAccountMutation
Mutation returns the PlatformAccountMutation object of the builder.
func (*PlatformAccountUpdateOne) Save ¶
func (pauo *PlatformAccountUpdateOne) Save(ctx context.Context) (*PlatformAccount, error)
Save executes the query and returns the updated PlatformAccount entity.
func (*PlatformAccountUpdateOne) SaveX ¶
func (pauo *PlatformAccountUpdateOne) SaveX(ctx context.Context) *PlatformAccount
SaveX is like Save, but panics if an error occurs.
func (*PlatformAccountUpdateOne) Select ¶
func (pauo *PlatformAccountUpdateOne) Select(field string, fields ...string) *PlatformAccountUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PlatformAccountUpdateOne) SetDeletedAt ¶
func (pauo *PlatformAccountUpdateOne) SetDeletedAt(t time.Time) *PlatformAccountUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*PlatformAccountUpdateOne) SetEmail ¶
func (pauo *PlatformAccountUpdateOne) SetEmail(s string) *PlatformAccountUpdateOne
SetEmail sets the "email" field.
func (*PlatformAccountUpdateOne) SetNillableDeletedAt ¶
func (pauo *PlatformAccountUpdateOne) SetNillableDeletedAt(t *time.Time) *PlatformAccountUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PlatformAccountUpdateOne) SetNillableEmail ¶
func (pauo *PlatformAccountUpdateOne) SetNillableEmail(s *string) *PlatformAccountUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*PlatformAccountUpdateOne) SetNillablePassword ¶
func (pauo *PlatformAccountUpdateOne) SetNillablePassword(s *string) *PlatformAccountUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*PlatformAccountUpdateOne) SetNillableUsername ¶
func (pauo *PlatformAccountUpdateOne) SetNillableUsername(s *string) *PlatformAccountUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*PlatformAccountUpdateOne) SetPassword ¶
func (pauo *PlatformAccountUpdateOne) SetPassword(s string) *PlatformAccountUpdateOne
SetPassword sets the "password" field.
func (*PlatformAccountUpdateOne) SetUpdatedAt ¶
func (pauo *PlatformAccountUpdateOne) SetUpdatedAt(t time.Time) *PlatformAccountUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PlatformAccountUpdateOne) SetUsername ¶
func (pauo *PlatformAccountUpdateOne) SetUsername(s string) *PlatformAccountUpdateOne
SetUsername sets the "username" field.
func (*PlatformAccountUpdateOne) Where ¶
func (pauo *PlatformAccountUpdateOne) Where(ps ...predicate.PlatformAccount) *PlatformAccountUpdateOne
Where appends a list predicates to the PlatformAccountUpdate builder.
type PlatformAccounts ¶
type PlatformAccounts []*PlatformAccount
PlatformAccounts is a parsable slice of PlatformAccount.
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 TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Merchant is the client for interacting with the Merchant builders. Merchant *MerchantClient // MerchantAccount is the client for interacting with the MerchantAccount builders. MerchantAccount *MerchantAccountClient // PlatformAccount is the client for interacting with the PlatformAccount builders. PlatformAccount *PlatformAccountClient // User is the client for interacting with the User builders. User *UserClient // UserLoginMethod is the client for interacting with the UserLoginMethod builders. UserLoginMethod *UserLoginMethodClient // 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 User ¶
type User struct { // ID of the ent. ID uint64 `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"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at,omitempty"` // user name Username string `json:"username,omitempty"` // Phone holds the value of the "phone" field. Phone string `json:"phone,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryDefaultMerchant ¶
func (u *User) QueryDefaultMerchant() *MerchantQuery
QueryDefaultMerchant queries the "default_merchant" edge of the User entity.
func (*User) QueryIntroducer ¶
func (u *User) QueryIntroducer() *UserLoginMethodQuery
QueryIntroducer queries the "introducer" edge of the User entity.
func (*User) QueryLoginMethods ¶
func (u *User) QueryLoginMethods() *UserLoginMethodQuery
QueryLoginMethods queries the "login_methods" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User 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 (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uint64) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id uint64) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) MapCreateBulk ¶
func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
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 (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryDefaultMerchant ¶
func (c *UserClient) QueryDefaultMerchant(u *User) *MerchantQuery
QueryDefaultMerchant queries the default_merchant edge of a User.
func (*UserClient) QueryIntroducer ¶
func (c *UserClient) QueryIntroducer(u *User) *UserLoginMethodQuery
QueryIntroducer queries the introducer edge of a User.
func (*UserClient) QueryLoginMethods ¶
func (c *UserClient) QueryLoginMethods(u *User) *UserLoginMethodQuery
QueryLoginMethods queries the login_methods edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uint64) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddLoginMethodIDs ¶
func (uc *UserCreate) AddLoginMethodIDs(ids ...uint64) *UserCreate
AddLoginMethodIDs adds the "login_methods" edge to the UserLoginMethod entity by IDs.
func (*UserCreate) AddLoginMethods ¶
func (uc *UserCreate) AddLoginMethods(u ...*UserLoginMethod) *UserCreate
AddLoginMethods adds the "login_methods" edges to the UserLoginMethod entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetDefaultMerchant ¶
func (uc *UserCreate) SetDefaultMerchant(m *Merchant) *UserCreate
SetDefaultMerchant sets the "default_merchant" edge to the Merchant entity.
func (*UserCreate) SetDefaultMerchantID ¶
func (uc *UserCreate) SetDefaultMerchantID(id uint64) *UserCreate
SetDefaultMerchantID sets the "default_merchant" edge to the Merchant entity by ID.
func (*UserCreate) SetDeletedAt ¶
func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
SetDeletedAt sets the "deleted_at" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uint64) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetIntroducer ¶
func (uc *UserCreate) SetIntroducer(u *UserLoginMethod) *UserCreate
SetIntroducer sets the "introducer" edge to the UserLoginMethod entity.
func (*UserCreate) SetIntroducerID ¶
func (uc *UserCreate) SetIntroducerID(id uint64) *UserCreate
SetIntroducerID sets the "introducer" edge to the UserLoginMethod entity by ID.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableDefaultMerchantID ¶
func (uc *UserCreate) SetNillableDefaultMerchantID(id *uint64) *UserCreate
SetNillableDefaultMerchantID sets the "default_merchant" edge to the Merchant entity by ID if the given value is not nil.
func (*UserCreate) SetNillableDeletedAt ¶
func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserCreate) SetNillableEmail ¶
func (uc *UserCreate) SetNillableEmail(s *string) *UserCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserCreate) SetNillableID ¶
func (uc *UserCreate) SetNillableID(u *uint64) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillableIntroducerID ¶
func (uc *UserCreate) SetNillableIntroducerID(id *uint64) *UserCreate
SetNillableIntroducerID sets the "introducer" edge to the UserLoginMethod entity by ID if the given value is not nil.
func (*UserCreate) SetNillablePhone ¶
func (uc *UserCreate) SetNillablePhone(s *string) *UserCreate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserCreate) SetPhone ¶
func (uc *UserCreate) SetPhone(s string) *UserCreate
SetPhone sets the "phone" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // LoginMethods holds the value of the login_methods edge. LoginMethods []*UserLoginMethod `json:"login_methods,omitempty"` // Introducer holds the value of the introducer edge. Introducer *UserLoginMethod `json:"introducer,omitempty"` // DefaultMerchant holds the value of the default_merchant edge. DefaultMerchant *Merchant `json:"default_merchant,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) DefaultMerchantOrErr ¶
DefaultMerchantOrErr returns the DefaultMerchant value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) IntroducerOrErr ¶
func (e UserEdges) IntroducerOrErr() (*UserLoginMethod, error)
IntroducerOrErr returns the Introducer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) LoginMethodsOrErr ¶
func (e UserEdges) LoginMethodsOrErr() ([]*UserLoginMethod, error)
LoginMethodsOrErr returns the LoginMethods value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserLoginMethod ¶
type UserLoginMethod struct { // ID of the ent. ID uint64 `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"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt time.Time `json:"deleted_at,omitempty"` // LoginType holds the value of the "login_type" field. LoginType string `json:"login_type,omitempty"` // Identifier holds the value of the "identifier" field. Identifier string `json:"identifier,omitempty"` // contains filtered or unexported fields }
UserLoginMethod is the model entity for the UserLoginMethod schema.
func (*UserLoginMethod) String ¶
func (ulm *UserLoginMethod) String() string
String implements the fmt.Stringer.
func (*UserLoginMethod) Unwrap ¶
func (ulm *UserLoginMethod) Unwrap() *UserLoginMethod
Unwrap unwraps the UserLoginMethod 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 (*UserLoginMethod) Update ¶
func (ulm *UserLoginMethod) Update() *UserLoginMethodUpdateOne
Update returns a builder for updating this UserLoginMethod. Note that you need to call UserLoginMethod.Unwrap() before calling this method if this UserLoginMethod was returned from a transaction, and the transaction was committed or rolled back.
type UserLoginMethodClient ¶
type UserLoginMethodClient struct {
// contains filtered or unexported fields
}
UserLoginMethodClient is a client for the UserLoginMethod schema.
func NewUserLoginMethodClient ¶
func NewUserLoginMethodClient(c config) *UserLoginMethodClient
NewUserLoginMethodClient returns a client for the UserLoginMethod from the given config.
func (*UserLoginMethodClient) Create ¶
func (c *UserLoginMethodClient) Create() *UserLoginMethodCreate
Create returns a builder for creating a UserLoginMethod entity.
func (*UserLoginMethodClient) CreateBulk ¶
func (c *UserLoginMethodClient) CreateBulk(builders ...*UserLoginMethodCreate) *UserLoginMethodCreateBulk
CreateBulk returns a builder for creating a bulk of UserLoginMethod entities.
func (*UserLoginMethodClient) Delete ¶
func (c *UserLoginMethodClient) Delete() *UserLoginMethodDelete
Delete returns a delete builder for UserLoginMethod.
func (*UserLoginMethodClient) DeleteOne ¶
func (c *UserLoginMethodClient) DeleteOne(ulm *UserLoginMethod) *UserLoginMethodDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserLoginMethodClient) DeleteOneID ¶
func (c *UserLoginMethodClient) DeleteOneID(id uint64) *UserLoginMethodDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserLoginMethodClient) Get ¶
func (c *UserLoginMethodClient) Get(ctx context.Context, id uint64) (*UserLoginMethod, error)
Get returns a UserLoginMethod entity by its id.
func (*UserLoginMethodClient) GetX ¶
func (c *UserLoginMethodClient) GetX(ctx context.Context, id uint64) *UserLoginMethod
GetX is like Get, but panics if an error occurs.
func (*UserLoginMethodClient) Hooks ¶
func (c *UserLoginMethodClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserLoginMethodClient) Intercept ¶
func (c *UserLoginMethodClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `userloginmethod.Intercept(f(g(h())))`.
func (*UserLoginMethodClient) Interceptors ¶
func (c *UserLoginMethodClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserLoginMethodClient) MapCreateBulk ¶
func (c *UserLoginMethodClient) MapCreateBulk(slice any, setFunc func(*UserLoginMethodCreate, int)) *UserLoginMethodCreateBulk
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 (*UserLoginMethodClient) Query ¶
func (c *UserLoginMethodClient) Query() *UserLoginMethodQuery
Query returns a query builder for UserLoginMethod.
func (*UserLoginMethodClient) Update ¶
func (c *UserLoginMethodClient) Update() *UserLoginMethodUpdate
Update returns an update builder for UserLoginMethod.
func (*UserLoginMethodClient) UpdateOne ¶
func (c *UserLoginMethodClient) UpdateOne(ulm *UserLoginMethod) *UserLoginMethodUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserLoginMethodClient) UpdateOneID ¶
func (c *UserLoginMethodClient) UpdateOneID(id uint64) *UserLoginMethodUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserLoginMethodClient) Use ¶
func (c *UserLoginMethodClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userloginmethod.Hooks(f(g(h())))`.
type UserLoginMethodCreate ¶
type UserLoginMethodCreate struct {
// contains filtered or unexported fields
}
UserLoginMethodCreate is the builder for creating a UserLoginMethod entity.
func (*UserLoginMethodCreate) Exec ¶
func (ulmc *UserLoginMethodCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserLoginMethodCreate) ExecX ¶
func (ulmc *UserLoginMethodCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserLoginMethodCreate) Mutation ¶
func (ulmc *UserLoginMethodCreate) Mutation() *UserLoginMethodMutation
Mutation returns the UserLoginMethodMutation object of the builder.
func (*UserLoginMethodCreate) Save ¶
func (ulmc *UserLoginMethodCreate) Save(ctx context.Context) (*UserLoginMethod, error)
Save creates the UserLoginMethod in the database.
func (*UserLoginMethodCreate) SaveX ¶
func (ulmc *UserLoginMethodCreate) SaveX(ctx context.Context) *UserLoginMethod
SaveX calls Save and panics if Save returns an error.
func (*UserLoginMethodCreate) SetCreatedAt ¶
func (ulmc *UserLoginMethodCreate) SetCreatedAt(t time.Time) *UserLoginMethodCreate
SetCreatedAt sets the "created_at" field.
func (*UserLoginMethodCreate) SetDeletedAt ¶
func (ulmc *UserLoginMethodCreate) SetDeletedAt(t time.Time) *UserLoginMethodCreate
SetDeletedAt sets the "deleted_at" field.
func (*UserLoginMethodCreate) SetID ¶
func (ulmc *UserLoginMethodCreate) SetID(u uint64) *UserLoginMethodCreate
SetID sets the "id" field.
func (*UserLoginMethodCreate) SetIdentifier ¶
func (ulmc *UserLoginMethodCreate) SetIdentifier(s string) *UserLoginMethodCreate
SetIdentifier sets the "identifier" field.
func (*UserLoginMethodCreate) SetLoginType ¶
func (ulmc *UserLoginMethodCreate) SetLoginType(s string) *UserLoginMethodCreate
SetLoginType sets the "login_type" field.
func (*UserLoginMethodCreate) SetNillableCreatedAt ¶
func (ulmc *UserLoginMethodCreate) SetNillableCreatedAt(t *time.Time) *UserLoginMethodCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserLoginMethodCreate) SetNillableDeletedAt ¶
func (ulmc *UserLoginMethodCreate) SetNillableDeletedAt(t *time.Time) *UserLoginMethodCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserLoginMethodCreate) SetNillableID ¶
func (ulmc *UserLoginMethodCreate) SetNillableID(u *uint64) *UserLoginMethodCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserLoginMethodCreate) SetNillableUpdatedAt ¶
func (ulmc *UserLoginMethodCreate) SetNillableUpdatedAt(t *time.Time) *UserLoginMethodCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserLoginMethodCreate) SetUpdatedAt ¶
func (ulmc *UserLoginMethodCreate) SetUpdatedAt(t time.Time) *UserLoginMethodCreate
SetUpdatedAt sets the "updated_at" field.
type UserLoginMethodCreateBulk ¶
type UserLoginMethodCreateBulk struct {
// contains filtered or unexported fields
}
UserLoginMethodCreateBulk is the builder for creating many UserLoginMethod entities in bulk.
func (*UserLoginMethodCreateBulk) Exec ¶
func (ulmcb *UserLoginMethodCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserLoginMethodCreateBulk) ExecX ¶
func (ulmcb *UserLoginMethodCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserLoginMethodCreateBulk) Save ¶
func (ulmcb *UserLoginMethodCreateBulk) Save(ctx context.Context) ([]*UserLoginMethod, error)
Save creates the UserLoginMethod entities in the database.
func (*UserLoginMethodCreateBulk) SaveX ¶
func (ulmcb *UserLoginMethodCreateBulk) SaveX(ctx context.Context) []*UserLoginMethod
SaveX is like Save, but panics if an error occurs.
type UserLoginMethodDelete ¶
type UserLoginMethodDelete struct {
// contains filtered or unexported fields
}
UserLoginMethodDelete is the builder for deleting a UserLoginMethod entity.
func (*UserLoginMethodDelete) Exec ¶
func (ulmd *UserLoginMethodDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserLoginMethodDelete) ExecX ¶
func (ulmd *UserLoginMethodDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserLoginMethodDelete) Where ¶
func (ulmd *UserLoginMethodDelete) Where(ps ...predicate.UserLoginMethod) *UserLoginMethodDelete
Where appends a list predicates to the UserLoginMethodDelete builder.
type UserLoginMethodDeleteOne ¶
type UserLoginMethodDeleteOne struct {
// contains filtered or unexported fields
}
UserLoginMethodDeleteOne is the builder for deleting a single UserLoginMethod entity.
func (*UserLoginMethodDeleteOne) Exec ¶
func (ulmdo *UserLoginMethodDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserLoginMethodDeleteOne) ExecX ¶
func (ulmdo *UserLoginMethodDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserLoginMethodDeleteOne) Where ¶
func (ulmdo *UserLoginMethodDeleteOne) Where(ps ...predicate.UserLoginMethod) *UserLoginMethodDeleteOne
Where appends a list predicates to the UserLoginMethodDelete builder.
type UserLoginMethodGroupBy ¶
type UserLoginMethodGroupBy struct {
// contains filtered or unexported fields
}
UserLoginMethodGroupBy is the group-by builder for UserLoginMethod entities.
func (*UserLoginMethodGroupBy) Aggregate ¶
func (ulmgb *UserLoginMethodGroupBy) Aggregate(fns ...AggregateFunc) *UserLoginMethodGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserLoginMethodGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserLoginMethodGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserLoginMethodGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserLoginMethodGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserLoginMethodGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*UserLoginMethodGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserLoginMethodGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserLoginMethodGroupBy) Scan ¶
func (ulmgb *UserLoginMethodGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserLoginMethodGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserLoginMethodMutation ¶
type UserLoginMethodMutation struct {
// contains filtered or unexported fields
}
UserLoginMethodMutation represents an operation that mutates the UserLoginMethod nodes in the graph.
func (*UserLoginMethodMutation) AddField ¶
func (m *UserLoginMethodMutation) 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 (*UserLoginMethodMutation) AddedEdges ¶
func (m *UserLoginMethodMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserLoginMethodMutation) AddedField ¶
func (m *UserLoginMethodMutation) 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 (*UserLoginMethodMutation) AddedFields ¶
func (m *UserLoginMethodMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserLoginMethodMutation) AddedIDs ¶
func (m *UserLoginMethodMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserLoginMethodMutation) ClearDeletedAt ¶
func (m *UserLoginMethodMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserLoginMethodMutation) ClearEdge ¶
func (m *UserLoginMethodMutation) 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 (*UserLoginMethodMutation) ClearField ¶
func (m *UserLoginMethodMutation) 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 (*UserLoginMethodMutation) ClearedEdges ¶
func (m *UserLoginMethodMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserLoginMethodMutation) ClearedFields ¶
func (m *UserLoginMethodMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserLoginMethodMutation) Client ¶
func (m UserLoginMethodMutation) 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 (*UserLoginMethodMutation) CreatedAt ¶
func (m *UserLoginMethodMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserLoginMethodMutation) DeletedAt ¶
func (m *UserLoginMethodMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*UserLoginMethodMutation) DeletedAtCleared ¶
func (m *UserLoginMethodMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*UserLoginMethodMutation) EdgeCleared ¶
func (m *UserLoginMethodMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserLoginMethodMutation) Field ¶
func (m *UserLoginMethodMutation) 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 (*UserLoginMethodMutation) FieldCleared ¶
func (m *UserLoginMethodMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserLoginMethodMutation) Fields ¶
func (m *UserLoginMethodMutation) 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 (*UserLoginMethodMutation) ID ¶
func (m *UserLoginMethodMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserLoginMethodMutation) IDs ¶
func (m *UserLoginMethodMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserLoginMethodMutation) Identifier ¶
func (m *UserLoginMethodMutation) Identifier() (r string, exists bool)
Identifier returns the value of the "identifier" field in the mutation.
func (*UserLoginMethodMutation) LoginType ¶
func (m *UserLoginMethodMutation) LoginType() (r string, exists bool)
LoginType returns the value of the "login_type" field in the mutation.
func (*UserLoginMethodMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the UserLoginMethod entity. If the UserLoginMethod 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 (*UserLoginMethodMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the UserLoginMethod entity. If the UserLoginMethod 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 (*UserLoginMethodMutation) 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 (*UserLoginMethodMutation) OldIdentifier ¶
func (m *UserLoginMethodMutation) OldIdentifier(ctx context.Context) (v string, err error)
OldIdentifier returns the old "identifier" field's value of the UserLoginMethod entity. If the UserLoginMethod 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 (*UserLoginMethodMutation) OldLoginType ¶
func (m *UserLoginMethodMutation) OldLoginType(ctx context.Context) (v string, err error)
OldLoginType returns the old "login_type" field's value of the UserLoginMethod entity. If the UserLoginMethod 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 (*UserLoginMethodMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the UserLoginMethod entity. If the UserLoginMethod 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 (*UserLoginMethodMutation) Op ¶
func (m *UserLoginMethodMutation) Op() Op
Op returns the operation name.
func (*UserLoginMethodMutation) RemovedEdges ¶
func (m *UserLoginMethodMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserLoginMethodMutation) RemovedIDs ¶
func (m *UserLoginMethodMutation) 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 (*UserLoginMethodMutation) ResetCreatedAt ¶
func (m *UserLoginMethodMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserLoginMethodMutation) ResetDeletedAt ¶
func (m *UserLoginMethodMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*UserLoginMethodMutation) ResetEdge ¶
func (m *UserLoginMethodMutation) 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 (*UserLoginMethodMutation) ResetField ¶
func (m *UserLoginMethodMutation) 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 (*UserLoginMethodMutation) ResetIdentifier ¶
func (m *UserLoginMethodMutation) ResetIdentifier()
ResetIdentifier resets all changes to the "identifier" field.
func (*UserLoginMethodMutation) ResetLoginType ¶
func (m *UserLoginMethodMutation) ResetLoginType()
ResetLoginType resets all changes to the "login_type" field.
func (*UserLoginMethodMutation) ResetUpdatedAt ¶
func (m *UserLoginMethodMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserLoginMethodMutation) SetCreatedAt ¶
func (m *UserLoginMethodMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserLoginMethodMutation) SetDeletedAt ¶
func (m *UserLoginMethodMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*UserLoginMethodMutation) SetField ¶
func (m *UserLoginMethodMutation) 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 (*UserLoginMethodMutation) SetID ¶
func (m *UserLoginMethodMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of UserLoginMethod entities.
func (*UserLoginMethodMutation) SetIdentifier ¶
func (m *UserLoginMethodMutation) SetIdentifier(s string)
SetIdentifier sets the "identifier" field.
func (*UserLoginMethodMutation) SetLoginType ¶
func (m *UserLoginMethodMutation) SetLoginType(s string)
SetLoginType sets the "login_type" field.
func (*UserLoginMethodMutation) SetOp ¶
func (m *UserLoginMethodMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserLoginMethodMutation) SetUpdatedAt ¶
func (m *UserLoginMethodMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (UserLoginMethodMutation) Tx ¶
func (m UserLoginMethodMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserLoginMethodMutation) Type ¶
func (m *UserLoginMethodMutation) Type() string
Type returns the node type of this mutation (UserLoginMethod).
func (*UserLoginMethodMutation) UpdatedAt ¶
func (m *UserLoginMethodMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserLoginMethodMutation) Where ¶
func (m *UserLoginMethodMutation) Where(ps ...predicate.UserLoginMethod)
Where appends a list predicates to the UserLoginMethodMutation builder.
func (*UserLoginMethodMutation) WhereP ¶
func (m *UserLoginMethodMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserLoginMethodMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserLoginMethodQuery ¶
type UserLoginMethodQuery struct {
// contains filtered or unexported fields
}
UserLoginMethodQuery is the builder for querying UserLoginMethod entities.
func (*UserLoginMethodQuery) Aggregate ¶
func (ulmq *UserLoginMethodQuery) Aggregate(fns ...AggregateFunc) *UserLoginMethodSelect
Aggregate returns a UserLoginMethodSelect configured with the given aggregations.
func (*UserLoginMethodQuery) All ¶
func (ulmq *UserLoginMethodQuery) All(ctx context.Context) ([]*UserLoginMethod, error)
All executes the query and returns a list of UserLoginMethods.
func (*UserLoginMethodQuery) AllX ¶
func (ulmq *UserLoginMethodQuery) AllX(ctx context.Context) []*UserLoginMethod
AllX is like All, but panics if an error occurs.
func (*UserLoginMethodQuery) Clone ¶
func (ulmq *UserLoginMethodQuery) Clone() *UserLoginMethodQuery
Clone returns a duplicate of the UserLoginMethodQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserLoginMethodQuery) Count ¶
func (ulmq *UserLoginMethodQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserLoginMethodQuery) CountX ¶
func (ulmq *UserLoginMethodQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserLoginMethodQuery) Exist ¶
func (ulmq *UserLoginMethodQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserLoginMethodQuery) ExistX ¶
func (ulmq *UserLoginMethodQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserLoginMethodQuery) First ¶
func (ulmq *UserLoginMethodQuery) First(ctx context.Context) (*UserLoginMethod, error)
First returns the first UserLoginMethod entity from the query. Returns a *NotFoundError when no UserLoginMethod was found.
func (*UserLoginMethodQuery) FirstID ¶
func (ulmq *UserLoginMethodQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first UserLoginMethod ID from the query. Returns a *NotFoundError when no UserLoginMethod ID was found.
func (*UserLoginMethodQuery) FirstIDX ¶
func (ulmq *UserLoginMethodQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserLoginMethodQuery) FirstX ¶
func (ulmq *UserLoginMethodQuery) FirstX(ctx context.Context) *UserLoginMethod
FirstX is like First, but panics if an error occurs.
func (*UserLoginMethodQuery) GroupBy ¶
func (ulmq *UserLoginMethodQuery) GroupBy(field string, fields ...string) *UserLoginMethodGroupBy
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.UserLoginMethod.Query(). GroupBy(userloginmethod.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserLoginMethodQuery) IDs ¶
func (ulmq *UserLoginMethodQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of UserLoginMethod IDs.
func (*UserLoginMethodQuery) IDsX ¶
func (ulmq *UserLoginMethodQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*UserLoginMethodQuery) Limit ¶
func (ulmq *UserLoginMethodQuery) Limit(limit int) *UserLoginMethodQuery
Limit the number of records to be returned by this query.
func (*UserLoginMethodQuery) Offset ¶
func (ulmq *UserLoginMethodQuery) Offset(offset int) *UserLoginMethodQuery
Offset to start from.
func (*UserLoginMethodQuery) Only ¶
func (ulmq *UserLoginMethodQuery) Only(ctx context.Context) (*UserLoginMethod, error)
Only returns a single UserLoginMethod entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserLoginMethod entity is found. Returns a *NotFoundError when no UserLoginMethod entities are found.
func (*UserLoginMethodQuery) OnlyID ¶
func (ulmq *UserLoginMethodQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only UserLoginMethod ID in the query. Returns a *NotSingularError when more than one UserLoginMethod ID is found. Returns a *NotFoundError when no entities are found.
func (*UserLoginMethodQuery) OnlyIDX ¶
func (ulmq *UserLoginMethodQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserLoginMethodQuery) OnlyX ¶
func (ulmq *UserLoginMethodQuery) OnlyX(ctx context.Context) *UserLoginMethod
OnlyX is like Only, but panics if an error occurs.
func (*UserLoginMethodQuery) Order ¶
func (ulmq *UserLoginMethodQuery) Order(o ...userloginmethod.OrderOption) *UserLoginMethodQuery
Order specifies how the records should be ordered.
func (*UserLoginMethodQuery) Select ¶
func (ulmq *UserLoginMethodQuery) Select(fields ...string) *UserLoginMethodSelect
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.UserLoginMethod.Query(). Select(userloginmethod.FieldCreatedAt). Scan(ctx, &v)
func (*UserLoginMethodQuery) Unique ¶
func (ulmq *UserLoginMethodQuery) Unique(unique bool) *UserLoginMethodQuery
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 (*UserLoginMethodQuery) Where ¶
func (ulmq *UserLoginMethodQuery) Where(ps ...predicate.UserLoginMethod) *UserLoginMethodQuery
Where adds a new predicate for the UserLoginMethodQuery builder.
type UserLoginMethodSelect ¶
type UserLoginMethodSelect struct { *UserLoginMethodQuery // contains filtered or unexported fields }
UserLoginMethodSelect is the builder for selecting fields of UserLoginMethod entities.
func (*UserLoginMethodSelect) Aggregate ¶
func (ulms *UserLoginMethodSelect) Aggregate(fns ...AggregateFunc) *UserLoginMethodSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserLoginMethodSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserLoginMethodSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserLoginMethodSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserLoginMethodSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserLoginMethodSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*UserLoginMethodSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserLoginMethodSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserLoginMethodSelect) Scan ¶
func (ulms *UserLoginMethodSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserLoginMethodSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserLoginMethodUpdate ¶
type UserLoginMethodUpdate struct {
// contains filtered or unexported fields
}
UserLoginMethodUpdate is the builder for updating UserLoginMethod entities.
func (*UserLoginMethodUpdate) ClearDeletedAt ¶
func (ulmu *UserLoginMethodUpdate) ClearDeletedAt() *UserLoginMethodUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserLoginMethodUpdate) Exec ¶
func (ulmu *UserLoginMethodUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserLoginMethodUpdate) ExecX ¶
func (ulmu *UserLoginMethodUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserLoginMethodUpdate) Mutation ¶
func (ulmu *UserLoginMethodUpdate) Mutation() *UserLoginMethodMutation
Mutation returns the UserLoginMethodMutation object of the builder.
func (*UserLoginMethodUpdate) Save ¶
func (ulmu *UserLoginMethodUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserLoginMethodUpdate) SaveX ¶
func (ulmu *UserLoginMethodUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserLoginMethodUpdate) SetDeletedAt ¶
func (ulmu *UserLoginMethodUpdate) SetDeletedAt(t time.Time) *UserLoginMethodUpdate
SetDeletedAt sets the "deleted_at" field.
func (*UserLoginMethodUpdate) SetIdentifier ¶
func (ulmu *UserLoginMethodUpdate) SetIdentifier(s string) *UserLoginMethodUpdate
SetIdentifier sets the "identifier" field.
func (*UserLoginMethodUpdate) SetLoginType ¶
func (ulmu *UserLoginMethodUpdate) SetLoginType(s string) *UserLoginMethodUpdate
SetLoginType sets the "login_type" field.
func (*UserLoginMethodUpdate) SetNillableDeletedAt ¶
func (ulmu *UserLoginMethodUpdate) SetNillableDeletedAt(t *time.Time) *UserLoginMethodUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserLoginMethodUpdate) SetNillableIdentifier ¶
func (ulmu *UserLoginMethodUpdate) SetNillableIdentifier(s *string) *UserLoginMethodUpdate
SetNillableIdentifier sets the "identifier" field if the given value is not nil.
func (*UserLoginMethodUpdate) SetNillableLoginType ¶
func (ulmu *UserLoginMethodUpdate) SetNillableLoginType(s *string) *UserLoginMethodUpdate
SetNillableLoginType sets the "login_type" field if the given value is not nil.
func (*UserLoginMethodUpdate) SetUpdatedAt ¶
func (ulmu *UserLoginMethodUpdate) SetUpdatedAt(t time.Time) *UserLoginMethodUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserLoginMethodUpdate) Where ¶
func (ulmu *UserLoginMethodUpdate) Where(ps ...predicate.UserLoginMethod) *UserLoginMethodUpdate
Where appends a list predicates to the UserLoginMethodUpdate builder.
type UserLoginMethodUpdateOne ¶
type UserLoginMethodUpdateOne struct {
// contains filtered or unexported fields
}
UserLoginMethodUpdateOne is the builder for updating a single UserLoginMethod entity.
func (*UserLoginMethodUpdateOne) ClearDeletedAt ¶
func (ulmuo *UserLoginMethodUpdateOne) ClearDeletedAt() *UserLoginMethodUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserLoginMethodUpdateOne) Exec ¶
func (ulmuo *UserLoginMethodUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserLoginMethodUpdateOne) ExecX ¶
func (ulmuo *UserLoginMethodUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserLoginMethodUpdateOne) Mutation ¶
func (ulmuo *UserLoginMethodUpdateOne) Mutation() *UserLoginMethodMutation
Mutation returns the UserLoginMethodMutation object of the builder.
func (*UserLoginMethodUpdateOne) Save ¶
func (ulmuo *UserLoginMethodUpdateOne) Save(ctx context.Context) (*UserLoginMethod, error)
Save executes the query and returns the updated UserLoginMethod entity.
func (*UserLoginMethodUpdateOne) SaveX ¶
func (ulmuo *UserLoginMethodUpdateOne) SaveX(ctx context.Context) *UserLoginMethod
SaveX is like Save, but panics if an error occurs.
func (*UserLoginMethodUpdateOne) Select ¶
func (ulmuo *UserLoginMethodUpdateOne) Select(field string, fields ...string) *UserLoginMethodUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserLoginMethodUpdateOne) SetDeletedAt ¶
func (ulmuo *UserLoginMethodUpdateOne) SetDeletedAt(t time.Time) *UserLoginMethodUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*UserLoginMethodUpdateOne) SetIdentifier ¶
func (ulmuo *UserLoginMethodUpdateOne) SetIdentifier(s string) *UserLoginMethodUpdateOne
SetIdentifier sets the "identifier" field.
func (*UserLoginMethodUpdateOne) SetLoginType ¶
func (ulmuo *UserLoginMethodUpdateOne) SetLoginType(s string) *UserLoginMethodUpdateOne
SetLoginType sets the "login_type" field.
func (*UserLoginMethodUpdateOne) SetNillableDeletedAt ¶
func (ulmuo *UserLoginMethodUpdateOne) SetNillableDeletedAt(t *time.Time) *UserLoginMethodUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserLoginMethodUpdateOne) SetNillableIdentifier ¶
func (ulmuo *UserLoginMethodUpdateOne) SetNillableIdentifier(s *string) *UserLoginMethodUpdateOne
SetNillableIdentifier sets the "identifier" field if the given value is not nil.
func (*UserLoginMethodUpdateOne) SetNillableLoginType ¶
func (ulmuo *UserLoginMethodUpdateOne) SetNillableLoginType(s *string) *UserLoginMethodUpdateOne
SetNillableLoginType sets the "login_type" field if the given value is not nil.
func (*UserLoginMethodUpdateOne) SetUpdatedAt ¶
func (ulmuo *UserLoginMethodUpdateOne) SetUpdatedAt(t time.Time) *UserLoginMethodUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserLoginMethodUpdateOne) Where ¶
func (ulmuo *UserLoginMethodUpdateOne) Where(ps ...predicate.UserLoginMethod) *UserLoginMethodUpdateOne
Where appends a list predicates to the UserLoginMethodUpdate builder.
type UserLoginMethods ¶
type UserLoginMethods []*UserLoginMethod
UserLoginMethods is a parsable slice of UserLoginMethod.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) 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 (*UserMutation) AddLoginMethodIDs ¶
func (m *UserMutation) AddLoginMethodIDs(ids ...uint64)
AddLoginMethodIDs adds the "login_methods" edge to the UserLoginMethod entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) 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 (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearDefaultMerchant ¶
func (m *UserMutation) ClearDefaultMerchant()
ClearDefaultMerchant clears the "default_merchant" edge to the Merchant entity.
func (*UserMutation) ClearDeletedAt ¶
func (m *UserMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) 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 (*UserMutation) ClearEmail ¶
func (m *UserMutation) ClearEmail()
ClearEmail clears the value of the "email" field.
func (*UserMutation) ClearField ¶
func (m *UserMutation) 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 (*UserMutation) ClearIntroducer ¶
func (m *UserMutation) ClearIntroducer()
ClearIntroducer clears the "introducer" edge to the UserLoginMethod entity.
func (*UserMutation) ClearLoginMethods ¶
func (m *UserMutation) ClearLoginMethods()
ClearLoginMethods clears the "login_methods" edge to the UserLoginMethod entity.
func (*UserMutation) ClearPhone ¶
func (m *UserMutation) ClearPhone()
ClearPhone clears the value of the "phone" field.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) 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 (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) DefaultMerchantCleared ¶
func (m *UserMutation) DefaultMerchantCleared() bool
DefaultMerchantCleared reports if the "default_merchant" edge to the Merchant entity was cleared.
func (*UserMutation) DefaultMerchantID ¶
func (m *UserMutation) DefaultMerchantID() (id uint64, exists bool)
DefaultMerchantID returns the "default_merchant" edge ID in the mutation.
func (*UserMutation) DefaultMerchantIDs ¶
func (m *UserMutation) DefaultMerchantIDs() (ids []uint64)
DefaultMerchantIDs returns the "default_merchant" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DefaultMerchantID instead. It exists only for internal usage by the builders.
func (*UserMutation) DeletedAt ¶
func (m *UserMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*UserMutation) DeletedAtCleared ¶
func (m *UserMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) EmailCleared ¶
func (m *UserMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) 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 (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) 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 (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) IntroducerCleared ¶
func (m *UserMutation) IntroducerCleared() bool
IntroducerCleared reports if the "introducer" edge to the UserLoginMethod entity was cleared.
func (*UserMutation) IntroducerID ¶
func (m *UserMutation) IntroducerID() (id uint64, exists bool)
IntroducerID returns the "introducer" edge ID in the mutation.
func (*UserMutation) IntroducerIDs ¶
func (m *UserMutation) IntroducerIDs() (ids []uint64)
IntroducerIDs returns the "introducer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use IntroducerID instead. It exists only for internal usage by the builders.
func (*UserMutation) LoginMethodsCleared ¶
func (m *UserMutation) LoginMethodsCleared() bool
LoginMethodsCleared reports if the "login_methods" edge to the UserLoginMethod entity was cleared.
func (*UserMutation) LoginMethodsIDs ¶
func (m *UserMutation) LoginMethodsIDs() (ids []uint64)
LoginMethodsIDs returns the "login_methods" edge IDs in the mutation.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User 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 (*UserMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the User entity. If the User 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 (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User 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 (*UserMutation) 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 (*UserMutation) OldPhone ¶
func (m *UserMutation) OldPhone(ctx context.Context) (v string, err error)
OldPhone returns the old "phone" field's value of the User entity. If the User 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 (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User 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 (*UserMutation) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the User entity. If the User 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 (*UserMutation) Phone ¶
func (m *UserMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*UserMutation) PhoneCleared ¶
func (m *UserMutation) PhoneCleared() bool
PhoneCleared returns if the "phone" field was cleared in this mutation.
func (*UserMutation) RemoveLoginMethodIDs ¶
func (m *UserMutation) RemoveLoginMethodIDs(ids ...uint64)
RemoveLoginMethodIDs removes the "login_methods" edge to the UserLoginMethod entity by IDs.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) 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 (*UserMutation) RemovedLoginMethodsIDs ¶
func (m *UserMutation) RemovedLoginMethodsIDs() (ids []uint64)
RemovedLoginMethods returns the removed IDs of the "login_methods" edge to the UserLoginMethod entity.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetDefaultMerchant ¶
func (m *UserMutation) ResetDefaultMerchant()
ResetDefaultMerchant resets all changes to the "default_merchant" edge.
func (*UserMutation) ResetDeletedAt ¶
func (m *UserMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) 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 (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) 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 (*UserMutation) ResetIntroducer ¶
func (m *UserMutation) ResetIntroducer()
ResetIntroducer resets all changes to the "introducer" edge.
func (*UserMutation) ResetLoginMethods ¶
func (m *UserMutation) ResetLoginMethods()
ResetLoginMethods resets all changes to the "login_methods" edge.
func (*UserMutation) ResetPhone ¶
func (m *UserMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetDefaultMerchantID ¶
func (m *UserMutation) SetDefaultMerchantID(id uint64)
SetDefaultMerchantID sets the "default_merchant" edge to the Merchant entity by id.
func (*UserMutation) SetDeletedAt ¶
func (m *UserMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) 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 (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetIntroducerID ¶
func (m *UserMutation) SetIntroducerID(id uint64)
SetIntroducerID sets the "introducer" edge to the UserLoginMethod entity by id.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPhone ¶
func (m *UserMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
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.User.Query(). GroupBy(user.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) QueryDefaultMerchant ¶
func (uq *UserQuery) QueryDefaultMerchant() *MerchantQuery
QueryDefaultMerchant chains the current query on the "default_merchant" edge.
func (*UserQuery) QueryIntroducer ¶
func (uq *UserQuery) QueryIntroducer() *UserLoginMethodQuery
QueryIntroducer chains the current query on the "introducer" edge.
func (*UserQuery) QueryLoginMethods ¶
func (uq *UserQuery) QueryLoginMethods() *UserLoginMethodQuery
QueryLoginMethods chains the current query on the "login_methods" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
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.User.Query(). Select(user.FieldCreatedAt). Scan(ctx, &v)
func (*UserQuery) 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 (*UserQuery) WithDefaultMerchant ¶
func (uq *UserQuery) WithDefaultMerchant(opts ...func(*MerchantQuery)) *UserQuery
WithDefaultMerchant tells the query-builder to eager-load the nodes that are connected to the "default_merchant" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithIntroducer ¶
func (uq *UserQuery) WithIntroducer(opts ...func(*UserLoginMethodQuery)) *UserQuery
WithIntroducer tells the query-builder to eager-load the nodes that are connected to the "introducer" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithLoginMethods ¶
func (uq *UserQuery) WithLoginMethods(opts ...func(*UserLoginMethodQuery)) *UserQuery
WithLoginMethods tells the query-builder to eager-load the nodes that are connected to the "login_methods" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddLoginMethodIDs ¶
func (uu *UserUpdate) AddLoginMethodIDs(ids ...uint64) *UserUpdate
AddLoginMethodIDs adds the "login_methods" edge to the UserLoginMethod entity by IDs.
func (*UserUpdate) AddLoginMethods ¶
func (uu *UserUpdate) AddLoginMethods(u ...*UserLoginMethod) *UserUpdate
AddLoginMethods adds the "login_methods" edges to the UserLoginMethod entity.
func (*UserUpdate) ClearDefaultMerchant ¶
func (uu *UserUpdate) ClearDefaultMerchant() *UserUpdate
ClearDefaultMerchant clears the "default_merchant" edge to the Merchant entity.
func (*UserUpdate) ClearDeletedAt ¶
func (uu *UserUpdate) ClearDeletedAt() *UserUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpdate) ClearEmail ¶
func (uu *UserUpdate) ClearEmail() *UserUpdate
ClearEmail clears the value of the "email" field.
func (*UserUpdate) ClearIntroducer ¶
func (uu *UserUpdate) ClearIntroducer() *UserUpdate
ClearIntroducer clears the "introducer" edge to the UserLoginMethod entity.
func (*UserUpdate) ClearLoginMethods ¶
func (uu *UserUpdate) ClearLoginMethods() *UserUpdate
ClearLoginMethods clears all "login_methods" edges to the UserLoginMethod entity.
func (*UserUpdate) ClearPhone ¶
func (uu *UserUpdate) ClearPhone() *UserUpdate
ClearPhone clears the value of the "phone" field.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveLoginMethodIDs ¶
func (uu *UserUpdate) RemoveLoginMethodIDs(ids ...uint64) *UserUpdate
RemoveLoginMethodIDs removes the "login_methods" edge to UserLoginMethod entities by IDs.
func (*UserUpdate) RemoveLoginMethods ¶
func (uu *UserUpdate) RemoveLoginMethods(u ...*UserLoginMethod) *UserUpdate
RemoveLoginMethods removes "login_methods" edges to UserLoginMethod entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetDefaultMerchant ¶
func (uu *UserUpdate) SetDefaultMerchant(m *Merchant) *UserUpdate
SetDefaultMerchant sets the "default_merchant" edge to the Merchant entity.
func (*UserUpdate) SetDefaultMerchantID ¶
func (uu *UserUpdate) SetDefaultMerchantID(id uint64) *UserUpdate
SetDefaultMerchantID sets the "default_merchant" edge to the Merchant entity by ID.
func (*UserUpdate) SetDeletedAt ¶
func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetIntroducer ¶
func (uu *UserUpdate) SetIntroducer(u *UserLoginMethod) *UserUpdate
SetIntroducer sets the "introducer" edge to the UserLoginMethod entity.
func (*UserUpdate) SetIntroducerID ¶
func (uu *UserUpdate) SetIntroducerID(id uint64) *UserUpdate
SetIntroducerID sets the "introducer" edge to the UserLoginMethod entity by ID.
func (*UserUpdate) SetNillableDefaultMerchantID ¶
func (uu *UserUpdate) SetNillableDefaultMerchantID(id *uint64) *UserUpdate
SetNillableDefaultMerchantID sets the "default_merchant" edge to the Merchant entity by ID if the given value is not nil.
func (*UserUpdate) SetNillableDeletedAt ¶
func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserUpdate) SetNillableEmail ¶
func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdate) SetNillableIntroducerID ¶
func (uu *UserUpdate) SetNillableIntroducerID(id *uint64) *UserUpdate
SetNillableIntroducerID sets the "introducer" edge to the UserLoginMethod entity by ID if the given value is not nil.
func (*UserUpdate) SetNillablePhone ¶
func (uu *UserUpdate) SetNillablePhone(s *string) *UserUpdate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*UserUpdate) SetNillableUsername ¶
func (uu *UserUpdate) SetNillableUsername(s *string) *UserUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdate) SetPhone ¶
func (uu *UserUpdate) SetPhone(s string) *UserUpdate
SetPhone sets the "phone" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddLoginMethodIDs ¶
func (uuo *UserUpdateOne) AddLoginMethodIDs(ids ...uint64) *UserUpdateOne
AddLoginMethodIDs adds the "login_methods" edge to the UserLoginMethod entity by IDs.
func (*UserUpdateOne) AddLoginMethods ¶
func (uuo *UserUpdateOne) AddLoginMethods(u ...*UserLoginMethod) *UserUpdateOne
AddLoginMethods adds the "login_methods" edges to the UserLoginMethod entity.
func (*UserUpdateOne) ClearDefaultMerchant ¶
func (uuo *UserUpdateOne) ClearDefaultMerchant() *UserUpdateOne
ClearDefaultMerchant clears the "default_merchant" edge to the Merchant entity.
func (*UserUpdateOne) ClearDeletedAt ¶
func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpdateOne) ClearEmail ¶
func (uuo *UserUpdateOne) ClearEmail() *UserUpdateOne
ClearEmail clears the value of the "email" field.
func (*UserUpdateOne) ClearIntroducer ¶
func (uuo *UserUpdateOne) ClearIntroducer() *UserUpdateOne
ClearIntroducer clears the "introducer" edge to the UserLoginMethod entity.
func (*UserUpdateOne) ClearLoginMethods ¶
func (uuo *UserUpdateOne) ClearLoginMethods() *UserUpdateOne
ClearLoginMethods clears all "login_methods" edges to the UserLoginMethod entity.
func (*UserUpdateOne) ClearPhone ¶
func (uuo *UserUpdateOne) ClearPhone() *UserUpdateOne
ClearPhone clears the value of the "phone" field.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveLoginMethodIDs ¶
func (uuo *UserUpdateOne) RemoveLoginMethodIDs(ids ...uint64) *UserUpdateOne
RemoveLoginMethodIDs removes the "login_methods" edge to UserLoginMethod entities by IDs.
func (*UserUpdateOne) RemoveLoginMethods ¶
func (uuo *UserUpdateOne) RemoveLoginMethods(u ...*UserLoginMethod) *UserUpdateOne
RemoveLoginMethods removes "login_methods" edges to UserLoginMethod entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetDefaultMerchant ¶
func (uuo *UserUpdateOne) SetDefaultMerchant(m *Merchant) *UserUpdateOne
SetDefaultMerchant sets the "default_merchant" edge to the Merchant entity.
func (*UserUpdateOne) SetDefaultMerchantID ¶
func (uuo *UserUpdateOne) SetDefaultMerchantID(id uint64) *UserUpdateOne
SetDefaultMerchantID sets the "default_merchant" edge to the Merchant entity by ID.
func (*UserUpdateOne) SetDeletedAt ¶
func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetIntroducer ¶
func (uuo *UserUpdateOne) SetIntroducer(u *UserLoginMethod) *UserUpdateOne
SetIntroducer sets the "introducer" edge to the UserLoginMethod entity.
func (*UserUpdateOne) SetIntroducerID ¶
func (uuo *UserUpdateOne) SetIntroducerID(id uint64) *UserUpdateOne
SetIntroducerID sets the "introducer" edge to the UserLoginMethod entity by ID.
func (*UserUpdateOne) SetNillableDefaultMerchantID ¶
func (uuo *UserUpdateOne) SetNillableDefaultMerchantID(id *uint64) *UserUpdateOne
SetNillableDefaultMerchantID sets the "default_merchant" edge to the Merchant entity by ID if the given value is not nil.
func (*UserUpdateOne) SetNillableDeletedAt ¶
func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmail ¶
func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdateOne) SetNillableIntroducerID ¶
func (uuo *UserUpdateOne) SetNillableIntroducerID(id *uint64) *UserUpdateOne
SetNillableIntroducerID sets the "introducer" edge to the UserLoginMethod entity by ID if the given value is not nil.
func (*UserUpdateOne) SetNillablePhone ¶
func (uuo *UserUpdateOne) SetNillablePhone(s *string) *UserUpdateOne
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUsername ¶
func (uuo *UserUpdateOne) SetNillableUsername(s *string) *UserUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdateOne) SetPhone ¶
func (uuo *UserUpdateOne) SetPhone(s string) *UserUpdateOne
SetPhone sets the "phone" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files
¶
- client.go
- ent.go
- generate.go
- merchant.go
- merchant_create.go
- merchant_delete.go
- merchant_query.go
- merchant_update.go
- merchantaccount.go
- merchantaccount_create.go
- merchantaccount_delete.go
- merchantaccount_query.go
- merchantaccount_update.go
- mutation.go
- platformaccount.go
- platformaccount_create.go
- platformaccount_delete.go
- platformaccount_query.go
- platformaccount_update.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- userloginmethod.go
- userloginmethod_create.go
- userloginmethod_delete.go
- userloginmethod_query.go
- userloginmethod_update.go