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 DemoOrder
- type DemoOrderClient
- func (c *DemoOrderClient) Create() *DemoOrderCreate
- func (c *DemoOrderClient) CreateBulk(builders ...*DemoOrderCreate) *DemoOrderCreateBulk
- func (c *DemoOrderClient) Delete() *DemoOrderDelete
- func (c *DemoOrderClient) DeleteOne(do *DemoOrder) *DemoOrderDeleteOne
- func (c *DemoOrderClient) DeleteOneID(id uint64) *DemoOrderDeleteOne
- func (c *DemoOrderClient) Get(ctx context.Context, id uint64) (*DemoOrder, error)
- func (c *DemoOrderClient) GetX(ctx context.Context, id uint64) *DemoOrder
- func (c *DemoOrderClient) Hooks() []Hook
- func (c *DemoOrderClient) Intercept(interceptors ...Interceptor)
- func (c *DemoOrderClient) Interceptors() []Interceptor
- func (c *DemoOrderClient) MapCreateBulk(slice any, setFunc func(*DemoOrderCreate, int)) *DemoOrderCreateBulk
- func (c *DemoOrderClient) Query() *DemoOrderQuery
- func (c *DemoOrderClient) Update() *DemoOrderUpdate
- func (c *DemoOrderClient) UpdateOne(do *DemoOrder) *DemoOrderUpdateOne
- func (c *DemoOrderClient) UpdateOneID(id uint64) *DemoOrderUpdateOne
- func (c *DemoOrderClient) Use(hooks ...Hook)
- type DemoOrderCreate
- func (doc *DemoOrderCreate) Exec(ctx context.Context) error
- func (doc *DemoOrderCreate) ExecX(ctx context.Context)
- func (doc *DemoOrderCreate) Mutation() *DemoOrderMutation
- func (doc *DemoOrderCreate) Save(ctx context.Context) (*DemoOrder, error)
- func (doc *DemoOrderCreate) SaveX(ctx context.Context) *DemoOrder
- func (doc *DemoOrderCreate) SetCreatedAt(t time.Time) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetDeletedAt(t time.Time) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetID(u uint64) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetNillableCreatedAt(t *time.Time) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetNillableDeletedAt(t *time.Time) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetNillablePayChannelCode(s *string) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetNillablePayOrderId(u *uint64) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetNillablePayRefundID(u *uint64) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetNillablePayTime(t *time.Time) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetNillableRefundPrice(i *int32) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetNillableRefundTime(t *time.Time) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetNillableUpdatedAt(t *time.Time) *DemoOrderCreate
- func (do *DemoOrderCreate) SetNotNilDeletedAt(value *time.Time) *DemoOrderCreate
- func (do *DemoOrderCreate) SetNotNilPayChannelCode(value *string) *DemoOrderCreate
- func (do *DemoOrderCreate) SetNotNilPayOrderId(value *uint64) *DemoOrderCreate
- func (do *DemoOrderCreate) SetNotNilPayRefundID(value *uint64) *DemoOrderCreate
- func (do *DemoOrderCreate) SetNotNilPayStatus(value *bool) *DemoOrderCreate
- func (do *DemoOrderCreate) SetNotNilPayTime(value *time.Time) *DemoOrderCreate
- func (do *DemoOrderCreate) SetNotNilPrice(value *int32) *DemoOrderCreate
- func (do *DemoOrderCreate) SetNotNilRefundPrice(value *int32) *DemoOrderCreate
- func (do *DemoOrderCreate) SetNotNilRefundTime(value *time.Time) *DemoOrderCreate
- func (do *DemoOrderCreate) SetNotNilSpuID(value *uint64) *DemoOrderCreate
- func (do *DemoOrderCreate) SetNotNilSpuName(value *string) *DemoOrderCreate
- func (do *DemoOrderCreate) SetNotNilUpdatedAt(value *time.Time) *DemoOrderCreate
- func (do *DemoOrderCreate) SetNotNilUserID(value *string) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetPayChannelCode(s string) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetPayOrderId(u uint64) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetPayRefundID(u uint64) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetPayStatus(b bool) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetPayTime(t time.Time) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetPrice(i int32) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetRefundPrice(i int32) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetRefundTime(t time.Time) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetSpuID(u uint64) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetSpuName(s string) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetUpdatedAt(t time.Time) *DemoOrderCreate
- func (doc *DemoOrderCreate) SetUserID(s string) *DemoOrderCreate
- type DemoOrderCreateBulk
- type DemoOrderDelete
- type DemoOrderDeleteOne
- type DemoOrderGroupBy
- func (dogb *DemoOrderGroupBy) Aggregate(fns ...AggregateFunc) *DemoOrderGroupBy
- func (s *DemoOrderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DemoOrderGroupBy) BoolX(ctx context.Context) bool
- func (s *DemoOrderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DemoOrderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DemoOrderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DemoOrderGroupBy) Float64X(ctx context.Context) float64
- func (s *DemoOrderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DemoOrderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DemoOrderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DemoOrderGroupBy) IntX(ctx context.Context) int
- func (s *DemoOrderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DemoOrderGroupBy) IntsX(ctx context.Context) []int
- func (dogb *DemoOrderGroupBy) Scan(ctx context.Context, v any) error
- func (s *DemoOrderGroupBy) ScanX(ctx context.Context, v any)
- func (s *DemoOrderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DemoOrderGroupBy) StringX(ctx context.Context) string
- func (s *DemoOrderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DemoOrderGroupBy) StringsX(ctx context.Context) []string
- type DemoOrderMutation
- func (m *DemoOrderMutation) AddField(name string, value ent.Value) error
- func (m *DemoOrderMutation) AddPayOrderId(u int64)
- func (m *DemoOrderMutation) AddPayRefundID(u int64)
- func (m *DemoOrderMutation) AddPrice(i int32)
- func (m *DemoOrderMutation) AddRefundPrice(i int32)
- func (m *DemoOrderMutation) AddSpuID(u int64)
- func (m *DemoOrderMutation) AddedEdges() []string
- func (m *DemoOrderMutation) AddedField(name string) (ent.Value, bool)
- func (m *DemoOrderMutation) AddedFields() []string
- func (m *DemoOrderMutation) AddedIDs(name string) []ent.Value
- func (m *DemoOrderMutation) AddedPayOrderId() (r int64, exists bool)
- func (m *DemoOrderMutation) AddedPayRefundID() (r int64, exists bool)
- func (m *DemoOrderMutation) AddedPrice() (r int32, exists bool)
- func (m *DemoOrderMutation) AddedRefundPrice() (r int32, exists bool)
- func (m *DemoOrderMutation) AddedSpuID() (r int64, exists bool)
- func (m *DemoOrderMutation) ClearDeletedAt()
- func (m *DemoOrderMutation) ClearEdge(name string) error
- func (m *DemoOrderMutation) ClearField(name string) error
- func (m *DemoOrderMutation) ClearPayChannelCode()
- func (m *DemoOrderMutation) ClearPayOrderId()
- func (m *DemoOrderMutation) ClearPayRefundID()
- func (m *DemoOrderMutation) ClearPayTime()
- func (m *DemoOrderMutation) ClearRefundPrice()
- func (m *DemoOrderMutation) ClearRefundTime()
- func (m *DemoOrderMutation) ClearedEdges() []string
- func (m *DemoOrderMutation) ClearedFields() []string
- func (m DemoOrderMutation) Client() *Client
- func (m *DemoOrderMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DemoOrderMutation) DeletedAt() (r time.Time, exists bool)
- func (m *DemoOrderMutation) DeletedAtCleared() bool
- func (m *DemoOrderMutation) EdgeCleared(name string) bool
- func (m *DemoOrderMutation) Field(name string) (ent.Value, bool)
- func (m *DemoOrderMutation) FieldCleared(name string) bool
- func (m *DemoOrderMutation) Fields() []string
- func (m *DemoOrderMutation) ID() (id uint64, exists bool)
- func (m *DemoOrderMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *DemoOrderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DemoOrderMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *DemoOrderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DemoOrderMutation) OldPayChannelCode(ctx context.Context) (v string, err error)
- func (m *DemoOrderMutation) OldPayOrderId(ctx context.Context) (v uint64, err error)
- func (m *DemoOrderMutation) OldPayRefundID(ctx context.Context) (v uint64, err error)
- func (m *DemoOrderMutation) OldPayStatus(ctx context.Context) (v bool, err error)
- func (m *DemoOrderMutation) OldPayTime(ctx context.Context) (v time.Time, err error)
- func (m *DemoOrderMutation) OldPrice(ctx context.Context) (v int32, err error)
- func (m *DemoOrderMutation) OldRefundPrice(ctx context.Context) (v int32, err error)
- func (m *DemoOrderMutation) OldRefundTime(ctx context.Context) (v time.Time, err error)
- func (m *DemoOrderMutation) OldSpuID(ctx context.Context) (v uint64, err error)
- func (m *DemoOrderMutation) OldSpuName(ctx context.Context) (v string, err error)
- func (m *DemoOrderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DemoOrderMutation) OldUserID(ctx context.Context) (v string, err error)
- func (m *DemoOrderMutation) Op() Op
- func (m *DemoOrderMutation) PayChannelCode() (r string, exists bool)
- func (m *DemoOrderMutation) PayChannelCodeCleared() bool
- func (m *DemoOrderMutation) PayOrderId() (r uint64, exists bool)
- func (m *DemoOrderMutation) PayOrderIdCleared() bool
- func (m *DemoOrderMutation) PayRefundID() (r uint64, exists bool)
- func (m *DemoOrderMutation) PayRefundIDCleared() bool
- func (m *DemoOrderMutation) PayStatus() (r bool, exists bool)
- func (m *DemoOrderMutation) PayTime() (r time.Time, exists bool)
- func (m *DemoOrderMutation) PayTimeCleared() bool
- func (m *DemoOrderMutation) Price() (r int32, exists bool)
- func (m *DemoOrderMutation) RefundPrice() (r int32, exists bool)
- func (m *DemoOrderMutation) RefundPriceCleared() bool
- func (m *DemoOrderMutation) RefundTime() (r time.Time, exists bool)
- func (m *DemoOrderMutation) RefundTimeCleared() bool
- func (m *DemoOrderMutation) RemovedEdges() []string
- func (m *DemoOrderMutation) RemovedIDs(name string) []ent.Value
- func (m *DemoOrderMutation) ResetCreatedAt()
- func (m *DemoOrderMutation) ResetDeletedAt()
- func (m *DemoOrderMutation) ResetEdge(name string) error
- func (m *DemoOrderMutation) ResetField(name string) error
- func (m *DemoOrderMutation) ResetPayChannelCode()
- func (m *DemoOrderMutation) ResetPayOrderId()
- func (m *DemoOrderMutation) ResetPayRefundID()
- func (m *DemoOrderMutation) ResetPayStatus()
- func (m *DemoOrderMutation) ResetPayTime()
- func (m *DemoOrderMutation) ResetPrice()
- func (m *DemoOrderMutation) ResetRefundPrice()
- func (m *DemoOrderMutation) ResetRefundTime()
- func (m *DemoOrderMutation) ResetSpuID()
- func (m *DemoOrderMutation) ResetSpuName()
- func (m *DemoOrderMutation) ResetUpdatedAt()
- func (m *DemoOrderMutation) ResetUserID()
- func (m *DemoOrderMutation) SetCreatedAt(t time.Time)
- func (m *DemoOrderMutation) SetDeletedAt(t time.Time)
- func (m *DemoOrderMutation) SetField(name string, value ent.Value) error
- func (m *DemoOrderMutation) SetID(id uint64)
- func (m *DemoOrderMutation) SetOp(op Op)
- func (m *DemoOrderMutation) SetPayChannelCode(s string)
- func (m *DemoOrderMutation) SetPayOrderId(u uint64)
- func (m *DemoOrderMutation) SetPayRefundID(u uint64)
- func (m *DemoOrderMutation) SetPayStatus(b bool)
- func (m *DemoOrderMutation) SetPayTime(t time.Time)
- func (m *DemoOrderMutation) SetPrice(i int32)
- func (m *DemoOrderMutation) SetRefundPrice(i int32)
- func (m *DemoOrderMutation) SetRefundTime(t time.Time)
- func (m *DemoOrderMutation) SetSpuID(u uint64)
- func (m *DemoOrderMutation) SetSpuName(s string)
- func (m *DemoOrderMutation) SetUpdatedAt(t time.Time)
- func (m *DemoOrderMutation) SetUserID(s string)
- func (m *DemoOrderMutation) SpuID() (r uint64, exists bool)
- func (m *DemoOrderMutation) SpuName() (r string, exists bool)
- func (m DemoOrderMutation) Tx() (*Tx, error)
- func (m *DemoOrderMutation) Type() string
- func (m *DemoOrderMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DemoOrderMutation) UserID() (r string, exists bool)
- func (m *DemoOrderMutation) Where(ps ...predicate.DemoOrder)
- func (m *DemoOrderMutation) WhereP(ps ...func(*sql.Selector))
- type DemoOrderPageList
- type DemoOrderPager
- type DemoOrderPaginateOption
- type DemoOrderQuery
- func (doq *DemoOrderQuery) Aggregate(fns ...AggregateFunc) *DemoOrderSelect
- func (doq *DemoOrderQuery) All(ctx context.Context) ([]*DemoOrder, error)
- func (doq *DemoOrderQuery) AllX(ctx context.Context) []*DemoOrder
- func (doq *DemoOrderQuery) Clone() *DemoOrderQuery
- func (doq *DemoOrderQuery) Count(ctx context.Context) (int, error)
- func (doq *DemoOrderQuery) CountX(ctx context.Context) int
- func (doq *DemoOrderQuery) Exist(ctx context.Context) (bool, error)
- func (doq *DemoOrderQuery) ExistX(ctx context.Context) bool
- func (doq *DemoOrderQuery) First(ctx context.Context) (*DemoOrder, error)
- func (doq *DemoOrderQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (doq *DemoOrderQuery) FirstIDX(ctx context.Context) uint64
- func (doq *DemoOrderQuery) FirstX(ctx context.Context) *DemoOrder
- func (doq *DemoOrderQuery) GroupBy(field string, fields ...string) *DemoOrderGroupBy
- func (doq *DemoOrderQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (doq *DemoOrderQuery) IDsX(ctx context.Context) []uint64
- func (doq *DemoOrderQuery) Limit(limit int) *DemoOrderQuery
- func (doq *DemoOrderQuery) Offset(offset int) *DemoOrderQuery
- func (doq *DemoOrderQuery) Only(ctx context.Context) (*DemoOrder, error)
- func (doq *DemoOrderQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (doq *DemoOrderQuery) OnlyIDX(ctx context.Context) uint64
- func (doq *DemoOrderQuery) OnlyX(ctx context.Context) *DemoOrder
- func (doq *DemoOrderQuery) Order(o ...demoorder.OrderOption) *DemoOrderQuery
- func (do *DemoOrderQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*DemoOrderPageList, error)
- func (doq *DemoOrderQuery) Select(fields ...string) *DemoOrderSelect
- func (doq *DemoOrderQuery) Unique(unique bool) *DemoOrderQuery
- func (doq *DemoOrderQuery) Where(ps ...predicate.DemoOrder) *DemoOrderQuery
- type DemoOrderSelect
- func (dos *DemoOrderSelect) Aggregate(fns ...AggregateFunc) *DemoOrderSelect
- func (s *DemoOrderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DemoOrderSelect) BoolX(ctx context.Context) bool
- func (s *DemoOrderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DemoOrderSelect) BoolsX(ctx context.Context) []bool
- func (s *DemoOrderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DemoOrderSelect) Float64X(ctx context.Context) float64
- func (s *DemoOrderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DemoOrderSelect) Float64sX(ctx context.Context) []float64
- func (s *DemoOrderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DemoOrderSelect) IntX(ctx context.Context) int
- func (s *DemoOrderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DemoOrderSelect) IntsX(ctx context.Context) []int
- func (dos *DemoOrderSelect) Scan(ctx context.Context, v any) error
- func (s *DemoOrderSelect) ScanX(ctx context.Context, v any)
- func (s *DemoOrderSelect) String(ctx context.Context) (_ string, err error)
- func (s *DemoOrderSelect) StringX(ctx context.Context) string
- func (s *DemoOrderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DemoOrderSelect) StringsX(ctx context.Context) []string
- type DemoOrderUpdate
- func (dou *DemoOrderUpdate) AddPayOrderId(u int64) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) AddPayRefundID(u int64) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) AddPrice(i int32) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) AddRefundPrice(i int32) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) AddSpuID(u int64) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) ClearDeletedAt() *DemoOrderUpdate
- func (dou *DemoOrderUpdate) ClearPayChannelCode() *DemoOrderUpdate
- func (dou *DemoOrderUpdate) ClearPayOrderId() *DemoOrderUpdate
- func (dou *DemoOrderUpdate) ClearPayRefundID() *DemoOrderUpdate
- func (dou *DemoOrderUpdate) ClearPayTime() *DemoOrderUpdate
- func (dou *DemoOrderUpdate) ClearRefundPrice() *DemoOrderUpdate
- func (dou *DemoOrderUpdate) ClearRefundTime() *DemoOrderUpdate
- func (dou *DemoOrderUpdate) Exec(ctx context.Context) error
- func (dou *DemoOrderUpdate) ExecX(ctx context.Context)
- func (dou *DemoOrderUpdate) Mutation() *DemoOrderMutation
- func (dou *DemoOrderUpdate) Save(ctx context.Context) (int, error)
- func (dou *DemoOrderUpdate) SaveX(ctx context.Context) int
- func (dou *DemoOrderUpdate) SetDeletedAt(t time.Time) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetNillableDeletedAt(t *time.Time) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetNillablePayChannelCode(s *string) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetNillablePayOrderId(u *uint64) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetNillablePayRefundID(u *uint64) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetNillablePayStatus(b *bool) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetNillablePayTime(t *time.Time) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetNillablePrice(i *int32) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetNillableRefundPrice(i *int32) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetNillableRefundTime(t *time.Time) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetNillableSpuID(u *uint64) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetNillableSpuName(s *string) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetNillableUserID(s *string) *DemoOrderUpdate
- func (do *DemoOrderUpdate) SetNotNilDeletedAt(value *time.Time) *DemoOrderUpdate
- func (do *DemoOrderUpdate) SetNotNilPayChannelCode(value *string) *DemoOrderUpdate
- func (do *DemoOrderUpdate) SetNotNilPayOrderId(value *uint64) *DemoOrderUpdate
- func (do *DemoOrderUpdate) SetNotNilPayRefundID(value *uint64) *DemoOrderUpdate
- func (do *DemoOrderUpdate) SetNotNilPayStatus(value *bool) *DemoOrderUpdate
- func (do *DemoOrderUpdate) SetNotNilPayTime(value *time.Time) *DemoOrderUpdate
- func (do *DemoOrderUpdate) SetNotNilPrice(value *int32) *DemoOrderUpdate
- func (do *DemoOrderUpdate) SetNotNilRefundPrice(value *int32) *DemoOrderUpdate
- func (do *DemoOrderUpdate) SetNotNilRefundTime(value *time.Time) *DemoOrderUpdate
- func (do *DemoOrderUpdate) SetNotNilSpuID(value *uint64) *DemoOrderUpdate
- func (do *DemoOrderUpdate) SetNotNilSpuName(value *string) *DemoOrderUpdate
- func (do *DemoOrderUpdate) SetNotNilUpdatedAt(value *time.Time) *DemoOrderUpdate
- func (do *DemoOrderUpdate) SetNotNilUserID(value *string) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetPayChannelCode(s string) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetPayOrderId(u uint64) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetPayRefundID(u uint64) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetPayStatus(b bool) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetPayTime(t time.Time) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetPrice(i int32) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetRefundPrice(i int32) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetRefundTime(t time.Time) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetSpuID(u uint64) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetSpuName(s string) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetUpdatedAt(t time.Time) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) SetUserID(s string) *DemoOrderUpdate
- func (dou *DemoOrderUpdate) Where(ps ...predicate.DemoOrder) *DemoOrderUpdate
- type DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) AddPayOrderId(u int64) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) AddPayRefundID(u int64) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) AddPrice(i int32) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) AddRefundPrice(i int32) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) AddSpuID(u int64) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) ClearDeletedAt() *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) ClearPayChannelCode() *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) ClearPayOrderId() *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) ClearPayRefundID() *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) ClearPayTime() *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) ClearRefundPrice() *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) ClearRefundTime() *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) Exec(ctx context.Context) error
- func (douo *DemoOrderUpdateOne) ExecX(ctx context.Context)
- func (douo *DemoOrderUpdateOne) Mutation() *DemoOrderMutation
- func (douo *DemoOrderUpdateOne) Save(ctx context.Context) (*DemoOrder, error)
- func (douo *DemoOrderUpdateOne) SaveX(ctx context.Context) *DemoOrder
- func (douo *DemoOrderUpdateOne) Select(field string, fields ...string) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetDeletedAt(t time.Time) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetNillableDeletedAt(t *time.Time) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetNillablePayChannelCode(s *string) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetNillablePayOrderId(u *uint64) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetNillablePayRefundID(u *uint64) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetNillablePayStatus(b *bool) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetNillablePayTime(t *time.Time) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetNillablePrice(i *int32) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetNillableRefundPrice(i *int32) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetNillableRefundTime(t *time.Time) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetNillableSpuID(u *uint64) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetNillableSpuName(s *string) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetNillableUserID(s *string) *DemoOrderUpdateOne
- func (do *DemoOrderUpdateOne) SetNotNilDeletedAt(value *time.Time) *DemoOrderUpdateOne
- func (do *DemoOrderUpdateOne) SetNotNilPayChannelCode(value *string) *DemoOrderUpdateOne
- func (do *DemoOrderUpdateOne) SetNotNilPayOrderId(value *uint64) *DemoOrderUpdateOne
- func (do *DemoOrderUpdateOne) SetNotNilPayRefundID(value *uint64) *DemoOrderUpdateOne
- func (do *DemoOrderUpdateOne) SetNotNilPayStatus(value *bool) *DemoOrderUpdateOne
- func (do *DemoOrderUpdateOne) SetNotNilPayTime(value *time.Time) *DemoOrderUpdateOne
- func (do *DemoOrderUpdateOne) SetNotNilPrice(value *int32) *DemoOrderUpdateOne
- func (do *DemoOrderUpdateOne) SetNotNilRefundPrice(value *int32) *DemoOrderUpdateOne
- func (do *DemoOrderUpdateOne) SetNotNilRefundTime(value *time.Time) *DemoOrderUpdateOne
- func (do *DemoOrderUpdateOne) SetNotNilSpuID(value *uint64) *DemoOrderUpdateOne
- func (do *DemoOrderUpdateOne) SetNotNilSpuName(value *string) *DemoOrderUpdateOne
- func (do *DemoOrderUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DemoOrderUpdateOne
- func (do *DemoOrderUpdateOne) SetNotNilUserID(value *string) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetPayChannelCode(s string) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetPayOrderId(u uint64) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetPayRefundID(u uint64) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetPayStatus(b bool) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetPayTime(t time.Time) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetPrice(i int32) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetRefundPrice(i int32) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetRefundTime(t time.Time) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetSpuID(u uint64) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetSpuName(s string) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetUpdatedAt(t time.Time) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) SetUserID(s string) *DemoOrderUpdateOne
- func (douo *DemoOrderUpdateOne) Where(ps ...predicate.DemoOrder) *DemoOrderUpdateOne
- type DemoOrders
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type Order
- type OrderClient
- func (c *OrderClient) Create() *OrderCreate
- func (c *OrderClient) CreateBulk(builders ...*OrderCreate) *OrderCreateBulk
- func (c *OrderClient) Delete() *OrderDelete
- func (c *OrderClient) DeleteOne(o *Order) *OrderDeleteOne
- func (c *OrderClient) DeleteOneID(id uint64) *OrderDeleteOne
- func (c *OrderClient) Get(ctx context.Context, id uint64) (*Order, error)
- func (c *OrderClient) GetX(ctx context.Context, id uint64) *Order
- func (c *OrderClient) Hooks() []Hook
- func (c *OrderClient) Intercept(interceptors ...Interceptor)
- func (c *OrderClient) Interceptors() []Interceptor
- func (c *OrderClient) MapCreateBulk(slice any, setFunc func(*OrderCreate, int)) *OrderCreateBulk
- func (c *OrderClient) Query() *OrderQuery
- func (c *OrderClient) Update() *OrderUpdate
- func (c *OrderClient) UpdateOne(o *Order) *OrderUpdateOne
- func (c *OrderClient) UpdateOneID(id uint64) *OrderUpdateOne
- func (c *OrderClient) Use(hooks ...Hook)
- type OrderCreate
- func (oc *OrderCreate) Exec(ctx context.Context) error
- func (oc *OrderCreate) ExecX(ctx context.Context)
- func (oc *OrderCreate) Mutation() *OrderMutation
- func (oc *OrderCreate) Save(ctx context.Context) (*Order, error)
- func (oc *OrderCreate) SaveX(ctx context.Context) *Order
- func (oc *OrderCreate) SetBody(s string) *OrderCreate
- func (oc *OrderCreate) SetChannelCode(s string) *OrderCreate
- func (oc *OrderCreate) SetChannelFeePrice(i int32) *OrderCreate
- func (oc *OrderCreate) SetChannelFeeRate(f float64) *OrderCreate
- func (oc *OrderCreate) SetChannelOrderNo(s string) *OrderCreate
- func (oc *OrderCreate) SetChannelUserID(s string) *OrderCreate
- func (oc *OrderCreate) SetCreatedAt(t time.Time) *OrderCreate
- func (oc *OrderCreate) SetDeletedAt(t time.Time) *OrderCreate
- func (oc *OrderCreate) SetExpireTime(t time.Time) *OrderCreate
- func (oc *OrderCreate) SetExtensionID(u uint64) *OrderCreate
- func (oc *OrderCreate) SetID(u uint64) *OrderCreate
- func (oc *OrderCreate) SetMerchantOrderID(s string) *OrderCreate
- func (oc *OrderCreate) SetNillableChannelCode(s *string) *OrderCreate
- func (oc *OrderCreate) SetNillableChannelFeePrice(i *int32) *OrderCreate
- func (oc *OrderCreate) SetNillableChannelFeeRate(f *float64) *OrderCreate
- func (oc *OrderCreate) SetNillableChannelOrderNo(s *string) *OrderCreate
- func (oc *OrderCreate) SetNillableChannelUserID(s *string) *OrderCreate
- func (oc *OrderCreate) SetNillableCreatedAt(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetNillableDeletedAt(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetNillableExtensionID(u *uint64) *OrderCreate
- func (oc *OrderCreate) SetNillableNo(s *string) *OrderCreate
- func (oc *OrderCreate) SetNillableNotifyTime(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetNillableStatus(u *uint8) *OrderCreate
- func (oc *OrderCreate) SetNillableSuccessTime(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetNillableUpdatedAt(t *time.Time) *OrderCreate
- func (oc *OrderCreate) SetNo(s string) *OrderCreate
- func (o *OrderCreate) SetNotNilBody(value *string) *OrderCreate
- func (o *OrderCreate) SetNotNilChannelCode(value *string) *OrderCreate
- func (o *OrderCreate) SetNotNilChannelFeePrice(value *int32) *OrderCreate
- func (o *OrderCreate) SetNotNilChannelFeeRate(value *float64) *OrderCreate
- func (o *OrderCreate) SetNotNilChannelOrderNo(value *string) *OrderCreate
- func (o *OrderCreate) SetNotNilChannelUserID(value *string) *OrderCreate
- func (o *OrderCreate) SetNotNilDeletedAt(value *time.Time) *OrderCreate
- func (o *OrderCreate) SetNotNilExpireTime(value *time.Time) *OrderCreate
- func (o *OrderCreate) SetNotNilExtensionID(value *uint64) *OrderCreate
- func (o *OrderCreate) SetNotNilMerchantOrderID(value *string) *OrderCreate
- func (o *OrderCreate) SetNotNilNo(value *string) *OrderCreate
- func (o *OrderCreate) SetNotNilNotifyTime(value *time.Time) *OrderCreate
- func (o *OrderCreate) SetNotNilPrice(value *int32) *OrderCreate
- func (o *OrderCreate) SetNotNilRefundPrice(value *int32) *OrderCreate
- func (o *OrderCreate) SetNotNilStatus(value *uint8) *OrderCreate
- func (o *OrderCreate) SetNotNilSubject(value *string) *OrderCreate
- func (o *OrderCreate) SetNotNilSuccessTime(value *time.Time) *OrderCreate
- func (o *OrderCreate) SetNotNilUpdatedAt(value *time.Time) *OrderCreate
- func (o *OrderCreate) SetNotNilUserIP(value *string) *OrderCreate
- func (oc *OrderCreate) SetNotifyTime(t time.Time) *OrderCreate
- func (oc *OrderCreate) SetPrice(i int32) *OrderCreate
- func (oc *OrderCreate) SetRefundPrice(i int32) *OrderCreate
- func (oc *OrderCreate) SetStatus(u uint8) *OrderCreate
- func (oc *OrderCreate) SetSubject(s string) *OrderCreate
- func (oc *OrderCreate) SetSuccessTime(t time.Time) *OrderCreate
- func (oc *OrderCreate) SetUpdatedAt(t time.Time) *OrderCreate
- func (oc *OrderCreate) SetUserIP(s string) *OrderCreate
- type OrderCreateBulk
- type OrderDelete
- type OrderDeleteOne
- type OrderDirection
- type OrderExtension
- type OrderExtensionClient
- func (c *OrderExtensionClient) Create() *OrderExtensionCreate
- func (c *OrderExtensionClient) CreateBulk(builders ...*OrderExtensionCreate) *OrderExtensionCreateBulk
- func (c *OrderExtensionClient) Delete() *OrderExtensionDelete
- func (c *OrderExtensionClient) DeleteOne(oe *OrderExtension) *OrderExtensionDeleteOne
- func (c *OrderExtensionClient) DeleteOneID(id uint64) *OrderExtensionDeleteOne
- func (c *OrderExtensionClient) Get(ctx context.Context, id uint64) (*OrderExtension, error)
- func (c *OrderExtensionClient) GetX(ctx context.Context, id uint64) *OrderExtension
- func (c *OrderExtensionClient) Hooks() []Hook
- func (c *OrderExtensionClient) Intercept(interceptors ...Interceptor)
- func (c *OrderExtensionClient) Interceptors() []Interceptor
- func (c *OrderExtensionClient) MapCreateBulk(slice any, setFunc func(*OrderExtensionCreate, int)) *OrderExtensionCreateBulk
- func (c *OrderExtensionClient) Query() *OrderExtensionQuery
- func (c *OrderExtensionClient) Update() *OrderExtensionUpdate
- func (c *OrderExtensionClient) UpdateOne(oe *OrderExtension) *OrderExtensionUpdateOne
- func (c *OrderExtensionClient) UpdateOneID(id uint64) *OrderExtensionUpdateOne
- func (c *OrderExtensionClient) Use(hooks ...Hook)
- type OrderExtensionCreate
- func (oec *OrderExtensionCreate) Exec(ctx context.Context) error
- func (oec *OrderExtensionCreate) ExecX(ctx context.Context)
- func (oec *OrderExtensionCreate) Mutation() *OrderExtensionMutation
- func (oec *OrderExtensionCreate) Save(ctx context.Context) (*OrderExtension, error)
- func (oec *OrderExtensionCreate) SaveX(ctx context.Context) *OrderExtension
- func (oec *OrderExtensionCreate) SetChannelCode(s string) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetChannelErrorCode(s string) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetChannelErrorMsg(s string) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetChannelExtras(m map[string]string) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetChannelNotifyData(s string) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetCreatedAt(t time.Time) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetDeletedAt(t time.Time) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetID(u uint64) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetNillableChannelErrorCode(s *string) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetNillableChannelErrorMsg(s *string) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetNillableChannelNotifyData(s *string) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetNillableCreatedAt(t *time.Time) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetNillableDeletedAt(t *time.Time) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetNillableStatus(u *uint8) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetNillableUpdatedAt(t *time.Time) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetNo(s string) *OrderExtensionCreate
- func (oe *OrderExtensionCreate) SetNotNilChannelCode(value *string) *OrderExtensionCreate
- func (oe *OrderExtensionCreate) SetNotNilChannelErrorCode(value *string) *OrderExtensionCreate
- func (oe *OrderExtensionCreate) SetNotNilChannelErrorMsg(value *string) *OrderExtensionCreate
- func (oe *OrderExtensionCreate) SetNotNilChannelExtras(value *map[string]string) *OrderExtensionCreate
- func (oe *OrderExtensionCreate) SetNotNilChannelNotifyData(value *string) *OrderExtensionCreate
- func (oe *OrderExtensionCreate) SetNotNilDeletedAt(value *time.Time) *OrderExtensionCreate
- func (oe *OrderExtensionCreate) SetNotNilNo(value *string) *OrderExtensionCreate
- func (oe *OrderExtensionCreate) SetNotNilOrderID(value *uint64) *OrderExtensionCreate
- func (oe *OrderExtensionCreate) SetNotNilStatus(value *uint8) *OrderExtensionCreate
- func (oe *OrderExtensionCreate) SetNotNilUpdatedAt(value *time.Time) *OrderExtensionCreate
- func (oe *OrderExtensionCreate) SetNotNilUserIP(value *string) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetOrderID(u uint64) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetStatus(u uint8) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetUpdatedAt(t time.Time) *OrderExtensionCreate
- func (oec *OrderExtensionCreate) SetUserIP(s string) *OrderExtensionCreate
- type OrderExtensionCreateBulk
- func (oecb *OrderExtensionCreateBulk) Exec(ctx context.Context) error
- func (oecb *OrderExtensionCreateBulk) ExecX(ctx context.Context)
- func (oecb *OrderExtensionCreateBulk) Save(ctx context.Context) ([]*OrderExtension, error)
- func (oecb *OrderExtensionCreateBulk) SaveX(ctx context.Context) []*OrderExtension
- type OrderExtensionDelete
- type OrderExtensionDeleteOne
- type OrderExtensionGroupBy
- func (oegb *OrderExtensionGroupBy) Aggregate(fns ...AggregateFunc) *OrderExtensionGroupBy
- func (s *OrderExtensionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderExtensionGroupBy) BoolX(ctx context.Context) bool
- func (s *OrderExtensionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderExtensionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OrderExtensionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderExtensionGroupBy) Float64X(ctx context.Context) float64
- func (s *OrderExtensionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderExtensionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OrderExtensionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OrderExtensionGroupBy) IntX(ctx context.Context) int
- func (s *OrderExtensionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OrderExtensionGroupBy) IntsX(ctx context.Context) []int
- func (oegb *OrderExtensionGroupBy) Scan(ctx context.Context, v any) error
- func (s *OrderExtensionGroupBy) ScanX(ctx context.Context, v any)
- func (s *OrderExtensionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OrderExtensionGroupBy) StringX(ctx context.Context) string
- func (s *OrderExtensionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OrderExtensionGroupBy) StringsX(ctx context.Context) []string
- type OrderExtensionMutation
- func (m *OrderExtensionMutation) AddField(name string, value ent.Value) error
- func (m *OrderExtensionMutation) AddOrderID(u int64)
- func (m *OrderExtensionMutation) AddStatus(u int8)
- func (m *OrderExtensionMutation) AddedEdges() []string
- func (m *OrderExtensionMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrderExtensionMutation) AddedFields() []string
- func (m *OrderExtensionMutation) AddedIDs(name string) []ent.Value
- func (m *OrderExtensionMutation) AddedOrderID() (r int64, exists bool)
- func (m *OrderExtensionMutation) AddedStatus() (r int8, exists bool)
- func (m *OrderExtensionMutation) ChannelCode() (r string, exists bool)
- func (m *OrderExtensionMutation) ChannelErrorCode() (r string, exists bool)
- func (m *OrderExtensionMutation) ChannelErrorCodeCleared() bool
- func (m *OrderExtensionMutation) ChannelErrorMsg() (r string, exists bool)
- func (m *OrderExtensionMutation) ChannelErrorMsgCleared() bool
- func (m *OrderExtensionMutation) ChannelExtras() (r map[string]string, exists bool)
- func (m *OrderExtensionMutation) ChannelExtrasCleared() bool
- func (m *OrderExtensionMutation) ChannelNotifyData() (r string, exists bool)
- func (m *OrderExtensionMutation) ChannelNotifyDataCleared() bool
- func (m *OrderExtensionMutation) ClearChannelErrorCode()
- func (m *OrderExtensionMutation) ClearChannelErrorMsg()
- func (m *OrderExtensionMutation) ClearChannelExtras()
- func (m *OrderExtensionMutation) ClearChannelNotifyData()
- func (m *OrderExtensionMutation) ClearDeletedAt()
- func (m *OrderExtensionMutation) ClearEdge(name string) error
- func (m *OrderExtensionMutation) ClearField(name string) error
- func (m *OrderExtensionMutation) ClearStatus()
- func (m *OrderExtensionMutation) ClearedEdges() []string
- func (m *OrderExtensionMutation) ClearedFields() []string
- func (m OrderExtensionMutation) Client() *Client
- func (m *OrderExtensionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OrderExtensionMutation) DeletedAt() (r time.Time, exists bool)
- func (m *OrderExtensionMutation) DeletedAtCleared() bool
- func (m *OrderExtensionMutation) EdgeCleared(name string) bool
- func (m *OrderExtensionMutation) Field(name string) (ent.Value, bool)
- func (m *OrderExtensionMutation) FieldCleared(name string) bool
- func (m *OrderExtensionMutation) Fields() []string
- func (m *OrderExtensionMutation) ID() (id uint64, exists bool)
- func (m *OrderExtensionMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *OrderExtensionMutation) No() (r string, exists bool)
- func (m *OrderExtensionMutation) OldChannelCode(ctx context.Context) (v string, err error)
- func (m *OrderExtensionMutation) OldChannelErrorCode(ctx context.Context) (v string, err error)
- func (m *OrderExtensionMutation) OldChannelErrorMsg(ctx context.Context) (v string, err error)
- func (m *OrderExtensionMutation) OldChannelExtras(ctx context.Context) (v map[string]string, err error)
- func (m *OrderExtensionMutation) OldChannelNotifyData(ctx context.Context) (v string, err error)
- func (m *OrderExtensionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderExtensionMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderExtensionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderExtensionMutation) OldNo(ctx context.Context) (v string, err error)
- func (m *OrderExtensionMutation) OldOrderID(ctx context.Context) (v uint64, err error)
- func (m *OrderExtensionMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *OrderExtensionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderExtensionMutation) OldUserIP(ctx context.Context) (v string, err error)
- func (m *OrderExtensionMutation) Op() Op
- func (m *OrderExtensionMutation) OrderID() (r uint64, exists bool)
- func (m *OrderExtensionMutation) RemovedEdges() []string
- func (m *OrderExtensionMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderExtensionMutation) ResetChannelCode()
- func (m *OrderExtensionMutation) ResetChannelErrorCode()
- func (m *OrderExtensionMutation) ResetChannelErrorMsg()
- func (m *OrderExtensionMutation) ResetChannelExtras()
- func (m *OrderExtensionMutation) ResetChannelNotifyData()
- func (m *OrderExtensionMutation) ResetCreatedAt()
- func (m *OrderExtensionMutation) ResetDeletedAt()
- func (m *OrderExtensionMutation) ResetEdge(name string) error
- func (m *OrderExtensionMutation) ResetField(name string) error
- func (m *OrderExtensionMutation) ResetNo()
- func (m *OrderExtensionMutation) ResetOrderID()
- func (m *OrderExtensionMutation) ResetStatus()
- func (m *OrderExtensionMutation) ResetUpdatedAt()
- func (m *OrderExtensionMutation) ResetUserIP()
- func (m *OrderExtensionMutation) SetChannelCode(s string)
- func (m *OrderExtensionMutation) SetChannelErrorCode(s string)
- func (m *OrderExtensionMutation) SetChannelErrorMsg(s string)
- func (m *OrderExtensionMutation) SetChannelExtras(value map[string]string)
- func (m *OrderExtensionMutation) SetChannelNotifyData(s string)
- func (m *OrderExtensionMutation) SetCreatedAt(t time.Time)
- func (m *OrderExtensionMutation) SetDeletedAt(t time.Time)
- func (m *OrderExtensionMutation) SetField(name string, value ent.Value) error
- func (m *OrderExtensionMutation) SetID(id uint64)
- func (m *OrderExtensionMutation) SetNo(s string)
- func (m *OrderExtensionMutation) SetOp(op Op)
- func (m *OrderExtensionMutation) SetOrderID(u uint64)
- func (m *OrderExtensionMutation) SetStatus(u uint8)
- func (m *OrderExtensionMutation) SetUpdatedAt(t time.Time)
- func (m *OrderExtensionMutation) SetUserIP(s string)
- func (m *OrderExtensionMutation) Status() (r uint8, exists bool)
- func (m *OrderExtensionMutation) StatusCleared() bool
- func (m OrderExtensionMutation) Tx() (*Tx, error)
- func (m *OrderExtensionMutation) Type() string
- func (m *OrderExtensionMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OrderExtensionMutation) UserIP() (r string, exists bool)
- func (m *OrderExtensionMutation) Where(ps ...predicate.OrderExtension)
- func (m *OrderExtensionMutation) WhereP(ps ...func(*sql.Selector))
- type OrderExtensionPageList
- type OrderExtensionPager
- type OrderExtensionPaginateOption
- type OrderExtensionQuery
- func (oeq *OrderExtensionQuery) Aggregate(fns ...AggregateFunc) *OrderExtensionSelect
- func (oeq *OrderExtensionQuery) All(ctx context.Context) ([]*OrderExtension, error)
- func (oeq *OrderExtensionQuery) AllX(ctx context.Context) []*OrderExtension
- func (oeq *OrderExtensionQuery) Clone() *OrderExtensionQuery
- func (oeq *OrderExtensionQuery) Count(ctx context.Context) (int, error)
- func (oeq *OrderExtensionQuery) CountX(ctx context.Context) int
- func (oeq *OrderExtensionQuery) Exist(ctx context.Context) (bool, error)
- func (oeq *OrderExtensionQuery) ExistX(ctx context.Context) bool
- func (oeq *OrderExtensionQuery) First(ctx context.Context) (*OrderExtension, error)
- func (oeq *OrderExtensionQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (oeq *OrderExtensionQuery) FirstIDX(ctx context.Context) uint64
- func (oeq *OrderExtensionQuery) FirstX(ctx context.Context) *OrderExtension
- func (oeq *OrderExtensionQuery) GroupBy(field string, fields ...string) *OrderExtensionGroupBy
- func (oeq *OrderExtensionQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (oeq *OrderExtensionQuery) IDsX(ctx context.Context) []uint64
- func (oeq *OrderExtensionQuery) Limit(limit int) *OrderExtensionQuery
- func (oeq *OrderExtensionQuery) Offset(offset int) *OrderExtensionQuery
- func (oeq *OrderExtensionQuery) Only(ctx context.Context) (*OrderExtension, error)
- func (oeq *OrderExtensionQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (oeq *OrderExtensionQuery) OnlyIDX(ctx context.Context) uint64
- func (oeq *OrderExtensionQuery) OnlyX(ctx context.Context) *OrderExtension
- func (oeq *OrderExtensionQuery) Order(o ...orderextension.OrderOption) *OrderExtensionQuery
- func (oe *OrderExtensionQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*OrderExtensionPageList, error)
- func (oeq *OrderExtensionQuery) Select(fields ...string) *OrderExtensionSelect
- func (oeq *OrderExtensionQuery) Unique(unique bool) *OrderExtensionQuery
- func (oeq *OrderExtensionQuery) Where(ps ...predicate.OrderExtension) *OrderExtensionQuery
- type OrderExtensionSelect
- func (oes *OrderExtensionSelect) Aggregate(fns ...AggregateFunc) *OrderExtensionSelect
- func (s *OrderExtensionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderExtensionSelect) BoolX(ctx context.Context) bool
- func (s *OrderExtensionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderExtensionSelect) BoolsX(ctx context.Context) []bool
- func (s *OrderExtensionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderExtensionSelect) Float64X(ctx context.Context) float64
- func (s *OrderExtensionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderExtensionSelect) Float64sX(ctx context.Context) []float64
- func (s *OrderExtensionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OrderExtensionSelect) IntX(ctx context.Context) int
- func (s *OrderExtensionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OrderExtensionSelect) IntsX(ctx context.Context) []int
- func (oes *OrderExtensionSelect) Scan(ctx context.Context, v any) error
- func (s *OrderExtensionSelect) ScanX(ctx context.Context, v any)
- func (s *OrderExtensionSelect) String(ctx context.Context) (_ string, err error)
- func (s *OrderExtensionSelect) StringX(ctx context.Context) string
- func (s *OrderExtensionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OrderExtensionSelect) StringsX(ctx context.Context) []string
- type OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) AddOrderID(u int64) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) AddStatus(u int8) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) ClearChannelErrorCode() *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) ClearChannelErrorMsg() *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) ClearChannelExtras() *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) ClearChannelNotifyData() *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) ClearDeletedAt() *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) ClearStatus() *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) Exec(ctx context.Context) error
- func (oeu *OrderExtensionUpdate) ExecX(ctx context.Context)
- func (oeu *OrderExtensionUpdate) Mutation() *OrderExtensionMutation
- func (oeu *OrderExtensionUpdate) Save(ctx context.Context) (int, error)
- func (oeu *OrderExtensionUpdate) SaveX(ctx context.Context) int
- func (oeu *OrderExtensionUpdate) SetChannelCode(s string) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetChannelErrorCode(s string) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetChannelErrorMsg(s string) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetChannelExtras(m map[string]string) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetChannelNotifyData(s string) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetDeletedAt(t time.Time) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetNillableChannelCode(s *string) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetNillableChannelErrorCode(s *string) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetNillableChannelErrorMsg(s *string) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetNillableChannelNotifyData(s *string) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetNillableDeletedAt(t *time.Time) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetNillableNo(s *string) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetNillableOrderID(u *uint64) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetNillableStatus(u *uint8) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetNillableUserIP(s *string) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetNo(s string) *OrderExtensionUpdate
- func (oe *OrderExtensionUpdate) SetNotNilChannelCode(value *string) *OrderExtensionUpdate
- func (oe *OrderExtensionUpdate) SetNotNilChannelErrorCode(value *string) *OrderExtensionUpdate
- func (oe *OrderExtensionUpdate) SetNotNilChannelErrorMsg(value *string) *OrderExtensionUpdate
- func (oe *OrderExtensionUpdate) SetNotNilChannelExtras(value *map[string]string) *OrderExtensionUpdate
- func (oe *OrderExtensionUpdate) SetNotNilChannelNotifyData(value *string) *OrderExtensionUpdate
- func (oe *OrderExtensionUpdate) SetNotNilDeletedAt(value *time.Time) *OrderExtensionUpdate
- func (oe *OrderExtensionUpdate) SetNotNilNo(value *string) *OrderExtensionUpdate
- func (oe *OrderExtensionUpdate) SetNotNilOrderID(value *uint64) *OrderExtensionUpdate
- func (oe *OrderExtensionUpdate) SetNotNilStatus(value *uint8) *OrderExtensionUpdate
- func (oe *OrderExtensionUpdate) SetNotNilUpdatedAt(value *time.Time) *OrderExtensionUpdate
- func (oe *OrderExtensionUpdate) SetNotNilUserIP(value *string) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetOrderID(u uint64) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetStatus(u uint8) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetUpdatedAt(t time.Time) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) SetUserIP(s string) *OrderExtensionUpdate
- func (oeu *OrderExtensionUpdate) Where(ps ...predicate.OrderExtension) *OrderExtensionUpdate
- type OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) AddOrderID(u int64) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) AddStatus(u int8) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) ClearChannelErrorCode() *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) ClearChannelErrorMsg() *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) ClearChannelExtras() *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) ClearChannelNotifyData() *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) ClearDeletedAt() *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) ClearStatus() *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) Exec(ctx context.Context) error
- func (oeuo *OrderExtensionUpdateOne) ExecX(ctx context.Context)
- func (oeuo *OrderExtensionUpdateOne) Mutation() *OrderExtensionMutation
- func (oeuo *OrderExtensionUpdateOne) Save(ctx context.Context) (*OrderExtension, error)
- func (oeuo *OrderExtensionUpdateOne) SaveX(ctx context.Context) *OrderExtension
- func (oeuo *OrderExtensionUpdateOne) Select(field string, fields ...string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetChannelCode(s string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetChannelErrorCode(s string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetChannelErrorMsg(s string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetChannelExtras(m map[string]string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetChannelNotifyData(s string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetDeletedAt(t time.Time) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetNillableChannelCode(s *string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetNillableChannelErrorCode(s *string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetNillableChannelErrorMsg(s *string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetNillableChannelNotifyData(s *string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetNillableDeletedAt(t *time.Time) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetNillableNo(s *string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetNillableOrderID(u *uint64) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetNillableStatus(u *uint8) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetNillableUserIP(s *string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetNo(s string) *OrderExtensionUpdateOne
- func (oe *OrderExtensionUpdateOne) SetNotNilChannelCode(value *string) *OrderExtensionUpdateOne
- func (oe *OrderExtensionUpdateOne) SetNotNilChannelErrorCode(value *string) *OrderExtensionUpdateOne
- func (oe *OrderExtensionUpdateOne) SetNotNilChannelErrorMsg(value *string) *OrderExtensionUpdateOne
- func (oe *OrderExtensionUpdateOne) SetNotNilChannelExtras(value *map[string]string) *OrderExtensionUpdateOne
- func (oe *OrderExtensionUpdateOne) SetNotNilChannelNotifyData(value *string) *OrderExtensionUpdateOne
- func (oe *OrderExtensionUpdateOne) SetNotNilDeletedAt(value *time.Time) *OrderExtensionUpdateOne
- func (oe *OrderExtensionUpdateOne) SetNotNilNo(value *string) *OrderExtensionUpdateOne
- func (oe *OrderExtensionUpdateOne) SetNotNilOrderID(value *uint64) *OrderExtensionUpdateOne
- func (oe *OrderExtensionUpdateOne) SetNotNilStatus(value *uint8) *OrderExtensionUpdateOne
- func (oe *OrderExtensionUpdateOne) SetNotNilUpdatedAt(value *time.Time) *OrderExtensionUpdateOne
- func (oe *OrderExtensionUpdateOne) SetNotNilUserIP(value *string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetOrderID(u uint64) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetStatus(u uint8) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetUpdatedAt(t time.Time) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) SetUserIP(s string) *OrderExtensionUpdateOne
- func (oeuo *OrderExtensionUpdateOne) Where(ps ...predicate.OrderExtension) *OrderExtensionUpdateOne
- type OrderExtensions
- type OrderFunc
- type OrderGroupBy
- func (ogb *OrderGroupBy) Aggregate(fns ...AggregateFunc) *OrderGroupBy
- func (s *OrderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderGroupBy) BoolX(ctx context.Context) bool
- func (s *OrderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OrderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderGroupBy) Float64X(ctx context.Context) float64
- func (s *OrderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OrderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OrderGroupBy) IntX(ctx context.Context) int
- func (s *OrderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OrderGroupBy) IntsX(ctx context.Context) []int
- func (ogb *OrderGroupBy) Scan(ctx context.Context, v any) error
- func (s *OrderGroupBy) ScanX(ctx context.Context, v any)
- func (s *OrderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OrderGroupBy) StringX(ctx context.Context) string
- func (s *OrderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OrderGroupBy) StringsX(ctx context.Context) []string
- type OrderMutation
- func (m *OrderMutation) AddChannelFeePrice(i int32)
- func (m *OrderMutation) AddChannelFeeRate(f float64)
- func (m *OrderMutation) AddExtensionID(u int64)
- func (m *OrderMutation) AddField(name string, value ent.Value) error
- func (m *OrderMutation) AddPrice(i int32)
- func (m *OrderMutation) AddRefundPrice(i int32)
- func (m *OrderMutation) AddStatus(u int8)
- func (m *OrderMutation) AddedChannelFeePrice() (r int32, exists bool)
- func (m *OrderMutation) AddedChannelFeeRate() (r float64, exists bool)
- func (m *OrderMutation) AddedEdges() []string
- func (m *OrderMutation) AddedExtensionID() (r int64, exists bool)
- func (m *OrderMutation) AddedField(name string) (ent.Value, bool)
- func (m *OrderMutation) AddedFields() []string
- func (m *OrderMutation) AddedIDs(name string) []ent.Value
- func (m *OrderMutation) AddedPrice() (r int32, exists bool)
- func (m *OrderMutation) AddedRefundPrice() (r int32, exists bool)
- func (m *OrderMutation) AddedStatus() (r int8, exists bool)
- func (m *OrderMutation) Body() (r string, exists bool)
- func (m *OrderMutation) ChannelCode() (r string, exists bool)
- func (m *OrderMutation) ChannelCodeCleared() bool
- func (m *OrderMutation) ChannelFeePrice() (r int32, exists bool)
- func (m *OrderMutation) ChannelFeePriceCleared() bool
- func (m *OrderMutation) ChannelFeeRate() (r float64, exists bool)
- func (m *OrderMutation) ChannelFeeRateCleared() bool
- func (m *OrderMutation) ChannelOrderNo() (r string, exists bool)
- func (m *OrderMutation) ChannelOrderNoCleared() bool
- func (m *OrderMutation) ChannelUserID() (r string, exists bool)
- func (m *OrderMutation) ChannelUserIDCleared() bool
- func (m *OrderMutation) ClearChannelCode()
- func (m *OrderMutation) ClearChannelFeePrice()
- func (m *OrderMutation) ClearChannelFeeRate()
- func (m *OrderMutation) ClearChannelOrderNo()
- func (m *OrderMutation) ClearChannelUserID()
- func (m *OrderMutation) ClearDeletedAt()
- func (m *OrderMutation) ClearEdge(name string) error
- func (m *OrderMutation) ClearExtensionID()
- func (m *OrderMutation) ClearField(name string) error
- func (m *OrderMutation) ClearNo()
- func (m *OrderMutation) ClearNotifyTime()
- func (m *OrderMutation) ClearStatus()
- func (m *OrderMutation) ClearSuccessTime()
- func (m *OrderMutation) ClearedEdges() []string
- func (m *OrderMutation) ClearedFields() []string
- func (m OrderMutation) Client() *Client
- func (m *OrderMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OrderMutation) DeletedAt() (r time.Time, exists bool)
- func (m *OrderMutation) DeletedAtCleared() bool
- func (m *OrderMutation) EdgeCleared(name string) bool
- func (m *OrderMutation) ExpireTime() (r time.Time, exists bool)
- func (m *OrderMutation) ExtensionID() (r uint64, exists bool)
- func (m *OrderMutation) ExtensionIDCleared() bool
- func (m *OrderMutation) Field(name string) (ent.Value, bool)
- func (m *OrderMutation) FieldCleared(name string) bool
- func (m *OrderMutation) Fields() []string
- func (m *OrderMutation) ID() (id uint64, exists bool)
- func (m *OrderMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *OrderMutation) MerchantOrderID() (r string, exists bool)
- func (m *OrderMutation) No() (r string, exists bool)
- func (m *OrderMutation) NoCleared() bool
- func (m *OrderMutation) NotifyTime() (r time.Time, exists bool)
- func (m *OrderMutation) NotifyTimeCleared() bool
- func (m *OrderMutation) OldBody(ctx context.Context) (v string, err error)
- func (m *OrderMutation) OldChannelCode(ctx context.Context) (v string, err error)
- func (m *OrderMutation) OldChannelFeePrice(ctx context.Context) (v int32, err error)
- func (m *OrderMutation) OldChannelFeeRate(ctx context.Context) (v float64, err error)
- func (m *OrderMutation) OldChannelOrderNo(ctx context.Context) (v string, err error)
- func (m *OrderMutation) OldChannelUserID(ctx context.Context) (v string, err error)
- func (m *OrderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) OldExpireTime(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) OldExtensionID(ctx context.Context) (v uint64, err error)
- func (m *OrderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OrderMutation) OldMerchantOrderID(ctx context.Context) (v string, err error)
- func (m *OrderMutation) OldNo(ctx context.Context) (v string, err error)
- func (m *OrderMutation) OldNotifyTime(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) OldPrice(ctx context.Context) (v int32, err error)
- func (m *OrderMutation) OldRefundPrice(ctx context.Context) (v int32, err error)
- func (m *OrderMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *OrderMutation) OldSubject(ctx context.Context) (v string, err error)
- func (m *OrderMutation) OldSuccessTime(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OrderMutation) OldUserIP(ctx context.Context) (v string, err error)
- func (m *OrderMutation) Op() Op
- func (m *OrderMutation) Price() (r int32, exists bool)
- func (m *OrderMutation) RefundPrice() (r int32, exists bool)
- func (m *OrderMutation) RemovedEdges() []string
- func (m *OrderMutation) RemovedIDs(name string) []ent.Value
- func (m *OrderMutation) ResetBody()
- func (m *OrderMutation) ResetChannelCode()
- func (m *OrderMutation) ResetChannelFeePrice()
- func (m *OrderMutation) ResetChannelFeeRate()
- func (m *OrderMutation) ResetChannelOrderNo()
- func (m *OrderMutation) ResetChannelUserID()
- func (m *OrderMutation) ResetCreatedAt()
- func (m *OrderMutation) ResetDeletedAt()
- func (m *OrderMutation) ResetEdge(name string) error
- func (m *OrderMutation) ResetExpireTime()
- func (m *OrderMutation) ResetExtensionID()
- func (m *OrderMutation) ResetField(name string) error
- func (m *OrderMutation) ResetMerchantOrderID()
- func (m *OrderMutation) ResetNo()
- func (m *OrderMutation) ResetNotifyTime()
- func (m *OrderMutation) ResetPrice()
- func (m *OrderMutation) ResetRefundPrice()
- func (m *OrderMutation) ResetStatus()
- func (m *OrderMutation) ResetSubject()
- func (m *OrderMutation) ResetSuccessTime()
- func (m *OrderMutation) ResetUpdatedAt()
- func (m *OrderMutation) ResetUserIP()
- func (m *OrderMutation) SetBody(s string)
- func (m *OrderMutation) SetChannelCode(s string)
- func (m *OrderMutation) SetChannelFeePrice(i int32)
- func (m *OrderMutation) SetChannelFeeRate(f float64)
- func (m *OrderMutation) SetChannelOrderNo(s string)
- func (m *OrderMutation) SetChannelUserID(s string)
- func (m *OrderMutation) SetCreatedAt(t time.Time)
- func (m *OrderMutation) SetDeletedAt(t time.Time)
- func (m *OrderMutation) SetExpireTime(t time.Time)
- func (m *OrderMutation) SetExtensionID(u uint64)
- func (m *OrderMutation) SetField(name string, value ent.Value) error
- func (m *OrderMutation) SetID(id uint64)
- func (m *OrderMutation) SetMerchantOrderID(s string)
- func (m *OrderMutation) SetNo(s string)
- func (m *OrderMutation) SetNotifyTime(t time.Time)
- func (m *OrderMutation) SetOp(op Op)
- func (m *OrderMutation) SetPrice(i int32)
- func (m *OrderMutation) SetRefundPrice(i int32)
- func (m *OrderMutation) SetStatus(u uint8)
- func (m *OrderMutation) SetSubject(s string)
- func (m *OrderMutation) SetSuccessTime(t time.Time)
- func (m *OrderMutation) SetUpdatedAt(t time.Time)
- func (m *OrderMutation) SetUserIP(s string)
- func (m *OrderMutation) Status() (r uint8, exists bool)
- func (m *OrderMutation) StatusCleared() bool
- func (m *OrderMutation) Subject() (r string, exists bool)
- func (m *OrderMutation) SuccessTime() (r time.Time, exists bool)
- func (m *OrderMutation) SuccessTimeCleared() bool
- func (m OrderMutation) Tx() (*Tx, error)
- func (m *OrderMutation) Type() string
- func (m *OrderMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OrderMutation) UserIP() (r string, exists bool)
- func (m *OrderMutation) Where(ps ...predicate.Order)
- func (m *OrderMutation) WhereP(ps ...func(*sql.Selector))
- type OrderPageList
- type OrderPager
- type OrderPaginateOption
- type OrderQuery
- func (oq *OrderQuery) Aggregate(fns ...AggregateFunc) *OrderSelect
- func (oq *OrderQuery) All(ctx context.Context) ([]*Order, error)
- func (oq *OrderQuery) AllX(ctx context.Context) []*Order
- func (oq *OrderQuery) Clone() *OrderQuery
- func (oq *OrderQuery) Count(ctx context.Context) (int, error)
- func (oq *OrderQuery) CountX(ctx context.Context) int
- func (oq *OrderQuery) Exist(ctx context.Context) (bool, error)
- func (oq *OrderQuery) ExistX(ctx context.Context) bool
- func (oq *OrderQuery) First(ctx context.Context) (*Order, error)
- func (oq *OrderQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (oq *OrderQuery) FirstIDX(ctx context.Context) uint64
- func (oq *OrderQuery) FirstX(ctx context.Context) *Order
- func (oq *OrderQuery) GroupBy(field string, fields ...string) *OrderGroupBy
- func (oq *OrderQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (oq *OrderQuery) IDsX(ctx context.Context) []uint64
- func (oq *OrderQuery) Limit(limit int) *OrderQuery
- func (oq *OrderQuery) Offset(offset int) *OrderQuery
- func (oq *OrderQuery) Only(ctx context.Context) (*Order, error)
- func (oq *OrderQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (oq *OrderQuery) OnlyIDX(ctx context.Context) uint64
- func (oq *OrderQuery) OnlyX(ctx context.Context) *Order
- func (oq *OrderQuery) Order(o ...order.OrderOption) *OrderQuery
- func (o *OrderQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*OrderPageList, error)
- func (oq *OrderQuery) Select(fields ...string) *OrderSelect
- func (oq *OrderQuery) Unique(unique bool) *OrderQuery
- func (oq *OrderQuery) Where(ps ...predicate.Order) *OrderQuery
- type OrderSelect
- func (os *OrderSelect) Aggregate(fns ...AggregateFunc) *OrderSelect
- func (s *OrderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OrderSelect) BoolX(ctx context.Context) bool
- func (s *OrderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OrderSelect) BoolsX(ctx context.Context) []bool
- func (s *OrderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OrderSelect) Float64X(ctx context.Context) float64
- func (s *OrderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OrderSelect) Float64sX(ctx context.Context) []float64
- func (s *OrderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OrderSelect) IntX(ctx context.Context) int
- func (s *OrderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OrderSelect) IntsX(ctx context.Context) []int
- func (os *OrderSelect) Scan(ctx context.Context, v any) error
- func (s *OrderSelect) ScanX(ctx context.Context, v any)
- func (s *OrderSelect) String(ctx context.Context) (_ string, err error)
- func (s *OrderSelect) StringX(ctx context.Context) string
- func (s *OrderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OrderSelect) StringsX(ctx context.Context) []string
- type OrderUpdate
- func (ou *OrderUpdate) AddChannelFeePrice(i int32) *OrderUpdate
- func (ou *OrderUpdate) AddChannelFeeRate(f float64) *OrderUpdate
- func (ou *OrderUpdate) AddExtensionID(u int64) *OrderUpdate
- func (ou *OrderUpdate) AddPrice(i int32) *OrderUpdate
- func (ou *OrderUpdate) AddRefundPrice(i int32) *OrderUpdate
- func (ou *OrderUpdate) AddStatus(u int8) *OrderUpdate
- func (ou *OrderUpdate) ClearChannelCode() *OrderUpdate
- func (ou *OrderUpdate) ClearChannelFeePrice() *OrderUpdate
- func (ou *OrderUpdate) ClearChannelFeeRate() *OrderUpdate
- func (ou *OrderUpdate) ClearChannelOrderNo() *OrderUpdate
- func (ou *OrderUpdate) ClearChannelUserID() *OrderUpdate
- func (ou *OrderUpdate) ClearDeletedAt() *OrderUpdate
- func (ou *OrderUpdate) ClearExtensionID() *OrderUpdate
- func (ou *OrderUpdate) ClearNo() *OrderUpdate
- func (ou *OrderUpdate) ClearNotifyTime() *OrderUpdate
- func (ou *OrderUpdate) ClearStatus() *OrderUpdate
- func (ou *OrderUpdate) ClearSuccessTime() *OrderUpdate
- func (ou *OrderUpdate) Exec(ctx context.Context) error
- func (ou *OrderUpdate) ExecX(ctx context.Context)
- func (ou *OrderUpdate) Mutation() *OrderMutation
- func (ou *OrderUpdate) Save(ctx context.Context) (int, error)
- func (ou *OrderUpdate) SaveX(ctx context.Context) int
- func (ou *OrderUpdate) SetBody(s string) *OrderUpdate
- func (ou *OrderUpdate) SetChannelCode(s string) *OrderUpdate
- func (ou *OrderUpdate) SetChannelFeePrice(i int32) *OrderUpdate
- func (ou *OrderUpdate) SetChannelFeeRate(f float64) *OrderUpdate
- func (ou *OrderUpdate) SetChannelOrderNo(s string) *OrderUpdate
- func (ou *OrderUpdate) SetChannelUserID(s string) *OrderUpdate
- func (ou *OrderUpdate) SetDeletedAt(t time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetExpireTime(t time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetExtensionID(u uint64) *OrderUpdate
- func (ou *OrderUpdate) SetMerchantOrderID(s string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableBody(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableChannelCode(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableChannelFeePrice(i *int32) *OrderUpdate
- func (ou *OrderUpdate) SetNillableChannelFeeRate(f *float64) *OrderUpdate
- func (ou *OrderUpdate) SetNillableChannelOrderNo(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableChannelUserID(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableDeletedAt(t *time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetNillableExpireTime(t *time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetNillableExtensionID(u *uint64) *OrderUpdate
- func (ou *OrderUpdate) SetNillableMerchantOrderID(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableNo(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableNotifyTime(t *time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetNillablePrice(i *int32) *OrderUpdate
- func (ou *OrderUpdate) SetNillableRefundPrice(i *int32) *OrderUpdate
- func (ou *OrderUpdate) SetNillableStatus(u *uint8) *OrderUpdate
- func (ou *OrderUpdate) SetNillableSubject(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNillableSuccessTime(t *time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetNillableUserIP(s *string) *OrderUpdate
- func (ou *OrderUpdate) SetNo(s string) *OrderUpdate
- func (o *OrderUpdate) SetNotNilBody(value *string) *OrderUpdate
- func (o *OrderUpdate) SetNotNilChannelCode(value *string) *OrderUpdate
- func (o *OrderUpdate) SetNotNilChannelFeePrice(value *int32) *OrderUpdate
- func (o *OrderUpdate) SetNotNilChannelFeeRate(value *float64) *OrderUpdate
- func (o *OrderUpdate) SetNotNilChannelOrderNo(value *string) *OrderUpdate
- func (o *OrderUpdate) SetNotNilChannelUserID(value *string) *OrderUpdate
- func (o *OrderUpdate) SetNotNilDeletedAt(value *time.Time) *OrderUpdate
- func (o *OrderUpdate) SetNotNilExpireTime(value *time.Time) *OrderUpdate
- func (o *OrderUpdate) SetNotNilExtensionID(value *uint64) *OrderUpdate
- func (o *OrderUpdate) SetNotNilMerchantOrderID(value *string) *OrderUpdate
- func (o *OrderUpdate) SetNotNilNo(value *string) *OrderUpdate
- func (o *OrderUpdate) SetNotNilNotifyTime(value *time.Time) *OrderUpdate
- func (o *OrderUpdate) SetNotNilPrice(value *int32) *OrderUpdate
- func (o *OrderUpdate) SetNotNilRefundPrice(value *int32) *OrderUpdate
- func (o *OrderUpdate) SetNotNilStatus(value *uint8) *OrderUpdate
- func (o *OrderUpdate) SetNotNilSubject(value *string) *OrderUpdate
- func (o *OrderUpdate) SetNotNilSuccessTime(value *time.Time) *OrderUpdate
- func (o *OrderUpdate) SetNotNilUpdatedAt(value *time.Time) *OrderUpdate
- func (o *OrderUpdate) SetNotNilUserIP(value *string) *OrderUpdate
- func (ou *OrderUpdate) SetNotifyTime(t time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetPrice(i int32) *OrderUpdate
- func (ou *OrderUpdate) SetRefundPrice(i int32) *OrderUpdate
- func (ou *OrderUpdate) SetStatus(u uint8) *OrderUpdate
- func (ou *OrderUpdate) SetSubject(s string) *OrderUpdate
- func (ou *OrderUpdate) SetSuccessTime(t time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetUpdatedAt(t time.Time) *OrderUpdate
- func (ou *OrderUpdate) SetUserIP(s string) *OrderUpdate
- func (ou *OrderUpdate) Where(ps ...predicate.Order) *OrderUpdate
- type OrderUpdateOne
- func (ouo *OrderUpdateOne) AddChannelFeePrice(i int32) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddChannelFeeRate(f float64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddExtensionID(u int64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddPrice(i int32) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddRefundPrice(i int32) *OrderUpdateOne
- func (ouo *OrderUpdateOne) AddStatus(u int8) *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearChannelCode() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearChannelFeePrice() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearChannelFeeRate() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearChannelOrderNo() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearChannelUserID() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearDeletedAt() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearExtensionID() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearNo() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearNotifyTime() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearStatus() *OrderUpdateOne
- func (ouo *OrderUpdateOne) ClearSuccessTime() *OrderUpdateOne
- func (ouo *OrderUpdateOne) Exec(ctx context.Context) error
- func (ouo *OrderUpdateOne) ExecX(ctx context.Context)
- func (ouo *OrderUpdateOne) Mutation() *OrderMutation
- func (ouo *OrderUpdateOne) Save(ctx context.Context) (*Order, error)
- func (ouo *OrderUpdateOne) SaveX(ctx context.Context) *Order
- func (ouo *OrderUpdateOne) Select(field string, fields ...string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetBody(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetChannelCode(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetChannelFeePrice(i int32) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetChannelFeeRate(f float64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetChannelOrderNo(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetChannelUserID(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetDeletedAt(t time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetExpireTime(t time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetExtensionID(u uint64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetMerchantOrderID(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableBody(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableChannelCode(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableChannelFeePrice(i *int32) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableChannelFeeRate(f *float64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableChannelOrderNo(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableChannelUserID(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableDeletedAt(t *time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableExpireTime(t *time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableExtensionID(u *uint64) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableMerchantOrderID(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableNo(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableNotifyTime(t *time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillablePrice(i *int32) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableRefundPrice(i *int32) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableStatus(u *uint8) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableSubject(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableSuccessTime(t *time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNillableUserIP(s *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNo(s string) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilBody(value *string) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilChannelCode(value *string) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilChannelFeePrice(value *int32) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilChannelFeeRate(value *float64) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilChannelOrderNo(value *string) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilChannelUserID(value *string) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilDeletedAt(value *time.Time) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilExpireTime(value *time.Time) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilExtensionID(value *uint64) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilMerchantOrderID(value *string) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilNo(value *string) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilNotifyTime(value *time.Time) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilPrice(value *int32) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilRefundPrice(value *int32) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilStatus(value *uint8) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilSubject(value *string) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilSuccessTime(value *time.Time) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilUpdatedAt(value *time.Time) *OrderUpdateOne
- func (o *OrderUpdateOne) SetNotNilUserIP(value *string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetNotifyTime(t time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetPrice(i int32) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetRefundPrice(i int32) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetStatus(u uint8) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetSubject(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetSuccessTime(t time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetUpdatedAt(t time.Time) *OrderUpdateOne
- func (ouo *OrderUpdateOne) SetUserIP(s string) *OrderUpdateOne
- func (ouo *OrderUpdateOne) Where(ps ...predicate.Order) *OrderUpdateOne
- type Orders
- type PageDetails
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Refund
- type RefundClient
- func (c *RefundClient) Create() *RefundCreate
- func (c *RefundClient) CreateBulk(builders ...*RefundCreate) *RefundCreateBulk
- func (c *RefundClient) Delete() *RefundDelete
- func (c *RefundClient) DeleteOne(r *Refund) *RefundDeleteOne
- func (c *RefundClient) DeleteOneID(id uint64) *RefundDeleteOne
- func (c *RefundClient) Get(ctx context.Context, id uint64) (*Refund, error)
- func (c *RefundClient) GetX(ctx context.Context, id uint64) *Refund
- func (c *RefundClient) Hooks() []Hook
- func (c *RefundClient) Intercept(interceptors ...Interceptor)
- func (c *RefundClient) Interceptors() []Interceptor
- func (c *RefundClient) MapCreateBulk(slice any, setFunc func(*RefundCreate, int)) *RefundCreateBulk
- func (c *RefundClient) Query() *RefundQuery
- func (c *RefundClient) Update() *RefundUpdate
- func (c *RefundClient) UpdateOne(r *Refund) *RefundUpdateOne
- func (c *RefundClient) UpdateOneID(id uint64) *RefundUpdateOne
- func (c *RefundClient) Use(hooks ...Hook)
- type RefundCreate
- func (rc *RefundCreate) Exec(ctx context.Context) error
- func (rc *RefundCreate) ExecX(ctx context.Context)
- func (rc *RefundCreate) Mutation() *RefundMutation
- func (rc *RefundCreate) Save(ctx context.Context) (*Refund, error)
- func (rc *RefundCreate) SaveX(ctx context.Context) *Refund
- func (rc *RefundCreate) SetChannelCode(s string) *RefundCreate
- func (rc *RefundCreate) SetChannelErrorCode(s string) *RefundCreate
- func (rc *RefundCreate) SetChannelErrorMsg(s string) *RefundCreate
- func (rc *RefundCreate) SetChannelNotifyData(s string) *RefundCreate
- func (rc *RefundCreate) SetChannelOrderNo(s string) *RefundCreate
- func (rc *RefundCreate) SetChannelRefundNo(s string) *RefundCreate
- func (rc *RefundCreate) SetCreatedAt(t time.Time) *RefundCreate
- func (rc *RefundCreate) SetDeletedAt(t time.Time) *RefundCreate
- func (rc *RefundCreate) SetID(u uint64) *RefundCreate
- func (rc *RefundCreate) SetMerchantOrderID(s string) *RefundCreate
- func (rc *RefundCreate) SetMerchantRefundID(s string) *RefundCreate
- func (rc *RefundCreate) SetNillableChannelErrorCode(s *string) *RefundCreate
- func (rc *RefundCreate) SetNillableChannelErrorMsg(s *string) *RefundCreate
- func (rc *RefundCreate) SetNillableChannelNotifyData(s *string) *RefundCreate
- func (rc *RefundCreate) SetNillableChannelRefundNo(s *string) *RefundCreate
- func (rc *RefundCreate) SetNillableCreatedAt(t *time.Time) *RefundCreate
- func (rc *RefundCreate) SetNillableDeletedAt(t *time.Time) *RefundCreate
- func (rc *RefundCreate) SetNillableStatus(u *uint8) *RefundCreate
- func (rc *RefundCreate) SetNillableSuccessTime(t *time.Time) *RefundCreate
- func (rc *RefundCreate) SetNillableUpdatedAt(t *time.Time) *RefundCreate
- func (rc *RefundCreate) SetNillableUserIP(s *string) *RefundCreate
- func (rc *RefundCreate) SetNo(s string) *RefundCreate
- func (r *RefundCreate) SetNotNilChannelCode(value *string) *RefundCreate
- func (r *RefundCreate) SetNotNilChannelErrorCode(value *string) *RefundCreate
- func (r *RefundCreate) SetNotNilChannelErrorMsg(value *string) *RefundCreate
- func (r *RefundCreate) SetNotNilChannelNotifyData(value *string) *RefundCreate
- func (r *RefundCreate) SetNotNilChannelOrderNo(value *string) *RefundCreate
- func (r *RefundCreate) SetNotNilChannelRefundNo(value *string) *RefundCreate
- func (r *RefundCreate) SetNotNilDeletedAt(value *time.Time) *RefundCreate
- func (r *RefundCreate) SetNotNilMerchantOrderID(value *string) *RefundCreate
- func (r *RefundCreate) SetNotNilMerchantRefundID(value *string) *RefundCreate
- func (r *RefundCreate) SetNotNilNo(value *string) *RefundCreate
- func (r *RefundCreate) SetNotNilOrderID(value *uint64) *RefundCreate
- func (r *RefundCreate) SetNotNilOrderNo(value *string) *RefundCreate
- func (r *RefundCreate) SetNotNilPayPrice(value *int32) *RefundCreate
- func (r *RefundCreate) SetNotNilReason(value *string) *RefundCreate
- func (r *RefundCreate) SetNotNilRefundPrice(value *int32) *RefundCreate
- func (r *RefundCreate) SetNotNilStatus(value *uint8) *RefundCreate
- func (r *RefundCreate) SetNotNilSuccessTime(value *time.Time) *RefundCreate
- func (r *RefundCreate) SetNotNilUpdatedAt(value *time.Time) *RefundCreate
- func (r *RefundCreate) SetNotNilUserIP(value *string) *RefundCreate
- func (rc *RefundCreate) SetOrderID(u uint64) *RefundCreate
- func (rc *RefundCreate) SetOrderNo(s string) *RefundCreate
- func (rc *RefundCreate) SetPayPrice(i int32) *RefundCreate
- func (rc *RefundCreate) SetReason(s string) *RefundCreate
- func (rc *RefundCreate) SetRefundPrice(i int32) *RefundCreate
- func (rc *RefundCreate) SetStatus(u uint8) *RefundCreate
- func (rc *RefundCreate) SetSuccessTime(t time.Time) *RefundCreate
- func (rc *RefundCreate) SetUpdatedAt(t time.Time) *RefundCreate
- func (rc *RefundCreate) SetUserIP(s string) *RefundCreate
- type RefundCreateBulk
- type RefundDelete
- type RefundDeleteOne
- type RefundGroupBy
- func (rgb *RefundGroupBy) Aggregate(fns ...AggregateFunc) *RefundGroupBy
- func (s *RefundGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RefundGroupBy) BoolX(ctx context.Context) bool
- func (s *RefundGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RefundGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RefundGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RefundGroupBy) Float64X(ctx context.Context) float64
- func (s *RefundGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RefundGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RefundGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RefundGroupBy) IntX(ctx context.Context) int
- func (s *RefundGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RefundGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RefundGroupBy) Scan(ctx context.Context, v any) error
- func (s *RefundGroupBy) ScanX(ctx context.Context, v any)
- func (s *RefundGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RefundGroupBy) StringX(ctx context.Context) string
- func (s *RefundGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RefundGroupBy) StringsX(ctx context.Context) []string
- type RefundMutation
- func (m *RefundMutation) AddField(name string, value ent.Value) error
- func (m *RefundMutation) AddOrderID(u int64)
- func (m *RefundMutation) AddPayPrice(i int32)
- func (m *RefundMutation) AddRefundPrice(i int32)
- func (m *RefundMutation) AddStatus(u int8)
- func (m *RefundMutation) AddedEdges() []string
- func (m *RefundMutation) AddedField(name string) (ent.Value, bool)
- func (m *RefundMutation) AddedFields() []string
- func (m *RefundMutation) AddedIDs(name string) []ent.Value
- func (m *RefundMutation) AddedOrderID() (r int64, exists bool)
- func (m *RefundMutation) AddedPayPrice() (r int32, exists bool)
- func (m *RefundMutation) AddedRefundPrice() (r int32, exists bool)
- func (m *RefundMutation) AddedStatus() (r int8, exists bool)
- func (m *RefundMutation) ChannelCode() (r string, exists bool)
- func (m *RefundMutation) ChannelErrorCode() (r string, exists bool)
- func (m *RefundMutation) ChannelErrorCodeCleared() bool
- func (m *RefundMutation) ChannelErrorMsg() (r string, exists bool)
- func (m *RefundMutation) ChannelErrorMsgCleared() bool
- func (m *RefundMutation) ChannelNotifyData() (r string, exists bool)
- func (m *RefundMutation) ChannelNotifyDataCleared() bool
- func (m *RefundMutation) ChannelOrderNo() (r string, exists bool)
- func (m *RefundMutation) ChannelRefundNo() (r string, exists bool)
- func (m *RefundMutation) ChannelRefundNoCleared() bool
- func (m *RefundMutation) ClearChannelErrorCode()
- func (m *RefundMutation) ClearChannelErrorMsg()
- func (m *RefundMutation) ClearChannelNotifyData()
- func (m *RefundMutation) ClearChannelRefundNo()
- func (m *RefundMutation) ClearDeletedAt()
- func (m *RefundMutation) ClearEdge(name string) error
- func (m *RefundMutation) ClearField(name string) error
- func (m *RefundMutation) ClearStatus()
- func (m *RefundMutation) ClearSuccessTime()
- func (m *RefundMutation) ClearUserIP()
- func (m *RefundMutation) ClearedEdges() []string
- func (m *RefundMutation) ClearedFields() []string
- func (m RefundMutation) Client() *Client
- func (m *RefundMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RefundMutation) DeletedAt() (r time.Time, exists bool)
- func (m *RefundMutation) DeletedAtCleared() bool
- func (m *RefundMutation) EdgeCleared(name string) bool
- func (m *RefundMutation) Field(name string) (ent.Value, bool)
- func (m *RefundMutation) FieldCleared(name string) bool
- func (m *RefundMutation) Fields() []string
- func (m *RefundMutation) ID() (id uint64, exists bool)
- func (m *RefundMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *RefundMutation) MerchantOrderID() (r string, exists bool)
- func (m *RefundMutation) MerchantRefundID() (r string, exists bool)
- func (m *RefundMutation) No() (r string, exists bool)
- func (m *RefundMutation) OldChannelCode(ctx context.Context) (v string, err error)
- func (m *RefundMutation) OldChannelErrorCode(ctx context.Context) (v string, err error)
- func (m *RefundMutation) OldChannelErrorMsg(ctx context.Context) (v string, err error)
- func (m *RefundMutation) OldChannelNotifyData(ctx context.Context) (v string, err error)
- func (m *RefundMutation) OldChannelOrderNo(ctx context.Context) (v string, err error)
- func (m *RefundMutation) OldChannelRefundNo(ctx context.Context) (v string, err error)
- func (m *RefundMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RefundMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)
- func (m *RefundMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RefundMutation) OldMerchantOrderID(ctx context.Context) (v string, err error)
- func (m *RefundMutation) OldMerchantRefundID(ctx context.Context) (v string, err error)
- func (m *RefundMutation) OldNo(ctx context.Context) (v string, err error)
- func (m *RefundMutation) OldOrderID(ctx context.Context) (v uint64, err error)
- func (m *RefundMutation) OldOrderNo(ctx context.Context) (v string, err error)
- func (m *RefundMutation) OldPayPrice(ctx context.Context) (v int32, err error)
- func (m *RefundMutation) OldReason(ctx context.Context) (v string, err error)
- func (m *RefundMutation) OldRefundPrice(ctx context.Context) (v int32, err error)
- func (m *RefundMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *RefundMutation) OldSuccessTime(ctx context.Context) (v time.Time, err error)
- func (m *RefundMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RefundMutation) OldUserIP(ctx context.Context) (v string, err error)
- func (m *RefundMutation) Op() Op
- func (m *RefundMutation) OrderID() (r uint64, exists bool)
- func (m *RefundMutation) OrderNo() (r string, exists bool)
- func (m *RefundMutation) PayPrice() (r int32, exists bool)
- func (m *RefundMutation) Reason() (r string, exists bool)
- func (m *RefundMutation) RefundPrice() (r int32, exists bool)
- func (m *RefundMutation) RemovedEdges() []string
- func (m *RefundMutation) RemovedIDs(name string) []ent.Value
- func (m *RefundMutation) ResetChannelCode()
- func (m *RefundMutation) ResetChannelErrorCode()
- func (m *RefundMutation) ResetChannelErrorMsg()
- func (m *RefundMutation) ResetChannelNotifyData()
- func (m *RefundMutation) ResetChannelOrderNo()
- func (m *RefundMutation) ResetChannelRefundNo()
- func (m *RefundMutation) ResetCreatedAt()
- func (m *RefundMutation) ResetDeletedAt()
- func (m *RefundMutation) ResetEdge(name string) error
- func (m *RefundMutation) ResetField(name string) error
- func (m *RefundMutation) ResetMerchantOrderID()
- func (m *RefundMutation) ResetMerchantRefundID()
- func (m *RefundMutation) ResetNo()
- func (m *RefundMutation) ResetOrderID()
- func (m *RefundMutation) ResetOrderNo()
- func (m *RefundMutation) ResetPayPrice()
- func (m *RefundMutation) ResetReason()
- func (m *RefundMutation) ResetRefundPrice()
- func (m *RefundMutation) ResetStatus()
- func (m *RefundMutation) ResetSuccessTime()
- func (m *RefundMutation) ResetUpdatedAt()
- func (m *RefundMutation) ResetUserIP()
- func (m *RefundMutation) SetChannelCode(s string)
- func (m *RefundMutation) SetChannelErrorCode(s string)
- func (m *RefundMutation) SetChannelErrorMsg(s string)
- func (m *RefundMutation) SetChannelNotifyData(s string)
- func (m *RefundMutation) SetChannelOrderNo(s string)
- func (m *RefundMutation) SetChannelRefundNo(s string)
- func (m *RefundMutation) SetCreatedAt(t time.Time)
- func (m *RefundMutation) SetDeletedAt(t time.Time)
- func (m *RefundMutation) SetField(name string, value ent.Value) error
- func (m *RefundMutation) SetID(id uint64)
- func (m *RefundMutation) SetMerchantOrderID(s string)
- func (m *RefundMutation) SetMerchantRefundID(s string)
- func (m *RefundMutation) SetNo(s string)
- func (m *RefundMutation) SetOp(op Op)
- func (m *RefundMutation) SetOrderID(u uint64)
- func (m *RefundMutation) SetOrderNo(s string)
- func (m *RefundMutation) SetPayPrice(i int32)
- func (m *RefundMutation) SetReason(s string)
- func (m *RefundMutation) SetRefundPrice(i int32)
- func (m *RefundMutation) SetStatus(u uint8)
- func (m *RefundMutation) SetSuccessTime(t time.Time)
- func (m *RefundMutation) SetUpdatedAt(t time.Time)
- func (m *RefundMutation) SetUserIP(s string)
- func (m *RefundMutation) Status() (r uint8, exists bool)
- func (m *RefundMutation) StatusCleared() bool
- func (m *RefundMutation) SuccessTime() (r time.Time, exists bool)
- func (m *RefundMutation) SuccessTimeCleared() bool
- func (m RefundMutation) Tx() (*Tx, error)
- func (m *RefundMutation) Type() string
- func (m *RefundMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *RefundMutation) UserIP() (r string, exists bool)
- func (m *RefundMutation) UserIPCleared() bool
- func (m *RefundMutation) Where(ps ...predicate.Refund)
- func (m *RefundMutation) WhereP(ps ...func(*sql.Selector))
- type RefundPageList
- type RefundPager
- type RefundPaginateOption
- type RefundQuery
- func (rq *RefundQuery) Aggregate(fns ...AggregateFunc) *RefundSelect
- func (rq *RefundQuery) All(ctx context.Context) ([]*Refund, error)
- func (rq *RefundQuery) AllX(ctx context.Context) []*Refund
- func (rq *RefundQuery) Clone() *RefundQuery
- func (rq *RefundQuery) Count(ctx context.Context) (int, error)
- func (rq *RefundQuery) CountX(ctx context.Context) int
- func (rq *RefundQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RefundQuery) ExistX(ctx context.Context) bool
- func (rq *RefundQuery) First(ctx context.Context) (*Refund, error)
- func (rq *RefundQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (rq *RefundQuery) FirstIDX(ctx context.Context) uint64
- func (rq *RefundQuery) FirstX(ctx context.Context) *Refund
- func (rq *RefundQuery) GroupBy(field string, fields ...string) *RefundGroupBy
- func (rq *RefundQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (rq *RefundQuery) IDsX(ctx context.Context) []uint64
- func (rq *RefundQuery) Limit(limit int) *RefundQuery
- func (rq *RefundQuery) Offset(offset int) *RefundQuery
- func (rq *RefundQuery) Only(ctx context.Context) (*Refund, error)
- func (rq *RefundQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (rq *RefundQuery) OnlyIDX(ctx context.Context) uint64
- func (rq *RefundQuery) OnlyX(ctx context.Context) *Refund
- func (rq *RefundQuery) Order(o ...refund.OrderOption) *RefundQuery
- func (r *RefundQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*RefundPageList, error)
- func (rq *RefundQuery) Select(fields ...string) *RefundSelect
- func (rq *RefundQuery) Unique(unique bool) *RefundQuery
- func (rq *RefundQuery) Where(ps ...predicate.Refund) *RefundQuery
- type RefundSelect
- func (rs *RefundSelect) Aggregate(fns ...AggregateFunc) *RefundSelect
- func (s *RefundSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RefundSelect) BoolX(ctx context.Context) bool
- func (s *RefundSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RefundSelect) BoolsX(ctx context.Context) []bool
- func (s *RefundSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RefundSelect) Float64X(ctx context.Context) float64
- func (s *RefundSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RefundSelect) Float64sX(ctx context.Context) []float64
- func (s *RefundSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RefundSelect) IntX(ctx context.Context) int
- func (s *RefundSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RefundSelect) IntsX(ctx context.Context) []int
- func (rs *RefundSelect) Scan(ctx context.Context, v any) error
- func (s *RefundSelect) ScanX(ctx context.Context, v any)
- func (s *RefundSelect) String(ctx context.Context) (_ string, err error)
- func (s *RefundSelect) StringX(ctx context.Context) string
- func (s *RefundSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RefundSelect) StringsX(ctx context.Context) []string
- type RefundUpdate
- func (ru *RefundUpdate) AddOrderID(u int64) *RefundUpdate
- func (ru *RefundUpdate) AddPayPrice(i int32) *RefundUpdate
- func (ru *RefundUpdate) AddRefundPrice(i int32) *RefundUpdate
- func (ru *RefundUpdate) AddStatus(u int8) *RefundUpdate
- func (ru *RefundUpdate) ClearChannelErrorCode() *RefundUpdate
- func (ru *RefundUpdate) ClearChannelErrorMsg() *RefundUpdate
- func (ru *RefundUpdate) ClearChannelNotifyData() *RefundUpdate
- func (ru *RefundUpdate) ClearChannelRefundNo() *RefundUpdate
- func (ru *RefundUpdate) ClearDeletedAt() *RefundUpdate
- func (ru *RefundUpdate) ClearStatus() *RefundUpdate
- func (ru *RefundUpdate) ClearSuccessTime() *RefundUpdate
- func (ru *RefundUpdate) ClearUserIP() *RefundUpdate
- func (ru *RefundUpdate) Exec(ctx context.Context) error
- func (ru *RefundUpdate) ExecX(ctx context.Context)
- func (ru *RefundUpdate) Mutation() *RefundMutation
- func (ru *RefundUpdate) Save(ctx context.Context) (int, error)
- func (ru *RefundUpdate) SaveX(ctx context.Context) int
- func (ru *RefundUpdate) SetChannelCode(s string) *RefundUpdate
- func (ru *RefundUpdate) SetChannelErrorCode(s string) *RefundUpdate
- func (ru *RefundUpdate) SetChannelErrorMsg(s string) *RefundUpdate
- func (ru *RefundUpdate) SetChannelNotifyData(s string) *RefundUpdate
- func (ru *RefundUpdate) SetChannelOrderNo(s string) *RefundUpdate
- func (ru *RefundUpdate) SetChannelRefundNo(s string) *RefundUpdate
- func (ru *RefundUpdate) SetDeletedAt(t time.Time) *RefundUpdate
- func (ru *RefundUpdate) SetMerchantOrderID(s string) *RefundUpdate
- func (ru *RefundUpdate) SetMerchantRefundID(s string) *RefundUpdate
- func (ru *RefundUpdate) SetNillableChannelCode(s *string) *RefundUpdate
- func (ru *RefundUpdate) SetNillableChannelErrorCode(s *string) *RefundUpdate
- func (ru *RefundUpdate) SetNillableChannelErrorMsg(s *string) *RefundUpdate
- func (ru *RefundUpdate) SetNillableChannelNotifyData(s *string) *RefundUpdate
- func (ru *RefundUpdate) SetNillableChannelOrderNo(s *string) *RefundUpdate
- func (ru *RefundUpdate) SetNillableChannelRefundNo(s *string) *RefundUpdate
- func (ru *RefundUpdate) SetNillableDeletedAt(t *time.Time) *RefundUpdate
- func (ru *RefundUpdate) SetNillableMerchantOrderID(s *string) *RefundUpdate
- func (ru *RefundUpdate) SetNillableMerchantRefundID(s *string) *RefundUpdate
- func (ru *RefundUpdate) SetNillableNo(s *string) *RefundUpdate
- func (ru *RefundUpdate) SetNillableOrderID(u *uint64) *RefundUpdate
- func (ru *RefundUpdate) SetNillableOrderNo(s *string) *RefundUpdate
- func (ru *RefundUpdate) SetNillablePayPrice(i *int32) *RefundUpdate
- func (ru *RefundUpdate) SetNillableReason(s *string) *RefundUpdate
- func (ru *RefundUpdate) SetNillableRefundPrice(i *int32) *RefundUpdate
- func (ru *RefundUpdate) SetNillableStatus(u *uint8) *RefundUpdate
- func (ru *RefundUpdate) SetNillableSuccessTime(t *time.Time) *RefundUpdate
- func (ru *RefundUpdate) SetNillableUserIP(s *string) *RefundUpdate
- func (ru *RefundUpdate) SetNo(s string) *RefundUpdate
- func (r *RefundUpdate) SetNotNilChannelCode(value *string) *RefundUpdate
- func (r *RefundUpdate) SetNotNilChannelErrorCode(value *string) *RefundUpdate
- func (r *RefundUpdate) SetNotNilChannelErrorMsg(value *string) *RefundUpdate
- func (r *RefundUpdate) SetNotNilChannelNotifyData(value *string) *RefundUpdate
- func (r *RefundUpdate) SetNotNilChannelOrderNo(value *string) *RefundUpdate
- func (r *RefundUpdate) SetNotNilChannelRefundNo(value *string) *RefundUpdate
- func (r *RefundUpdate) SetNotNilDeletedAt(value *time.Time) *RefundUpdate
- func (r *RefundUpdate) SetNotNilMerchantOrderID(value *string) *RefundUpdate
- func (r *RefundUpdate) SetNotNilMerchantRefundID(value *string) *RefundUpdate
- func (r *RefundUpdate) SetNotNilNo(value *string) *RefundUpdate
- func (r *RefundUpdate) SetNotNilOrderID(value *uint64) *RefundUpdate
- func (r *RefundUpdate) SetNotNilOrderNo(value *string) *RefundUpdate
- func (r *RefundUpdate) SetNotNilPayPrice(value *int32) *RefundUpdate
- func (r *RefundUpdate) SetNotNilReason(value *string) *RefundUpdate
- func (r *RefundUpdate) SetNotNilRefundPrice(value *int32) *RefundUpdate
- func (r *RefundUpdate) SetNotNilStatus(value *uint8) *RefundUpdate
- func (r *RefundUpdate) SetNotNilSuccessTime(value *time.Time) *RefundUpdate
- func (r *RefundUpdate) SetNotNilUpdatedAt(value *time.Time) *RefundUpdate
- func (r *RefundUpdate) SetNotNilUserIP(value *string) *RefundUpdate
- func (ru *RefundUpdate) SetOrderID(u uint64) *RefundUpdate
- func (ru *RefundUpdate) SetOrderNo(s string) *RefundUpdate
- func (ru *RefundUpdate) SetPayPrice(i int32) *RefundUpdate
- func (ru *RefundUpdate) SetReason(s string) *RefundUpdate
- func (ru *RefundUpdate) SetRefundPrice(i int32) *RefundUpdate
- func (ru *RefundUpdate) SetStatus(u uint8) *RefundUpdate
- func (ru *RefundUpdate) SetSuccessTime(t time.Time) *RefundUpdate
- func (ru *RefundUpdate) SetUpdatedAt(t time.Time) *RefundUpdate
- func (ru *RefundUpdate) SetUserIP(s string) *RefundUpdate
- func (ru *RefundUpdate) Where(ps ...predicate.Refund) *RefundUpdate
- type RefundUpdateOne
- func (ruo *RefundUpdateOne) AddOrderID(u int64) *RefundUpdateOne
- func (ruo *RefundUpdateOne) AddPayPrice(i int32) *RefundUpdateOne
- func (ruo *RefundUpdateOne) AddRefundPrice(i int32) *RefundUpdateOne
- func (ruo *RefundUpdateOne) AddStatus(u int8) *RefundUpdateOne
- func (ruo *RefundUpdateOne) ClearChannelErrorCode() *RefundUpdateOne
- func (ruo *RefundUpdateOne) ClearChannelErrorMsg() *RefundUpdateOne
- func (ruo *RefundUpdateOne) ClearChannelNotifyData() *RefundUpdateOne
- func (ruo *RefundUpdateOne) ClearChannelRefundNo() *RefundUpdateOne
- func (ruo *RefundUpdateOne) ClearDeletedAt() *RefundUpdateOne
- func (ruo *RefundUpdateOne) ClearStatus() *RefundUpdateOne
- func (ruo *RefundUpdateOne) ClearSuccessTime() *RefundUpdateOne
- func (ruo *RefundUpdateOne) ClearUserIP() *RefundUpdateOne
- func (ruo *RefundUpdateOne) Exec(ctx context.Context) error
- func (ruo *RefundUpdateOne) ExecX(ctx context.Context)
- func (ruo *RefundUpdateOne) Mutation() *RefundMutation
- func (ruo *RefundUpdateOne) Save(ctx context.Context) (*Refund, error)
- func (ruo *RefundUpdateOne) SaveX(ctx context.Context) *Refund
- func (ruo *RefundUpdateOne) Select(field string, fields ...string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetChannelCode(s string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetChannelErrorCode(s string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetChannelErrorMsg(s string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetChannelNotifyData(s string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetChannelOrderNo(s string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetChannelRefundNo(s string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetDeletedAt(t time.Time) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetMerchantOrderID(s string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetMerchantRefundID(s string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableChannelCode(s *string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableChannelErrorCode(s *string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableChannelErrorMsg(s *string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableChannelNotifyData(s *string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableChannelOrderNo(s *string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableChannelRefundNo(s *string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableDeletedAt(t *time.Time) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableMerchantOrderID(s *string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableMerchantRefundID(s *string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableNo(s *string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableOrderID(u *uint64) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableOrderNo(s *string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillablePayPrice(i *int32) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableReason(s *string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableRefundPrice(i *int32) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableStatus(u *uint8) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableSuccessTime(t *time.Time) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNillableUserIP(s *string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetNo(s string) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilChannelCode(value *string) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilChannelErrorCode(value *string) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilChannelErrorMsg(value *string) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilChannelNotifyData(value *string) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilChannelOrderNo(value *string) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilChannelRefundNo(value *string) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilDeletedAt(value *time.Time) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilMerchantOrderID(value *string) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilMerchantRefundID(value *string) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilNo(value *string) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilOrderID(value *uint64) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilOrderNo(value *string) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilPayPrice(value *int32) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilReason(value *string) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilRefundPrice(value *int32) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilStatus(value *uint8) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilSuccessTime(value *time.Time) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilUpdatedAt(value *time.Time) *RefundUpdateOne
- func (r *RefundUpdateOne) SetNotNilUserIP(value *string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetOrderID(u uint64) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetOrderNo(s string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetPayPrice(i int32) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetReason(s string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetRefundPrice(i int32) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetStatus(u uint8) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetSuccessTime(t time.Time) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetUpdatedAt(t time.Time) *RefundUpdateOne
- func (ruo *RefundUpdateOne) SetUserIP(s string) *RefundUpdateOne
- func (ruo *RefundUpdateOne) Where(ps ...predicate.Refund) *RefundUpdateOne
- type Refunds
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeDemoOrder = "DemoOrder" TypeOrder = "Order" TypeOrderExtension = "OrderExtension" TypeRefund = "Refund" )
Variables ¶
var DefaultDemoOrderOrder = Desc(demoorder.FieldID)
DefaultDemoOrderOrder is the default ordering of DemoOrder.
var DefaultOrderExtensionOrder = Desc(orderextension.FieldID)
DefaultOrderExtensionOrder is the default ordering of OrderExtension.
var DefaultOrderOrder = Desc(order.FieldID)
DefaultOrderOrder is the default ordering of Order.
var DefaultRefundOrder = Desc(refund.FieldID)
DefaultRefundOrder is the default ordering of Refund.
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 // DemoOrder is the client for interacting with the DemoOrder builders. DemoOrder *DemoOrderClient // Order is the client for interacting with the Order builders. Order *OrderClient // OrderExtension is the client for interacting with the OrderExtension builders. OrderExtension *OrderExtensionClient // Refund is the client for interacting with the Refund builders. Refund *RefundClient // 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(). DemoOrder. 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 DemoOrder ¶
type DemoOrder struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Delete Time | 删除日期 DeletedAt time.Time `json:"deleted_at,omitempty"` // 用户编号 UserID string `json:"user_id,omitempty"` // 商品编号 SpuID uint64 `json:"spu_id,omitempty"` // 商品名称 SpuName string `json:"spu_name,omitempty"` // 价格,单位:分 Price int32 `json:"price,omitempty"` // 是否支付 PayStatus bool `json:"pay_status,omitempty"` // 支付订单编号 PayOrderId uint64 `json:"pay_orderId,omitempty"` // 付款时间 PayTime time.Time `json:"pay_time,omitempty"` // 支付渠道 PayChannelCode string `json:"pay_channel_code,omitempty"` // 支付退款单号 PayRefundID uint64 `json:"pay_refund_id,omitempty"` // 退款金额,单位:分 RefundPrice int32 `json:"refund_price,omitempty"` // 退款完成时间 RefundTime time.Time `json:"refund_time,omitempty"` // contains filtered or unexported fields }
DemoOrder is the model entity for the DemoOrder schema.
func (*DemoOrder) Unwrap ¶
Unwrap unwraps the DemoOrder 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 (*DemoOrder) Update ¶
func (do *DemoOrder) Update() *DemoOrderUpdateOne
Update returns a builder for updating this DemoOrder. Note that you need to call DemoOrder.Unwrap() before calling this method if this DemoOrder was returned from a transaction, and the transaction was committed or rolled back.
type DemoOrderClient ¶
type DemoOrderClient struct {
// contains filtered or unexported fields
}
DemoOrderClient is a client for the DemoOrder schema.
func NewDemoOrderClient ¶
func NewDemoOrderClient(c config) *DemoOrderClient
NewDemoOrderClient returns a client for the DemoOrder from the given config.
func (*DemoOrderClient) Create ¶
func (c *DemoOrderClient) Create() *DemoOrderCreate
Create returns a builder for creating a DemoOrder entity.
func (*DemoOrderClient) CreateBulk ¶
func (c *DemoOrderClient) CreateBulk(builders ...*DemoOrderCreate) *DemoOrderCreateBulk
CreateBulk returns a builder for creating a bulk of DemoOrder entities.
func (*DemoOrderClient) Delete ¶
func (c *DemoOrderClient) Delete() *DemoOrderDelete
Delete returns a delete builder for DemoOrder.
func (*DemoOrderClient) DeleteOne ¶
func (c *DemoOrderClient) DeleteOne(do *DemoOrder) *DemoOrderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DemoOrderClient) DeleteOneID ¶
func (c *DemoOrderClient) DeleteOneID(id uint64) *DemoOrderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DemoOrderClient) GetX ¶
func (c *DemoOrderClient) GetX(ctx context.Context, id uint64) *DemoOrder
GetX is like Get, but panics if an error occurs.
func (*DemoOrderClient) Hooks ¶
func (c *DemoOrderClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DemoOrderClient) Intercept ¶
func (c *DemoOrderClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `demoorder.Intercept(f(g(h())))`.
func (*DemoOrderClient) Interceptors ¶
func (c *DemoOrderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DemoOrderClient) MapCreateBulk ¶
func (c *DemoOrderClient) MapCreateBulk(slice any, setFunc func(*DemoOrderCreate, int)) *DemoOrderCreateBulk
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 (*DemoOrderClient) Query ¶
func (c *DemoOrderClient) Query() *DemoOrderQuery
Query returns a query builder for DemoOrder.
func (*DemoOrderClient) Update ¶
func (c *DemoOrderClient) Update() *DemoOrderUpdate
Update returns an update builder for DemoOrder.
func (*DemoOrderClient) UpdateOne ¶
func (c *DemoOrderClient) UpdateOne(do *DemoOrder) *DemoOrderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DemoOrderClient) UpdateOneID ¶
func (c *DemoOrderClient) UpdateOneID(id uint64) *DemoOrderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DemoOrderClient) Use ¶
func (c *DemoOrderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `demoorder.Hooks(f(g(h())))`.
type DemoOrderCreate ¶
type DemoOrderCreate struct {
// contains filtered or unexported fields
}
DemoOrderCreate is the builder for creating a DemoOrder entity.
func (*DemoOrderCreate) Exec ¶
func (doc *DemoOrderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DemoOrderCreate) ExecX ¶
func (doc *DemoOrderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DemoOrderCreate) Mutation ¶
func (doc *DemoOrderCreate) Mutation() *DemoOrderMutation
Mutation returns the DemoOrderMutation object of the builder.
func (*DemoOrderCreate) Save ¶
func (doc *DemoOrderCreate) Save(ctx context.Context) (*DemoOrder, error)
Save creates the DemoOrder in the database.
func (*DemoOrderCreate) SaveX ¶
func (doc *DemoOrderCreate) SaveX(ctx context.Context) *DemoOrder
SaveX calls Save and panics if Save returns an error.
func (*DemoOrderCreate) SetCreatedAt ¶
func (doc *DemoOrderCreate) SetCreatedAt(t time.Time) *DemoOrderCreate
SetCreatedAt sets the "created_at" field.
func (*DemoOrderCreate) SetDeletedAt ¶
func (doc *DemoOrderCreate) SetDeletedAt(t time.Time) *DemoOrderCreate
SetDeletedAt sets the "deleted_at" field.
func (*DemoOrderCreate) SetID ¶
func (doc *DemoOrderCreate) SetID(u uint64) *DemoOrderCreate
SetID sets the "id" field.
func (*DemoOrderCreate) SetNillableCreatedAt ¶
func (doc *DemoOrderCreate) SetNillableCreatedAt(t *time.Time) *DemoOrderCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DemoOrderCreate) SetNillableDeletedAt ¶
func (doc *DemoOrderCreate) SetNillableDeletedAt(t *time.Time) *DemoOrderCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*DemoOrderCreate) SetNillablePayChannelCode ¶
func (doc *DemoOrderCreate) SetNillablePayChannelCode(s *string) *DemoOrderCreate
SetNillablePayChannelCode sets the "pay_channel_code" field if the given value is not nil.
func (*DemoOrderCreate) SetNillablePayOrderId ¶
func (doc *DemoOrderCreate) SetNillablePayOrderId(u *uint64) *DemoOrderCreate
SetNillablePayOrderId sets the "pay_orderId" field if the given value is not nil.
func (*DemoOrderCreate) SetNillablePayRefundID ¶
func (doc *DemoOrderCreate) SetNillablePayRefundID(u *uint64) *DemoOrderCreate
SetNillablePayRefundID sets the "pay_refund_id" field if the given value is not nil.
func (*DemoOrderCreate) SetNillablePayTime ¶
func (doc *DemoOrderCreate) SetNillablePayTime(t *time.Time) *DemoOrderCreate
SetNillablePayTime sets the "pay_time" field if the given value is not nil.
func (*DemoOrderCreate) SetNillableRefundPrice ¶
func (doc *DemoOrderCreate) SetNillableRefundPrice(i *int32) *DemoOrderCreate
SetNillableRefundPrice sets the "refund_price" field if the given value is not nil.
func (*DemoOrderCreate) SetNillableRefundTime ¶
func (doc *DemoOrderCreate) SetNillableRefundTime(t *time.Time) *DemoOrderCreate
SetNillableRefundTime sets the "refund_time" field if the given value is not nil.
func (*DemoOrderCreate) SetNillableUpdatedAt ¶
func (doc *DemoOrderCreate) SetNillableUpdatedAt(t *time.Time) *DemoOrderCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DemoOrderCreate) SetNotNilDeletedAt ¶
func (do *DemoOrderCreate) SetNotNilDeletedAt(value *time.Time) *DemoOrderCreate
set field if value's pointer is not nil.
func (*DemoOrderCreate) SetNotNilPayChannelCode ¶
func (do *DemoOrderCreate) SetNotNilPayChannelCode(value *string) *DemoOrderCreate
set field if value's pointer is not nil.
func (*DemoOrderCreate) SetNotNilPayOrderId ¶
func (do *DemoOrderCreate) SetNotNilPayOrderId(value *uint64) *DemoOrderCreate
set field if value's pointer is not nil.
func (*DemoOrderCreate) SetNotNilPayRefundID ¶
func (do *DemoOrderCreate) SetNotNilPayRefundID(value *uint64) *DemoOrderCreate
set field if value's pointer is not nil.
func (*DemoOrderCreate) SetNotNilPayStatus ¶
func (do *DemoOrderCreate) SetNotNilPayStatus(value *bool) *DemoOrderCreate
set field if value's pointer is not nil.
func (*DemoOrderCreate) SetNotNilPayTime ¶
func (do *DemoOrderCreate) SetNotNilPayTime(value *time.Time) *DemoOrderCreate
set field if value's pointer is not nil.
func (*DemoOrderCreate) SetNotNilPrice ¶
func (do *DemoOrderCreate) SetNotNilPrice(value *int32) *DemoOrderCreate
set field if value's pointer is not nil.
func (*DemoOrderCreate) SetNotNilRefundPrice ¶
func (do *DemoOrderCreate) SetNotNilRefundPrice(value *int32) *DemoOrderCreate
set field if value's pointer is not nil.
func (*DemoOrderCreate) SetNotNilRefundTime ¶
func (do *DemoOrderCreate) SetNotNilRefundTime(value *time.Time) *DemoOrderCreate
set field if value's pointer is not nil.
func (*DemoOrderCreate) SetNotNilSpuID ¶
func (do *DemoOrderCreate) SetNotNilSpuID(value *uint64) *DemoOrderCreate
set field if value's pointer is not nil.
func (*DemoOrderCreate) SetNotNilSpuName ¶
func (do *DemoOrderCreate) SetNotNilSpuName(value *string) *DemoOrderCreate
set field if value's pointer is not nil.
func (*DemoOrderCreate) SetNotNilUpdatedAt ¶
func (do *DemoOrderCreate) SetNotNilUpdatedAt(value *time.Time) *DemoOrderCreate
set field if value's pointer is not nil.
func (*DemoOrderCreate) SetNotNilUserID ¶
func (do *DemoOrderCreate) SetNotNilUserID(value *string) *DemoOrderCreate
set field if value's pointer is not nil.
func (*DemoOrderCreate) SetPayChannelCode ¶
func (doc *DemoOrderCreate) SetPayChannelCode(s string) *DemoOrderCreate
SetPayChannelCode sets the "pay_channel_code" field.
func (*DemoOrderCreate) SetPayOrderId ¶
func (doc *DemoOrderCreate) SetPayOrderId(u uint64) *DemoOrderCreate
SetPayOrderId sets the "pay_orderId" field.
func (*DemoOrderCreate) SetPayRefundID ¶
func (doc *DemoOrderCreate) SetPayRefundID(u uint64) *DemoOrderCreate
SetPayRefundID sets the "pay_refund_id" field.
func (*DemoOrderCreate) SetPayStatus ¶
func (doc *DemoOrderCreate) SetPayStatus(b bool) *DemoOrderCreate
SetPayStatus sets the "pay_status" field.
func (*DemoOrderCreate) SetPayTime ¶
func (doc *DemoOrderCreate) SetPayTime(t time.Time) *DemoOrderCreate
SetPayTime sets the "pay_time" field.
func (*DemoOrderCreate) SetPrice ¶
func (doc *DemoOrderCreate) SetPrice(i int32) *DemoOrderCreate
SetPrice sets the "price" field.
func (*DemoOrderCreate) SetRefundPrice ¶
func (doc *DemoOrderCreate) SetRefundPrice(i int32) *DemoOrderCreate
SetRefundPrice sets the "refund_price" field.
func (*DemoOrderCreate) SetRefundTime ¶
func (doc *DemoOrderCreate) SetRefundTime(t time.Time) *DemoOrderCreate
SetRefundTime sets the "refund_time" field.
func (*DemoOrderCreate) SetSpuID ¶
func (doc *DemoOrderCreate) SetSpuID(u uint64) *DemoOrderCreate
SetSpuID sets the "spu_id" field.
func (*DemoOrderCreate) SetSpuName ¶
func (doc *DemoOrderCreate) SetSpuName(s string) *DemoOrderCreate
SetSpuName sets the "spu_name" field.
func (*DemoOrderCreate) SetUpdatedAt ¶
func (doc *DemoOrderCreate) SetUpdatedAt(t time.Time) *DemoOrderCreate
SetUpdatedAt sets the "updated_at" field.
func (*DemoOrderCreate) SetUserID ¶
func (doc *DemoOrderCreate) SetUserID(s string) *DemoOrderCreate
SetUserID sets the "user_id" field.
type DemoOrderCreateBulk ¶
type DemoOrderCreateBulk struct {
// contains filtered or unexported fields
}
DemoOrderCreateBulk is the builder for creating many DemoOrder entities in bulk.
func (*DemoOrderCreateBulk) Exec ¶
func (docb *DemoOrderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DemoOrderCreateBulk) ExecX ¶
func (docb *DemoOrderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DemoOrderDelete ¶
type DemoOrderDelete struct {
// contains filtered or unexported fields
}
DemoOrderDelete is the builder for deleting a DemoOrder entity.
func (*DemoOrderDelete) Exec ¶
func (dod *DemoOrderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DemoOrderDelete) ExecX ¶
func (dod *DemoOrderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DemoOrderDelete) Where ¶
func (dod *DemoOrderDelete) Where(ps ...predicate.DemoOrder) *DemoOrderDelete
Where appends a list predicates to the DemoOrderDelete builder.
type DemoOrderDeleteOne ¶
type DemoOrderDeleteOne struct {
// contains filtered or unexported fields
}
DemoOrderDeleteOne is the builder for deleting a single DemoOrder entity.
func (*DemoOrderDeleteOne) Exec ¶
func (dodo *DemoOrderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DemoOrderDeleteOne) ExecX ¶
func (dodo *DemoOrderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DemoOrderDeleteOne) Where ¶
func (dodo *DemoOrderDeleteOne) Where(ps ...predicate.DemoOrder) *DemoOrderDeleteOne
Where appends a list predicates to the DemoOrderDelete builder.
type DemoOrderGroupBy ¶
type DemoOrderGroupBy struct {
// contains filtered or unexported fields
}
DemoOrderGroupBy is the group-by builder for DemoOrder entities.
func (*DemoOrderGroupBy) Aggregate ¶
func (dogb *DemoOrderGroupBy) Aggregate(fns ...AggregateFunc) *DemoOrderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DemoOrderGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DemoOrderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DemoOrderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DemoOrderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DemoOrderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DemoOrderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DemoOrderGroupBy) Scan ¶
func (dogb *DemoOrderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DemoOrderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DemoOrderMutation ¶
type DemoOrderMutation struct {
// contains filtered or unexported fields
}
DemoOrderMutation represents an operation that mutates the DemoOrder nodes in the graph.
func (*DemoOrderMutation) AddField ¶
func (m *DemoOrderMutation) 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 (*DemoOrderMutation) AddPayOrderId ¶
func (m *DemoOrderMutation) AddPayOrderId(u int64)
AddPayOrderId adds u to the "pay_orderId" field.
func (*DemoOrderMutation) AddPayRefundID ¶
func (m *DemoOrderMutation) AddPayRefundID(u int64)
AddPayRefundID adds u to the "pay_refund_id" field.
func (*DemoOrderMutation) AddPrice ¶
func (m *DemoOrderMutation) AddPrice(i int32)
AddPrice adds i to the "price" field.
func (*DemoOrderMutation) AddRefundPrice ¶
func (m *DemoOrderMutation) AddRefundPrice(i int32)
AddRefundPrice adds i to the "refund_price" field.
func (*DemoOrderMutation) AddSpuID ¶
func (m *DemoOrderMutation) AddSpuID(u int64)
AddSpuID adds u to the "spu_id" field.
func (*DemoOrderMutation) AddedEdges ¶
func (m *DemoOrderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DemoOrderMutation) AddedField ¶
func (m *DemoOrderMutation) 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 (*DemoOrderMutation) AddedFields ¶
func (m *DemoOrderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DemoOrderMutation) AddedIDs ¶
func (m *DemoOrderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DemoOrderMutation) AddedPayOrderId ¶
func (m *DemoOrderMutation) AddedPayOrderId() (r int64, exists bool)
AddedPayOrderId returns the value that was added to the "pay_orderId" field in this mutation.
func (*DemoOrderMutation) AddedPayRefundID ¶
func (m *DemoOrderMutation) AddedPayRefundID() (r int64, exists bool)
AddedPayRefundID returns the value that was added to the "pay_refund_id" field in this mutation.
func (*DemoOrderMutation) AddedPrice ¶
func (m *DemoOrderMutation) AddedPrice() (r int32, exists bool)
AddedPrice returns the value that was added to the "price" field in this mutation.
func (*DemoOrderMutation) AddedRefundPrice ¶
func (m *DemoOrderMutation) AddedRefundPrice() (r int32, exists bool)
AddedRefundPrice returns the value that was added to the "refund_price" field in this mutation.
func (*DemoOrderMutation) AddedSpuID ¶
func (m *DemoOrderMutation) AddedSpuID() (r int64, exists bool)
AddedSpuID returns the value that was added to the "spu_id" field in this mutation.
func (*DemoOrderMutation) ClearDeletedAt ¶
func (m *DemoOrderMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DemoOrderMutation) ClearEdge ¶
func (m *DemoOrderMutation) 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 (*DemoOrderMutation) ClearField ¶
func (m *DemoOrderMutation) 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 (*DemoOrderMutation) ClearPayChannelCode ¶
func (m *DemoOrderMutation) ClearPayChannelCode()
ClearPayChannelCode clears the value of the "pay_channel_code" field.
func (*DemoOrderMutation) ClearPayOrderId ¶
func (m *DemoOrderMutation) ClearPayOrderId()
ClearPayOrderId clears the value of the "pay_orderId" field.
func (*DemoOrderMutation) ClearPayRefundID ¶
func (m *DemoOrderMutation) ClearPayRefundID()
ClearPayRefundID clears the value of the "pay_refund_id" field.
func (*DemoOrderMutation) ClearPayTime ¶
func (m *DemoOrderMutation) ClearPayTime()
ClearPayTime clears the value of the "pay_time" field.
func (*DemoOrderMutation) ClearRefundPrice ¶
func (m *DemoOrderMutation) ClearRefundPrice()
ClearRefundPrice clears the value of the "refund_price" field.
func (*DemoOrderMutation) ClearRefundTime ¶
func (m *DemoOrderMutation) ClearRefundTime()
ClearRefundTime clears the value of the "refund_time" field.
func (*DemoOrderMutation) ClearedEdges ¶
func (m *DemoOrderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DemoOrderMutation) ClearedFields ¶
func (m *DemoOrderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DemoOrderMutation) Client ¶
func (m DemoOrderMutation) 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 (*DemoOrderMutation) CreatedAt ¶
func (m *DemoOrderMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DemoOrderMutation) DeletedAt ¶
func (m *DemoOrderMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*DemoOrderMutation) DeletedAtCleared ¶
func (m *DemoOrderMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*DemoOrderMutation) EdgeCleared ¶
func (m *DemoOrderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DemoOrderMutation) Field ¶
func (m *DemoOrderMutation) 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 (*DemoOrderMutation) FieldCleared ¶
func (m *DemoOrderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DemoOrderMutation) Fields ¶
func (m *DemoOrderMutation) 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 (*DemoOrderMutation) ID ¶
func (m *DemoOrderMutation) 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 (*DemoOrderMutation) IDs ¶
func (m *DemoOrderMutation) 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 (*DemoOrderMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) 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 (*DemoOrderMutation) OldPayChannelCode ¶
func (m *DemoOrderMutation) OldPayChannelCode(ctx context.Context) (v string, err error)
OldPayChannelCode returns the old "pay_channel_code" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) OldPayOrderId ¶
func (m *DemoOrderMutation) OldPayOrderId(ctx context.Context) (v uint64, err error)
OldPayOrderId returns the old "pay_orderId" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) OldPayRefundID ¶
func (m *DemoOrderMutation) OldPayRefundID(ctx context.Context) (v uint64, err error)
OldPayRefundID returns the old "pay_refund_id" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) OldPayStatus ¶
func (m *DemoOrderMutation) OldPayStatus(ctx context.Context) (v bool, err error)
OldPayStatus returns the old "pay_status" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) OldPayTime ¶
OldPayTime returns the old "pay_time" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) OldPrice ¶
func (m *DemoOrderMutation) OldPrice(ctx context.Context) (v int32, err error)
OldPrice returns the old "price" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) OldRefundPrice ¶
func (m *DemoOrderMutation) OldRefundPrice(ctx context.Context) (v int32, err error)
OldRefundPrice returns the old "refund_price" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) OldRefundTime ¶
OldRefundTime returns the old "refund_time" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) OldSpuID ¶
func (m *DemoOrderMutation) OldSpuID(ctx context.Context) (v uint64, err error)
OldSpuID returns the old "spu_id" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) OldSpuName ¶
func (m *DemoOrderMutation) OldSpuName(ctx context.Context) (v string, err error)
OldSpuName returns the old "spu_name" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) OldUserID ¶
func (m *DemoOrderMutation) OldUserID(ctx context.Context) (v string, err error)
OldUserID returns the old "user_id" field's value of the DemoOrder entity. If the DemoOrder object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DemoOrderMutation) PayChannelCode ¶
func (m *DemoOrderMutation) PayChannelCode() (r string, exists bool)
PayChannelCode returns the value of the "pay_channel_code" field in the mutation.
func (*DemoOrderMutation) PayChannelCodeCleared ¶
func (m *DemoOrderMutation) PayChannelCodeCleared() bool
PayChannelCodeCleared returns if the "pay_channel_code" field was cleared in this mutation.
func (*DemoOrderMutation) PayOrderId ¶
func (m *DemoOrderMutation) PayOrderId() (r uint64, exists bool)
PayOrderId returns the value of the "pay_orderId" field in the mutation.
func (*DemoOrderMutation) PayOrderIdCleared ¶
func (m *DemoOrderMutation) PayOrderIdCleared() bool
PayOrderIdCleared returns if the "pay_orderId" field was cleared in this mutation.
func (*DemoOrderMutation) PayRefundID ¶
func (m *DemoOrderMutation) PayRefundID() (r uint64, exists bool)
PayRefundID returns the value of the "pay_refund_id" field in the mutation.
func (*DemoOrderMutation) PayRefundIDCleared ¶
func (m *DemoOrderMutation) PayRefundIDCleared() bool
PayRefundIDCleared returns if the "pay_refund_id" field was cleared in this mutation.
func (*DemoOrderMutation) PayStatus ¶
func (m *DemoOrderMutation) PayStatus() (r bool, exists bool)
PayStatus returns the value of the "pay_status" field in the mutation.
func (*DemoOrderMutation) PayTime ¶
func (m *DemoOrderMutation) PayTime() (r time.Time, exists bool)
PayTime returns the value of the "pay_time" field in the mutation.
func (*DemoOrderMutation) PayTimeCleared ¶
func (m *DemoOrderMutation) PayTimeCleared() bool
PayTimeCleared returns if the "pay_time" field was cleared in this mutation.
func (*DemoOrderMutation) Price ¶
func (m *DemoOrderMutation) Price() (r int32, exists bool)
Price returns the value of the "price" field in the mutation.
func (*DemoOrderMutation) RefundPrice ¶
func (m *DemoOrderMutation) RefundPrice() (r int32, exists bool)
RefundPrice returns the value of the "refund_price" field in the mutation.
func (*DemoOrderMutation) RefundPriceCleared ¶
func (m *DemoOrderMutation) RefundPriceCleared() bool
RefundPriceCleared returns if the "refund_price" field was cleared in this mutation.
func (*DemoOrderMutation) RefundTime ¶
func (m *DemoOrderMutation) RefundTime() (r time.Time, exists bool)
RefundTime returns the value of the "refund_time" field in the mutation.
func (*DemoOrderMutation) RefundTimeCleared ¶
func (m *DemoOrderMutation) RefundTimeCleared() bool
RefundTimeCleared returns if the "refund_time" field was cleared in this mutation.
func (*DemoOrderMutation) RemovedEdges ¶
func (m *DemoOrderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DemoOrderMutation) RemovedIDs ¶
func (m *DemoOrderMutation) 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 (*DemoOrderMutation) ResetCreatedAt ¶
func (m *DemoOrderMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DemoOrderMutation) ResetDeletedAt ¶
func (m *DemoOrderMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*DemoOrderMutation) ResetEdge ¶
func (m *DemoOrderMutation) 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 (*DemoOrderMutation) ResetField ¶
func (m *DemoOrderMutation) 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 (*DemoOrderMutation) ResetPayChannelCode ¶
func (m *DemoOrderMutation) ResetPayChannelCode()
ResetPayChannelCode resets all changes to the "pay_channel_code" field.
func (*DemoOrderMutation) ResetPayOrderId ¶
func (m *DemoOrderMutation) ResetPayOrderId()
ResetPayOrderId resets all changes to the "pay_orderId" field.
func (*DemoOrderMutation) ResetPayRefundID ¶
func (m *DemoOrderMutation) ResetPayRefundID()
ResetPayRefundID resets all changes to the "pay_refund_id" field.
func (*DemoOrderMutation) ResetPayStatus ¶
func (m *DemoOrderMutation) ResetPayStatus()
ResetPayStatus resets all changes to the "pay_status" field.
func (*DemoOrderMutation) ResetPayTime ¶
func (m *DemoOrderMutation) ResetPayTime()
ResetPayTime resets all changes to the "pay_time" field.
func (*DemoOrderMutation) ResetPrice ¶
func (m *DemoOrderMutation) ResetPrice()
ResetPrice resets all changes to the "price" field.
func (*DemoOrderMutation) ResetRefundPrice ¶
func (m *DemoOrderMutation) ResetRefundPrice()
ResetRefundPrice resets all changes to the "refund_price" field.
func (*DemoOrderMutation) ResetRefundTime ¶
func (m *DemoOrderMutation) ResetRefundTime()
ResetRefundTime resets all changes to the "refund_time" field.
func (*DemoOrderMutation) ResetSpuID ¶
func (m *DemoOrderMutation) ResetSpuID()
ResetSpuID resets all changes to the "spu_id" field.
func (*DemoOrderMutation) ResetSpuName ¶
func (m *DemoOrderMutation) ResetSpuName()
ResetSpuName resets all changes to the "spu_name" field.
func (*DemoOrderMutation) ResetUpdatedAt ¶
func (m *DemoOrderMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DemoOrderMutation) ResetUserID ¶
func (m *DemoOrderMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*DemoOrderMutation) SetCreatedAt ¶
func (m *DemoOrderMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DemoOrderMutation) SetDeletedAt ¶
func (m *DemoOrderMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*DemoOrderMutation) SetField ¶
func (m *DemoOrderMutation) 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 (*DemoOrderMutation) SetID ¶
func (m *DemoOrderMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of DemoOrder entities.
func (*DemoOrderMutation) SetOp ¶
func (m *DemoOrderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DemoOrderMutation) SetPayChannelCode ¶
func (m *DemoOrderMutation) SetPayChannelCode(s string)
SetPayChannelCode sets the "pay_channel_code" field.
func (*DemoOrderMutation) SetPayOrderId ¶
func (m *DemoOrderMutation) SetPayOrderId(u uint64)
SetPayOrderId sets the "pay_orderId" field.
func (*DemoOrderMutation) SetPayRefundID ¶
func (m *DemoOrderMutation) SetPayRefundID(u uint64)
SetPayRefundID sets the "pay_refund_id" field.
func (*DemoOrderMutation) SetPayStatus ¶
func (m *DemoOrderMutation) SetPayStatus(b bool)
SetPayStatus sets the "pay_status" field.
func (*DemoOrderMutation) SetPayTime ¶
func (m *DemoOrderMutation) SetPayTime(t time.Time)
SetPayTime sets the "pay_time" field.
func (*DemoOrderMutation) SetPrice ¶
func (m *DemoOrderMutation) SetPrice(i int32)
SetPrice sets the "price" field.
func (*DemoOrderMutation) SetRefundPrice ¶
func (m *DemoOrderMutation) SetRefundPrice(i int32)
SetRefundPrice sets the "refund_price" field.
func (*DemoOrderMutation) SetRefundTime ¶
func (m *DemoOrderMutation) SetRefundTime(t time.Time)
SetRefundTime sets the "refund_time" field.
func (*DemoOrderMutation) SetSpuID ¶
func (m *DemoOrderMutation) SetSpuID(u uint64)
SetSpuID sets the "spu_id" field.
func (*DemoOrderMutation) SetSpuName ¶
func (m *DemoOrderMutation) SetSpuName(s string)
SetSpuName sets the "spu_name" field.
func (*DemoOrderMutation) SetUpdatedAt ¶
func (m *DemoOrderMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*DemoOrderMutation) SetUserID ¶
func (m *DemoOrderMutation) SetUserID(s string)
SetUserID sets the "user_id" field.
func (*DemoOrderMutation) SpuID ¶
func (m *DemoOrderMutation) SpuID() (r uint64, exists bool)
SpuID returns the value of the "spu_id" field in the mutation.
func (*DemoOrderMutation) SpuName ¶
func (m *DemoOrderMutation) SpuName() (r string, exists bool)
SpuName returns the value of the "spu_name" field in the mutation.
func (DemoOrderMutation) Tx ¶
func (m DemoOrderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DemoOrderMutation) Type ¶
func (m *DemoOrderMutation) Type() string
Type returns the node type of this mutation (DemoOrder).
func (*DemoOrderMutation) UpdatedAt ¶
func (m *DemoOrderMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DemoOrderMutation) UserID ¶
func (m *DemoOrderMutation) UserID() (r string, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*DemoOrderMutation) Where ¶
func (m *DemoOrderMutation) Where(ps ...predicate.DemoOrder)
Where appends a list predicates to the DemoOrderMutation builder.
func (*DemoOrderMutation) WhereP ¶
func (m *DemoOrderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DemoOrderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DemoOrderPageList ¶
type DemoOrderPageList struct { List []*DemoOrder `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
DemoOrderPageList is DemoOrder PageList result.
type DemoOrderPager ¶
type DemoOrderPager struct { Order demoorder.OrderOption Filter func(*DemoOrderQuery) (*DemoOrderQuery, error) }
func (*DemoOrderPager) ApplyFilter ¶
func (p *DemoOrderPager) ApplyFilter(query *DemoOrderQuery) (*DemoOrderQuery, error)
type DemoOrderPaginateOption ¶
type DemoOrderPaginateOption func(*DemoOrderPager)
DemoOrderPaginateOption enables pagination customization.
type DemoOrderQuery ¶
type DemoOrderQuery struct {
// contains filtered or unexported fields
}
DemoOrderQuery is the builder for querying DemoOrder entities.
func (*DemoOrderQuery) Aggregate ¶
func (doq *DemoOrderQuery) Aggregate(fns ...AggregateFunc) *DemoOrderSelect
Aggregate returns a DemoOrderSelect configured with the given aggregations.
func (*DemoOrderQuery) All ¶
func (doq *DemoOrderQuery) All(ctx context.Context) ([]*DemoOrder, error)
All executes the query and returns a list of DemoOrders.
func (*DemoOrderQuery) AllX ¶
func (doq *DemoOrderQuery) AllX(ctx context.Context) []*DemoOrder
AllX is like All, but panics if an error occurs.
func (*DemoOrderQuery) Clone ¶
func (doq *DemoOrderQuery) Clone() *DemoOrderQuery
Clone returns a duplicate of the DemoOrderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DemoOrderQuery) Count ¶
func (doq *DemoOrderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DemoOrderQuery) CountX ¶
func (doq *DemoOrderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DemoOrderQuery) Exist ¶
func (doq *DemoOrderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DemoOrderQuery) ExistX ¶
func (doq *DemoOrderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DemoOrderQuery) First ¶
func (doq *DemoOrderQuery) First(ctx context.Context) (*DemoOrder, error)
First returns the first DemoOrder entity from the query. Returns a *NotFoundError when no DemoOrder was found.
func (*DemoOrderQuery) FirstID ¶
func (doq *DemoOrderQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first DemoOrder ID from the query. Returns a *NotFoundError when no DemoOrder ID was found.
func (*DemoOrderQuery) FirstIDX ¶
func (doq *DemoOrderQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*DemoOrderQuery) FirstX ¶
func (doq *DemoOrderQuery) FirstX(ctx context.Context) *DemoOrder
FirstX is like First, but panics if an error occurs.
func (*DemoOrderQuery) GroupBy ¶
func (doq *DemoOrderQuery) GroupBy(field string, fields ...string) *DemoOrderGroupBy
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.DemoOrder.Query(). GroupBy(demoorder.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DemoOrderQuery) IDs ¶
func (doq *DemoOrderQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of DemoOrder IDs.
func (*DemoOrderQuery) IDsX ¶
func (doq *DemoOrderQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*DemoOrderQuery) Limit ¶
func (doq *DemoOrderQuery) Limit(limit int) *DemoOrderQuery
Limit the number of records to be returned by this query.
func (*DemoOrderQuery) Offset ¶
func (doq *DemoOrderQuery) Offset(offset int) *DemoOrderQuery
Offset to start from.
func (*DemoOrderQuery) Only ¶
func (doq *DemoOrderQuery) Only(ctx context.Context) (*DemoOrder, error)
Only returns a single DemoOrder entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DemoOrder entity is found. Returns a *NotFoundError when no DemoOrder entities are found.
func (*DemoOrderQuery) OnlyID ¶
func (doq *DemoOrderQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only DemoOrder ID in the query. Returns a *NotSingularError when more than one DemoOrder ID is found. Returns a *NotFoundError when no entities are found.
func (*DemoOrderQuery) OnlyIDX ¶
func (doq *DemoOrderQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DemoOrderQuery) OnlyX ¶
func (doq *DemoOrderQuery) OnlyX(ctx context.Context) *DemoOrder
OnlyX is like Only, but panics if an error occurs.
func (*DemoOrderQuery) Order ¶
func (doq *DemoOrderQuery) Order(o ...demoorder.OrderOption) *DemoOrderQuery
Order specifies how the records should be ordered.
func (*DemoOrderQuery) Page ¶
func (do *DemoOrderQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...DemoOrderPaginateOption, ) (*DemoOrderPageList, error)
func (*DemoOrderQuery) Select ¶
func (doq *DemoOrderQuery) Select(fields ...string) *DemoOrderSelect
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.DemoOrder.Query(). Select(demoorder.FieldCreatedAt). Scan(ctx, &v)
func (*DemoOrderQuery) Unique ¶
func (doq *DemoOrderQuery) Unique(unique bool) *DemoOrderQuery
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 (*DemoOrderQuery) Where ¶
func (doq *DemoOrderQuery) Where(ps ...predicate.DemoOrder) *DemoOrderQuery
Where adds a new predicate for the DemoOrderQuery builder.
type DemoOrderSelect ¶
type DemoOrderSelect struct { *DemoOrderQuery // contains filtered or unexported fields }
DemoOrderSelect is the builder for selecting fields of DemoOrder entities.
func (*DemoOrderSelect) Aggregate ¶
func (dos *DemoOrderSelect) Aggregate(fns ...AggregateFunc) *DemoOrderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DemoOrderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DemoOrderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DemoOrderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DemoOrderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DemoOrderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DemoOrderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DemoOrderSelect) Scan ¶
func (dos *DemoOrderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DemoOrderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DemoOrderUpdate ¶
type DemoOrderUpdate struct {
// contains filtered or unexported fields
}
DemoOrderUpdate is the builder for updating DemoOrder entities.
func (*DemoOrderUpdate) AddPayOrderId ¶
func (dou *DemoOrderUpdate) AddPayOrderId(u int64) *DemoOrderUpdate
AddPayOrderId adds u to the "pay_orderId" field.
func (*DemoOrderUpdate) AddPayRefundID ¶
func (dou *DemoOrderUpdate) AddPayRefundID(u int64) *DemoOrderUpdate
AddPayRefundID adds u to the "pay_refund_id" field.
func (*DemoOrderUpdate) AddPrice ¶
func (dou *DemoOrderUpdate) AddPrice(i int32) *DemoOrderUpdate
AddPrice adds i to the "price" field.
func (*DemoOrderUpdate) AddRefundPrice ¶
func (dou *DemoOrderUpdate) AddRefundPrice(i int32) *DemoOrderUpdate
AddRefundPrice adds i to the "refund_price" field.
func (*DemoOrderUpdate) AddSpuID ¶
func (dou *DemoOrderUpdate) AddSpuID(u int64) *DemoOrderUpdate
AddSpuID adds u to the "spu_id" field.
func (*DemoOrderUpdate) ClearDeletedAt ¶
func (dou *DemoOrderUpdate) ClearDeletedAt() *DemoOrderUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DemoOrderUpdate) ClearPayChannelCode ¶
func (dou *DemoOrderUpdate) ClearPayChannelCode() *DemoOrderUpdate
ClearPayChannelCode clears the value of the "pay_channel_code" field.
func (*DemoOrderUpdate) ClearPayOrderId ¶
func (dou *DemoOrderUpdate) ClearPayOrderId() *DemoOrderUpdate
ClearPayOrderId clears the value of the "pay_orderId" field.
func (*DemoOrderUpdate) ClearPayRefundID ¶
func (dou *DemoOrderUpdate) ClearPayRefundID() *DemoOrderUpdate
ClearPayRefundID clears the value of the "pay_refund_id" field.
func (*DemoOrderUpdate) ClearPayTime ¶
func (dou *DemoOrderUpdate) ClearPayTime() *DemoOrderUpdate
ClearPayTime clears the value of the "pay_time" field.
func (*DemoOrderUpdate) ClearRefundPrice ¶
func (dou *DemoOrderUpdate) ClearRefundPrice() *DemoOrderUpdate
ClearRefundPrice clears the value of the "refund_price" field.
func (*DemoOrderUpdate) ClearRefundTime ¶
func (dou *DemoOrderUpdate) ClearRefundTime() *DemoOrderUpdate
ClearRefundTime clears the value of the "refund_time" field.
func (*DemoOrderUpdate) Exec ¶
func (dou *DemoOrderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DemoOrderUpdate) ExecX ¶
func (dou *DemoOrderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DemoOrderUpdate) Mutation ¶
func (dou *DemoOrderUpdate) Mutation() *DemoOrderMutation
Mutation returns the DemoOrderMutation object of the builder.
func (*DemoOrderUpdate) Save ¶
func (dou *DemoOrderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DemoOrderUpdate) SaveX ¶
func (dou *DemoOrderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DemoOrderUpdate) SetDeletedAt ¶
func (dou *DemoOrderUpdate) SetDeletedAt(t time.Time) *DemoOrderUpdate
SetDeletedAt sets the "deleted_at" field.
func (*DemoOrderUpdate) SetNillableDeletedAt ¶
func (dou *DemoOrderUpdate) SetNillableDeletedAt(t *time.Time) *DemoOrderUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*DemoOrderUpdate) SetNillablePayChannelCode ¶
func (dou *DemoOrderUpdate) SetNillablePayChannelCode(s *string) *DemoOrderUpdate
SetNillablePayChannelCode sets the "pay_channel_code" field if the given value is not nil.
func (*DemoOrderUpdate) SetNillablePayOrderId ¶
func (dou *DemoOrderUpdate) SetNillablePayOrderId(u *uint64) *DemoOrderUpdate
SetNillablePayOrderId sets the "pay_orderId" field if the given value is not nil.
func (*DemoOrderUpdate) SetNillablePayRefundID ¶
func (dou *DemoOrderUpdate) SetNillablePayRefundID(u *uint64) *DemoOrderUpdate
SetNillablePayRefundID sets the "pay_refund_id" field if the given value is not nil.
func (*DemoOrderUpdate) SetNillablePayStatus ¶ added in v1.1.0
func (dou *DemoOrderUpdate) SetNillablePayStatus(b *bool) *DemoOrderUpdate
SetNillablePayStatus sets the "pay_status" field if the given value is not nil.
func (*DemoOrderUpdate) SetNillablePayTime ¶
func (dou *DemoOrderUpdate) SetNillablePayTime(t *time.Time) *DemoOrderUpdate
SetNillablePayTime sets the "pay_time" field if the given value is not nil.
func (*DemoOrderUpdate) SetNillablePrice ¶ added in v1.1.0
func (dou *DemoOrderUpdate) SetNillablePrice(i *int32) *DemoOrderUpdate
SetNillablePrice sets the "price" field if the given value is not nil.
func (*DemoOrderUpdate) SetNillableRefundPrice ¶
func (dou *DemoOrderUpdate) SetNillableRefundPrice(i *int32) *DemoOrderUpdate
SetNillableRefundPrice sets the "refund_price" field if the given value is not nil.
func (*DemoOrderUpdate) SetNillableRefundTime ¶
func (dou *DemoOrderUpdate) SetNillableRefundTime(t *time.Time) *DemoOrderUpdate
SetNillableRefundTime sets the "refund_time" field if the given value is not nil.
func (*DemoOrderUpdate) SetNillableSpuID ¶ added in v1.1.0
func (dou *DemoOrderUpdate) SetNillableSpuID(u *uint64) *DemoOrderUpdate
SetNillableSpuID sets the "spu_id" field if the given value is not nil.
func (*DemoOrderUpdate) SetNillableSpuName ¶ added in v1.1.0
func (dou *DemoOrderUpdate) SetNillableSpuName(s *string) *DemoOrderUpdate
SetNillableSpuName sets the "spu_name" field if the given value is not nil.
func (*DemoOrderUpdate) SetNillableUserID ¶ added in v1.1.0
func (dou *DemoOrderUpdate) SetNillableUserID(s *string) *DemoOrderUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*DemoOrderUpdate) SetNotNilDeletedAt ¶
func (do *DemoOrderUpdate) SetNotNilDeletedAt(value *time.Time) *DemoOrderUpdate
set field if value's pointer is not nil.
func (*DemoOrderUpdate) SetNotNilPayChannelCode ¶
func (do *DemoOrderUpdate) SetNotNilPayChannelCode(value *string) *DemoOrderUpdate
set field if value's pointer is not nil.
func (*DemoOrderUpdate) SetNotNilPayOrderId ¶
func (do *DemoOrderUpdate) SetNotNilPayOrderId(value *uint64) *DemoOrderUpdate
set field if value's pointer is not nil.
func (*DemoOrderUpdate) SetNotNilPayRefundID ¶
func (do *DemoOrderUpdate) SetNotNilPayRefundID(value *uint64) *DemoOrderUpdate
set field if value's pointer is not nil.
func (*DemoOrderUpdate) SetNotNilPayStatus ¶
func (do *DemoOrderUpdate) SetNotNilPayStatus(value *bool) *DemoOrderUpdate
set field if value's pointer is not nil.
func (*DemoOrderUpdate) SetNotNilPayTime ¶
func (do *DemoOrderUpdate) SetNotNilPayTime(value *time.Time) *DemoOrderUpdate
set field if value's pointer is not nil.
func (*DemoOrderUpdate) SetNotNilPrice ¶
func (do *DemoOrderUpdate) SetNotNilPrice(value *int32) *DemoOrderUpdate
set field if value's pointer is not nil.
func (*DemoOrderUpdate) SetNotNilRefundPrice ¶
func (do *DemoOrderUpdate) SetNotNilRefundPrice(value *int32) *DemoOrderUpdate
set field if value's pointer is not nil.
func (*DemoOrderUpdate) SetNotNilRefundTime ¶
func (do *DemoOrderUpdate) SetNotNilRefundTime(value *time.Time) *DemoOrderUpdate
set field if value's pointer is not nil.
func (*DemoOrderUpdate) SetNotNilSpuID ¶
func (do *DemoOrderUpdate) SetNotNilSpuID(value *uint64) *DemoOrderUpdate
set field if value's pointer is not nil.
func (*DemoOrderUpdate) SetNotNilSpuName ¶
func (do *DemoOrderUpdate) SetNotNilSpuName(value *string) *DemoOrderUpdate
set field if value's pointer is not nil.
func (*DemoOrderUpdate) SetNotNilUpdatedAt ¶
func (do *DemoOrderUpdate) SetNotNilUpdatedAt(value *time.Time) *DemoOrderUpdate
set field if value's pointer is not nil.
func (*DemoOrderUpdate) SetNotNilUserID ¶
func (do *DemoOrderUpdate) SetNotNilUserID(value *string) *DemoOrderUpdate
set field if value's pointer is not nil.
func (*DemoOrderUpdate) SetPayChannelCode ¶
func (dou *DemoOrderUpdate) SetPayChannelCode(s string) *DemoOrderUpdate
SetPayChannelCode sets the "pay_channel_code" field.
func (*DemoOrderUpdate) SetPayOrderId ¶
func (dou *DemoOrderUpdate) SetPayOrderId(u uint64) *DemoOrderUpdate
SetPayOrderId sets the "pay_orderId" field.
func (*DemoOrderUpdate) SetPayRefundID ¶
func (dou *DemoOrderUpdate) SetPayRefundID(u uint64) *DemoOrderUpdate
SetPayRefundID sets the "pay_refund_id" field.
func (*DemoOrderUpdate) SetPayStatus ¶
func (dou *DemoOrderUpdate) SetPayStatus(b bool) *DemoOrderUpdate
SetPayStatus sets the "pay_status" field.
func (*DemoOrderUpdate) SetPayTime ¶
func (dou *DemoOrderUpdate) SetPayTime(t time.Time) *DemoOrderUpdate
SetPayTime sets the "pay_time" field.
func (*DemoOrderUpdate) SetPrice ¶
func (dou *DemoOrderUpdate) SetPrice(i int32) *DemoOrderUpdate
SetPrice sets the "price" field.
func (*DemoOrderUpdate) SetRefundPrice ¶
func (dou *DemoOrderUpdate) SetRefundPrice(i int32) *DemoOrderUpdate
SetRefundPrice sets the "refund_price" field.
func (*DemoOrderUpdate) SetRefundTime ¶
func (dou *DemoOrderUpdate) SetRefundTime(t time.Time) *DemoOrderUpdate
SetRefundTime sets the "refund_time" field.
func (*DemoOrderUpdate) SetSpuID ¶
func (dou *DemoOrderUpdate) SetSpuID(u uint64) *DemoOrderUpdate
SetSpuID sets the "spu_id" field.
func (*DemoOrderUpdate) SetSpuName ¶
func (dou *DemoOrderUpdate) SetSpuName(s string) *DemoOrderUpdate
SetSpuName sets the "spu_name" field.
func (*DemoOrderUpdate) SetUpdatedAt ¶
func (dou *DemoOrderUpdate) SetUpdatedAt(t time.Time) *DemoOrderUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DemoOrderUpdate) SetUserID ¶
func (dou *DemoOrderUpdate) SetUserID(s string) *DemoOrderUpdate
SetUserID sets the "user_id" field.
func (*DemoOrderUpdate) Where ¶
func (dou *DemoOrderUpdate) Where(ps ...predicate.DemoOrder) *DemoOrderUpdate
Where appends a list predicates to the DemoOrderUpdate builder.
type DemoOrderUpdateOne ¶
type DemoOrderUpdateOne struct {
// contains filtered or unexported fields
}
DemoOrderUpdateOne is the builder for updating a single DemoOrder entity.
func (*DemoOrderUpdateOne) AddPayOrderId ¶
func (douo *DemoOrderUpdateOne) AddPayOrderId(u int64) *DemoOrderUpdateOne
AddPayOrderId adds u to the "pay_orderId" field.
func (*DemoOrderUpdateOne) AddPayRefundID ¶
func (douo *DemoOrderUpdateOne) AddPayRefundID(u int64) *DemoOrderUpdateOne
AddPayRefundID adds u to the "pay_refund_id" field.
func (*DemoOrderUpdateOne) AddPrice ¶
func (douo *DemoOrderUpdateOne) AddPrice(i int32) *DemoOrderUpdateOne
AddPrice adds i to the "price" field.
func (*DemoOrderUpdateOne) AddRefundPrice ¶
func (douo *DemoOrderUpdateOne) AddRefundPrice(i int32) *DemoOrderUpdateOne
AddRefundPrice adds i to the "refund_price" field.
func (*DemoOrderUpdateOne) AddSpuID ¶
func (douo *DemoOrderUpdateOne) AddSpuID(u int64) *DemoOrderUpdateOne
AddSpuID adds u to the "spu_id" field.
func (*DemoOrderUpdateOne) ClearDeletedAt ¶
func (douo *DemoOrderUpdateOne) ClearDeletedAt() *DemoOrderUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DemoOrderUpdateOne) ClearPayChannelCode ¶
func (douo *DemoOrderUpdateOne) ClearPayChannelCode() *DemoOrderUpdateOne
ClearPayChannelCode clears the value of the "pay_channel_code" field.
func (*DemoOrderUpdateOne) ClearPayOrderId ¶
func (douo *DemoOrderUpdateOne) ClearPayOrderId() *DemoOrderUpdateOne
ClearPayOrderId clears the value of the "pay_orderId" field.
func (*DemoOrderUpdateOne) ClearPayRefundID ¶
func (douo *DemoOrderUpdateOne) ClearPayRefundID() *DemoOrderUpdateOne
ClearPayRefundID clears the value of the "pay_refund_id" field.
func (*DemoOrderUpdateOne) ClearPayTime ¶
func (douo *DemoOrderUpdateOne) ClearPayTime() *DemoOrderUpdateOne
ClearPayTime clears the value of the "pay_time" field.
func (*DemoOrderUpdateOne) ClearRefundPrice ¶
func (douo *DemoOrderUpdateOne) ClearRefundPrice() *DemoOrderUpdateOne
ClearRefundPrice clears the value of the "refund_price" field.
func (*DemoOrderUpdateOne) ClearRefundTime ¶
func (douo *DemoOrderUpdateOne) ClearRefundTime() *DemoOrderUpdateOne
ClearRefundTime clears the value of the "refund_time" field.
func (*DemoOrderUpdateOne) Exec ¶
func (douo *DemoOrderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DemoOrderUpdateOne) ExecX ¶
func (douo *DemoOrderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DemoOrderUpdateOne) Mutation ¶
func (douo *DemoOrderUpdateOne) Mutation() *DemoOrderMutation
Mutation returns the DemoOrderMutation object of the builder.
func (*DemoOrderUpdateOne) Save ¶
func (douo *DemoOrderUpdateOne) Save(ctx context.Context) (*DemoOrder, error)
Save executes the query and returns the updated DemoOrder entity.
func (*DemoOrderUpdateOne) SaveX ¶
func (douo *DemoOrderUpdateOne) SaveX(ctx context.Context) *DemoOrder
SaveX is like Save, but panics if an error occurs.
func (*DemoOrderUpdateOne) Select ¶
func (douo *DemoOrderUpdateOne) Select(field string, fields ...string) *DemoOrderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DemoOrderUpdateOne) SetDeletedAt ¶
func (douo *DemoOrderUpdateOne) SetDeletedAt(t time.Time) *DemoOrderUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*DemoOrderUpdateOne) SetNillableDeletedAt ¶
func (douo *DemoOrderUpdateOne) SetNillableDeletedAt(t *time.Time) *DemoOrderUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*DemoOrderUpdateOne) SetNillablePayChannelCode ¶
func (douo *DemoOrderUpdateOne) SetNillablePayChannelCode(s *string) *DemoOrderUpdateOne
SetNillablePayChannelCode sets the "pay_channel_code" field if the given value is not nil.
func (*DemoOrderUpdateOne) SetNillablePayOrderId ¶
func (douo *DemoOrderUpdateOne) SetNillablePayOrderId(u *uint64) *DemoOrderUpdateOne
SetNillablePayOrderId sets the "pay_orderId" field if the given value is not nil.
func (*DemoOrderUpdateOne) SetNillablePayRefundID ¶
func (douo *DemoOrderUpdateOne) SetNillablePayRefundID(u *uint64) *DemoOrderUpdateOne
SetNillablePayRefundID sets the "pay_refund_id" field if the given value is not nil.
func (*DemoOrderUpdateOne) SetNillablePayStatus ¶ added in v1.1.0
func (douo *DemoOrderUpdateOne) SetNillablePayStatus(b *bool) *DemoOrderUpdateOne
SetNillablePayStatus sets the "pay_status" field if the given value is not nil.
func (*DemoOrderUpdateOne) SetNillablePayTime ¶
func (douo *DemoOrderUpdateOne) SetNillablePayTime(t *time.Time) *DemoOrderUpdateOne
SetNillablePayTime sets the "pay_time" field if the given value is not nil.
func (*DemoOrderUpdateOne) SetNillablePrice ¶ added in v1.1.0
func (douo *DemoOrderUpdateOne) SetNillablePrice(i *int32) *DemoOrderUpdateOne
SetNillablePrice sets the "price" field if the given value is not nil.
func (*DemoOrderUpdateOne) SetNillableRefundPrice ¶
func (douo *DemoOrderUpdateOne) SetNillableRefundPrice(i *int32) *DemoOrderUpdateOne
SetNillableRefundPrice sets the "refund_price" field if the given value is not nil.
func (*DemoOrderUpdateOne) SetNillableRefundTime ¶
func (douo *DemoOrderUpdateOne) SetNillableRefundTime(t *time.Time) *DemoOrderUpdateOne
SetNillableRefundTime sets the "refund_time" field if the given value is not nil.
func (*DemoOrderUpdateOne) SetNillableSpuID ¶ added in v1.1.0
func (douo *DemoOrderUpdateOne) SetNillableSpuID(u *uint64) *DemoOrderUpdateOne
SetNillableSpuID sets the "spu_id" field if the given value is not nil.
func (*DemoOrderUpdateOne) SetNillableSpuName ¶ added in v1.1.0
func (douo *DemoOrderUpdateOne) SetNillableSpuName(s *string) *DemoOrderUpdateOne
SetNillableSpuName sets the "spu_name" field if the given value is not nil.
func (*DemoOrderUpdateOne) SetNillableUserID ¶ added in v1.1.0
func (douo *DemoOrderUpdateOne) SetNillableUserID(s *string) *DemoOrderUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*DemoOrderUpdateOne) SetNotNilDeletedAt ¶
func (do *DemoOrderUpdateOne) SetNotNilDeletedAt(value *time.Time) *DemoOrderUpdateOne
set field if value's pointer is not nil.
func (*DemoOrderUpdateOne) SetNotNilPayChannelCode ¶
func (do *DemoOrderUpdateOne) SetNotNilPayChannelCode(value *string) *DemoOrderUpdateOne
set field if value's pointer is not nil.
func (*DemoOrderUpdateOne) SetNotNilPayOrderId ¶
func (do *DemoOrderUpdateOne) SetNotNilPayOrderId(value *uint64) *DemoOrderUpdateOne
set field if value's pointer is not nil.
func (*DemoOrderUpdateOne) SetNotNilPayRefundID ¶
func (do *DemoOrderUpdateOne) SetNotNilPayRefundID(value *uint64) *DemoOrderUpdateOne
set field if value's pointer is not nil.
func (*DemoOrderUpdateOne) SetNotNilPayStatus ¶
func (do *DemoOrderUpdateOne) SetNotNilPayStatus(value *bool) *DemoOrderUpdateOne
set field if value's pointer is not nil.
func (*DemoOrderUpdateOne) SetNotNilPayTime ¶
func (do *DemoOrderUpdateOne) SetNotNilPayTime(value *time.Time) *DemoOrderUpdateOne
set field if value's pointer is not nil.
func (*DemoOrderUpdateOne) SetNotNilPrice ¶
func (do *DemoOrderUpdateOne) SetNotNilPrice(value *int32) *DemoOrderUpdateOne
set field if value's pointer is not nil.
func (*DemoOrderUpdateOne) SetNotNilRefundPrice ¶
func (do *DemoOrderUpdateOne) SetNotNilRefundPrice(value *int32) *DemoOrderUpdateOne
set field if value's pointer is not nil.
func (*DemoOrderUpdateOne) SetNotNilRefundTime ¶
func (do *DemoOrderUpdateOne) SetNotNilRefundTime(value *time.Time) *DemoOrderUpdateOne
set field if value's pointer is not nil.
func (*DemoOrderUpdateOne) SetNotNilSpuID ¶
func (do *DemoOrderUpdateOne) SetNotNilSpuID(value *uint64) *DemoOrderUpdateOne
set field if value's pointer is not nil.
func (*DemoOrderUpdateOne) SetNotNilSpuName ¶
func (do *DemoOrderUpdateOne) SetNotNilSpuName(value *string) *DemoOrderUpdateOne
set field if value's pointer is not nil.
func (*DemoOrderUpdateOne) SetNotNilUpdatedAt ¶
func (do *DemoOrderUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DemoOrderUpdateOne
set field if value's pointer is not nil.
func (*DemoOrderUpdateOne) SetNotNilUserID ¶
func (do *DemoOrderUpdateOne) SetNotNilUserID(value *string) *DemoOrderUpdateOne
set field if value's pointer is not nil.
func (*DemoOrderUpdateOne) SetPayChannelCode ¶
func (douo *DemoOrderUpdateOne) SetPayChannelCode(s string) *DemoOrderUpdateOne
SetPayChannelCode sets the "pay_channel_code" field.
func (*DemoOrderUpdateOne) SetPayOrderId ¶
func (douo *DemoOrderUpdateOne) SetPayOrderId(u uint64) *DemoOrderUpdateOne
SetPayOrderId sets the "pay_orderId" field.
func (*DemoOrderUpdateOne) SetPayRefundID ¶
func (douo *DemoOrderUpdateOne) SetPayRefundID(u uint64) *DemoOrderUpdateOne
SetPayRefundID sets the "pay_refund_id" field.
func (*DemoOrderUpdateOne) SetPayStatus ¶
func (douo *DemoOrderUpdateOne) SetPayStatus(b bool) *DemoOrderUpdateOne
SetPayStatus sets the "pay_status" field.
func (*DemoOrderUpdateOne) SetPayTime ¶
func (douo *DemoOrderUpdateOne) SetPayTime(t time.Time) *DemoOrderUpdateOne
SetPayTime sets the "pay_time" field.
func (*DemoOrderUpdateOne) SetPrice ¶
func (douo *DemoOrderUpdateOne) SetPrice(i int32) *DemoOrderUpdateOne
SetPrice sets the "price" field.
func (*DemoOrderUpdateOne) SetRefundPrice ¶
func (douo *DemoOrderUpdateOne) SetRefundPrice(i int32) *DemoOrderUpdateOne
SetRefundPrice sets the "refund_price" field.
func (*DemoOrderUpdateOne) SetRefundTime ¶
func (douo *DemoOrderUpdateOne) SetRefundTime(t time.Time) *DemoOrderUpdateOne
SetRefundTime sets the "refund_time" field.
func (*DemoOrderUpdateOne) SetSpuID ¶
func (douo *DemoOrderUpdateOne) SetSpuID(u uint64) *DemoOrderUpdateOne
SetSpuID sets the "spu_id" field.
func (*DemoOrderUpdateOne) SetSpuName ¶
func (douo *DemoOrderUpdateOne) SetSpuName(s string) *DemoOrderUpdateOne
SetSpuName sets the "spu_name" field.
func (*DemoOrderUpdateOne) SetUpdatedAt ¶
func (douo *DemoOrderUpdateOne) SetUpdatedAt(t time.Time) *DemoOrderUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DemoOrderUpdateOne) SetUserID ¶
func (douo *DemoOrderUpdateOne) SetUserID(s string) *DemoOrderUpdateOne
SetUserID sets the "user_id" field.
func (*DemoOrderUpdateOne) Where ¶
func (douo *DemoOrderUpdateOne) Where(ps ...predicate.DemoOrder) *DemoOrderUpdateOne
Where appends a list predicates to the DemoOrderUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type Order ¶
type Order struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1: normal 2: ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // Delete Time | 删除日期 DeletedAt time.Time `json:"deleted_at,omitempty"` // 渠道编码 ChannelCode string `json:"channel_code,omitempty"` // 商户订单编号 MerchantOrderID string `json:"merchant_order_id,omitempty"` // 商品标题 Subject string `json:"subject,omitempty"` // 商品描述 Body string `json:"body,omitempty"` // 支付金额,单位:分 Price int32 `json:"price,omitempty"` // 渠道手续费,单位:百分比 ChannelFeeRate float64 `json:"channel_fee_rate,omitempty"` // 渠道手续金额,单位:分 ChannelFeePrice int32 `json:"channel_fee_price,omitempty"` // 用户 IP UserIP string `json:"user_ip,omitempty"` // 订单失效时间 ExpireTime time.Time `json:"expire_time,omitempty"` // 订单支付成功时间 SuccessTime time.Time `json:"success_time,omitempty"` // 订单支付通知时间 NotifyTime time.Time `json:"notify_time,omitempty"` // 支付成功的订单拓展单编号 ExtensionID uint64 `json:"extension_id,omitempty"` // 订单号 No string `json:"no,omitempty"` // 退款总金额,单位:分 RefundPrice int32 `json:"refund_price,omitempty"` // 渠道用户编号 ChannelUserID string `json:"channel_user_id,omitempty"` // 渠道订单号 ChannelOrderNo string `json:"channel_order_no,omitempty"` // contains filtered or unexported fields }
Order is the model entity for the Order schema.
func (*Order) Unwrap ¶
Unwrap unwraps the Order entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Order) Update ¶
func (o *Order) Update() *OrderUpdateOne
Update returns a builder for updating this Order. Note that you need to call Order.Unwrap() before calling this method if this Order was returned from a transaction, and the transaction was committed or rolled back.
type OrderClient ¶
type OrderClient struct {
// contains filtered or unexported fields
}
OrderClient is a client for the Order schema.
func NewOrderClient ¶
func NewOrderClient(c config) *OrderClient
NewOrderClient returns a client for the Order from the given config.
func (*OrderClient) Create ¶
func (c *OrderClient) Create() *OrderCreate
Create returns a builder for creating a Order entity.
func (*OrderClient) CreateBulk ¶
func (c *OrderClient) CreateBulk(builders ...*OrderCreate) *OrderCreateBulk
CreateBulk returns a builder for creating a bulk of Order entities.
func (*OrderClient) Delete ¶
func (c *OrderClient) Delete() *OrderDelete
Delete returns a delete builder for Order.
func (*OrderClient) DeleteOne ¶
func (c *OrderClient) DeleteOne(o *Order) *OrderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OrderClient) DeleteOneID ¶
func (c *OrderClient) DeleteOneID(id uint64) *OrderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OrderClient) GetX ¶
func (c *OrderClient) GetX(ctx context.Context, id uint64) *Order
GetX is like Get, but panics if an error occurs.
func (*OrderClient) Intercept ¶
func (c *OrderClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `order.Intercept(f(g(h())))`.
func (*OrderClient) Interceptors ¶
func (c *OrderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OrderClient) MapCreateBulk ¶
func (c *OrderClient) MapCreateBulk(slice any, setFunc func(*OrderCreate, int)) *OrderCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*OrderClient) Query ¶
func (c *OrderClient) Query() *OrderQuery
Query returns a query builder for Order.
func (*OrderClient) Update ¶
func (c *OrderClient) Update() *OrderUpdate
Update returns an update builder for Order.
func (*OrderClient) UpdateOne ¶
func (c *OrderClient) UpdateOne(o *Order) *OrderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OrderClient) UpdateOneID ¶
func (c *OrderClient) UpdateOneID(id uint64) *OrderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OrderClient) Use ¶
func (c *OrderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `order.Hooks(f(g(h())))`.
type OrderCreate ¶
type OrderCreate struct {
// contains filtered or unexported fields
}
OrderCreate is the builder for creating a Order entity.
func (*OrderCreate) Exec ¶
func (oc *OrderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderCreate) ExecX ¶
func (oc *OrderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderCreate) Mutation ¶
func (oc *OrderCreate) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderCreate) Save ¶
func (oc *OrderCreate) Save(ctx context.Context) (*Order, error)
Save creates the Order in the database.
func (*OrderCreate) SaveX ¶
func (oc *OrderCreate) SaveX(ctx context.Context) *Order
SaveX calls Save and panics if Save returns an error.
func (*OrderCreate) SetBody ¶
func (oc *OrderCreate) SetBody(s string) *OrderCreate
SetBody sets the "body" field.
func (*OrderCreate) SetChannelCode ¶
func (oc *OrderCreate) SetChannelCode(s string) *OrderCreate
SetChannelCode sets the "channel_code" field.
func (*OrderCreate) SetChannelFeePrice ¶
func (oc *OrderCreate) SetChannelFeePrice(i int32) *OrderCreate
SetChannelFeePrice sets the "channel_fee_price" field.
func (*OrderCreate) SetChannelFeeRate ¶
func (oc *OrderCreate) SetChannelFeeRate(f float64) *OrderCreate
SetChannelFeeRate sets the "channel_fee_rate" field.
func (*OrderCreate) SetChannelOrderNo ¶
func (oc *OrderCreate) SetChannelOrderNo(s string) *OrderCreate
SetChannelOrderNo sets the "channel_order_no" field.
func (*OrderCreate) SetChannelUserID ¶
func (oc *OrderCreate) SetChannelUserID(s string) *OrderCreate
SetChannelUserID sets the "channel_user_id" field.
func (*OrderCreate) SetCreatedAt ¶
func (oc *OrderCreate) SetCreatedAt(t time.Time) *OrderCreate
SetCreatedAt sets the "created_at" field.
func (*OrderCreate) SetDeletedAt ¶
func (oc *OrderCreate) SetDeletedAt(t time.Time) *OrderCreate
SetDeletedAt sets the "deleted_at" field.
func (*OrderCreate) SetExpireTime ¶
func (oc *OrderCreate) SetExpireTime(t time.Time) *OrderCreate
SetExpireTime sets the "expire_time" field.
func (*OrderCreate) SetExtensionID ¶
func (oc *OrderCreate) SetExtensionID(u uint64) *OrderCreate
SetExtensionID sets the "extension_id" field.
func (*OrderCreate) SetID ¶
func (oc *OrderCreate) SetID(u uint64) *OrderCreate
SetID sets the "id" field.
func (*OrderCreate) SetMerchantOrderID ¶
func (oc *OrderCreate) SetMerchantOrderID(s string) *OrderCreate
SetMerchantOrderID sets the "merchant_order_id" field.
func (*OrderCreate) SetNillableChannelCode ¶
func (oc *OrderCreate) SetNillableChannelCode(s *string) *OrderCreate
SetNillableChannelCode sets the "channel_code" field if the given value is not nil.
func (*OrderCreate) SetNillableChannelFeePrice ¶
func (oc *OrderCreate) SetNillableChannelFeePrice(i *int32) *OrderCreate
SetNillableChannelFeePrice sets the "channel_fee_price" field if the given value is not nil.
func (*OrderCreate) SetNillableChannelFeeRate ¶
func (oc *OrderCreate) SetNillableChannelFeeRate(f *float64) *OrderCreate
SetNillableChannelFeeRate sets the "channel_fee_rate" field if the given value is not nil.
func (*OrderCreate) SetNillableChannelOrderNo ¶
func (oc *OrderCreate) SetNillableChannelOrderNo(s *string) *OrderCreate
SetNillableChannelOrderNo sets the "channel_order_no" field if the given value is not nil.
func (*OrderCreate) SetNillableChannelUserID ¶
func (oc *OrderCreate) SetNillableChannelUserID(s *string) *OrderCreate
SetNillableChannelUserID sets the "channel_user_id" field if the given value is not nil.
func (*OrderCreate) SetNillableCreatedAt ¶
func (oc *OrderCreate) SetNillableCreatedAt(t *time.Time) *OrderCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderCreate) SetNillableDeletedAt ¶
func (oc *OrderCreate) SetNillableDeletedAt(t *time.Time) *OrderCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*OrderCreate) SetNillableExtensionID ¶
func (oc *OrderCreate) SetNillableExtensionID(u *uint64) *OrderCreate
SetNillableExtensionID sets the "extension_id" field if the given value is not nil.
func (*OrderCreate) SetNillableNo ¶
func (oc *OrderCreate) SetNillableNo(s *string) *OrderCreate
SetNillableNo sets the "no" field if the given value is not nil.
func (*OrderCreate) SetNillableNotifyTime ¶
func (oc *OrderCreate) SetNillableNotifyTime(t *time.Time) *OrderCreate
SetNillableNotifyTime sets the "notify_time" field if the given value is not nil.
func (*OrderCreate) SetNillableStatus ¶
func (oc *OrderCreate) SetNillableStatus(u *uint8) *OrderCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*OrderCreate) SetNillableSuccessTime ¶
func (oc *OrderCreate) SetNillableSuccessTime(t *time.Time) *OrderCreate
SetNillableSuccessTime sets the "success_time" field if the given value is not nil.
func (*OrderCreate) SetNillableUpdatedAt ¶
func (oc *OrderCreate) SetNillableUpdatedAt(t *time.Time) *OrderCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderCreate) SetNo ¶
func (oc *OrderCreate) SetNo(s string) *OrderCreate
SetNo sets the "no" field.
func (*OrderCreate) SetNotNilBody ¶
func (o *OrderCreate) SetNotNilBody(value *string) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilChannelCode ¶
func (o *OrderCreate) SetNotNilChannelCode(value *string) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilChannelFeePrice ¶
func (o *OrderCreate) SetNotNilChannelFeePrice(value *int32) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilChannelFeeRate ¶
func (o *OrderCreate) SetNotNilChannelFeeRate(value *float64) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilChannelOrderNo ¶
func (o *OrderCreate) SetNotNilChannelOrderNo(value *string) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilChannelUserID ¶
func (o *OrderCreate) SetNotNilChannelUserID(value *string) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilDeletedAt ¶
func (o *OrderCreate) SetNotNilDeletedAt(value *time.Time) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilExpireTime ¶
func (o *OrderCreate) SetNotNilExpireTime(value *time.Time) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilExtensionID ¶
func (o *OrderCreate) SetNotNilExtensionID(value *uint64) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilMerchantOrderID ¶
func (o *OrderCreate) SetNotNilMerchantOrderID(value *string) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilNo ¶
func (o *OrderCreate) SetNotNilNo(value *string) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilNotifyTime ¶
func (o *OrderCreate) SetNotNilNotifyTime(value *time.Time) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilPrice ¶
func (o *OrderCreate) SetNotNilPrice(value *int32) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilRefundPrice ¶
func (o *OrderCreate) SetNotNilRefundPrice(value *int32) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilStatus ¶
func (o *OrderCreate) SetNotNilStatus(value *uint8) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilSubject ¶
func (o *OrderCreate) SetNotNilSubject(value *string) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilSuccessTime ¶
func (o *OrderCreate) SetNotNilSuccessTime(value *time.Time) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilUpdatedAt ¶
func (o *OrderCreate) SetNotNilUpdatedAt(value *time.Time) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotNilUserIP ¶
func (o *OrderCreate) SetNotNilUserIP(value *string) *OrderCreate
set field if value's pointer is not nil.
func (*OrderCreate) SetNotifyTime ¶
func (oc *OrderCreate) SetNotifyTime(t time.Time) *OrderCreate
SetNotifyTime sets the "notify_time" field.
func (*OrderCreate) SetPrice ¶
func (oc *OrderCreate) SetPrice(i int32) *OrderCreate
SetPrice sets the "price" field.
func (*OrderCreate) SetRefundPrice ¶
func (oc *OrderCreate) SetRefundPrice(i int32) *OrderCreate
SetRefundPrice sets the "refund_price" field.
func (*OrderCreate) SetStatus ¶
func (oc *OrderCreate) SetStatus(u uint8) *OrderCreate
SetStatus sets the "status" field.
func (*OrderCreate) SetSubject ¶
func (oc *OrderCreate) SetSubject(s string) *OrderCreate
SetSubject sets the "subject" field.
func (*OrderCreate) SetSuccessTime ¶
func (oc *OrderCreate) SetSuccessTime(t time.Time) *OrderCreate
SetSuccessTime sets the "success_time" field.
func (*OrderCreate) SetUpdatedAt ¶
func (oc *OrderCreate) SetUpdatedAt(t time.Time) *OrderCreate
SetUpdatedAt sets the "updated_at" field.
func (*OrderCreate) SetUserIP ¶
func (oc *OrderCreate) SetUserIP(s string) *OrderCreate
SetUserIP sets the "user_ip" field.
type OrderCreateBulk ¶
type OrderCreateBulk struct {
// contains filtered or unexported fields
}
OrderCreateBulk is the builder for creating many Order entities in bulk.
func (*OrderCreateBulk) Exec ¶
func (ocb *OrderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderCreateBulk) ExecX ¶
func (ocb *OrderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type OrderDelete ¶
type OrderDelete struct {
// contains filtered or unexported fields
}
OrderDelete is the builder for deleting a Order entity.
func (*OrderDelete) Exec ¶
func (od *OrderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OrderDelete) ExecX ¶
func (od *OrderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OrderDelete) Where ¶
func (od *OrderDelete) Where(ps ...predicate.Order) *OrderDelete
Where appends a list predicates to the OrderDelete builder.
type OrderDeleteOne ¶
type OrderDeleteOne struct {
// contains filtered or unexported fields
}
OrderDeleteOne is the builder for deleting a single Order entity.
func (*OrderDeleteOne) Exec ¶
func (odo *OrderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OrderDeleteOne) ExecX ¶
func (odo *OrderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderDeleteOne) Where ¶
func (odo *OrderDeleteOne) Where(ps ...predicate.Order) *OrderDeleteOne
Where appends a list predicates to the OrderDelete builder.
type OrderDirection ¶
type OrderDirection string
OrderDirection defines the directions in which to order a list of items.
const ( // OrderDirectionAsc specifies an ascending order. OrderDirectionAsc OrderDirection = "ASC" // OrderDirectionDesc specifies a descending order. OrderDirectionDesc OrderDirection = "DESC" )
func (OrderDirection) String ¶
func (o OrderDirection) String() string
String implements fmt.Stringer interface.
func (OrderDirection) Validate ¶
func (o OrderDirection) Validate() error
Validate the order direction value.
type OrderExtension ¶
type OrderExtension struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1: normal 2: ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // Delete Time | 删除日期 DeletedAt time.Time `json:"deleted_at,omitempty"` // 支付订单号 No string `json:"no,omitempty"` // 渠道编号 OrderID uint64 `json:"order_id,omitempty"` // 渠道编码 ChannelCode string `json:"channel_code,omitempty"` // 用户 IP UserIP string `json:"user_ip,omitempty"` // 支付渠道的额外参数 ChannelExtras map[string]string `json:"channel_extras,omitempty"` // 调用渠道的错误码 ChannelErrorCode string `json:"channel_error_code,omitempty"` // 调用渠道报错时,错误信息 ChannelErrorMsg string `json:"channel_error_msg,omitempty"` // 支付渠道异步通知的内容 ChannelNotifyData string `json:"channel_notify_data,omitempty"` // contains filtered or unexported fields }
OrderExtension is the model entity for the OrderExtension schema.
func (*OrderExtension) String ¶
func (oe *OrderExtension) String() string
String implements the fmt.Stringer.
func (*OrderExtension) Unwrap ¶
func (oe *OrderExtension) Unwrap() *OrderExtension
Unwrap unwraps the OrderExtension 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 (*OrderExtension) Update ¶
func (oe *OrderExtension) Update() *OrderExtensionUpdateOne
Update returns a builder for updating this OrderExtension. Note that you need to call OrderExtension.Unwrap() before calling this method if this OrderExtension was returned from a transaction, and the transaction was committed or rolled back.
type OrderExtensionClient ¶
type OrderExtensionClient struct {
// contains filtered or unexported fields
}
OrderExtensionClient is a client for the OrderExtension schema.
func NewOrderExtensionClient ¶
func NewOrderExtensionClient(c config) *OrderExtensionClient
NewOrderExtensionClient returns a client for the OrderExtension from the given config.
func (*OrderExtensionClient) Create ¶
func (c *OrderExtensionClient) Create() *OrderExtensionCreate
Create returns a builder for creating a OrderExtension entity.
func (*OrderExtensionClient) CreateBulk ¶
func (c *OrderExtensionClient) CreateBulk(builders ...*OrderExtensionCreate) *OrderExtensionCreateBulk
CreateBulk returns a builder for creating a bulk of OrderExtension entities.
func (*OrderExtensionClient) Delete ¶
func (c *OrderExtensionClient) Delete() *OrderExtensionDelete
Delete returns a delete builder for OrderExtension.
func (*OrderExtensionClient) DeleteOne ¶
func (c *OrderExtensionClient) DeleteOne(oe *OrderExtension) *OrderExtensionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OrderExtensionClient) DeleteOneID ¶
func (c *OrderExtensionClient) DeleteOneID(id uint64) *OrderExtensionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OrderExtensionClient) Get ¶
func (c *OrderExtensionClient) Get(ctx context.Context, id uint64) (*OrderExtension, error)
Get returns a OrderExtension entity by its id.
func (*OrderExtensionClient) GetX ¶
func (c *OrderExtensionClient) GetX(ctx context.Context, id uint64) *OrderExtension
GetX is like Get, but panics if an error occurs.
func (*OrderExtensionClient) Hooks ¶
func (c *OrderExtensionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OrderExtensionClient) Intercept ¶
func (c *OrderExtensionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orderextension.Intercept(f(g(h())))`.
func (*OrderExtensionClient) Interceptors ¶
func (c *OrderExtensionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OrderExtensionClient) MapCreateBulk ¶
func (c *OrderExtensionClient) MapCreateBulk(slice any, setFunc func(*OrderExtensionCreate, int)) *OrderExtensionCreateBulk
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 (*OrderExtensionClient) Query ¶
func (c *OrderExtensionClient) Query() *OrderExtensionQuery
Query returns a query builder for OrderExtension.
func (*OrderExtensionClient) Update ¶
func (c *OrderExtensionClient) Update() *OrderExtensionUpdate
Update returns an update builder for OrderExtension.
func (*OrderExtensionClient) UpdateOne ¶
func (c *OrderExtensionClient) UpdateOne(oe *OrderExtension) *OrderExtensionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OrderExtensionClient) UpdateOneID ¶
func (c *OrderExtensionClient) UpdateOneID(id uint64) *OrderExtensionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OrderExtensionClient) Use ¶
func (c *OrderExtensionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orderextension.Hooks(f(g(h())))`.
type OrderExtensionCreate ¶
type OrderExtensionCreate struct {
// contains filtered or unexported fields
}
OrderExtensionCreate is the builder for creating a OrderExtension entity.
func (*OrderExtensionCreate) Exec ¶
func (oec *OrderExtensionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderExtensionCreate) ExecX ¶
func (oec *OrderExtensionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderExtensionCreate) Mutation ¶
func (oec *OrderExtensionCreate) Mutation() *OrderExtensionMutation
Mutation returns the OrderExtensionMutation object of the builder.
func (*OrderExtensionCreate) Save ¶
func (oec *OrderExtensionCreate) Save(ctx context.Context) (*OrderExtension, error)
Save creates the OrderExtension in the database.
func (*OrderExtensionCreate) SaveX ¶
func (oec *OrderExtensionCreate) SaveX(ctx context.Context) *OrderExtension
SaveX calls Save and panics if Save returns an error.
func (*OrderExtensionCreate) SetChannelCode ¶
func (oec *OrderExtensionCreate) SetChannelCode(s string) *OrderExtensionCreate
SetChannelCode sets the "channel_code" field.
func (*OrderExtensionCreate) SetChannelErrorCode ¶
func (oec *OrderExtensionCreate) SetChannelErrorCode(s string) *OrderExtensionCreate
SetChannelErrorCode sets the "channel_error_code" field.
func (*OrderExtensionCreate) SetChannelErrorMsg ¶
func (oec *OrderExtensionCreate) SetChannelErrorMsg(s string) *OrderExtensionCreate
SetChannelErrorMsg sets the "channel_error_msg" field.
func (*OrderExtensionCreate) SetChannelExtras ¶
func (oec *OrderExtensionCreate) SetChannelExtras(m map[string]string) *OrderExtensionCreate
SetChannelExtras sets the "channel_extras" field.
func (*OrderExtensionCreate) SetChannelNotifyData ¶
func (oec *OrderExtensionCreate) SetChannelNotifyData(s string) *OrderExtensionCreate
SetChannelNotifyData sets the "channel_notify_data" field.
func (*OrderExtensionCreate) SetCreatedAt ¶
func (oec *OrderExtensionCreate) SetCreatedAt(t time.Time) *OrderExtensionCreate
SetCreatedAt sets the "created_at" field.
func (*OrderExtensionCreate) SetDeletedAt ¶
func (oec *OrderExtensionCreate) SetDeletedAt(t time.Time) *OrderExtensionCreate
SetDeletedAt sets the "deleted_at" field.
func (*OrderExtensionCreate) SetID ¶
func (oec *OrderExtensionCreate) SetID(u uint64) *OrderExtensionCreate
SetID sets the "id" field.
func (*OrderExtensionCreate) SetNillableChannelErrorCode ¶
func (oec *OrderExtensionCreate) SetNillableChannelErrorCode(s *string) *OrderExtensionCreate
SetNillableChannelErrorCode sets the "channel_error_code" field if the given value is not nil.
func (*OrderExtensionCreate) SetNillableChannelErrorMsg ¶
func (oec *OrderExtensionCreate) SetNillableChannelErrorMsg(s *string) *OrderExtensionCreate
SetNillableChannelErrorMsg sets the "channel_error_msg" field if the given value is not nil.
func (*OrderExtensionCreate) SetNillableChannelNotifyData ¶
func (oec *OrderExtensionCreate) SetNillableChannelNotifyData(s *string) *OrderExtensionCreate
SetNillableChannelNotifyData sets the "channel_notify_data" field if the given value is not nil.
func (*OrderExtensionCreate) SetNillableCreatedAt ¶
func (oec *OrderExtensionCreate) SetNillableCreatedAt(t *time.Time) *OrderExtensionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OrderExtensionCreate) SetNillableDeletedAt ¶
func (oec *OrderExtensionCreate) SetNillableDeletedAt(t *time.Time) *OrderExtensionCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*OrderExtensionCreate) SetNillableStatus ¶
func (oec *OrderExtensionCreate) SetNillableStatus(u *uint8) *OrderExtensionCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*OrderExtensionCreate) SetNillableUpdatedAt ¶
func (oec *OrderExtensionCreate) SetNillableUpdatedAt(t *time.Time) *OrderExtensionCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OrderExtensionCreate) SetNo ¶
func (oec *OrderExtensionCreate) SetNo(s string) *OrderExtensionCreate
SetNo sets the "no" field.
func (*OrderExtensionCreate) SetNotNilChannelCode ¶
func (oe *OrderExtensionCreate) SetNotNilChannelCode(value *string) *OrderExtensionCreate
set field if value's pointer is not nil.
func (*OrderExtensionCreate) SetNotNilChannelErrorCode ¶
func (oe *OrderExtensionCreate) SetNotNilChannelErrorCode(value *string) *OrderExtensionCreate
set field if value's pointer is not nil.
func (*OrderExtensionCreate) SetNotNilChannelErrorMsg ¶
func (oe *OrderExtensionCreate) SetNotNilChannelErrorMsg(value *string) *OrderExtensionCreate
set field if value's pointer is not nil.
func (*OrderExtensionCreate) SetNotNilChannelExtras ¶
func (oe *OrderExtensionCreate) SetNotNilChannelExtras(value *map[string]string) *OrderExtensionCreate
set field if value's pointer is not nil.
func (*OrderExtensionCreate) SetNotNilChannelNotifyData ¶
func (oe *OrderExtensionCreate) SetNotNilChannelNotifyData(value *string) *OrderExtensionCreate
set field if value's pointer is not nil.
func (*OrderExtensionCreate) SetNotNilDeletedAt ¶
func (oe *OrderExtensionCreate) SetNotNilDeletedAt(value *time.Time) *OrderExtensionCreate
set field if value's pointer is not nil.
func (*OrderExtensionCreate) SetNotNilNo ¶
func (oe *OrderExtensionCreate) SetNotNilNo(value *string) *OrderExtensionCreate
set field if value's pointer is not nil.
func (*OrderExtensionCreate) SetNotNilOrderID ¶
func (oe *OrderExtensionCreate) SetNotNilOrderID(value *uint64) *OrderExtensionCreate
set field if value's pointer is not nil.
func (*OrderExtensionCreate) SetNotNilStatus ¶
func (oe *OrderExtensionCreate) SetNotNilStatus(value *uint8) *OrderExtensionCreate
set field if value's pointer is not nil.
func (*OrderExtensionCreate) SetNotNilUpdatedAt ¶
func (oe *OrderExtensionCreate) SetNotNilUpdatedAt(value *time.Time) *OrderExtensionCreate
set field if value's pointer is not nil.
func (*OrderExtensionCreate) SetNotNilUserIP ¶
func (oe *OrderExtensionCreate) SetNotNilUserIP(value *string) *OrderExtensionCreate
set field if value's pointer is not nil.
func (*OrderExtensionCreate) SetOrderID ¶
func (oec *OrderExtensionCreate) SetOrderID(u uint64) *OrderExtensionCreate
SetOrderID sets the "order_id" field.
func (*OrderExtensionCreate) SetStatus ¶
func (oec *OrderExtensionCreate) SetStatus(u uint8) *OrderExtensionCreate
SetStatus sets the "status" field.
func (*OrderExtensionCreate) SetUpdatedAt ¶
func (oec *OrderExtensionCreate) SetUpdatedAt(t time.Time) *OrderExtensionCreate
SetUpdatedAt sets the "updated_at" field.
func (*OrderExtensionCreate) SetUserIP ¶
func (oec *OrderExtensionCreate) SetUserIP(s string) *OrderExtensionCreate
SetUserIP sets the "user_ip" field.
type OrderExtensionCreateBulk ¶
type OrderExtensionCreateBulk struct {
// contains filtered or unexported fields
}
OrderExtensionCreateBulk is the builder for creating many OrderExtension entities in bulk.
func (*OrderExtensionCreateBulk) Exec ¶
func (oecb *OrderExtensionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderExtensionCreateBulk) ExecX ¶
func (oecb *OrderExtensionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderExtensionCreateBulk) Save ¶
func (oecb *OrderExtensionCreateBulk) Save(ctx context.Context) ([]*OrderExtension, error)
Save creates the OrderExtension entities in the database.
func (*OrderExtensionCreateBulk) SaveX ¶
func (oecb *OrderExtensionCreateBulk) SaveX(ctx context.Context) []*OrderExtension
SaveX is like Save, but panics if an error occurs.
type OrderExtensionDelete ¶
type OrderExtensionDelete struct {
// contains filtered or unexported fields
}
OrderExtensionDelete is the builder for deleting a OrderExtension entity.
func (*OrderExtensionDelete) Exec ¶
func (oed *OrderExtensionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OrderExtensionDelete) ExecX ¶
func (oed *OrderExtensionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OrderExtensionDelete) Where ¶
func (oed *OrderExtensionDelete) Where(ps ...predicate.OrderExtension) *OrderExtensionDelete
Where appends a list predicates to the OrderExtensionDelete builder.
type OrderExtensionDeleteOne ¶
type OrderExtensionDeleteOne struct {
// contains filtered or unexported fields
}
OrderExtensionDeleteOne is the builder for deleting a single OrderExtension entity.
func (*OrderExtensionDeleteOne) Exec ¶
func (oedo *OrderExtensionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OrderExtensionDeleteOne) ExecX ¶
func (oedo *OrderExtensionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderExtensionDeleteOne) Where ¶
func (oedo *OrderExtensionDeleteOne) Where(ps ...predicate.OrderExtension) *OrderExtensionDeleteOne
Where appends a list predicates to the OrderExtensionDelete builder.
type OrderExtensionGroupBy ¶
type OrderExtensionGroupBy struct {
// contains filtered or unexported fields
}
OrderExtensionGroupBy is the group-by builder for OrderExtension entities.
func (*OrderExtensionGroupBy) Aggregate ¶
func (oegb *OrderExtensionGroupBy) Aggregate(fns ...AggregateFunc) *OrderExtensionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OrderExtensionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderExtensionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderExtensionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderExtensionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderExtensionGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*OrderExtensionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderExtensionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderExtensionGroupBy) Scan ¶
func (oegb *OrderExtensionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderExtensionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderExtensionMutation ¶
type OrderExtensionMutation struct {
// contains filtered or unexported fields
}
OrderExtensionMutation represents an operation that mutates the OrderExtension nodes in the graph.
func (*OrderExtensionMutation) AddField ¶
func (m *OrderExtensionMutation) 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 (*OrderExtensionMutation) AddOrderID ¶
func (m *OrderExtensionMutation) AddOrderID(u int64)
AddOrderID adds u to the "order_id" field.
func (*OrderExtensionMutation) AddStatus ¶
func (m *OrderExtensionMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*OrderExtensionMutation) AddedEdges ¶
func (m *OrderExtensionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrderExtensionMutation) AddedField ¶
func (m *OrderExtensionMutation) 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 (*OrderExtensionMutation) AddedFields ¶
func (m *OrderExtensionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrderExtensionMutation) AddedIDs ¶
func (m *OrderExtensionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OrderExtensionMutation) AddedOrderID ¶
func (m *OrderExtensionMutation) AddedOrderID() (r int64, exists bool)
AddedOrderID returns the value that was added to the "order_id" field in this mutation.
func (*OrderExtensionMutation) AddedStatus ¶
func (m *OrderExtensionMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*OrderExtensionMutation) ChannelCode ¶
func (m *OrderExtensionMutation) ChannelCode() (r string, exists bool)
ChannelCode returns the value of the "channel_code" field in the mutation.
func (*OrderExtensionMutation) ChannelErrorCode ¶
func (m *OrderExtensionMutation) ChannelErrorCode() (r string, exists bool)
ChannelErrorCode returns the value of the "channel_error_code" field in the mutation.
func (*OrderExtensionMutation) ChannelErrorCodeCleared ¶
func (m *OrderExtensionMutation) ChannelErrorCodeCleared() bool
ChannelErrorCodeCleared returns if the "channel_error_code" field was cleared in this mutation.
func (*OrderExtensionMutation) ChannelErrorMsg ¶
func (m *OrderExtensionMutation) ChannelErrorMsg() (r string, exists bool)
ChannelErrorMsg returns the value of the "channel_error_msg" field in the mutation.
func (*OrderExtensionMutation) ChannelErrorMsgCleared ¶
func (m *OrderExtensionMutation) ChannelErrorMsgCleared() bool
ChannelErrorMsgCleared returns if the "channel_error_msg" field was cleared in this mutation.
func (*OrderExtensionMutation) ChannelExtras ¶
func (m *OrderExtensionMutation) ChannelExtras() (r map[string]string, exists bool)
ChannelExtras returns the value of the "channel_extras" field in the mutation.
func (*OrderExtensionMutation) ChannelExtrasCleared ¶
func (m *OrderExtensionMutation) ChannelExtrasCleared() bool
ChannelExtrasCleared returns if the "channel_extras" field was cleared in this mutation.
func (*OrderExtensionMutation) ChannelNotifyData ¶
func (m *OrderExtensionMutation) ChannelNotifyData() (r string, exists bool)
ChannelNotifyData returns the value of the "channel_notify_data" field in the mutation.
func (*OrderExtensionMutation) ChannelNotifyDataCleared ¶
func (m *OrderExtensionMutation) ChannelNotifyDataCleared() bool
ChannelNotifyDataCleared returns if the "channel_notify_data" field was cleared in this mutation.
func (*OrderExtensionMutation) ClearChannelErrorCode ¶
func (m *OrderExtensionMutation) ClearChannelErrorCode()
ClearChannelErrorCode clears the value of the "channel_error_code" field.
func (*OrderExtensionMutation) ClearChannelErrorMsg ¶
func (m *OrderExtensionMutation) ClearChannelErrorMsg()
ClearChannelErrorMsg clears the value of the "channel_error_msg" field.
func (*OrderExtensionMutation) ClearChannelExtras ¶
func (m *OrderExtensionMutation) ClearChannelExtras()
ClearChannelExtras clears the value of the "channel_extras" field.
func (*OrderExtensionMutation) ClearChannelNotifyData ¶
func (m *OrderExtensionMutation) ClearChannelNotifyData()
ClearChannelNotifyData clears the value of the "channel_notify_data" field.
func (*OrderExtensionMutation) ClearDeletedAt ¶
func (m *OrderExtensionMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OrderExtensionMutation) ClearEdge ¶
func (m *OrderExtensionMutation) 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 (*OrderExtensionMutation) ClearField ¶
func (m *OrderExtensionMutation) 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 (*OrderExtensionMutation) ClearStatus ¶
func (m *OrderExtensionMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*OrderExtensionMutation) ClearedEdges ¶
func (m *OrderExtensionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrderExtensionMutation) ClearedFields ¶
func (m *OrderExtensionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrderExtensionMutation) Client ¶
func (m OrderExtensionMutation) 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 (*OrderExtensionMutation) CreatedAt ¶
func (m *OrderExtensionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OrderExtensionMutation) DeletedAt ¶
func (m *OrderExtensionMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*OrderExtensionMutation) DeletedAtCleared ¶
func (m *OrderExtensionMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*OrderExtensionMutation) EdgeCleared ¶
func (m *OrderExtensionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OrderExtensionMutation) Field ¶
func (m *OrderExtensionMutation) 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 (*OrderExtensionMutation) FieldCleared ¶
func (m *OrderExtensionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OrderExtensionMutation) Fields ¶
func (m *OrderExtensionMutation) 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 (*OrderExtensionMutation) ID ¶
func (m *OrderExtensionMutation) 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 (*OrderExtensionMutation) IDs ¶
func (m *OrderExtensionMutation) 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 (*OrderExtensionMutation) No ¶
func (m *OrderExtensionMutation) No() (r string, exists bool)
No returns the value of the "no" field in the mutation.
func (*OrderExtensionMutation) OldChannelCode ¶
func (m *OrderExtensionMutation) OldChannelCode(ctx context.Context) (v string, err error)
OldChannelCode returns the old "channel_code" field's value of the OrderExtension entity. If the OrderExtension object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderExtensionMutation) OldChannelErrorCode ¶
func (m *OrderExtensionMutation) OldChannelErrorCode(ctx context.Context) (v string, err error)
OldChannelErrorCode returns the old "channel_error_code" field's value of the OrderExtension entity. If the OrderExtension object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderExtensionMutation) OldChannelErrorMsg ¶
func (m *OrderExtensionMutation) OldChannelErrorMsg(ctx context.Context) (v string, err error)
OldChannelErrorMsg returns the old "channel_error_msg" field's value of the OrderExtension entity. If the OrderExtension object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderExtensionMutation) OldChannelExtras ¶
func (m *OrderExtensionMutation) OldChannelExtras(ctx context.Context) (v map[string]string, err error)
OldChannelExtras returns the old "channel_extras" field's value of the OrderExtension entity. If the OrderExtension object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderExtensionMutation) OldChannelNotifyData ¶
func (m *OrderExtensionMutation) OldChannelNotifyData(ctx context.Context) (v string, err error)
OldChannelNotifyData returns the old "channel_notify_data" field's value of the OrderExtension entity. If the OrderExtension object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderExtensionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the OrderExtension entity. If the OrderExtension object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderExtensionMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the OrderExtension entity. If the OrderExtension object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderExtensionMutation) 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 (*OrderExtensionMutation) OldNo ¶
func (m *OrderExtensionMutation) OldNo(ctx context.Context) (v string, err error)
OldNo returns the old "no" field's value of the OrderExtension entity. If the OrderExtension object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderExtensionMutation) OldOrderID ¶
func (m *OrderExtensionMutation) OldOrderID(ctx context.Context) (v uint64, err error)
OldOrderID returns the old "order_id" field's value of the OrderExtension entity. If the OrderExtension object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderExtensionMutation) OldStatus ¶
func (m *OrderExtensionMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the OrderExtension entity. If the OrderExtension object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderExtensionMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the OrderExtension entity. If the OrderExtension object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderExtensionMutation) OldUserIP ¶
func (m *OrderExtensionMutation) OldUserIP(ctx context.Context) (v string, err error)
OldUserIP returns the old "user_ip" field's value of the OrderExtension entity. If the OrderExtension object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderExtensionMutation) Op ¶
func (m *OrderExtensionMutation) Op() Op
Op returns the operation name.
func (*OrderExtensionMutation) OrderID ¶
func (m *OrderExtensionMutation) OrderID() (r uint64, exists bool)
OrderID returns the value of the "order_id" field in the mutation.
func (*OrderExtensionMutation) RemovedEdges ¶
func (m *OrderExtensionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrderExtensionMutation) RemovedIDs ¶
func (m *OrderExtensionMutation) 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 (*OrderExtensionMutation) ResetChannelCode ¶
func (m *OrderExtensionMutation) ResetChannelCode()
ResetChannelCode resets all changes to the "channel_code" field.
func (*OrderExtensionMutation) ResetChannelErrorCode ¶
func (m *OrderExtensionMutation) ResetChannelErrorCode()
ResetChannelErrorCode resets all changes to the "channel_error_code" field.
func (*OrderExtensionMutation) ResetChannelErrorMsg ¶
func (m *OrderExtensionMutation) ResetChannelErrorMsg()
ResetChannelErrorMsg resets all changes to the "channel_error_msg" field.
func (*OrderExtensionMutation) ResetChannelExtras ¶
func (m *OrderExtensionMutation) ResetChannelExtras()
ResetChannelExtras resets all changes to the "channel_extras" field.
func (*OrderExtensionMutation) ResetChannelNotifyData ¶
func (m *OrderExtensionMutation) ResetChannelNotifyData()
ResetChannelNotifyData resets all changes to the "channel_notify_data" field.
func (*OrderExtensionMutation) ResetCreatedAt ¶
func (m *OrderExtensionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OrderExtensionMutation) ResetDeletedAt ¶
func (m *OrderExtensionMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*OrderExtensionMutation) ResetEdge ¶
func (m *OrderExtensionMutation) 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 (*OrderExtensionMutation) ResetField ¶
func (m *OrderExtensionMutation) 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 (*OrderExtensionMutation) ResetNo ¶
func (m *OrderExtensionMutation) ResetNo()
ResetNo resets all changes to the "no" field.
func (*OrderExtensionMutation) ResetOrderID ¶
func (m *OrderExtensionMutation) ResetOrderID()
ResetOrderID resets all changes to the "order_id" field.
func (*OrderExtensionMutation) ResetStatus ¶
func (m *OrderExtensionMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*OrderExtensionMutation) ResetUpdatedAt ¶
func (m *OrderExtensionMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OrderExtensionMutation) ResetUserIP ¶
func (m *OrderExtensionMutation) ResetUserIP()
ResetUserIP resets all changes to the "user_ip" field.
func (*OrderExtensionMutation) SetChannelCode ¶
func (m *OrderExtensionMutation) SetChannelCode(s string)
SetChannelCode sets the "channel_code" field.
func (*OrderExtensionMutation) SetChannelErrorCode ¶
func (m *OrderExtensionMutation) SetChannelErrorCode(s string)
SetChannelErrorCode sets the "channel_error_code" field.
func (*OrderExtensionMutation) SetChannelErrorMsg ¶
func (m *OrderExtensionMutation) SetChannelErrorMsg(s string)
SetChannelErrorMsg sets the "channel_error_msg" field.
func (*OrderExtensionMutation) SetChannelExtras ¶
func (m *OrderExtensionMutation) SetChannelExtras(value map[string]string)
SetChannelExtras sets the "channel_extras" field.
func (*OrderExtensionMutation) SetChannelNotifyData ¶
func (m *OrderExtensionMutation) SetChannelNotifyData(s string)
SetChannelNotifyData sets the "channel_notify_data" field.
func (*OrderExtensionMutation) SetCreatedAt ¶
func (m *OrderExtensionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OrderExtensionMutation) SetDeletedAt ¶
func (m *OrderExtensionMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*OrderExtensionMutation) SetField ¶
func (m *OrderExtensionMutation) 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 (*OrderExtensionMutation) SetID ¶
func (m *OrderExtensionMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of OrderExtension entities.
func (*OrderExtensionMutation) SetNo ¶
func (m *OrderExtensionMutation) SetNo(s string)
SetNo sets the "no" field.
func (*OrderExtensionMutation) SetOp ¶
func (m *OrderExtensionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OrderExtensionMutation) SetOrderID ¶
func (m *OrderExtensionMutation) SetOrderID(u uint64)
SetOrderID sets the "order_id" field.
func (*OrderExtensionMutation) SetStatus ¶
func (m *OrderExtensionMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*OrderExtensionMutation) SetUpdatedAt ¶
func (m *OrderExtensionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*OrderExtensionMutation) SetUserIP ¶
func (m *OrderExtensionMutation) SetUserIP(s string)
SetUserIP sets the "user_ip" field.
func (*OrderExtensionMutation) Status ¶
func (m *OrderExtensionMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*OrderExtensionMutation) StatusCleared ¶
func (m *OrderExtensionMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (OrderExtensionMutation) Tx ¶
func (m OrderExtensionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrderExtensionMutation) Type ¶
func (m *OrderExtensionMutation) Type() string
Type returns the node type of this mutation (OrderExtension).
func (*OrderExtensionMutation) UpdatedAt ¶
func (m *OrderExtensionMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OrderExtensionMutation) UserIP ¶
func (m *OrderExtensionMutation) UserIP() (r string, exists bool)
UserIP returns the value of the "user_ip" field in the mutation.
func (*OrderExtensionMutation) Where ¶
func (m *OrderExtensionMutation) Where(ps ...predicate.OrderExtension)
Where appends a list predicates to the OrderExtensionMutation builder.
func (*OrderExtensionMutation) WhereP ¶
func (m *OrderExtensionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OrderExtensionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OrderExtensionPageList ¶
type OrderExtensionPageList struct { List []*OrderExtension `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
OrderExtensionPageList is OrderExtension PageList result.
type OrderExtensionPager ¶
type OrderExtensionPager struct { Order orderextension.OrderOption Filter func(*OrderExtensionQuery) (*OrderExtensionQuery, error) }
func (*OrderExtensionPager) ApplyFilter ¶
func (p *OrderExtensionPager) ApplyFilter(query *OrderExtensionQuery) (*OrderExtensionQuery, error)
type OrderExtensionPaginateOption ¶
type OrderExtensionPaginateOption func(*OrderExtensionPager)
OrderExtensionPaginateOption enables pagination customization.
type OrderExtensionQuery ¶
type OrderExtensionQuery struct {
// contains filtered or unexported fields
}
OrderExtensionQuery is the builder for querying OrderExtension entities.
func (*OrderExtensionQuery) Aggregate ¶
func (oeq *OrderExtensionQuery) Aggregate(fns ...AggregateFunc) *OrderExtensionSelect
Aggregate returns a OrderExtensionSelect configured with the given aggregations.
func (*OrderExtensionQuery) All ¶
func (oeq *OrderExtensionQuery) All(ctx context.Context) ([]*OrderExtension, error)
All executes the query and returns a list of OrderExtensions.
func (*OrderExtensionQuery) AllX ¶
func (oeq *OrderExtensionQuery) AllX(ctx context.Context) []*OrderExtension
AllX is like All, but panics if an error occurs.
func (*OrderExtensionQuery) Clone ¶
func (oeq *OrderExtensionQuery) Clone() *OrderExtensionQuery
Clone returns a duplicate of the OrderExtensionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OrderExtensionQuery) Count ¶
func (oeq *OrderExtensionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OrderExtensionQuery) CountX ¶
func (oeq *OrderExtensionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OrderExtensionQuery) Exist ¶
func (oeq *OrderExtensionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OrderExtensionQuery) ExistX ¶
func (oeq *OrderExtensionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OrderExtensionQuery) First ¶
func (oeq *OrderExtensionQuery) First(ctx context.Context) (*OrderExtension, error)
First returns the first OrderExtension entity from the query. Returns a *NotFoundError when no OrderExtension was found.
func (*OrderExtensionQuery) FirstID ¶
func (oeq *OrderExtensionQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first OrderExtension ID from the query. Returns a *NotFoundError when no OrderExtension ID was found.
func (*OrderExtensionQuery) FirstIDX ¶
func (oeq *OrderExtensionQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*OrderExtensionQuery) FirstX ¶
func (oeq *OrderExtensionQuery) FirstX(ctx context.Context) *OrderExtension
FirstX is like First, but panics if an error occurs.
func (*OrderExtensionQuery) GroupBy ¶
func (oeq *OrderExtensionQuery) GroupBy(field string, fields ...string) *OrderExtensionGroupBy
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.OrderExtension.Query(). GroupBy(orderextension.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrderExtensionQuery) IDs ¶
func (oeq *OrderExtensionQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of OrderExtension IDs.
func (*OrderExtensionQuery) IDsX ¶
func (oeq *OrderExtensionQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*OrderExtensionQuery) Limit ¶
func (oeq *OrderExtensionQuery) Limit(limit int) *OrderExtensionQuery
Limit the number of records to be returned by this query.
func (*OrderExtensionQuery) Offset ¶
func (oeq *OrderExtensionQuery) Offset(offset int) *OrderExtensionQuery
Offset to start from.
func (*OrderExtensionQuery) Only ¶
func (oeq *OrderExtensionQuery) Only(ctx context.Context) (*OrderExtension, error)
Only returns a single OrderExtension entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrderExtension entity is found. Returns a *NotFoundError when no OrderExtension entities are found.
func (*OrderExtensionQuery) OnlyID ¶
func (oeq *OrderExtensionQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only OrderExtension ID in the query. Returns a *NotSingularError when more than one OrderExtension ID is found. Returns a *NotFoundError when no entities are found.
func (*OrderExtensionQuery) OnlyIDX ¶
func (oeq *OrderExtensionQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OrderExtensionQuery) OnlyX ¶
func (oeq *OrderExtensionQuery) OnlyX(ctx context.Context) *OrderExtension
OnlyX is like Only, but panics if an error occurs.
func (*OrderExtensionQuery) Order ¶
func (oeq *OrderExtensionQuery) Order(o ...orderextension.OrderOption) *OrderExtensionQuery
Order specifies how the records should be ordered.
func (*OrderExtensionQuery) Page ¶
func (oe *OrderExtensionQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...OrderExtensionPaginateOption, ) (*OrderExtensionPageList, error)
func (*OrderExtensionQuery) Select ¶
func (oeq *OrderExtensionQuery) Select(fields ...string) *OrderExtensionSelect
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.OrderExtension.Query(). Select(orderextension.FieldCreatedAt). Scan(ctx, &v)
func (*OrderExtensionQuery) Unique ¶
func (oeq *OrderExtensionQuery) Unique(unique bool) *OrderExtensionQuery
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 (*OrderExtensionQuery) Where ¶
func (oeq *OrderExtensionQuery) Where(ps ...predicate.OrderExtension) *OrderExtensionQuery
Where adds a new predicate for the OrderExtensionQuery builder.
type OrderExtensionSelect ¶
type OrderExtensionSelect struct { *OrderExtensionQuery // contains filtered or unexported fields }
OrderExtensionSelect is the builder for selecting fields of OrderExtension entities.
func (*OrderExtensionSelect) Aggregate ¶
func (oes *OrderExtensionSelect) Aggregate(fns ...AggregateFunc) *OrderExtensionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OrderExtensionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderExtensionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderExtensionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderExtensionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderExtensionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderExtensionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderExtensionSelect) Scan ¶
func (oes *OrderExtensionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderExtensionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderExtensionUpdate ¶
type OrderExtensionUpdate struct {
// contains filtered or unexported fields
}
OrderExtensionUpdate is the builder for updating OrderExtension entities.
func (*OrderExtensionUpdate) AddOrderID ¶
func (oeu *OrderExtensionUpdate) AddOrderID(u int64) *OrderExtensionUpdate
AddOrderID adds u to the "order_id" field.
func (*OrderExtensionUpdate) AddStatus ¶
func (oeu *OrderExtensionUpdate) AddStatus(u int8) *OrderExtensionUpdate
AddStatus adds u to the "status" field.
func (*OrderExtensionUpdate) ClearChannelErrorCode ¶
func (oeu *OrderExtensionUpdate) ClearChannelErrorCode() *OrderExtensionUpdate
ClearChannelErrorCode clears the value of the "channel_error_code" field.
func (*OrderExtensionUpdate) ClearChannelErrorMsg ¶
func (oeu *OrderExtensionUpdate) ClearChannelErrorMsg() *OrderExtensionUpdate
ClearChannelErrorMsg clears the value of the "channel_error_msg" field.
func (*OrderExtensionUpdate) ClearChannelExtras ¶
func (oeu *OrderExtensionUpdate) ClearChannelExtras() *OrderExtensionUpdate
ClearChannelExtras clears the value of the "channel_extras" field.
func (*OrderExtensionUpdate) ClearChannelNotifyData ¶
func (oeu *OrderExtensionUpdate) ClearChannelNotifyData() *OrderExtensionUpdate
ClearChannelNotifyData clears the value of the "channel_notify_data" field.
func (*OrderExtensionUpdate) ClearDeletedAt ¶
func (oeu *OrderExtensionUpdate) ClearDeletedAt() *OrderExtensionUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OrderExtensionUpdate) ClearStatus ¶
func (oeu *OrderExtensionUpdate) ClearStatus() *OrderExtensionUpdate
ClearStatus clears the value of the "status" field.
func (*OrderExtensionUpdate) Exec ¶
func (oeu *OrderExtensionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderExtensionUpdate) ExecX ¶
func (oeu *OrderExtensionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderExtensionUpdate) Mutation ¶
func (oeu *OrderExtensionUpdate) Mutation() *OrderExtensionMutation
Mutation returns the OrderExtensionMutation object of the builder.
func (*OrderExtensionUpdate) Save ¶
func (oeu *OrderExtensionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrderExtensionUpdate) SaveX ¶
func (oeu *OrderExtensionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrderExtensionUpdate) SetChannelCode ¶
func (oeu *OrderExtensionUpdate) SetChannelCode(s string) *OrderExtensionUpdate
SetChannelCode sets the "channel_code" field.
func (*OrderExtensionUpdate) SetChannelErrorCode ¶
func (oeu *OrderExtensionUpdate) SetChannelErrorCode(s string) *OrderExtensionUpdate
SetChannelErrorCode sets the "channel_error_code" field.
func (*OrderExtensionUpdate) SetChannelErrorMsg ¶
func (oeu *OrderExtensionUpdate) SetChannelErrorMsg(s string) *OrderExtensionUpdate
SetChannelErrorMsg sets the "channel_error_msg" field.
func (*OrderExtensionUpdate) SetChannelExtras ¶
func (oeu *OrderExtensionUpdate) SetChannelExtras(m map[string]string) *OrderExtensionUpdate
SetChannelExtras sets the "channel_extras" field.
func (*OrderExtensionUpdate) SetChannelNotifyData ¶
func (oeu *OrderExtensionUpdate) SetChannelNotifyData(s string) *OrderExtensionUpdate
SetChannelNotifyData sets the "channel_notify_data" field.
func (*OrderExtensionUpdate) SetDeletedAt ¶
func (oeu *OrderExtensionUpdate) SetDeletedAt(t time.Time) *OrderExtensionUpdate
SetDeletedAt sets the "deleted_at" field.
func (*OrderExtensionUpdate) SetNillableChannelCode ¶ added in v1.1.0
func (oeu *OrderExtensionUpdate) SetNillableChannelCode(s *string) *OrderExtensionUpdate
SetNillableChannelCode sets the "channel_code" field if the given value is not nil.
func (*OrderExtensionUpdate) SetNillableChannelErrorCode ¶
func (oeu *OrderExtensionUpdate) SetNillableChannelErrorCode(s *string) *OrderExtensionUpdate
SetNillableChannelErrorCode sets the "channel_error_code" field if the given value is not nil.
func (*OrderExtensionUpdate) SetNillableChannelErrorMsg ¶
func (oeu *OrderExtensionUpdate) SetNillableChannelErrorMsg(s *string) *OrderExtensionUpdate
SetNillableChannelErrorMsg sets the "channel_error_msg" field if the given value is not nil.
func (*OrderExtensionUpdate) SetNillableChannelNotifyData ¶
func (oeu *OrderExtensionUpdate) SetNillableChannelNotifyData(s *string) *OrderExtensionUpdate
SetNillableChannelNotifyData sets the "channel_notify_data" field if the given value is not nil.
func (*OrderExtensionUpdate) SetNillableDeletedAt ¶
func (oeu *OrderExtensionUpdate) SetNillableDeletedAt(t *time.Time) *OrderExtensionUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*OrderExtensionUpdate) SetNillableNo ¶ added in v1.1.0
func (oeu *OrderExtensionUpdate) SetNillableNo(s *string) *OrderExtensionUpdate
SetNillableNo sets the "no" field if the given value is not nil.
func (*OrderExtensionUpdate) SetNillableOrderID ¶ added in v1.1.0
func (oeu *OrderExtensionUpdate) SetNillableOrderID(u *uint64) *OrderExtensionUpdate
SetNillableOrderID sets the "order_id" field if the given value is not nil.
func (*OrderExtensionUpdate) SetNillableStatus ¶
func (oeu *OrderExtensionUpdate) SetNillableStatus(u *uint8) *OrderExtensionUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*OrderExtensionUpdate) SetNillableUserIP ¶ added in v1.1.0
func (oeu *OrderExtensionUpdate) SetNillableUserIP(s *string) *OrderExtensionUpdate
SetNillableUserIP sets the "user_ip" field if the given value is not nil.
func (*OrderExtensionUpdate) SetNo ¶
func (oeu *OrderExtensionUpdate) SetNo(s string) *OrderExtensionUpdate
SetNo sets the "no" field.
func (*OrderExtensionUpdate) SetNotNilChannelCode ¶
func (oe *OrderExtensionUpdate) SetNotNilChannelCode(value *string) *OrderExtensionUpdate
set field if value's pointer is not nil.
func (*OrderExtensionUpdate) SetNotNilChannelErrorCode ¶
func (oe *OrderExtensionUpdate) SetNotNilChannelErrorCode(value *string) *OrderExtensionUpdate
set field if value's pointer is not nil.
func (*OrderExtensionUpdate) SetNotNilChannelErrorMsg ¶
func (oe *OrderExtensionUpdate) SetNotNilChannelErrorMsg(value *string) *OrderExtensionUpdate
set field if value's pointer is not nil.
func (*OrderExtensionUpdate) SetNotNilChannelExtras ¶
func (oe *OrderExtensionUpdate) SetNotNilChannelExtras(value *map[string]string) *OrderExtensionUpdate
set field if value's pointer is not nil.
func (*OrderExtensionUpdate) SetNotNilChannelNotifyData ¶
func (oe *OrderExtensionUpdate) SetNotNilChannelNotifyData(value *string) *OrderExtensionUpdate
set field if value's pointer is not nil.
func (*OrderExtensionUpdate) SetNotNilDeletedAt ¶
func (oe *OrderExtensionUpdate) SetNotNilDeletedAt(value *time.Time) *OrderExtensionUpdate
set field if value's pointer is not nil.
func (*OrderExtensionUpdate) SetNotNilNo ¶
func (oe *OrderExtensionUpdate) SetNotNilNo(value *string) *OrderExtensionUpdate
set field if value's pointer is not nil.
func (*OrderExtensionUpdate) SetNotNilOrderID ¶
func (oe *OrderExtensionUpdate) SetNotNilOrderID(value *uint64) *OrderExtensionUpdate
set field if value's pointer is not nil.
func (*OrderExtensionUpdate) SetNotNilStatus ¶
func (oe *OrderExtensionUpdate) SetNotNilStatus(value *uint8) *OrderExtensionUpdate
set field if value's pointer is not nil.
func (*OrderExtensionUpdate) SetNotNilUpdatedAt ¶
func (oe *OrderExtensionUpdate) SetNotNilUpdatedAt(value *time.Time) *OrderExtensionUpdate
set field if value's pointer is not nil.
func (*OrderExtensionUpdate) SetNotNilUserIP ¶
func (oe *OrderExtensionUpdate) SetNotNilUserIP(value *string) *OrderExtensionUpdate
set field if value's pointer is not nil.
func (*OrderExtensionUpdate) SetOrderID ¶
func (oeu *OrderExtensionUpdate) SetOrderID(u uint64) *OrderExtensionUpdate
SetOrderID sets the "order_id" field.
func (*OrderExtensionUpdate) SetStatus ¶
func (oeu *OrderExtensionUpdate) SetStatus(u uint8) *OrderExtensionUpdate
SetStatus sets the "status" field.
func (*OrderExtensionUpdate) SetUpdatedAt ¶
func (oeu *OrderExtensionUpdate) SetUpdatedAt(t time.Time) *OrderExtensionUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OrderExtensionUpdate) SetUserIP ¶
func (oeu *OrderExtensionUpdate) SetUserIP(s string) *OrderExtensionUpdate
SetUserIP sets the "user_ip" field.
func (*OrderExtensionUpdate) Where ¶
func (oeu *OrderExtensionUpdate) Where(ps ...predicate.OrderExtension) *OrderExtensionUpdate
Where appends a list predicates to the OrderExtensionUpdate builder.
type OrderExtensionUpdateOne ¶
type OrderExtensionUpdateOne struct {
// contains filtered or unexported fields
}
OrderExtensionUpdateOne is the builder for updating a single OrderExtension entity.
func (*OrderExtensionUpdateOne) AddOrderID ¶
func (oeuo *OrderExtensionUpdateOne) AddOrderID(u int64) *OrderExtensionUpdateOne
AddOrderID adds u to the "order_id" field.
func (*OrderExtensionUpdateOne) AddStatus ¶
func (oeuo *OrderExtensionUpdateOne) AddStatus(u int8) *OrderExtensionUpdateOne
AddStatus adds u to the "status" field.
func (*OrderExtensionUpdateOne) ClearChannelErrorCode ¶
func (oeuo *OrderExtensionUpdateOne) ClearChannelErrorCode() *OrderExtensionUpdateOne
ClearChannelErrorCode clears the value of the "channel_error_code" field.
func (*OrderExtensionUpdateOne) ClearChannelErrorMsg ¶
func (oeuo *OrderExtensionUpdateOne) ClearChannelErrorMsg() *OrderExtensionUpdateOne
ClearChannelErrorMsg clears the value of the "channel_error_msg" field.
func (*OrderExtensionUpdateOne) ClearChannelExtras ¶
func (oeuo *OrderExtensionUpdateOne) ClearChannelExtras() *OrderExtensionUpdateOne
ClearChannelExtras clears the value of the "channel_extras" field.
func (*OrderExtensionUpdateOne) ClearChannelNotifyData ¶
func (oeuo *OrderExtensionUpdateOne) ClearChannelNotifyData() *OrderExtensionUpdateOne
ClearChannelNotifyData clears the value of the "channel_notify_data" field.
func (*OrderExtensionUpdateOne) ClearDeletedAt ¶
func (oeuo *OrderExtensionUpdateOne) ClearDeletedAt() *OrderExtensionUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OrderExtensionUpdateOne) ClearStatus ¶
func (oeuo *OrderExtensionUpdateOne) ClearStatus() *OrderExtensionUpdateOne
ClearStatus clears the value of the "status" field.
func (*OrderExtensionUpdateOne) Exec ¶
func (oeuo *OrderExtensionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrderExtensionUpdateOne) ExecX ¶
func (oeuo *OrderExtensionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderExtensionUpdateOne) Mutation ¶
func (oeuo *OrderExtensionUpdateOne) Mutation() *OrderExtensionMutation
Mutation returns the OrderExtensionMutation object of the builder.
func (*OrderExtensionUpdateOne) Save ¶
func (oeuo *OrderExtensionUpdateOne) Save(ctx context.Context) (*OrderExtension, error)
Save executes the query and returns the updated OrderExtension entity.
func (*OrderExtensionUpdateOne) SaveX ¶
func (oeuo *OrderExtensionUpdateOne) SaveX(ctx context.Context) *OrderExtension
SaveX is like Save, but panics if an error occurs.
func (*OrderExtensionUpdateOne) Select ¶
func (oeuo *OrderExtensionUpdateOne) Select(field string, fields ...string) *OrderExtensionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrderExtensionUpdateOne) SetChannelCode ¶
func (oeuo *OrderExtensionUpdateOne) SetChannelCode(s string) *OrderExtensionUpdateOne
SetChannelCode sets the "channel_code" field.
func (*OrderExtensionUpdateOne) SetChannelErrorCode ¶
func (oeuo *OrderExtensionUpdateOne) SetChannelErrorCode(s string) *OrderExtensionUpdateOne
SetChannelErrorCode sets the "channel_error_code" field.
func (*OrderExtensionUpdateOne) SetChannelErrorMsg ¶
func (oeuo *OrderExtensionUpdateOne) SetChannelErrorMsg(s string) *OrderExtensionUpdateOne
SetChannelErrorMsg sets the "channel_error_msg" field.
func (*OrderExtensionUpdateOne) SetChannelExtras ¶
func (oeuo *OrderExtensionUpdateOne) SetChannelExtras(m map[string]string) *OrderExtensionUpdateOne
SetChannelExtras sets the "channel_extras" field.
func (*OrderExtensionUpdateOne) SetChannelNotifyData ¶
func (oeuo *OrderExtensionUpdateOne) SetChannelNotifyData(s string) *OrderExtensionUpdateOne
SetChannelNotifyData sets the "channel_notify_data" field.
func (*OrderExtensionUpdateOne) SetDeletedAt ¶
func (oeuo *OrderExtensionUpdateOne) SetDeletedAt(t time.Time) *OrderExtensionUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*OrderExtensionUpdateOne) SetNillableChannelCode ¶ added in v1.1.0
func (oeuo *OrderExtensionUpdateOne) SetNillableChannelCode(s *string) *OrderExtensionUpdateOne
SetNillableChannelCode sets the "channel_code" field if the given value is not nil.
func (*OrderExtensionUpdateOne) SetNillableChannelErrorCode ¶
func (oeuo *OrderExtensionUpdateOne) SetNillableChannelErrorCode(s *string) *OrderExtensionUpdateOne
SetNillableChannelErrorCode sets the "channel_error_code" field if the given value is not nil.
func (*OrderExtensionUpdateOne) SetNillableChannelErrorMsg ¶
func (oeuo *OrderExtensionUpdateOne) SetNillableChannelErrorMsg(s *string) *OrderExtensionUpdateOne
SetNillableChannelErrorMsg sets the "channel_error_msg" field if the given value is not nil.
func (*OrderExtensionUpdateOne) SetNillableChannelNotifyData ¶
func (oeuo *OrderExtensionUpdateOne) SetNillableChannelNotifyData(s *string) *OrderExtensionUpdateOne
SetNillableChannelNotifyData sets the "channel_notify_data" field if the given value is not nil.
func (*OrderExtensionUpdateOne) SetNillableDeletedAt ¶
func (oeuo *OrderExtensionUpdateOne) SetNillableDeletedAt(t *time.Time) *OrderExtensionUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*OrderExtensionUpdateOne) SetNillableNo ¶ added in v1.1.0
func (oeuo *OrderExtensionUpdateOne) SetNillableNo(s *string) *OrderExtensionUpdateOne
SetNillableNo sets the "no" field if the given value is not nil.
func (*OrderExtensionUpdateOne) SetNillableOrderID ¶ added in v1.1.0
func (oeuo *OrderExtensionUpdateOne) SetNillableOrderID(u *uint64) *OrderExtensionUpdateOne
SetNillableOrderID sets the "order_id" field if the given value is not nil.
func (*OrderExtensionUpdateOne) SetNillableStatus ¶
func (oeuo *OrderExtensionUpdateOne) SetNillableStatus(u *uint8) *OrderExtensionUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*OrderExtensionUpdateOne) SetNillableUserIP ¶ added in v1.1.0
func (oeuo *OrderExtensionUpdateOne) SetNillableUserIP(s *string) *OrderExtensionUpdateOne
SetNillableUserIP sets the "user_ip" field if the given value is not nil.
func (*OrderExtensionUpdateOne) SetNo ¶
func (oeuo *OrderExtensionUpdateOne) SetNo(s string) *OrderExtensionUpdateOne
SetNo sets the "no" field.
func (*OrderExtensionUpdateOne) SetNotNilChannelCode ¶
func (oe *OrderExtensionUpdateOne) SetNotNilChannelCode(value *string) *OrderExtensionUpdateOne
set field if value's pointer is not nil.
func (*OrderExtensionUpdateOne) SetNotNilChannelErrorCode ¶
func (oe *OrderExtensionUpdateOne) SetNotNilChannelErrorCode(value *string) *OrderExtensionUpdateOne
set field if value's pointer is not nil.
func (*OrderExtensionUpdateOne) SetNotNilChannelErrorMsg ¶
func (oe *OrderExtensionUpdateOne) SetNotNilChannelErrorMsg(value *string) *OrderExtensionUpdateOne
set field if value's pointer is not nil.
func (*OrderExtensionUpdateOne) SetNotNilChannelExtras ¶
func (oe *OrderExtensionUpdateOne) SetNotNilChannelExtras(value *map[string]string) *OrderExtensionUpdateOne
set field if value's pointer is not nil.
func (*OrderExtensionUpdateOne) SetNotNilChannelNotifyData ¶
func (oe *OrderExtensionUpdateOne) SetNotNilChannelNotifyData(value *string) *OrderExtensionUpdateOne
set field if value's pointer is not nil.
func (*OrderExtensionUpdateOne) SetNotNilDeletedAt ¶
func (oe *OrderExtensionUpdateOne) SetNotNilDeletedAt(value *time.Time) *OrderExtensionUpdateOne
set field if value's pointer is not nil.
func (*OrderExtensionUpdateOne) SetNotNilNo ¶
func (oe *OrderExtensionUpdateOne) SetNotNilNo(value *string) *OrderExtensionUpdateOne
set field if value's pointer is not nil.
func (*OrderExtensionUpdateOne) SetNotNilOrderID ¶
func (oe *OrderExtensionUpdateOne) SetNotNilOrderID(value *uint64) *OrderExtensionUpdateOne
set field if value's pointer is not nil.
func (*OrderExtensionUpdateOne) SetNotNilStatus ¶
func (oe *OrderExtensionUpdateOne) SetNotNilStatus(value *uint8) *OrderExtensionUpdateOne
set field if value's pointer is not nil.
func (*OrderExtensionUpdateOne) SetNotNilUpdatedAt ¶
func (oe *OrderExtensionUpdateOne) SetNotNilUpdatedAt(value *time.Time) *OrderExtensionUpdateOne
set field if value's pointer is not nil.
func (*OrderExtensionUpdateOne) SetNotNilUserIP ¶
func (oe *OrderExtensionUpdateOne) SetNotNilUserIP(value *string) *OrderExtensionUpdateOne
set field if value's pointer is not nil.
func (*OrderExtensionUpdateOne) SetOrderID ¶
func (oeuo *OrderExtensionUpdateOne) SetOrderID(u uint64) *OrderExtensionUpdateOne
SetOrderID sets the "order_id" field.
func (*OrderExtensionUpdateOne) SetStatus ¶
func (oeuo *OrderExtensionUpdateOne) SetStatus(u uint8) *OrderExtensionUpdateOne
SetStatus sets the "status" field.
func (*OrderExtensionUpdateOne) SetUpdatedAt ¶
func (oeuo *OrderExtensionUpdateOne) SetUpdatedAt(t time.Time) *OrderExtensionUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OrderExtensionUpdateOne) SetUserIP ¶
func (oeuo *OrderExtensionUpdateOne) SetUserIP(s string) *OrderExtensionUpdateOne
SetUserIP sets the "user_ip" field.
func (*OrderExtensionUpdateOne) Where ¶
func (oeuo *OrderExtensionUpdateOne) Where(ps ...predicate.OrderExtension) *OrderExtensionUpdateOne
Where appends a list predicates to the OrderExtensionUpdate builder.
type OrderExtensions ¶
type OrderExtensions []*OrderExtension
OrderExtensions is a parsable slice of OrderExtension.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type OrderGroupBy ¶
type OrderGroupBy struct {
// contains filtered or unexported fields
}
OrderGroupBy is the group-by builder for Order entities.
func (*OrderGroupBy) Aggregate ¶
func (ogb *OrderGroupBy) Aggregate(fns ...AggregateFunc) *OrderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OrderGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderGroupBy) Scan ¶
func (ogb *OrderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderMutation ¶
type OrderMutation struct {
// contains filtered or unexported fields
}
OrderMutation represents an operation that mutates the Order nodes in the graph.
func (*OrderMutation) AddChannelFeePrice ¶
func (m *OrderMutation) AddChannelFeePrice(i int32)
AddChannelFeePrice adds i to the "channel_fee_price" field.
func (*OrderMutation) AddChannelFeeRate ¶
func (m *OrderMutation) AddChannelFeeRate(f float64)
AddChannelFeeRate adds f to the "channel_fee_rate" field.
func (*OrderMutation) AddExtensionID ¶
func (m *OrderMutation) AddExtensionID(u int64)
AddExtensionID adds u to the "extension_id" field.
func (*OrderMutation) AddField ¶
func (m *OrderMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*OrderMutation) AddPrice ¶
func (m *OrderMutation) AddPrice(i int32)
AddPrice adds i to the "price" field.
func (*OrderMutation) AddRefundPrice ¶
func (m *OrderMutation) AddRefundPrice(i int32)
AddRefundPrice adds i to the "refund_price" field.
func (*OrderMutation) AddStatus ¶
func (m *OrderMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*OrderMutation) AddedChannelFeePrice ¶
func (m *OrderMutation) AddedChannelFeePrice() (r int32, exists bool)
AddedChannelFeePrice returns the value that was added to the "channel_fee_price" field in this mutation.
func (*OrderMutation) AddedChannelFeeRate ¶
func (m *OrderMutation) AddedChannelFeeRate() (r float64, exists bool)
AddedChannelFeeRate returns the value that was added to the "channel_fee_rate" field in this mutation.
func (*OrderMutation) AddedEdges ¶
func (m *OrderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OrderMutation) AddedExtensionID ¶
func (m *OrderMutation) AddedExtensionID() (r int64, exists bool)
AddedExtensionID returns the value that was added to the "extension_id" field in this mutation.
func (*OrderMutation) AddedField ¶
func (m *OrderMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*OrderMutation) AddedFields ¶
func (m *OrderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OrderMutation) AddedIDs ¶
func (m *OrderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OrderMutation) AddedPrice ¶
func (m *OrderMutation) AddedPrice() (r int32, exists bool)
AddedPrice returns the value that was added to the "price" field in this mutation.
func (*OrderMutation) AddedRefundPrice ¶
func (m *OrderMutation) AddedRefundPrice() (r int32, exists bool)
AddedRefundPrice returns the value that was added to the "refund_price" field in this mutation.
func (*OrderMutation) AddedStatus ¶
func (m *OrderMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*OrderMutation) Body ¶
func (m *OrderMutation) Body() (r string, exists bool)
Body returns the value of the "body" field in the mutation.
func (*OrderMutation) ChannelCode ¶
func (m *OrderMutation) ChannelCode() (r string, exists bool)
ChannelCode returns the value of the "channel_code" field in the mutation.
func (*OrderMutation) ChannelCodeCleared ¶
func (m *OrderMutation) ChannelCodeCleared() bool
ChannelCodeCleared returns if the "channel_code" field was cleared in this mutation.
func (*OrderMutation) ChannelFeePrice ¶
func (m *OrderMutation) ChannelFeePrice() (r int32, exists bool)
ChannelFeePrice returns the value of the "channel_fee_price" field in the mutation.
func (*OrderMutation) ChannelFeePriceCleared ¶
func (m *OrderMutation) ChannelFeePriceCleared() bool
ChannelFeePriceCleared returns if the "channel_fee_price" field was cleared in this mutation.
func (*OrderMutation) ChannelFeeRate ¶
func (m *OrderMutation) ChannelFeeRate() (r float64, exists bool)
ChannelFeeRate returns the value of the "channel_fee_rate" field in the mutation.
func (*OrderMutation) ChannelFeeRateCleared ¶
func (m *OrderMutation) ChannelFeeRateCleared() bool
ChannelFeeRateCleared returns if the "channel_fee_rate" field was cleared in this mutation.
func (*OrderMutation) ChannelOrderNo ¶
func (m *OrderMutation) ChannelOrderNo() (r string, exists bool)
ChannelOrderNo returns the value of the "channel_order_no" field in the mutation.
func (*OrderMutation) ChannelOrderNoCleared ¶
func (m *OrderMutation) ChannelOrderNoCleared() bool
ChannelOrderNoCleared returns if the "channel_order_no" field was cleared in this mutation.
func (*OrderMutation) ChannelUserID ¶
func (m *OrderMutation) ChannelUserID() (r string, exists bool)
ChannelUserID returns the value of the "channel_user_id" field in the mutation.
func (*OrderMutation) ChannelUserIDCleared ¶
func (m *OrderMutation) ChannelUserIDCleared() bool
ChannelUserIDCleared returns if the "channel_user_id" field was cleared in this mutation.
func (*OrderMutation) ClearChannelCode ¶
func (m *OrderMutation) ClearChannelCode()
ClearChannelCode clears the value of the "channel_code" field.
func (*OrderMutation) ClearChannelFeePrice ¶
func (m *OrderMutation) ClearChannelFeePrice()
ClearChannelFeePrice clears the value of the "channel_fee_price" field.
func (*OrderMutation) ClearChannelFeeRate ¶
func (m *OrderMutation) ClearChannelFeeRate()
ClearChannelFeeRate clears the value of the "channel_fee_rate" field.
func (*OrderMutation) ClearChannelOrderNo ¶
func (m *OrderMutation) ClearChannelOrderNo()
ClearChannelOrderNo clears the value of the "channel_order_no" field.
func (*OrderMutation) ClearChannelUserID ¶
func (m *OrderMutation) ClearChannelUserID()
ClearChannelUserID clears the value of the "channel_user_id" field.
func (*OrderMutation) ClearDeletedAt ¶
func (m *OrderMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OrderMutation) ClearEdge ¶
func (m *OrderMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*OrderMutation) ClearExtensionID ¶
func (m *OrderMutation) ClearExtensionID()
ClearExtensionID clears the value of the "extension_id" field.
func (*OrderMutation) ClearField ¶
func (m *OrderMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*OrderMutation) ClearNo ¶
func (m *OrderMutation) ClearNo()
ClearNo clears the value of the "no" field.
func (*OrderMutation) ClearNotifyTime ¶
func (m *OrderMutation) ClearNotifyTime()
ClearNotifyTime clears the value of the "notify_time" field.
func (*OrderMutation) ClearStatus ¶
func (m *OrderMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*OrderMutation) ClearSuccessTime ¶
func (m *OrderMutation) ClearSuccessTime()
ClearSuccessTime clears the value of the "success_time" field.
func (*OrderMutation) ClearedEdges ¶
func (m *OrderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OrderMutation) ClearedFields ¶
func (m *OrderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OrderMutation) Client ¶
func (m OrderMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*OrderMutation) CreatedAt ¶
func (m *OrderMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OrderMutation) DeletedAt ¶
func (m *OrderMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*OrderMutation) DeletedAtCleared ¶
func (m *OrderMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*OrderMutation) EdgeCleared ¶
func (m *OrderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OrderMutation) ExpireTime ¶
func (m *OrderMutation) ExpireTime() (r time.Time, exists bool)
ExpireTime returns the value of the "expire_time" field in the mutation.
func (*OrderMutation) ExtensionID ¶
func (m *OrderMutation) ExtensionID() (r uint64, exists bool)
ExtensionID returns the value of the "extension_id" field in the mutation.
func (*OrderMutation) ExtensionIDCleared ¶
func (m *OrderMutation) ExtensionIDCleared() bool
ExtensionIDCleared returns if the "extension_id" field was cleared in this mutation.
func (*OrderMutation) Field ¶
func (m *OrderMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*OrderMutation) FieldCleared ¶
func (m *OrderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OrderMutation) Fields ¶
func (m *OrderMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*OrderMutation) ID ¶
func (m *OrderMutation) 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 (*OrderMutation) IDs ¶
func (m *OrderMutation) 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 (*OrderMutation) MerchantOrderID ¶
func (m *OrderMutation) MerchantOrderID() (r string, exists bool)
MerchantOrderID returns the value of the "merchant_order_id" field in the mutation.
func (*OrderMutation) No ¶
func (m *OrderMutation) No() (r string, exists bool)
No returns the value of the "no" field in the mutation.
func (*OrderMutation) NoCleared ¶
func (m *OrderMutation) NoCleared() bool
NoCleared returns if the "no" field was cleared in this mutation.
func (*OrderMutation) NotifyTime ¶
func (m *OrderMutation) NotifyTime() (r time.Time, exists bool)
NotifyTime returns the value of the "notify_time" field in the mutation.
func (*OrderMutation) NotifyTimeCleared ¶
func (m *OrderMutation) NotifyTimeCleared() bool
NotifyTimeCleared returns if the "notify_time" field was cleared in this mutation.
func (*OrderMutation) OldBody ¶
func (m *OrderMutation) OldBody(ctx context.Context) (v string, err error)
OldBody returns the old "body" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldChannelCode ¶
func (m *OrderMutation) OldChannelCode(ctx context.Context) (v string, err error)
OldChannelCode returns the old "channel_code" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldChannelFeePrice ¶
func (m *OrderMutation) OldChannelFeePrice(ctx context.Context) (v int32, err error)
OldChannelFeePrice returns the old "channel_fee_price" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldChannelFeeRate ¶
func (m *OrderMutation) OldChannelFeeRate(ctx context.Context) (v float64, err error)
OldChannelFeeRate returns the old "channel_fee_rate" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldChannelOrderNo ¶
func (m *OrderMutation) OldChannelOrderNo(ctx context.Context) (v string, err error)
OldChannelOrderNo returns the old "channel_order_no" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldChannelUserID ¶
func (m *OrderMutation) OldChannelUserID(ctx context.Context) (v string, err error)
OldChannelUserID returns the old "channel_user_id" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldExpireTime ¶
OldExpireTime returns the old "expire_time" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldExtensionID ¶
func (m *OrderMutation) OldExtensionID(ctx context.Context) (v uint64, err error)
OldExtensionID returns the old "extension_id" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*OrderMutation) OldMerchantOrderID ¶
func (m *OrderMutation) OldMerchantOrderID(ctx context.Context) (v string, err error)
OldMerchantOrderID returns the old "merchant_order_id" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldNo ¶
func (m *OrderMutation) OldNo(ctx context.Context) (v string, err error)
OldNo returns the old "no" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldNotifyTime ¶
OldNotifyTime returns the old "notify_time" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldPrice ¶
func (m *OrderMutation) OldPrice(ctx context.Context) (v int32, err error)
OldPrice returns the old "price" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldRefundPrice ¶
func (m *OrderMutation) OldRefundPrice(ctx context.Context) (v int32, err error)
OldRefundPrice returns the old "refund_price" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldStatus ¶
func (m *OrderMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldSubject ¶
func (m *OrderMutation) OldSubject(ctx context.Context) (v string, err error)
OldSubject returns the old "subject" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldSuccessTime ¶
OldSuccessTime returns the old "success_time" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) OldUserIP ¶
func (m *OrderMutation) OldUserIP(ctx context.Context) (v string, err error)
OldUserIP returns the old "user_ip" field's value of the Order entity. If the Order object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OrderMutation) Price ¶
func (m *OrderMutation) Price() (r int32, exists bool)
Price returns the value of the "price" field in the mutation.
func (*OrderMutation) RefundPrice ¶
func (m *OrderMutation) RefundPrice() (r int32, exists bool)
RefundPrice returns the value of the "refund_price" field in the mutation.
func (*OrderMutation) RemovedEdges ¶
func (m *OrderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OrderMutation) RemovedIDs ¶
func (m *OrderMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*OrderMutation) ResetBody ¶
func (m *OrderMutation) ResetBody()
ResetBody resets all changes to the "body" field.
func (*OrderMutation) ResetChannelCode ¶
func (m *OrderMutation) ResetChannelCode()
ResetChannelCode resets all changes to the "channel_code" field.
func (*OrderMutation) ResetChannelFeePrice ¶
func (m *OrderMutation) ResetChannelFeePrice()
ResetChannelFeePrice resets all changes to the "channel_fee_price" field.
func (*OrderMutation) ResetChannelFeeRate ¶
func (m *OrderMutation) ResetChannelFeeRate()
ResetChannelFeeRate resets all changes to the "channel_fee_rate" field.
func (*OrderMutation) ResetChannelOrderNo ¶
func (m *OrderMutation) ResetChannelOrderNo()
ResetChannelOrderNo resets all changes to the "channel_order_no" field.
func (*OrderMutation) ResetChannelUserID ¶
func (m *OrderMutation) ResetChannelUserID()
ResetChannelUserID resets all changes to the "channel_user_id" field.
func (*OrderMutation) ResetCreatedAt ¶
func (m *OrderMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OrderMutation) ResetDeletedAt ¶
func (m *OrderMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*OrderMutation) ResetEdge ¶
func (m *OrderMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*OrderMutation) ResetExpireTime ¶
func (m *OrderMutation) ResetExpireTime()
ResetExpireTime resets all changes to the "expire_time" field.
func (*OrderMutation) ResetExtensionID ¶
func (m *OrderMutation) ResetExtensionID()
ResetExtensionID resets all changes to the "extension_id" field.
func (*OrderMutation) ResetField ¶
func (m *OrderMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*OrderMutation) ResetMerchantOrderID ¶
func (m *OrderMutation) ResetMerchantOrderID()
ResetMerchantOrderID resets all changes to the "merchant_order_id" field.
func (*OrderMutation) ResetNo ¶
func (m *OrderMutation) ResetNo()
ResetNo resets all changes to the "no" field.
func (*OrderMutation) ResetNotifyTime ¶
func (m *OrderMutation) ResetNotifyTime()
ResetNotifyTime resets all changes to the "notify_time" field.
func (*OrderMutation) ResetPrice ¶
func (m *OrderMutation) ResetPrice()
ResetPrice resets all changes to the "price" field.
func (*OrderMutation) ResetRefundPrice ¶
func (m *OrderMutation) ResetRefundPrice()
ResetRefundPrice resets all changes to the "refund_price" field.
func (*OrderMutation) ResetStatus ¶
func (m *OrderMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*OrderMutation) ResetSubject ¶
func (m *OrderMutation) ResetSubject()
ResetSubject resets all changes to the "subject" field.
func (*OrderMutation) ResetSuccessTime ¶
func (m *OrderMutation) ResetSuccessTime()
ResetSuccessTime resets all changes to the "success_time" field.
func (*OrderMutation) ResetUpdatedAt ¶
func (m *OrderMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OrderMutation) ResetUserIP ¶
func (m *OrderMutation) ResetUserIP()
ResetUserIP resets all changes to the "user_ip" field.
func (*OrderMutation) SetBody ¶
func (m *OrderMutation) SetBody(s string)
SetBody sets the "body" field.
func (*OrderMutation) SetChannelCode ¶
func (m *OrderMutation) SetChannelCode(s string)
SetChannelCode sets the "channel_code" field.
func (*OrderMutation) SetChannelFeePrice ¶
func (m *OrderMutation) SetChannelFeePrice(i int32)
SetChannelFeePrice sets the "channel_fee_price" field.
func (*OrderMutation) SetChannelFeeRate ¶
func (m *OrderMutation) SetChannelFeeRate(f float64)
SetChannelFeeRate sets the "channel_fee_rate" field.
func (*OrderMutation) SetChannelOrderNo ¶
func (m *OrderMutation) SetChannelOrderNo(s string)
SetChannelOrderNo sets the "channel_order_no" field.
func (*OrderMutation) SetChannelUserID ¶
func (m *OrderMutation) SetChannelUserID(s string)
SetChannelUserID sets the "channel_user_id" field.
func (*OrderMutation) SetCreatedAt ¶
func (m *OrderMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OrderMutation) SetDeletedAt ¶
func (m *OrderMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*OrderMutation) SetExpireTime ¶
func (m *OrderMutation) SetExpireTime(t time.Time)
SetExpireTime sets the "expire_time" field.
func (*OrderMutation) SetExtensionID ¶
func (m *OrderMutation) SetExtensionID(u uint64)
SetExtensionID sets the "extension_id" field.
func (*OrderMutation) SetField ¶
func (m *OrderMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*OrderMutation) SetID ¶
func (m *OrderMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Order entities.
func (*OrderMutation) SetMerchantOrderID ¶
func (m *OrderMutation) SetMerchantOrderID(s string)
SetMerchantOrderID sets the "merchant_order_id" field.
func (*OrderMutation) SetNotifyTime ¶
func (m *OrderMutation) SetNotifyTime(t time.Time)
SetNotifyTime sets the "notify_time" field.
func (*OrderMutation) SetOp ¶
func (m *OrderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OrderMutation) SetPrice ¶
func (m *OrderMutation) SetPrice(i int32)
SetPrice sets the "price" field.
func (*OrderMutation) SetRefundPrice ¶
func (m *OrderMutation) SetRefundPrice(i int32)
SetRefundPrice sets the "refund_price" field.
func (*OrderMutation) SetStatus ¶
func (m *OrderMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*OrderMutation) SetSubject ¶
func (m *OrderMutation) SetSubject(s string)
SetSubject sets the "subject" field.
func (*OrderMutation) SetSuccessTime ¶
func (m *OrderMutation) SetSuccessTime(t time.Time)
SetSuccessTime sets the "success_time" field.
func (*OrderMutation) SetUpdatedAt ¶
func (m *OrderMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*OrderMutation) SetUserIP ¶
func (m *OrderMutation) SetUserIP(s string)
SetUserIP sets the "user_ip" field.
func (*OrderMutation) Status ¶
func (m *OrderMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*OrderMutation) StatusCleared ¶
func (m *OrderMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (*OrderMutation) Subject ¶
func (m *OrderMutation) Subject() (r string, exists bool)
Subject returns the value of the "subject" field in the mutation.
func (*OrderMutation) SuccessTime ¶
func (m *OrderMutation) SuccessTime() (r time.Time, exists bool)
SuccessTime returns the value of the "success_time" field in the mutation.
func (*OrderMutation) SuccessTimeCleared ¶
func (m *OrderMutation) SuccessTimeCleared() bool
SuccessTimeCleared returns if the "success_time" field was cleared in this mutation.
func (OrderMutation) Tx ¶
func (m OrderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OrderMutation) Type ¶
func (m *OrderMutation) Type() string
Type returns the node type of this mutation (Order).
func (*OrderMutation) UpdatedAt ¶
func (m *OrderMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OrderMutation) UserIP ¶
func (m *OrderMutation) UserIP() (r string, exists bool)
UserIP returns the value of the "user_ip" field in the mutation.
func (*OrderMutation) Where ¶
func (m *OrderMutation) Where(ps ...predicate.Order)
Where appends a list predicates to the OrderMutation builder.
func (*OrderMutation) WhereP ¶
func (m *OrderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OrderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OrderPageList ¶
type OrderPageList struct { List []*Order `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
OrderPageList is Order PageList result.
type OrderPager ¶
type OrderPager struct { Order order.OrderOption Filter func(*OrderQuery) (*OrderQuery, error) }
func (*OrderPager) ApplyFilter ¶
func (p *OrderPager) ApplyFilter(query *OrderQuery) (*OrderQuery, error)
type OrderPaginateOption ¶
type OrderPaginateOption func(*OrderPager)
OrderPaginateOption enables pagination customization.
type OrderQuery ¶
type OrderQuery struct {
// contains filtered or unexported fields
}
OrderQuery is the builder for querying Order entities.
func (*OrderQuery) Aggregate ¶
func (oq *OrderQuery) Aggregate(fns ...AggregateFunc) *OrderSelect
Aggregate returns a OrderSelect configured with the given aggregations.
func (*OrderQuery) All ¶
func (oq *OrderQuery) All(ctx context.Context) ([]*Order, error)
All executes the query and returns a list of Orders.
func (*OrderQuery) AllX ¶
func (oq *OrderQuery) AllX(ctx context.Context) []*Order
AllX is like All, but panics if an error occurs.
func (*OrderQuery) Clone ¶
func (oq *OrderQuery) Clone() *OrderQuery
Clone returns a duplicate of the OrderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OrderQuery) Count ¶
func (oq *OrderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OrderQuery) CountX ¶
func (oq *OrderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OrderQuery) Exist ¶
func (oq *OrderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OrderQuery) ExistX ¶
func (oq *OrderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OrderQuery) First ¶
func (oq *OrderQuery) First(ctx context.Context) (*Order, error)
First returns the first Order entity from the query. Returns a *NotFoundError when no Order was found.
func (*OrderQuery) FirstID ¶
func (oq *OrderQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Order ID from the query. Returns a *NotFoundError when no Order ID was found.
func (*OrderQuery) FirstIDX ¶
func (oq *OrderQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*OrderQuery) FirstX ¶
func (oq *OrderQuery) FirstX(ctx context.Context) *Order
FirstX is like First, but panics if an error occurs.
func (*OrderQuery) GroupBy ¶
func (oq *OrderQuery) GroupBy(field string, fields ...string) *OrderGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Order.Query(). GroupBy(order.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OrderQuery) IDs ¶
func (oq *OrderQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Order IDs.
func (*OrderQuery) IDsX ¶
func (oq *OrderQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*OrderQuery) Limit ¶
func (oq *OrderQuery) Limit(limit int) *OrderQuery
Limit the number of records to be returned by this query.
func (*OrderQuery) Offset ¶
func (oq *OrderQuery) Offset(offset int) *OrderQuery
Offset to start from.
func (*OrderQuery) Only ¶
func (oq *OrderQuery) Only(ctx context.Context) (*Order, error)
Only returns a single Order entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Order entity is found. Returns a *NotFoundError when no Order entities are found.
func (*OrderQuery) OnlyID ¶
func (oq *OrderQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Order ID in the query. Returns a *NotSingularError when more than one Order ID is found. Returns a *NotFoundError when no entities are found.
func (*OrderQuery) OnlyIDX ¶
func (oq *OrderQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OrderQuery) OnlyX ¶
func (oq *OrderQuery) OnlyX(ctx context.Context) *Order
OnlyX is like Only, but panics if an error occurs.
func (*OrderQuery) Order ¶
func (oq *OrderQuery) Order(o ...order.OrderOption) *OrderQuery
Order specifies how the records should be ordered.
func (*OrderQuery) Page ¶
func (o *OrderQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...OrderPaginateOption, ) (*OrderPageList, error)
func (*OrderQuery) Select ¶
func (oq *OrderQuery) Select(fields ...string) *OrderSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Order.Query(). Select(order.FieldCreatedAt). Scan(ctx, &v)
func (*OrderQuery) Unique ¶
func (oq *OrderQuery) Unique(unique bool) *OrderQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*OrderQuery) Where ¶
func (oq *OrderQuery) Where(ps ...predicate.Order) *OrderQuery
Where adds a new predicate for the OrderQuery builder.
type OrderSelect ¶
type OrderSelect struct { *OrderQuery // contains filtered or unexported fields }
OrderSelect is the builder for selecting fields of Order entities.
func (*OrderSelect) Aggregate ¶
func (os *OrderSelect) Aggregate(fns ...AggregateFunc) *OrderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OrderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OrderSelect) Scan ¶
func (os *OrderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OrderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OrderUpdate ¶
type OrderUpdate struct {
// contains filtered or unexported fields
}
OrderUpdate is the builder for updating Order entities.
func (*OrderUpdate) AddChannelFeePrice ¶
func (ou *OrderUpdate) AddChannelFeePrice(i int32) *OrderUpdate
AddChannelFeePrice adds i to the "channel_fee_price" field.
func (*OrderUpdate) AddChannelFeeRate ¶
func (ou *OrderUpdate) AddChannelFeeRate(f float64) *OrderUpdate
AddChannelFeeRate adds f to the "channel_fee_rate" field.
func (*OrderUpdate) AddExtensionID ¶
func (ou *OrderUpdate) AddExtensionID(u int64) *OrderUpdate
AddExtensionID adds u to the "extension_id" field.
func (*OrderUpdate) AddPrice ¶
func (ou *OrderUpdate) AddPrice(i int32) *OrderUpdate
AddPrice adds i to the "price" field.
func (*OrderUpdate) AddRefundPrice ¶
func (ou *OrderUpdate) AddRefundPrice(i int32) *OrderUpdate
AddRefundPrice adds i to the "refund_price" field.
func (*OrderUpdate) AddStatus ¶
func (ou *OrderUpdate) AddStatus(u int8) *OrderUpdate
AddStatus adds u to the "status" field.
func (*OrderUpdate) ClearChannelCode ¶
func (ou *OrderUpdate) ClearChannelCode() *OrderUpdate
ClearChannelCode clears the value of the "channel_code" field.
func (*OrderUpdate) ClearChannelFeePrice ¶
func (ou *OrderUpdate) ClearChannelFeePrice() *OrderUpdate
ClearChannelFeePrice clears the value of the "channel_fee_price" field.
func (*OrderUpdate) ClearChannelFeeRate ¶
func (ou *OrderUpdate) ClearChannelFeeRate() *OrderUpdate
ClearChannelFeeRate clears the value of the "channel_fee_rate" field.
func (*OrderUpdate) ClearChannelOrderNo ¶
func (ou *OrderUpdate) ClearChannelOrderNo() *OrderUpdate
ClearChannelOrderNo clears the value of the "channel_order_no" field.
func (*OrderUpdate) ClearChannelUserID ¶
func (ou *OrderUpdate) ClearChannelUserID() *OrderUpdate
ClearChannelUserID clears the value of the "channel_user_id" field.
func (*OrderUpdate) ClearDeletedAt ¶
func (ou *OrderUpdate) ClearDeletedAt() *OrderUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OrderUpdate) ClearExtensionID ¶
func (ou *OrderUpdate) ClearExtensionID() *OrderUpdate
ClearExtensionID clears the value of the "extension_id" field.
func (*OrderUpdate) ClearNo ¶
func (ou *OrderUpdate) ClearNo() *OrderUpdate
ClearNo clears the value of the "no" field.
func (*OrderUpdate) ClearNotifyTime ¶
func (ou *OrderUpdate) ClearNotifyTime() *OrderUpdate
ClearNotifyTime clears the value of the "notify_time" field.
func (*OrderUpdate) ClearStatus ¶
func (ou *OrderUpdate) ClearStatus() *OrderUpdate
ClearStatus clears the value of the "status" field.
func (*OrderUpdate) ClearSuccessTime ¶
func (ou *OrderUpdate) ClearSuccessTime() *OrderUpdate
ClearSuccessTime clears the value of the "success_time" field.
func (*OrderUpdate) Exec ¶
func (ou *OrderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OrderUpdate) ExecX ¶
func (ou *OrderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpdate) Mutation ¶
func (ou *OrderUpdate) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderUpdate) Save ¶
func (ou *OrderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OrderUpdate) SaveX ¶
func (ou *OrderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OrderUpdate) SetBody ¶
func (ou *OrderUpdate) SetBody(s string) *OrderUpdate
SetBody sets the "body" field.
func (*OrderUpdate) SetChannelCode ¶
func (ou *OrderUpdate) SetChannelCode(s string) *OrderUpdate
SetChannelCode sets the "channel_code" field.
func (*OrderUpdate) SetChannelFeePrice ¶
func (ou *OrderUpdate) SetChannelFeePrice(i int32) *OrderUpdate
SetChannelFeePrice sets the "channel_fee_price" field.
func (*OrderUpdate) SetChannelFeeRate ¶
func (ou *OrderUpdate) SetChannelFeeRate(f float64) *OrderUpdate
SetChannelFeeRate sets the "channel_fee_rate" field.
func (*OrderUpdate) SetChannelOrderNo ¶
func (ou *OrderUpdate) SetChannelOrderNo(s string) *OrderUpdate
SetChannelOrderNo sets the "channel_order_no" field.
func (*OrderUpdate) SetChannelUserID ¶
func (ou *OrderUpdate) SetChannelUserID(s string) *OrderUpdate
SetChannelUserID sets the "channel_user_id" field.
func (*OrderUpdate) SetDeletedAt ¶
func (ou *OrderUpdate) SetDeletedAt(t time.Time) *OrderUpdate
SetDeletedAt sets the "deleted_at" field.
func (*OrderUpdate) SetExpireTime ¶
func (ou *OrderUpdate) SetExpireTime(t time.Time) *OrderUpdate
SetExpireTime sets the "expire_time" field.
func (*OrderUpdate) SetExtensionID ¶
func (ou *OrderUpdate) SetExtensionID(u uint64) *OrderUpdate
SetExtensionID sets the "extension_id" field.
func (*OrderUpdate) SetMerchantOrderID ¶
func (ou *OrderUpdate) SetMerchantOrderID(s string) *OrderUpdate
SetMerchantOrderID sets the "merchant_order_id" field.
func (*OrderUpdate) SetNillableBody ¶ added in v1.1.0
func (ou *OrderUpdate) SetNillableBody(s *string) *OrderUpdate
SetNillableBody sets the "body" field if the given value is not nil.
func (*OrderUpdate) SetNillableChannelCode ¶
func (ou *OrderUpdate) SetNillableChannelCode(s *string) *OrderUpdate
SetNillableChannelCode sets the "channel_code" field if the given value is not nil.
func (*OrderUpdate) SetNillableChannelFeePrice ¶
func (ou *OrderUpdate) SetNillableChannelFeePrice(i *int32) *OrderUpdate
SetNillableChannelFeePrice sets the "channel_fee_price" field if the given value is not nil.
func (*OrderUpdate) SetNillableChannelFeeRate ¶
func (ou *OrderUpdate) SetNillableChannelFeeRate(f *float64) *OrderUpdate
SetNillableChannelFeeRate sets the "channel_fee_rate" field if the given value is not nil.
func (*OrderUpdate) SetNillableChannelOrderNo ¶
func (ou *OrderUpdate) SetNillableChannelOrderNo(s *string) *OrderUpdate
SetNillableChannelOrderNo sets the "channel_order_no" field if the given value is not nil.
func (*OrderUpdate) SetNillableChannelUserID ¶
func (ou *OrderUpdate) SetNillableChannelUserID(s *string) *OrderUpdate
SetNillableChannelUserID sets the "channel_user_id" field if the given value is not nil.
func (*OrderUpdate) SetNillableDeletedAt ¶
func (ou *OrderUpdate) SetNillableDeletedAt(t *time.Time) *OrderUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*OrderUpdate) SetNillableExpireTime ¶ added in v1.1.0
func (ou *OrderUpdate) SetNillableExpireTime(t *time.Time) *OrderUpdate
SetNillableExpireTime sets the "expire_time" field if the given value is not nil.
func (*OrderUpdate) SetNillableExtensionID ¶
func (ou *OrderUpdate) SetNillableExtensionID(u *uint64) *OrderUpdate
SetNillableExtensionID sets the "extension_id" field if the given value is not nil.
func (*OrderUpdate) SetNillableMerchantOrderID ¶ added in v1.1.0
func (ou *OrderUpdate) SetNillableMerchantOrderID(s *string) *OrderUpdate
SetNillableMerchantOrderID sets the "merchant_order_id" field if the given value is not nil.
func (*OrderUpdate) SetNillableNo ¶
func (ou *OrderUpdate) SetNillableNo(s *string) *OrderUpdate
SetNillableNo sets the "no" field if the given value is not nil.
func (*OrderUpdate) SetNillableNotifyTime ¶
func (ou *OrderUpdate) SetNillableNotifyTime(t *time.Time) *OrderUpdate
SetNillableNotifyTime sets the "notify_time" field if the given value is not nil.
func (*OrderUpdate) SetNillablePrice ¶ added in v1.1.0
func (ou *OrderUpdate) SetNillablePrice(i *int32) *OrderUpdate
SetNillablePrice sets the "price" field if the given value is not nil.
func (*OrderUpdate) SetNillableRefundPrice ¶ added in v1.1.0
func (ou *OrderUpdate) SetNillableRefundPrice(i *int32) *OrderUpdate
SetNillableRefundPrice sets the "refund_price" field if the given value is not nil.
func (*OrderUpdate) SetNillableStatus ¶
func (ou *OrderUpdate) SetNillableStatus(u *uint8) *OrderUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*OrderUpdate) SetNillableSubject ¶ added in v1.1.0
func (ou *OrderUpdate) SetNillableSubject(s *string) *OrderUpdate
SetNillableSubject sets the "subject" field if the given value is not nil.
func (*OrderUpdate) SetNillableSuccessTime ¶
func (ou *OrderUpdate) SetNillableSuccessTime(t *time.Time) *OrderUpdate
SetNillableSuccessTime sets the "success_time" field if the given value is not nil.
func (*OrderUpdate) SetNillableUserIP ¶ added in v1.1.0
func (ou *OrderUpdate) SetNillableUserIP(s *string) *OrderUpdate
SetNillableUserIP sets the "user_ip" field if the given value is not nil.
func (*OrderUpdate) SetNo ¶
func (ou *OrderUpdate) SetNo(s string) *OrderUpdate
SetNo sets the "no" field.
func (*OrderUpdate) SetNotNilBody ¶
func (o *OrderUpdate) SetNotNilBody(value *string) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilChannelCode ¶
func (o *OrderUpdate) SetNotNilChannelCode(value *string) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilChannelFeePrice ¶
func (o *OrderUpdate) SetNotNilChannelFeePrice(value *int32) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilChannelFeeRate ¶
func (o *OrderUpdate) SetNotNilChannelFeeRate(value *float64) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilChannelOrderNo ¶
func (o *OrderUpdate) SetNotNilChannelOrderNo(value *string) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilChannelUserID ¶
func (o *OrderUpdate) SetNotNilChannelUserID(value *string) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilDeletedAt ¶
func (o *OrderUpdate) SetNotNilDeletedAt(value *time.Time) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilExpireTime ¶
func (o *OrderUpdate) SetNotNilExpireTime(value *time.Time) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilExtensionID ¶
func (o *OrderUpdate) SetNotNilExtensionID(value *uint64) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilMerchantOrderID ¶
func (o *OrderUpdate) SetNotNilMerchantOrderID(value *string) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilNo ¶
func (o *OrderUpdate) SetNotNilNo(value *string) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilNotifyTime ¶
func (o *OrderUpdate) SetNotNilNotifyTime(value *time.Time) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilPrice ¶
func (o *OrderUpdate) SetNotNilPrice(value *int32) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilRefundPrice ¶
func (o *OrderUpdate) SetNotNilRefundPrice(value *int32) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilStatus ¶
func (o *OrderUpdate) SetNotNilStatus(value *uint8) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilSubject ¶
func (o *OrderUpdate) SetNotNilSubject(value *string) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilSuccessTime ¶
func (o *OrderUpdate) SetNotNilSuccessTime(value *time.Time) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilUpdatedAt ¶
func (o *OrderUpdate) SetNotNilUpdatedAt(value *time.Time) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotNilUserIP ¶
func (o *OrderUpdate) SetNotNilUserIP(value *string) *OrderUpdate
set field if value's pointer is not nil.
func (*OrderUpdate) SetNotifyTime ¶
func (ou *OrderUpdate) SetNotifyTime(t time.Time) *OrderUpdate
SetNotifyTime sets the "notify_time" field.
func (*OrderUpdate) SetPrice ¶
func (ou *OrderUpdate) SetPrice(i int32) *OrderUpdate
SetPrice sets the "price" field.
func (*OrderUpdate) SetRefundPrice ¶
func (ou *OrderUpdate) SetRefundPrice(i int32) *OrderUpdate
SetRefundPrice sets the "refund_price" field.
func (*OrderUpdate) SetStatus ¶
func (ou *OrderUpdate) SetStatus(u uint8) *OrderUpdate
SetStatus sets the "status" field.
func (*OrderUpdate) SetSubject ¶
func (ou *OrderUpdate) SetSubject(s string) *OrderUpdate
SetSubject sets the "subject" field.
func (*OrderUpdate) SetSuccessTime ¶
func (ou *OrderUpdate) SetSuccessTime(t time.Time) *OrderUpdate
SetSuccessTime sets the "success_time" field.
func (*OrderUpdate) SetUpdatedAt ¶
func (ou *OrderUpdate) SetUpdatedAt(t time.Time) *OrderUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OrderUpdate) SetUserIP ¶
func (ou *OrderUpdate) SetUserIP(s string) *OrderUpdate
SetUserIP sets the "user_ip" field.
func (*OrderUpdate) Where ¶
func (ou *OrderUpdate) Where(ps ...predicate.Order) *OrderUpdate
Where appends a list predicates to the OrderUpdate builder.
type OrderUpdateOne ¶
type OrderUpdateOne struct {
// contains filtered or unexported fields
}
OrderUpdateOne is the builder for updating a single Order entity.
func (*OrderUpdateOne) AddChannelFeePrice ¶
func (ouo *OrderUpdateOne) AddChannelFeePrice(i int32) *OrderUpdateOne
AddChannelFeePrice adds i to the "channel_fee_price" field.
func (*OrderUpdateOne) AddChannelFeeRate ¶
func (ouo *OrderUpdateOne) AddChannelFeeRate(f float64) *OrderUpdateOne
AddChannelFeeRate adds f to the "channel_fee_rate" field.
func (*OrderUpdateOne) AddExtensionID ¶
func (ouo *OrderUpdateOne) AddExtensionID(u int64) *OrderUpdateOne
AddExtensionID adds u to the "extension_id" field.
func (*OrderUpdateOne) AddPrice ¶
func (ouo *OrderUpdateOne) AddPrice(i int32) *OrderUpdateOne
AddPrice adds i to the "price" field.
func (*OrderUpdateOne) AddRefundPrice ¶
func (ouo *OrderUpdateOne) AddRefundPrice(i int32) *OrderUpdateOne
AddRefundPrice adds i to the "refund_price" field.
func (*OrderUpdateOne) AddStatus ¶
func (ouo *OrderUpdateOne) AddStatus(u int8) *OrderUpdateOne
AddStatus adds u to the "status" field.
func (*OrderUpdateOne) ClearChannelCode ¶
func (ouo *OrderUpdateOne) ClearChannelCode() *OrderUpdateOne
ClearChannelCode clears the value of the "channel_code" field.
func (*OrderUpdateOne) ClearChannelFeePrice ¶
func (ouo *OrderUpdateOne) ClearChannelFeePrice() *OrderUpdateOne
ClearChannelFeePrice clears the value of the "channel_fee_price" field.
func (*OrderUpdateOne) ClearChannelFeeRate ¶
func (ouo *OrderUpdateOne) ClearChannelFeeRate() *OrderUpdateOne
ClearChannelFeeRate clears the value of the "channel_fee_rate" field.
func (*OrderUpdateOne) ClearChannelOrderNo ¶
func (ouo *OrderUpdateOne) ClearChannelOrderNo() *OrderUpdateOne
ClearChannelOrderNo clears the value of the "channel_order_no" field.
func (*OrderUpdateOne) ClearChannelUserID ¶
func (ouo *OrderUpdateOne) ClearChannelUserID() *OrderUpdateOne
ClearChannelUserID clears the value of the "channel_user_id" field.
func (*OrderUpdateOne) ClearDeletedAt ¶
func (ouo *OrderUpdateOne) ClearDeletedAt() *OrderUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*OrderUpdateOne) ClearExtensionID ¶
func (ouo *OrderUpdateOne) ClearExtensionID() *OrderUpdateOne
ClearExtensionID clears the value of the "extension_id" field.
func (*OrderUpdateOne) ClearNo ¶
func (ouo *OrderUpdateOne) ClearNo() *OrderUpdateOne
ClearNo clears the value of the "no" field.
func (*OrderUpdateOne) ClearNotifyTime ¶
func (ouo *OrderUpdateOne) ClearNotifyTime() *OrderUpdateOne
ClearNotifyTime clears the value of the "notify_time" field.
func (*OrderUpdateOne) ClearStatus ¶
func (ouo *OrderUpdateOne) ClearStatus() *OrderUpdateOne
ClearStatus clears the value of the "status" field.
func (*OrderUpdateOne) ClearSuccessTime ¶
func (ouo *OrderUpdateOne) ClearSuccessTime() *OrderUpdateOne
ClearSuccessTime clears the value of the "success_time" field.
func (*OrderUpdateOne) Exec ¶
func (ouo *OrderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OrderUpdateOne) ExecX ¶
func (ouo *OrderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OrderUpdateOne) Mutation ¶
func (ouo *OrderUpdateOne) Mutation() *OrderMutation
Mutation returns the OrderMutation object of the builder.
func (*OrderUpdateOne) Save ¶
func (ouo *OrderUpdateOne) Save(ctx context.Context) (*Order, error)
Save executes the query and returns the updated Order entity.
func (*OrderUpdateOne) SaveX ¶
func (ouo *OrderUpdateOne) SaveX(ctx context.Context) *Order
SaveX is like Save, but panics if an error occurs.
func (*OrderUpdateOne) Select ¶
func (ouo *OrderUpdateOne) Select(field string, fields ...string) *OrderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OrderUpdateOne) SetBody ¶
func (ouo *OrderUpdateOne) SetBody(s string) *OrderUpdateOne
SetBody sets the "body" field.
func (*OrderUpdateOne) SetChannelCode ¶
func (ouo *OrderUpdateOne) SetChannelCode(s string) *OrderUpdateOne
SetChannelCode sets the "channel_code" field.
func (*OrderUpdateOne) SetChannelFeePrice ¶
func (ouo *OrderUpdateOne) SetChannelFeePrice(i int32) *OrderUpdateOne
SetChannelFeePrice sets the "channel_fee_price" field.
func (*OrderUpdateOne) SetChannelFeeRate ¶
func (ouo *OrderUpdateOne) SetChannelFeeRate(f float64) *OrderUpdateOne
SetChannelFeeRate sets the "channel_fee_rate" field.
func (*OrderUpdateOne) SetChannelOrderNo ¶
func (ouo *OrderUpdateOne) SetChannelOrderNo(s string) *OrderUpdateOne
SetChannelOrderNo sets the "channel_order_no" field.
func (*OrderUpdateOne) SetChannelUserID ¶
func (ouo *OrderUpdateOne) SetChannelUserID(s string) *OrderUpdateOne
SetChannelUserID sets the "channel_user_id" field.
func (*OrderUpdateOne) SetDeletedAt ¶
func (ouo *OrderUpdateOne) SetDeletedAt(t time.Time) *OrderUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*OrderUpdateOne) SetExpireTime ¶
func (ouo *OrderUpdateOne) SetExpireTime(t time.Time) *OrderUpdateOne
SetExpireTime sets the "expire_time" field.
func (*OrderUpdateOne) SetExtensionID ¶
func (ouo *OrderUpdateOne) SetExtensionID(u uint64) *OrderUpdateOne
SetExtensionID sets the "extension_id" field.
func (*OrderUpdateOne) SetMerchantOrderID ¶
func (ouo *OrderUpdateOne) SetMerchantOrderID(s string) *OrderUpdateOne
SetMerchantOrderID sets the "merchant_order_id" field.
func (*OrderUpdateOne) SetNillableBody ¶ added in v1.1.0
func (ouo *OrderUpdateOne) SetNillableBody(s *string) *OrderUpdateOne
SetNillableBody sets the "body" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableChannelCode ¶
func (ouo *OrderUpdateOne) SetNillableChannelCode(s *string) *OrderUpdateOne
SetNillableChannelCode sets the "channel_code" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableChannelFeePrice ¶
func (ouo *OrderUpdateOne) SetNillableChannelFeePrice(i *int32) *OrderUpdateOne
SetNillableChannelFeePrice sets the "channel_fee_price" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableChannelFeeRate ¶
func (ouo *OrderUpdateOne) SetNillableChannelFeeRate(f *float64) *OrderUpdateOne
SetNillableChannelFeeRate sets the "channel_fee_rate" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableChannelOrderNo ¶
func (ouo *OrderUpdateOne) SetNillableChannelOrderNo(s *string) *OrderUpdateOne
SetNillableChannelOrderNo sets the "channel_order_no" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableChannelUserID ¶
func (ouo *OrderUpdateOne) SetNillableChannelUserID(s *string) *OrderUpdateOne
SetNillableChannelUserID sets the "channel_user_id" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableDeletedAt ¶
func (ouo *OrderUpdateOne) SetNillableDeletedAt(t *time.Time) *OrderUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableExpireTime ¶ added in v1.1.0
func (ouo *OrderUpdateOne) SetNillableExpireTime(t *time.Time) *OrderUpdateOne
SetNillableExpireTime sets the "expire_time" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableExtensionID ¶
func (ouo *OrderUpdateOne) SetNillableExtensionID(u *uint64) *OrderUpdateOne
SetNillableExtensionID sets the "extension_id" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableMerchantOrderID ¶ added in v1.1.0
func (ouo *OrderUpdateOne) SetNillableMerchantOrderID(s *string) *OrderUpdateOne
SetNillableMerchantOrderID sets the "merchant_order_id" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableNo ¶
func (ouo *OrderUpdateOne) SetNillableNo(s *string) *OrderUpdateOne
SetNillableNo sets the "no" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableNotifyTime ¶
func (ouo *OrderUpdateOne) SetNillableNotifyTime(t *time.Time) *OrderUpdateOne
SetNillableNotifyTime sets the "notify_time" field if the given value is not nil.
func (*OrderUpdateOne) SetNillablePrice ¶ added in v1.1.0
func (ouo *OrderUpdateOne) SetNillablePrice(i *int32) *OrderUpdateOne
SetNillablePrice sets the "price" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableRefundPrice ¶ added in v1.1.0
func (ouo *OrderUpdateOne) SetNillableRefundPrice(i *int32) *OrderUpdateOne
SetNillableRefundPrice sets the "refund_price" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableStatus ¶
func (ouo *OrderUpdateOne) SetNillableStatus(u *uint8) *OrderUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableSubject ¶ added in v1.1.0
func (ouo *OrderUpdateOne) SetNillableSubject(s *string) *OrderUpdateOne
SetNillableSubject sets the "subject" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableSuccessTime ¶
func (ouo *OrderUpdateOne) SetNillableSuccessTime(t *time.Time) *OrderUpdateOne
SetNillableSuccessTime sets the "success_time" field if the given value is not nil.
func (*OrderUpdateOne) SetNillableUserIP ¶ added in v1.1.0
func (ouo *OrderUpdateOne) SetNillableUserIP(s *string) *OrderUpdateOne
SetNillableUserIP sets the "user_ip" field if the given value is not nil.
func (*OrderUpdateOne) SetNo ¶
func (ouo *OrderUpdateOne) SetNo(s string) *OrderUpdateOne
SetNo sets the "no" field.
func (*OrderUpdateOne) SetNotNilBody ¶
func (o *OrderUpdateOne) SetNotNilBody(value *string) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilChannelCode ¶
func (o *OrderUpdateOne) SetNotNilChannelCode(value *string) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilChannelFeePrice ¶
func (o *OrderUpdateOne) SetNotNilChannelFeePrice(value *int32) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilChannelFeeRate ¶
func (o *OrderUpdateOne) SetNotNilChannelFeeRate(value *float64) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilChannelOrderNo ¶
func (o *OrderUpdateOne) SetNotNilChannelOrderNo(value *string) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilChannelUserID ¶
func (o *OrderUpdateOne) SetNotNilChannelUserID(value *string) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilDeletedAt ¶
func (o *OrderUpdateOne) SetNotNilDeletedAt(value *time.Time) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilExpireTime ¶
func (o *OrderUpdateOne) SetNotNilExpireTime(value *time.Time) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilExtensionID ¶
func (o *OrderUpdateOne) SetNotNilExtensionID(value *uint64) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilMerchantOrderID ¶
func (o *OrderUpdateOne) SetNotNilMerchantOrderID(value *string) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilNo ¶
func (o *OrderUpdateOne) SetNotNilNo(value *string) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilNotifyTime ¶
func (o *OrderUpdateOne) SetNotNilNotifyTime(value *time.Time) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilPrice ¶
func (o *OrderUpdateOne) SetNotNilPrice(value *int32) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilRefundPrice ¶
func (o *OrderUpdateOne) SetNotNilRefundPrice(value *int32) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilStatus ¶
func (o *OrderUpdateOne) SetNotNilStatus(value *uint8) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilSubject ¶
func (o *OrderUpdateOne) SetNotNilSubject(value *string) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilSuccessTime ¶
func (o *OrderUpdateOne) SetNotNilSuccessTime(value *time.Time) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilUpdatedAt ¶
func (o *OrderUpdateOne) SetNotNilUpdatedAt(value *time.Time) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotNilUserIP ¶
func (o *OrderUpdateOne) SetNotNilUserIP(value *string) *OrderUpdateOne
set field if value's pointer is not nil.
func (*OrderUpdateOne) SetNotifyTime ¶
func (ouo *OrderUpdateOne) SetNotifyTime(t time.Time) *OrderUpdateOne
SetNotifyTime sets the "notify_time" field.
func (*OrderUpdateOne) SetPrice ¶
func (ouo *OrderUpdateOne) SetPrice(i int32) *OrderUpdateOne
SetPrice sets the "price" field.
func (*OrderUpdateOne) SetRefundPrice ¶
func (ouo *OrderUpdateOne) SetRefundPrice(i int32) *OrderUpdateOne
SetRefundPrice sets the "refund_price" field.
func (*OrderUpdateOne) SetStatus ¶
func (ouo *OrderUpdateOne) SetStatus(u uint8) *OrderUpdateOne
SetStatus sets the "status" field.
func (*OrderUpdateOne) SetSubject ¶
func (ouo *OrderUpdateOne) SetSubject(s string) *OrderUpdateOne
SetSubject sets the "subject" field.
func (*OrderUpdateOne) SetSuccessTime ¶
func (ouo *OrderUpdateOne) SetSuccessTime(t time.Time) *OrderUpdateOne
SetSuccessTime sets the "success_time" field.
func (*OrderUpdateOne) SetUpdatedAt ¶
func (ouo *OrderUpdateOne) SetUpdatedAt(t time.Time) *OrderUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OrderUpdateOne) SetUserIP ¶
func (ouo *OrderUpdateOne) SetUserIP(s string) *OrderUpdateOne
SetUserIP sets the "user_ip" field.
func (*OrderUpdateOne) Where ¶
func (ouo *OrderUpdateOne) Where(ps ...predicate.Order) *OrderUpdateOne
Where appends a list predicates to the OrderUpdate builder.
type PageDetails ¶
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 Refund ¶
type Refund struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1: normal 2: ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // Delete Time | 删除日期 DeletedAt time.Time `json:"deleted_at,omitempty"` // 退款单号 No string `json:"no,omitempty"` // 渠道编码 ChannelCode string `json:"channel_code,omitempty"` // 支付订单编号 pay_order 表id OrderID uint64 `json:"order_id,omitempty"` // 支付订单 no OrderNo string `json:"order_no,omitempty"` // 商户订单编号(商户系统生成) MerchantOrderID string `json:"merchant_order_id,omitempty"` // 商户退款订单号(商户系统生成) MerchantRefundID string `json:"merchant_refund_id,omitempty"` // 支付金额,单位分 PayPrice int32 `json:"pay_price,omitempty"` // 退款金额,单位分 RefundPrice int32 `json:"refund_price,omitempty"` // 退款原因 Reason string `json:"reason,omitempty"` // 用户 IP UserIP string `json:"user_ip,omitempty"` // 渠道订单号,pay_order 中的 channel_order_no 对应 ChannelOrderNo string `json:"channel_order_no,omitempty"` // 渠道退款单号,渠道返回 ChannelRefundNo string `json:"channel_refund_no,omitempty"` // 退款成功时间 SuccessTime time.Time `json:"success_time,omitempty"` // 渠道调用报错时,错误码 ChannelErrorCode string `json:"channel_error_code,omitempty"` // 渠道调用报错时,错误信息 ChannelErrorMsg string `json:"channel_error_msg,omitempty"` // 支付渠道异步通知的内容 ChannelNotifyData string `json:"channel_notify_data,omitempty"` // contains filtered or unexported fields }
Refund is the model entity for the Refund schema.
func (*Refund) Unwrap ¶
Unwrap unwraps the Refund 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 (*Refund) Update ¶
func (r *Refund) Update() *RefundUpdateOne
Update returns a builder for updating this Refund. Note that you need to call Refund.Unwrap() before calling this method if this Refund was returned from a transaction, and the transaction was committed or rolled back.
type RefundClient ¶
type RefundClient struct {
// contains filtered or unexported fields
}
RefundClient is a client for the Refund schema.
func NewRefundClient ¶
func NewRefundClient(c config) *RefundClient
NewRefundClient returns a client for the Refund from the given config.
func (*RefundClient) Create ¶
func (c *RefundClient) Create() *RefundCreate
Create returns a builder for creating a Refund entity.
func (*RefundClient) CreateBulk ¶
func (c *RefundClient) CreateBulk(builders ...*RefundCreate) *RefundCreateBulk
CreateBulk returns a builder for creating a bulk of Refund entities.
func (*RefundClient) Delete ¶
func (c *RefundClient) Delete() *RefundDelete
Delete returns a delete builder for Refund.
func (*RefundClient) DeleteOne ¶
func (c *RefundClient) DeleteOne(r *Refund) *RefundDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RefundClient) DeleteOneID ¶
func (c *RefundClient) DeleteOneID(id uint64) *RefundDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RefundClient) GetX ¶
func (c *RefundClient) GetX(ctx context.Context, id uint64) *Refund
GetX is like Get, but panics if an error occurs.
func (*RefundClient) Intercept ¶
func (c *RefundClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `refund.Intercept(f(g(h())))`.
func (*RefundClient) Interceptors ¶
func (c *RefundClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RefundClient) MapCreateBulk ¶
func (c *RefundClient) MapCreateBulk(slice any, setFunc func(*RefundCreate, int)) *RefundCreateBulk
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 (*RefundClient) Query ¶
func (c *RefundClient) Query() *RefundQuery
Query returns a query builder for Refund.
func (*RefundClient) Update ¶
func (c *RefundClient) Update() *RefundUpdate
Update returns an update builder for Refund.
func (*RefundClient) UpdateOne ¶
func (c *RefundClient) UpdateOne(r *Refund) *RefundUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RefundClient) UpdateOneID ¶
func (c *RefundClient) UpdateOneID(id uint64) *RefundUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RefundClient) Use ¶
func (c *RefundClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `refund.Hooks(f(g(h())))`.
type RefundCreate ¶
type RefundCreate struct {
// contains filtered or unexported fields
}
RefundCreate is the builder for creating a Refund entity.
func (*RefundCreate) Exec ¶
func (rc *RefundCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RefundCreate) ExecX ¶
func (rc *RefundCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RefundCreate) Mutation ¶
func (rc *RefundCreate) Mutation() *RefundMutation
Mutation returns the RefundMutation object of the builder.
func (*RefundCreate) Save ¶
func (rc *RefundCreate) Save(ctx context.Context) (*Refund, error)
Save creates the Refund in the database.
func (*RefundCreate) SaveX ¶
func (rc *RefundCreate) SaveX(ctx context.Context) *Refund
SaveX calls Save and panics if Save returns an error.
func (*RefundCreate) SetChannelCode ¶
func (rc *RefundCreate) SetChannelCode(s string) *RefundCreate
SetChannelCode sets the "channel_code" field.
func (*RefundCreate) SetChannelErrorCode ¶
func (rc *RefundCreate) SetChannelErrorCode(s string) *RefundCreate
SetChannelErrorCode sets the "channel_error_code" field.
func (*RefundCreate) SetChannelErrorMsg ¶
func (rc *RefundCreate) SetChannelErrorMsg(s string) *RefundCreate
SetChannelErrorMsg sets the "channel_error_msg" field.
func (*RefundCreate) SetChannelNotifyData ¶
func (rc *RefundCreate) SetChannelNotifyData(s string) *RefundCreate
SetChannelNotifyData sets the "channel_notify_data" field.
func (*RefundCreate) SetChannelOrderNo ¶
func (rc *RefundCreate) SetChannelOrderNo(s string) *RefundCreate
SetChannelOrderNo sets the "channel_order_no" field.
func (*RefundCreate) SetChannelRefundNo ¶
func (rc *RefundCreate) SetChannelRefundNo(s string) *RefundCreate
SetChannelRefundNo sets the "channel_refund_no" field.
func (*RefundCreate) SetCreatedAt ¶
func (rc *RefundCreate) SetCreatedAt(t time.Time) *RefundCreate
SetCreatedAt sets the "created_at" field.
func (*RefundCreate) SetDeletedAt ¶
func (rc *RefundCreate) SetDeletedAt(t time.Time) *RefundCreate
SetDeletedAt sets the "deleted_at" field.
func (*RefundCreate) SetID ¶
func (rc *RefundCreate) SetID(u uint64) *RefundCreate
SetID sets the "id" field.
func (*RefundCreate) SetMerchantOrderID ¶
func (rc *RefundCreate) SetMerchantOrderID(s string) *RefundCreate
SetMerchantOrderID sets the "merchant_order_id" field.
func (*RefundCreate) SetMerchantRefundID ¶
func (rc *RefundCreate) SetMerchantRefundID(s string) *RefundCreate
SetMerchantRefundID sets the "merchant_refund_id" field.
func (*RefundCreate) SetNillableChannelErrorCode ¶
func (rc *RefundCreate) SetNillableChannelErrorCode(s *string) *RefundCreate
SetNillableChannelErrorCode sets the "channel_error_code" field if the given value is not nil.
func (*RefundCreate) SetNillableChannelErrorMsg ¶
func (rc *RefundCreate) SetNillableChannelErrorMsg(s *string) *RefundCreate
SetNillableChannelErrorMsg sets the "channel_error_msg" field if the given value is not nil.
func (*RefundCreate) SetNillableChannelNotifyData ¶
func (rc *RefundCreate) SetNillableChannelNotifyData(s *string) *RefundCreate
SetNillableChannelNotifyData sets the "channel_notify_data" field if the given value is not nil.
func (*RefundCreate) SetNillableChannelRefundNo ¶
func (rc *RefundCreate) SetNillableChannelRefundNo(s *string) *RefundCreate
SetNillableChannelRefundNo sets the "channel_refund_no" field if the given value is not nil.
func (*RefundCreate) SetNillableCreatedAt ¶
func (rc *RefundCreate) SetNillableCreatedAt(t *time.Time) *RefundCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RefundCreate) SetNillableDeletedAt ¶
func (rc *RefundCreate) SetNillableDeletedAt(t *time.Time) *RefundCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RefundCreate) SetNillableStatus ¶
func (rc *RefundCreate) SetNillableStatus(u *uint8) *RefundCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RefundCreate) SetNillableSuccessTime ¶
func (rc *RefundCreate) SetNillableSuccessTime(t *time.Time) *RefundCreate
SetNillableSuccessTime sets the "success_time" field if the given value is not nil.
func (*RefundCreate) SetNillableUpdatedAt ¶
func (rc *RefundCreate) SetNillableUpdatedAt(t *time.Time) *RefundCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*RefundCreate) SetNillableUserIP ¶
func (rc *RefundCreate) SetNillableUserIP(s *string) *RefundCreate
SetNillableUserIP sets the "user_ip" field if the given value is not nil.
func (*RefundCreate) SetNo ¶
func (rc *RefundCreate) SetNo(s string) *RefundCreate
SetNo sets the "no" field.
func (*RefundCreate) SetNotNilChannelCode ¶
func (r *RefundCreate) SetNotNilChannelCode(value *string) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilChannelErrorCode ¶
func (r *RefundCreate) SetNotNilChannelErrorCode(value *string) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilChannelErrorMsg ¶
func (r *RefundCreate) SetNotNilChannelErrorMsg(value *string) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilChannelNotifyData ¶
func (r *RefundCreate) SetNotNilChannelNotifyData(value *string) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilChannelOrderNo ¶
func (r *RefundCreate) SetNotNilChannelOrderNo(value *string) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilChannelRefundNo ¶
func (r *RefundCreate) SetNotNilChannelRefundNo(value *string) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilDeletedAt ¶
func (r *RefundCreate) SetNotNilDeletedAt(value *time.Time) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilMerchantOrderID ¶
func (r *RefundCreate) SetNotNilMerchantOrderID(value *string) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilMerchantRefundID ¶
func (r *RefundCreate) SetNotNilMerchantRefundID(value *string) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilNo ¶
func (r *RefundCreate) SetNotNilNo(value *string) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilOrderID ¶
func (r *RefundCreate) SetNotNilOrderID(value *uint64) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilOrderNo ¶
func (r *RefundCreate) SetNotNilOrderNo(value *string) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilPayPrice ¶
func (r *RefundCreate) SetNotNilPayPrice(value *int32) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilReason ¶
func (r *RefundCreate) SetNotNilReason(value *string) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilRefundPrice ¶
func (r *RefundCreate) SetNotNilRefundPrice(value *int32) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilStatus ¶
func (r *RefundCreate) SetNotNilStatus(value *uint8) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilSuccessTime ¶
func (r *RefundCreate) SetNotNilSuccessTime(value *time.Time) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilUpdatedAt ¶
func (r *RefundCreate) SetNotNilUpdatedAt(value *time.Time) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetNotNilUserIP ¶
func (r *RefundCreate) SetNotNilUserIP(value *string) *RefundCreate
set field if value's pointer is not nil.
func (*RefundCreate) SetOrderID ¶
func (rc *RefundCreate) SetOrderID(u uint64) *RefundCreate
SetOrderID sets the "order_id" field.
func (*RefundCreate) SetOrderNo ¶
func (rc *RefundCreate) SetOrderNo(s string) *RefundCreate
SetOrderNo sets the "order_no" field.
func (*RefundCreate) SetPayPrice ¶
func (rc *RefundCreate) SetPayPrice(i int32) *RefundCreate
SetPayPrice sets the "pay_price" field.
func (*RefundCreate) SetReason ¶
func (rc *RefundCreate) SetReason(s string) *RefundCreate
SetReason sets the "reason" field.
func (*RefundCreate) SetRefundPrice ¶
func (rc *RefundCreate) SetRefundPrice(i int32) *RefundCreate
SetRefundPrice sets the "refund_price" field.
func (*RefundCreate) SetStatus ¶
func (rc *RefundCreate) SetStatus(u uint8) *RefundCreate
SetStatus sets the "status" field.
func (*RefundCreate) SetSuccessTime ¶
func (rc *RefundCreate) SetSuccessTime(t time.Time) *RefundCreate
SetSuccessTime sets the "success_time" field.
func (*RefundCreate) SetUpdatedAt ¶
func (rc *RefundCreate) SetUpdatedAt(t time.Time) *RefundCreate
SetUpdatedAt sets the "updated_at" field.
func (*RefundCreate) SetUserIP ¶
func (rc *RefundCreate) SetUserIP(s string) *RefundCreate
SetUserIP sets the "user_ip" field.
type RefundCreateBulk ¶
type RefundCreateBulk struct {
// contains filtered or unexported fields
}
RefundCreateBulk is the builder for creating many Refund entities in bulk.
func (*RefundCreateBulk) Exec ¶
func (rcb *RefundCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RefundCreateBulk) ExecX ¶
func (rcb *RefundCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type RefundDelete ¶
type RefundDelete struct {
// contains filtered or unexported fields
}
RefundDelete is the builder for deleting a Refund entity.
func (*RefundDelete) Exec ¶
func (rd *RefundDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RefundDelete) ExecX ¶
func (rd *RefundDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RefundDelete) Where ¶
func (rd *RefundDelete) Where(ps ...predicate.Refund) *RefundDelete
Where appends a list predicates to the RefundDelete builder.
type RefundDeleteOne ¶
type RefundDeleteOne struct {
// contains filtered or unexported fields
}
RefundDeleteOne is the builder for deleting a single Refund entity.
func (*RefundDeleteOne) Exec ¶
func (rdo *RefundDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RefundDeleteOne) ExecX ¶
func (rdo *RefundDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RefundDeleteOne) Where ¶
func (rdo *RefundDeleteOne) Where(ps ...predicate.Refund) *RefundDeleteOne
Where appends a list predicates to the RefundDelete builder.
type RefundGroupBy ¶
type RefundGroupBy struct {
// contains filtered or unexported fields
}
RefundGroupBy is the group-by builder for Refund entities.
func (*RefundGroupBy) Aggregate ¶
func (rgb *RefundGroupBy) Aggregate(fns ...AggregateFunc) *RefundGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RefundGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RefundGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RefundGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RefundGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RefundGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RefundGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RefundGroupBy) Scan ¶
func (rgb *RefundGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RefundGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RefundMutation ¶
type RefundMutation struct {
// contains filtered or unexported fields
}
RefundMutation represents an operation that mutates the Refund nodes in the graph.
func (*RefundMutation) AddField ¶
func (m *RefundMutation) 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 (*RefundMutation) AddOrderID ¶
func (m *RefundMutation) AddOrderID(u int64)
AddOrderID adds u to the "order_id" field.
func (*RefundMutation) AddPayPrice ¶
func (m *RefundMutation) AddPayPrice(i int32)
AddPayPrice adds i to the "pay_price" field.
func (*RefundMutation) AddRefundPrice ¶
func (m *RefundMutation) AddRefundPrice(i int32)
AddRefundPrice adds i to the "refund_price" field.
func (*RefundMutation) AddStatus ¶
func (m *RefundMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*RefundMutation) AddedEdges ¶
func (m *RefundMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RefundMutation) AddedField ¶
func (m *RefundMutation) 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 (*RefundMutation) AddedFields ¶
func (m *RefundMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RefundMutation) AddedIDs ¶
func (m *RefundMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RefundMutation) AddedOrderID ¶
func (m *RefundMutation) AddedOrderID() (r int64, exists bool)
AddedOrderID returns the value that was added to the "order_id" field in this mutation.
func (*RefundMutation) AddedPayPrice ¶
func (m *RefundMutation) AddedPayPrice() (r int32, exists bool)
AddedPayPrice returns the value that was added to the "pay_price" field in this mutation.
func (*RefundMutation) AddedRefundPrice ¶
func (m *RefundMutation) AddedRefundPrice() (r int32, exists bool)
AddedRefundPrice returns the value that was added to the "refund_price" field in this mutation.
func (*RefundMutation) AddedStatus ¶
func (m *RefundMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*RefundMutation) ChannelCode ¶
func (m *RefundMutation) ChannelCode() (r string, exists bool)
ChannelCode returns the value of the "channel_code" field in the mutation.
func (*RefundMutation) ChannelErrorCode ¶
func (m *RefundMutation) ChannelErrorCode() (r string, exists bool)
ChannelErrorCode returns the value of the "channel_error_code" field in the mutation.
func (*RefundMutation) ChannelErrorCodeCleared ¶
func (m *RefundMutation) ChannelErrorCodeCleared() bool
ChannelErrorCodeCleared returns if the "channel_error_code" field was cleared in this mutation.
func (*RefundMutation) ChannelErrorMsg ¶
func (m *RefundMutation) ChannelErrorMsg() (r string, exists bool)
ChannelErrorMsg returns the value of the "channel_error_msg" field in the mutation.
func (*RefundMutation) ChannelErrorMsgCleared ¶
func (m *RefundMutation) ChannelErrorMsgCleared() bool
ChannelErrorMsgCleared returns if the "channel_error_msg" field was cleared in this mutation.
func (*RefundMutation) ChannelNotifyData ¶
func (m *RefundMutation) ChannelNotifyData() (r string, exists bool)
ChannelNotifyData returns the value of the "channel_notify_data" field in the mutation.
func (*RefundMutation) ChannelNotifyDataCleared ¶
func (m *RefundMutation) ChannelNotifyDataCleared() bool
ChannelNotifyDataCleared returns if the "channel_notify_data" field was cleared in this mutation.
func (*RefundMutation) ChannelOrderNo ¶
func (m *RefundMutation) ChannelOrderNo() (r string, exists bool)
ChannelOrderNo returns the value of the "channel_order_no" field in the mutation.
func (*RefundMutation) ChannelRefundNo ¶
func (m *RefundMutation) ChannelRefundNo() (r string, exists bool)
ChannelRefundNo returns the value of the "channel_refund_no" field in the mutation.
func (*RefundMutation) ChannelRefundNoCleared ¶
func (m *RefundMutation) ChannelRefundNoCleared() bool
ChannelRefundNoCleared returns if the "channel_refund_no" field was cleared in this mutation.
func (*RefundMutation) ClearChannelErrorCode ¶
func (m *RefundMutation) ClearChannelErrorCode()
ClearChannelErrorCode clears the value of the "channel_error_code" field.
func (*RefundMutation) ClearChannelErrorMsg ¶
func (m *RefundMutation) ClearChannelErrorMsg()
ClearChannelErrorMsg clears the value of the "channel_error_msg" field.
func (*RefundMutation) ClearChannelNotifyData ¶
func (m *RefundMutation) ClearChannelNotifyData()
ClearChannelNotifyData clears the value of the "channel_notify_data" field.
func (*RefundMutation) ClearChannelRefundNo ¶
func (m *RefundMutation) ClearChannelRefundNo()
ClearChannelRefundNo clears the value of the "channel_refund_no" field.
func (*RefundMutation) ClearDeletedAt ¶
func (m *RefundMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*RefundMutation) ClearEdge ¶
func (m *RefundMutation) 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 (*RefundMutation) ClearField ¶
func (m *RefundMutation) 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 (*RefundMutation) ClearStatus ¶
func (m *RefundMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*RefundMutation) ClearSuccessTime ¶
func (m *RefundMutation) ClearSuccessTime()
ClearSuccessTime clears the value of the "success_time" field.
func (*RefundMutation) ClearUserIP ¶
func (m *RefundMutation) ClearUserIP()
ClearUserIP clears the value of the "user_ip" field.
func (*RefundMutation) ClearedEdges ¶
func (m *RefundMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RefundMutation) ClearedFields ¶
func (m *RefundMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RefundMutation) Client ¶
func (m RefundMutation) 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 (*RefundMutation) CreatedAt ¶
func (m *RefundMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*RefundMutation) DeletedAt ¶
func (m *RefundMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*RefundMutation) DeletedAtCleared ¶
func (m *RefundMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*RefundMutation) EdgeCleared ¶
func (m *RefundMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RefundMutation) Field ¶
func (m *RefundMutation) 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 (*RefundMutation) FieldCleared ¶
func (m *RefundMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RefundMutation) Fields ¶
func (m *RefundMutation) 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 (*RefundMutation) ID ¶
func (m *RefundMutation) 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 (*RefundMutation) IDs ¶
func (m *RefundMutation) 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 (*RefundMutation) MerchantOrderID ¶
func (m *RefundMutation) MerchantOrderID() (r string, exists bool)
MerchantOrderID returns the value of the "merchant_order_id" field in the mutation.
func (*RefundMutation) MerchantRefundID ¶
func (m *RefundMutation) MerchantRefundID() (r string, exists bool)
MerchantRefundID returns the value of the "merchant_refund_id" field in the mutation.
func (*RefundMutation) No ¶
func (m *RefundMutation) No() (r string, exists bool)
No returns the value of the "no" field in the mutation.
func (*RefundMutation) OldChannelCode ¶
func (m *RefundMutation) OldChannelCode(ctx context.Context) (v string, err error)
OldChannelCode returns the old "channel_code" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldChannelErrorCode ¶
func (m *RefundMutation) OldChannelErrorCode(ctx context.Context) (v string, err error)
OldChannelErrorCode returns the old "channel_error_code" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldChannelErrorMsg ¶
func (m *RefundMutation) OldChannelErrorMsg(ctx context.Context) (v string, err error)
OldChannelErrorMsg returns the old "channel_error_msg" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldChannelNotifyData ¶
func (m *RefundMutation) OldChannelNotifyData(ctx context.Context) (v string, err error)
OldChannelNotifyData returns the old "channel_notify_data" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldChannelOrderNo ¶
func (m *RefundMutation) OldChannelOrderNo(ctx context.Context) (v string, err error)
OldChannelOrderNo returns the old "channel_order_no" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldChannelRefundNo ¶
func (m *RefundMutation) OldChannelRefundNo(ctx context.Context) (v string, err error)
OldChannelRefundNo returns the old "channel_refund_no" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) 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 (*RefundMutation) OldMerchantOrderID ¶
func (m *RefundMutation) OldMerchantOrderID(ctx context.Context) (v string, err error)
OldMerchantOrderID returns the old "merchant_order_id" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldMerchantRefundID ¶
func (m *RefundMutation) OldMerchantRefundID(ctx context.Context) (v string, err error)
OldMerchantRefundID returns the old "merchant_refund_id" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldNo ¶
func (m *RefundMutation) OldNo(ctx context.Context) (v string, err error)
OldNo returns the old "no" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldOrderID ¶
func (m *RefundMutation) OldOrderID(ctx context.Context) (v uint64, err error)
OldOrderID returns the old "order_id" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldOrderNo ¶
func (m *RefundMutation) OldOrderNo(ctx context.Context) (v string, err error)
OldOrderNo returns the old "order_no" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldPayPrice ¶
func (m *RefundMutation) OldPayPrice(ctx context.Context) (v int32, err error)
OldPayPrice returns the old "pay_price" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldReason ¶
func (m *RefundMutation) OldReason(ctx context.Context) (v string, err error)
OldReason returns the old "reason" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldRefundPrice ¶
func (m *RefundMutation) OldRefundPrice(ctx context.Context) (v int32, err error)
OldRefundPrice returns the old "refund_price" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldStatus ¶
func (m *RefundMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldSuccessTime ¶
OldSuccessTime returns the old "success_time" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OldUserIP ¶
func (m *RefundMutation) OldUserIP(ctx context.Context) (v string, err error)
OldUserIP returns the old "user_ip" field's value of the Refund entity. If the Refund object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RefundMutation) OrderID ¶
func (m *RefundMutation) OrderID() (r uint64, exists bool)
OrderID returns the value of the "order_id" field in the mutation.
func (*RefundMutation) OrderNo ¶
func (m *RefundMutation) OrderNo() (r string, exists bool)
OrderNo returns the value of the "order_no" field in the mutation.
func (*RefundMutation) PayPrice ¶
func (m *RefundMutation) PayPrice() (r int32, exists bool)
PayPrice returns the value of the "pay_price" field in the mutation.
func (*RefundMutation) Reason ¶
func (m *RefundMutation) Reason() (r string, exists bool)
Reason returns the value of the "reason" field in the mutation.
func (*RefundMutation) RefundPrice ¶
func (m *RefundMutation) RefundPrice() (r int32, exists bool)
RefundPrice returns the value of the "refund_price" field in the mutation.
func (*RefundMutation) RemovedEdges ¶
func (m *RefundMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RefundMutation) RemovedIDs ¶
func (m *RefundMutation) 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 (*RefundMutation) ResetChannelCode ¶
func (m *RefundMutation) ResetChannelCode()
ResetChannelCode resets all changes to the "channel_code" field.
func (*RefundMutation) ResetChannelErrorCode ¶
func (m *RefundMutation) ResetChannelErrorCode()
ResetChannelErrorCode resets all changes to the "channel_error_code" field.
func (*RefundMutation) ResetChannelErrorMsg ¶
func (m *RefundMutation) ResetChannelErrorMsg()
ResetChannelErrorMsg resets all changes to the "channel_error_msg" field.
func (*RefundMutation) ResetChannelNotifyData ¶
func (m *RefundMutation) ResetChannelNotifyData()
ResetChannelNotifyData resets all changes to the "channel_notify_data" field.
func (*RefundMutation) ResetChannelOrderNo ¶
func (m *RefundMutation) ResetChannelOrderNo()
ResetChannelOrderNo resets all changes to the "channel_order_no" field.
func (*RefundMutation) ResetChannelRefundNo ¶
func (m *RefundMutation) ResetChannelRefundNo()
ResetChannelRefundNo resets all changes to the "channel_refund_no" field.
func (*RefundMutation) ResetCreatedAt ¶
func (m *RefundMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RefundMutation) ResetDeletedAt ¶
func (m *RefundMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*RefundMutation) ResetEdge ¶
func (m *RefundMutation) 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 (*RefundMutation) ResetField ¶
func (m *RefundMutation) 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 (*RefundMutation) ResetMerchantOrderID ¶
func (m *RefundMutation) ResetMerchantOrderID()
ResetMerchantOrderID resets all changes to the "merchant_order_id" field.
func (*RefundMutation) ResetMerchantRefundID ¶
func (m *RefundMutation) ResetMerchantRefundID()
ResetMerchantRefundID resets all changes to the "merchant_refund_id" field.
func (*RefundMutation) ResetNo ¶
func (m *RefundMutation) ResetNo()
ResetNo resets all changes to the "no" field.
func (*RefundMutation) ResetOrderID ¶
func (m *RefundMutation) ResetOrderID()
ResetOrderID resets all changes to the "order_id" field.
func (*RefundMutation) ResetOrderNo ¶
func (m *RefundMutation) ResetOrderNo()
ResetOrderNo resets all changes to the "order_no" field.
func (*RefundMutation) ResetPayPrice ¶
func (m *RefundMutation) ResetPayPrice()
ResetPayPrice resets all changes to the "pay_price" field.
func (*RefundMutation) ResetReason ¶
func (m *RefundMutation) ResetReason()
ResetReason resets all changes to the "reason" field.
func (*RefundMutation) ResetRefundPrice ¶
func (m *RefundMutation) ResetRefundPrice()
ResetRefundPrice resets all changes to the "refund_price" field.
func (*RefundMutation) ResetStatus ¶
func (m *RefundMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*RefundMutation) ResetSuccessTime ¶
func (m *RefundMutation) ResetSuccessTime()
ResetSuccessTime resets all changes to the "success_time" field.
func (*RefundMutation) ResetUpdatedAt ¶
func (m *RefundMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*RefundMutation) ResetUserIP ¶
func (m *RefundMutation) ResetUserIP()
ResetUserIP resets all changes to the "user_ip" field.
func (*RefundMutation) SetChannelCode ¶
func (m *RefundMutation) SetChannelCode(s string)
SetChannelCode sets the "channel_code" field.
func (*RefundMutation) SetChannelErrorCode ¶
func (m *RefundMutation) SetChannelErrorCode(s string)
SetChannelErrorCode sets the "channel_error_code" field.
func (*RefundMutation) SetChannelErrorMsg ¶
func (m *RefundMutation) SetChannelErrorMsg(s string)
SetChannelErrorMsg sets the "channel_error_msg" field.
func (*RefundMutation) SetChannelNotifyData ¶
func (m *RefundMutation) SetChannelNotifyData(s string)
SetChannelNotifyData sets the "channel_notify_data" field.
func (*RefundMutation) SetChannelOrderNo ¶
func (m *RefundMutation) SetChannelOrderNo(s string)
SetChannelOrderNo sets the "channel_order_no" field.
func (*RefundMutation) SetChannelRefundNo ¶
func (m *RefundMutation) SetChannelRefundNo(s string)
SetChannelRefundNo sets the "channel_refund_no" field.
func (*RefundMutation) SetCreatedAt ¶
func (m *RefundMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RefundMutation) SetDeletedAt ¶
func (m *RefundMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*RefundMutation) SetField ¶
func (m *RefundMutation) 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 (*RefundMutation) SetID ¶
func (m *RefundMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Refund entities.
func (*RefundMutation) SetMerchantOrderID ¶
func (m *RefundMutation) SetMerchantOrderID(s string)
SetMerchantOrderID sets the "merchant_order_id" field.
func (*RefundMutation) SetMerchantRefundID ¶
func (m *RefundMutation) SetMerchantRefundID(s string)
SetMerchantRefundID sets the "merchant_refund_id" field.
func (*RefundMutation) SetOp ¶
func (m *RefundMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RefundMutation) SetOrderID ¶
func (m *RefundMutation) SetOrderID(u uint64)
SetOrderID sets the "order_id" field.
func (*RefundMutation) SetOrderNo ¶
func (m *RefundMutation) SetOrderNo(s string)
SetOrderNo sets the "order_no" field.
func (*RefundMutation) SetPayPrice ¶
func (m *RefundMutation) SetPayPrice(i int32)
SetPayPrice sets the "pay_price" field.
func (*RefundMutation) SetReason ¶
func (m *RefundMutation) SetReason(s string)
SetReason sets the "reason" field.
func (*RefundMutation) SetRefundPrice ¶
func (m *RefundMutation) SetRefundPrice(i int32)
SetRefundPrice sets the "refund_price" field.
func (*RefundMutation) SetStatus ¶
func (m *RefundMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*RefundMutation) SetSuccessTime ¶
func (m *RefundMutation) SetSuccessTime(t time.Time)
SetSuccessTime sets the "success_time" field.
func (*RefundMutation) SetUpdatedAt ¶
func (m *RefundMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*RefundMutation) SetUserIP ¶
func (m *RefundMutation) SetUserIP(s string)
SetUserIP sets the "user_ip" field.
func (*RefundMutation) Status ¶
func (m *RefundMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*RefundMutation) StatusCleared ¶
func (m *RefundMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (*RefundMutation) SuccessTime ¶
func (m *RefundMutation) SuccessTime() (r time.Time, exists bool)
SuccessTime returns the value of the "success_time" field in the mutation.
func (*RefundMutation) SuccessTimeCleared ¶
func (m *RefundMutation) SuccessTimeCleared() bool
SuccessTimeCleared returns if the "success_time" field was cleared in this mutation.
func (RefundMutation) Tx ¶
func (m RefundMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RefundMutation) Type ¶
func (m *RefundMutation) Type() string
Type returns the node type of this mutation (Refund).
func (*RefundMutation) UpdatedAt ¶
func (m *RefundMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*RefundMutation) UserIP ¶
func (m *RefundMutation) UserIP() (r string, exists bool)
UserIP returns the value of the "user_ip" field in the mutation.
func (*RefundMutation) UserIPCleared ¶
func (m *RefundMutation) UserIPCleared() bool
UserIPCleared returns if the "user_ip" field was cleared in this mutation.
func (*RefundMutation) Where ¶
func (m *RefundMutation) Where(ps ...predicate.Refund)
Where appends a list predicates to the RefundMutation builder.
func (*RefundMutation) WhereP ¶
func (m *RefundMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RefundMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RefundPageList ¶
type RefundPageList struct { List []*Refund `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
RefundPageList is Refund PageList result.
type RefundPager ¶
type RefundPager struct { Order refund.OrderOption Filter func(*RefundQuery) (*RefundQuery, error) }
func (*RefundPager) ApplyFilter ¶
func (p *RefundPager) ApplyFilter(query *RefundQuery) (*RefundQuery, error)
type RefundPaginateOption ¶
type RefundPaginateOption func(*RefundPager)
RefundPaginateOption enables pagination customization.
type RefundQuery ¶
type RefundQuery struct {
// contains filtered or unexported fields
}
RefundQuery is the builder for querying Refund entities.
func (*RefundQuery) Aggregate ¶
func (rq *RefundQuery) Aggregate(fns ...AggregateFunc) *RefundSelect
Aggregate returns a RefundSelect configured with the given aggregations.
func (*RefundQuery) All ¶
func (rq *RefundQuery) All(ctx context.Context) ([]*Refund, error)
All executes the query and returns a list of Refunds.
func (*RefundQuery) AllX ¶
func (rq *RefundQuery) AllX(ctx context.Context) []*Refund
AllX is like All, but panics if an error occurs.
func (*RefundQuery) Clone ¶
func (rq *RefundQuery) Clone() *RefundQuery
Clone returns a duplicate of the RefundQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RefundQuery) Count ¶
func (rq *RefundQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RefundQuery) CountX ¶
func (rq *RefundQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RefundQuery) Exist ¶
func (rq *RefundQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RefundQuery) ExistX ¶
func (rq *RefundQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RefundQuery) First ¶
func (rq *RefundQuery) First(ctx context.Context) (*Refund, error)
First returns the first Refund entity from the query. Returns a *NotFoundError when no Refund was found.
func (*RefundQuery) FirstID ¶
func (rq *RefundQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Refund ID from the query. Returns a *NotFoundError when no Refund ID was found.
func (*RefundQuery) FirstIDX ¶
func (rq *RefundQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*RefundQuery) FirstX ¶
func (rq *RefundQuery) FirstX(ctx context.Context) *Refund
FirstX is like First, but panics if an error occurs.
func (*RefundQuery) GroupBy ¶
func (rq *RefundQuery) GroupBy(field string, fields ...string) *RefundGroupBy
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.Refund.Query(). GroupBy(refund.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RefundQuery) IDs ¶
func (rq *RefundQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Refund IDs.
func (*RefundQuery) IDsX ¶
func (rq *RefundQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*RefundQuery) Limit ¶
func (rq *RefundQuery) Limit(limit int) *RefundQuery
Limit the number of records to be returned by this query.
func (*RefundQuery) Offset ¶
func (rq *RefundQuery) Offset(offset int) *RefundQuery
Offset to start from.
func (*RefundQuery) Only ¶
func (rq *RefundQuery) Only(ctx context.Context) (*Refund, error)
Only returns a single Refund entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Refund entity is found. Returns a *NotFoundError when no Refund entities are found.
func (*RefundQuery) OnlyID ¶
func (rq *RefundQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Refund ID in the query. Returns a *NotSingularError when more than one Refund ID is found. Returns a *NotFoundError when no entities are found.
func (*RefundQuery) OnlyIDX ¶
func (rq *RefundQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RefundQuery) OnlyX ¶
func (rq *RefundQuery) OnlyX(ctx context.Context) *Refund
OnlyX is like Only, but panics if an error occurs.
func (*RefundQuery) Order ¶
func (rq *RefundQuery) Order(o ...refund.OrderOption) *RefundQuery
Order specifies how the records should be ordered.
func (*RefundQuery) Page ¶
func (r *RefundQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...RefundPaginateOption, ) (*RefundPageList, error)
func (*RefundQuery) Select ¶
func (rq *RefundQuery) Select(fields ...string) *RefundSelect
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.Refund.Query(). Select(refund.FieldCreatedAt). Scan(ctx, &v)
func (*RefundQuery) Unique ¶
func (rq *RefundQuery) Unique(unique bool) *RefundQuery
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 (*RefundQuery) Where ¶
func (rq *RefundQuery) Where(ps ...predicate.Refund) *RefundQuery
Where adds a new predicate for the RefundQuery builder.
type RefundSelect ¶
type RefundSelect struct { *RefundQuery // contains filtered or unexported fields }
RefundSelect is the builder for selecting fields of Refund entities.
func (*RefundSelect) Aggregate ¶
func (rs *RefundSelect) Aggregate(fns ...AggregateFunc) *RefundSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RefundSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RefundSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RefundSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RefundSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RefundSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RefundSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RefundSelect) Scan ¶
func (rs *RefundSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RefundSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RefundUpdate ¶
type RefundUpdate struct {
// contains filtered or unexported fields
}
RefundUpdate is the builder for updating Refund entities.
func (*RefundUpdate) AddOrderID ¶
func (ru *RefundUpdate) AddOrderID(u int64) *RefundUpdate
AddOrderID adds u to the "order_id" field.
func (*RefundUpdate) AddPayPrice ¶
func (ru *RefundUpdate) AddPayPrice(i int32) *RefundUpdate
AddPayPrice adds i to the "pay_price" field.
func (*RefundUpdate) AddRefundPrice ¶
func (ru *RefundUpdate) AddRefundPrice(i int32) *RefundUpdate
AddRefundPrice adds i to the "refund_price" field.
func (*RefundUpdate) AddStatus ¶
func (ru *RefundUpdate) AddStatus(u int8) *RefundUpdate
AddStatus adds u to the "status" field.
func (*RefundUpdate) ClearChannelErrorCode ¶
func (ru *RefundUpdate) ClearChannelErrorCode() *RefundUpdate
ClearChannelErrorCode clears the value of the "channel_error_code" field.
func (*RefundUpdate) ClearChannelErrorMsg ¶
func (ru *RefundUpdate) ClearChannelErrorMsg() *RefundUpdate
ClearChannelErrorMsg clears the value of the "channel_error_msg" field.
func (*RefundUpdate) ClearChannelNotifyData ¶
func (ru *RefundUpdate) ClearChannelNotifyData() *RefundUpdate
ClearChannelNotifyData clears the value of the "channel_notify_data" field.
func (*RefundUpdate) ClearChannelRefundNo ¶
func (ru *RefundUpdate) ClearChannelRefundNo() *RefundUpdate
ClearChannelRefundNo clears the value of the "channel_refund_no" field.
func (*RefundUpdate) ClearDeletedAt ¶
func (ru *RefundUpdate) ClearDeletedAt() *RefundUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*RefundUpdate) ClearStatus ¶
func (ru *RefundUpdate) ClearStatus() *RefundUpdate
ClearStatus clears the value of the "status" field.
func (*RefundUpdate) ClearSuccessTime ¶
func (ru *RefundUpdate) ClearSuccessTime() *RefundUpdate
ClearSuccessTime clears the value of the "success_time" field.
func (*RefundUpdate) ClearUserIP ¶
func (ru *RefundUpdate) ClearUserIP() *RefundUpdate
ClearUserIP clears the value of the "user_ip" field.
func (*RefundUpdate) Exec ¶
func (ru *RefundUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RefundUpdate) ExecX ¶
func (ru *RefundUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RefundUpdate) Mutation ¶
func (ru *RefundUpdate) Mutation() *RefundMutation
Mutation returns the RefundMutation object of the builder.
func (*RefundUpdate) Save ¶
func (ru *RefundUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RefundUpdate) SaveX ¶
func (ru *RefundUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RefundUpdate) SetChannelCode ¶
func (ru *RefundUpdate) SetChannelCode(s string) *RefundUpdate
SetChannelCode sets the "channel_code" field.
func (*RefundUpdate) SetChannelErrorCode ¶
func (ru *RefundUpdate) SetChannelErrorCode(s string) *RefundUpdate
SetChannelErrorCode sets the "channel_error_code" field.
func (*RefundUpdate) SetChannelErrorMsg ¶
func (ru *RefundUpdate) SetChannelErrorMsg(s string) *RefundUpdate
SetChannelErrorMsg sets the "channel_error_msg" field.
func (*RefundUpdate) SetChannelNotifyData ¶
func (ru *RefundUpdate) SetChannelNotifyData(s string) *RefundUpdate
SetChannelNotifyData sets the "channel_notify_data" field.
func (*RefundUpdate) SetChannelOrderNo ¶
func (ru *RefundUpdate) SetChannelOrderNo(s string) *RefundUpdate
SetChannelOrderNo sets the "channel_order_no" field.
func (*RefundUpdate) SetChannelRefundNo ¶
func (ru *RefundUpdate) SetChannelRefundNo(s string) *RefundUpdate
SetChannelRefundNo sets the "channel_refund_no" field.
func (*RefundUpdate) SetDeletedAt ¶
func (ru *RefundUpdate) SetDeletedAt(t time.Time) *RefundUpdate
SetDeletedAt sets the "deleted_at" field.
func (*RefundUpdate) SetMerchantOrderID ¶
func (ru *RefundUpdate) SetMerchantOrderID(s string) *RefundUpdate
SetMerchantOrderID sets the "merchant_order_id" field.
func (*RefundUpdate) SetMerchantRefundID ¶
func (ru *RefundUpdate) SetMerchantRefundID(s string) *RefundUpdate
SetMerchantRefundID sets the "merchant_refund_id" field.
func (*RefundUpdate) SetNillableChannelCode ¶ added in v1.1.0
func (ru *RefundUpdate) SetNillableChannelCode(s *string) *RefundUpdate
SetNillableChannelCode sets the "channel_code" field if the given value is not nil.
func (*RefundUpdate) SetNillableChannelErrorCode ¶
func (ru *RefundUpdate) SetNillableChannelErrorCode(s *string) *RefundUpdate
SetNillableChannelErrorCode sets the "channel_error_code" field if the given value is not nil.
func (*RefundUpdate) SetNillableChannelErrorMsg ¶
func (ru *RefundUpdate) SetNillableChannelErrorMsg(s *string) *RefundUpdate
SetNillableChannelErrorMsg sets the "channel_error_msg" field if the given value is not nil.
func (*RefundUpdate) SetNillableChannelNotifyData ¶
func (ru *RefundUpdate) SetNillableChannelNotifyData(s *string) *RefundUpdate
SetNillableChannelNotifyData sets the "channel_notify_data" field if the given value is not nil.
func (*RefundUpdate) SetNillableChannelOrderNo ¶ added in v1.1.0
func (ru *RefundUpdate) SetNillableChannelOrderNo(s *string) *RefundUpdate
SetNillableChannelOrderNo sets the "channel_order_no" field if the given value is not nil.
func (*RefundUpdate) SetNillableChannelRefundNo ¶
func (ru *RefundUpdate) SetNillableChannelRefundNo(s *string) *RefundUpdate
SetNillableChannelRefundNo sets the "channel_refund_no" field if the given value is not nil.
func (*RefundUpdate) SetNillableDeletedAt ¶
func (ru *RefundUpdate) SetNillableDeletedAt(t *time.Time) *RefundUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RefundUpdate) SetNillableMerchantOrderID ¶ added in v1.1.0
func (ru *RefundUpdate) SetNillableMerchantOrderID(s *string) *RefundUpdate
SetNillableMerchantOrderID sets the "merchant_order_id" field if the given value is not nil.
func (*RefundUpdate) SetNillableMerchantRefundID ¶ added in v1.1.0
func (ru *RefundUpdate) SetNillableMerchantRefundID(s *string) *RefundUpdate
SetNillableMerchantRefundID sets the "merchant_refund_id" field if the given value is not nil.
func (*RefundUpdate) SetNillableNo ¶ added in v1.1.0
func (ru *RefundUpdate) SetNillableNo(s *string) *RefundUpdate
SetNillableNo sets the "no" field if the given value is not nil.
func (*RefundUpdate) SetNillableOrderID ¶ added in v1.1.0
func (ru *RefundUpdate) SetNillableOrderID(u *uint64) *RefundUpdate
SetNillableOrderID sets the "order_id" field if the given value is not nil.
func (*RefundUpdate) SetNillableOrderNo ¶ added in v1.1.0
func (ru *RefundUpdate) SetNillableOrderNo(s *string) *RefundUpdate
SetNillableOrderNo sets the "order_no" field if the given value is not nil.
func (*RefundUpdate) SetNillablePayPrice ¶ added in v1.1.0
func (ru *RefundUpdate) SetNillablePayPrice(i *int32) *RefundUpdate
SetNillablePayPrice sets the "pay_price" field if the given value is not nil.
func (*RefundUpdate) SetNillableReason ¶ added in v1.1.0
func (ru *RefundUpdate) SetNillableReason(s *string) *RefundUpdate
SetNillableReason sets the "reason" field if the given value is not nil.
func (*RefundUpdate) SetNillableRefundPrice ¶ added in v1.1.0
func (ru *RefundUpdate) SetNillableRefundPrice(i *int32) *RefundUpdate
SetNillableRefundPrice sets the "refund_price" field if the given value is not nil.
func (*RefundUpdate) SetNillableStatus ¶
func (ru *RefundUpdate) SetNillableStatus(u *uint8) *RefundUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RefundUpdate) SetNillableSuccessTime ¶
func (ru *RefundUpdate) SetNillableSuccessTime(t *time.Time) *RefundUpdate
SetNillableSuccessTime sets the "success_time" field if the given value is not nil.
func (*RefundUpdate) SetNillableUserIP ¶
func (ru *RefundUpdate) SetNillableUserIP(s *string) *RefundUpdate
SetNillableUserIP sets the "user_ip" field if the given value is not nil.
func (*RefundUpdate) SetNo ¶
func (ru *RefundUpdate) SetNo(s string) *RefundUpdate
SetNo sets the "no" field.
func (*RefundUpdate) SetNotNilChannelCode ¶
func (r *RefundUpdate) SetNotNilChannelCode(value *string) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilChannelErrorCode ¶
func (r *RefundUpdate) SetNotNilChannelErrorCode(value *string) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilChannelErrorMsg ¶
func (r *RefundUpdate) SetNotNilChannelErrorMsg(value *string) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilChannelNotifyData ¶
func (r *RefundUpdate) SetNotNilChannelNotifyData(value *string) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilChannelOrderNo ¶
func (r *RefundUpdate) SetNotNilChannelOrderNo(value *string) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilChannelRefundNo ¶
func (r *RefundUpdate) SetNotNilChannelRefundNo(value *string) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilDeletedAt ¶
func (r *RefundUpdate) SetNotNilDeletedAt(value *time.Time) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilMerchantOrderID ¶
func (r *RefundUpdate) SetNotNilMerchantOrderID(value *string) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilMerchantRefundID ¶
func (r *RefundUpdate) SetNotNilMerchantRefundID(value *string) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilNo ¶
func (r *RefundUpdate) SetNotNilNo(value *string) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilOrderID ¶
func (r *RefundUpdate) SetNotNilOrderID(value *uint64) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilOrderNo ¶
func (r *RefundUpdate) SetNotNilOrderNo(value *string) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilPayPrice ¶
func (r *RefundUpdate) SetNotNilPayPrice(value *int32) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilReason ¶
func (r *RefundUpdate) SetNotNilReason(value *string) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilRefundPrice ¶
func (r *RefundUpdate) SetNotNilRefundPrice(value *int32) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilStatus ¶
func (r *RefundUpdate) SetNotNilStatus(value *uint8) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilSuccessTime ¶
func (r *RefundUpdate) SetNotNilSuccessTime(value *time.Time) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilUpdatedAt ¶
func (r *RefundUpdate) SetNotNilUpdatedAt(value *time.Time) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetNotNilUserIP ¶
func (r *RefundUpdate) SetNotNilUserIP(value *string) *RefundUpdate
set field if value's pointer is not nil.
func (*RefundUpdate) SetOrderID ¶
func (ru *RefundUpdate) SetOrderID(u uint64) *RefundUpdate
SetOrderID sets the "order_id" field.
func (*RefundUpdate) SetOrderNo ¶
func (ru *RefundUpdate) SetOrderNo(s string) *RefundUpdate
SetOrderNo sets the "order_no" field.
func (*RefundUpdate) SetPayPrice ¶
func (ru *RefundUpdate) SetPayPrice(i int32) *RefundUpdate
SetPayPrice sets the "pay_price" field.
func (*RefundUpdate) SetReason ¶
func (ru *RefundUpdate) SetReason(s string) *RefundUpdate
SetReason sets the "reason" field.
func (*RefundUpdate) SetRefundPrice ¶
func (ru *RefundUpdate) SetRefundPrice(i int32) *RefundUpdate
SetRefundPrice sets the "refund_price" field.
func (*RefundUpdate) SetStatus ¶
func (ru *RefundUpdate) SetStatus(u uint8) *RefundUpdate
SetStatus sets the "status" field.
func (*RefundUpdate) SetSuccessTime ¶
func (ru *RefundUpdate) SetSuccessTime(t time.Time) *RefundUpdate
SetSuccessTime sets the "success_time" field.
func (*RefundUpdate) SetUpdatedAt ¶
func (ru *RefundUpdate) SetUpdatedAt(t time.Time) *RefundUpdate
SetUpdatedAt sets the "updated_at" field.
func (*RefundUpdate) SetUserIP ¶
func (ru *RefundUpdate) SetUserIP(s string) *RefundUpdate
SetUserIP sets the "user_ip" field.
func (*RefundUpdate) Where ¶
func (ru *RefundUpdate) Where(ps ...predicate.Refund) *RefundUpdate
Where appends a list predicates to the RefundUpdate builder.
type RefundUpdateOne ¶
type RefundUpdateOne struct {
// contains filtered or unexported fields
}
RefundUpdateOne is the builder for updating a single Refund entity.
func (*RefundUpdateOne) AddOrderID ¶
func (ruo *RefundUpdateOne) AddOrderID(u int64) *RefundUpdateOne
AddOrderID adds u to the "order_id" field.
func (*RefundUpdateOne) AddPayPrice ¶
func (ruo *RefundUpdateOne) AddPayPrice(i int32) *RefundUpdateOne
AddPayPrice adds i to the "pay_price" field.
func (*RefundUpdateOne) AddRefundPrice ¶
func (ruo *RefundUpdateOne) AddRefundPrice(i int32) *RefundUpdateOne
AddRefundPrice adds i to the "refund_price" field.
func (*RefundUpdateOne) AddStatus ¶
func (ruo *RefundUpdateOne) AddStatus(u int8) *RefundUpdateOne
AddStatus adds u to the "status" field.
func (*RefundUpdateOne) ClearChannelErrorCode ¶
func (ruo *RefundUpdateOne) ClearChannelErrorCode() *RefundUpdateOne
ClearChannelErrorCode clears the value of the "channel_error_code" field.
func (*RefundUpdateOne) ClearChannelErrorMsg ¶
func (ruo *RefundUpdateOne) ClearChannelErrorMsg() *RefundUpdateOne
ClearChannelErrorMsg clears the value of the "channel_error_msg" field.
func (*RefundUpdateOne) ClearChannelNotifyData ¶
func (ruo *RefundUpdateOne) ClearChannelNotifyData() *RefundUpdateOne
ClearChannelNotifyData clears the value of the "channel_notify_data" field.
func (*RefundUpdateOne) ClearChannelRefundNo ¶
func (ruo *RefundUpdateOne) ClearChannelRefundNo() *RefundUpdateOne
ClearChannelRefundNo clears the value of the "channel_refund_no" field.
func (*RefundUpdateOne) ClearDeletedAt ¶
func (ruo *RefundUpdateOne) ClearDeletedAt() *RefundUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*RefundUpdateOne) ClearStatus ¶
func (ruo *RefundUpdateOne) ClearStatus() *RefundUpdateOne
ClearStatus clears the value of the "status" field.
func (*RefundUpdateOne) ClearSuccessTime ¶
func (ruo *RefundUpdateOne) ClearSuccessTime() *RefundUpdateOne
ClearSuccessTime clears the value of the "success_time" field.
func (*RefundUpdateOne) ClearUserIP ¶
func (ruo *RefundUpdateOne) ClearUserIP() *RefundUpdateOne
ClearUserIP clears the value of the "user_ip" field.
func (*RefundUpdateOne) Exec ¶
func (ruo *RefundUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RefundUpdateOne) ExecX ¶
func (ruo *RefundUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RefundUpdateOne) Mutation ¶
func (ruo *RefundUpdateOne) Mutation() *RefundMutation
Mutation returns the RefundMutation object of the builder.
func (*RefundUpdateOne) Save ¶
func (ruo *RefundUpdateOne) Save(ctx context.Context) (*Refund, error)
Save executes the query and returns the updated Refund entity.
func (*RefundUpdateOne) SaveX ¶
func (ruo *RefundUpdateOne) SaveX(ctx context.Context) *Refund
SaveX is like Save, but panics if an error occurs.
func (*RefundUpdateOne) Select ¶
func (ruo *RefundUpdateOne) Select(field string, fields ...string) *RefundUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RefundUpdateOne) SetChannelCode ¶
func (ruo *RefundUpdateOne) SetChannelCode(s string) *RefundUpdateOne
SetChannelCode sets the "channel_code" field.
func (*RefundUpdateOne) SetChannelErrorCode ¶
func (ruo *RefundUpdateOne) SetChannelErrorCode(s string) *RefundUpdateOne
SetChannelErrorCode sets the "channel_error_code" field.
func (*RefundUpdateOne) SetChannelErrorMsg ¶
func (ruo *RefundUpdateOne) SetChannelErrorMsg(s string) *RefundUpdateOne
SetChannelErrorMsg sets the "channel_error_msg" field.
func (*RefundUpdateOne) SetChannelNotifyData ¶
func (ruo *RefundUpdateOne) SetChannelNotifyData(s string) *RefundUpdateOne
SetChannelNotifyData sets the "channel_notify_data" field.
func (*RefundUpdateOne) SetChannelOrderNo ¶
func (ruo *RefundUpdateOne) SetChannelOrderNo(s string) *RefundUpdateOne
SetChannelOrderNo sets the "channel_order_no" field.
func (*RefundUpdateOne) SetChannelRefundNo ¶
func (ruo *RefundUpdateOne) SetChannelRefundNo(s string) *RefundUpdateOne
SetChannelRefundNo sets the "channel_refund_no" field.
func (*RefundUpdateOne) SetDeletedAt ¶
func (ruo *RefundUpdateOne) SetDeletedAt(t time.Time) *RefundUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*RefundUpdateOne) SetMerchantOrderID ¶
func (ruo *RefundUpdateOne) SetMerchantOrderID(s string) *RefundUpdateOne
SetMerchantOrderID sets the "merchant_order_id" field.
func (*RefundUpdateOne) SetMerchantRefundID ¶
func (ruo *RefundUpdateOne) SetMerchantRefundID(s string) *RefundUpdateOne
SetMerchantRefundID sets the "merchant_refund_id" field.
func (*RefundUpdateOne) SetNillableChannelCode ¶ added in v1.1.0
func (ruo *RefundUpdateOne) SetNillableChannelCode(s *string) *RefundUpdateOne
SetNillableChannelCode sets the "channel_code" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableChannelErrorCode ¶
func (ruo *RefundUpdateOne) SetNillableChannelErrorCode(s *string) *RefundUpdateOne
SetNillableChannelErrorCode sets the "channel_error_code" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableChannelErrorMsg ¶
func (ruo *RefundUpdateOne) SetNillableChannelErrorMsg(s *string) *RefundUpdateOne
SetNillableChannelErrorMsg sets the "channel_error_msg" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableChannelNotifyData ¶
func (ruo *RefundUpdateOne) SetNillableChannelNotifyData(s *string) *RefundUpdateOne
SetNillableChannelNotifyData sets the "channel_notify_data" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableChannelOrderNo ¶ added in v1.1.0
func (ruo *RefundUpdateOne) SetNillableChannelOrderNo(s *string) *RefundUpdateOne
SetNillableChannelOrderNo sets the "channel_order_no" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableChannelRefundNo ¶
func (ruo *RefundUpdateOne) SetNillableChannelRefundNo(s *string) *RefundUpdateOne
SetNillableChannelRefundNo sets the "channel_refund_no" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableDeletedAt ¶
func (ruo *RefundUpdateOne) SetNillableDeletedAt(t *time.Time) *RefundUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableMerchantOrderID ¶ added in v1.1.0
func (ruo *RefundUpdateOne) SetNillableMerchantOrderID(s *string) *RefundUpdateOne
SetNillableMerchantOrderID sets the "merchant_order_id" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableMerchantRefundID ¶ added in v1.1.0
func (ruo *RefundUpdateOne) SetNillableMerchantRefundID(s *string) *RefundUpdateOne
SetNillableMerchantRefundID sets the "merchant_refund_id" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableNo ¶ added in v1.1.0
func (ruo *RefundUpdateOne) SetNillableNo(s *string) *RefundUpdateOne
SetNillableNo sets the "no" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableOrderID ¶ added in v1.1.0
func (ruo *RefundUpdateOne) SetNillableOrderID(u *uint64) *RefundUpdateOne
SetNillableOrderID sets the "order_id" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableOrderNo ¶ added in v1.1.0
func (ruo *RefundUpdateOne) SetNillableOrderNo(s *string) *RefundUpdateOne
SetNillableOrderNo sets the "order_no" field if the given value is not nil.
func (*RefundUpdateOne) SetNillablePayPrice ¶ added in v1.1.0
func (ruo *RefundUpdateOne) SetNillablePayPrice(i *int32) *RefundUpdateOne
SetNillablePayPrice sets the "pay_price" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableReason ¶ added in v1.1.0
func (ruo *RefundUpdateOne) SetNillableReason(s *string) *RefundUpdateOne
SetNillableReason sets the "reason" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableRefundPrice ¶ added in v1.1.0
func (ruo *RefundUpdateOne) SetNillableRefundPrice(i *int32) *RefundUpdateOne
SetNillableRefundPrice sets the "refund_price" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableStatus ¶
func (ruo *RefundUpdateOne) SetNillableStatus(u *uint8) *RefundUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableSuccessTime ¶
func (ruo *RefundUpdateOne) SetNillableSuccessTime(t *time.Time) *RefundUpdateOne
SetNillableSuccessTime sets the "success_time" field if the given value is not nil.
func (*RefundUpdateOne) SetNillableUserIP ¶
func (ruo *RefundUpdateOne) SetNillableUserIP(s *string) *RefundUpdateOne
SetNillableUserIP sets the "user_ip" field if the given value is not nil.
func (*RefundUpdateOne) SetNo ¶
func (ruo *RefundUpdateOne) SetNo(s string) *RefundUpdateOne
SetNo sets the "no" field.
func (*RefundUpdateOne) SetNotNilChannelCode ¶
func (r *RefundUpdateOne) SetNotNilChannelCode(value *string) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilChannelErrorCode ¶
func (r *RefundUpdateOne) SetNotNilChannelErrorCode(value *string) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilChannelErrorMsg ¶
func (r *RefundUpdateOne) SetNotNilChannelErrorMsg(value *string) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilChannelNotifyData ¶
func (r *RefundUpdateOne) SetNotNilChannelNotifyData(value *string) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilChannelOrderNo ¶
func (r *RefundUpdateOne) SetNotNilChannelOrderNo(value *string) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilChannelRefundNo ¶
func (r *RefundUpdateOne) SetNotNilChannelRefundNo(value *string) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilDeletedAt ¶
func (r *RefundUpdateOne) SetNotNilDeletedAt(value *time.Time) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilMerchantOrderID ¶
func (r *RefundUpdateOne) SetNotNilMerchantOrderID(value *string) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilMerchantRefundID ¶
func (r *RefundUpdateOne) SetNotNilMerchantRefundID(value *string) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilNo ¶
func (r *RefundUpdateOne) SetNotNilNo(value *string) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilOrderID ¶
func (r *RefundUpdateOne) SetNotNilOrderID(value *uint64) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilOrderNo ¶
func (r *RefundUpdateOne) SetNotNilOrderNo(value *string) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilPayPrice ¶
func (r *RefundUpdateOne) SetNotNilPayPrice(value *int32) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilReason ¶
func (r *RefundUpdateOne) SetNotNilReason(value *string) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilRefundPrice ¶
func (r *RefundUpdateOne) SetNotNilRefundPrice(value *int32) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilStatus ¶
func (r *RefundUpdateOne) SetNotNilStatus(value *uint8) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilSuccessTime ¶
func (r *RefundUpdateOne) SetNotNilSuccessTime(value *time.Time) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilUpdatedAt ¶
func (r *RefundUpdateOne) SetNotNilUpdatedAt(value *time.Time) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetNotNilUserIP ¶
func (r *RefundUpdateOne) SetNotNilUserIP(value *string) *RefundUpdateOne
set field if value's pointer is not nil.
func (*RefundUpdateOne) SetOrderID ¶
func (ruo *RefundUpdateOne) SetOrderID(u uint64) *RefundUpdateOne
SetOrderID sets the "order_id" field.
func (*RefundUpdateOne) SetOrderNo ¶
func (ruo *RefundUpdateOne) SetOrderNo(s string) *RefundUpdateOne
SetOrderNo sets the "order_no" field.
func (*RefundUpdateOne) SetPayPrice ¶
func (ruo *RefundUpdateOne) SetPayPrice(i int32) *RefundUpdateOne
SetPayPrice sets the "pay_price" field.
func (*RefundUpdateOne) SetReason ¶
func (ruo *RefundUpdateOne) SetReason(s string) *RefundUpdateOne
SetReason sets the "reason" field.
func (*RefundUpdateOne) SetRefundPrice ¶
func (ruo *RefundUpdateOne) SetRefundPrice(i int32) *RefundUpdateOne
SetRefundPrice sets the "refund_price" field.
func (*RefundUpdateOne) SetStatus ¶
func (ruo *RefundUpdateOne) SetStatus(u uint8) *RefundUpdateOne
SetStatus sets the "status" field.
func (*RefundUpdateOne) SetSuccessTime ¶
func (ruo *RefundUpdateOne) SetSuccessTime(t time.Time) *RefundUpdateOne
SetSuccessTime sets the "success_time" field.
func (*RefundUpdateOne) SetUpdatedAt ¶
func (ruo *RefundUpdateOne) SetUpdatedAt(t time.Time) *RefundUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*RefundUpdateOne) SetUserIP ¶
func (ruo *RefundUpdateOne) SetUserIP(s string) *RefundUpdateOne
SetUserIP sets the "user_ip" field.
func (*RefundUpdateOne) Where ¶
func (ruo *RefundUpdateOne) Where(ps ...predicate.Refund) *RefundUpdateOne
Where appends a list predicates to the RefundUpdate builder.
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 { // DemoOrder is the client for interacting with the DemoOrder builders. DemoOrder *DemoOrderClient // Order is the client for interacting with the Order builders. Order *OrderClient // OrderExtension is the client for interacting with the OrderExtension builders. OrderExtension *OrderExtensionClient // Refund is the client for interacting with the Refund builders. Refund *RefundClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- demoorder.go
- demoorder_create.go
- demoorder_delete.go
- demoorder_query.go
- demoorder_update.go
- ent.go
- mutation.go
- order.go
- order_create.go
- order_delete.go
- order_query.go
- order_update.go
- orderextension.go
- orderextension_create.go
- orderextension_delete.go
- orderextension_query.go
- orderextension_update.go
- pagination.go
- refund.go
- refund_create.go
- refund_delete.go
- refund_query.go
- refund_update.go
- runtime.go
- set_not_nil.go
- tx.go