ent

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeApp            = "App"
	TypeChannel        = "Channel"
	TypeDemoOrder      = "DemoOrder"
	TypeNotifyLog      = "NotifyLog"
	TypeNotifyTask     = "NotifyTask"
	TypeOrder          = "Order"
	TypeOrderExtension = "OrderExtension"
	TypeRefund         = "Refund"
)

Variables

View Source
var DefaultAppOrder = Desc(app.FieldID)

DefaultAppOrder is the default ordering of App.

View Source
var DefaultChannelOrder = Desc(channel.FieldID)

DefaultChannelOrder is the default ordering of Channel.

View Source
var DefaultDemoOrderOrder = Desc(demoorder.FieldID)

DefaultDemoOrderOrder is the default ordering of DemoOrder.

View Source
var DefaultNotifyLogOrder = Desc(notifylog.FieldID)

DefaultNotifyLogOrder is the default ordering of NotifyLog.

View Source
var DefaultNotifyTaskOrder = Desc(notifytask.FieldID)

DefaultNotifyTaskOrder is the default ordering of NotifyTask.

View Source
var DefaultOrderExtensionOrder = Desc(orderextension.FieldID)

DefaultOrderExtensionOrder is the default ordering of OrderExtension.

View Source
var DefaultOrderOrder = Desc(order.FieldID)

DefaultOrderOrder is the default ordering of Order.

View Source
var DefaultRefundOrder = Desc(refund.FieldID)

DefaultRefundOrder is the default ordering of Refund.

View Source
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 Asc

func Asc(fields ...string) func(*sql.Selector)

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) func(*sql.Selector)

Desc applies the given fields in DESC order.

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

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 App

type App struct {

	// ID of the ent.
	ID uint64 `json:"id,omitempty"`
	// Create Time | 创建日期
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Update Time | 修改日期
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// Status 1: normal 2: ban | 状态 1 正常 2 禁用
	Status uint8 `json:"status,omitempty"`
	// Delete Time | 删除日期
	DeletedAt time.Time `json:"deleted_at,omitempty"`
	// 应用名
	Name string `json:"name,omitempty"`
	// 应用名
	Remark string `json:"remark,omitempty"`
	// 支付结果的回调地址
	OrderNotifyURL string `json:"order_notify_url,omitempty"`
	// 退款结果的回调地址
	RefundNotifyURL string `json:"refund_notify_url,omitempty"`
	// contains filtered or unexported fields
}

App is the model entity for the App schema.

func (*App) ExecContext

func (c *App) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*App) QueryContext

func (c *App) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*App) String

func (a *App) String() string

String implements the fmt.Stringer.

func (*App) Unwrap

func (a *App) Unwrap() *App

Unwrap unwraps the App 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 (*App) Update

func (a *App) Update() *AppUpdateOne

Update returns a builder for updating this App. Note that you need to call App.Unwrap() before calling this method if this App was returned from a transaction, and the transaction was committed or rolled back.

func (*App) Value

func (a *App) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the App. This includes values selected through modifiers, order, etc.

type AppClient

type AppClient struct {
	// contains filtered or unexported fields
}

AppClient is a client for the App schema.

func NewAppClient

func NewAppClient(c config) *AppClient

NewAppClient returns a client for the App from the given config.

func (*AppClient) Create

func (c *AppClient) Create() *AppCreate

Create returns a builder for creating a App entity.

func (*AppClient) CreateBulk

func (c *AppClient) CreateBulk(builders ...*AppCreate) *AppCreateBulk

CreateBulk returns a builder for creating a bulk of App entities.

func (*AppClient) Delete

func (c *AppClient) Delete() *AppDelete

Delete returns a delete builder for App.

func (*AppClient) DeleteOne

func (c *AppClient) DeleteOne(a *App) *AppDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*AppClient) DeleteOneID

func (c *AppClient) DeleteOneID(id uint64) *AppDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*AppClient) ExecContext

func (c *AppClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppClient) Get

func (c *AppClient) Get(ctx context.Context, id uint64) (*App, error)

Get returns a App entity by its id.

func (*AppClient) GetX

func (c *AppClient) GetX(ctx context.Context, id uint64) *App

GetX is like Get, but panics if an error occurs.

func (*AppClient) Hooks

func (c *AppClient) Hooks() []Hook

Hooks returns the client hooks.

func (*AppClient) Intercept

func (c *AppClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `app.Intercept(f(g(h())))`.

func (*AppClient) Interceptors

func (c *AppClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*AppClient) MapCreateBulk

func (c *AppClient) MapCreateBulk(slice any, setFunc func(*AppCreate, int)) *AppCreateBulk

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 (*AppClient) Query

func (c *AppClient) Query() *AppQuery

Query returns a query builder for App.

func (*AppClient) QueryContext

func (c *AppClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppClient) Update

func (c *AppClient) Update() *AppUpdate

Update returns an update builder for App.

func (*AppClient) UpdateOne

func (c *AppClient) UpdateOne(a *App) *AppUpdateOne

UpdateOne returns an update builder for the given entity.

func (*AppClient) UpdateOneID

func (c *AppClient) UpdateOneID(id uint64) *AppUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AppClient) Use

func (c *AppClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `app.Hooks(f(g(h())))`.

type AppCreate

type AppCreate struct {
	// contains filtered or unexported fields
}

AppCreate is the builder for creating a App entity.

func (*AppCreate) Exec

func (ac *AppCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppCreate) ExecContext

func (c *AppCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppCreate) ExecX

func (ac *AppCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppCreate) Mutation

func (ac *AppCreate) Mutation() *AppMutation

Mutation returns the AppMutation object of the builder.

func (*AppCreate) QueryContext

func (c *AppCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppCreate) Save

func (ac *AppCreate) Save(ctx context.Context) (*App, error)

Save creates the App in the database.

func (*AppCreate) SaveX

func (ac *AppCreate) SaveX(ctx context.Context) *App

SaveX calls Save and panics if Save returns an error.

func (*AppCreate) SetCreatedAt

func (ac *AppCreate) SetCreatedAt(t time.Time) *AppCreate

SetCreatedAt sets the "created_at" field.

func (*AppCreate) SetDeletedAt

func (ac *AppCreate) SetDeletedAt(t time.Time) *AppCreate

SetDeletedAt sets the "deleted_at" field.

func (*AppCreate) SetID

func (ac *AppCreate) SetID(u uint64) *AppCreate

SetID sets the "id" field.

func (*AppCreate) SetName

func (ac *AppCreate) SetName(s string) *AppCreate

SetName sets the "name" field.

func (*AppCreate) SetNillableCreatedAt

func (ac *AppCreate) SetNillableCreatedAt(t *time.Time) *AppCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*AppCreate) SetNillableDeletedAt

func (ac *AppCreate) SetNillableDeletedAt(t *time.Time) *AppCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*AppCreate) SetNillableRemark

func (ac *AppCreate) SetNillableRemark(s *string) *AppCreate

SetNillableRemark sets the "remark" field if the given value is not nil.

func (*AppCreate) SetNillableStatus

func (ac *AppCreate) SetNillableStatus(u *uint8) *AppCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*AppCreate) SetNillableUpdatedAt

func (ac *AppCreate) SetNillableUpdatedAt(t *time.Time) *AppCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*AppCreate) SetNotNilDeletedAt

func (a *AppCreate) SetNotNilDeletedAt(value *time.Time) *AppCreate

set field if value's pointer is not nil.

func (*AppCreate) SetNotNilName

func (a *AppCreate) SetNotNilName(value *string) *AppCreate

set field if value's pointer is not nil.

func (*AppCreate) SetNotNilOrderNotifyURL

func (a *AppCreate) SetNotNilOrderNotifyURL(value *string) *AppCreate

set field if value's pointer is not nil.

func (*AppCreate) SetNotNilRefundNotifyURL

func (a *AppCreate) SetNotNilRefundNotifyURL(value *string) *AppCreate

set field if value's pointer is not nil.

func (*AppCreate) SetNotNilRemark

func (a *AppCreate) SetNotNilRemark(value *string) *AppCreate

set field if value's pointer is not nil.

func (*AppCreate) SetNotNilStatus

func (a *AppCreate) SetNotNilStatus(value *uint8) *AppCreate

set field if value's pointer is not nil.

func (*AppCreate) SetNotNilUpdatedAt

func (a *AppCreate) SetNotNilUpdatedAt(value *time.Time) *AppCreate

set field if value's pointer is not nil.

func (*AppCreate) SetOrderNotifyURL

func (ac *AppCreate) SetOrderNotifyURL(s string) *AppCreate

SetOrderNotifyURL sets the "order_notify_url" field.

func (*AppCreate) SetRefundNotifyURL

func (ac *AppCreate) SetRefundNotifyURL(s string) *AppCreate

SetRefundNotifyURL sets the "refund_notify_url" field.

func (*AppCreate) SetRemark

func (ac *AppCreate) SetRemark(s string) *AppCreate

SetRemark sets the "remark" field.

func (*AppCreate) SetStatus

func (ac *AppCreate) SetStatus(u uint8) *AppCreate

SetStatus sets the "status" field.

func (*AppCreate) SetUpdatedAt

func (ac *AppCreate) SetUpdatedAt(t time.Time) *AppCreate

SetUpdatedAt sets the "updated_at" field.

type AppCreateBulk

type AppCreateBulk struct {
	// contains filtered or unexported fields
}

AppCreateBulk is the builder for creating many App entities in bulk.

func (*AppCreateBulk) Exec

func (acb *AppCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AppCreateBulk) ExecContext

func (c *AppCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppCreateBulk) ExecX

func (acb *AppCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppCreateBulk) QueryContext

func (c *AppCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppCreateBulk) Save

func (acb *AppCreateBulk) Save(ctx context.Context) ([]*App, error)

Save creates the App entities in the database.

func (*AppCreateBulk) SaveX

func (acb *AppCreateBulk) SaveX(ctx context.Context) []*App

SaveX is like Save, but panics if an error occurs.

type AppDelete

type AppDelete struct {
	// contains filtered or unexported fields
}

AppDelete is the builder for deleting a App entity.

func (*AppDelete) Exec

func (ad *AppDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*AppDelete) ExecContext

func (c *AppDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppDelete) ExecX

func (ad *AppDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*AppDelete) QueryContext

func (c *AppDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppDelete) Where

func (ad *AppDelete) Where(ps ...predicate.App) *AppDelete

Where appends a list predicates to the AppDelete builder.

type AppDeleteOne

type AppDeleteOne struct {
	// contains filtered or unexported fields
}

AppDeleteOne is the builder for deleting a single App entity.

func (*AppDeleteOne) Exec

func (ado *AppDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AppDeleteOne) ExecX

func (ado *AppDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppDeleteOne) Where

func (ado *AppDeleteOne) Where(ps ...predicate.App) *AppDeleteOne

Where appends a list predicates to the AppDelete builder.

type AppGroupBy

type AppGroupBy struct {
	// contains filtered or unexported fields
}

AppGroupBy is the group-by builder for App entities.

func (*AppGroupBy) Aggregate

func (agb *AppGroupBy) Aggregate(fns ...AggregateFunc) *AppGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*AppGroupBy) Bool

func (s *AppGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) BoolX

func (s *AppGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppGroupBy) Bools

func (s *AppGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) BoolsX

func (s *AppGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*AppGroupBy) Float64

func (s *AppGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) Float64X

func (s *AppGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppGroupBy) Float64s

func (s *AppGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) Float64sX

func (s *AppGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppGroupBy) Int

func (s *AppGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) IntX

func (s *AppGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppGroupBy) Ints

func (s *AppGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) IntsX

func (s *AppGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*AppGroupBy) Scan

func (agb *AppGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppGroupBy) ScanX

func (s *AppGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppGroupBy) String

func (s *AppGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) StringX

func (s *AppGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppGroupBy) Strings

func (s *AppGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppGroupBy) StringsX

func (s *AppGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppMutation

type AppMutation struct {
	// contains filtered or unexported fields
}

AppMutation represents an operation that mutates the App nodes in the graph.

func (*AppMutation) AddField

func (m *AppMutation) 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 (*AppMutation) AddStatus

func (m *AppMutation) AddStatus(u int8)

AddStatus adds u to the "status" field.

func (*AppMutation) AddedEdges

func (m *AppMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*AppMutation) AddedField

func (m *AppMutation) 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 (*AppMutation) AddedFields

func (m *AppMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*AppMutation) AddedIDs

func (m *AppMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*AppMutation) AddedStatus

func (m *AppMutation) AddedStatus() (r int8, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*AppMutation) ClearDeletedAt

func (m *AppMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AppMutation) ClearEdge

func (m *AppMutation) 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 (*AppMutation) ClearField

func (m *AppMutation) 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 (*AppMutation) ClearRemark

func (m *AppMutation) ClearRemark()

ClearRemark clears the value of the "remark" field.

func (*AppMutation) ClearStatus

func (m *AppMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*AppMutation) ClearedEdges

func (m *AppMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*AppMutation) ClearedFields

func (m *AppMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (AppMutation) Client

func (m AppMutation) 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 (*AppMutation) CreatedAt

func (m *AppMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*AppMutation) DeletedAt

func (m *AppMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*AppMutation) DeletedAtCleared

func (m *AppMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*AppMutation) EdgeCleared

func (m *AppMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*AppMutation) ExecContext

func (c *AppMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppMutation) Field

func (m *AppMutation) 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 (*AppMutation) FieldCleared

func (m *AppMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*AppMutation) Fields

func (m *AppMutation) 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 (*AppMutation) ID

func (m *AppMutation) 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 (*AppMutation) IDs

func (m *AppMutation) 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 (*AppMutation) Name

func (m *AppMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*AppMutation) OldCreatedAt

func (m *AppMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldDeletedAt

func (m *AppMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldField

func (m *AppMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*AppMutation) OldName

func (m *AppMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldOrderNotifyURL

func (m *AppMutation) OldOrderNotifyURL(ctx context.Context) (v string, err error)

OldOrderNotifyURL returns the old "order_notify_url" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldRefundNotifyURL

func (m *AppMutation) OldRefundNotifyURL(ctx context.Context) (v string, err error)

OldRefundNotifyURL returns the old "refund_notify_url" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldRemark

func (m *AppMutation) OldRemark(ctx context.Context) (v string, err error)

OldRemark returns the old "remark" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldStatus

func (m *AppMutation) OldStatus(ctx context.Context) (v uint8, err error)

OldStatus returns the old "status" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) OldUpdatedAt

func (m *AppMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the App entity. If the App object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*AppMutation) Op

func (m *AppMutation) Op() Op

Op returns the operation name.

func (*AppMutation) OrderNotifyURL

func (m *AppMutation) OrderNotifyURL() (r string, exists bool)

OrderNotifyURL returns the value of the "order_notify_url" field in the mutation.

func (*AppMutation) QueryContext

func (c *AppMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppMutation) RefundNotifyURL

func (m *AppMutation) RefundNotifyURL() (r string, exists bool)

RefundNotifyURL returns the value of the "refund_notify_url" field in the mutation.

func (*AppMutation) Remark

func (m *AppMutation) Remark() (r string, exists bool)

Remark returns the value of the "remark" field in the mutation.

func (*AppMutation) RemarkCleared

func (m *AppMutation) RemarkCleared() bool

RemarkCleared returns if the "remark" field was cleared in this mutation.

func (*AppMutation) RemovedEdges

func (m *AppMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*AppMutation) RemovedIDs

func (m *AppMutation) 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 (*AppMutation) ResetCreatedAt

func (m *AppMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*AppMutation) ResetDeletedAt

func (m *AppMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*AppMutation) ResetEdge

func (m *AppMutation) 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 (*AppMutation) ResetField

func (m *AppMutation) 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 (*AppMutation) ResetName

func (m *AppMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*AppMutation) ResetOrderNotifyURL

func (m *AppMutation) ResetOrderNotifyURL()

ResetOrderNotifyURL resets all changes to the "order_notify_url" field.

func (*AppMutation) ResetRefundNotifyURL

func (m *AppMutation) ResetRefundNotifyURL()

ResetRefundNotifyURL resets all changes to the "refund_notify_url" field.

func (*AppMutation) ResetRemark

func (m *AppMutation) ResetRemark()

ResetRemark resets all changes to the "remark" field.

func (*AppMutation) ResetStatus

func (m *AppMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*AppMutation) ResetUpdatedAt

func (m *AppMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*AppMutation) SetCreatedAt

func (m *AppMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*AppMutation) SetDeletedAt

func (m *AppMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*AppMutation) SetField

func (m *AppMutation) 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 (*AppMutation) SetID

func (m *AppMutation) SetID(id uint64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of App entities.

func (*AppMutation) SetName

func (m *AppMutation) SetName(s string)

SetName sets the "name" field.

func (*AppMutation) SetOp

func (m *AppMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*AppMutation) SetOrderNotifyURL

func (m *AppMutation) SetOrderNotifyURL(s string)

SetOrderNotifyURL sets the "order_notify_url" field.

func (*AppMutation) SetRefundNotifyURL

func (m *AppMutation) SetRefundNotifyURL(s string)

SetRefundNotifyURL sets the "refund_notify_url" field.

func (*AppMutation) SetRemark

func (m *AppMutation) SetRemark(s string)

SetRemark sets the "remark" field.

func (*AppMutation) SetStatus

func (m *AppMutation) SetStatus(u uint8)

SetStatus sets the "status" field.

func (*AppMutation) SetUpdatedAt

func (m *AppMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*AppMutation) Status

func (m *AppMutation) Status() (r uint8, exists bool)

Status returns the value of the "status" field in the mutation.

func (*AppMutation) StatusCleared

func (m *AppMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (AppMutation) Tx

func (m AppMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*AppMutation) Type

func (m *AppMutation) Type() string

Type returns the node type of this mutation (App).

func (*AppMutation) UpdatedAt

func (m *AppMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*AppMutation) Where

func (m *AppMutation) Where(ps ...predicate.App)

Where appends a list predicates to the AppMutation builder.

func (*AppMutation) WhereP

func (m *AppMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the AppMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type AppPageList

type AppPageList struct {
	List        []*App       `json:"list"`
	PageDetails *PageDetails `json:"pageDetails"`
}

AppPageList is App PageList result.

type AppPager

type AppPager struct {
	Order  app.OrderOption
	Filter func(*AppQuery) (*AppQuery, error)
}

func (*AppPager) ApplyFilter

func (p *AppPager) ApplyFilter(query *AppQuery) (*AppQuery, error)

type AppPaginateOption

type AppPaginateOption func(*AppPager)

AppPaginateOption enables pagination customization.

type AppQuery

type AppQuery struct {
	// contains filtered or unexported fields
}

AppQuery is the builder for querying App entities.

func (*AppQuery) Aggregate

func (aq *AppQuery) Aggregate(fns ...AggregateFunc) *AppSelect

Aggregate returns a AppSelect configured with the given aggregations.

func (*AppQuery) All

func (aq *AppQuery) All(ctx context.Context) ([]*App, error)

All executes the query and returns a list of Apps.

func (*AppQuery) AllX

func (aq *AppQuery) AllX(ctx context.Context) []*App

AllX is like All, but panics if an error occurs.

func (*AppQuery) Clone

func (aq *AppQuery) Clone() *AppQuery

Clone returns a duplicate of the AppQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*AppQuery) Count

func (aq *AppQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AppQuery) CountX

func (aq *AppQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*AppQuery) ExecContext

func (c *AppQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppQuery) Exist

func (aq *AppQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*AppQuery) ExistX

func (aq *AppQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*AppQuery) First

func (aq *AppQuery) First(ctx context.Context) (*App, error)

First returns the first App entity from the query. Returns a *NotFoundError when no App was found.

func (*AppQuery) FirstID

func (aq *AppQuery) FirstID(ctx context.Context) (id uint64, err error)

FirstID returns the first App ID from the query. Returns a *NotFoundError when no App ID was found.

func (*AppQuery) FirstIDX

func (aq *AppQuery) FirstIDX(ctx context.Context) uint64

FirstIDX is like FirstID, but panics if an error occurs.

func (*AppQuery) FirstX

func (aq *AppQuery) FirstX(ctx context.Context) *App

FirstX is like First, but panics if an error occurs.

func (*AppQuery) GroupBy

func (aq *AppQuery) GroupBy(field string, fields ...string) *AppGroupBy

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.App.Query().
	GroupBy(app.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AppQuery) IDs

func (aq *AppQuery) IDs(ctx context.Context) (ids []uint64, err error)

IDs executes the query and returns a list of App IDs.

func (*AppQuery) IDsX

func (aq *AppQuery) IDsX(ctx context.Context) []uint64

IDsX is like IDs, but panics if an error occurs.

func (*AppQuery) Limit

func (aq *AppQuery) Limit(limit int) *AppQuery

Limit the number of records to be returned by this query.

func (*AppQuery) Offset

func (aq *AppQuery) Offset(offset int) *AppQuery

Offset to start from.

func (*AppQuery) Only

func (aq *AppQuery) Only(ctx context.Context) (*App, error)

Only returns a single App entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one App entity is found. Returns a *NotFoundError when no App entities are found.

func (*AppQuery) OnlyID

func (aq *AppQuery) OnlyID(ctx context.Context) (id uint64, err error)

OnlyID is like Only, but returns the only App ID in the query. Returns a *NotSingularError when more than one App ID is found. Returns a *NotFoundError when no entities are found.

func (*AppQuery) OnlyIDX

func (aq *AppQuery) OnlyIDX(ctx context.Context) uint64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*AppQuery) OnlyX

func (aq *AppQuery) OnlyX(ctx context.Context) *App

OnlyX is like Only, but panics if an error occurs.

func (*AppQuery) Order

func (aq *AppQuery) Order(o ...app.OrderOption) *AppQuery

Order specifies how the records should be ordered.

func (*AppQuery) Page

func (a *AppQuery) Page(
	ctx context.Context, pageNum uint64, pageSize uint64, opts ...AppPaginateOption,
) (*AppPageList, error)

func (*AppQuery) QueryContext

func (c *AppQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppQuery) Select

func (aq *AppQuery) Select(fields ...string) *AppSelect

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.App.Query().
	Select(app.FieldCreatedAt).
	Scan(ctx, &v)

func (*AppQuery) Unique

func (aq *AppQuery) Unique(unique bool) *AppQuery

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 (*AppQuery) Where

func (aq *AppQuery) Where(ps ...predicate.App) *AppQuery

Where adds a new predicate for the AppQuery builder.

type AppSelect

type AppSelect struct {
	*AppQuery
	// contains filtered or unexported fields
}

AppSelect is the builder for selecting fields of App entities.

func (*AppSelect) Aggregate

func (as *AppSelect) Aggregate(fns ...AggregateFunc) *AppSelect

Aggregate adds the given aggregation functions to the selector query.

func (*AppSelect) Bool

func (s *AppSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*AppSelect) BoolX

func (s *AppSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*AppSelect) Bools

func (s *AppSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*AppSelect) BoolsX

func (s *AppSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (AppSelect) ExecContext

func (c AppSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppSelect) Float64

func (s *AppSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*AppSelect) Float64X

func (s *AppSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*AppSelect) Float64s

func (s *AppSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*AppSelect) Float64sX

func (s *AppSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*AppSelect) Int

func (s *AppSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*AppSelect) IntX

func (s *AppSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*AppSelect) Ints

func (s *AppSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*AppSelect) IntsX

func (s *AppSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (AppSelect) QueryContext

func (c AppSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppSelect) Scan

func (as *AppSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*AppSelect) ScanX

func (s *AppSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*AppSelect) String

func (s *AppSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*AppSelect) StringX

func (s *AppSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*AppSelect) Strings

func (s *AppSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*AppSelect) StringsX

func (s *AppSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type AppUpdate

type AppUpdate struct {
	// contains filtered or unexported fields
}

AppUpdate is the builder for updating App entities.

func (*AppUpdate) AddStatus

func (au *AppUpdate) AddStatus(u int8) *AppUpdate

AddStatus adds u to the "status" field.

func (*AppUpdate) ClearDeletedAt

func (au *AppUpdate) ClearDeletedAt() *AppUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AppUpdate) ClearRemark

func (au *AppUpdate) ClearRemark() *AppUpdate

ClearRemark clears the value of the "remark" field.

func (*AppUpdate) ClearStatus

func (au *AppUpdate) ClearStatus() *AppUpdate

ClearStatus clears the value of the "status" field.

func (*AppUpdate) Exec

func (au *AppUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AppUpdate) ExecContext

func (c *AppUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppUpdate) ExecX

func (au *AppUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppUpdate) Mutation

func (au *AppUpdate) Mutation() *AppMutation

Mutation returns the AppMutation object of the builder.

func (*AppUpdate) QueryContext

func (c *AppUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppUpdate) Save

func (au *AppUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*AppUpdate) SaveX

func (au *AppUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*AppUpdate) SetDeletedAt

func (au *AppUpdate) SetDeletedAt(t time.Time) *AppUpdate

SetDeletedAt sets the "deleted_at" field.

func (*AppUpdate) SetName

func (au *AppUpdate) SetName(s string) *AppUpdate

SetName sets the "name" field.

func (*AppUpdate) SetNillableDeletedAt

func (au *AppUpdate) SetNillableDeletedAt(t *time.Time) *AppUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*AppUpdate) SetNillableRemark

func (au *AppUpdate) SetNillableRemark(s *string) *AppUpdate

SetNillableRemark sets the "remark" field if the given value is not nil.

func (*AppUpdate) SetNillableStatus

func (au *AppUpdate) SetNillableStatus(u *uint8) *AppUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*AppUpdate) SetNotNilDeletedAt

func (a *AppUpdate) SetNotNilDeletedAt(value *time.Time) *AppUpdate

set field if value's pointer is not nil.

func (*AppUpdate) SetNotNilName

func (a *AppUpdate) SetNotNilName(value *string) *AppUpdate

set field if value's pointer is not nil.

func (*AppUpdate) SetNotNilOrderNotifyURL

func (a *AppUpdate) SetNotNilOrderNotifyURL(value *string) *AppUpdate

set field if value's pointer is not nil.

func (*AppUpdate) SetNotNilRefundNotifyURL

func (a *AppUpdate) SetNotNilRefundNotifyURL(value *string) *AppUpdate

set field if value's pointer is not nil.

func (*AppUpdate) SetNotNilRemark

func (a *AppUpdate) SetNotNilRemark(value *string) *AppUpdate

set field if value's pointer is not nil.

func (*AppUpdate) SetNotNilStatus

func (a *AppUpdate) SetNotNilStatus(value *uint8) *AppUpdate

set field if value's pointer is not nil.

func (*AppUpdate) SetNotNilUpdatedAt

func (a *AppUpdate) SetNotNilUpdatedAt(value *time.Time) *AppUpdate

set field if value's pointer is not nil.

func (*AppUpdate) SetOrderNotifyURL

func (au *AppUpdate) SetOrderNotifyURL(s string) *AppUpdate

SetOrderNotifyURL sets the "order_notify_url" field.

func (*AppUpdate) SetRefundNotifyURL

func (au *AppUpdate) SetRefundNotifyURL(s string) *AppUpdate

SetRefundNotifyURL sets the "refund_notify_url" field.

func (*AppUpdate) SetRemark

func (au *AppUpdate) SetRemark(s string) *AppUpdate

SetRemark sets the "remark" field.

func (*AppUpdate) SetStatus

func (au *AppUpdate) SetStatus(u uint8) *AppUpdate

SetStatus sets the "status" field.

func (*AppUpdate) SetUpdatedAt

func (au *AppUpdate) SetUpdatedAt(t time.Time) *AppUpdate

SetUpdatedAt sets the "updated_at" field.

func (*AppUpdate) Where

func (au *AppUpdate) Where(ps ...predicate.App) *AppUpdate

Where appends a list predicates to the AppUpdate builder.

type AppUpdateOne

type AppUpdateOne struct {
	// contains filtered or unexported fields
}

AppUpdateOne is the builder for updating a single App entity.

func (*AppUpdateOne) AddStatus

func (auo *AppUpdateOne) AddStatus(u int8) *AppUpdateOne

AddStatus adds u to the "status" field.

func (*AppUpdateOne) ClearDeletedAt

func (auo *AppUpdateOne) ClearDeletedAt() *AppUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*AppUpdateOne) ClearRemark

func (auo *AppUpdateOne) ClearRemark() *AppUpdateOne

ClearRemark clears the value of the "remark" field.

func (*AppUpdateOne) ClearStatus

func (auo *AppUpdateOne) ClearStatus() *AppUpdateOne

ClearStatus clears the value of the "status" field.

func (*AppUpdateOne) Exec

func (auo *AppUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AppUpdateOne) ExecContext

func (c *AppUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*AppUpdateOne) ExecX

func (auo *AppUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*AppUpdateOne) Mutation

func (auo *AppUpdateOne) Mutation() *AppMutation

Mutation returns the AppMutation object of the builder.

func (*AppUpdateOne) QueryContext

func (c *AppUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*AppUpdateOne) Save

func (auo *AppUpdateOne) Save(ctx context.Context) (*App, error)

Save executes the query and returns the updated App entity.

func (*AppUpdateOne) SaveX

func (auo *AppUpdateOne) SaveX(ctx context.Context) *App

SaveX is like Save, but panics if an error occurs.

func (*AppUpdateOne) Select

func (auo *AppUpdateOne) Select(field string, fields ...string) *AppUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*AppUpdateOne) SetDeletedAt

func (auo *AppUpdateOne) SetDeletedAt(t time.Time) *AppUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*AppUpdateOne) SetName

func (auo *AppUpdateOne) SetName(s string) *AppUpdateOne

SetName sets the "name" field.

func (*AppUpdateOne) SetNillableDeletedAt

func (auo *AppUpdateOne) SetNillableDeletedAt(t *time.Time) *AppUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*AppUpdateOne) SetNillableRemark

func (auo *AppUpdateOne) SetNillableRemark(s *string) *AppUpdateOne

SetNillableRemark sets the "remark" field if the given value is not nil.

func (*AppUpdateOne) SetNillableStatus

func (auo *AppUpdateOne) SetNillableStatus(u *uint8) *AppUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*AppUpdateOne) SetNotNilDeletedAt

func (a *AppUpdateOne) SetNotNilDeletedAt(value *time.Time) *AppUpdateOne

set field if value's pointer is not nil.

func (*AppUpdateOne) SetNotNilName

func (a *AppUpdateOne) SetNotNilName(value *string) *AppUpdateOne

set field if value's pointer is not nil.

func (*AppUpdateOne) SetNotNilOrderNotifyURL

func (a *AppUpdateOne) SetNotNilOrderNotifyURL(value *string) *AppUpdateOne

set field if value's pointer is not nil.

func (*AppUpdateOne) SetNotNilRefundNotifyURL

func (a *AppUpdateOne) SetNotNilRefundNotifyURL(value *string) *AppUpdateOne

set field if value's pointer is not nil.

func (*AppUpdateOne) SetNotNilRemark

func (a *AppUpdateOne) SetNotNilRemark(value *string) *AppUpdateOne

set field if value's pointer is not nil.

func (*AppUpdateOne) SetNotNilStatus

func (a *AppUpdateOne) SetNotNilStatus(value *uint8) *AppUpdateOne

set field if value's pointer is not nil.

func (*AppUpdateOne) SetNotNilUpdatedAt

func (a *AppUpdateOne) SetNotNilUpdatedAt(value *time.Time) *AppUpdateOne

set field if value's pointer is not nil.

func (*AppUpdateOne) SetOrderNotifyURL

func (auo *AppUpdateOne) SetOrderNotifyURL(s string) *AppUpdateOne

SetOrderNotifyURL sets the "order_notify_url" field.

func (*AppUpdateOne) SetRefundNotifyURL

func (auo *AppUpdateOne) SetRefundNotifyURL(s string) *AppUpdateOne

SetRefundNotifyURL sets the "refund_notify_url" field.

func (*AppUpdateOne) SetRemark

func (auo *AppUpdateOne) SetRemark(s string) *AppUpdateOne

SetRemark sets the "remark" field.

func (*AppUpdateOne) SetStatus

func (auo *AppUpdateOne) SetStatus(u uint8) *AppUpdateOne

SetStatus sets the "status" field.

func (*AppUpdateOne) SetUpdatedAt

func (auo *AppUpdateOne) SetUpdatedAt(t time.Time) *AppUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*AppUpdateOne) Where

func (auo *AppUpdateOne) Where(ps ...predicate.App) *AppUpdateOne

Where appends a list predicates to the AppUpdate builder.

type Apps

type Apps []*App

Apps is a parsable slice of App.

type Channel

type Channel 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"`
	// 渠道编码
	Code string `json:"code,omitempty"`
	// 应用名
	Remark string `json:"remark,omitempty"`
	// 渠道费率,单位:百分比
	FeeRate float64 `json:"fee_rate,omitempty"`
	// 应用编号
	AppID uint64 `json:"app_id,omitempty"`
	// 支付渠道配置
	Config string `json:"config,omitempty"`
	// contains filtered or unexported fields
}

Channel is the model entity for the Channel schema.

func (*Channel) ExecContext

func (c *Channel) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Channel) QueryContext

func (c *Channel) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Channel) String

func (c *Channel) String() string

String implements the fmt.Stringer.

func (*Channel) Unwrap

func (c *Channel) Unwrap() *Channel

Unwrap unwraps the Channel 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 (*Channel) Update

func (c *Channel) Update() *ChannelUpdateOne

Update returns a builder for updating this Channel. Note that you need to call Channel.Unwrap() before calling this method if this Channel was returned from a transaction, and the transaction was committed or rolled back.

func (*Channel) Value

func (c *Channel) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Channel. This includes values selected through modifiers, order, etc.

type ChannelClient

type ChannelClient struct {
	// contains filtered or unexported fields
}

ChannelClient is a client for the Channel schema.

func NewChannelClient

func NewChannelClient(c config) *ChannelClient

NewChannelClient returns a client for the Channel from the given config.

func (*ChannelClient) Create

func (c *ChannelClient) Create() *ChannelCreate

Create returns a builder for creating a Channel entity.

func (*ChannelClient) CreateBulk

func (c *ChannelClient) CreateBulk(builders ...*ChannelCreate) *ChannelCreateBulk

CreateBulk returns a builder for creating a bulk of Channel entities.

func (*ChannelClient) Delete

func (c *ChannelClient) Delete() *ChannelDelete

Delete returns a delete builder for Channel.

func (*ChannelClient) DeleteOne

func (c *ChannelClient) DeleteOne(ch *Channel) *ChannelDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*ChannelClient) DeleteOneID

func (c *ChannelClient) DeleteOneID(id uint64) *ChannelDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*ChannelClient) ExecContext

func (c *ChannelClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ChannelClient) Get

func (c *ChannelClient) Get(ctx context.Context, id uint64) (*Channel, error)

Get returns a Channel entity by its id.

func (*ChannelClient) GetX

func (c *ChannelClient) GetX(ctx context.Context, id uint64) *Channel

GetX is like Get, but panics if an error occurs.

func (*ChannelClient) Hooks

func (c *ChannelClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ChannelClient) Intercept

func (c *ChannelClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `channel.Intercept(f(g(h())))`.

func (*ChannelClient) Interceptors

func (c *ChannelClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*ChannelClient) MapCreateBulk

func (c *ChannelClient) MapCreateBulk(slice any, setFunc func(*ChannelCreate, int)) *ChannelCreateBulk

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 (*ChannelClient) Query

func (c *ChannelClient) Query() *ChannelQuery

Query returns a query builder for Channel.

func (*ChannelClient) QueryContext

func (c *ChannelClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ChannelClient) Update

func (c *ChannelClient) Update() *ChannelUpdate

Update returns an update builder for Channel.

func (*ChannelClient) UpdateOne

func (c *ChannelClient) UpdateOne(ch *Channel) *ChannelUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ChannelClient) UpdateOneID

func (c *ChannelClient) UpdateOneID(id uint64) *ChannelUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ChannelClient) Use

func (c *ChannelClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `channel.Hooks(f(g(h())))`.

type ChannelCreate

type ChannelCreate struct {
	// contains filtered or unexported fields
}

ChannelCreate is the builder for creating a Channel entity.

func (*ChannelCreate) Exec

func (cc *ChannelCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ChannelCreate) ExecContext

func (c *ChannelCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ChannelCreate) ExecX

func (cc *ChannelCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ChannelCreate) Mutation

func (cc *ChannelCreate) Mutation() *ChannelMutation

Mutation returns the ChannelMutation object of the builder.

func (*ChannelCreate) QueryContext

func (c *ChannelCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ChannelCreate) Save

func (cc *ChannelCreate) Save(ctx context.Context) (*Channel, error)

Save creates the Channel in the database.

func (*ChannelCreate) SaveX

func (cc *ChannelCreate) SaveX(ctx context.Context) *Channel

SaveX calls Save and panics if Save returns an error.

func (*ChannelCreate) SetAppID

func (cc *ChannelCreate) SetAppID(u uint64) *ChannelCreate

SetAppID sets the "app_id" field.

func (*ChannelCreate) SetCode

func (cc *ChannelCreate) SetCode(s string) *ChannelCreate

SetCode sets the "code" field.

func (*ChannelCreate) SetConfig

func (cc *ChannelCreate) SetConfig(s string) *ChannelCreate

SetConfig sets the "config" field.

func (*ChannelCreate) SetCreatedAt

func (cc *ChannelCreate) SetCreatedAt(t time.Time) *ChannelCreate

SetCreatedAt sets the "created_at" field.

func (*ChannelCreate) SetDeletedAt

func (cc *ChannelCreate) SetDeletedAt(t time.Time) *ChannelCreate

SetDeletedAt sets the "deleted_at" field.

func (*ChannelCreate) SetFeeRate

func (cc *ChannelCreate) SetFeeRate(f float64) *ChannelCreate

SetFeeRate sets the "fee_rate" field.

func (*ChannelCreate) SetID

func (cc *ChannelCreate) SetID(u uint64) *ChannelCreate

SetID sets the "id" field.

func (*ChannelCreate) SetNillableCreatedAt

func (cc *ChannelCreate) SetNillableCreatedAt(t *time.Time) *ChannelCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ChannelCreate) SetNillableDeletedAt

func (cc *ChannelCreate) SetNillableDeletedAt(t *time.Time) *ChannelCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*ChannelCreate) SetNillableRemark

func (cc *ChannelCreate) SetNillableRemark(s *string) *ChannelCreate

SetNillableRemark sets the "remark" field if the given value is not nil.

func (*ChannelCreate) SetNillableStatus

func (cc *ChannelCreate) SetNillableStatus(u *uint8) *ChannelCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ChannelCreate) SetNillableUpdatedAt

func (cc *ChannelCreate) SetNillableUpdatedAt(t *time.Time) *ChannelCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ChannelCreate) SetNotNilAppID

func (c *ChannelCreate) SetNotNilAppID(value *uint64) *ChannelCreate

set field if value's pointer is not nil.

func (*ChannelCreate) SetNotNilCode

func (c *ChannelCreate) SetNotNilCode(value *string) *ChannelCreate

set field if value's pointer is not nil.

func (*ChannelCreate) SetNotNilConfig

func (c *ChannelCreate) SetNotNilConfig(value *string) *ChannelCreate

set field if value's pointer is not nil.

func (*ChannelCreate) SetNotNilDeletedAt

func (c *ChannelCreate) SetNotNilDeletedAt(value *time.Time) *ChannelCreate

set field if value's pointer is not nil.

func (*ChannelCreate) SetNotNilFeeRate

func (c *ChannelCreate) SetNotNilFeeRate(value *float64) *ChannelCreate

set field if value's pointer is not nil.

func (*ChannelCreate) SetNotNilRemark

func (c *ChannelCreate) SetNotNilRemark(value *string) *ChannelCreate

set field if value's pointer is not nil.

func (*ChannelCreate) SetNotNilStatus

func (c *ChannelCreate) SetNotNilStatus(value *uint8) *ChannelCreate

set field if value's pointer is not nil.

func (*ChannelCreate) SetNotNilUpdatedAt

func (c *ChannelCreate) SetNotNilUpdatedAt(value *time.Time) *ChannelCreate

set field if value's pointer is not nil.

func (*ChannelCreate) SetRemark

func (cc *ChannelCreate) SetRemark(s string) *ChannelCreate

SetRemark sets the "remark" field.

func (*ChannelCreate) SetStatus

func (cc *ChannelCreate) SetStatus(u uint8) *ChannelCreate

SetStatus sets the "status" field.

func (*ChannelCreate) SetUpdatedAt

func (cc *ChannelCreate) SetUpdatedAt(t time.Time) *ChannelCreate

SetUpdatedAt sets the "updated_at" field.

type ChannelCreateBulk

type ChannelCreateBulk struct {
	// contains filtered or unexported fields
}

ChannelCreateBulk is the builder for creating many Channel entities in bulk.

func (*ChannelCreateBulk) Exec

func (ccb *ChannelCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ChannelCreateBulk) ExecContext

func (c *ChannelCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ChannelCreateBulk) ExecX

func (ccb *ChannelCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ChannelCreateBulk) QueryContext

func (c *ChannelCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ChannelCreateBulk) Save

func (ccb *ChannelCreateBulk) Save(ctx context.Context) ([]*Channel, error)

Save creates the Channel entities in the database.

func (*ChannelCreateBulk) SaveX

func (ccb *ChannelCreateBulk) SaveX(ctx context.Context) []*Channel

SaveX is like Save, but panics if an error occurs.

type ChannelDelete

type ChannelDelete struct {
	// contains filtered or unexported fields
}

ChannelDelete is the builder for deleting a Channel entity.

func (*ChannelDelete) Exec

func (cd *ChannelDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ChannelDelete) ExecContext

func (c *ChannelDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ChannelDelete) ExecX

func (cd *ChannelDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ChannelDelete) QueryContext

func (c *ChannelDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ChannelDelete) Where

func (cd *ChannelDelete) Where(ps ...predicate.Channel) *ChannelDelete

Where appends a list predicates to the ChannelDelete builder.

type ChannelDeleteOne

type ChannelDeleteOne struct {
	// contains filtered or unexported fields
}

ChannelDeleteOne is the builder for deleting a single Channel entity.

func (*ChannelDeleteOne) Exec

func (cdo *ChannelDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ChannelDeleteOne) ExecX

func (cdo *ChannelDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ChannelDeleteOne) Where

Where appends a list predicates to the ChannelDelete builder.

type ChannelGroupBy

type ChannelGroupBy struct {
	// contains filtered or unexported fields
}

ChannelGroupBy is the group-by builder for Channel entities.

func (*ChannelGroupBy) Aggregate

func (cgb *ChannelGroupBy) Aggregate(fns ...AggregateFunc) *ChannelGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ChannelGroupBy) Bool

func (s *ChannelGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ChannelGroupBy) BoolX

func (s *ChannelGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ChannelGroupBy) Bools

func (s *ChannelGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ChannelGroupBy) BoolsX

func (s *ChannelGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ChannelGroupBy) Float64

func (s *ChannelGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ChannelGroupBy) Float64X

func (s *ChannelGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ChannelGroupBy) Float64s

func (s *ChannelGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ChannelGroupBy) Float64sX

func (s *ChannelGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ChannelGroupBy) Int

func (s *ChannelGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ChannelGroupBy) IntX

func (s *ChannelGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ChannelGroupBy) Ints

func (s *ChannelGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ChannelGroupBy) IntsX

func (s *ChannelGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ChannelGroupBy) Scan

func (cgb *ChannelGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ChannelGroupBy) ScanX

func (s *ChannelGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ChannelGroupBy) String

func (s *ChannelGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ChannelGroupBy) StringX

func (s *ChannelGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ChannelGroupBy) Strings

func (s *ChannelGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ChannelGroupBy) StringsX

func (s *ChannelGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ChannelMutation

type ChannelMutation struct {
	// contains filtered or unexported fields
}

ChannelMutation represents an operation that mutates the Channel nodes in the graph.

func (*ChannelMutation) AddAppID

func (m *ChannelMutation) AddAppID(u int64)

AddAppID adds u to the "app_id" field.

func (*ChannelMutation) AddFeeRate

func (m *ChannelMutation) AddFeeRate(f float64)

AddFeeRate adds f to the "fee_rate" field.

func (*ChannelMutation) AddField

func (m *ChannelMutation) 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 (*ChannelMutation) AddStatus

func (m *ChannelMutation) AddStatus(u int8)

AddStatus adds u to the "status" field.

func (*ChannelMutation) AddedAppID

func (m *ChannelMutation) AddedAppID() (r int64, exists bool)

AddedAppID returns the value that was added to the "app_id" field in this mutation.

func (*ChannelMutation) AddedEdges

func (m *ChannelMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ChannelMutation) AddedFeeRate

func (m *ChannelMutation) AddedFeeRate() (r float64, exists bool)

AddedFeeRate returns the value that was added to the "fee_rate" field in this mutation.

func (*ChannelMutation) AddedField

func (m *ChannelMutation) 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 (*ChannelMutation) AddedFields

func (m *ChannelMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ChannelMutation) AddedIDs

func (m *ChannelMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ChannelMutation) AddedStatus

func (m *ChannelMutation) AddedStatus() (r int8, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*ChannelMutation) AppID

func (m *ChannelMutation) AppID() (r uint64, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*ChannelMutation) ClearDeletedAt

func (m *ChannelMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ChannelMutation) ClearEdge

func (m *ChannelMutation) 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 (*ChannelMutation) ClearField

func (m *ChannelMutation) 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 (*ChannelMutation) ClearRemark

func (m *ChannelMutation) ClearRemark()

ClearRemark clears the value of the "remark" field.

func (*ChannelMutation) ClearStatus

func (m *ChannelMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*ChannelMutation) ClearedEdges

func (m *ChannelMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ChannelMutation) ClearedFields

func (m *ChannelMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ChannelMutation) Client

func (m ChannelMutation) 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 (*ChannelMutation) Code

func (m *ChannelMutation) Code() (r string, exists bool)

Code returns the value of the "code" field in the mutation.

func (*ChannelMutation) Config

func (m *ChannelMutation) Config() (r string, exists bool)

Config returns the value of the "config" field in the mutation.

func (*ChannelMutation) CreatedAt

func (m *ChannelMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ChannelMutation) DeletedAt

func (m *ChannelMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*ChannelMutation) DeletedAtCleared

func (m *ChannelMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*ChannelMutation) EdgeCleared

func (m *ChannelMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ChannelMutation) ExecContext

func (c *ChannelMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ChannelMutation) FeeRate

func (m *ChannelMutation) FeeRate() (r float64, exists bool)

FeeRate returns the value of the "fee_rate" field in the mutation.

func (*ChannelMutation) Field

func (m *ChannelMutation) 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 (*ChannelMutation) FieldCleared

func (m *ChannelMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ChannelMutation) Fields

func (m *ChannelMutation) 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 (*ChannelMutation) ID

func (m *ChannelMutation) 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 (*ChannelMutation) IDs

func (m *ChannelMutation) 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 (*ChannelMutation) OldAppID

func (m *ChannelMutation) OldAppID(ctx context.Context) (v uint64, err error)

OldAppID returns the old "app_id" field's value of the Channel entity. If the Channel object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChannelMutation) OldCode

func (m *ChannelMutation) OldCode(ctx context.Context) (v string, err error)

OldCode returns the old "code" field's value of the Channel entity. If the Channel object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChannelMutation) OldConfig

func (m *ChannelMutation) OldConfig(ctx context.Context) (v string, err error)

OldConfig returns the old "config" field's value of the Channel entity. If the Channel object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChannelMutation) OldCreatedAt

func (m *ChannelMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Channel entity. If the Channel object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChannelMutation) OldDeletedAt

func (m *ChannelMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the Channel entity. If the Channel object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChannelMutation) OldFeeRate

func (m *ChannelMutation) OldFeeRate(ctx context.Context) (v float64, err error)

OldFeeRate returns the old "fee_rate" field's value of the Channel entity. If the Channel object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChannelMutation) OldField

func (m *ChannelMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*ChannelMutation) OldRemark

func (m *ChannelMutation) OldRemark(ctx context.Context) (v string, err error)

OldRemark returns the old "remark" field's value of the Channel entity. If the Channel object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChannelMutation) OldStatus

func (m *ChannelMutation) OldStatus(ctx context.Context) (v uint8, err error)

OldStatus returns the old "status" field's value of the Channel entity. If the Channel object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChannelMutation) OldUpdatedAt

func (m *ChannelMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Channel entity. If the Channel object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChannelMutation) Op

func (m *ChannelMutation) Op() Op

Op returns the operation name.

func (*ChannelMutation) QueryContext

func (c *ChannelMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ChannelMutation) Remark

func (m *ChannelMutation) Remark() (r string, exists bool)

Remark returns the value of the "remark" field in the mutation.

func (*ChannelMutation) RemarkCleared

func (m *ChannelMutation) RemarkCleared() bool

RemarkCleared returns if the "remark" field was cleared in this mutation.

func (*ChannelMutation) RemovedEdges

func (m *ChannelMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ChannelMutation) RemovedIDs

func (m *ChannelMutation) 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 (*ChannelMutation) ResetAppID

func (m *ChannelMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*ChannelMutation) ResetCode

func (m *ChannelMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*ChannelMutation) ResetConfig

func (m *ChannelMutation) ResetConfig()

ResetConfig resets all changes to the "config" field.

func (*ChannelMutation) ResetCreatedAt

func (m *ChannelMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ChannelMutation) ResetDeletedAt

func (m *ChannelMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*ChannelMutation) ResetEdge

func (m *ChannelMutation) 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 (*ChannelMutation) ResetFeeRate

func (m *ChannelMutation) ResetFeeRate()

ResetFeeRate resets all changes to the "fee_rate" field.

func (*ChannelMutation) ResetField

func (m *ChannelMutation) 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 (*ChannelMutation) ResetRemark

func (m *ChannelMutation) ResetRemark()

ResetRemark resets all changes to the "remark" field.

func (*ChannelMutation) ResetStatus

func (m *ChannelMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*ChannelMutation) ResetUpdatedAt

func (m *ChannelMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ChannelMutation) SetAppID

func (m *ChannelMutation) SetAppID(u uint64)

SetAppID sets the "app_id" field.

func (*ChannelMutation) SetCode

func (m *ChannelMutation) SetCode(s string)

SetCode sets the "code" field.

func (*ChannelMutation) SetConfig

func (m *ChannelMutation) SetConfig(s string)

SetConfig sets the "config" field.

func (*ChannelMutation) SetCreatedAt

func (m *ChannelMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ChannelMutation) SetDeletedAt

func (m *ChannelMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*ChannelMutation) SetFeeRate

func (m *ChannelMutation) SetFeeRate(f float64)

SetFeeRate sets the "fee_rate" field.

func (*ChannelMutation) SetField

func (m *ChannelMutation) 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 (*ChannelMutation) SetID

func (m *ChannelMutation) SetID(id uint64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Channel entities.

func (*ChannelMutation) SetOp

func (m *ChannelMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*ChannelMutation) SetRemark

func (m *ChannelMutation) SetRemark(s string)

SetRemark sets the "remark" field.

func (*ChannelMutation) SetStatus

func (m *ChannelMutation) SetStatus(u uint8)

SetStatus sets the "status" field.

func (*ChannelMutation) SetUpdatedAt

func (m *ChannelMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ChannelMutation) Status

func (m *ChannelMutation) Status() (r uint8, exists bool)

Status returns the value of the "status" field in the mutation.

func (*ChannelMutation) StatusCleared

func (m *ChannelMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (ChannelMutation) Tx

func (m ChannelMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ChannelMutation) Type

func (m *ChannelMutation) Type() string

Type returns the node type of this mutation (Channel).

func (*ChannelMutation) UpdatedAt

func (m *ChannelMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ChannelMutation) Where

func (m *ChannelMutation) Where(ps ...predicate.Channel)

Where appends a list predicates to the ChannelMutation builder.

func (*ChannelMutation) WhereP

func (m *ChannelMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the ChannelMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type ChannelPageList

type ChannelPageList struct {
	List        []*Channel   `json:"list"`
	PageDetails *PageDetails `json:"pageDetails"`
}

ChannelPageList is Channel PageList result.

type ChannelPager

type ChannelPager struct {
	Order  channel.OrderOption
	Filter func(*ChannelQuery) (*ChannelQuery, error)
}

func (*ChannelPager) ApplyFilter

func (p *ChannelPager) ApplyFilter(query *ChannelQuery) (*ChannelQuery, error)

type ChannelPaginateOption

type ChannelPaginateOption func(*ChannelPager)

ChannelPaginateOption enables pagination customization.

type ChannelQuery

type ChannelQuery struct {
	// contains filtered or unexported fields
}

ChannelQuery is the builder for querying Channel entities.

func (*ChannelQuery) Aggregate

func (cq *ChannelQuery) Aggregate(fns ...AggregateFunc) *ChannelSelect

Aggregate returns a ChannelSelect configured with the given aggregations.

func (*ChannelQuery) All

func (cq *ChannelQuery) All(ctx context.Context) ([]*Channel, error)

All executes the query and returns a list of Channels.

func (*ChannelQuery) AllX

func (cq *ChannelQuery) AllX(ctx context.Context) []*Channel

AllX is like All, but panics if an error occurs.

func (*ChannelQuery) Clone

func (cq *ChannelQuery) Clone() *ChannelQuery

Clone returns a duplicate of the ChannelQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ChannelQuery) Count

func (cq *ChannelQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ChannelQuery) CountX

func (cq *ChannelQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ChannelQuery) ExecContext

func (c *ChannelQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ChannelQuery) Exist

func (cq *ChannelQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ChannelQuery) ExistX

func (cq *ChannelQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ChannelQuery) First

func (cq *ChannelQuery) First(ctx context.Context) (*Channel, error)

First returns the first Channel entity from the query. Returns a *NotFoundError when no Channel was found.

func (*ChannelQuery) FirstID

func (cq *ChannelQuery) FirstID(ctx context.Context) (id uint64, err error)

FirstID returns the first Channel ID from the query. Returns a *NotFoundError when no Channel ID was found.

func (*ChannelQuery) FirstIDX

func (cq *ChannelQuery) FirstIDX(ctx context.Context) uint64

FirstIDX is like FirstID, but panics if an error occurs.

func (*ChannelQuery) FirstX

func (cq *ChannelQuery) FirstX(ctx context.Context) *Channel

FirstX is like First, but panics if an error occurs.

func (*ChannelQuery) GroupBy

func (cq *ChannelQuery) GroupBy(field string, fields ...string) *ChannelGroupBy

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.Channel.Query().
	GroupBy(channel.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ChannelQuery) IDs

func (cq *ChannelQuery) IDs(ctx context.Context) (ids []uint64, err error)

IDs executes the query and returns a list of Channel IDs.

func (*ChannelQuery) IDsX

func (cq *ChannelQuery) IDsX(ctx context.Context) []uint64

IDsX is like IDs, but panics if an error occurs.

func (*ChannelQuery) Limit

func (cq *ChannelQuery) Limit(limit int) *ChannelQuery

Limit the number of records to be returned by this query.

func (*ChannelQuery) Offset

func (cq *ChannelQuery) Offset(offset int) *ChannelQuery

Offset to start from.

func (*ChannelQuery) Only

func (cq *ChannelQuery) Only(ctx context.Context) (*Channel, error)

Only returns a single Channel entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Channel entity is found. Returns a *NotFoundError when no Channel entities are found.

func (*ChannelQuery) OnlyID

func (cq *ChannelQuery) OnlyID(ctx context.Context) (id uint64, err error)

OnlyID is like Only, but returns the only Channel ID in the query. Returns a *NotSingularError when more than one Channel ID is found. Returns a *NotFoundError when no entities are found.

func (*ChannelQuery) OnlyIDX

func (cq *ChannelQuery) OnlyIDX(ctx context.Context) uint64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ChannelQuery) OnlyX

func (cq *ChannelQuery) OnlyX(ctx context.Context) *Channel

OnlyX is like Only, but panics if an error occurs.

func (*ChannelQuery) Order

func (cq *ChannelQuery) Order(o ...channel.OrderOption) *ChannelQuery

Order specifies how the records should be ordered.

func (*ChannelQuery) Page

func (c *ChannelQuery) Page(
	ctx context.Context, pageNum uint64, pageSize uint64, opts ...ChannelPaginateOption,
) (*ChannelPageList, error)

func (*ChannelQuery) QueryContext

func (c *ChannelQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ChannelQuery) Select

func (cq *ChannelQuery) Select(fields ...string) *ChannelSelect

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.Channel.Query().
	Select(channel.FieldCreatedAt).
	Scan(ctx, &v)

func (*ChannelQuery) Unique

func (cq *ChannelQuery) Unique(unique bool) *ChannelQuery

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 (*ChannelQuery) Where

func (cq *ChannelQuery) Where(ps ...predicate.Channel) *ChannelQuery

Where adds a new predicate for the ChannelQuery builder.

type ChannelSelect

type ChannelSelect struct {
	*ChannelQuery
	// contains filtered or unexported fields
}

ChannelSelect is the builder for selecting fields of Channel entities.

func (*ChannelSelect) Aggregate

func (cs *ChannelSelect) Aggregate(fns ...AggregateFunc) *ChannelSelect

Aggregate adds the given aggregation functions to the selector query.

func (*ChannelSelect) Bool

func (s *ChannelSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ChannelSelect) BoolX

func (s *ChannelSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ChannelSelect) Bools

func (s *ChannelSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ChannelSelect) BoolsX

func (s *ChannelSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (ChannelSelect) ExecContext

func (c ChannelSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ChannelSelect) Float64

func (s *ChannelSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ChannelSelect) Float64X

func (s *ChannelSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ChannelSelect) Float64s

func (s *ChannelSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ChannelSelect) Float64sX

func (s *ChannelSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ChannelSelect) Int

func (s *ChannelSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ChannelSelect) IntX

func (s *ChannelSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ChannelSelect) Ints

func (s *ChannelSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ChannelSelect) IntsX

func (s *ChannelSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (ChannelSelect) QueryContext

func (c ChannelSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ChannelSelect) Scan

func (cs *ChannelSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*ChannelSelect) ScanX

func (s *ChannelSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*ChannelSelect) String

func (s *ChannelSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ChannelSelect) StringX

func (s *ChannelSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ChannelSelect) Strings

func (s *ChannelSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ChannelSelect) StringsX

func (s *ChannelSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ChannelUpdate

type ChannelUpdate struct {
	// contains filtered or unexported fields
}

ChannelUpdate is the builder for updating Channel entities.

func (*ChannelUpdate) AddAppID

func (cu *ChannelUpdate) AddAppID(u int64) *ChannelUpdate

AddAppID adds u to the "app_id" field.

func (*ChannelUpdate) AddFeeRate

func (cu *ChannelUpdate) AddFeeRate(f float64) *ChannelUpdate

AddFeeRate adds f to the "fee_rate" field.

func (*ChannelUpdate) AddStatus

func (cu *ChannelUpdate) AddStatus(u int8) *ChannelUpdate

AddStatus adds u to the "status" field.

func (*ChannelUpdate) ClearDeletedAt

func (cu *ChannelUpdate) ClearDeletedAt() *ChannelUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ChannelUpdate) ClearRemark

func (cu *ChannelUpdate) ClearRemark() *ChannelUpdate

ClearRemark clears the value of the "remark" field.

func (*ChannelUpdate) ClearStatus

func (cu *ChannelUpdate) ClearStatus() *ChannelUpdate

ClearStatus clears the value of the "status" field.

func (*ChannelUpdate) Exec

func (cu *ChannelUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ChannelUpdate) ExecContext

func (c *ChannelUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ChannelUpdate) ExecX

func (cu *ChannelUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ChannelUpdate) Mutation

func (cu *ChannelUpdate) Mutation() *ChannelMutation

Mutation returns the ChannelMutation object of the builder.

func (*ChannelUpdate) QueryContext

func (c *ChannelUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ChannelUpdate) Save

func (cu *ChannelUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ChannelUpdate) SaveX

func (cu *ChannelUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ChannelUpdate) SetAppID

func (cu *ChannelUpdate) SetAppID(u uint64) *ChannelUpdate

SetAppID sets the "app_id" field.

func (*ChannelUpdate) SetCode

func (cu *ChannelUpdate) SetCode(s string) *ChannelUpdate

SetCode sets the "code" field.

func (*ChannelUpdate) SetConfig

func (cu *ChannelUpdate) SetConfig(s string) *ChannelUpdate

SetConfig sets the "config" field.

func (*ChannelUpdate) SetDeletedAt

func (cu *ChannelUpdate) SetDeletedAt(t time.Time) *ChannelUpdate

SetDeletedAt sets the "deleted_at" field.

func (*ChannelUpdate) SetFeeRate

func (cu *ChannelUpdate) SetFeeRate(f float64) *ChannelUpdate

SetFeeRate sets the "fee_rate" field.

func (*ChannelUpdate) SetNillableDeletedAt

func (cu *ChannelUpdate) SetNillableDeletedAt(t *time.Time) *ChannelUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*ChannelUpdate) SetNillableRemark

func (cu *ChannelUpdate) SetNillableRemark(s *string) *ChannelUpdate

SetNillableRemark sets the "remark" field if the given value is not nil.

func (*ChannelUpdate) SetNillableStatus

func (cu *ChannelUpdate) SetNillableStatus(u *uint8) *ChannelUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ChannelUpdate) SetNotNilAppID

func (c *ChannelUpdate) SetNotNilAppID(value *uint64) *ChannelUpdate

set field if value's pointer is not nil.

func (*ChannelUpdate) SetNotNilCode

func (c *ChannelUpdate) SetNotNilCode(value *string) *ChannelUpdate

set field if value's pointer is not nil.

func (*ChannelUpdate) SetNotNilConfig

func (c *ChannelUpdate) SetNotNilConfig(value *string) *ChannelUpdate

set field if value's pointer is not nil.

func (*ChannelUpdate) SetNotNilDeletedAt

func (c *ChannelUpdate) SetNotNilDeletedAt(value *time.Time) *ChannelUpdate

set field if value's pointer is not nil.

func (*ChannelUpdate) SetNotNilFeeRate

func (c *ChannelUpdate) SetNotNilFeeRate(value *float64) *ChannelUpdate

set field if value's pointer is not nil.

func (*ChannelUpdate) SetNotNilRemark

func (c *ChannelUpdate) SetNotNilRemark(value *string) *ChannelUpdate

set field if value's pointer is not nil.

func (*ChannelUpdate) SetNotNilStatus

func (c *ChannelUpdate) SetNotNilStatus(value *uint8) *ChannelUpdate

set field if value's pointer is not nil.

func (*ChannelUpdate) SetNotNilUpdatedAt

func (c *ChannelUpdate) SetNotNilUpdatedAt(value *time.Time) *ChannelUpdate

set field if value's pointer is not nil.

func (*ChannelUpdate) SetRemark

func (cu *ChannelUpdate) SetRemark(s string) *ChannelUpdate

SetRemark sets the "remark" field.

func (*ChannelUpdate) SetStatus

func (cu *ChannelUpdate) SetStatus(u uint8) *ChannelUpdate

SetStatus sets the "status" field.

func (*ChannelUpdate) SetUpdatedAt

func (cu *ChannelUpdate) SetUpdatedAt(t time.Time) *ChannelUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ChannelUpdate) Where

func (cu *ChannelUpdate) Where(ps ...predicate.Channel) *ChannelUpdate

Where appends a list predicates to the ChannelUpdate builder.

type ChannelUpdateOne

type ChannelUpdateOne struct {
	// contains filtered or unexported fields
}

ChannelUpdateOne is the builder for updating a single Channel entity.

func (*ChannelUpdateOne) AddAppID

func (cuo *ChannelUpdateOne) AddAppID(u int64) *ChannelUpdateOne

AddAppID adds u to the "app_id" field.

func (*ChannelUpdateOne) AddFeeRate

func (cuo *ChannelUpdateOne) AddFeeRate(f float64) *ChannelUpdateOne

AddFeeRate adds f to the "fee_rate" field.

func (*ChannelUpdateOne) AddStatus

func (cuo *ChannelUpdateOne) AddStatus(u int8) *ChannelUpdateOne

AddStatus adds u to the "status" field.

func (*ChannelUpdateOne) ClearDeletedAt

func (cuo *ChannelUpdateOne) ClearDeletedAt() *ChannelUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*ChannelUpdateOne) ClearRemark

func (cuo *ChannelUpdateOne) ClearRemark() *ChannelUpdateOne

ClearRemark clears the value of the "remark" field.

func (*ChannelUpdateOne) ClearStatus

func (cuo *ChannelUpdateOne) ClearStatus() *ChannelUpdateOne

ClearStatus clears the value of the "status" field.

func (*ChannelUpdateOne) Exec

func (cuo *ChannelUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ChannelUpdateOne) ExecContext

func (c *ChannelUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*ChannelUpdateOne) ExecX

func (cuo *ChannelUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ChannelUpdateOne) Mutation

func (cuo *ChannelUpdateOne) Mutation() *ChannelMutation

Mutation returns the ChannelMutation object of the builder.

func (*ChannelUpdateOne) QueryContext

func (c *ChannelUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*ChannelUpdateOne) Save

func (cuo *ChannelUpdateOne) Save(ctx context.Context) (*Channel, error)

Save executes the query and returns the updated Channel entity.

func (*ChannelUpdateOne) SaveX

func (cuo *ChannelUpdateOne) SaveX(ctx context.Context) *Channel

SaveX is like Save, but panics if an error occurs.

func (*ChannelUpdateOne) Select

func (cuo *ChannelUpdateOne) Select(field string, fields ...string) *ChannelUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ChannelUpdateOne) SetAppID

func (cuo *ChannelUpdateOne) SetAppID(u uint64) *ChannelUpdateOne

SetAppID sets the "app_id" field.

func (*ChannelUpdateOne) SetCode

func (cuo *ChannelUpdateOne) SetCode(s string) *ChannelUpdateOne

SetCode sets the "code" field.

func (*ChannelUpdateOne) SetConfig

func (cuo *ChannelUpdateOne) SetConfig(s string) *ChannelUpdateOne

SetConfig sets the "config" field.

func (*ChannelUpdateOne) SetDeletedAt

func (cuo *ChannelUpdateOne) SetDeletedAt(t time.Time) *ChannelUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*ChannelUpdateOne) SetFeeRate

func (cuo *ChannelUpdateOne) SetFeeRate(f float64) *ChannelUpdateOne

SetFeeRate sets the "fee_rate" field.

func (*ChannelUpdateOne) SetNillableDeletedAt

func (cuo *ChannelUpdateOne) SetNillableDeletedAt(t *time.Time) *ChannelUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*ChannelUpdateOne) SetNillableRemark

func (cuo *ChannelUpdateOne) SetNillableRemark(s *string) *ChannelUpdateOne

SetNillableRemark sets the "remark" field if the given value is not nil.

func (*ChannelUpdateOne) SetNillableStatus

func (cuo *ChannelUpdateOne) SetNillableStatus(u *uint8) *ChannelUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ChannelUpdateOne) SetNotNilAppID

func (c *ChannelUpdateOne) SetNotNilAppID(value *uint64) *ChannelUpdateOne

set field if value's pointer is not nil.

func (*ChannelUpdateOne) SetNotNilCode

func (c *ChannelUpdateOne) SetNotNilCode(value *string) *ChannelUpdateOne

set field if value's pointer is not nil.

func (*ChannelUpdateOne) SetNotNilConfig

func (c *ChannelUpdateOne) SetNotNilConfig(value *string) *ChannelUpdateOne

set field if value's pointer is not nil.

func (*ChannelUpdateOne) SetNotNilDeletedAt

func (c *ChannelUpdateOne) SetNotNilDeletedAt(value *time.Time) *ChannelUpdateOne

set field if value's pointer is not nil.

func (*ChannelUpdateOne) SetNotNilFeeRate

func (c *ChannelUpdateOne) SetNotNilFeeRate(value *float64) *ChannelUpdateOne

set field if value's pointer is not nil.

func (*ChannelUpdateOne) SetNotNilRemark

func (c *ChannelUpdateOne) SetNotNilRemark(value *string) *ChannelUpdateOne

set field if value's pointer is not nil.

func (*ChannelUpdateOne) SetNotNilStatus

func (c *ChannelUpdateOne) SetNotNilStatus(value *uint8) *ChannelUpdateOne

set field if value's pointer is not nil.

func (*ChannelUpdateOne) SetNotNilUpdatedAt

func (c *ChannelUpdateOne) SetNotNilUpdatedAt(value *time.Time) *ChannelUpdateOne

set field if value's pointer is not nil.

func (*ChannelUpdateOne) SetRemark

func (cuo *ChannelUpdateOne) SetRemark(s string) *ChannelUpdateOne

SetRemark sets the "remark" field.

func (*ChannelUpdateOne) SetStatus

func (cuo *ChannelUpdateOne) SetStatus(u uint8) *ChannelUpdateOne

SetStatus sets the "status" field.

func (*ChannelUpdateOne) SetUpdatedAt

func (cuo *ChannelUpdateOne) SetUpdatedAt(t time.Time) *ChannelUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*ChannelUpdateOne) Where

Where appends a list predicates to the ChannelUpdate builder.

type Channels

type Channels []*Channel

Channels is a parsable slice of Channel.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// App is the client for interacting with the App builders.
	App *AppClient
	// Channel is the client for interacting with the Channel builders.
	Channel *ChannelClient
	// DemoOrder is the client for interacting with the DemoOrder builders.
	DemoOrder *DemoOrderClient
	// NotifyLog is the client for interacting with the NotifyLog builders.
	NotifyLog *NotifyLogClient
	// NotifyTask is the client for interacting with the NotifyTask builders.
	NotifyTask *NotifyTaskClient
	// 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

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

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) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	App.
	Query().
	Count(ctx)

func (*Client) ExecContext

func (c *Client) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) QueryContext

func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

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.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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 Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

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) ExecContext

func (c *DemoOrder) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DemoOrder) QueryContext

func (c *DemoOrder) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DemoOrder) String

func (do *DemoOrder) String() string

String implements the fmt.Stringer.

func (*DemoOrder) Unwrap

func (do *DemoOrder) Unwrap() *DemoOrder

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.

func (*DemoOrder) Value

func (do *DemoOrder) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the DemoOrder. This includes values selected through modifiers, order, etc.

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) ExecContext

func (c *DemoOrderClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DemoOrderClient) Get

func (c *DemoOrderClient) Get(ctx context.Context, id uint64) (*DemoOrder, error)

Get returns a DemoOrder 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) QueryContext

func (c *DemoOrderClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *DemoOrderCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *DemoOrderCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *DemoOrderCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DemoOrderCreateBulk) ExecX

func (docb *DemoOrderCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DemoOrderCreateBulk) QueryContext

func (c *DemoOrderCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DemoOrderCreateBulk) Save

func (docb *DemoOrderCreateBulk) Save(ctx context.Context) ([]*DemoOrder, error)

Save creates the DemoOrder entities in the database.

func (*DemoOrderCreateBulk) SaveX

func (docb *DemoOrderCreateBulk) SaveX(ctx context.Context) []*DemoOrder

SaveX is like Save, 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) ExecContext

func (c *DemoOrderDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DemoOrderDelete) ExecX

func (dod *DemoOrderDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DemoOrderDelete) QueryContext

func (c *DemoOrderDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*DemoOrderDelete) Where

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

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

func (s *DemoOrderGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DemoOrderGroupBy) BoolX

func (s *DemoOrderGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DemoOrderGroupBy) Bools

func (s *DemoOrderGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DemoOrderGroupBy) BoolsX

func (s *DemoOrderGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DemoOrderGroupBy) Float64

func (s *DemoOrderGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DemoOrderGroupBy) Float64X

func (s *DemoOrderGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DemoOrderGroupBy) Float64s

func (s *DemoOrderGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DemoOrderGroupBy) Float64sX

func (s *DemoOrderGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DemoOrderGroupBy) Int

func (s *DemoOrderGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DemoOrderGroupBy) IntX

func (s *DemoOrderGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DemoOrderGroupBy) Ints

func (s *DemoOrderGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DemoOrderGroupBy) IntsX

func (s *DemoOrderGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *DemoOrderGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DemoOrderGroupBy) String

func (s *DemoOrderGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DemoOrderGroupBy) StringX

func (s *DemoOrderGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DemoOrderGroupBy) Strings

func (s *DemoOrderGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DemoOrderGroupBy) StringsX

func (s *DemoOrderGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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) ExecContext

func (c *DemoOrderMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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

func (m *DemoOrderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *DemoOrderMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

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

func (m *DemoOrderMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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

func (m *DemoOrderMutation) OldPayTime(ctx context.Context) (v time.Time, err error)

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

func (m *DemoOrderMutation) OldRefundTime(ctx context.Context) (v time.Time, err error)

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

func (m *DemoOrderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

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) Op

func (m *DemoOrderMutation) Op() Op

Op returns the operation name.

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) QueryContext

func (c *DemoOrderMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *DemoOrderQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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

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) QueryContext

func (c *DemoOrderQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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

func (s *DemoOrderSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DemoOrderSelect) BoolX

func (s *DemoOrderSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DemoOrderSelect) Bools

func (s *DemoOrderSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DemoOrderSelect) BoolsX

func (s *DemoOrderSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (DemoOrderSelect) ExecContext

func (c DemoOrderSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*DemoOrderSelect) Float64

func (s *DemoOrderSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DemoOrderSelect) Float64X

func (s *DemoOrderSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DemoOrderSelect) Float64s

func (s *DemoOrderSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DemoOrderSelect) Float64sX

func (s *DemoOrderSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DemoOrderSelect) Int

func (s *DemoOrderSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DemoOrderSelect) IntX

func (s *DemoOrderSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DemoOrderSelect) Ints

func (s *DemoOrderSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DemoOrderSelect) IntsX

func (s *DemoOrderSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (DemoOrderSelect) QueryContext

func (c DemoOrderSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ScanX

func (s *DemoOrderSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*DemoOrderSelect) String

func (s *DemoOrderSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DemoOrderSelect) StringX

func (s *DemoOrderSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DemoOrderSelect) Strings

func (s *DemoOrderSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DemoOrderSelect) StringsX

func (s *DemoOrderSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

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) ExecContext

func (c *DemoOrderUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *DemoOrderUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillablePayTime

func (dou *DemoOrderUpdate) SetNillablePayTime(t *time.Time) *DemoOrderUpdate

SetNillablePayTime sets the "pay_time" 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) 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

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) ExecContext

func (c *DemoOrderUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *DemoOrderUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetNillablePayTime

func (douo *DemoOrderUpdateOne) SetNillablePayTime(t *time.Time) *DemoOrderUpdateOne

SetNillablePayTime sets the "pay_time" 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) 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

Where appends a list predicates to the DemoOrderUpdate builder.

type DemoOrders

type DemoOrders []*DemoOrder

DemoOrders is a parsable slice of DemoOrder.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

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 Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

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 NotifyLog

type NotifyLog 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"`
	// 通知任务编号
	TaskID uint64 `json:"task_id,omitempty"`
	// 第几次被通知
	NotifyTimes int8 `json:"notify_times,omitempty"`
	// 请求参数
	Response string `json:"response,omitempty"`
	// contains filtered or unexported fields
}

NotifyLog is the model entity for the NotifyLog schema.

func (*NotifyLog) ExecContext

func (c *NotifyLog) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyLog) QueryContext

func (c *NotifyLog) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyLog) String

func (nl *NotifyLog) String() string

String implements the fmt.Stringer.

func (*NotifyLog) Unwrap

func (nl *NotifyLog) Unwrap() *NotifyLog

Unwrap unwraps the NotifyLog 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 (*NotifyLog) Update

func (nl *NotifyLog) Update() *NotifyLogUpdateOne

Update returns a builder for updating this NotifyLog. Note that you need to call NotifyLog.Unwrap() before calling this method if this NotifyLog was returned from a transaction, and the transaction was committed or rolled back.

func (*NotifyLog) Value

func (nl *NotifyLog) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the NotifyLog. This includes values selected through modifiers, order, etc.

type NotifyLogClient

type NotifyLogClient struct {
	// contains filtered or unexported fields
}

NotifyLogClient is a client for the NotifyLog schema.

func NewNotifyLogClient

func NewNotifyLogClient(c config) *NotifyLogClient

NewNotifyLogClient returns a client for the NotifyLog from the given config.

func (*NotifyLogClient) Create

func (c *NotifyLogClient) Create() *NotifyLogCreate

Create returns a builder for creating a NotifyLog entity.

func (*NotifyLogClient) CreateBulk

func (c *NotifyLogClient) CreateBulk(builders ...*NotifyLogCreate) *NotifyLogCreateBulk

CreateBulk returns a builder for creating a bulk of NotifyLog entities.

func (*NotifyLogClient) Delete

func (c *NotifyLogClient) Delete() *NotifyLogDelete

Delete returns a delete builder for NotifyLog.

func (*NotifyLogClient) DeleteOne

func (c *NotifyLogClient) DeleteOne(nl *NotifyLog) *NotifyLogDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*NotifyLogClient) DeleteOneID

func (c *NotifyLogClient) DeleteOneID(id uint64) *NotifyLogDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*NotifyLogClient) ExecContext

func (c *NotifyLogClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyLogClient) Get

func (c *NotifyLogClient) Get(ctx context.Context, id uint64) (*NotifyLog, error)

Get returns a NotifyLog entity by its id.

func (*NotifyLogClient) GetX

func (c *NotifyLogClient) GetX(ctx context.Context, id uint64) *NotifyLog

GetX is like Get, but panics if an error occurs.

func (*NotifyLogClient) Hooks

func (c *NotifyLogClient) Hooks() []Hook

Hooks returns the client hooks.

func (*NotifyLogClient) Intercept

func (c *NotifyLogClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `notifylog.Intercept(f(g(h())))`.

func (*NotifyLogClient) Interceptors

func (c *NotifyLogClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*NotifyLogClient) MapCreateBulk

func (c *NotifyLogClient) MapCreateBulk(slice any, setFunc func(*NotifyLogCreate, int)) *NotifyLogCreateBulk

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 (*NotifyLogClient) Query

func (c *NotifyLogClient) Query() *NotifyLogQuery

Query returns a query builder for NotifyLog.

func (*NotifyLogClient) QueryContext

func (c *NotifyLogClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyLogClient) Update

func (c *NotifyLogClient) Update() *NotifyLogUpdate

Update returns an update builder for NotifyLog.

func (*NotifyLogClient) UpdateOne

func (c *NotifyLogClient) UpdateOne(nl *NotifyLog) *NotifyLogUpdateOne

UpdateOne returns an update builder for the given entity.

func (*NotifyLogClient) UpdateOneID

func (c *NotifyLogClient) UpdateOneID(id uint64) *NotifyLogUpdateOne

UpdateOneID returns an update builder for the given id.

func (*NotifyLogClient) Use

func (c *NotifyLogClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `notifylog.Hooks(f(g(h())))`.

type NotifyLogCreate

type NotifyLogCreate struct {
	// contains filtered or unexported fields
}

NotifyLogCreate is the builder for creating a NotifyLog entity.

func (*NotifyLogCreate) Exec

func (nlc *NotifyLogCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*NotifyLogCreate) ExecContext

func (c *NotifyLogCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyLogCreate) ExecX

func (nlc *NotifyLogCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotifyLogCreate) Mutation

func (nlc *NotifyLogCreate) Mutation() *NotifyLogMutation

Mutation returns the NotifyLogMutation object of the builder.

func (*NotifyLogCreate) QueryContext

func (c *NotifyLogCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyLogCreate) Save

func (nlc *NotifyLogCreate) Save(ctx context.Context) (*NotifyLog, error)

Save creates the NotifyLog in the database.

func (*NotifyLogCreate) SaveX

func (nlc *NotifyLogCreate) SaveX(ctx context.Context) *NotifyLog

SaveX calls Save and panics if Save returns an error.

func (*NotifyLogCreate) SetCreatedAt

func (nlc *NotifyLogCreate) SetCreatedAt(t time.Time) *NotifyLogCreate

SetCreatedAt sets the "created_at" field.

func (*NotifyLogCreate) SetDeletedAt

func (nlc *NotifyLogCreate) SetDeletedAt(t time.Time) *NotifyLogCreate

SetDeletedAt sets the "deleted_at" field.

func (*NotifyLogCreate) SetID

func (nlc *NotifyLogCreate) SetID(u uint64) *NotifyLogCreate

SetID sets the "id" field.

func (*NotifyLogCreate) SetNillableCreatedAt

func (nlc *NotifyLogCreate) SetNillableCreatedAt(t *time.Time) *NotifyLogCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*NotifyLogCreate) SetNillableDeletedAt

func (nlc *NotifyLogCreate) SetNillableDeletedAt(t *time.Time) *NotifyLogCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*NotifyLogCreate) SetNillableStatus

func (nlc *NotifyLogCreate) SetNillableStatus(u *uint8) *NotifyLogCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*NotifyLogCreate) SetNillableUpdatedAt

func (nlc *NotifyLogCreate) SetNillableUpdatedAt(t *time.Time) *NotifyLogCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*NotifyLogCreate) SetNotNilDeletedAt

func (nl *NotifyLogCreate) SetNotNilDeletedAt(value *time.Time) *NotifyLogCreate

set field if value's pointer is not nil.

func (*NotifyLogCreate) SetNotNilNotifyTimes

func (nl *NotifyLogCreate) SetNotNilNotifyTimes(value *int8) *NotifyLogCreate

set field if value's pointer is not nil.

func (*NotifyLogCreate) SetNotNilResponse

func (nl *NotifyLogCreate) SetNotNilResponse(value *string) *NotifyLogCreate

set field if value's pointer is not nil.

func (*NotifyLogCreate) SetNotNilStatus

func (nl *NotifyLogCreate) SetNotNilStatus(value *uint8) *NotifyLogCreate

set field if value's pointer is not nil.

func (*NotifyLogCreate) SetNotNilTaskID

func (nl *NotifyLogCreate) SetNotNilTaskID(value *uint64) *NotifyLogCreate

set field if value's pointer is not nil.

func (*NotifyLogCreate) SetNotNilUpdatedAt

func (nl *NotifyLogCreate) SetNotNilUpdatedAt(value *time.Time) *NotifyLogCreate

set field if value's pointer is not nil.

func (*NotifyLogCreate) SetNotifyTimes

func (nlc *NotifyLogCreate) SetNotifyTimes(i int8) *NotifyLogCreate

SetNotifyTimes sets the "notify_times" field.

func (*NotifyLogCreate) SetResponse

func (nlc *NotifyLogCreate) SetResponse(s string) *NotifyLogCreate

SetResponse sets the "response" field.

func (*NotifyLogCreate) SetStatus

func (nlc *NotifyLogCreate) SetStatus(u uint8) *NotifyLogCreate

SetStatus sets the "status" field.

func (*NotifyLogCreate) SetTaskID

func (nlc *NotifyLogCreate) SetTaskID(u uint64) *NotifyLogCreate

SetTaskID sets the "task_id" field.

func (*NotifyLogCreate) SetUpdatedAt

func (nlc *NotifyLogCreate) SetUpdatedAt(t time.Time) *NotifyLogCreate

SetUpdatedAt sets the "updated_at" field.

type NotifyLogCreateBulk

type NotifyLogCreateBulk struct {
	// contains filtered or unexported fields
}

NotifyLogCreateBulk is the builder for creating many NotifyLog entities in bulk.

func (*NotifyLogCreateBulk) Exec

func (nlcb *NotifyLogCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*NotifyLogCreateBulk) ExecContext

func (c *NotifyLogCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyLogCreateBulk) ExecX

func (nlcb *NotifyLogCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotifyLogCreateBulk) QueryContext

func (c *NotifyLogCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyLogCreateBulk) Save

func (nlcb *NotifyLogCreateBulk) Save(ctx context.Context) ([]*NotifyLog, error)

Save creates the NotifyLog entities in the database.

func (*NotifyLogCreateBulk) SaveX

func (nlcb *NotifyLogCreateBulk) SaveX(ctx context.Context) []*NotifyLog

SaveX is like Save, but panics if an error occurs.

type NotifyLogDelete

type NotifyLogDelete struct {
	// contains filtered or unexported fields
}

NotifyLogDelete is the builder for deleting a NotifyLog entity.

func (*NotifyLogDelete) Exec

func (nld *NotifyLogDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*NotifyLogDelete) ExecContext

func (c *NotifyLogDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyLogDelete) ExecX

func (nld *NotifyLogDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*NotifyLogDelete) QueryContext

func (c *NotifyLogDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyLogDelete) Where

Where appends a list predicates to the NotifyLogDelete builder.

type NotifyLogDeleteOne

type NotifyLogDeleteOne struct {
	// contains filtered or unexported fields
}

NotifyLogDeleteOne is the builder for deleting a single NotifyLog entity.

func (*NotifyLogDeleteOne) Exec

func (nldo *NotifyLogDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*NotifyLogDeleteOne) ExecX

func (nldo *NotifyLogDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotifyLogDeleteOne) Where

Where appends a list predicates to the NotifyLogDelete builder.

type NotifyLogGroupBy

type NotifyLogGroupBy struct {
	// contains filtered or unexported fields
}

NotifyLogGroupBy is the group-by builder for NotifyLog entities.

func (*NotifyLogGroupBy) Aggregate

func (nlgb *NotifyLogGroupBy) Aggregate(fns ...AggregateFunc) *NotifyLogGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*NotifyLogGroupBy) Bool

func (s *NotifyLogGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NotifyLogGroupBy) BoolX

func (s *NotifyLogGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NotifyLogGroupBy) Bools

func (s *NotifyLogGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NotifyLogGroupBy) BoolsX

func (s *NotifyLogGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NotifyLogGroupBy) Float64

func (s *NotifyLogGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NotifyLogGroupBy) Float64X

func (s *NotifyLogGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NotifyLogGroupBy) Float64s

func (s *NotifyLogGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NotifyLogGroupBy) Float64sX

func (s *NotifyLogGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NotifyLogGroupBy) Int

func (s *NotifyLogGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NotifyLogGroupBy) IntX

func (s *NotifyLogGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NotifyLogGroupBy) Ints

func (s *NotifyLogGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NotifyLogGroupBy) IntsX

func (s *NotifyLogGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NotifyLogGroupBy) Scan

func (nlgb *NotifyLogGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NotifyLogGroupBy) ScanX

func (s *NotifyLogGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NotifyLogGroupBy) String

func (s *NotifyLogGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NotifyLogGroupBy) StringX

func (s *NotifyLogGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NotifyLogGroupBy) Strings

func (s *NotifyLogGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NotifyLogGroupBy) StringsX

func (s *NotifyLogGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NotifyLogMutation

type NotifyLogMutation struct {
	// contains filtered or unexported fields
}

NotifyLogMutation represents an operation that mutates the NotifyLog nodes in the graph.

func (*NotifyLogMutation) AddField

func (m *NotifyLogMutation) 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 (*NotifyLogMutation) AddNotifyTimes

func (m *NotifyLogMutation) AddNotifyTimes(i int8)

AddNotifyTimes adds i to the "notify_times" field.

func (*NotifyLogMutation) AddStatus

func (m *NotifyLogMutation) AddStatus(u int8)

AddStatus adds u to the "status" field.

func (*NotifyLogMutation) AddTaskID

func (m *NotifyLogMutation) AddTaskID(u int64)

AddTaskID adds u to the "task_id" field.

func (*NotifyLogMutation) AddedEdges

func (m *NotifyLogMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*NotifyLogMutation) AddedField

func (m *NotifyLogMutation) 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 (*NotifyLogMutation) AddedFields

func (m *NotifyLogMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*NotifyLogMutation) AddedIDs

func (m *NotifyLogMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*NotifyLogMutation) AddedNotifyTimes

func (m *NotifyLogMutation) AddedNotifyTimes() (r int8, exists bool)

AddedNotifyTimes returns the value that was added to the "notify_times" field in this mutation.

func (*NotifyLogMutation) AddedStatus

func (m *NotifyLogMutation) AddedStatus() (r int8, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*NotifyLogMutation) AddedTaskID

func (m *NotifyLogMutation) AddedTaskID() (r int64, exists bool)

AddedTaskID returns the value that was added to the "task_id" field in this mutation.

func (*NotifyLogMutation) ClearDeletedAt

func (m *NotifyLogMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*NotifyLogMutation) ClearEdge

func (m *NotifyLogMutation) 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 (*NotifyLogMutation) ClearField

func (m *NotifyLogMutation) 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 (*NotifyLogMutation) ClearStatus

func (m *NotifyLogMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*NotifyLogMutation) ClearedEdges

func (m *NotifyLogMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*NotifyLogMutation) ClearedFields

func (m *NotifyLogMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (NotifyLogMutation) Client

func (m NotifyLogMutation) 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 (*NotifyLogMutation) CreatedAt

func (m *NotifyLogMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*NotifyLogMutation) DeletedAt

func (m *NotifyLogMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*NotifyLogMutation) DeletedAtCleared

func (m *NotifyLogMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*NotifyLogMutation) EdgeCleared

func (m *NotifyLogMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*NotifyLogMutation) ExecContext

func (c *NotifyLogMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyLogMutation) Field

func (m *NotifyLogMutation) 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 (*NotifyLogMutation) FieldCleared

func (m *NotifyLogMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*NotifyLogMutation) Fields

func (m *NotifyLogMutation) 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 (*NotifyLogMutation) ID

func (m *NotifyLogMutation) 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 (*NotifyLogMutation) IDs

func (m *NotifyLogMutation) 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 (*NotifyLogMutation) NotifyTimes

func (m *NotifyLogMutation) NotifyTimes() (r int8, exists bool)

NotifyTimes returns the value of the "notify_times" field in the mutation.

func (*NotifyLogMutation) OldCreatedAt

func (m *NotifyLogMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the NotifyLog entity. If the NotifyLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyLogMutation) OldDeletedAt

func (m *NotifyLogMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the NotifyLog entity. If the NotifyLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyLogMutation) OldField

func (m *NotifyLogMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*NotifyLogMutation) OldNotifyTimes

func (m *NotifyLogMutation) OldNotifyTimes(ctx context.Context) (v int8, err error)

OldNotifyTimes returns the old "notify_times" field's value of the NotifyLog entity. If the NotifyLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyLogMutation) OldResponse

func (m *NotifyLogMutation) OldResponse(ctx context.Context) (v string, err error)

OldResponse returns the old "response" field's value of the NotifyLog entity. If the NotifyLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyLogMutation) OldStatus

func (m *NotifyLogMutation) OldStatus(ctx context.Context) (v uint8, err error)

OldStatus returns the old "status" field's value of the NotifyLog entity. If the NotifyLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyLogMutation) OldTaskID

func (m *NotifyLogMutation) OldTaskID(ctx context.Context) (v uint64, err error)

OldTaskID returns the old "task_id" field's value of the NotifyLog entity. If the NotifyLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyLogMutation) OldUpdatedAt

func (m *NotifyLogMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the NotifyLog entity. If the NotifyLog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyLogMutation) Op

func (m *NotifyLogMutation) Op() Op

Op returns the operation name.

func (*NotifyLogMutation) QueryContext

func (c *NotifyLogMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyLogMutation) RemovedEdges

func (m *NotifyLogMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*NotifyLogMutation) RemovedIDs

func (m *NotifyLogMutation) 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 (*NotifyLogMutation) ResetCreatedAt

func (m *NotifyLogMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*NotifyLogMutation) ResetDeletedAt

func (m *NotifyLogMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*NotifyLogMutation) ResetEdge

func (m *NotifyLogMutation) 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 (*NotifyLogMutation) ResetField

func (m *NotifyLogMutation) 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 (*NotifyLogMutation) ResetNotifyTimes

func (m *NotifyLogMutation) ResetNotifyTimes()

ResetNotifyTimes resets all changes to the "notify_times" field.

func (*NotifyLogMutation) ResetResponse

func (m *NotifyLogMutation) ResetResponse()

ResetResponse resets all changes to the "response" field.

func (*NotifyLogMutation) ResetStatus

func (m *NotifyLogMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*NotifyLogMutation) ResetTaskID

func (m *NotifyLogMutation) ResetTaskID()

ResetTaskID resets all changes to the "task_id" field.

func (*NotifyLogMutation) ResetUpdatedAt

func (m *NotifyLogMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*NotifyLogMutation) Response

func (m *NotifyLogMutation) Response() (r string, exists bool)

Response returns the value of the "response" field in the mutation.

func (*NotifyLogMutation) SetCreatedAt

func (m *NotifyLogMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*NotifyLogMutation) SetDeletedAt

func (m *NotifyLogMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*NotifyLogMutation) SetField

func (m *NotifyLogMutation) 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 (*NotifyLogMutation) SetID

func (m *NotifyLogMutation) SetID(id uint64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of NotifyLog entities.

func (*NotifyLogMutation) SetNotifyTimes

func (m *NotifyLogMutation) SetNotifyTimes(i int8)

SetNotifyTimes sets the "notify_times" field.

func (*NotifyLogMutation) SetOp

func (m *NotifyLogMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*NotifyLogMutation) SetResponse

func (m *NotifyLogMutation) SetResponse(s string)

SetResponse sets the "response" field.

func (*NotifyLogMutation) SetStatus

func (m *NotifyLogMutation) SetStatus(u uint8)

SetStatus sets the "status" field.

func (*NotifyLogMutation) SetTaskID

func (m *NotifyLogMutation) SetTaskID(u uint64)

SetTaskID sets the "task_id" field.

func (*NotifyLogMutation) SetUpdatedAt

func (m *NotifyLogMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*NotifyLogMutation) Status

func (m *NotifyLogMutation) Status() (r uint8, exists bool)

Status returns the value of the "status" field in the mutation.

func (*NotifyLogMutation) StatusCleared

func (m *NotifyLogMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*NotifyLogMutation) TaskID

func (m *NotifyLogMutation) TaskID() (r uint64, exists bool)

TaskID returns the value of the "task_id" field in the mutation.

func (NotifyLogMutation) Tx

func (m NotifyLogMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*NotifyLogMutation) Type

func (m *NotifyLogMutation) Type() string

Type returns the node type of this mutation (NotifyLog).

func (*NotifyLogMutation) UpdatedAt

func (m *NotifyLogMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*NotifyLogMutation) Where

func (m *NotifyLogMutation) Where(ps ...predicate.NotifyLog)

Where appends a list predicates to the NotifyLogMutation builder.

func (*NotifyLogMutation) WhereP

func (m *NotifyLogMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the NotifyLogMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type NotifyLogPageList

type NotifyLogPageList struct {
	List        []*NotifyLog `json:"list"`
	PageDetails *PageDetails `json:"pageDetails"`
}

NotifyLogPageList is NotifyLog PageList result.

type NotifyLogPager

type NotifyLogPager struct {
	Order  notifylog.OrderOption
	Filter func(*NotifyLogQuery) (*NotifyLogQuery, error)
}

func (*NotifyLogPager) ApplyFilter

func (p *NotifyLogPager) ApplyFilter(query *NotifyLogQuery) (*NotifyLogQuery, error)

type NotifyLogPaginateOption

type NotifyLogPaginateOption func(*NotifyLogPager)

NotifyLogPaginateOption enables pagination customization.

type NotifyLogQuery

type NotifyLogQuery struct {
	// contains filtered or unexported fields
}

NotifyLogQuery is the builder for querying NotifyLog entities.

func (*NotifyLogQuery) Aggregate

func (nlq *NotifyLogQuery) Aggregate(fns ...AggregateFunc) *NotifyLogSelect

Aggregate returns a NotifyLogSelect configured with the given aggregations.

func (*NotifyLogQuery) All

func (nlq *NotifyLogQuery) All(ctx context.Context) ([]*NotifyLog, error)

All executes the query and returns a list of NotifyLogs.

func (*NotifyLogQuery) AllX

func (nlq *NotifyLogQuery) AllX(ctx context.Context) []*NotifyLog

AllX is like All, but panics if an error occurs.

func (*NotifyLogQuery) Clone

func (nlq *NotifyLogQuery) Clone() *NotifyLogQuery

Clone returns a duplicate of the NotifyLogQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*NotifyLogQuery) Count

func (nlq *NotifyLogQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NotifyLogQuery) CountX

func (nlq *NotifyLogQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*NotifyLogQuery) ExecContext

func (c *NotifyLogQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyLogQuery) Exist

func (nlq *NotifyLogQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*NotifyLogQuery) ExistX

func (nlq *NotifyLogQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*NotifyLogQuery) First

func (nlq *NotifyLogQuery) First(ctx context.Context) (*NotifyLog, error)

First returns the first NotifyLog entity from the query. Returns a *NotFoundError when no NotifyLog was found.

func (*NotifyLogQuery) FirstID

func (nlq *NotifyLogQuery) FirstID(ctx context.Context) (id uint64, err error)

FirstID returns the first NotifyLog ID from the query. Returns a *NotFoundError when no NotifyLog ID was found.

func (*NotifyLogQuery) FirstIDX

func (nlq *NotifyLogQuery) FirstIDX(ctx context.Context) uint64

FirstIDX is like FirstID, but panics if an error occurs.

func (*NotifyLogQuery) FirstX

func (nlq *NotifyLogQuery) FirstX(ctx context.Context) *NotifyLog

FirstX is like First, but panics if an error occurs.

func (*NotifyLogQuery) GroupBy

func (nlq *NotifyLogQuery) GroupBy(field string, fields ...string) *NotifyLogGroupBy

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.NotifyLog.Query().
	GroupBy(notifylog.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NotifyLogQuery) IDs

func (nlq *NotifyLogQuery) IDs(ctx context.Context) (ids []uint64, err error)

IDs executes the query and returns a list of NotifyLog IDs.

func (*NotifyLogQuery) IDsX

func (nlq *NotifyLogQuery) IDsX(ctx context.Context) []uint64

IDsX is like IDs, but panics if an error occurs.

func (*NotifyLogQuery) Limit

func (nlq *NotifyLogQuery) Limit(limit int) *NotifyLogQuery

Limit the number of records to be returned by this query.

func (*NotifyLogQuery) Offset

func (nlq *NotifyLogQuery) Offset(offset int) *NotifyLogQuery

Offset to start from.

func (*NotifyLogQuery) Only

func (nlq *NotifyLogQuery) Only(ctx context.Context) (*NotifyLog, error)

Only returns a single NotifyLog entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NotifyLog entity is found. Returns a *NotFoundError when no NotifyLog entities are found.

func (*NotifyLogQuery) OnlyID

func (nlq *NotifyLogQuery) OnlyID(ctx context.Context) (id uint64, err error)

OnlyID is like Only, but returns the only NotifyLog ID in the query. Returns a *NotSingularError when more than one NotifyLog ID is found. Returns a *NotFoundError when no entities are found.

func (*NotifyLogQuery) OnlyIDX

func (nlq *NotifyLogQuery) OnlyIDX(ctx context.Context) uint64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*NotifyLogQuery) OnlyX

func (nlq *NotifyLogQuery) OnlyX(ctx context.Context) *NotifyLog

OnlyX is like Only, but panics if an error occurs.

func (*NotifyLogQuery) Order

Order specifies how the records should be ordered.

func (*NotifyLogQuery) Page

func (nl *NotifyLogQuery) Page(
	ctx context.Context, pageNum uint64, pageSize uint64, opts ...NotifyLogPaginateOption,
) (*NotifyLogPageList, error)

func (*NotifyLogQuery) QueryContext

func (c *NotifyLogQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyLogQuery) Select

func (nlq *NotifyLogQuery) Select(fields ...string) *NotifyLogSelect

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.NotifyLog.Query().
	Select(notifylog.FieldCreatedAt).
	Scan(ctx, &v)

func (*NotifyLogQuery) Unique

func (nlq *NotifyLogQuery) Unique(unique bool) *NotifyLogQuery

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 (*NotifyLogQuery) Where

func (nlq *NotifyLogQuery) Where(ps ...predicate.NotifyLog) *NotifyLogQuery

Where adds a new predicate for the NotifyLogQuery builder.

type NotifyLogSelect

type NotifyLogSelect struct {
	*NotifyLogQuery
	// contains filtered or unexported fields
}

NotifyLogSelect is the builder for selecting fields of NotifyLog entities.

func (*NotifyLogSelect) Aggregate

func (nls *NotifyLogSelect) Aggregate(fns ...AggregateFunc) *NotifyLogSelect

Aggregate adds the given aggregation functions to the selector query.

func (*NotifyLogSelect) Bool

func (s *NotifyLogSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NotifyLogSelect) BoolX

func (s *NotifyLogSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NotifyLogSelect) Bools

func (s *NotifyLogSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NotifyLogSelect) BoolsX

func (s *NotifyLogSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (NotifyLogSelect) ExecContext

func (c NotifyLogSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyLogSelect) Float64

func (s *NotifyLogSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NotifyLogSelect) Float64X

func (s *NotifyLogSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NotifyLogSelect) Float64s

func (s *NotifyLogSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NotifyLogSelect) Float64sX

func (s *NotifyLogSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NotifyLogSelect) Int

func (s *NotifyLogSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NotifyLogSelect) IntX

func (s *NotifyLogSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NotifyLogSelect) Ints

func (s *NotifyLogSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NotifyLogSelect) IntsX

func (s *NotifyLogSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (NotifyLogSelect) QueryContext

func (c NotifyLogSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyLogSelect) Scan

func (nls *NotifyLogSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NotifyLogSelect) ScanX

func (s *NotifyLogSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NotifyLogSelect) String

func (s *NotifyLogSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NotifyLogSelect) StringX

func (s *NotifyLogSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NotifyLogSelect) Strings

func (s *NotifyLogSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NotifyLogSelect) StringsX

func (s *NotifyLogSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NotifyLogUpdate

type NotifyLogUpdate struct {
	// contains filtered or unexported fields
}

NotifyLogUpdate is the builder for updating NotifyLog entities.

func (*NotifyLogUpdate) AddNotifyTimes

func (nlu *NotifyLogUpdate) AddNotifyTimes(i int8) *NotifyLogUpdate

AddNotifyTimes adds i to the "notify_times" field.

func (*NotifyLogUpdate) AddStatus

func (nlu *NotifyLogUpdate) AddStatus(u int8) *NotifyLogUpdate

AddStatus adds u to the "status" field.

func (*NotifyLogUpdate) AddTaskID

func (nlu *NotifyLogUpdate) AddTaskID(u int64) *NotifyLogUpdate

AddTaskID adds u to the "task_id" field.

func (*NotifyLogUpdate) ClearDeletedAt

func (nlu *NotifyLogUpdate) ClearDeletedAt() *NotifyLogUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*NotifyLogUpdate) ClearStatus

func (nlu *NotifyLogUpdate) ClearStatus() *NotifyLogUpdate

ClearStatus clears the value of the "status" field.

func (*NotifyLogUpdate) Exec

func (nlu *NotifyLogUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*NotifyLogUpdate) ExecContext

func (c *NotifyLogUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyLogUpdate) ExecX

func (nlu *NotifyLogUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotifyLogUpdate) Mutation

func (nlu *NotifyLogUpdate) Mutation() *NotifyLogMutation

Mutation returns the NotifyLogMutation object of the builder.

func (*NotifyLogUpdate) QueryContext

func (c *NotifyLogUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyLogUpdate) Save

func (nlu *NotifyLogUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*NotifyLogUpdate) SaveX

func (nlu *NotifyLogUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*NotifyLogUpdate) SetDeletedAt

func (nlu *NotifyLogUpdate) SetDeletedAt(t time.Time) *NotifyLogUpdate

SetDeletedAt sets the "deleted_at" field.

func (*NotifyLogUpdate) SetNillableDeletedAt

func (nlu *NotifyLogUpdate) SetNillableDeletedAt(t *time.Time) *NotifyLogUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*NotifyLogUpdate) SetNillableStatus

func (nlu *NotifyLogUpdate) SetNillableStatus(u *uint8) *NotifyLogUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*NotifyLogUpdate) SetNotNilDeletedAt

func (nl *NotifyLogUpdate) SetNotNilDeletedAt(value *time.Time) *NotifyLogUpdate

set field if value's pointer is not nil.

func (*NotifyLogUpdate) SetNotNilNotifyTimes

func (nl *NotifyLogUpdate) SetNotNilNotifyTimes(value *int8) *NotifyLogUpdate

set field if value's pointer is not nil.

func (*NotifyLogUpdate) SetNotNilResponse

func (nl *NotifyLogUpdate) SetNotNilResponse(value *string) *NotifyLogUpdate

set field if value's pointer is not nil.

func (*NotifyLogUpdate) SetNotNilStatus

func (nl *NotifyLogUpdate) SetNotNilStatus(value *uint8) *NotifyLogUpdate

set field if value's pointer is not nil.

func (*NotifyLogUpdate) SetNotNilTaskID

func (nl *NotifyLogUpdate) SetNotNilTaskID(value *uint64) *NotifyLogUpdate

set field if value's pointer is not nil.

func (*NotifyLogUpdate) SetNotNilUpdatedAt

func (nl *NotifyLogUpdate) SetNotNilUpdatedAt(value *time.Time) *NotifyLogUpdate

set field if value's pointer is not nil.

func (*NotifyLogUpdate) SetNotifyTimes

func (nlu *NotifyLogUpdate) SetNotifyTimes(i int8) *NotifyLogUpdate

SetNotifyTimes sets the "notify_times" field.

func (*NotifyLogUpdate) SetResponse

func (nlu *NotifyLogUpdate) SetResponse(s string) *NotifyLogUpdate

SetResponse sets the "response" field.

func (*NotifyLogUpdate) SetStatus

func (nlu *NotifyLogUpdate) SetStatus(u uint8) *NotifyLogUpdate

SetStatus sets the "status" field.

func (*NotifyLogUpdate) SetTaskID

func (nlu *NotifyLogUpdate) SetTaskID(u uint64) *NotifyLogUpdate

SetTaskID sets the "task_id" field.

func (*NotifyLogUpdate) SetUpdatedAt

func (nlu *NotifyLogUpdate) SetUpdatedAt(t time.Time) *NotifyLogUpdate

SetUpdatedAt sets the "updated_at" field.

func (*NotifyLogUpdate) Where

Where appends a list predicates to the NotifyLogUpdate builder.

type NotifyLogUpdateOne

type NotifyLogUpdateOne struct {
	// contains filtered or unexported fields
}

NotifyLogUpdateOne is the builder for updating a single NotifyLog entity.

func (*NotifyLogUpdateOne) AddNotifyTimes

func (nluo *NotifyLogUpdateOne) AddNotifyTimes(i int8) *NotifyLogUpdateOne

AddNotifyTimes adds i to the "notify_times" field.

func (*NotifyLogUpdateOne) AddStatus

func (nluo *NotifyLogUpdateOne) AddStatus(u int8) *NotifyLogUpdateOne

AddStatus adds u to the "status" field.

func (*NotifyLogUpdateOne) AddTaskID

func (nluo *NotifyLogUpdateOne) AddTaskID(u int64) *NotifyLogUpdateOne

AddTaskID adds u to the "task_id" field.

func (*NotifyLogUpdateOne) ClearDeletedAt

func (nluo *NotifyLogUpdateOne) ClearDeletedAt() *NotifyLogUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*NotifyLogUpdateOne) ClearStatus

func (nluo *NotifyLogUpdateOne) ClearStatus() *NotifyLogUpdateOne

ClearStatus clears the value of the "status" field.

func (*NotifyLogUpdateOne) Exec

func (nluo *NotifyLogUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*NotifyLogUpdateOne) ExecContext

func (c *NotifyLogUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyLogUpdateOne) ExecX

func (nluo *NotifyLogUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotifyLogUpdateOne) Mutation

func (nluo *NotifyLogUpdateOne) Mutation() *NotifyLogMutation

Mutation returns the NotifyLogMutation object of the builder.

func (*NotifyLogUpdateOne) QueryContext

func (c *NotifyLogUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyLogUpdateOne) Save

func (nluo *NotifyLogUpdateOne) Save(ctx context.Context) (*NotifyLog, error)

Save executes the query and returns the updated NotifyLog entity.

func (*NotifyLogUpdateOne) SaveX

func (nluo *NotifyLogUpdateOne) SaveX(ctx context.Context) *NotifyLog

SaveX is like Save, but panics if an error occurs.

func (*NotifyLogUpdateOne) Select

func (nluo *NotifyLogUpdateOne) Select(field string, fields ...string) *NotifyLogUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*NotifyLogUpdateOne) SetDeletedAt

func (nluo *NotifyLogUpdateOne) SetDeletedAt(t time.Time) *NotifyLogUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*NotifyLogUpdateOne) SetNillableDeletedAt

func (nluo *NotifyLogUpdateOne) SetNillableDeletedAt(t *time.Time) *NotifyLogUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*NotifyLogUpdateOne) SetNillableStatus

func (nluo *NotifyLogUpdateOne) SetNillableStatus(u *uint8) *NotifyLogUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*NotifyLogUpdateOne) SetNotNilDeletedAt

func (nl *NotifyLogUpdateOne) SetNotNilDeletedAt(value *time.Time) *NotifyLogUpdateOne

set field if value's pointer is not nil.

func (*NotifyLogUpdateOne) SetNotNilNotifyTimes

func (nl *NotifyLogUpdateOne) SetNotNilNotifyTimes(value *int8) *NotifyLogUpdateOne

set field if value's pointer is not nil.

func (*NotifyLogUpdateOne) SetNotNilResponse

func (nl *NotifyLogUpdateOne) SetNotNilResponse(value *string) *NotifyLogUpdateOne

set field if value's pointer is not nil.

func (*NotifyLogUpdateOne) SetNotNilStatus

func (nl *NotifyLogUpdateOne) SetNotNilStatus(value *uint8) *NotifyLogUpdateOne

set field if value's pointer is not nil.

func (*NotifyLogUpdateOne) SetNotNilTaskID

func (nl *NotifyLogUpdateOne) SetNotNilTaskID(value *uint64) *NotifyLogUpdateOne

set field if value's pointer is not nil.

func (*NotifyLogUpdateOne) SetNotNilUpdatedAt

func (nl *NotifyLogUpdateOne) SetNotNilUpdatedAt(value *time.Time) *NotifyLogUpdateOne

set field if value's pointer is not nil.

func (*NotifyLogUpdateOne) SetNotifyTimes

func (nluo *NotifyLogUpdateOne) SetNotifyTimes(i int8) *NotifyLogUpdateOne

SetNotifyTimes sets the "notify_times" field.

func (*NotifyLogUpdateOne) SetResponse

func (nluo *NotifyLogUpdateOne) SetResponse(s string) *NotifyLogUpdateOne

SetResponse sets the "response" field.

func (*NotifyLogUpdateOne) SetStatus

func (nluo *NotifyLogUpdateOne) SetStatus(u uint8) *NotifyLogUpdateOne

SetStatus sets the "status" field.

func (*NotifyLogUpdateOne) SetTaskID

func (nluo *NotifyLogUpdateOne) SetTaskID(u uint64) *NotifyLogUpdateOne

SetTaskID sets the "task_id" field.

func (*NotifyLogUpdateOne) SetUpdatedAt

func (nluo *NotifyLogUpdateOne) SetUpdatedAt(t time.Time) *NotifyLogUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*NotifyLogUpdateOne) Where

Where appends a list predicates to the NotifyLogUpdate builder.

type NotifyLogs

type NotifyLogs []*NotifyLog

NotifyLogs is a parsable slice of NotifyLog.

type NotifyTask

type NotifyTask 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"`
	// 应用编号
	AppID uint64 `json:"app_id,omitempty"`
	// 通知类型
	Type int `json:"type,omitempty"`
	// 数据编号
	DataID uint64 `json:"data_id,omitempty"`
	// 商户订单编号
	MerchantOrderID string `json:"merchant_order_id,omitempty"`
	// 下一次通知时间
	NextNotifyTime time.Time `json:"next_notify_time,omitempty"`
	// 最后一次执行时间
	LastExecuteTime time.Time `json:"last_execute_time,omitempty"`
	// 当前通知次数
	NotifyTimes int8 `json:"notify_times,omitempty"`
	// 最大可通知次数
	MaxNotifyTimes int8 `json:"max_notify_times,omitempty"`
	// 异步通知地址
	NotifyURL string `json:"notify_url,omitempty"`
	// contains filtered or unexported fields
}

NotifyTask is the model entity for the NotifyTask schema.

func (*NotifyTask) ExecContext

func (c *NotifyTask) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyTask) QueryContext

func (c *NotifyTask) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyTask) String

func (nt *NotifyTask) String() string

String implements the fmt.Stringer.

func (*NotifyTask) Unwrap

func (nt *NotifyTask) Unwrap() *NotifyTask

Unwrap unwraps the NotifyTask 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 (*NotifyTask) Update

func (nt *NotifyTask) Update() *NotifyTaskUpdateOne

Update returns a builder for updating this NotifyTask. Note that you need to call NotifyTask.Unwrap() before calling this method if this NotifyTask was returned from a transaction, and the transaction was committed or rolled back.

func (*NotifyTask) Value

func (nt *NotifyTask) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the NotifyTask. This includes values selected through modifiers, order, etc.

type NotifyTaskClient

type NotifyTaskClient struct {
	// contains filtered or unexported fields
}

NotifyTaskClient is a client for the NotifyTask schema.

func NewNotifyTaskClient

func NewNotifyTaskClient(c config) *NotifyTaskClient

NewNotifyTaskClient returns a client for the NotifyTask from the given config.

func (*NotifyTaskClient) Create

func (c *NotifyTaskClient) Create() *NotifyTaskCreate

Create returns a builder for creating a NotifyTask entity.

func (*NotifyTaskClient) CreateBulk

func (c *NotifyTaskClient) CreateBulk(builders ...*NotifyTaskCreate) *NotifyTaskCreateBulk

CreateBulk returns a builder for creating a bulk of NotifyTask entities.

func (*NotifyTaskClient) Delete

func (c *NotifyTaskClient) Delete() *NotifyTaskDelete

Delete returns a delete builder for NotifyTask.

func (*NotifyTaskClient) DeleteOne

func (c *NotifyTaskClient) DeleteOne(nt *NotifyTask) *NotifyTaskDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*NotifyTaskClient) DeleteOneID

func (c *NotifyTaskClient) DeleteOneID(id uint64) *NotifyTaskDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*NotifyTaskClient) ExecContext

func (c *NotifyTaskClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyTaskClient) Get

func (c *NotifyTaskClient) Get(ctx context.Context, id uint64) (*NotifyTask, error)

Get returns a NotifyTask entity by its id.

func (*NotifyTaskClient) GetX

func (c *NotifyTaskClient) GetX(ctx context.Context, id uint64) *NotifyTask

GetX is like Get, but panics if an error occurs.

func (*NotifyTaskClient) Hooks

func (c *NotifyTaskClient) Hooks() []Hook

Hooks returns the client hooks.

func (*NotifyTaskClient) Intercept

func (c *NotifyTaskClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `notifytask.Intercept(f(g(h())))`.

func (*NotifyTaskClient) Interceptors

func (c *NotifyTaskClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*NotifyTaskClient) MapCreateBulk

func (c *NotifyTaskClient) MapCreateBulk(slice any, setFunc func(*NotifyTaskCreate, int)) *NotifyTaskCreateBulk

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 (*NotifyTaskClient) Query

func (c *NotifyTaskClient) Query() *NotifyTaskQuery

Query returns a query builder for NotifyTask.

func (*NotifyTaskClient) QueryContext

func (c *NotifyTaskClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyTaskClient) Update

func (c *NotifyTaskClient) Update() *NotifyTaskUpdate

Update returns an update builder for NotifyTask.

func (*NotifyTaskClient) UpdateOne

func (c *NotifyTaskClient) UpdateOne(nt *NotifyTask) *NotifyTaskUpdateOne

UpdateOne returns an update builder for the given entity.

func (*NotifyTaskClient) UpdateOneID

func (c *NotifyTaskClient) UpdateOneID(id uint64) *NotifyTaskUpdateOne

UpdateOneID returns an update builder for the given id.

func (*NotifyTaskClient) Use

func (c *NotifyTaskClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `notifytask.Hooks(f(g(h())))`.

type NotifyTaskCreate

type NotifyTaskCreate struct {
	// contains filtered or unexported fields
}

NotifyTaskCreate is the builder for creating a NotifyTask entity.

func (*NotifyTaskCreate) Exec

func (ntc *NotifyTaskCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*NotifyTaskCreate) ExecContext

func (c *NotifyTaskCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyTaskCreate) ExecX

func (ntc *NotifyTaskCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotifyTaskCreate) Mutation

func (ntc *NotifyTaskCreate) Mutation() *NotifyTaskMutation

Mutation returns the NotifyTaskMutation object of the builder.

func (*NotifyTaskCreate) QueryContext

func (c *NotifyTaskCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyTaskCreate) Save

func (ntc *NotifyTaskCreate) Save(ctx context.Context) (*NotifyTask, error)

Save creates the NotifyTask in the database.

func (*NotifyTaskCreate) SaveX

func (ntc *NotifyTaskCreate) SaveX(ctx context.Context) *NotifyTask

SaveX calls Save and panics if Save returns an error.

func (*NotifyTaskCreate) SetAppID

func (ntc *NotifyTaskCreate) SetAppID(u uint64) *NotifyTaskCreate

SetAppID sets the "app_id" field.

func (*NotifyTaskCreate) SetCreatedAt

func (ntc *NotifyTaskCreate) SetCreatedAt(t time.Time) *NotifyTaskCreate

SetCreatedAt sets the "created_at" field.

func (*NotifyTaskCreate) SetDataID

func (ntc *NotifyTaskCreate) SetDataID(u uint64) *NotifyTaskCreate

SetDataID sets the "data_id" field.

func (*NotifyTaskCreate) SetDeletedAt

func (ntc *NotifyTaskCreate) SetDeletedAt(t time.Time) *NotifyTaskCreate

SetDeletedAt sets the "deleted_at" field.

func (*NotifyTaskCreate) SetID

func (ntc *NotifyTaskCreate) SetID(u uint64) *NotifyTaskCreate

SetID sets the "id" field.

func (*NotifyTaskCreate) SetLastExecuteTime

func (ntc *NotifyTaskCreate) SetLastExecuteTime(t time.Time) *NotifyTaskCreate

SetLastExecuteTime sets the "last_execute_time" field.

func (*NotifyTaskCreate) SetMaxNotifyTimes

func (ntc *NotifyTaskCreate) SetMaxNotifyTimes(i int8) *NotifyTaskCreate

SetMaxNotifyTimes sets the "max_notify_times" field.

func (*NotifyTaskCreate) SetMerchantOrderID

func (ntc *NotifyTaskCreate) SetMerchantOrderID(s string) *NotifyTaskCreate

SetMerchantOrderID sets the "merchant_order_id" field.

func (*NotifyTaskCreate) SetNextNotifyTime

func (ntc *NotifyTaskCreate) SetNextNotifyTime(t time.Time) *NotifyTaskCreate

SetNextNotifyTime sets the "next_notify_time" field.

func (*NotifyTaskCreate) SetNillableCreatedAt

func (ntc *NotifyTaskCreate) SetNillableCreatedAt(t *time.Time) *NotifyTaskCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*NotifyTaskCreate) SetNillableDeletedAt

func (ntc *NotifyTaskCreate) SetNillableDeletedAt(t *time.Time) *NotifyTaskCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*NotifyTaskCreate) SetNillableStatus

func (ntc *NotifyTaskCreate) SetNillableStatus(u *uint8) *NotifyTaskCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*NotifyTaskCreate) SetNillableUpdatedAt

func (ntc *NotifyTaskCreate) SetNillableUpdatedAt(t *time.Time) *NotifyTaskCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*NotifyTaskCreate) SetNotNilAppID

func (nt *NotifyTaskCreate) SetNotNilAppID(value *uint64) *NotifyTaskCreate

set field if value's pointer is not nil.

func (*NotifyTaskCreate) SetNotNilDataID

func (nt *NotifyTaskCreate) SetNotNilDataID(value *uint64) *NotifyTaskCreate

set field if value's pointer is not nil.

func (*NotifyTaskCreate) SetNotNilDeletedAt

func (nt *NotifyTaskCreate) SetNotNilDeletedAt(value *time.Time) *NotifyTaskCreate

set field if value's pointer is not nil.

func (*NotifyTaskCreate) SetNotNilLastExecuteTime

func (nt *NotifyTaskCreate) SetNotNilLastExecuteTime(value *time.Time) *NotifyTaskCreate

set field if value's pointer is not nil.

func (*NotifyTaskCreate) SetNotNilMaxNotifyTimes

func (nt *NotifyTaskCreate) SetNotNilMaxNotifyTimes(value *int8) *NotifyTaskCreate

set field if value's pointer is not nil.

func (*NotifyTaskCreate) SetNotNilMerchantOrderID

func (nt *NotifyTaskCreate) SetNotNilMerchantOrderID(value *string) *NotifyTaskCreate

set field if value's pointer is not nil.

func (*NotifyTaskCreate) SetNotNilNextNotifyTime

func (nt *NotifyTaskCreate) SetNotNilNextNotifyTime(value *time.Time) *NotifyTaskCreate

set field if value's pointer is not nil.

func (*NotifyTaskCreate) SetNotNilNotifyTimes

func (nt *NotifyTaskCreate) SetNotNilNotifyTimes(value *int8) *NotifyTaskCreate

set field if value's pointer is not nil.

func (*NotifyTaskCreate) SetNotNilNotifyURL

func (nt *NotifyTaskCreate) SetNotNilNotifyURL(value *string) *NotifyTaskCreate

set field if value's pointer is not nil.

func (*NotifyTaskCreate) SetNotNilStatus

func (nt *NotifyTaskCreate) SetNotNilStatus(value *uint8) *NotifyTaskCreate

set field if value's pointer is not nil.

func (*NotifyTaskCreate) SetNotNilType

func (nt *NotifyTaskCreate) SetNotNilType(value *int) *NotifyTaskCreate

set field if value's pointer is not nil.

func (*NotifyTaskCreate) SetNotNilUpdatedAt

func (nt *NotifyTaskCreate) SetNotNilUpdatedAt(value *time.Time) *NotifyTaskCreate

set field if value's pointer is not nil.

func (*NotifyTaskCreate) SetNotifyTimes

func (ntc *NotifyTaskCreate) SetNotifyTimes(i int8) *NotifyTaskCreate

SetNotifyTimes sets the "notify_times" field.

func (*NotifyTaskCreate) SetNotifyURL

func (ntc *NotifyTaskCreate) SetNotifyURL(s string) *NotifyTaskCreate

SetNotifyURL sets the "notify_url" field.

func (*NotifyTaskCreate) SetStatus

func (ntc *NotifyTaskCreate) SetStatus(u uint8) *NotifyTaskCreate

SetStatus sets the "status" field.

func (*NotifyTaskCreate) SetType

func (ntc *NotifyTaskCreate) SetType(i int) *NotifyTaskCreate

SetType sets the "type" field.

func (*NotifyTaskCreate) SetUpdatedAt

func (ntc *NotifyTaskCreate) SetUpdatedAt(t time.Time) *NotifyTaskCreate

SetUpdatedAt sets the "updated_at" field.

type NotifyTaskCreateBulk

type NotifyTaskCreateBulk struct {
	// contains filtered or unexported fields
}

NotifyTaskCreateBulk is the builder for creating many NotifyTask entities in bulk.

func (*NotifyTaskCreateBulk) Exec

func (ntcb *NotifyTaskCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*NotifyTaskCreateBulk) ExecContext

func (c *NotifyTaskCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyTaskCreateBulk) ExecX

func (ntcb *NotifyTaskCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotifyTaskCreateBulk) QueryContext

func (c *NotifyTaskCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyTaskCreateBulk) Save

func (ntcb *NotifyTaskCreateBulk) Save(ctx context.Context) ([]*NotifyTask, error)

Save creates the NotifyTask entities in the database.

func (*NotifyTaskCreateBulk) SaveX

func (ntcb *NotifyTaskCreateBulk) SaveX(ctx context.Context) []*NotifyTask

SaveX is like Save, but panics if an error occurs.

type NotifyTaskDelete

type NotifyTaskDelete struct {
	// contains filtered or unexported fields
}

NotifyTaskDelete is the builder for deleting a NotifyTask entity.

func (*NotifyTaskDelete) Exec

func (ntd *NotifyTaskDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*NotifyTaskDelete) ExecContext

func (c *NotifyTaskDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyTaskDelete) ExecX

func (ntd *NotifyTaskDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*NotifyTaskDelete) QueryContext

func (c *NotifyTaskDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyTaskDelete) Where

Where appends a list predicates to the NotifyTaskDelete builder.

type NotifyTaskDeleteOne

type NotifyTaskDeleteOne struct {
	// contains filtered or unexported fields
}

NotifyTaskDeleteOne is the builder for deleting a single NotifyTask entity.

func (*NotifyTaskDeleteOne) Exec

func (ntdo *NotifyTaskDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*NotifyTaskDeleteOne) ExecX

func (ntdo *NotifyTaskDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotifyTaskDeleteOne) Where

Where appends a list predicates to the NotifyTaskDelete builder.

type NotifyTaskGroupBy

type NotifyTaskGroupBy struct {
	// contains filtered or unexported fields
}

NotifyTaskGroupBy is the group-by builder for NotifyTask entities.

func (*NotifyTaskGroupBy) Aggregate

func (ntgb *NotifyTaskGroupBy) Aggregate(fns ...AggregateFunc) *NotifyTaskGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*NotifyTaskGroupBy) Bool

func (s *NotifyTaskGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NotifyTaskGroupBy) BoolX

func (s *NotifyTaskGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NotifyTaskGroupBy) Bools

func (s *NotifyTaskGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NotifyTaskGroupBy) BoolsX

func (s *NotifyTaskGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NotifyTaskGroupBy) Float64

func (s *NotifyTaskGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NotifyTaskGroupBy) Float64X

func (s *NotifyTaskGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NotifyTaskGroupBy) Float64s

func (s *NotifyTaskGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NotifyTaskGroupBy) Float64sX

func (s *NotifyTaskGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NotifyTaskGroupBy) Int

func (s *NotifyTaskGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NotifyTaskGroupBy) IntX

func (s *NotifyTaskGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NotifyTaskGroupBy) Ints

func (s *NotifyTaskGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NotifyTaskGroupBy) IntsX

func (s *NotifyTaskGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NotifyTaskGroupBy) Scan

func (ntgb *NotifyTaskGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NotifyTaskGroupBy) ScanX

func (s *NotifyTaskGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NotifyTaskGroupBy) String

func (s *NotifyTaskGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NotifyTaskGroupBy) StringX

func (s *NotifyTaskGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NotifyTaskGroupBy) Strings

func (s *NotifyTaskGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NotifyTaskGroupBy) StringsX

func (s *NotifyTaskGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NotifyTaskMutation

type NotifyTaskMutation struct {
	// contains filtered or unexported fields
}

NotifyTaskMutation represents an operation that mutates the NotifyTask nodes in the graph.

func (*NotifyTaskMutation) AddAppID

func (m *NotifyTaskMutation) AddAppID(u int64)

AddAppID adds u to the "app_id" field.

func (*NotifyTaskMutation) AddDataID

func (m *NotifyTaskMutation) AddDataID(u int64)

AddDataID adds u to the "data_id" field.

func (*NotifyTaskMutation) AddField

func (m *NotifyTaskMutation) 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 (*NotifyTaskMutation) AddMaxNotifyTimes

func (m *NotifyTaskMutation) AddMaxNotifyTimes(i int8)

AddMaxNotifyTimes adds i to the "max_notify_times" field.

func (*NotifyTaskMutation) AddNotifyTimes

func (m *NotifyTaskMutation) AddNotifyTimes(i int8)

AddNotifyTimes adds i to the "notify_times" field.

func (*NotifyTaskMutation) AddStatus

func (m *NotifyTaskMutation) AddStatus(u int8)

AddStatus adds u to the "status" field.

func (*NotifyTaskMutation) AddType

func (m *NotifyTaskMutation) AddType(i int)

AddType adds i to the "type" field.

func (*NotifyTaskMutation) AddedAppID

func (m *NotifyTaskMutation) AddedAppID() (r int64, exists bool)

AddedAppID returns the value that was added to the "app_id" field in this mutation.

func (*NotifyTaskMutation) AddedDataID

func (m *NotifyTaskMutation) AddedDataID() (r int64, exists bool)

AddedDataID returns the value that was added to the "data_id" field in this mutation.

func (*NotifyTaskMutation) AddedEdges

func (m *NotifyTaskMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*NotifyTaskMutation) AddedField

func (m *NotifyTaskMutation) 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 (*NotifyTaskMutation) AddedFields

func (m *NotifyTaskMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*NotifyTaskMutation) AddedIDs

func (m *NotifyTaskMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*NotifyTaskMutation) AddedMaxNotifyTimes

func (m *NotifyTaskMutation) AddedMaxNotifyTimes() (r int8, exists bool)

AddedMaxNotifyTimes returns the value that was added to the "max_notify_times" field in this mutation.

func (*NotifyTaskMutation) AddedNotifyTimes

func (m *NotifyTaskMutation) AddedNotifyTimes() (r int8, exists bool)

AddedNotifyTimes returns the value that was added to the "notify_times" field in this mutation.

func (*NotifyTaskMutation) AddedStatus

func (m *NotifyTaskMutation) AddedStatus() (r int8, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*NotifyTaskMutation) AddedType

func (m *NotifyTaskMutation) AddedType() (r int, exists bool)

AddedType returns the value that was added to the "type" field in this mutation.

func (*NotifyTaskMutation) AppID

func (m *NotifyTaskMutation) AppID() (r uint64, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*NotifyTaskMutation) ClearDeletedAt

func (m *NotifyTaskMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*NotifyTaskMutation) ClearEdge

func (m *NotifyTaskMutation) 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 (*NotifyTaskMutation) ClearField

func (m *NotifyTaskMutation) 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 (*NotifyTaskMutation) ClearStatus

func (m *NotifyTaskMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*NotifyTaskMutation) ClearedEdges

func (m *NotifyTaskMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*NotifyTaskMutation) ClearedFields

func (m *NotifyTaskMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (NotifyTaskMutation) Client

func (m NotifyTaskMutation) 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 (*NotifyTaskMutation) CreatedAt

func (m *NotifyTaskMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*NotifyTaskMutation) DataID

func (m *NotifyTaskMutation) DataID() (r uint64, exists bool)

DataID returns the value of the "data_id" field in the mutation.

func (*NotifyTaskMutation) DeletedAt

func (m *NotifyTaskMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*NotifyTaskMutation) DeletedAtCleared

func (m *NotifyTaskMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*NotifyTaskMutation) EdgeCleared

func (m *NotifyTaskMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*NotifyTaskMutation) ExecContext

func (c *NotifyTaskMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyTaskMutation) Field

func (m *NotifyTaskMutation) 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 (*NotifyTaskMutation) FieldCleared

func (m *NotifyTaskMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*NotifyTaskMutation) Fields

func (m *NotifyTaskMutation) 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 (*NotifyTaskMutation) GetType

func (m *NotifyTaskMutation) GetType() (r int, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*NotifyTaskMutation) ID

func (m *NotifyTaskMutation) 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 (*NotifyTaskMutation) IDs

func (m *NotifyTaskMutation) 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 (*NotifyTaskMutation) LastExecuteTime

func (m *NotifyTaskMutation) LastExecuteTime() (r time.Time, exists bool)

LastExecuteTime returns the value of the "last_execute_time" field in the mutation.

func (*NotifyTaskMutation) MaxNotifyTimes

func (m *NotifyTaskMutation) MaxNotifyTimes() (r int8, exists bool)

MaxNotifyTimes returns the value of the "max_notify_times" field in the mutation.

func (*NotifyTaskMutation) MerchantOrderID

func (m *NotifyTaskMutation) MerchantOrderID() (r string, exists bool)

MerchantOrderID returns the value of the "merchant_order_id" field in the mutation.

func (*NotifyTaskMutation) NextNotifyTime

func (m *NotifyTaskMutation) NextNotifyTime() (r time.Time, exists bool)

NextNotifyTime returns the value of the "next_notify_time" field in the mutation.

func (*NotifyTaskMutation) NotifyTimes

func (m *NotifyTaskMutation) NotifyTimes() (r int8, exists bool)

NotifyTimes returns the value of the "notify_times" field in the mutation.

func (*NotifyTaskMutation) NotifyURL

func (m *NotifyTaskMutation) NotifyURL() (r string, exists bool)

NotifyURL returns the value of the "notify_url" field in the mutation.

func (*NotifyTaskMutation) OldAppID

func (m *NotifyTaskMutation) OldAppID(ctx context.Context) (v uint64, err error)

OldAppID returns the old "app_id" field's value of the NotifyTask entity. If the NotifyTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyTaskMutation) OldCreatedAt

func (m *NotifyTaskMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the NotifyTask entity. If the NotifyTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyTaskMutation) OldDataID

func (m *NotifyTaskMutation) OldDataID(ctx context.Context) (v uint64, err error)

OldDataID returns the old "data_id" field's value of the NotifyTask entity. If the NotifyTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyTaskMutation) OldDeletedAt

func (m *NotifyTaskMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the NotifyTask entity. If the NotifyTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyTaskMutation) OldField

func (m *NotifyTaskMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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 (*NotifyTaskMutation) OldLastExecuteTime

func (m *NotifyTaskMutation) OldLastExecuteTime(ctx context.Context) (v time.Time, err error)

OldLastExecuteTime returns the old "last_execute_time" field's value of the NotifyTask entity. If the NotifyTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyTaskMutation) OldMaxNotifyTimes

func (m *NotifyTaskMutation) OldMaxNotifyTimes(ctx context.Context) (v int8, err error)

OldMaxNotifyTimes returns the old "max_notify_times" field's value of the NotifyTask entity. If the NotifyTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyTaskMutation) OldMerchantOrderID

func (m *NotifyTaskMutation) OldMerchantOrderID(ctx context.Context) (v string, err error)

OldMerchantOrderID returns the old "merchant_order_id" field's value of the NotifyTask entity. If the NotifyTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyTaskMutation) OldNextNotifyTime

func (m *NotifyTaskMutation) OldNextNotifyTime(ctx context.Context) (v time.Time, err error)

OldNextNotifyTime returns the old "next_notify_time" field's value of the NotifyTask entity. If the NotifyTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyTaskMutation) OldNotifyTimes

func (m *NotifyTaskMutation) OldNotifyTimes(ctx context.Context) (v int8, err error)

OldNotifyTimes returns the old "notify_times" field's value of the NotifyTask entity. If the NotifyTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyTaskMutation) OldNotifyURL

func (m *NotifyTaskMutation) OldNotifyURL(ctx context.Context) (v string, err error)

OldNotifyURL returns the old "notify_url" field's value of the NotifyTask entity. If the NotifyTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyTaskMutation) OldStatus

func (m *NotifyTaskMutation) OldStatus(ctx context.Context) (v uint8, err error)

OldStatus returns the old "status" field's value of the NotifyTask entity. If the NotifyTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyTaskMutation) OldType

func (m *NotifyTaskMutation) OldType(ctx context.Context) (v int, err error)

OldType returns the old "type" field's value of the NotifyTask entity. If the NotifyTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyTaskMutation) OldUpdatedAt

func (m *NotifyTaskMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the NotifyTask entity. If the NotifyTask object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotifyTaskMutation) Op

func (m *NotifyTaskMutation) Op() Op

Op returns the operation name.

func (*NotifyTaskMutation) QueryContext

func (c *NotifyTaskMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyTaskMutation) RemovedEdges

func (m *NotifyTaskMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*NotifyTaskMutation) RemovedIDs

func (m *NotifyTaskMutation) 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 (*NotifyTaskMutation) ResetAppID

func (m *NotifyTaskMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*NotifyTaskMutation) ResetCreatedAt

func (m *NotifyTaskMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*NotifyTaskMutation) ResetDataID

func (m *NotifyTaskMutation) ResetDataID()

ResetDataID resets all changes to the "data_id" field.

func (*NotifyTaskMutation) ResetDeletedAt

func (m *NotifyTaskMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*NotifyTaskMutation) ResetEdge

func (m *NotifyTaskMutation) 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 (*NotifyTaskMutation) ResetField

func (m *NotifyTaskMutation) 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 (*NotifyTaskMutation) ResetLastExecuteTime

func (m *NotifyTaskMutation) ResetLastExecuteTime()

ResetLastExecuteTime resets all changes to the "last_execute_time" field.

func (*NotifyTaskMutation) ResetMaxNotifyTimes

func (m *NotifyTaskMutation) ResetMaxNotifyTimes()

ResetMaxNotifyTimes resets all changes to the "max_notify_times" field.

func (*NotifyTaskMutation) ResetMerchantOrderID

func (m *NotifyTaskMutation) ResetMerchantOrderID()

ResetMerchantOrderID resets all changes to the "merchant_order_id" field.

func (*NotifyTaskMutation) ResetNextNotifyTime

func (m *NotifyTaskMutation) ResetNextNotifyTime()

ResetNextNotifyTime resets all changes to the "next_notify_time" field.

func (*NotifyTaskMutation) ResetNotifyTimes

func (m *NotifyTaskMutation) ResetNotifyTimes()

ResetNotifyTimes resets all changes to the "notify_times" field.

func (*NotifyTaskMutation) ResetNotifyURL

func (m *NotifyTaskMutation) ResetNotifyURL()

ResetNotifyURL resets all changes to the "notify_url" field.

func (*NotifyTaskMutation) ResetStatus

func (m *NotifyTaskMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*NotifyTaskMutation) ResetType

func (m *NotifyTaskMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*NotifyTaskMutation) ResetUpdatedAt

func (m *NotifyTaskMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*NotifyTaskMutation) SetAppID

func (m *NotifyTaskMutation) SetAppID(u uint64)

SetAppID sets the "app_id" field.

func (*NotifyTaskMutation) SetCreatedAt

func (m *NotifyTaskMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*NotifyTaskMutation) SetDataID

func (m *NotifyTaskMutation) SetDataID(u uint64)

SetDataID sets the "data_id" field.

func (*NotifyTaskMutation) SetDeletedAt

func (m *NotifyTaskMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*NotifyTaskMutation) SetField

func (m *NotifyTaskMutation) 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 (*NotifyTaskMutation) SetID

func (m *NotifyTaskMutation) SetID(id uint64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of NotifyTask entities.

func (*NotifyTaskMutation) SetLastExecuteTime

func (m *NotifyTaskMutation) SetLastExecuteTime(t time.Time)

SetLastExecuteTime sets the "last_execute_time" field.

func (*NotifyTaskMutation) SetMaxNotifyTimes

func (m *NotifyTaskMutation) SetMaxNotifyTimes(i int8)

SetMaxNotifyTimes sets the "max_notify_times" field.

func (*NotifyTaskMutation) SetMerchantOrderID

func (m *NotifyTaskMutation) SetMerchantOrderID(s string)

SetMerchantOrderID sets the "merchant_order_id" field.

func (*NotifyTaskMutation) SetNextNotifyTime

func (m *NotifyTaskMutation) SetNextNotifyTime(t time.Time)

SetNextNotifyTime sets the "next_notify_time" field.

func (*NotifyTaskMutation) SetNotifyTimes

func (m *NotifyTaskMutation) SetNotifyTimes(i int8)

SetNotifyTimes sets the "notify_times" field.

func (*NotifyTaskMutation) SetNotifyURL

func (m *NotifyTaskMutation) SetNotifyURL(s string)

SetNotifyURL sets the "notify_url" field.

func (*NotifyTaskMutation) SetOp

func (m *NotifyTaskMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*NotifyTaskMutation) SetStatus

func (m *NotifyTaskMutation) SetStatus(u uint8)

SetStatus sets the "status" field.

func (*NotifyTaskMutation) SetType

func (m *NotifyTaskMutation) SetType(i int)

SetType sets the "type" field.

func (*NotifyTaskMutation) SetUpdatedAt

func (m *NotifyTaskMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*NotifyTaskMutation) Status

func (m *NotifyTaskMutation) Status() (r uint8, exists bool)

Status returns the value of the "status" field in the mutation.

func (*NotifyTaskMutation) StatusCleared

func (m *NotifyTaskMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (NotifyTaskMutation) Tx

func (m NotifyTaskMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*NotifyTaskMutation) Type

func (m *NotifyTaskMutation) Type() string

Type returns the node type of this mutation (NotifyTask).

func (*NotifyTaskMutation) UpdatedAt

func (m *NotifyTaskMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*NotifyTaskMutation) Where

func (m *NotifyTaskMutation) Where(ps ...predicate.NotifyTask)

Where appends a list predicates to the NotifyTaskMutation builder.

func (*NotifyTaskMutation) WhereP

func (m *NotifyTaskMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the NotifyTaskMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type NotifyTaskPageList

type NotifyTaskPageList struct {
	List        []*NotifyTask `json:"list"`
	PageDetails *PageDetails  `json:"pageDetails"`
}

NotifyTaskPageList is NotifyTask PageList result.

type NotifyTaskPager

type NotifyTaskPager struct {
	Order  notifytask.OrderOption
	Filter func(*NotifyTaskQuery) (*NotifyTaskQuery, error)
}

func (*NotifyTaskPager) ApplyFilter

func (p *NotifyTaskPager) ApplyFilter(query *NotifyTaskQuery) (*NotifyTaskQuery, error)

type NotifyTaskPaginateOption

type NotifyTaskPaginateOption func(*NotifyTaskPager)

NotifyTaskPaginateOption enables pagination customization.

type NotifyTaskQuery

type NotifyTaskQuery struct {
	// contains filtered or unexported fields
}

NotifyTaskQuery is the builder for querying NotifyTask entities.

func (*NotifyTaskQuery) Aggregate

func (ntq *NotifyTaskQuery) Aggregate(fns ...AggregateFunc) *NotifyTaskSelect

Aggregate returns a NotifyTaskSelect configured with the given aggregations.

func (*NotifyTaskQuery) All

func (ntq *NotifyTaskQuery) All(ctx context.Context) ([]*NotifyTask, error)

All executes the query and returns a list of NotifyTasks.

func (*NotifyTaskQuery) AllX

func (ntq *NotifyTaskQuery) AllX(ctx context.Context) []*NotifyTask

AllX is like All, but panics if an error occurs.

func (*NotifyTaskQuery) Clone

func (ntq *NotifyTaskQuery) Clone() *NotifyTaskQuery

Clone returns a duplicate of the NotifyTaskQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*NotifyTaskQuery) Count

func (ntq *NotifyTaskQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NotifyTaskQuery) CountX

func (ntq *NotifyTaskQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*NotifyTaskQuery) ExecContext

func (c *NotifyTaskQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyTaskQuery) Exist

func (ntq *NotifyTaskQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*NotifyTaskQuery) ExistX

func (ntq *NotifyTaskQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*NotifyTaskQuery) First

func (ntq *NotifyTaskQuery) First(ctx context.Context) (*NotifyTask, error)

First returns the first NotifyTask entity from the query. Returns a *NotFoundError when no NotifyTask was found.

func (*NotifyTaskQuery) FirstID

func (ntq *NotifyTaskQuery) FirstID(ctx context.Context) (id uint64, err error)

FirstID returns the first NotifyTask ID from the query. Returns a *NotFoundError when no NotifyTask ID was found.

func (*NotifyTaskQuery) FirstIDX

func (ntq *NotifyTaskQuery) FirstIDX(ctx context.Context) uint64

FirstIDX is like FirstID, but panics if an error occurs.

func (*NotifyTaskQuery) FirstX

func (ntq *NotifyTaskQuery) FirstX(ctx context.Context) *NotifyTask

FirstX is like First, but panics if an error occurs.

func (*NotifyTaskQuery) GroupBy

func (ntq *NotifyTaskQuery) GroupBy(field string, fields ...string) *NotifyTaskGroupBy

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.NotifyTask.Query().
	GroupBy(notifytask.FieldCreatedAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NotifyTaskQuery) IDs

func (ntq *NotifyTaskQuery) IDs(ctx context.Context) (ids []uint64, err error)

IDs executes the query and returns a list of NotifyTask IDs.

func (*NotifyTaskQuery) IDsX

func (ntq *NotifyTaskQuery) IDsX(ctx context.Context) []uint64

IDsX is like IDs, but panics if an error occurs.

func (*NotifyTaskQuery) Limit

func (ntq *NotifyTaskQuery) Limit(limit int) *NotifyTaskQuery

Limit the number of records to be returned by this query.

func (*NotifyTaskQuery) Offset

func (ntq *NotifyTaskQuery) Offset(offset int) *NotifyTaskQuery

Offset to start from.

func (*NotifyTaskQuery) Only

func (ntq *NotifyTaskQuery) Only(ctx context.Context) (*NotifyTask, error)

Only returns a single NotifyTask entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NotifyTask entity is found. Returns a *NotFoundError when no NotifyTask entities are found.

func (*NotifyTaskQuery) OnlyID

func (ntq *NotifyTaskQuery) OnlyID(ctx context.Context) (id uint64, err error)

OnlyID is like Only, but returns the only NotifyTask ID in the query. Returns a *NotSingularError when more than one NotifyTask ID is found. Returns a *NotFoundError when no entities are found.

func (*NotifyTaskQuery) OnlyIDX

func (ntq *NotifyTaskQuery) OnlyIDX(ctx context.Context) uint64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*NotifyTaskQuery) OnlyX

func (ntq *NotifyTaskQuery) OnlyX(ctx context.Context) *NotifyTask

OnlyX is like Only, but panics if an error occurs.

func (*NotifyTaskQuery) Order

Order specifies how the records should be ordered.

func (*NotifyTaskQuery) Page

func (nt *NotifyTaskQuery) Page(
	ctx context.Context, pageNum uint64, pageSize uint64, opts ...NotifyTaskPaginateOption,
) (*NotifyTaskPageList, error)

func (*NotifyTaskQuery) QueryContext

func (c *NotifyTaskQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyTaskQuery) Select

func (ntq *NotifyTaskQuery) Select(fields ...string) *NotifyTaskSelect

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.NotifyTask.Query().
	Select(notifytask.FieldCreatedAt).
	Scan(ctx, &v)

func (*NotifyTaskQuery) Unique

func (ntq *NotifyTaskQuery) Unique(unique bool) *NotifyTaskQuery

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 (*NotifyTaskQuery) Where

Where adds a new predicate for the NotifyTaskQuery builder.

type NotifyTaskSelect

type NotifyTaskSelect struct {
	*NotifyTaskQuery
	// contains filtered or unexported fields
}

NotifyTaskSelect is the builder for selecting fields of NotifyTask entities.

func (*NotifyTaskSelect) Aggregate

func (nts *NotifyTaskSelect) Aggregate(fns ...AggregateFunc) *NotifyTaskSelect

Aggregate adds the given aggregation functions to the selector query.

func (*NotifyTaskSelect) Bool

func (s *NotifyTaskSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NotifyTaskSelect) BoolX

func (s *NotifyTaskSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NotifyTaskSelect) Bools

func (s *NotifyTaskSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NotifyTaskSelect) BoolsX

func (s *NotifyTaskSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (NotifyTaskSelect) ExecContext

func (c NotifyTaskSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyTaskSelect) Float64

func (s *NotifyTaskSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NotifyTaskSelect) Float64X

func (s *NotifyTaskSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NotifyTaskSelect) Float64s

func (s *NotifyTaskSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NotifyTaskSelect) Float64sX

func (s *NotifyTaskSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NotifyTaskSelect) Int

func (s *NotifyTaskSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NotifyTaskSelect) IntX

func (s *NotifyTaskSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NotifyTaskSelect) Ints

func (s *NotifyTaskSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NotifyTaskSelect) IntsX

func (s *NotifyTaskSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (NotifyTaskSelect) QueryContext

func (c NotifyTaskSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyTaskSelect) Scan

func (nts *NotifyTaskSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NotifyTaskSelect) ScanX

func (s *NotifyTaskSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NotifyTaskSelect) String

func (s *NotifyTaskSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NotifyTaskSelect) StringX

func (s *NotifyTaskSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NotifyTaskSelect) Strings

func (s *NotifyTaskSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NotifyTaskSelect) StringsX

func (s *NotifyTaskSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NotifyTaskUpdate

type NotifyTaskUpdate struct {
	// contains filtered or unexported fields
}

NotifyTaskUpdate is the builder for updating NotifyTask entities.

func (*NotifyTaskUpdate) AddAppID

func (ntu *NotifyTaskUpdate) AddAppID(u int64) *NotifyTaskUpdate

AddAppID adds u to the "app_id" field.

func (*NotifyTaskUpdate) AddDataID

func (ntu *NotifyTaskUpdate) AddDataID(u int64) *NotifyTaskUpdate

AddDataID adds u to the "data_id" field.

func (*NotifyTaskUpdate) AddMaxNotifyTimes

func (ntu *NotifyTaskUpdate) AddMaxNotifyTimes(i int8) *NotifyTaskUpdate

AddMaxNotifyTimes adds i to the "max_notify_times" field.

func (*NotifyTaskUpdate) AddNotifyTimes

func (ntu *NotifyTaskUpdate) AddNotifyTimes(i int8) *NotifyTaskUpdate

AddNotifyTimes adds i to the "notify_times" field.

func (*NotifyTaskUpdate) AddStatus

func (ntu *NotifyTaskUpdate) AddStatus(u int8) *NotifyTaskUpdate

AddStatus adds u to the "status" field.

func (*NotifyTaskUpdate) AddType

func (ntu *NotifyTaskUpdate) AddType(i int) *NotifyTaskUpdate

AddType adds i to the "type" field.

func (*NotifyTaskUpdate) ClearDeletedAt

func (ntu *NotifyTaskUpdate) ClearDeletedAt() *NotifyTaskUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*NotifyTaskUpdate) ClearStatus

func (ntu *NotifyTaskUpdate) ClearStatus() *NotifyTaskUpdate

ClearStatus clears the value of the "status" field.

func (*NotifyTaskUpdate) Exec

func (ntu *NotifyTaskUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*NotifyTaskUpdate) ExecContext

func (c *NotifyTaskUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyTaskUpdate) ExecX

func (ntu *NotifyTaskUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotifyTaskUpdate) Mutation

func (ntu *NotifyTaskUpdate) Mutation() *NotifyTaskMutation

Mutation returns the NotifyTaskMutation object of the builder.

func (*NotifyTaskUpdate) QueryContext

func (c *NotifyTaskUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyTaskUpdate) Save

func (ntu *NotifyTaskUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*NotifyTaskUpdate) SaveX

func (ntu *NotifyTaskUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*NotifyTaskUpdate) SetAppID

func (ntu *NotifyTaskUpdate) SetAppID(u uint64) *NotifyTaskUpdate

SetAppID sets the "app_id" field.

func (*NotifyTaskUpdate) SetDataID

func (ntu *NotifyTaskUpdate) SetDataID(u uint64) *NotifyTaskUpdate

SetDataID sets the "data_id" field.

func (*NotifyTaskUpdate) SetDeletedAt

func (ntu *NotifyTaskUpdate) SetDeletedAt(t time.Time) *NotifyTaskUpdate

SetDeletedAt sets the "deleted_at" field.

func (*NotifyTaskUpdate) SetLastExecuteTime

func (ntu *NotifyTaskUpdate) SetLastExecuteTime(t time.Time) *NotifyTaskUpdate

SetLastExecuteTime sets the "last_execute_time" field.

func (*NotifyTaskUpdate) SetMaxNotifyTimes

func (ntu *NotifyTaskUpdate) SetMaxNotifyTimes(i int8) *NotifyTaskUpdate

SetMaxNotifyTimes sets the "max_notify_times" field.

func (*NotifyTaskUpdate) SetMerchantOrderID

func (ntu *NotifyTaskUpdate) SetMerchantOrderID(s string) *NotifyTaskUpdate

SetMerchantOrderID sets the "merchant_order_id" field.

func (*NotifyTaskUpdate) SetNextNotifyTime

func (ntu *NotifyTaskUpdate) SetNextNotifyTime(t time.Time) *NotifyTaskUpdate

SetNextNotifyTime sets the "next_notify_time" field.

func (*NotifyTaskUpdate) SetNillableDeletedAt

func (ntu *NotifyTaskUpdate) SetNillableDeletedAt(t *time.Time) *NotifyTaskUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*NotifyTaskUpdate) SetNillableStatus

func (ntu *NotifyTaskUpdate) SetNillableStatus(u *uint8) *NotifyTaskUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*NotifyTaskUpdate) SetNotNilAppID

func (nt *NotifyTaskUpdate) SetNotNilAppID(value *uint64) *NotifyTaskUpdate

set field if value's pointer is not nil.

func (*NotifyTaskUpdate) SetNotNilDataID

func (nt *NotifyTaskUpdate) SetNotNilDataID(value *uint64) *NotifyTaskUpdate

set field if value's pointer is not nil.

func (*NotifyTaskUpdate) SetNotNilDeletedAt

func (nt *NotifyTaskUpdate) SetNotNilDeletedAt(value *time.Time) *NotifyTaskUpdate

set field if value's pointer is not nil.

func (*NotifyTaskUpdate) SetNotNilLastExecuteTime

func (nt *NotifyTaskUpdate) SetNotNilLastExecuteTime(value *time.Time) *NotifyTaskUpdate

set field if value's pointer is not nil.

func (*NotifyTaskUpdate) SetNotNilMaxNotifyTimes

func (nt *NotifyTaskUpdate) SetNotNilMaxNotifyTimes(value *int8) *NotifyTaskUpdate

set field if value's pointer is not nil.

func (*NotifyTaskUpdate) SetNotNilMerchantOrderID

func (nt *NotifyTaskUpdate) SetNotNilMerchantOrderID(value *string) *NotifyTaskUpdate

set field if value's pointer is not nil.

func (*NotifyTaskUpdate) SetNotNilNextNotifyTime

func (nt *NotifyTaskUpdate) SetNotNilNextNotifyTime(value *time.Time) *NotifyTaskUpdate

set field if value's pointer is not nil.

func (*NotifyTaskUpdate) SetNotNilNotifyTimes

func (nt *NotifyTaskUpdate) SetNotNilNotifyTimes(value *int8) *NotifyTaskUpdate

set field if value's pointer is not nil.

func (*NotifyTaskUpdate) SetNotNilNotifyURL

func (nt *NotifyTaskUpdate) SetNotNilNotifyURL(value *string) *NotifyTaskUpdate

set field if value's pointer is not nil.

func (*NotifyTaskUpdate) SetNotNilStatus

func (nt *NotifyTaskUpdate) SetNotNilStatus(value *uint8) *NotifyTaskUpdate

set field if value's pointer is not nil.

func (*NotifyTaskUpdate) SetNotNilType

func (nt *NotifyTaskUpdate) SetNotNilType(value *int) *NotifyTaskUpdate

set field if value's pointer is not nil.

func (*NotifyTaskUpdate) SetNotNilUpdatedAt

func (nt *NotifyTaskUpdate) SetNotNilUpdatedAt(value *time.Time) *NotifyTaskUpdate

set field if value's pointer is not nil.

func (*NotifyTaskUpdate) SetNotifyTimes

func (ntu *NotifyTaskUpdate) SetNotifyTimes(i int8) *NotifyTaskUpdate

SetNotifyTimes sets the "notify_times" field.

func (*NotifyTaskUpdate) SetNotifyURL

func (ntu *NotifyTaskUpdate) SetNotifyURL(s string) *NotifyTaskUpdate

SetNotifyURL sets the "notify_url" field.

func (*NotifyTaskUpdate) SetStatus

func (ntu *NotifyTaskUpdate) SetStatus(u uint8) *NotifyTaskUpdate

SetStatus sets the "status" field.

func (*NotifyTaskUpdate) SetType

func (ntu *NotifyTaskUpdate) SetType(i int) *NotifyTaskUpdate

SetType sets the "type" field.

func (*NotifyTaskUpdate) SetUpdatedAt

func (ntu *NotifyTaskUpdate) SetUpdatedAt(t time.Time) *NotifyTaskUpdate

SetUpdatedAt sets the "updated_at" field.

func (*NotifyTaskUpdate) Where

Where appends a list predicates to the NotifyTaskUpdate builder.

type NotifyTaskUpdateOne

type NotifyTaskUpdateOne struct {
	// contains filtered or unexported fields
}

NotifyTaskUpdateOne is the builder for updating a single NotifyTask entity.

func (*NotifyTaskUpdateOne) AddAppID

func (ntuo *NotifyTaskUpdateOne) AddAppID(u int64) *NotifyTaskUpdateOne

AddAppID adds u to the "app_id" field.

func (*NotifyTaskUpdateOne) AddDataID

func (ntuo *NotifyTaskUpdateOne) AddDataID(u int64) *NotifyTaskUpdateOne

AddDataID adds u to the "data_id" field.

func (*NotifyTaskUpdateOne) AddMaxNotifyTimes

func (ntuo *NotifyTaskUpdateOne) AddMaxNotifyTimes(i int8) *NotifyTaskUpdateOne

AddMaxNotifyTimes adds i to the "max_notify_times" field.

func (*NotifyTaskUpdateOne) AddNotifyTimes

func (ntuo *NotifyTaskUpdateOne) AddNotifyTimes(i int8) *NotifyTaskUpdateOne

AddNotifyTimes adds i to the "notify_times" field.

func (*NotifyTaskUpdateOne) AddStatus

func (ntuo *NotifyTaskUpdateOne) AddStatus(u int8) *NotifyTaskUpdateOne

AddStatus adds u to the "status" field.

func (*NotifyTaskUpdateOne) AddType

func (ntuo *NotifyTaskUpdateOne) AddType(i int) *NotifyTaskUpdateOne

AddType adds i to the "type" field.

func (*NotifyTaskUpdateOne) ClearDeletedAt

func (ntuo *NotifyTaskUpdateOne) ClearDeletedAt() *NotifyTaskUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*NotifyTaskUpdateOne) ClearStatus

func (ntuo *NotifyTaskUpdateOne) ClearStatus() *NotifyTaskUpdateOne

ClearStatus clears the value of the "status" field.

func (*NotifyTaskUpdateOne) Exec

func (ntuo *NotifyTaskUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*NotifyTaskUpdateOne) ExecContext

func (c *NotifyTaskUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*NotifyTaskUpdateOne) ExecX

func (ntuo *NotifyTaskUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotifyTaskUpdateOne) Mutation

func (ntuo *NotifyTaskUpdateOne) Mutation() *NotifyTaskMutation

Mutation returns the NotifyTaskMutation object of the builder.

func (*NotifyTaskUpdateOne) QueryContext

func (c *NotifyTaskUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*NotifyTaskUpdateOne) Save

func (ntuo *NotifyTaskUpdateOne) Save(ctx context.Context) (*NotifyTask, error)

Save executes the query and returns the updated NotifyTask entity.

func (*NotifyTaskUpdateOne) SaveX

func (ntuo *NotifyTaskUpdateOne) SaveX(ctx context.Context) *NotifyTask

SaveX is like Save, but panics if an error occurs.

func (*NotifyTaskUpdateOne) Select

func (ntuo *NotifyTaskUpdateOne) Select(field string, fields ...string) *NotifyTaskUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*NotifyTaskUpdateOne) SetAppID

func (ntuo *NotifyTaskUpdateOne) SetAppID(u uint64) *NotifyTaskUpdateOne

SetAppID sets the "app_id" field.

func (*NotifyTaskUpdateOne) SetDataID

func (ntuo *NotifyTaskUpdateOne) SetDataID(u uint64) *NotifyTaskUpdateOne

SetDataID sets the "data_id" field.

func (*NotifyTaskUpdateOne) SetDeletedAt

func (ntuo *NotifyTaskUpdateOne) SetDeletedAt(t time.Time) *NotifyTaskUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*NotifyTaskUpdateOne) SetLastExecuteTime

func (ntuo *NotifyTaskUpdateOne) SetLastExecuteTime(t time.Time) *NotifyTaskUpdateOne

SetLastExecuteTime sets the "last_execute_time" field.

func (*NotifyTaskUpdateOne) SetMaxNotifyTimes

func (ntuo *NotifyTaskUpdateOne) SetMaxNotifyTimes(i int8) *NotifyTaskUpdateOne

SetMaxNotifyTimes sets the "max_notify_times" field.

func (*NotifyTaskUpdateOne) SetMerchantOrderID

func (ntuo *NotifyTaskUpdateOne) SetMerchantOrderID(s string) *NotifyTaskUpdateOne

SetMerchantOrderID sets the "merchant_order_id" field.

func (*NotifyTaskUpdateOne) SetNextNotifyTime

func (ntuo *NotifyTaskUpdateOne) SetNextNotifyTime(t time.Time) *NotifyTaskUpdateOne

SetNextNotifyTime sets the "next_notify_time" field.

func (*NotifyTaskUpdateOne) SetNillableDeletedAt

func (ntuo *NotifyTaskUpdateOne) SetNillableDeletedAt(t *time.Time) *NotifyTaskUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*NotifyTaskUpdateOne) SetNillableStatus

func (ntuo *NotifyTaskUpdateOne) SetNillableStatus(u *uint8) *NotifyTaskUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*NotifyTaskUpdateOne) SetNotNilAppID

func (nt *NotifyTaskUpdateOne) SetNotNilAppID(value *uint64) *NotifyTaskUpdateOne

set field if value's pointer is not nil.

func (*NotifyTaskUpdateOne) SetNotNilDataID

func (nt *NotifyTaskUpdateOne) SetNotNilDataID(value *uint64) *NotifyTaskUpdateOne

set field if value's pointer is not nil.

func (*NotifyTaskUpdateOne) SetNotNilDeletedAt

func (nt *NotifyTaskUpdateOne) SetNotNilDeletedAt(value *time.Time) *NotifyTaskUpdateOne

set field if value's pointer is not nil.

func (*NotifyTaskUpdateOne) SetNotNilLastExecuteTime

func (nt *NotifyTaskUpdateOne) SetNotNilLastExecuteTime(value *time.Time) *NotifyTaskUpdateOne

set field if value's pointer is not nil.

func (*NotifyTaskUpdateOne) SetNotNilMaxNotifyTimes

func (nt *NotifyTaskUpdateOne) SetNotNilMaxNotifyTimes(value *int8) *NotifyTaskUpdateOne

set field if value's pointer is not nil.

func (*NotifyTaskUpdateOne) SetNotNilMerchantOrderID

func (nt *NotifyTaskUpdateOne) SetNotNilMerchantOrderID(value *string) *NotifyTaskUpdateOne

set field if value's pointer is not nil.

func (*NotifyTaskUpdateOne) SetNotNilNextNotifyTime

func (nt *NotifyTaskUpdateOne) SetNotNilNextNotifyTime(value *time.Time) *NotifyTaskUpdateOne

set field if value's pointer is not nil.

func (*NotifyTaskUpdateOne) SetNotNilNotifyTimes

func (nt *NotifyTaskUpdateOne) SetNotNilNotifyTimes(value *int8) *NotifyTaskUpdateOne

set field if value's pointer is not nil.

func (*NotifyTaskUpdateOne) SetNotNilNotifyURL

func (nt *NotifyTaskUpdateOne) SetNotNilNotifyURL(value *string) *NotifyTaskUpdateOne

set field if value's pointer is not nil.

func (*NotifyTaskUpdateOne) SetNotNilStatus

func (nt *NotifyTaskUpdateOne) SetNotNilStatus(value *uint8) *NotifyTaskUpdateOne

set field if value's pointer is not nil.

func (*NotifyTaskUpdateOne) SetNotNilType

func (nt *NotifyTaskUpdateOne) SetNotNilType(value *int) *NotifyTaskUpdateOne

set field if value's pointer is not nil.

func (*NotifyTaskUpdateOne) SetNotNilUpdatedAt

func (nt *NotifyTaskUpdateOne) SetNotNilUpdatedAt(value *time.Time) *NotifyTaskUpdateOne

set field if value's pointer is not nil.

func (*NotifyTaskUpdateOne) SetNotifyTimes

func (ntuo *NotifyTaskUpdateOne) SetNotifyTimes(i int8) *NotifyTaskUpdateOne

SetNotifyTimes sets the "notify_times" field.

func (*NotifyTaskUpdateOne) SetNotifyURL

func (ntuo *NotifyTaskUpdateOne) SetNotifyURL(s string) *NotifyTaskUpdateOne

SetNotifyURL sets the "notify_url" field.

func (*NotifyTaskUpdateOne) SetStatus

func (ntuo *NotifyTaskUpdateOne) SetStatus(u uint8) *NotifyTaskUpdateOne

SetStatus sets the "status" field.

func (*NotifyTaskUpdateOne) SetType

func (ntuo *NotifyTaskUpdateOne) SetType(i int) *NotifyTaskUpdateOne

SetType sets the "type" field.

func (*NotifyTaskUpdateOne) SetUpdatedAt

func (ntuo *NotifyTaskUpdateOne) SetUpdatedAt(t time.Time) *NotifyTaskUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*NotifyTaskUpdateOne) Where

Where appends a list predicates to the NotifyTaskUpdate builder.

type NotifyTasks

type NotifyTasks []*NotifyTask

NotifyTasks is a parsable slice of NotifyTask.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

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"`
	// 应用编号
	AppID uint64 `json:"app_id,omitempty"`
	// 渠道编号
	ChannelID uint64 `json:"channel_id,omitempty"`
	// 渠道编码
	ChannelCode string `json:"channel_code,omitempty"`
	// 商户订单编号
	MerchantOrderID string `json:"merchant_order_id,omitempty"`
	// 商品标题
	Subject string `json:"subject,omitempty"`
	// 商品描述
	Body string `json:"body,omitempty"`
	// 异步通知地址
	NotifyURL string `json:"notify_url,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) ExecContext

func (c *Order) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Order) QueryContext

func (c *Order) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Order) String

func (o *Order) String() string

String implements the fmt.Stringer.

func (*Order) Unwrap

func (o *Order) Unwrap() *Order

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.

func (*Order) Value

func (o *Order) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Order. This includes values selected through modifiers, order, etc.

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) ExecContext

func (c *OrderClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrderClient) Get

func (c *OrderClient) Get(ctx context.Context, id uint64) (*Order, error)

Get returns a Order 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) Hooks

func (c *OrderClient) Hooks() []Hook

Hooks returns the client hooks.

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) QueryContext

func (c *OrderClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *OrderCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrderCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetAppID

func (oc *OrderCreate) SetAppID(u uint64) *OrderCreate

SetAppID sets the "app_id" field.

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) SetChannelID

func (oc *OrderCreate) SetChannelID(u uint64) *OrderCreate

SetChannelID sets the "channel_id" 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) SetNillableChannelID

func (oc *OrderCreate) SetNillableChannelID(u *uint64) *OrderCreate

SetNillableChannelID sets the "channel_id" 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) SetNotNilAppID

func (o *OrderCreate) SetNotNilAppID(value *uint64) *OrderCreate

set field if value's pointer is not nil.

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) SetNotNilChannelID

func (o *OrderCreate) SetNotNilChannelID(value *uint64) *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) SetNotNilNotifyURL

func (o *OrderCreate) SetNotNilNotifyURL(value *string) *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) SetNotifyURL

func (oc *OrderCreate) SetNotifyURL(s string) *OrderCreate

SetNotifyURL sets the "notify_url" 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) ExecContext

func (c *OrderCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrderCreateBulk) ExecX

func (ocb *OrderCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrderCreateBulk) QueryContext

func (c *OrderCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*OrderCreateBulk) Save

func (ocb *OrderCreateBulk) Save(ctx context.Context) ([]*Order, error)

Save creates the Order entities in the database.

func (*OrderCreateBulk) SaveX

func (ocb *OrderCreateBulk) SaveX(ctx context.Context) []*Order

SaveX is like Save, 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) ExecContext

func (c *OrderDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrderDelete) ExecX

func (od *OrderDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrderDelete) QueryContext

func (c *OrderDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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"`
	// 渠道编号
	ChannelID uint64 `json:"channel_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) ExecContext

func (c *OrderExtension) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrderExtension) QueryContext

func (c *OrderExtension) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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

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.

func (*OrderExtension) Value

func (oe *OrderExtension) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OrderExtension. This includes values selected through modifiers, order, etc.

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

Create returns a builder for creating a OrderExtension entity.

func (*OrderExtensionClient) CreateBulk

CreateBulk returns a builder for creating a bulk of OrderExtension entities.

func (*OrderExtensionClient) Delete

Delete returns a delete builder for OrderExtension.

func (*OrderExtensionClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrderExtensionClient) DeleteOneID

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrderExtensionClient) ExecContext

func (c *OrderExtensionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrderExtensionClient) Get

Get returns a OrderExtension entity by its id.

func (*OrderExtensionClient) GetX

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

Query returns a query builder for OrderExtension.

func (*OrderExtensionClient) QueryContext

func (c *OrderExtensionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*OrderExtensionClient) Update

Update returns an update builder for OrderExtension.

func (*OrderExtensionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrderExtensionClient) UpdateOneID

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) ExecContext

func (c *OrderExtensionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrderExtensionCreate) ExecX

func (oec *OrderExtensionCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrderExtensionCreate) Mutation

Mutation returns the OrderExtensionMutation object of the builder.

func (*OrderExtensionCreate) QueryContext

func (c *OrderExtensionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*OrderExtensionCreate) Save

Save creates the OrderExtension in the database.

func (*OrderExtensionCreate) SaveX

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) SetChannelID

func (oec *OrderExtensionCreate) SetChannelID(u uint64) *OrderExtensionCreate

SetChannelID sets the "channel_id" 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

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

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) SetNotNilChannelID

func (oe *OrderExtensionCreate) SetNotNilChannelID(value *uint64) *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

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

Exec executes the query.

func (*OrderExtensionCreateBulk) ExecContext

func (c *OrderExtensionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrderExtensionCreateBulk) ExecX

func (oecb *OrderExtensionCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrderExtensionCreateBulk) QueryContext

func (c *OrderExtensionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*OrderExtensionCreateBulk) Save

Save creates the OrderExtension entities in the database.

func (*OrderExtensionCreateBulk) SaveX

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) ExecContext

func (c *OrderExtensionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrderExtensionDelete) ExecX

func (oed *OrderExtensionDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrderExtensionDelete) QueryContext

func (c *OrderExtensionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*OrderExtensionDelete) Where

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

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

Aggregate adds the given aggregation functions to the group-by query.

func (*OrderExtensionGroupBy) Bool

func (s *OrderExtensionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrderExtensionGroupBy) BoolX

func (s *OrderExtensionGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrderExtensionGroupBy) Bools

func (s *OrderExtensionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrderExtensionGroupBy) BoolsX

func (s *OrderExtensionGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrderExtensionGroupBy) Float64

func (s *OrderExtensionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrderExtensionGroupBy) Float64X

func (s *OrderExtensionGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrderExtensionGroupBy) Float64s

func (s *OrderExtensionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrderExtensionGroupBy) Float64sX

func (s *OrderExtensionGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrderExtensionGroupBy) Int

func (s *OrderExtensionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrderExtensionGroupBy) IntX

func (s *OrderExtensionGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrderExtensionGroupBy) Ints

func (s *OrderExtensionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrderExtensionGroupBy) IntsX

func (s *OrderExtensionGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *OrderExtensionGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrderExtensionGroupBy) String

func (s *OrderExtensionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrderExtensionGroupBy) StringX

func (s *OrderExtensionGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrderExtensionGroupBy) Strings

func (s *OrderExtensionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrderExtensionGroupBy) StringsX

func (s *OrderExtensionGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrderExtensionMutation

type OrderExtensionMutation struct {
	// contains filtered or unexported fields
}

OrderExtensionMutation represents an operation that mutates the OrderExtension nodes in the graph.

func (*OrderExtensionMutation) AddChannelID

func (m *OrderExtensionMutation) AddChannelID(u int64)

AddChannelID adds u to the "channel_id" field.

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) AddedChannelID

func (m *OrderExtensionMutation) AddedChannelID() (r int64, exists bool)

AddedChannelID returns the value that was added to the "channel_id" field in this mutation.

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) ChannelID

func (m *OrderExtensionMutation) ChannelID() (r uint64, exists bool)

ChannelID returns the value of the "channel_id" field in the 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) ExecContext

func (c *OrderExtensionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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

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) OldChannelID

func (m *OrderExtensionMutation) OldChannelID(ctx context.Context) (v uint64, err error)

OldChannelID returns the old "channel_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) 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

func (m *OrderExtensionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *OrderExtensionMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

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

func (m *OrderExtensionMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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

func (m *OrderExtensionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

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) QueryContext

func (c *OrderExtensionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ResetChannelID

func (m *OrderExtensionMutation) ResetChannelID()

ResetChannelID resets all changes to the "channel_id" 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) SetChannelID

func (m *OrderExtensionMutation) SetChannelID(u uint64)

SetChannelID sets the "channel_id" 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

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

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

All executes the query and returns a list of OrderExtensions.

func (*OrderExtensionQuery) AllX

AllX is like All, but panics if an error occurs.

func (*OrderExtensionQuery) Clone

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) ExecContext

func (c *OrderExtensionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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

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

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

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

OnlyX is like Only, but panics if an error occurs.

func (*OrderExtensionQuery) Order

Order specifies how the records should be ordered.

func (*OrderExtensionQuery) Page

func (*OrderExtensionQuery) QueryContext

func (c *OrderExtensionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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

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

Aggregate adds the given aggregation functions to the selector query.

func (*OrderExtensionSelect) Bool

func (s *OrderExtensionSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrderExtensionSelect) BoolX

func (s *OrderExtensionSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrderExtensionSelect) Bools

func (s *OrderExtensionSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrderExtensionSelect) BoolsX

func (s *OrderExtensionSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (OrderExtensionSelect) ExecContext

func (c OrderExtensionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrderExtensionSelect) Float64

func (s *OrderExtensionSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrderExtensionSelect) Float64X

func (s *OrderExtensionSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrderExtensionSelect) Float64s

func (s *OrderExtensionSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrderExtensionSelect) Float64sX

func (s *OrderExtensionSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrderExtensionSelect) Int

func (s *OrderExtensionSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrderExtensionSelect) IntX

func (s *OrderExtensionSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrderExtensionSelect) Ints

func (s *OrderExtensionSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrderExtensionSelect) IntsX

func (s *OrderExtensionSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (OrderExtensionSelect) QueryContext

func (c OrderExtensionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ScanX

func (s *OrderExtensionSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrderExtensionSelect) String

func (s *OrderExtensionSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrderExtensionSelect) StringX

func (s *OrderExtensionSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrderExtensionSelect) Strings

func (s *OrderExtensionSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrderExtensionSelect) StringsX

func (s *OrderExtensionSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrderExtensionUpdate

type OrderExtensionUpdate struct {
	// contains filtered or unexported fields
}

OrderExtensionUpdate is the builder for updating OrderExtension entities.

func (*OrderExtensionUpdate) AddChannelID

func (oeu *OrderExtensionUpdate) AddChannelID(u int64) *OrderExtensionUpdate

AddChannelID adds u to the "channel_id" field.

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) ExecContext

func (c *OrderExtensionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrderExtensionUpdate) ExecX

func (oeu *OrderExtensionUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrderExtensionUpdate) Mutation

Mutation returns the OrderExtensionMutation object of the builder.

func (*OrderExtensionUpdate) QueryContext

func (c *OrderExtensionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetChannelID

func (oeu *OrderExtensionUpdate) SetChannelID(u uint64) *OrderExtensionUpdate

SetChannelID sets the "channel_id" 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) 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) SetNillableStatus

func (oeu *OrderExtensionUpdate) SetNillableStatus(u *uint8) *OrderExtensionUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*OrderExtensionUpdate) SetNo

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) SetNotNilChannelID

func (oe *OrderExtensionUpdate) SetNotNilChannelID(value *uint64) *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

SetUserIP sets the "user_ip" field.

func (*OrderExtensionUpdate) Where

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) AddChannelID

func (oeuo *OrderExtensionUpdateOne) AddChannelID(u int64) *OrderExtensionUpdateOne

AddChannelID adds u to the "channel_id" field.

func (*OrderExtensionUpdateOne) AddOrderID

AddOrderID adds u to the "order_id" field.

func (*OrderExtensionUpdateOne) AddStatus

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) ExecContext

func (c *OrderExtensionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrderExtensionUpdateOne) ExecX

func (oeuo *OrderExtensionUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrderExtensionUpdateOne) Mutation

Mutation returns the OrderExtensionMutation object of the builder.

func (*OrderExtensionUpdateOne) QueryContext

func (c *OrderExtensionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*OrderExtensionUpdateOne) Save

Save executes the query and returns the updated OrderExtension entity.

func (*OrderExtensionUpdateOne) SaveX

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) SetChannelID

SetChannelID sets the "channel_id" field.

func (*OrderExtensionUpdateOne) SetChannelNotifyData

func (oeuo *OrderExtensionUpdateOne) SetChannelNotifyData(s string) *OrderExtensionUpdateOne

SetChannelNotifyData sets the "channel_notify_data" field.

func (*OrderExtensionUpdateOne) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

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) SetNillableStatus

func (oeuo *OrderExtensionUpdateOne) SetNillableStatus(u *uint8) *OrderExtensionUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*OrderExtensionUpdateOne) SetNo

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) SetNotNilChannelID

func (oe *OrderExtensionUpdateOne) SetNotNilChannelID(value *uint64) *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

SetOrderID sets the "order_id" field.

func (*OrderExtensionUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*OrderExtensionUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*OrderExtensionUpdateOne) SetUserIP

SetUserIP sets the "user_ip" field.

func (*OrderExtensionUpdateOne) Where

Where appends a list predicates to the OrderExtensionUpdate builder.

type OrderExtensions

type OrderExtensions []*OrderExtension

OrderExtensions is a parsable slice of OrderExtension.

type OrderFunc

type OrderFunc func(*sql.Selector)

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

func (s *OrderGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrderGroupBy) BoolX

func (s *OrderGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrderGroupBy) Bools

func (s *OrderGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrderGroupBy) BoolsX

func (s *OrderGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrderGroupBy) Float64

func (s *OrderGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrderGroupBy) Float64X

func (s *OrderGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrderGroupBy) Float64s

func (s *OrderGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrderGroupBy) Float64sX

func (s *OrderGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrderGroupBy) Int

func (s *OrderGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrderGroupBy) IntX

func (s *OrderGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrderGroupBy) Ints

func (s *OrderGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrderGroupBy) IntsX

func (s *OrderGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *OrderGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrderGroupBy) String

func (s *OrderGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrderGroupBy) StringX

func (s *OrderGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrderGroupBy) Strings

func (s *OrderGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrderGroupBy) StringsX

func (s *OrderGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrderMutation

type OrderMutation struct {
	// contains filtered or unexported fields
}

OrderMutation represents an operation that mutates the Order nodes in the graph.

func (*OrderMutation) AddAppID

func (m *OrderMutation) AddAppID(u int64)

AddAppID adds u to the "app_id" field.

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) AddChannelID

func (m *OrderMutation) AddChannelID(u int64)

AddChannelID adds u to the "channel_id" 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) AddedAppID

func (m *OrderMutation) AddedAppID() (r int64, exists bool)

AddedAppID returns the value that was added to the "app_id" field in this mutation.

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) AddedChannelID

func (m *OrderMutation) AddedChannelID() (r int64, exists bool)

AddedChannelID returns the value that was added to the "channel_id" 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) AppID

func (m *OrderMutation) AppID() (r uint64, exists bool)

AppID returns the value of the "app_id" field in the 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) ChannelID

func (m *OrderMutation) ChannelID() (r uint64, exists bool)

ChannelID returns the value of the "channel_id" field in the mutation.

func (*OrderMutation) ChannelIDCleared

func (m *OrderMutation) ChannelIDCleared() bool

ChannelIDCleared returns if the "channel_id" 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) ClearChannelID

func (m *OrderMutation) ClearChannelID()

ClearChannelID clears the value of the "channel_id" 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) ExecContext

func (c *OrderMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) NotifyURL

func (m *OrderMutation) NotifyURL() (r string, exists bool)

NotifyURL returns the value of the "notify_url" field in the mutation.

func (*OrderMutation) OldAppID

func (m *OrderMutation) OldAppID(ctx context.Context) (v uint64, err error)

OldAppID returns the old "app_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) 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) OldChannelID

func (m *OrderMutation) OldChannelID(ctx context.Context) (v uint64, err error)

OldChannelID returns the old "channel_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) 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

func (m *OrderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *OrderMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

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

func (m *OrderMutation) OldExpireTime(ctx context.Context) (v time.Time, err error)

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

func (m *OrderMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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

func (m *OrderMutation) OldNotifyTime(ctx context.Context) (v time.Time, err error)

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) OldNotifyURL

func (m *OrderMutation) OldNotifyURL(ctx context.Context) (v string, err error)

OldNotifyURL returns the old "notify_url" 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

func (m *OrderMutation) OldSuccessTime(ctx context.Context) (v time.Time, err error)

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

func (m *OrderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

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) Op

func (m *OrderMutation) Op() Op

Op returns the operation name.

func (*OrderMutation) Price

func (m *OrderMutation) Price() (r int32, exists bool)

Price returns the value of the "price" field in the mutation.

func (*OrderMutation) QueryContext

func (c *OrderMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ResetAppID

func (m *OrderMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

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) ResetChannelID

func (m *OrderMutation) ResetChannelID()

ResetChannelID resets all changes to the "channel_id" 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) ResetNotifyURL

func (m *OrderMutation) ResetNotifyURL()

ResetNotifyURL resets all changes to the "notify_url" 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) SetAppID

func (m *OrderMutation) SetAppID(u uint64)

SetAppID sets the "app_id" 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) SetChannelID

func (m *OrderMutation) SetChannelID(u uint64)

SetChannelID sets the "channel_id" 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) SetNo

func (m *OrderMutation) SetNo(s string)

SetNo sets the "no" field.

func (*OrderMutation) SetNotifyTime

func (m *OrderMutation) SetNotifyTime(t time.Time)

SetNotifyTime sets the "notify_time" field.

func (*OrderMutation) SetNotifyURL

func (m *OrderMutation) SetNotifyURL(s string)

SetNotifyURL sets the "notify_url" 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) ExecContext

func (c *OrderQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrderQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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

func (s *OrderSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrderSelect) BoolX

func (s *OrderSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrderSelect) Bools

func (s *OrderSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrderSelect) BoolsX

func (s *OrderSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (OrderSelect) ExecContext

func (c OrderSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*OrderSelect) Float64

func (s *OrderSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrderSelect) Float64X

func (s *OrderSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrderSelect) Float64s

func (s *OrderSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrderSelect) Float64sX

func (s *OrderSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrderSelect) Int

func (s *OrderSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrderSelect) IntX

func (s *OrderSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrderSelect) Ints

func (s *OrderSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrderSelect) IntsX

func (s *OrderSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (OrderSelect) QueryContext

func (c OrderSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ScanX

func (s *OrderSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrderSelect) String

func (s *OrderSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrderSelect) StringX

func (s *OrderSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrderSelect) Strings

func (s *OrderSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrderSelect) StringsX

func (s *OrderSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrderUpdate

type OrderUpdate struct {
	// contains filtered or unexported fields
}

OrderUpdate is the builder for updating Order entities.

func (*OrderUpdate) AddAppID

func (ou *OrderUpdate) AddAppID(u int64) *OrderUpdate

AddAppID adds u to the "app_id" field.

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) AddChannelID

func (ou *OrderUpdate) AddChannelID(u int64) *OrderUpdate

AddChannelID adds u to the "channel_id" 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) ClearChannelID

func (ou *OrderUpdate) ClearChannelID() *OrderUpdate

ClearChannelID clears the value of the "channel_id" 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) ExecContext

func (c *OrderUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrderUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetAppID

func (ou *OrderUpdate) SetAppID(u uint64) *OrderUpdate

SetAppID sets the "app_id" field.

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) SetChannelID

func (ou *OrderUpdate) SetChannelID(u uint64) *OrderUpdate

SetChannelID sets the "channel_id" 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) 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) SetNillableChannelID

func (ou *OrderUpdate) SetNillableChannelID(u *uint64) *OrderUpdate

SetNillableChannelID sets the "channel_id" 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) SetNillableExtensionID

func (ou *OrderUpdate) SetNillableExtensionID(u *uint64) *OrderUpdate

SetNillableExtensionID sets the "extension_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) SetNillableStatus

func (ou *OrderUpdate) SetNillableStatus(u *uint8) *OrderUpdate

SetNillableStatus sets the "status" 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) SetNo

func (ou *OrderUpdate) SetNo(s string) *OrderUpdate

SetNo sets the "no" field.

func (*OrderUpdate) SetNotNilAppID

func (o *OrderUpdate) SetNotNilAppID(value *uint64) *OrderUpdate

set field if value's pointer is not nil.

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) SetNotNilChannelID

func (o *OrderUpdate) SetNotNilChannelID(value *uint64) *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) SetNotNilNotifyURL

func (o *OrderUpdate) SetNotNilNotifyURL(value *string) *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) SetNotifyURL

func (ou *OrderUpdate) SetNotifyURL(s string) *OrderUpdate

SetNotifyURL sets the "notify_url" 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) AddAppID

func (ouo *OrderUpdateOne) AddAppID(u int64) *OrderUpdateOne

AddAppID adds u to the "app_id" field.

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) AddChannelID

func (ouo *OrderUpdateOne) AddChannelID(u int64) *OrderUpdateOne

AddChannelID adds u to the "channel_id" 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) ClearChannelID

func (ouo *OrderUpdateOne) ClearChannelID() *OrderUpdateOne

ClearChannelID clears the value of the "channel_id" 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) ExecContext

func (c *OrderUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *OrderUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetAppID

func (ouo *OrderUpdateOne) SetAppID(u uint64) *OrderUpdateOne

SetAppID sets the "app_id" field.

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) SetChannelID

func (ouo *OrderUpdateOne) SetChannelID(u uint64) *OrderUpdateOne

SetChannelID sets the "channel_id" 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) 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) SetNillableChannelID

func (ouo *OrderUpdateOne) SetNillableChannelID(u *uint64) *OrderUpdateOne

SetNillableChannelID sets the "channel_id" 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) SetNillableExtensionID

func (ouo *OrderUpdateOne) SetNillableExtensionID(u *uint64) *OrderUpdateOne

SetNillableExtensionID sets the "extension_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) SetNillableStatus

func (ouo *OrderUpdateOne) SetNillableStatus(u *uint8) *OrderUpdateOne

SetNillableStatus sets the "status" 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) SetNo

func (ouo *OrderUpdateOne) SetNo(s string) *OrderUpdateOne

SetNo sets the "no" field.

func (*OrderUpdateOne) SetNotNilAppID

func (o *OrderUpdateOne) SetNotNilAppID(value *uint64) *OrderUpdateOne

set field if value's pointer is not nil.

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) SetNotNilChannelID

func (o *OrderUpdateOne) SetNotNilChannelID(value *uint64) *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) SetNotNilNotifyURL

func (o *OrderUpdateOne) SetNotNilNotifyURL(value *string) *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) SetNotifyURL

func (ouo *OrderUpdateOne) SetNotifyURL(s string) *OrderUpdateOne

SetNotifyURL sets the "notify_url" 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 Orders

type Orders []*Order

Orders is a parsable slice of Order.

type PageDetails

type PageDetails struct {
	Page  uint64 `json:"page"`
	Size  uint64 `json:"size"`
	Total uint64 `json:"total"`
}

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

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"`
	// 应用编号
	AppID uint64 `json:"app_id,omitempty"`
	// 渠道编号
	ChannelID uint64 `json:"channel_id,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"`
	// 异步通知商户地址
	NotifyURL string `json:"notify_url,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) ExecContext

func (c *Refund) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Refund) QueryContext

func (c *Refund) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Refund) String

func (r *Refund) String() string

String implements the fmt.Stringer.

func (*Refund) Unwrap

func (r *Refund) Unwrap() *Refund

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.

func (*Refund) Value

func (r *Refund) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Refund. This includes values selected through modifiers, order, etc.

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) ExecContext

func (c *RefundClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RefundClient) Get

func (c *RefundClient) Get(ctx context.Context, id uint64) (*Refund, error)

Get returns a Refund 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) Hooks

func (c *RefundClient) Hooks() []Hook

Hooks returns the client hooks.

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) QueryContext

func (c *RefundClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ExecContext

func (c *RefundCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *RefundCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetAppID

func (rc *RefundCreate) SetAppID(u uint64) *RefundCreate

SetAppID sets the "app_id" field.

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) SetChannelID

func (rc *RefundCreate) SetChannelID(u uint64) *RefundCreate

SetChannelID sets the "channel_id" 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) SetNotNilAppID

func (r *RefundCreate) SetNotNilAppID(value *uint64) *RefundCreate

set field if value's pointer is not nil.

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) SetNotNilChannelID

func (r *RefundCreate) SetNotNilChannelID(value *uint64) *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) SetNotNilNotifyURL

func (r *RefundCreate) SetNotNilNotifyURL(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) SetNotifyURL

func (rc *RefundCreate) SetNotifyURL(s string) *RefundCreate

SetNotifyURL sets the "notify_url" field.

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) ExecContext

func (c *RefundCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RefundCreateBulk) ExecX

func (rcb *RefundCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RefundCreateBulk) QueryContext

func (c *RefundCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*RefundCreateBulk) Save

func (rcb *RefundCreateBulk) Save(ctx context.Context) ([]*Refund, error)

Save creates the Refund entities in the database.

func (*RefundCreateBulk) SaveX

func (rcb *RefundCreateBulk) SaveX(ctx context.Context) []*Refund

SaveX is like Save, 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) ExecContext

func (c *RefundDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RefundDelete) ExecX

func (rd *RefundDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RefundDelete) QueryContext

func (c *RefundDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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

func (s *RefundGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RefundGroupBy) BoolX

func (s *RefundGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RefundGroupBy) Bools

func (s *RefundGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RefundGroupBy) BoolsX

func (s *RefundGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RefundGroupBy) Float64

func (s *RefundGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RefundGroupBy) Float64X

func (s *RefundGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RefundGroupBy) Float64s

func (s *RefundGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RefundGroupBy) Float64sX

func (s *RefundGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RefundGroupBy) Int

func (s *RefundGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RefundGroupBy) IntX

func (s *RefundGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RefundGroupBy) Ints

func (s *RefundGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RefundGroupBy) IntsX

func (s *RefundGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

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) ScanX

func (s *RefundGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RefundGroupBy) String

func (s *RefundGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RefundGroupBy) StringX

func (s *RefundGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RefundGroupBy) Strings

func (s *RefundGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RefundGroupBy) StringsX

func (s *RefundGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RefundMutation

type RefundMutation struct {
	// contains filtered or unexported fields
}

RefundMutation represents an operation that mutates the Refund nodes in the graph.

func (*RefundMutation) AddAppID

func (m *RefundMutation) AddAppID(u int64)

AddAppID adds u to the "app_id" field.

func (*RefundMutation) AddChannelID

func (m *RefundMutation) AddChannelID(u int64)

AddChannelID adds u to the "channel_id" field.

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) AddedAppID

func (m *RefundMutation) AddedAppID() (r int64, exists bool)

AddedAppID returns the value that was added to the "app_id" field in this mutation.

func (*RefundMutation) AddedChannelID

func (m *RefundMutation) AddedChannelID() (r int64, exists bool)

AddedChannelID returns the value that was added to the "channel_id" field in this mutation.

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) AppID

func (m *RefundMutation) AppID() (r uint64, exists bool)

AppID returns the value of the "app_id" field in the 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) ChannelID

func (m *RefundMutation) ChannelID() (r uint64, exists bool)

ChannelID returns the value of the "channel_id" field in the 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) ExecContext

func (c *RefundMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) NotifyURL

func (m *RefundMutation) NotifyURL() (r string, exists bool)

NotifyURL returns the value of the "notify_url" field in the mutation.

func (*RefundMutation) OldAppID

func (m *RefundMutation) OldAppID(ctx context.Context) (v uint64, err error)

OldAppID returns the old "app_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) 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) OldChannelID

func (m *RefundMutation) OldChannelID(ctx context.Context) (v uint64, err error)

OldChannelID returns the old "channel_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) 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

func (m *RefundMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

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

func (m *RefundMutation) OldDeletedAt(ctx context.Context) (v time.Time, err error)

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

func (m *RefundMutation) OldField(ctx context.Context, name string) (ent.Value, error)

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) OldNotifyURL

func (m *RefundMutation) OldNotifyURL(ctx context.Context) (v string, err error)

OldNotifyURL returns the old "notify_url" 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

func (m *RefundMutation) OldSuccessTime(ctx context.Context) (v time.Time, err error)

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

func (m *RefundMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

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) Op

func (m *RefundMutation) Op() Op

Op returns the operation name.

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) QueryContext

func (c *RefundMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ResetAppID

func (m *RefundMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

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) ResetChannelID

func (m *RefundMutation) ResetChannelID()

ResetChannelID resets all changes to the "channel_id" 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) ResetNotifyURL

func (m *RefundMutation) ResetNotifyURL()

ResetNotifyURL resets all changes to the "notify_url" 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) SetAppID

func (m *RefundMutation) SetAppID(u uint64)

SetAppID sets the "app_id" 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) SetChannelID

func (m *RefundMutation) SetChannelID(u uint64)

SetChannelID sets the "channel_id" 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) SetNo

func (m *RefundMutation) SetNo(s string)

SetNo sets the "no" field.

func (*RefundMutation) SetNotifyURL

func (m *RefundMutation) SetNotifyURL(s string)

SetNotifyURL sets the "notify_url" 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) ExecContext

func (c *RefundQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *RefundQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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

func (s *RefundSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RefundSelect) BoolX

func (s *RefundSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RefundSelect) Bools

func (s *RefundSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RefundSelect) BoolsX

func (s *RefundSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (RefundSelect) ExecContext

func (c RefundSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*RefundSelect) Float64

func (s *RefundSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RefundSelect) Float64X

func (s *RefundSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RefundSelect) Float64s

func (s *RefundSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RefundSelect) Float64sX

func (s *RefundSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RefundSelect) Int

func (s *RefundSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RefundSelect) IntX

func (s *RefundSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RefundSelect) Ints

func (s *RefundSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RefundSelect) IntsX

func (s *RefundSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (RefundSelect) QueryContext

func (c RefundSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) ScanX

func (s *RefundSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*RefundSelect) String

func (s *RefundSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RefundSelect) StringX

func (s *RefundSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RefundSelect) Strings

func (s *RefundSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RefundSelect) StringsX

func (s *RefundSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RefundUpdate

type RefundUpdate struct {
	// contains filtered or unexported fields
}

RefundUpdate is the builder for updating Refund entities.

func (*RefundUpdate) AddAppID

func (ru *RefundUpdate) AddAppID(u int64) *RefundUpdate

AddAppID adds u to the "app_id" field.

func (*RefundUpdate) AddChannelID

func (ru *RefundUpdate) AddChannelID(u int64) *RefundUpdate

AddChannelID adds u to the "channel_id" field.

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) ExecContext

func (c *RefundUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *RefundUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetAppID

func (ru *RefundUpdate) SetAppID(u uint64) *RefundUpdate

SetAppID sets the "app_id" field.

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) SetChannelID

func (ru *RefundUpdate) SetChannelID(u uint64) *RefundUpdate

SetChannelID sets the "channel_id" 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) 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) 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) 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) SetNotNilAppID

func (r *RefundUpdate) SetNotNilAppID(value *uint64) *RefundUpdate

set field if value's pointer is not nil.

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) SetNotNilChannelID

func (r *RefundUpdate) SetNotNilChannelID(value *uint64) *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) SetNotNilNotifyURL

func (r *RefundUpdate) SetNotNilNotifyURL(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) SetNotifyURL

func (ru *RefundUpdate) SetNotifyURL(s string) *RefundUpdate

SetNotifyURL sets the "notify_url" field.

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) AddAppID

func (ruo *RefundUpdateOne) AddAppID(u int64) *RefundUpdateOne

AddAppID adds u to the "app_id" field.

func (*RefundUpdateOne) AddChannelID

func (ruo *RefundUpdateOne) AddChannelID(u int64) *RefundUpdateOne

AddChannelID adds u to the "channel_id" field.

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) ExecContext

func (c *RefundUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

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) QueryContext

func (c *RefundUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

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) SetAppID

func (ruo *RefundUpdateOne) SetAppID(u uint64) *RefundUpdateOne

SetAppID sets the "app_id" field.

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) SetChannelID

func (ruo *RefundUpdateOne) SetChannelID(u uint64) *RefundUpdateOne

SetChannelID sets the "channel_id" 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) 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) 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) 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) SetNotNilAppID

func (r *RefundUpdateOne) SetNotNilAppID(value *uint64) *RefundUpdateOne

set field if value's pointer is not nil.

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) SetNotNilChannelID

func (r *RefundUpdateOne) SetNotNilChannelID(value *uint64) *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) SetNotNilNotifyURL

func (r *RefundUpdateOne) SetNotNilNotifyURL(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) SetNotifyURL

func (ruo *RefundUpdateOne) SetNotifyURL(s string) *RefundUpdateOne

SetNotifyURL sets the "notify_url" field.

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 Refunds

type Refunds []*Refund

Refunds is a parsable slice of Refund.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

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.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

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

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

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 Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// App is the client for interacting with the App builders.
	App *AppClient
	// Channel is the client for interacting with the Channel builders.
	Channel *ChannelClient
	// DemoOrder is the client for interacting with the DemoOrder builders.
	DemoOrder *DemoOrderClient
	// NotifyLog is the client for interacting with the NotifyLog builders.
	NotifyLog *NotifyLogClient
	// NotifyTask is the client for interacting with the NotifyTask builders.
	NotifyTask *NotifyTaskClient
	// 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

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) ExecContext

func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)

ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) QueryContext

func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)

QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL