ent

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2021 License: MIT Imports: 28 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.
	TypeSysDict               = "SysDict"
	TypeSysDictItem           = "SysDictItem"
	TypeSysJwtBlock           = "SysJwtBlock"
	TypeSysLogging            = "SysLogging"
	TypeSysMenu               = "SysMenu"
	TypeSysMenuAction         = "SysMenuAction"
	TypeSysMenuActionResource = "SysMenuActionResource"
	TypeSysRole               = "SysRole"
	TypeSysRoleMenu           = "SysRoleMenu"
	TypeSysUser               = "SysUser"
	TypeSysUserRole           = "SysUserRole"
	TypeXxxDemo               = "XxxDemo"
)

Variables

This section is empty.

Functions

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 validaton 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 Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// SysDict is the client for interacting with the SysDict builders.
	SysDict *SysDictClient
	// SysDictItem is the client for interacting with the SysDictItem builders.
	SysDictItem *SysDictItemClient
	// SysJwtBlock is the client for interacting with the SysJwtBlock builders.
	SysJwtBlock *SysJwtBlockClient
	// SysLogging is the client for interacting with the SysLogging builders.
	SysLogging *SysLoggingClient
	// SysMenu is the client for interacting with the SysMenu builders.
	SysMenu *SysMenuClient
	// SysMenuAction is the client for interacting with the SysMenuAction builders.
	SysMenuAction *SysMenuActionClient
	// SysMenuActionResource is the client for interacting with the SysMenuActionResource builders.
	SysMenuActionResource *SysMenuActionResourceClient
	// SysRole is the client for interacting with the SysRole builders.
	SysRole *SysRoleClient
	// SysRoleMenu is the client for interacting with the SysRoleMenu builders.
	SysRoleMenu *SysRoleMenuClient
	// SysUser is the client for interacting with the SysUser builders.
	SysUser *SysUserClient
	// SysUserRole is the client for interacting with the SysUserRole builders.
	SysUserRole *SysUserRoleClient
	// XxxDemo is the client for interacting with the XxxDemo builders.
	XxxDemo *XxxDemoClient
	// 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().
	SysDict.
	Query().
	Count(ctx)

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(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 Committer 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 CreateSysDictInput

type CreateSysDictInput struct {
	IsDel     *bool
	Memo      *string
	Sort      *int32
	CreatedAt *time.Time
	UpdatedAt *time.Time
	DeletedAt *time.Time
	Status    *int16
	NameCn    string
	NameEn    string
}

CreateSysDictInput represents a mutation input for creating sysdicts.

func (*CreateSysDictInput) Mutate

func (i *CreateSysDictInput) Mutate(m *SysDictCreate)

Mutate applies the CreateSysDictInput on the SysDictCreate builder.

type CreateSysDictItemInput

type CreateSysDictItemInput struct {
	IsDel     *bool
	Memo      *string
	Sort      *int32
	CreatedAt *time.Time
	UpdatedAt *time.Time
	DeletedAt *time.Time
	Label     string
	Value     int
	Status    int16
	DictID    string
}

CreateSysDictItemInput represents a mutation input for creating sysdictitems.

func (*CreateSysDictItemInput) Mutate

Mutate applies the CreateSysDictItemInput on the SysDictItemCreate builder.

type CreateSysJwtBlockInput

type CreateSysJwtBlockInput struct {
	IsDel     *bool
	Memo      *string
	CreatedAt *time.Time
	UpdatedAt *time.Time
	DeletedAt *time.Time
	Status    *int16
	Jwt       string
}

CreateSysJwtBlockInput represents a mutation input for creating sysjwtblocks.

func (*CreateSysJwtBlockInput) Mutate

Mutate applies the CreateSysJwtBlockInput on the SysJwtBlockCreate builder.

type CreateSysLoggingInput

type CreateSysLoggingInput struct {
	IsDel      *bool
	Memo       *string
	Level      string
	TraceID    string
	UserID     string
	Tag        string
	Version    string
	Message    string
	Data       *string
	ErrorStack string
	CreatedAt  *time.Time
}

CreateSysLoggingInput represents a mutation input for creating sysloggings.

func (*CreateSysLoggingInput) Mutate

Mutate applies the CreateSysLoggingInput on the SysLoggingCreate builder.

type CreateSysMenuActionInput

type CreateSysMenuActionInput struct {
	IsDel     *bool
	Sort      *int32
	Status    *int16
	Memo      *string
	CreatedAt *time.Time
	UpdatedAt *time.Time
	DeletedAt *time.Time
	MenuID    string
	Code      string
	Name      string
}

CreateSysMenuActionInput represents a mutation input for creating sysmenuactions.

func (*CreateSysMenuActionInput) Mutate

Mutate applies the CreateSysMenuActionInput on the SysMenuActionCreate builder.

type CreateSysMenuActionResourceInput

type CreateSysMenuActionResourceInput struct {
	IsDel     *bool
	Sort      *int32
	Memo      *string
	CreatedAt *time.Time
	UpdatedAt *time.Time
	DeletedAt *time.Time
	Status    *int16
	Method    string
	Path      string
	ActionID  string
}

CreateSysMenuActionResourceInput represents a mutation input for creating sysmenuactionresources.

func (*CreateSysMenuActionResourceInput) Mutate

Mutate applies the CreateSysMenuActionResourceInput on the SysMenuActionResourceCreate builder.

type CreateSysMenuInput

type CreateSysMenuInput struct {
	IsDel      *bool
	Memo       *string
	Sort       *int32
	CreatedAt  *time.Time
	UpdatedAt  *time.Time
	DeletedAt  *time.Time
	Status     *int16
	Name       string
	Icon       string
	Router     string
	IsShow     *bool
	ParentID   *string
	ParentPath *string
}

CreateSysMenuInput represents a mutation input for creating sysmenus.

func (*CreateSysMenuInput) Mutate

func (i *CreateSysMenuInput) Mutate(m *SysMenuCreate)

Mutate applies the CreateSysMenuInput on the SysMenuCreate builder.

type CreateSysRoleInput

type CreateSysRoleInput struct {
	IsDel     *bool
	Status    *int16
	Sort      *int32
	Memo      *string
	CreatedAt *time.Time
	UpdatedAt *time.Time
	DeletedAt *time.Time
	Name      string
}

CreateSysRoleInput represents a mutation input for creating sysroles.

func (*CreateSysRoleInput) Mutate

func (i *CreateSysRoleInput) Mutate(m *SysRoleCreate)

Mutate applies the CreateSysRoleInput on the SysRoleCreate builder.

type CreateSysRoleMenuInput

type CreateSysRoleMenuInput struct {
	IsDel     *bool
	CreatedAt *time.Time
	UpdatedAt *time.Time
	DeletedAt *time.Time
	RoleID    string
	MenuID    string
	ActionID  *string
}

CreateSysRoleMenuInput represents a mutation input for creating sysrolemenus.

func (*CreateSysRoleMenuInput) Mutate

Mutate applies the CreateSysRoleMenuInput on the SysRoleMenuCreate builder.

type CreateSysUserInput

type CreateSysUserInput struct {
	IsDel     *bool
	Sort      *int32
	CreatedAt *time.Time
	UpdatedAt *time.Time
	DeletedAt *time.Time
	Status    *int16
	UserName  string
	RealName  *string
	FirstName *string
	LastName  *string
	Password  string
	Email     string
	Phone     string
	Salt      *string
}

CreateSysUserInput represents a mutation input for creating sysusers.

func (*CreateSysUserInput) Mutate

func (i *CreateSysUserInput) Mutate(m *SysUserCreate)

Mutate applies the CreateSysUserInput on the SysUserCreate builder.

type CreateSysUserRoleInput

type CreateSysUserRoleInput struct {
	IsDel     *bool
	CreatedAt *time.Time
	UpdatedAt *time.Time
	DeletedAt *time.Time
	UserID    string
	RoleID    string
}

CreateSysUserRoleInput represents a mutation input for creating sysuserroles.

func (*CreateSysUserRoleInput) Mutate

Mutate applies the CreateSysUserRoleInput on the SysUserRoleCreate builder.

type CreateXxxDemoInput

type CreateXxxDemoInput struct {
	IsDel     *bool
	Memo      *string
	Sort      *int32
	CreatedAt *time.Time
	UpdatedAt *time.Time
	DeletedAt *time.Time
	Code      string
	Name      string
	Status    *int16
}

CreateXxxDemoInput represents a mutation input for creating xxxdemos.

func (*CreateXxxDemoInput) Mutate

func (i *CreateXxxDemoInput) Mutate(m *XxxDemoCreate)

Mutate applies the CreateXxxDemoInput on the XxxDemoCreate builder.

type Hook

type Hook = ent.Hook

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 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(...interface{})) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type Policy

type Policy = ent.Policy

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 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(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 Rollbacker method.

type SysDict

type SysDict struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// IsDel holds the value of the "is_del" field.
	// 是否删除
	IsDel bool `json:"is_del,omitempty"`
	// Memo holds the value of the "memo" field.
	// 备注
	Memo string `json:"memo,omitempty"`
	// Sort holds the value of the "sort" field.
	// 排序, 在数据库里的排序
	Sort int32 `json:"sort,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	// 创建时间,由程序自动生成
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	// 更新时间,由程序自动生成
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	// 删除时间,
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// Status holds the value of the "status" field.
	// 状态,
	Status int16 `json:"status,omitempty"`
	// NameCn holds the value of the "name_cn" field.
	// 字典名(中)
	NameCn string `json:"name_cn,omitempty"`
	// NameEn holds the value of the "name_en" field.
	// 字典名(英)
	NameEn string `json:"name_en,omitempty"`
	// contains filtered or unexported fields
}

SysDict is the model entity for the SysDict schema.

func (*SysDict) String

func (sd *SysDict) String() string

String implements the fmt.Stringer.

func (*SysDict) Unwrap

func (sd *SysDict) Unwrap() *SysDict

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

func (sd *SysDict) Update() *SysDictUpdateOne

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

type SysDictClient

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

SysDictClient is a client for the SysDict schema.

func NewSysDictClient

func NewSysDictClient(c config) *SysDictClient

NewSysDictClient returns a client for the SysDict from the given config.

func (*SysDictClient) Create

func (c *SysDictClient) Create() *SysDictCreate

Create returns a create builder for SysDict.

func (*SysDictClient) CreateBulk

func (c *SysDictClient) CreateBulk(builders ...*SysDictCreate) *SysDictCreateBulk

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

func (*SysDictClient) Delete

func (c *SysDictClient) Delete() *SysDictDelete

Delete returns a delete builder for SysDict.

func (*SysDictClient) DeleteOne

func (c *SysDictClient) DeleteOne(sd *SysDict) *SysDictDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SysDictClient) DeleteOneID

func (c *SysDictClient) DeleteOneID(id string) *SysDictDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SysDictClient) Get

func (c *SysDictClient) Get(ctx context.Context, id string) (*SysDict, error)

Get returns a SysDict entity by its id.

func (*SysDictClient) GetX

func (c *SysDictClient) GetX(ctx context.Context, id string) *SysDict

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

func (*SysDictClient) Hooks

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

Hooks returns the client hooks.

func (*SysDictClient) Query

func (c *SysDictClient) Query() *SysDictQuery

Query returns a query builder for SysDict.

func (*SysDictClient) Update

func (c *SysDictClient) Update() *SysDictUpdate

Update returns an update builder for SysDict.

func (*SysDictClient) UpdateOne

func (c *SysDictClient) UpdateOne(sd *SysDict) *SysDictUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SysDictClient) UpdateOneID

func (c *SysDictClient) UpdateOneID(id string) *SysDictUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SysDictClient) Use

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

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

type SysDictCreate

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

SysDictCreate is the builder for creating a SysDict entity.

func (*SysDictCreate) Mutation

func (sdc *SysDictCreate) Mutation() *SysDictMutation

Mutation returns the SysDictMutation object of the builder.

func (*SysDictCreate) Save

func (sdc *SysDictCreate) Save(ctx context.Context) (*SysDict, error)

Save creates the SysDict in the database.

func (*SysDictCreate) SaveX

func (sdc *SysDictCreate) SaveX(ctx context.Context) *SysDict

SaveX calls Save and panics if Save returns an error.

func (*SysDictCreate) SetCreatedAt

func (sdc *SysDictCreate) SetCreatedAt(t time.Time) *SysDictCreate

SetCreatedAt sets the "created_at" field.

func (*SysDictCreate) SetDeletedAt

func (sdc *SysDictCreate) SetDeletedAt(t time.Time) *SysDictCreate

SetDeletedAt sets the "deleted_at" field.

func (*SysDictCreate) SetID

func (sdc *SysDictCreate) SetID(s string) *SysDictCreate

SetID sets the "id" field.

func (*SysDictCreate) SetInput

SetInput applies the change-set in the CreateSysDictInput on the create builder.

func (*SysDictCreate) SetIsDel

func (sdc *SysDictCreate) SetIsDel(b bool) *SysDictCreate

SetIsDel sets the "is_del" field.

func (*SysDictCreate) SetMemo

func (sdc *SysDictCreate) SetMemo(s string) *SysDictCreate

SetMemo sets the "memo" field.

func (*SysDictCreate) SetNameCn

func (sdc *SysDictCreate) SetNameCn(s string) *SysDictCreate

SetNameCn sets the "name_cn" field.

func (*SysDictCreate) SetNameEn

func (sdc *SysDictCreate) SetNameEn(s string) *SysDictCreate

SetNameEn sets the "name_en" field.

func (*SysDictCreate) SetNillableCreatedAt

func (sdc *SysDictCreate) SetNillableCreatedAt(t *time.Time) *SysDictCreate

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

func (*SysDictCreate) SetNillableDeletedAt

func (sdc *SysDictCreate) SetNillableDeletedAt(t *time.Time) *SysDictCreate

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

func (*SysDictCreate) SetNillableID

func (sdc *SysDictCreate) SetNillableID(s *string) *SysDictCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SysDictCreate) SetNillableIsDel

func (sdc *SysDictCreate) SetNillableIsDel(b *bool) *SysDictCreate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysDictCreate) SetNillableMemo

func (sdc *SysDictCreate) SetNillableMemo(s *string) *SysDictCreate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysDictCreate) SetNillableSort

func (sdc *SysDictCreate) SetNillableSort(i *int32) *SysDictCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysDictCreate) SetNillableStatus

func (sdc *SysDictCreate) SetNillableStatus(i *int16) *SysDictCreate

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

func (*SysDictCreate) SetNillableUpdatedAt

func (sdc *SysDictCreate) SetNillableUpdatedAt(t *time.Time) *SysDictCreate

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

func (*SysDictCreate) SetSort

func (sdc *SysDictCreate) SetSort(i int32) *SysDictCreate

SetSort sets the "sort" field.

func (*SysDictCreate) SetStatus

func (sdc *SysDictCreate) SetStatus(i int16) *SysDictCreate

SetStatus sets the "status" field.

func (*SysDictCreate) SetUpdatedAt

func (sdc *SysDictCreate) SetUpdatedAt(t time.Time) *SysDictCreate

SetUpdatedAt sets the "updated_at" field.

type SysDictCreateBulk

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

SysDictCreateBulk is the builder for creating many SysDict entities in bulk.

func (*SysDictCreateBulk) Save

func (sdcb *SysDictCreateBulk) Save(ctx context.Context) ([]*SysDict, error)

Save creates the SysDict entities in the database.

func (*SysDictCreateBulk) SaveX

func (sdcb *SysDictCreateBulk) SaveX(ctx context.Context) []*SysDict

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

type SysDictDelete

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

SysDictDelete is the builder for deleting a SysDict entity.

func (*SysDictDelete) Exec

func (sdd *SysDictDelete) Exec(ctx context.Context) (int, error)

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

func (*SysDictDelete) ExecX

func (sdd *SysDictDelete) ExecX(ctx context.Context) int

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

func (*SysDictDelete) Where

func (sdd *SysDictDelete) Where(ps ...predicate.SysDict) *SysDictDelete

Where adds a new predicate to the SysDictDelete builder.

type SysDictDeleteOne

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

SysDictDeleteOne is the builder for deleting a single SysDict entity.

func (*SysDictDeleteOne) Exec

func (sddo *SysDictDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SysDictDeleteOne) ExecX

func (sddo *SysDictDeleteOne) ExecX(ctx context.Context)

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

type SysDictGroupBy

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

SysDictGroupBy is the group-by builder for SysDict entities.

func (*SysDictGroupBy) Aggregate

func (sdgb *SysDictGroupBy) Aggregate(fns ...AggregateFunc) *SysDictGroupBy

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

func (*SysDictGroupBy) Bool

func (sdgb *SysDictGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysDictGroupBy) BoolX

func (sdgb *SysDictGroupBy) BoolX(ctx context.Context) bool

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

func (*SysDictGroupBy) Bools

func (sdgb *SysDictGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SysDictGroupBy) BoolsX

func (sdgb *SysDictGroupBy) BoolsX(ctx context.Context) []bool

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

func (*SysDictGroupBy) Float64

func (sdgb *SysDictGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysDictGroupBy) Float64X

func (sdgb *SysDictGroupBy) Float64X(ctx context.Context) float64

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

func (*SysDictGroupBy) Float64s

func (sdgb *SysDictGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SysDictGroupBy) Float64sX

func (sdgb *SysDictGroupBy) Float64sX(ctx context.Context) []float64

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

func (*SysDictGroupBy) Int

func (sdgb *SysDictGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysDictGroupBy) IntX

func (sdgb *SysDictGroupBy) IntX(ctx context.Context) int

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

func (*SysDictGroupBy) Ints

func (sdgb *SysDictGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SysDictGroupBy) IntsX

func (sdgb *SysDictGroupBy) IntsX(ctx context.Context) []int

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

func (*SysDictGroupBy) Scan

func (sdgb *SysDictGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SysDictGroupBy) ScanX

func (sdgb *SysDictGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*SysDictGroupBy) String

func (sdgb *SysDictGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysDictGroupBy) StringX

func (sdgb *SysDictGroupBy) StringX(ctx context.Context) string

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

func (*SysDictGroupBy) Strings

func (sdgb *SysDictGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SysDictGroupBy) StringsX

func (sdgb *SysDictGroupBy) StringsX(ctx context.Context) []string

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

type SysDictItem

type SysDictItem struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// IsDel holds the value of the "is_del" field.
	// 是否删除
	IsDel bool `json:"is_del,omitempty"`
	// Memo holds the value of the "memo" field.
	// 备注
	Memo string `json:"memo,omitempty"`
	// Sort holds the value of the "sort" field.
	// 排序, 在数据库里的排序
	Sort int32 `json:"sort,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	// 创建时间,由程序自动生成
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	// 更新时间,由程序自动生成
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	// 删除时间,
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// Label holds the value of the "label" field.
	// 显示值
	Label string `json:"label,omitempty"`
	// Value holds the value of the "value" field.
	// 字典值
	Value int `json:"value,omitempty"`
	// Status holds the value of the "status" field.
	// 启用状态
	Status int16 `json:"status,omitempty"`
	// DictID holds the value of the "dict_id" field.
	// sys_dict.id
	DictID string `json:"dict_id,omitempty"`
	// contains filtered or unexported fields
}

SysDictItem is the model entity for the SysDictItem schema.

func (*SysDictItem) String

func (sdi *SysDictItem) String() string

String implements the fmt.Stringer.

func (*SysDictItem) Unwrap

func (sdi *SysDictItem) Unwrap() *SysDictItem

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

func (sdi *SysDictItem) Update() *SysDictItemUpdateOne

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

type SysDictItemClient

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

SysDictItemClient is a client for the SysDictItem schema.

func NewSysDictItemClient

func NewSysDictItemClient(c config) *SysDictItemClient

NewSysDictItemClient returns a client for the SysDictItem from the given config.

func (*SysDictItemClient) Create

func (c *SysDictItemClient) Create() *SysDictItemCreate

Create returns a create builder for SysDictItem.

func (*SysDictItemClient) CreateBulk

func (c *SysDictItemClient) CreateBulk(builders ...*SysDictItemCreate) *SysDictItemCreateBulk

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

func (*SysDictItemClient) Delete

func (c *SysDictItemClient) Delete() *SysDictItemDelete

Delete returns a delete builder for SysDictItem.

func (*SysDictItemClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SysDictItemClient) DeleteOneID

func (c *SysDictItemClient) DeleteOneID(id string) *SysDictItemDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SysDictItemClient) Get

Get returns a SysDictItem entity by its id.

func (*SysDictItemClient) GetX

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

func (*SysDictItemClient) Hooks

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

Hooks returns the client hooks.

func (*SysDictItemClient) Query

func (c *SysDictItemClient) Query() *SysDictItemQuery

Query returns a query builder for SysDictItem.

func (*SysDictItemClient) Update

func (c *SysDictItemClient) Update() *SysDictItemUpdate

Update returns an update builder for SysDictItem.

func (*SysDictItemClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SysDictItemClient) UpdateOneID

func (c *SysDictItemClient) UpdateOneID(id string) *SysDictItemUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SysDictItemClient) Use

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

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

type SysDictItemCreate

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

SysDictItemCreate is the builder for creating a SysDictItem entity.

func (*SysDictItemCreate) Mutation

func (sdic *SysDictItemCreate) Mutation() *SysDictItemMutation

Mutation returns the SysDictItemMutation object of the builder.

func (*SysDictItemCreate) Save

func (sdic *SysDictItemCreate) Save(ctx context.Context) (*SysDictItem, error)

Save creates the SysDictItem in the database.

func (*SysDictItemCreate) SaveX

func (sdic *SysDictItemCreate) SaveX(ctx context.Context) *SysDictItem

SaveX calls Save and panics if Save returns an error.

func (*SysDictItemCreate) SetCreatedAt

func (sdic *SysDictItemCreate) SetCreatedAt(t time.Time) *SysDictItemCreate

SetCreatedAt sets the "created_at" field.

func (*SysDictItemCreate) SetDeletedAt

func (sdic *SysDictItemCreate) SetDeletedAt(t time.Time) *SysDictItemCreate

SetDeletedAt sets the "deleted_at" field.

func (*SysDictItemCreate) SetDictID

func (sdic *SysDictItemCreate) SetDictID(s string) *SysDictItemCreate

SetDictID sets the "dict_id" field.

func (*SysDictItemCreate) SetID

func (sdic *SysDictItemCreate) SetID(s string) *SysDictItemCreate

SetID sets the "id" field.

func (*SysDictItemCreate) SetInput

SetInput applies the change-set in the CreateSysDictItemInput on the create builder.

func (*SysDictItemCreate) SetIsDel

func (sdic *SysDictItemCreate) SetIsDel(b bool) *SysDictItemCreate

SetIsDel sets the "is_del" field.

func (*SysDictItemCreate) SetLabel

func (sdic *SysDictItemCreate) SetLabel(s string) *SysDictItemCreate

SetLabel sets the "label" field.

func (*SysDictItemCreate) SetMemo

func (sdic *SysDictItemCreate) SetMemo(s string) *SysDictItemCreate

SetMemo sets the "memo" field.

func (*SysDictItemCreate) SetNillableCreatedAt

func (sdic *SysDictItemCreate) SetNillableCreatedAt(t *time.Time) *SysDictItemCreate

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

func (*SysDictItemCreate) SetNillableDeletedAt

func (sdic *SysDictItemCreate) SetNillableDeletedAt(t *time.Time) *SysDictItemCreate

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

func (*SysDictItemCreate) SetNillableID

func (sdic *SysDictItemCreate) SetNillableID(s *string) *SysDictItemCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SysDictItemCreate) SetNillableIsDel

func (sdic *SysDictItemCreate) SetNillableIsDel(b *bool) *SysDictItemCreate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysDictItemCreate) SetNillableMemo

func (sdic *SysDictItemCreate) SetNillableMemo(s *string) *SysDictItemCreate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysDictItemCreate) SetNillableSort

func (sdic *SysDictItemCreate) SetNillableSort(i *int32) *SysDictItemCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysDictItemCreate) SetNillableUpdatedAt

func (sdic *SysDictItemCreate) SetNillableUpdatedAt(t *time.Time) *SysDictItemCreate

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

func (*SysDictItemCreate) SetSort

func (sdic *SysDictItemCreate) SetSort(i int32) *SysDictItemCreate

SetSort sets the "sort" field.

func (*SysDictItemCreate) SetStatus

func (sdic *SysDictItemCreate) SetStatus(i int16) *SysDictItemCreate

SetStatus sets the "status" field.

func (*SysDictItemCreate) SetUpdatedAt

func (sdic *SysDictItemCreate) SetUpdatedAt(t time.Time) *SysDictItemCreate

SetUpdatedAt sets the "updated_at" field.

func (*SysDictItemCreate) SetValue

func (sdic *SysDictItemCreate) SetValue(i int) *SysDictItemCreate

SetValue sets the "value" field.

type SysDictItemCreateBulk

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

SysDictItemCreateBulk is the builder for creating many SysDictItem entities in bulk.

func (*SysDictItemCreateBulk) Save

func (sdicb *SysDictItemCreateBulk) Save(ctx context.Context) ([]*SysDictItem, error)

Save creates the SysDictItem entities in the database.

func (*SysDictItemCreateBulk) SaveX

func (sdicb *SysDictItemCreateBulk) SaveX(ctx context.Context) []*SysDictItem

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

type SysDictItemDelete

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

SysDictItemDelete is the builder for deleting a SysDictItem entity.

func (*SysDictItemDelete) Exec

func (sdid *SysDictItemDelete) Exec(ctx context.Context) (int, error)

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

func (*SysDictItemDelete) ExecX

func (sdid *SysDictItemDelete) ExecX(ctx context.Context) int

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

func (*SysDictItemDelete) Where

Where adds a new predicate to the SysDictItemDelete builder.

type SysDictItemDeleteOne

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

SysDictItemDeleteOne is the builder for deleting a single SysDictItem entity.

func (*SysDictItemDeleteOne) Exec

func (sdido *SysDictItemDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SysDictItemDeleteOne) ExecX

func (sdido *SysDictItemDeleteOne) ExecX(ctx context.Context)

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

type SysDictItemGroupBy

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

SysDictItemGroupBy is the group-by builder for SysDictItem entities.

func (*SysDictItemGroupBy) Aggregate

func (sdigb *SysDictItemGroupBy) Aggregate(fns ...AggregateFunc) *SysDictItemGroupBy

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

func (*SysDictItemGroupBy) Bool

func (sdigb *SysDictItemGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysDictItemGroupBy) BoolX

func (sdigb *SysDictItemGroupBy) BoolX(ctx context.Context) bool

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

func (*SysDictItemGroupBy) Bools

func (sdigb *SysDictItemGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SysDictItemGroupBy) BoolsX

func (sdigb *SysDictItemGroupBy) BoolsX(ctx context.Context) []bool

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

func (*SysDictItemGroupBy) Float64

func (sdigb *SysDictItemGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysDictItemGroupBy) Float64X

func (sdigb *SysDictItemGroupBy) Float64X(ctx context.Context) float64

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

func (*SysDictItemGroupBy) Float64s

func (sdigb *SysDictItemGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SysDictItemGroupBy) Float64sX

func (sdigb *SysDictItemGroupBy) Float64sX(ctx context.Context) []float64

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

func (*SysDictItemGroupBy) Int

func (sdigb *SysDictItemGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysDictItemGroupBy) IntX

func (sdigb *SysDictItemGroupBy) IntX(ctx context.Context) int

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

func (*SysDictItemGroupBy) Ints

func (sdigb *SysDictItemGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SysDictItemGroupBy) IntsX

func (sdigb *SysDictItemGroupBy) IntsX(ctx context.Context) []int

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

func (*SysDictItemGroupBy) Scan

func (sdigb *SysDictItemGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SysDictItemGroupBy) ScanX

func (sdigb *SysDictItemGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*SysDictItemGroupBy) String

func (sdigb *SysDictItemGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysDictItemGroupBy) StringX

func (sdigb *SysDictItemGroupBy) StringX(ctx context.Context) string

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

func (*SysDictItemGroupBy) Strings

func (sdigb *SysDictItemGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SysDictItemGroupBy) StringsX

func (sdigb *SysDictItemGroupBy) StringsX(ctx context.Context) []string

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

type SysDictItemMutation

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

SysDictItemMutation represents an operation that mutates the SysDictItem nodes in the graph.

func (*SysDictItemMutation) AddField

func (m *SysDictItemMutation) 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 (*SysDictItemMutation) AddSort

func (m *SysDictItemMutation) AddSort(i int32)

AddSort adds i to the "sort" field.

func (*SysDictItemMutation) AddStatus

func (m *SysDictItemMutation) AddStatus(i int16)

AddStatus adds i to the "status" field.

func (*SysDictItemMutation) AddValue

func (m *SysDictItemMutation) AddValue(i int)

AddValue adds i to the "value" field.

func (*SysDictItemMutation) AddedEdges

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

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

func (*SysDictItemMutation) AddedField

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

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

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

func (*SysDictItemMutation) AddedIDs

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

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

func (*SysDictItemMutation) AddedSort

func (m *SysDictItemMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*SysDictItemMutation) AddedStatus

func (m *SysDictItemMutation) AddedStatus() (r int16, exists bool)

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

func (*SysDictItemMutation) AddedValue

func (m *SysDictItemMutation) AddedValue() (r int, exists bool)

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

func (*SysDictItemMutation) ClearDeletedAt

func (m *SysDictItemMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysDictItemMutation) ClearEdge

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

func (m *SysDictItemMutation) 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 (*SysDictItemMutation) ClearedEdges

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

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

func (*SysDictItemMutation) ClearedFields

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

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

func (SysDictItemMutation) Client

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

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

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

func (*SysDictItemMutation) DeletedAt

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

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

func (*SysDictItemMutation) DeletedAtCleared

func (m *SysDictItemMutation) DeletedAtCleared() bool

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

func (*SysDictItemMutation) DictID

func (m *SysDictItemMutation) DictID() (r string, exists bool)

DictID returns the value of the "dict_id" field in the mutation.

func (*SysDictItemMutation) EdgeCleared

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

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

func (*SysDictItemMutation) Field

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

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

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

func (*SysDictItemMutation) Fields

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

func (m *SysDictItemMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*SysDictItemMutation) IsDel

func (m *SysDictItemMutation) IsDel() (r bool, exists bool)

IsDel returns the value of the "is_del" field in the mutation.

func (*SysDictItemMutation) Label

func (m *SysDictItemMutation) Label() (r string, exists bool)

Label returns the value of the "label" field in the mutation.

func (*SysDictItemMutation) Memo

func (m *SysDictItemMutation) Memo() (r string, exists bool)

Memo returns the value of the "memo" field in the mutation.

func (*SysDictItemMutation) OldCreatedAt

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

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

func (*SysDictItemMutation) OldDeletedAt

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

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

func (*SysDictItemMutation) OldDictID

func (m *SysDictItemMutation) OldDictID(ctx context.Context) (v string, err error)

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

func (*SysDictItemMutation) OldField

func (m *SysDictItemMutation) 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 (*SysDictItemMutation) OldIsDel

func (m *SysDictItemMutation) OldIsDel(ctx context.Context) (v bool, err error)

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

func (*SysDictItemMutation) OldLabel

func (m *SysDictItemMutation) OldLabel(ctx context.Context) (v string, err error)

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

func (*SysDictItemMutation) OldMemo

func (m *SysDictItemMutation) OldMemo(ctx context.Context) (v string, err error)

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

func (*SysDictItemMutation) OldSort

func (m *SysDictItemMutation) OldSort(ctx context.Context) (v int32, err error)

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

func (*SysDictItemMutation) OldStatus

func (m *SysDictItemMutation) OldStatus(ctx context.Context) (v int16, err error)

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

func (*SysDictItemMutation) OldUpdatedAt

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

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

func (*SysDictItemMutation) OldValue

func (m *SysDictItemMutation) OldValue(ctx context.Context) (v int, err error)

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

func (*SysDictItemMutation) Op

func (m *SysDictItemMutation) Op() Op

Op returns the operation name.

func (*SysDictItemMutation) RemovedEdges

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

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

func (*SysDictItemMutation) RemovedIDs

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

func (m *SysDictItemMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SysDictItemMutation) ResetDeletedAt

func (m *SysDictItemMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*SysDictItemMutation) ResetDictID

func (m *SysDictItemMutation) ResetDictID()

ResetDictID resets all changes to the "dict_id" field.

func (*SysDictItemMutation) ResetEdge

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

func (m *SysDictItemMutation) 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 (*SysDictItemMutation) ResetIsDel

func (m *SysDictItemMutation) ResetIsDel()

ResetIsDel resets all changes to the "is_del" field.

func (*SysDictItemMutation) ResetLabel

func (m *SysDictItemMutation) ResetLabel()

ResetLabel resets all changes to the "label" field.

func (*SysDictItemMutation) ResetMemo

func (m *SysDictItemMutation) ResetMemo()

ResetMemo resets all changes to the "memo" field.

func (*SysDictItemMutation) ResetSort

func (m *SysDictItemMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*SysDictItemMutation) ResetStatus

func (m *SysDictItemMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*SysDictItemMutation) ResetUpdatedAt

func (m *SysDictItemMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SysDictItemMutation) ResetValue

func (m *SysDictItemMutation) ResetValue()

ResetValue resets all changes to the "value" field.

func (*SysDictItemMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*SysDictItemMutation) SetDeletedAt

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

SetDeletedAt sets the "deleted_at" field.

func (*SysDictItemMutation) SetDictID

func (m *SysDictItemMutation) SetDictID(s string)

SetDictID sets the "dict_id" field.

func (*SysDictItemMutation) SetField

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

func (m *SysDictItemMutation) SetID(id string)

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

func (*SysDictItemMutation) SetIsDel

func (m *SysDictItemMutation) SetIsDel(b bool)

SetIsDel sets the "is_del" field.

func (*SysDictItemMutation) SetLabel

func (m *SysDictItemMutation) SetLabel(s string)

SetLabel sets the "label" field.

func (*SysDictItemMutation) SetMemo

func (m *SysDictItemMutation) SetMemo(s string)

SetMemo sets the "memo" field.

func (*SysDictItemMutation) SetSort

func (m *SysDictItemMutation) SetSort(i int32)

SetSort sets the "sort" field.

func (*SysDictItemMutation) SetStatus

func (m *SysDictItemMutation) SetStatus(i int16)

SetStatus sets the "status" field.

func (*SysDictItemMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*SysDictItemMutation) SetValue

func (m *SysDictItemMutation) SetValue(i int)

SetValue sets the "value" field.

func (*SysDictItemMutation) Sort

func (m *SysDictItemMutation) Sort() (r int32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*SysDictItemMutation) Status

func (m *SysDictItemMutation) Status() (r int16, exists bool)

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

func (SysDictItemMutation) Tx

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

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

func (*SysDictItemMutation) Type

func (m *SysDictItemMutation) Type() string

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

func (*SysDictItemMutation) UpdatedAt

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

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

func (*SysDictItemMutation) Value

func (m *SysDictItemMutation) Value() (r int, exists bool)

Value returns the value of the "value" field in the mutation.

type SysDictItemQuery

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

SysDictItemQuery is the builder for querying SysDictItem entities.

func (*SysDictItemQuery) All

func (sdiq *SysDictItemQuery) All(ctx context.Context) ([]*SysDictItem, error)

All executes the query and returns a list of SysDictItems.

func (*SysDictItemQuery) AllX

func (sdiq *SysDictItemQuery) AllX(ctx context.Context) []*SysDictItem

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

func (*SysDictItemQuery) Clone

func (sdiq *SysDictItemQuery) Clone() *SysDictItemQuery

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

func (*SysDictItemQuery) Count

func (sdiq *SysDictItemQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SysDictItemQuery) CountX

func (sdiq *SysDictItemQuery) CountX(ctx context.Context) int

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

func (*SysDictItemQuery) Exist

func (sdiq *SysDictItemQuery) Exist(ctx context.Context) (bool, error)

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

func (*SysDictItemQuery) ExistX

func (sdiq *SysDictItemQuery) ExistX(ctx context.Context) bool

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

func (*SysDictItemQuery) First

func (sdiq *SysDictItemQuery) First(ctx context.Context) (*SysDictItem, error)

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

func (*SysDictItemQuery) FirstID

func (sdiq *SysDictItemQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*SysDictItemQuery) FirstIDX

func (sdiq *SysDictItemQuery) FirstIDX(ctx context.Context) string

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

func (*SysDictItemQuery) FirstX

func (sdiq *SysDictItemQuery) FirstX(ctx context.Context) *SysDictItem

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

func (*SysDictItemQuery) GroupBy

func (sdiq *SysDictItemQuery) GroupBy(field string, fields ...string) *SysDictItemGroupBy

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 {
	IsDel bool `json:"is_del,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SysDictItem.Query().
	GroupBy(sysdictitem.FieldIsDel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SysDictItemQuery) IDs

func (sdiq *SysDictItemQuery) IDs(ctx context.Context) ([]string, error)

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

func (*SysDictItemQuery) IDsX

func (sdiq *SysDictItemQuery) IDsX(ctx context.Context) []string

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

func (*SysDictItemQuery) Limit

func (sdiq *SysDictItemQuery) Limit(limit int) *SysDictItemQuery

Limit adds a limit step to the query.

func (*SysDictItemQuery) Offset

func (sdiq *SysDictItemQuery) Offset(offset int) *SysDictItemQuery

Offset adds an offset step to the query.

func (*SysDictItemQuery) Only

func (sdiq *SysDictItemQuery) Only(ctx context.Context) (*SysDictItem, error)

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

func (*SysDictItemQuery) OnlyID

func (sdiq *SysDictItemQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*SysDictItemQuery) OnlyIDX

func (sdiq *SysDictItemQuery) OnlyIDX(ctx context.Context) string

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

func (*SysDictItemQuery) OnlyX

func (sdiq *SysDictItemQuery) OnlyX(ctx context.Context) *SysDictItem

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

func (*SysDictItemQuery) Order

func (sdiq *SysDictItemQuery) Order(o ...OrderFunc) *SysDictItemQuery

Order adds an order step to the query.

func (*SysDictItemQuery) Select

func (sdiq *SysDictItemQuery) Select(field string, fields ...string) *SysDictItemSelect

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 {
	IsDel bool `json:"is_del,omitempty"`
}

client.SysDictItem.Query().
	Select(sysdictitem.FieldIsDel).
	Scan(ctx, &v)

func (*SysDictItemQuery) Unique

func (sdiq *SysDictItemQuery) Unique(unique bool) *SysDictItemQuery

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

Where adds a new predicate for the SysDictItemQuery builder.

type SysDictItemSelect

type SysDictItemSelect struct {
	*SysDictItemQuery
	// contains filtered or unexported fields
}

SysDictItemSelect is the builder for selecting fields of SysDictItem entities.

func (*SysDictItemSelect) Bool

func (sdis *SysDictItemSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*SysDictItemSelect) BoolX

func (sdis *SysDictItemSelect) BoolX(ctx context.Context) bool

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

func (*SysDictItemSelect) Bools

func (sdis *SysDictItemSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*SysDictItemSelect) BoolsX

func (sdis *SysDictItemSelect) BoolsX(ctx context.Context) []bool

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

func (*SysDictItemSelect) Float64

func (sdis *SysDictItemSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*SysDictItemSelect) Float64X

func (sdis *SysDictItemSelect) Float64X(ctx context.Context) float64

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

func (*SysDictItemSelect) Float64s

func (sdis *SysDictItemSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*SysDictItemSelect) Float64sX

func (sdis *SysDictItemSelect) Float64sX(ctx context.Context) []float64

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

func (*SysDictItemSelect) Int

func (sdis *SysDictItemSelect) Int(ctx context.Context) (_ int, err error)

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

func (*SysDictItemSelect) IntX

func (sdis *SysDictItemSelect) IntX(ctx context.Context) int

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

func (*SysDictItemSelect) Ints

func (sdis *SysDictItemSelect) Ints(ctx context.Context) ([]int, error)

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

func (*SysDictItemSelect) IntsX

func (sdis *SysDictItemSelect) IntsX(ctx context.Context) []int

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

func (*SysDictItemSelect) Scan

func (sdis *SysDictItemSelect) Scan(ctx context.Context, v interface{}) error

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

func (*SysDictItemSelect) ScanX

func (sdis *SysDictItemSelect) ScanX(ctx context.Context, v interface{})

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

func (*SysDictItemSelect) String

func (sdis *SysDictItemSelect) String(ctx context.Context) (_ string, err error)

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

func (*SysDictItemSelect) StringX

func (sdis *SysDictItemSelect) StringX(ctx context.Context) string

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

func (*SysDictItemSelect) Strings

func (sdis *SysDictItemSelect) Strings(ctx context.Context) ([]string, error)

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

func (*SysDictItemSelect) StringsX

func (sdis *SysDictItemSelect) StringsX(ctx context.Context) []string

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

type SysDictItemUpdate

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

SysDictItemUpdate is the builder for updating SysDictItem entities.

func (*SysDictItemUpdate) AddSort

func (sdiu *SysDictItemUpdate) AddSort(i int32) *SysDictItemUpdate

AddSort adds i to the "sort" field.

func (*SysDictItemUpdate) AddStatus

func (sdiu *SysDictItemUpdate) AddStatus(i int16) *SysDictItemUpdate

AddStatus adds i to the "status" field.

func (*SysDictItemUpdate) AddValue

func (sdiu *SysDictItemUpdate) AddValue(i int) *SysDictItemUpdate

AddValue adds i to the "value" field.

func (*SysDictItemUpdate) ClearDeletedAt

func (sdiu *SysDictItemUpdate) ClearDeletedAt() *SysDictItemUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysDictItemUpdate) Exec

func (sdiu *SysDictItemUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SysDictItemUpdate) ExecX

func (sdiu *SysDictItemUpdate) ExecX(ctx context.Context)

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

func (*SysDictItemUpdate) Mutation

func (sdiu *SysDictItemUpdate) Mutation() *SysDictItemMutation

Mutation returns the SysDictItemMutation object of the builder.

func (*SysDictItemUpdate) Save

func (sdiu *SysDictItemUpdate) Save(ctx context.Context) (int, error)

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

func (*SysDictItemUpdate) SaveX

func (sdiu *SysDictItemUpdate) SaveX(ctx context.Context) int

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

func (*SysDictItemUpdate) SetDeletedAt

func (sdiu *SysDictItemUpdate) SetDeletedAt(t time.Time) *SysDictItemUpdate

SetDeletedAt sets the "deleted_at" field.

func (*SysDictItemUpdate) SetDictID

func (sdiu *SysDictItemUpdate) SetDictID(s string) *SysDictItemUpdate

SetDictID sets the "dict_id" field.

func (*SysDictItemUpdate) SetInput

SetInput applies the change-set in the UpdateSysDictItemInput on the update builder.

func (*SysDictItemUpdate) SetIsDel

func (sdiu *SysDictItemUpdate) SetIsDel(b bool) *SysDictItemUpdate

SetIsDel sets the "is_del" field.

func (*SysDictItemUpdate) SetLabel

func (sdiu *SysDictItemUpdate) SetLabel(s string) *SysDictItemUpdate

SetLabel sets the "label" field.

func (*SysDictItemUpdate) SetMemo

func (sdiu *SysDictItemUpdate) SetMemo(s string) *SysDictItemUpdate

SetMemo sets the "memo" field.

func (*SysDictItemUpdate) SetNillableDeletedAt

func (sdiu *SysDictItemUpdate) SetNillableDeletedAt(t *time.Time) *SysDictItemUpdate

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

func (*SysDictItemUpdate) SetNillableIsDel

func (sdiu *SysDictItemUpdate) SetNillableIsDel(b *bool) *SysDictItemUpdate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysDictItemUpdate) SetNillableMemo

func (sdiu *SysDictItemUpdate) SetNillableMemo(s *string) *SysDictItemUpdate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysDictItemUpdate) SetNillableSort

func (sdiu *SysDictItemUpdate) SetNillableSort(i *int32) *SysDictItemUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysDictItemUpdate) SetSort

func (sdiu *SysDictItemUpdate) SetSort(i int32) *SysDictItemUpdate

SetSort sets the "sort" field.

func (*SysDictItemUpdate) SetStatus

func (sdiu *SysDictItemUpdate) SetStatus(i int16) *SysDictItemUpdate

SetStatus sets the "status" field.

func (*SysDictItemUpdate) SetUpdatedAt

func (sdiu *SysDictItemUpdate) SetUpdatedAt(t time.Time) *SysDictItemUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SysDictItemUpdate) SetValue

func (sdiu *SysDictItemUpdate) SetValue(i int) *SysDictItemUpdate

SetValue sets the "value" field.

func (*SysDictItemUpdate) Where

Where adds a new predicate for the SysDictItemUpdate builder.

type SysDictItemUpdateOne

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

SysDictItemUpdateOne is the builder for updating a single SysDictItem entity.

func (*SysDictItemUpdateOne) AddSort

func (sdiuo *SysDictItemUpdateOne) AddSort(i int32) *SysDictItemUpdateOne

AddSort adds i to the "sort" field.

func (*SysDictItemUpdateOne) AddStatus

func (sdiuo *SysDictItemUpdateOne) AddStatus(i int16) *SysDictItemUpdateOne

AddStatus adds i to the "status" field.

func (*SysDictItemUpdateOne) AddValue

func (sdiuo *SysDictItemUpdateOne) AddValue(i int) *SysDictItemUpdateOne

AddValue adds i to the "value" field.

func (*SysDictItemUpdateOne) ClearDeletedAt

func (sdiuo *SysDictItemUpdateOne) ClearDeletedAt() *SysDictItemUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysDictItemUpdateOne) Exec

func (sdiuo *SysDictItemUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SysDictItemUpdateOne) ExecX

func (sdiuo *SysDictItemUpdateOne) ExecX(ctx context.Context)

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

func (*SysDictItemUpdateOne) Mutation

func (sdiuo *SysDictItemUpdateOne) Mutation() *SysDictItemMutation

Mutation returns the SysDictItemMutation object of the builder.

func (*SysDictItemUpdateOne) Save

func (sdiuo *SysDictItemUpdateOne) Save(ctx context.Context) (*SysDictItem, error)

Save executes the query and returns the updated SysDictItem entity.

func (*SysDictItemUpdateOne) SaveX

func (sdiuo *SysDictItemUpdateOne) SaveX(ctx context.Context) *SysDictItem

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

func (*SysDictItemUpdateOne) Select

func (sdiuo *SysDictItemUpdateOne) Select(field string, fields ...string) *SysDictItemUpdateOne

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

func (*SysDictItemUpdateOne) SetDeletedAt

func (sdiuo *SysDictItemUpdateOne) SetDeletedAt(t time.Time) *SysDictItemUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*SysDictItemUpdateOne) SetDictID

func (sdiuo *SysDictItemUpdateOne) SetDictID(s string) *SysDictItemUpdateOne

SetDictID sets the "dict_id" field.

func (*SysDictItemUpdateOne) SetInput

SetInput applies the change-set in the UpdateSysDictItemInput on the update-one builder.

func (*SysDictItemUpdateOne) SetIsDel

func (sdiuo *SysDictItemUpdateOne) SetIsDel(b bool) *SysDictItemUpdateOne

SetIsDel sets the "is_del" field.

func (*SysDictItemUpdateOne) SetLabel

func (sdiuo *SysDictItemUpdateOne) SetLabel(s string) *SysDictItemUpdateOne

SetLabel sets the "label" field.

func (*SysDictItemUpdateOne) SetMemo

SetMemo sets the "memo" field.

func (*SysDictItemUpdateOne) SetNillableDeletedAt

func (sdiuo *SysDictItemUpdateOne) SetNillableDeletedAt(t *time.Time) *SysDictItemUpdateOne

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

func (*SysDictItemUpdateOne) SetNillableIsDel

func (sdiuo *SysDictItemUpdateOne) SetNillableIsDel(b *bool) *SysDictItemUpdateOne

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysDictItemUpdateOne) SetNillableMemo

func (sdiuo *SysDictItemUpdateOne) SetNillableMemo(s *string) *SysDictItemUpdateOne

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysDictItemUpdateOne) SetNillableSort

func (sdiuo *SysDictItemUpdateOne) SetNillableSort(i *int32) *SysDictItemUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysDictItemUpdateOne) SetSort

func (sdiuo *SysDictItemUpdateOne) SetSort(i int32) *SysDictItemUpdateOne

SetSort sets the "sort" field.

func (*SysDictItemUpdateOne) SetStatus

func (sdiuo *SysDictItemUpdateOne) SetStatus(i int16) *SysDictItemUpdateOne

SetStatus sets the "status" field.

func (*SysDictItemUpdateOne) SetUpdatedAt

func (sdiuo *SysDictItemUpdateOne) SetUpdatedAt(t time.Time) *SysDictItemUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*SysDictItemUpdateOne) SetValue

func (sdiuo *SysDictItemUpdateOne) SetValue(i int) *SysDictItemUpdateOne

SetValue sets the "value" field.

type SysDictItems

type SysDictItems []*SysDictItem

SysDictItems is a parsable slice of SysDictItem.

type SysDictMutation

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

SysDictMutation represents an operation that mutates the SysDict nodes in the graph.

func (*SysDictMutation) AddField

func (m *SysDictMutation) 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 (*SysDictMutation) AddSort

func (m *SysDictMutation) AddSort(i int32)

AddSort adds i to the "sort" field.

func (*SysDictMutation) AddStatus

func (m *SysDictMutation) AddStatus(i int16)

AddStatus adds i to the "status" field.

func (*SysDictMutation) AddedEdges

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

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

func (*SysDictMutation) AddedField

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

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

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

func (*SysDictMutation) AddedIDs

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

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

func (*SysDictMutation) AddedSort

func (m *SysDictMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*SysDictMutation) AddedStatus

func (m *SysDictMutation) AddedStatus() (r int16, exists bool)

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

func (*SysDictMutation) ClearDeletedAt

func (m *SysDictMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysDictMutation) ClearEdge

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

func (m *SysDictMutation) 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 (*SysDictMutation) ClearedEdges

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

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

func (*SysDictMutation) ClearedFields

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

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

func (SysDictMutation) Client

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

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

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

func (*SysDictMutation) DeletedAt

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

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

func (*SysDictMutation) DeletedAtCleared

func (m *SysDictMutation) DeletedAtCleared() bool

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

func (*SysDictMutation) EdgeCleared

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

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

func (*SysDictMutation) Field

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

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

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

func (*SysDictMutation) Fields

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

func (m *SysDictMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*SysDictMutation) IsDel

func (m *SysDictMutation) IsDel() (r bool, exists bool)

IsDel returns the value of the "is_del" field in the mutation.

func (*SysDictMutation) Memo

func (m *SysDictMutation) Memo() (r string, exists bool)

Memo returns the value of the "memo" field in the mutation.

func (*SysDictMutation) NameCn

func (m *SysDictMutation) NameCn() (r string, exists bool)

NameCn returns the value of the "name_cn" field in the mutation.

func (*SysDictMutation) NameEn

func (m *SysDictMutation) NameEn() (r string, exists bool)

NameEn returns the value of the "name_en" field in the mutation.

func (*SysDictMutation) OldCreatedAt

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

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

func (*SysDictMutation) OldDeletedAt

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

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

func (*SysDictMutation) OldField

func (m *SysDictMutation) 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 (*SysDictMutation) OldIsDel

func (m *SysDictMutation) OldIsDel(ctx context.Context) (v bool, err error)

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

func (*SysDictMutation) OldMemo

func (m *SysDictMutation) OldMemo(ctx context.Context) (v string, err error)

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

func (*SysDictMutation) OldNameCn

func (m *SysDictMutation) OldNameCn(ctx context.Context) (v string, err error)

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

func (*SysDictMutation) OldNameEn

func (m *SysDictMutation) OldNameEn(ctx context.Context) (v string, err error)

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

func (*SysDictMutation) OldSort

func (m *SysDictMutation) OldSort(ctx context.Context) (v int32, err error)

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

func (*SysDictMutation) OldStatus

func (m *SysDictMutation) OldStatus(ctx context.Context) (v int16, err error)

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

func (*SysDictMutation) OldUpdatedAt

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

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

func (*SysDictMutation) Op

func (m *SysDictMutation) Op() Op

Op returns the operation name.

func (*SysDictMutation) RemovedEdges

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

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

func (*SysDictMutation) RemovedIDs

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

func (m *SysDictMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SysDictMutation) ResetDeletedAt

func (m *SysDictMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*SysDictMutation) ResetEdge

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

func (m *SysDictMutation) 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 (*SysDictMutation) ResetIsDel

func (m *SysDictMutation) ResetIsDel()

ResetIsDel resets all changes to the "is_del" field.

func (*SysDictMutation) ResetMemo

func (m *SysDictMutation) ResetMemo()

ResetMemo resets all changes to the "memo" field.

func (*SysDictMutation) ResetNameCn

func (m *SysDictMutation) ResetNameCn()

ResetNameCn resets all changes to the "name_cn" field.

func (*SysDictMutation) ResetNameEn

func (m *SysDictMutation) ResetNameEn()

ResetNameEn resets all changes to the "name_en" field.

func (*SysDictMutation) ResetSort

func (m *SysDictMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*SysDictMutation) ResetStatus

func (m *SysDictMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*SysDictMutation) ResetUpdatedAt

func (m *SysDictMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SysDictMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*SysDictMutation) SetDeletedAt

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

SetDeletedAt sets the "deleted_at" field.

func (*SysDictMutation) SetField

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

func (m *SysDictMutation) SetID(id string)

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

func (*SysDictMutation) SetIsDel

func (m *SysDictMutation) SetIsDel(b bool)

SetIsDel sets the "is_del" field.

func (*SysDictMutation) SetMemo

func (m *SysDictMutation) SetMemo(s string)

SetMemo sets the "memo" field.

func (*SysDictMutation) SetNameCn

func (m *SysDictMutation) SetNameCn(s string)

SetNameCn sets the "name_cn" field.

func (*SysDictMutation) SetNameEn

func (m *SysDictMutation) SetNameEn(s string)

SetNameEn sets the "name_en" field.

func (*SysDictMutation) SetSort

func (m *SysDictMutation) SetSort(i int32)

SetSort sets the "sort" field.

func (*SysDictMutation) SetStatus

func (m *SysDictMutation) SetStatus(i int16)

SetStatus sets the "status" field.

func (*SysDictMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*SysDictMutation) Sort

func (m *SysDictMutation) Sort() (r int32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*SysDictMutation) Status

func (m *SysDictMutation) Status() (r int16, exists bool)

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

func (SysDictMutation) Tx

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

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

func (*SysDictMutation) Type

func (m *SysDictMutation) Type() string

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

func (*SysDictMutation) UpdatedAt

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

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

type SysDictQuery

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

SysDictQuery is the builder for querying SysDict entities.

func (*SysDictQuery) All

func (sdq *SysDictQuery) All(ctx context.Context) ([]*SysDict, error)

All executes the query and returns a list of SysDicts.

func (*SysDictQuery) AllX

func (sdq *SysDictQuery) AllX(ctx context.Context) []*SysDict

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

func (*SysDictQuery) Clone

func (sdq *SysDictQuery) Clone() *SysDictQuery

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

func (*SysDictQuery) Count

func (sdq *SysDictQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SysDictQuery) CountX

func (sdq *SysDictQuery) CountX(ctx context.Context) int

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

func (*SysDictQuery) Exist

func (sdq *SysDictQuery) Exist(ctx context.Context) (bool, error)

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

func (*SysDictQuery) ExistX

func (sdq *SysDictQuery) ExistX(ctx context.Context) bool

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

func (*SysDictQuery) First

func (sdq *SysDictQuery) First(ctx context.Context) (*SysDict, error)

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

func (*SysDictQuery) FirstID

func (sdq *SysDictQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*SysDictQuery) FirstIDX

func (sdq *SysDictQuery) FirstIDX(ctx context.Context) string

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

func (*SysDictQuery) FirstX

func (sdq *SysDictQuery) FirstX(ctx context.Context) *SysDict

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

func (*SysDictQuery) GroupBy

func (sdq *SysDictQuery) GroupBy(field string, fields ...string) *SysDictGroupBy

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 {
	IsDel bool `json:"is_del,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SysDict.Query().
	GroupBy(sysdict.FieldIsDel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SysDictQuery) IDs

func (sdq *SysDictQuery) IDs(ctx context.Context) ([]string, error)

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

func (*SysDictQuery) IDsX

func (sdq *SysDictQuery) IDsX(ctx context.Context) []string

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

func (*SysDictQuery) Limit

func (sdq *SysDictQuery) Limit(limit int) *SysDictQuery

Limit adds a limit step to the query.

func (*SysDictQuery) Offset

func (sdq *SysDictQuery) Offset(offset int) *SysDictQuery

Offset adds an offset step to the query.

func (*SysDictQuery) Only

func (sdq *SysDictQuery) Only(ctx context.Context) (*SysDict, error)

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

func (*SysDictQuery) OnlyID

func (sdq *SysDictQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*SysDictQuery) OnlyIDX

func (sdq *SysDictQuery) OnlyIDX(ctx context.Context) string

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

func (*SysDictQuery) OnlyX

func (sdq *SysDictQuery) OnlyX(ctx context.Context) *SysDict

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

func (*SysDictQuery) Order

func (sdq *SysDictQuery) Order(o ...OrderFunc) *SysDictQuery

Order adds an order step to the query.

func (*SysDictQuery) Select

func (sdq *SysDictQuery) Select(field string, fields ...string) *SysDictSelect

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 {
	IsDel bool `json:"is_del,omitempty"`
}

client.SysDict.Query().
	Select(sysdict.FieldIsDel).
	Scan(ctx, &v)

func (*SysDictQuery) Unique

func (sdq *SysDictQuery) Unique(unique bool) *SysDictQuery

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

func (sdq *SysDictQuery) Where(ps ...predicate.SysDict) *SysDictQuery

Where adds a new predicate for the SysDictQuery builder.

type SysDictSelect

type SysDictSelect struct {
	*SysDictQuery
	// contains filtered or unexported fields
}

SysDictSelect is the builder for selecting fields of SysDict entities.

func (*SysDictSelect) Bool

func (sds *SysDictSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*SysDictSelect) BoolX

func (sds *SysDictSelect) BoolX(ctx context.Context) bool

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

func (*SysDictSelect) Bools

func (sds *SysDictSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*SysDictSelect) BoolsX

func (sds *SysDictSelect) BoolsX(ctx context.Context) []bool

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

func (*SysDictSelect) Float64

func (sds *SysDictSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*SysDictSelect) Float64X

func (sds *SysDictSelect) Float64X(ctx context.Context) float64

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

func (*SysDictSelect) Float64s

func (sds *SysDictSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*SysDictSelect) Float64sX

func (sds *SysDictSelect) Float64sX(ctx context.Context) []float64

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

func (*SysDictSelect) Int

func (sds *SysDictSelect) Int(ctx context.Context) (_ int, err error)

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

func (*SysDictSelect) IntX

func (sds *SysDictSelect) IntX(ctx context.Context) int

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

func (*SysDictSelect) Ints

func (sds *SysDictSelect) Ints(ctx context.Context) ([]int, error)

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

func (*SysDictSelect) IntsX

func (sds *SysDictSelect) IntsX(ctx context.Context) []int

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

func (*SysDictSelect) Scan

func (sds *SysDictSelect) Scan(ctx context.Context, v interface{}) error

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

func (*SysDictSelect) ScanX

func (sds *SysDictSelect) ScanX(ctx context.Context, v interface{})

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

func (*SysDictSelect) String

func (sds *SysDictSelect) String(ctx context.Context) (_ string, err error)

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

func (*SysDictSelect) StringX

func (sds *SysDictSelect) StringX(ctx context.Context) string

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

func (*SysDictSelect) Strings

func (sds *SysDictSelect) Strings(ctx context.Context) ([]string, error)

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

func (*SysDictSelect) StringsX

func (sds *SysDictSelect) StringsX(ctx context.Context) []string

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

type SysDictUpdate

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

SysDictUpdate is the builder for updating SysDict entities.

func (*SysDictUpdate) AddSort

func (sdu *SysDictUpdate) AddSort(i int32) *SysDictUpdate

AddSort adds i to the "sort" field.

func (*SysDictUpdate) AddStatus

func (sdu *SysDictUpdate) AddStatus(i int16) *SysDictUpdate

AddStatus adds i to the "status" field.

func (*SysDictUpdate) ClearDeletedAt

func (sdu *SysDictUpdate) ClearDeletedAt() *SysDictUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysDictUpdate) Exec

func (sdu *SysDictUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SysDictUpdate) ExecX

func (sdu *SysDictUpdate) ExecX(ctx context.Context)

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

func (*SysDictUpdate) Mutation

func (sdu *SysDictUpdate) Mutation() *SysDictMutation

Mutation returns the SysDictMutation object of the builder.

func (*SysDictUpdate) Save

func (sdu *SysDictUpdate) Save(ctx context.Context) (int, error)

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

func (*SysDictUpdate) SaveX

func (sdu *SysDictUpdate) SaveX(ctx context.Context) int

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

func (*SysDictUpdate) SetDeletedAt

func (sdu *SysDictUpdate) SetDeletedAt(t time.Time) *SysDictUpdate

SetDeletedAt sets the "deleted_at" field.

func (*SysDictUpdate) SetInput

SetInput applies the change-set in the UpdateSysDictInput on the update builder.

func (*SysDictUpdate) SetIsDel

func (sdu *SysDictUpdate) SetIsDel(b bool) *SysDictUpdate

SetIsDel sets the "is_del" field.

func (*SysDictUpdate) SetMemo

func (sdu *SysDictUpdate) SetMemo(s string) *SysDictUpdate

SetMemo sets the "memo" field.

func (*SysDictUpdate) SetNameCn

func (sdu *SysDictUpdate) SetNameCn(s string) *SysDictUpdate

SetNameCn sets the "name_cn" field.

func (*SysDictUpdate) SetNameEn

func (sdu *SysDictUpdate) SetNameEn(s string) *SysDictUpdate

SetNameEn sets the "name_en" field.

func (*SysDictUpdate) SetNillableDeletedAt

func (sdu *SysDictUpdate) SetNillableDeletedAt(t *time.Time) *SysDictUpdate

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

func (*SysDictUpdate) SetNillableIsDel

func (sdu *SysDictUpdate) SetNillableIsDel(b *bool) *SysDictUpdate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysDictUpdate) SetNillableMemo

func (sdu *SysDictUpdate) SetNillableMemo(s *string) *SysDictUpdate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysDictUpdate) SetNillableSort

func (sdu *SysDictUpdate) SetNillableSort(i *int32) *SysDictUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysDictUpdate) SetNillableStatus

func (sdu *SysDictUpdate) SetNillableStatus(i *int16) *SysDictUpdate

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

func (*SysDictUpdate) SetSort

func (sdu *SysDictUpdate) SetSort(i int32) *SysDictUpdate

SetSort sets the "sort" field.

func (*SysDictUpdate) SetStatus

func (sdu *SysDictUpdate) SetStatus(i int16) *SysDictUpdate

SetStatus sets the "status" field.

func (*SysDictUpdate) SetUpdatedAt

func (sdu *SysDictUpdate) SetUpdatedAt(t time.Time) *SysDictUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SysDictUpdate) Where

func (sdu *SysDictUpdate) Where(ps ...predicate.SysDict) *SysDictUpdate

Where adds a new predicate for the SysDictUpdate builder.

type SysDictUpdateOne

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

SysDictUpdateOne is the builder for updating a single SysDict entity.

func (*SysDictUpdateOne) AddSort

func (sduo *SysDictUpdateOne) AddSort(i int32) *SysDictUpdateOne

AddSort adds i to the "sort" field.

func (*SysDictUpdateOne) AddStatus

func (sduo *SysDictUpdateOne) AddStatus(i int16) *SysDictUpdateOne

AddStatus adds i to the "status" field.

func (*SysDictUpdateOne) ClearDeletedAt

func (sduo *SysDictUpdateOne) ClearDeletedAt() *SysDictUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysDictUpdateOne) Exec

func (sduo *SysDictUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SysDictUpdateOne) ExecX

func (sduo *SysDictUpdateOne) ExecX(ctx context.Context)

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

func (*SysDictUpdateOne) Mutation

func (sduo *SysDictUpdateOne) Mutation() *SysDictMutation

Mutation returns the SysDictMutation object of the builder.

func (*SysDictUpdateOne) Save

func (sduo *SysDictUpdateOne) Save(ctx context.Context) (*SysDict, error)

Save executes the query and returns the updated SysDict entity.

func (*SysDictUpdateOne) SaveX

func (sduo *SysDictUpdateOne) SaveX(ctx context.Context) *SysDict

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

func (*SysDictUpdateOne) Select

func (sduo *SysDictUpdateOne) Select(field string, fields ...string) *SysDictUpdateOne

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

func (*SysDictUpdateOne) SetDeletedAt

func (sduo *SysDictUpdateOne) SetDeletedAt(t time.Time) *SysDictUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*SysDictUpdateOne) SetInput

SetInput applies the change-set in the UpdateSysDictInput on the update-one builder.

func (*SysDictUpdateOne) SetIsDel

func (sduo *SysDictUpdateOne) SetIsDel(b bool) *SysDictUpdateOne

SetIsDel sets the "is_del" field.

func (*SysDictUpdateOne) SetMemo

func (sduo *SysDictUpdateOne) SetMemo(s string) *SysDictUpdateOne

SetMemo sets the "memo" field.

func (*SysDictUpdateOne) SetNameCn

func (sduo *SysDictUpdateOne) SetNameCn(s string) *SysDictUpdateOne

SetNameCn sets the "name_cn" field.

func (*SysDictUpdateOne) SetNameEn

func (sduo *SysDictUpdateOne) SetNameEn(s string) *SysDictUpdateOne

SetNameEn sets the "name_en" field.

func (*SysDictUpdateOne) SetNillableDeletedAt

func (sduo *SysDictUpdateOne) SetNillableDeletedAt(t *time.Time) *SysDictUpdateOne

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

func (*SysDictUpdateOne) SetNillableIsDel

func (sduo *SysDictUpdateOne) SetNillableIsDel(b *bool) *SysDictUpdateOne

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysDictUpdateOne) SetNillableMemo

func (sduo *SysDictUpdateOne) SetNillableMemo(s *string) *SysDictUpdateOne

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysDictUpdateOne) SetNillableSort

func (sduo *SysDictUpdateOne) SetNillableSort(i *int32) *SysDictUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysDictUpdateOne) SetNillableStatus

func (sduo *SysDictUpdateOne) SetNillableStatus(i *int16) *SysDictUpdateOne

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

func (*SysDictUpdateOne) SetSort

func (sduo *SysDictUpdateOne) SetSort(i int32) *SysDictUpdateOne

SetSort sets the "sort" field.

func (*SysDictUpdateOne) SetStatus

func (sduo *SysDictUpdateOne) SetStatus(i int16) *SysDictUpdateOne

SetStatus sets the "status" field.

func (*SysDictUpdateOne) SetUpdatedAt

func (sduo *SysDictUpdateOne) SetUpdatedAt(t time.Time) *SysDictUpdateOne

SetUpdatedAt sets the "updated_at" field.

type SysDicts

type SysDicts []*SysDict

SysDicts is a parsable slice of SysDict.

type SysJwtBlock

type SysJwtBlock struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// IsDel holds the value of the "is_del" field.
	// 是否删除
	IsDel bool `json:"is_del,omitempty"`
	// Memo holds the value of the "memo" field.
	// 备注
	Memo string `json:"memo,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	// 创建时间,由程序自动生成
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	// 更新时间,由程序自动生成
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	// 删除时间,
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// Status holds the value of the "status" field.
	// 状态,
	Status int16 `json:"status,omitempty"`
	// Jwt holds the value of the "jwt" field.
	// jwt
	Jwt string `json:"jwt,omitempty"`
	// contains filtered or unexported fields
}

SysJwtBlock is the model entity for the SysJwtBlock schema.

func (*SysJwtBlock) String

func (sjb *SysJwtBlock) String() string

String implements the fmt.Stringer.

func (*SysJwtBlock) Unwrap

func (sjb *SysJwtBlock) Unwrap() *SysJwtBlock

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

func (sjb *SysJwtBlock) Update() *SysJwtBlockUpdateOne

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

type SysJwtBlockClient

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

SysJwtBlockClient is a client for the SysJwtBlock schema.

func NewSysJwtBlockClient

func NewSysJwtBlockClient(c config) *SysJwtBlockClient

NewSysJwtBlockClient returns a client for the SysJwtBlock from the given config.

func (*SysJwtBlockClient) Create

func (c *SysJwtBlockClient) Create() *SysJwtBlockCreate

Create returns a create builder for SysJwtBlock.

func (*SysJwtBlockClient) CreateBulk

func (c *SysJwtBlockClient) CreateBulk(builders ...*SysJwtBlockCreate) *SysJwtBlockCreateBulk

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

func (*SysJwtBlockClient) Delete

func (c *SysJwtBlockClient) Delete() *SysJwtBlockDelete

Delete returns a delete builder for SysJwtBlock.

func (*SysJwtBlockClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SysJwtBlockClient) DeleteOneID

func (c *SysJwtBlockClient) DeleteOneID(id string) *SysJwtBlockDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SysJwtBlockClient) Get

Get returns a SysJwtBlock entity by its id.

func (*SysJwtBlockClient) GetX

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

func (*SysJwtBlockClient) Hooks

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

Hooks returns the client hooks.

func (*SysJwtBlockClient) Query

func (c *SysJwtBlockClient) Query() *SysJwtBlockQuery

Query returns a query builder for SysJwtBlock.

func (*SysJwtBlockClient) Update

func (c *SysJwtBlockClient) Update() *SysJwtBlockUpdate

Update returns an update builder for SysJwtBlock.

func (*SysJwtBlockClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SysJwtBlockClient) UpdateOneID

func (c *SysJwtBlockClient) UpdateOneID(id string) *SysJwtBlockUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SysJwtBlockClient) Use

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

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

type SysJwtBlockCreate

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

SysJwtBlockCreate is the builder for creating a SysJwtBlock entity.

func (*SysJwtBlockCreate) Mutation

func (sjbc *SysJwtBlockCreate) Mutation() *SysJwtBlockMutation

Mutation returns the SysJwtBlockMutation object of the builder.

func (*SysJwtBlockCreate) Save

func (sjbc *SysJwtBlockCreate) Save(ctx context.Context) (*SysJwtBlock, error)

Save creates the SysJwtBlock in the database.

func (*SysJwtBlockCreate) SaveX

func (sjbc *SysJwtBlockCreate) SaveX(ctx context.Context) *SysJwtBlock

SaveX calls Save and panics if Save returns an error.

func (*SysJwtBlockCreate) SetCreatedAt

func (sjbc *SysJwtBlockCreate) SetCreatedAt(t time.Time) *SysJwtBlockCreate

SetCreatedAt sets the "created_at" field.

func (*SysJwtBlockCreate) SetDeletedAt

func (sjbc *SysJwtBlockCreate) SetDeletedAt(t time.Time) *SysJwtBlockCreate

SetDeletedAt sets the "deleted_at" field.

func (*SysJwtBlockCreate) SetID

func (sjbc *SysJwtBlockCreate) SetID(s string) *SysJwtBlockCreate

SetID sets the "id" field.

func (*SysJwtBlockCreate) SetInput

SetInput applies the change-set in the CreateSysJwtBlockInput on the create builder.

func (*SysJwtBlockCreate) SetIsDel

func (sjbc *SysJwtBlockCreate) SetIsDel(b bool) *SysJwtBlockCreate

SetIsDel sets the "is_del" field.

func (*SysJwtBlockCreate) SetJwt

func (sjbc *SysJwtBlockCreate) SetJwt(s string) *SysJwtBlockCreate

SetJwt sets the "jwt" field.

func (*SysJwtBlockCreate) SetMemo

func (sjbc *SysJwtBlockCreate) SetMemo(s string) *SysJwtBlockCreate

SetMemo sets the "memo" field.

func (*SysJwtBlockCreate) SetNillableCreatedAt

func (sjbc *SysJwtBlockCreate) SetNillableCreatedAt(t *time.Time) *SysJwtBlockCreate

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

func (*SysJwtBlockCreate) SetNillableDeletedAt

func (sjbc *SysJwtBlockCreate) SetNillableDeletedAt(t *time.Time) *SysJwtBlockCreate

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

func (*SysJwtBlockCreate) SetNillableID

func (sjbc *SysJwtBlockCreate) SetNillableID(s *string) *SysJwtBlockCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SysJwtBlockCreate) SetNillableIsDel

func (sjbc *SysJwtBlockCreate) SetNillableIsDel(b *bool) *SysJwtBlockCreate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysJwtBlockCreate) SetNillableMemo

func (sjbc *SysJwtBlockCreate) SetNillableMemo(s *string) *SysJwtBlockCreate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysJwtBlockCreate) SetNillableStatus

func (sjbc *SysJwtBlockCreate) SetNillableStatus(i *int16) *SysJwtBlockCreate

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

func (*SysJwtBlockCreate) SetNillableUpdatedAt

func (sjbc *SysJwtBlockCreate) SetNillableUpdatedAt(t *time.Time) *SysJwtBlockCreate

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

func (*SysJwtBlockCreate) SetStatus

func (sjbc *SysJwtBlockCreate) SetStatus(i int16) *SysJwtBlockCreate

SetStatus sets the "status" field.

func (*SysJwtBlockCreate) SetUpdatedAt

func (sjbc *SysJwtBlockCreate) SetUpdatedAt(t time.Time) *SysJwtBlockCreate

SetUpdatedAt sets the "updated_at" field.

type SysJwtBlockCreateBulk

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

SysJwtBlockCreateBulk is the builder for creating many SysJwtBlock entities in bulk.

func (*SysJwtBlockCreateBulk) Save

func (sjbcb *SysJwtBlockCreateBulk) Save(ctx context.Context) ([]*SysJwtBlock, error)

Save creates the SysJwtBlock entities in the database.

func (*SysJwtBlockCreateBulk) SaveX

func (sjbcb *SysJwtBlockCreateBulk) SaveX(ctx context.Context) []*SysJwtBlock

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

type SysJwtBlockDelete

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

SysJwtBlockDelete is the builder for deleting a SysJwtBlock entity.

func (*SysJwtBlockDelete) Exec

func (sjbd *SysJwtBlockDelete) Exec(ctx context.Context) (int, error)

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

func (*SysJwtBlockDelete) ExecX

func (sjbd *SysJwtBlockDelete) ExecX(ctx context.Context) int

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

func (*SysJwtBlockDelete) Where

Where adds a new predicate to the SysJwtBlockDelete builder.

type SysJwtBlockDeleteOne

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

SysJwtBlockDeleteOne is the builder for deleting a single SysJwtBlock entity.

func (*SysJwtBlockDeleteOne) Exec

func (sjbdo *SysJwtBlockDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SysJwtBlockDeleteOne) ExecX

func (sjbdo *SysJwtBlockDeleteOne) ExecX(ctx context.Context)

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

type SysJwtBlockGroupBy

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

SysJwtBlockGroupBy is the group-by builder for SysJwtBlock entities.

func (*SysJwtBlockGroupBy) Aggregate

func (sjbgb *SysJwtBlockGroupBy) Aggregate(fns ...AggregateFunc) *SysJwtBlockGroupBy

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

func (*SysJwtBlockGroupBy) Bool

func (sjbgb *SysJwtBlockGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysJwtBlockGroupBy) BoolX

func (sjbgb *SysJwtBlockGroupBy) BoolX(ctx context.Context) bool

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

func (*SysJwtBlockGroupBy) Bools

func (sjbgb *SysJwtBlockGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SysJwtBlockGroupBy) BoolsX

func (sjbgb *SysJwtBlockGroupBy) BoolsX(ctx context.Context) []bool

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

func (*SysJwtBlockGroupBy) Float64

func (sjbgb *SysJwtBlockGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysJwtBlockGroupBy) Float64X

func (sjbgb *SysJwtBlockGroupBy) Float64X(ctx context.Context) float64

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

func (*SysJwtBlockGroupBy) Float64s

func (sjbgb *SysJwtBlockGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SysJwtBlockGroupBy) Float64sX

func (sjbgb *SysJwtBlockGroupBy) Float64sX(ctx context.Context) []float64

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

func (*SysJwtBlockGroupBy) Int

func (sjbgb *SysJwtBlockGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysJwtBlockGroupBy) IntX

func (sjbgb *SysJwtBlockGroupBy) IntX(ctx context.Context) int

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

func (*SysJwtBlockGroupBy) Ints

func (sjbgb *SysJwtBlockGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SysJwtBlockGroupBy) IntsX

func (sjbgb *SysJwtBlockGroupBy) IntsX(ctx context.Context) []int

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

func (*SysJwtBlockGroupBy) Scan

func (sjbgb *SysJwtBlockGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SysJwtBlockGroupBy) ScanX

func (sjbgb *SysJwtBlockGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*SysJwtBlockGroupBy) String

func (sjbgb *SysJwtBlockGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysJwtBlockGroupBy) StringX

func (sjbgb *SysJwtBlockGroupBy) StringX(ctx context.Context) string

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

func (*SysJwtBlockGroupBy) Strings

func (sjbgb *SysJwtBlockGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SysJwtBlockGroupBy) StringsX

func (sjbgb *SysJwtBlockGroupBy) StringsX(ctx context.Context) []string

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

type SysJwtBlockMutation

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

SysJwtBlockMutation represents an operation that mutates the SysJwtBlock nodes in the graph.

func (*SysJwtBlockMutation) AddField

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

func (m *SysJwtBlockMutation) AddStatus(i int16)

AddStatus adds i to the "status" field.

func (*SysJwtBlockMutation) AddedEdges

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

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

func (*SysJwtBlockMutation) AddedField

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

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

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

func (*SysJwtBlockMutation) AddedIDs

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

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

func (*SysJwtBlockMutation) AddedStatus

func (m *SysJwtBlockMutation) AddedStatus() (r int16, exists bool)

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

func (*SysJwtBlockMutation) ClearDeletedAt

func (m *SysJwtBlockMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysJwtBlockMutation) ClearEdge

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

func (m *SysJwtBlockMutation) 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 (*SysJwtBlockMutation) ClearedEdges

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

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

func (*SysJwtBlockMutation) ClearedFields

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

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

func (SysJwtBlockMutation) Client

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

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

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

func (*SysJwtBlockMutation) DeletedAt

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

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

func (*SysJwtBlockMutation) DeletedAtCleared

func (m *SysJwtBlockMutation) DeletedAtCleared() bool

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

func (*SysJwtBlockMutation) EdgeCleared

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

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

func (*SysJwtBlockMutation) Field

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

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

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

func (*SysJwtBlockMutation) Fields

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

func (m *SysJwtBlockMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*SysJwtBlockMutation) IsDel

func (m *SysJwtBlockMutation) IsDel() (r bool, exists bool)

IsDel returns the value of the "is_del" field in the mutation.

func (*SysJwtBlockMutation) Jwt

func (m *SysJwtBlockMutation) Jwt() (r string, exists bool)

Jwt returns the value of the "jwt" field in the mutation.

func (*SysJwtBlockMutation) Memo

func (m *SysJwtBlockMutation) Memo() (r string, exists bool)

Memo returns the value of the "memo" field in the mutation.

func (*SysJwtBlockMutation) OldCreatedAt

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

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

func (*SysJwtBlockMutation) OldDeletedAt

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

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

func (*SysJwtBlockMutation) OldField

func (m *SysJwtBlockMutation) 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 (*SysJwtBlockMutation) OldIsDel

func (m *SysJwtBlockMutation) OldIsDel(ctx context.Context) (v bool, err error)

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

func (*SysJwtBlockMutation) OldJwt

func (m *SysJwtBlockMutation) OldJwt(ctx context.Context) (v string, err error)

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

func (*SysJwtBlockMutation) OldMemo

func (m *SysJwtBlockMutation) OldMemo(ctx context.Context) (v string, err error)

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

func (*SysJwtBlockMutation) OldStatus

func (m *SysJwtBlockMutation) OldStatus(ctx context.Context) (v int16, err error)

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

func (*SysJwtBlockMutation) OldUpdatedAt

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

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

func (*SysJwtBlockMutation) Op

func (m *SysJwtBlockMutation) Op() Op

Op returns the operation name.

func (*SysJwtBlockMutation) RemovedEdges

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

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

func (*SysJwtBlockMutation) RemovedIDs

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

func (m *SysJwtBlockMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SysJwtBlockMutation) ResetDeletedAt

func (m *SysJwtBlockMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*SysJwtBlockMutation) ResetEdge

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

func (m *SysJwtBlockMutation) 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 (*SysJwtBlockMutation) ResetIsDel

func (m *SysJwtBlockMutation) ResetIsDel()

ResetIsDel resets all changes to the "is_del" field.

func (*SysJwtBlockMutation) ResetJwt

func (m *SysJwtBlockMutation) ResetJwt()

ResetJwt resets all changes to the "jwt" field.

func (*SysJwtBlockMutation) ResetMemo

func (m *SysJwtBlockMutation) ResetMemo()

ResetMemo resets all changes to the "memo" field.

func (*SysJwtBlockMutation) ResetStatus

func (m *SysJwtBlockMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*SysJwtBlockMutation) ResetUpdatedAt

func (m *SysJwtBlockMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SysJwtBlockMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*SysJwtBlockMutation) SetDeletedAt

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

SetDeletedAt sets the "deleted_at" field.

func (*SysJwtBlockMutation) SetField

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

func (m *SysJwtBlockMutation) SetID(id string)

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

func (*SysJwtBlockMutation) SetIsDel

func (m *SysJwtBlockMutation) SetIsDel(b bool)

SetIsDel sets the "is_del" field.

func (*SysJwtBlockMutation) SetJwt

func (m *SysJwtBlockMutation) SetJwt(s string)

SetJwt sets the "jwt" field.

func (*SysJwtBlockMutation) SetMemo

func (m *SysJwtBlockMutation) SetMemo(s string)

SetMemo sets the "memo" field.

func (*SysJwtBlockMutation) SetStatus

func (m *SysJwtBlockMutation) SetStatus(i int16)

SetStatus sets the "status" field.

func (*SysJwtBlockMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*SysJwtBlockMutation) Status

func (m *SysJwtBlockMutation) Status() (r int16, exists bool)

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

func (SysJwtBlockMutation) Tx

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

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

func (*SysJwtBlockMutation) Type

func (m *SysJwtBlockMutation) Type() string

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

func (*SysJwtBlockMutation) UpdatedAt

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

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

type SysJwtBlockQuery

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

SysJwtBlockQuery is the builder for querying SysJwtBlock entities.

func (*SysJwtBlockQuery) All

func (sjbq *SysJwtBlockQuery) All(ctx context.Context) ([]*SysJwtBlock, error)

All executes the query and returns a list of SysJwtBlocks.

func (*SysJwtBlockQuery) AllX

func (sjbq *SysJwtBlockQuery) AllX(ctx context.Context) []*SysJwtBlock

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

func (*SysJwtBlockQuery) Clone

func (sjbq *SysJwtBlockQuery) Clone() *SysJwtBlockQuery

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

func (*SysJwtBlockQuery) Count

func (sjbq *SysJwtBlockQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SysJwtBlockQuery) CountX

func (sjbq *SysJwtBlockQuery) CountX(ctx context.Context) int

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

func (*SysJwtBlockQuery) Exist

func (sjbq *SysJwtBlockQuery) Exist(ctx context.Context) (bool, error)

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

func (*SysJwtBlockQuery) ExistX

func (sjbq *SysJwtBlockQuery) ExistX(ctx context.Context) bool

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

func (*SysJwtBlockQuery) First

func (sjbq *SysJwtBlockQuery) First(ctx context.Context) (*SysJwtBlock, error)

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

func (*SysJwtBlockQuery) FirstID

func (sjbq *SysJwtBlockQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*SysJwtBlockQuery) FirstIDX

func (sjbq *SysJwtBlockQuery) FirstIDX(ctx context.Context) string

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

func (*SysJwtBlockQuery) FirstX

func (sjbq *SysJwtBlockQuery) FirstX(ctx context.Context) *SysJwtBlock

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

func (*SysJwtBlockQuery) GroupBy

func (sjbq *SysJwtBlockQuery) GroupBy(field string, fields ...string) *SysJwtBlockGroupBy

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 {
	IsDel bool `json:"is_del,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SysJwtBlock.Query().
	GroupBy(sysjwtblock.FieldIsDel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SysJwtBlockQuery) IDs

func (sjbq *SysJwtBlockQuery) IDs(ctx context.Context) ([]string, error)

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

func (*SysJwtBlockQuery) IDsX

func (sjbq *SysJwtBlockQuery) IDsX(ctx context.Context) []string

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

func (*SysJwtBlockQuery) Limit

func (sjbq *SysJwtBlockQuery) Limit(limit int) *SysJwtBlockQuery

Limit adds a limit step to the query.

func (*SysJwtBlockQuery) Offset

func (sjbq *SysJwtBlockQuery) Offset(offset int) *SysJwtBlockQuery

Offset adds an offset step to the query.

func (*SysJwtBlockQuery) Only

func (sjbq *SysJwtBlockQuery) Only(ctx context.Context) (*SysJwtBlock, error)

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

func (*SysJwtBlockQuery) OnlyID

func (sjbq *SysJwtBlockQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*SysJwtBlockQuery) OnlyIDX

func (sjbq *SysJwtBlockQuery) OnlyIDX(ctx context.Context) string

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

func (*SysJwtBlockQuery) OnlyX

func (sjbq *SysJwtBlockQuery) OnlyX(ctx context.Context) *SysJwtBlock

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

func (*SysJwtBlockQuery) Order

func (sjbq *SysJwtBlockQuery) Order(o ...OrderFunc) *SysJwtBlockQuery

Order adds an order step to the query.

func (*SysJwtBlockQuery) Select

func (sjbq *SysJwtBlockQuery) Select(field string, fields ...string) *SysJwtBlockSelect

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 {
	IsDel bool `json:"is_del,omitempty"`
}

client.SysJwtBlock.Query().
	Select(sysjwtblock.FieldIsDel).
	Scan(ctx, &v)

func (*SysJwtBlockQuery) Unique

func (sjbq *SysJwtBlockQuery) Unique(unique bool) *SysJwtBlockQuery

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

Where adds a new predicate for the SysJwtBlockQuery builder.

type SysJwtBlockSelect

type SysJwtBlockSelect struct {
	*SysJwtBlockQuery
	// contains filtered or unexported fields
}

SysJwtBlockSelect is the builder for selecting fields of SysJwtBlock entities.

func (*SysJwtBlockSelect) Bool

func (sjbs *SysJwtBlockSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*SysJwtBlockSelect) BoolX

func (sjbs *SysJwtBlockSelect) BoolX(ctx context.Context) bool

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

func (*SysJwtBlockSelect) Bools

func (sjbs *SysJwtBlockSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*SysJwtBlockSelect) BoolsX

func (sjbs *SysJwtBlockSelect) BoolsX(ctx context.Context) []bool

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

func (*SysJwtBlockSelect) Float64

func (sjbs *SysJwtBlockSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*SysJwtBlockSelect) Float64X

func (sjbs *SysJwtBlockSelect) Float64X(ctx context.Context) float64

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

func (*SysJwtBlockSelect) Float64s

func (sjbs *SysJwtBlockSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*SysJwtBlockSelect) Float64sX

func (sjbs *SysJwtBlockSelect) Float64sX(ctx context.Context) []float64

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

func (*SysJwtBlockSelect) Int

func (sjbs *SysJwtBlockSelect) Int(ctx context.Context) (_ int, err error)

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

func (*SysJwtBlockSelect) IntX

func (sjbs *SysJwtBlockSelect) IntX(ctx context.Context) int

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

func (*SysJwtBlockSelect) Ints

func (sjbs *SysJwtBlockSelect) Ints(ctx context.Context) ([]int, error)

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

func (*SysJwtBlockSelect) IntsX

func (sjbs *SysJwtBlockSelect) IntsX(ctx context.Context) []int

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

func (*SysJwtBlockSelect) Scan

func (sjbs *SysJwtBlockSelect) Scan(ctx context.Context, v interface{}) error

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

func (*SysJwtBlockSelect) ScanX

func (sjbs *SysJwtBlockSelect) ScanX(ctx context.Context, v interface{})

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

func (*SysJwtBlockSelect) String

func (sjbs *SysJwtBlockSelect) String(ctx context.Context) (_ string, err error)

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

func (*SysJwtBlockSelect) StringX

func (sjbs *SysJwtBlockSelect) StringX(ctx context.Context) string

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

func (*SysJwtBlockSelect) Strings

func (sjbs *SysJwtBlockSelect) Strings(ctx context.Context) ([]string, error)

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

func (*SysJwtBlockSelect) StringsX

func (sjbs *SysJwtBlockSelect) StringsX(ctx context.Context) []string

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

type SysJwtBlockUpdate

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

SysJwtBlockUpdate is the builder for updating SysJwtBlock entities.

func (*SysJwtBlockUpdate) AddStatus

func (sjbu *SysJwtBlockUpdate) AddStatus(i int16) *SysJwtBlockUpdate

AddStatus adds i to the "status" field.

func (*SysJwtBlockUpdate) ClearDeletedAt

func (sjbu *SysJwtBlockUpdate) ClearDeletedAt() *SysJwtBlockUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysJwtBlockUpdate) Exec

func (sjbu *SysJwtBlockUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SysJwtBlockUpdate) ExecX

func (sjbu *SysJwtBlockUpdate) ExecX(ctx context.Context)

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

func (*SysJwtBlockUpdate) Mutation

func (sjbu *SysJwtBlockUpdate) Mutation() *SysJwtBlockMutation

Mutation returns the SysJwtBlockMutation object of the builder.

func (*SysJwtBlockUpdate) Save

func (sjbu *SysJwtBlockUpdate) Save(ctx context.Context) (int, error)

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

func (*SysJwtBlockUpdate) SaveX

func (sjbu *SysJwtBlockUpdate) SaveX(ctx context.Context) int

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

func (*SysJwtBlockUpdate) SetDeletedAt

func (sjbu *SysJwtBlockUpdate) SetDeletedAt(t time.Time) *SysJwtBlockUpdate

SetDeletedAt sets the "deleted_at" field.

func (*SysJwtBlockUpdate) SetInput

SetInput applies the change-set in the UpdateSysJwtBlockInput on the update builder.

func (*SysJwtBlockUpdate) SetIsDel

func (sjbu *SysJwtBlockUpdate) SetIsDel(b bool) *SysJwtBlockUpdate

SetIsDel sets the "is_del" field.

func (*SysJwtBlockUpdate) SetJwt

func (sjbu *SysJwtBlockUpdate) SetJwt(s string) *SysJwtBlockUpdate

SetJwt sets the "jwt" field.

func (*SysJwtBlockUpdate) SetMemo

func (sjbu *SysJwtBlockUpdate) SetMemo(s string) *SysJwtBlockUpdate

SetMemo sets the "memo" field.

func (*SysJwtBlockUpdate) SetNillableDeletedAt

func (sjbu *SysJwtBlockUpdate) SetNillableDeletedAt(t *time.Time) *SysJwtBlockUpdate

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

func (*SysJwtBlockUpdate) SetNillableIsDel

func (sjbu *SysJwtBlockUpdate) SetNillableIsDel(b *bool) *SysJwtBlockUpdate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysJwtBlockUpdate) SetNillableMemo

func (sjbu *SysJwtBlockUpdate) SetNillableMemo(s *string) *SysJwtBlockUpdate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysJwtBlockUpdate) SetNillableStatus

func (sjbu *SysJwtBlockUpdate) SetNillableStatus(i *int16) *SysJwtBlockUpdate

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

func (*SysJwtBlockUpdate) SetStatus

func (sjbu *SysJwtBlockUpdate) SetStatus(i int16) *SysJwtBlockUpdate

SetStatus sets the "status" field.

func (*SysJwtBlockUpdate) SetUpdatedAt

func (sjbu *SysJwtBlockUpdate) SetUpdatedAt(t time.Time) *SysJwtBlockUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SysJwtBlockUpdate) Where

Where adds a new predicate for the SysJwtBlockUpdate builder.

type SysJwtBlockUpdateOne

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

SysJwtBlockUpdateOne is the builder for updating a single SysJwtBlock entity.

func (*SysJwtBlockUpdateOne) AddStatus

func (sjbuo *SysJwtBlockUpdateOne) AddStatus(i int16) *SysJwtBlockUpdateOne

AddStatus adds i to the "status" field.

func (*SysJwtBlockUpdateOne) ClearDeletedAt

func (sjbuo *SysJwtBlockUpdateOne) ClearDeletedAt() *SysJwtBlockUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysJwtBlockUpdateOne) Exec

func (sjbuo *SysJwtBlockUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SysJwtBlockUpdateOne) ExecX

func (sjbuo *SysJwtBlockUpdateOne) ExecX(ctx context.Context)

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

func (*SysJwtBlockUpdateOne) Mutation

func (sjbuo *SysJwtBlockUpdateOne) Mutation() *SysJwtBlockMutation

Mutation returns the SysJwtBlockMutation object of the builder.

func (*SysJwtBlockUpdateOne) Save

func (sjbuo *SysJwtBlockUpdateOne) Save(ctx context.Context) (*SysJwtBlock, error)

Save executes the query and returns the updated SysJwtBlock entity.

func (*SysJwtBlockUpdateOne) SaveX

func (sjbuo *SysJwtBlockUpdateOne) SaveX(ctx context.Context) *SysJwtBlock

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

func (*SysJwtBlockUpdateOne) Select

func (sjbuo *SysJwtBlockUpdateOne) Select(field string, fields ...string) *SysJwtBlockUpdateOne

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

func (*SysJwtBlockUpdateOne) SetDeletedAt

func (sjbuo *SysJwtBlockUpdateOne) SetDeletedAt(t time.Time) *SysJwtBlockUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*SysJwtBlockUpdateOne) SetInput

SetInput applies the change-set in the UpdateSysJwtBlockInput on the update-one builder.

func (*SysJwtBlockUpdateOne) SetIsDel

func (sjbuo *SysJwtBlockUpdateOne) SetIsDel(b bool) *SysJwtBlockUpdateOne

SetIsDel sets the "is_del" field.

func (*SysJwtBlockUpdateOne) SetJwt

SetJwt sets the "jwt" field.

func (*SysJwtBlockUpdateOne) SetMemo

SetMemo sets the "memo" field.

func (*SysJwtBlockUpdateOne) SetNillableDeletedAt

func (sjbuo *SysJwtBlockUpdateOne) SetNillableDeletedAt(t *time.Time) *SysJwtBlockUpdateOne

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

func (*SysJwtBlockUpdateOne) SetNillableIsDel

func (sjbuo *SysJwtBlockUpdateOne) SetNillableIsDel(b *bool) *SysJwtBlockUpdateOne

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysJwtBlockUpdateOne) SetNillableMemo

func (sjbuo *SysJwtBlockUpdateOne) SetNillableMemo(s *string) *SysJwtBlockUpdateOne

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysJwtBlockUpdateOne) SetNillableStatus

func (sjbuo *SysJwtBlockUpdateOne) SetNillableStatus(i *int16) *SysJwtBlockUpdateOne

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

func (*SysJwtBlockUpdateOne) SetStatus

func (sjbuo *SysJwtBlockUpdateOne) SetStatus(i int16) *SysJwtBlockUpdateOne

SetStatus sets the "status" field.

func (*SysJwtBlockUpdateOne) SetUpdatedAt

func (sjbuo *SysJwtBlockUpdateOne) SetUpdatedAt(t time.Time) *SysJwtBlockUpdateOne

SetUpdatedAt sets the "updated_at" field.

type SysJwtBlocks

type SysJwtBlocks []*SysJwtBlock

SysJwtBlocks is a parsable slice of SysJwtBlock.

type SysLogging

type SysLogging struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// IsDel holds the value of the "is_del" field.
	// 是否删除
	IsDel bool `json:"is_del,omitempty"`
	// Memo holds the value of the "memo" field.
	// 备注
	Memo string `json:"memo,omitempty"`
	// Level holds the value of the "level" field.
	// 日志级别
	Level string `json:"level,omitempty"`
	// TraceID holds the value of the "trace_id" field.
	// 跟踪ID
	TraceID string `json:"trace_id,omitempty"`
	// UserID holds the value of the "user_id" field.
	// 用户ID
	UserID string `json:"user_id,omitempty"`
	// Tag holds the value of the "tag" field.
	// Tag
	Tag string `json:"tag,omitempty"`
	// Version holds the value of the "version" field.
	// 版本号
	Version string `json:"version,omitempty"`
	// Message holds the value of the "message" field.
	// 消息
	Message string `json:"message,omitempty"`
	// Data holds the value of the "data" field.
	// 日志数据(json string)
	Data *string `json:"data,omitempty"`
	// ErrorStack holds the value of the "error_stack" field.
	// 日志数据(json string)
	ErrorStack string `json:"error_stack,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	// 创建时间,由程序自动生成
	CreatedAt time.Time `json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

SysLogging is the model entity for the SysLogging schema.

func (*SysLogging) String

func (sl *SysLogging) String() string

String implements the fmt.Stringer.

func (*SysLogging) Unwrap

func (sl *SysLogging) Unwrap() *SysLogging

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

func (sl *SysLogging) Update() *SysLoggingUpdateOne

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

type SysLoggingClient

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

SysLoggingClient is a client for the SysLogging schema.

func NewSysLoggingClient

func NewSysLoggingClient(c config) *SysLoggingClient

NewSysLoggingClient returns a client for the SysLogging from the given config.

func (*SysLoggingClient) Create

func (c *SysLoggingClient) Create() *SysLoggingCreate

Create returns a create builder for SysLogging.

func (*SysLoggingClient) CreateBulk

func (c *SysLoggingClient) CreateBulk(builders ...*SysLoggingCreate) *SysLoggingCreateBulk

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

func (*SysLoggingClient) Delete

func (c *SysLoggingClient) Delete() *SysLoggingDelete

Delete returns a delete builder for SysLogging.

func (*SysLoggingClient) DeleteOne

func (c *SysLoggingClient) DeleteOne(sl *SysLogging) *SysLoggingDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SysLoggingClient) DeleteOneID

func (c *SysLoggingClient) DeleteOneID(id string) *SysLoggingDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SysLoggingClient) Get

func (c *SysLoggingClient) Get(ctx context.Context, id string) (*SysLogging, error)

Get returns a SysLogging entity by its id.

func (*SysLoggingClient) GetX

func (c *SysLoggingClient) GetX(ctx context.Context, id string) *SysLogging

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

func (*SysLoggingClient) Hooks

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

Hooks returns the client hooks.

func (*SysLoggingClient) Query

func (c *SysLoggingClient) Query() *SysLoggingQuery

Query returns a query builder for SysLogging.

func (*SysLoggingClient) Update

func (c *SysLoggingClient) Update() *SysLoggingUpdate

Update returns an update builder for SysLogging.

func (*SysLoggingClient) UpdateOne

func (c *SysLoggingClient) UpdateOne(sl *SysLogging) *SysLoggingUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SysLoggingClient) UpdateOneID

func (c *SysLoggingClient) UpdateOneID(id string) *SysLoggingUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SysLoggingClient) Use

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

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

type SysLoggingCreate

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

SysLoggingCreate is the builder for creating a SysLogging entity.

func (*SysLoggingCreate) Mutation

func (slc *SysLoggingCreate) Mutation() *SysLoggingMutation

Mutation returns the SysLoggingMutation object of the builder.

func (*SysLoggingCreate) Save

func (slc *SysLoggingCreate) Save(ctx context.Context) (*SysLogging, error)

Save creates the SysLogging in the database.

func (*SysLoggingCreate) SaveX

func (slc *SysLoggingCreate) SaveX(ctx context.Context) *SysLogging

SaveX calls Save and panics if Save returns an error.

func (*SysLoggingCreate) SetCreatedAt

func (slc *SysLoggingCreate) SetCreatedAt(t time.Time) *SysLoggingCreate

SetCreatedAt sets the "created_at" field.

func (*SysLoggingCreate) SetData

func (slc *SysLoggingCreate) SetData(s string) *SysLoggingCreate

SetData sets the "data" field.

func (*SysLoggingCreate) SetErrorStack

func (slc *SysLoggingCreate) SetErrorStack(s string) *SysLoggingCreate

SetErrorStack sets the "error_stack" field.

func (*SysLoggingCreate) SetID

func (slc *SysLoggingCreate) SetID(s string) *SysLoggingCreate

SetID sets the "id" field.

func (*SysLoggingCreate) SetInput

SetInput applies the change-set in the CreateSysLoggingInput on the create builder.

func (*SysLoggingCreate) SetIsDel

func (slc *SysLoggingCreate) SetIsDel(b bool) *SysLoggingCreate

SetIsDel sets the "is_del" field.

func (*SysLoggingCreate) SetLevel

func (slc *SysLoggingCreate) SetLevel(s string) *SysLoggingCreate

SetLevel sets the "level" field.

func (*SysLoggingCreate) SetMemo

func (slc *SysLoggingCreate) SetMemo(s string) *SysLoggingCreate

SetMemo sets the "memo" field.

func (*SysLoggingCreate) SetMessage

func (slc *SysLoggingCreate) SetMessage(s string) *SysLoggingCreate

SetMessage sets the "message" field.

func (*SysLoggingCreate) SetNillableCreatedAt

func (slc *SysLoggingCreate) SetNillableCreatedAt(t *time.Time) *SysLoggingCreate

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

func (*SysLoggingCreate) SetNillableData

func (slc *SysLoggingCreate) SetNillableData(s *string) *SysLoggingCreate

SetNillableData sets the "data" field if the given value is not nil.

func (*SysLoggingCreate) SetNillableID

func (slc *SysLoggingCreate) SetNillableID(s *string) *SysLoggingCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SysLoggingCreate) SetNillableIsDel

func (slc *SysLoggingCreate) SetNillableIsDel(b *bool) *SysLoggingCreate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysLoggingCreate) SetNillableMemo

func (slc *SysLoggingCreate) SetNillableMemo(s *string) *SysLoggingCreate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysLoggingCreate) SetTag

func (slc *SysLoggingCreate) SetTag(s string) *SysLoggingCreate

SetTag sets the "tag" field.

func (*SysLoggingCreate) SetTraceID

func (slc *SysLoggingCreate) SetTraceID(s string) *SysLoggingCreate

SetTraceID sets the "trace_id" field.

func (*SysLoggingCreate) SetUserID

func (slc *SysLoggingCreate) SetUserID(s string) *SysLoggingCreate

SetUserID sets the "user_id" field.

func (*SysLoggingCreate) SetVersion

func (slc *SysLoggingCreate) SetVersion(s string) *SysLoggingCreate

SetVersion sets the "version" field.

type SysLoggingCreateBulk

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

SysLoggingCreateBulk is the builder for creating many SysLogging entities in bulk.

func (*SysLoggingCreateBulk) Save

func (slcb *SysLoggingCreateBulk) Save(ctx context.Context) ([]*SysLogging, error)

Save creates the SysLogging entities in the database.

func (*SysLoggingCreateBulk) SaveX

func (slcb *SysLoggingCreateBulk) SaveX(ctx context.Context) []*SysLogging

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

type SysLoggingDelete

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

SysLoggingDelete is the builder for deleting a SysLogging entity.

func (*SysLoggingDelete) Exec

func (sld *SysLoggingDelete) Exec(ctx context.Context) (int, error)

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

func (*SysLoggingDelete) ExecX

func (sld *SysLoggingDelete) ExecX(ctx context.Context) int

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

func (*SysLoggingDelete) Where

Where adds a new predicate to the SysLoggingDelete builder.

type SysLoggingDeleteOne

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

SysLoggingDeleteOne is the builder for deleting a single SysLogging entity.

func (*SysLoggingDeleteOne) Exec

func (sldo *SysLoggingDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SysLoggingDeleteOne) ExecX

func (sldo *SysLoggingDeleteOne) ExecX(ctx context.Context)

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

type SysLoggingGroupBy

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

SysLoggingGroupBy is the group-by builder for SysLogging entities.

func (*SysLoggingGroupBy) Aggregate

func (slgb *SysLoggingGroupBy) Aggregate(fns ...AggregateFunc) *SysLoggingGroupBy

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

func (*SysLoggingGroupBy) Bool

func (slgb *SysLoggingGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysLoggingGroupBy) BoolX

func (slgb *SysLoggingGroupBy) BoolX(ctx context.Context) bool

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

func (*SysLoggingGroupBy) Bools

func (slgb *SysLoggingGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SysLoggingGroupBy) BoolsX

func (slgb *SysLoggingGroupBy) BoolsX(ctx context.Context) []bool

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

func (*SysLoggingGroupBy) Float64

func (slgb *SysLoggingGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysLoggingGroupBy) Float64X

func (slgb *SysLoggingGroupBy) Float64X(ctx context.Context) float64

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

func (*SysLoggingGroupBy) Float64s

func (slgb *SysLoggingGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SysLoggingGroupBy) Float64sX

func (slgb *SysLoggingGroupBy) Float64sX(ctx context.Context) []float64

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

func (*SysLoggingGroupBy) Int

func (slgb *SysLoggingGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysLoggingGroupBy) IntX

func (slgb *SysLoggingGroupBy) IntX(ctx context.Context) int

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

func (*SysLoggingGroupBy) Ints

func (slgb *SysLoggingGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SysLoggingGroupBy) IntsX

func (slgb *SysLoggingGroupBy) IntsX(ctx context.Context) []int

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

func (*SysLoggingGroupBy) Scan

func (slgb *SysLoggingGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SysLoggingGroupBy) ScanX

func (slgb *SysLoggingGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*SysLoggingGroupBy) String

func (slgb *SysLoggingGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysLoggingGroupBy) StringX

func (slgb *SysLoggingGroupBy) StringX(ctx context.Context) string

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

func (*SysLoggingGroupBy) Strings

func (slgb *SysLoggingGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SysLoggingGroupBy) StringsX

func (slgb *SysLoggingGroupBy) StringsX(ctx context.Context) []string

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

type SysLoggingMutation

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

SysLoggingMutation represents an operation that mutates the SysLogging nodes in the graph.

func (*SysLoggingMutation) AddField

func (m *SysLoggingMutation) 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 (*SysLoggingMutation) AddedEdges

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

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

func (*SysLoggingMutation) AddedField

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

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

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

func (*SysLoggingMutation) AddedIDs

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

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

func (*SysLoggingMutation) ClearData

func (m *SysLoggingMutation) ClearData()

ClearData clears the value of the "data" field.

func (*SysLoggingMutation) ClearEdge

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

func (m *SysLoggingMutation) 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 (*SysLoggingMutation) ClearedEdges

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

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

func (*SysLoggingMutation) ClearedFields

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

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

func (SysLoggingMutation) Client

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

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

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

func (*SysLoggingMutation) Data

func (m *SysLoggingMutation) Data() (r string, exists bool)

Data returns the value of the "data" field in the mutation.

func (*SysLoggingMutation) DataCleared

func (m *SysLoggingMutation) DataCleared() bool

DataCleared returns if the "data" field was cleared in this mutation.

func (*SysLoggingMutation) EdgeCleared

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

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

func (*SysLoggingMutation) ErrorStack

func (m *SysLoggingMutation) ErrorStack() (r string, exists bool)

ErrorStack returns the value of the "error_stack" field in the mutation.

func (*SysLoggingMutation) Field

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

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

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

func (*SysLoggingMutation) Fields

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

func (m *SysLoggingMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*SysLoggingMutation) IsDel

func (m *SysLoggingMutation) IsDel() (r bool, exists bool)

IsDel returns the value of the "is_del" field in the mutation.

func (*SysLoggingMutation) Level

func (m *SysLoggingMutation) Level() (r string, exists bool)

Level returns the value of the "level" field in the mutation.

func (*SysLoggingMutation) Memo

func (m *SysLoggingMutation) Memo() (r string, exists bool)

Memo returns the value of the "memo" field in the mutation.

func (*SysLoggingMutation) Message

func (m *SysLoggingMutation) Message() (r string, exists bool)

Message returns the value of the "message" field in the mutation.

func (*SysLoggingMutation) OldCreatedAt

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

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

func (*SysLoggingMutation) OldData

func (m *SysLoggingMutation) OldData(ctx context.Context) (v *string, err error)

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

func (*SysLoggingMutation) OldErrorStack

func (m *SysLoggingMutation) OldErrorStack(ctx context.Context) (v string, err error)

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

func (*SysLoggingMutation) OldField

func (m *SysLoggingMutation) 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 (*SysLoggingMutation) OldIsDel

func (m *SysLoggingMutation) OldIsDel(ctx context.Context) (v bool, err error)

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

func (*SysLoggingMutation) OldLevel

func (m *SysLoggingMutation) OldLevel(ctx context.Context) (v string, err error)

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

func (*SysLoggingMutation) OldMemo

func (m *SysLoggingMutation) OldMemo(ctx context.Context) (v string, err error)

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

func (*SysLoggingMutation) OldMessage

func (m *SysLoggingMutation) OldMessage(ctx context.Context) (v string, err error)

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

func (*SysLoggingMutation) OldTag

func (m *SysLoggingMutation) OldTag(ctx context.Context) (v string, err error)

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

func (*SysLoggingMutation) OldTraceID

func (m *SysLoggingMutation) OldTraceID(ctx context.Context) (v string, err error)

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

func (*SysLoggingMutation) OldUserID

func (m *SysLoggingMutation) OldUserID(ctx context.Context) (v string, err error)

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

func (*SysLoggingMutation) OldVersion

func (m *SysLoggingMutation) OldVersion(ctx context.Context) (v string, err error)

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

func (*SysLoggingMutation) Op

func (m *SysLoggingMutation) Op() Op

Op returns the operation name.

func (*SysLoggingMutation) RemovedEdges

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

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

func (*SysLoggingMutation) RemovedIDs

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

func (m *SysLoggingMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SysLoggingMutation) ResetData

func (m *SysLoggingMutation) ResetData()

ResetData resets all changes to the "data" field.

func (*SysLoggingMutation) ResetEdge

func (m *SysLoggingMutation) 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 (*SysLoggingMutation) ResetErrorStack

func (m *SysLoggingMutation) ResetErrorStack()

ResetErrorStack resets all changes to the "error_stack" field.

func (*SysLoggingMutation) ResetField

func (m *SysLoggingMutation) 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 (*SysLoggingMutation) ResetIsDel

func (m *SysLoggingMutation) ResetIsDel()

ResetIsDel resets all changes to the "is_del" field.

func (*SysLoggingMutation) ResetLevel

func (m *SysLoggingMutation) ResetLevel()

ResetLevel resets all changes to the "level" field.

func (*SysLoggingMutation) ResetMemo

func (m *SysLoggingMutation) ResetMemo()

ResetMemo resets all changes to the "memo" field.

func (*SysLoggingMutation) ResetMessage

func (m *SysLoggingMutation) ResetMessage()

ResetMessage resets all changes to the "message" field.

func (*SysLoggingMutation) ResetTag

func (m *SysLoggingMutation) ResetTag()

ResetTag resets all changes to the "tag" field.

func (*SysLoggingMutation) ResetTraceID

func (m *SysLoggingMutation) ResetTraceID()

ResetTraceID resets all changes to the "trace_id" field.

func (*SysLoggingMutation) ResetUserID

func (m *SysLoggingMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*SysLoggingMutation) ResetVersion

func (m *SysLoggingMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*SysLoggingMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*SysLoggingMutation) SetData

func (m *SysLoggingMutation) SetData(s string)

SetData sets the "data" field.

func (*SysLoggingMutation) SetErrorStack

func (m *SysLoggingMutation) SetErrorStack(s string)

SetErrorStack sets the "error_stack" field.

func (*SysLoggingMutation) SetField

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

func (m *SysLoggingMutation) SetID(id string)

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

func (*SysLoggingMutation) SetIsDel

func (m *SysLoggingMutation) SetIsDel(b bool)

SetIsDel sets the "is_del" field.

func (*SysLoggingMutation) SetLevel

func (m *SysLoggingMutation) SetLevel(s string)

SetLevel sets the "level" field.

func (*SysLoggingMutation) SetMemo

func (m *SysLoggingMutation) SetMemo(s string)

SetMemo sets the "memo" field.

func (*SysLoggingMutation) SetMessage

func (m *SysLoggingMutation) SetMessage(s string)

SetMessage sets the "message" field.

func (*SysLoggingMutation) SetTag

func (m *SysLoggingMutation) SetTag(s string)

SetTag sets the "tag" field.

func (*SysLoggingMutation) SetTraceID

func (m *SysLoggingMutation) SetTraceID(s string)

SetTraceID sets the "trace_id" field.

func (*SysLoggingMutation) SetUserID

func (m *SysLoggingMutation) SetUserID(s string)

SetUserID sets the "user_id" field.

func (*SysLoggingMutation) SetVersion

func (m *SysLoggingMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (*SysLoggingMutation) Tag

func (m *SysLoggingMutation) Tag() (r string, exists bool)

Tag returns the value of the "tag" field in the mutation.

func (*SysLoggingMutation) TraceID

func (m *SysLoggingMutation) TraceID() (r string, exists bool)

TraceID returns the value of the "trace_id" field in the mutation.

func (SysLoggingMutation) Tx

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

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

func (*SysLoggingMutation) Type

func (m *SysLoggingMutation) Type() string

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

func (*SysLoggingMutation) UserID

func (m *SysLoggingMutation) UserID() (r string, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*SysLoggingMutation) Version

func (m *SysLoggingMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

type SysLoggingQuery

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

SysLoggingQuery is the builder for querying SysLogging entities.

func (*SysLoggingQuery) All

func (slq *SysLoggingQuery) All(ctx context.Context) ([]*SysLogging, error)

All executes the query and returns a list of SysLoggings.

func (*SysLoggingQuery) AllX

func (slq *SysLoggingQuery) AllX(ctx context.Context) []*SysLogging

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

func (*SysLoggingQuery) Clone

func (slq *SysLoggingQuery) Clone() *SysLoggingQuery

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

func (*SysLoggingQuery) Count

func (slq *SysLoggingQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SysLoggingQuery) CountX

func (slq *SysLoggingQuery) CountX(ctx context.Context) int

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

func (*SysLoggingQuery) Exist

func (slq *SysLoggingQuery) Exist(ctx context.Context) (bool, error)

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

func (*SysLoggingQuery) ExistX

func (slq *SysLoggingQuery) ExistX(ctx context.Context) bool

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

func (*SysLoggingQuery) First

func (slq *SysLoggingQuery) First(ctx context.Context) (*SysLogging, error)

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

func (*SysLoggingQuery) FirstID

func (slq *SysLoggingQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*SysLoggingQuery) FirstIDX

func (slq *SysLoggingQuery) FirstIDX(ctx context.Context) string

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

func (*SysLoggingQuery) FirstX

func (slq *SysLoggingQuery) FirstX(ctx context.Context) *SysLogging

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

func (*SysLoggingQuery) GroupBy

func (slq *SysLoggingQuery) GroupBy(field string, fields ...string) *SysLoggingGroupBy

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 {
	IsDel bool `json:"is_del,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SysLogging.Query().
	GroupBy(syslogging.FieldIsDel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SysLoggingQuery) IDs

func (slq *SysLoggingQuery) IDs(ctx context.Context) ([]string, error)

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

func (*SysLoggingQuery) IDsX

func (slq *SysLoggingQuery) IDsX(ctx context.Context) []string

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

func (*SysLoggingQuery) Limit

func (slq *SysLoggingQuery) Limit(limit int) *SysLoggingQuery

Limit adds a limit step to the query.

func (*SysLoggingQuery) Offset

func (slq *SysLoggingQuery) Offset(offset int) *SysLoggingQuery

Offset adds an offset step to the query.

func (*SysLoggingQuery) Only

func (slq *SysLoggingQuery) Only(ctx context.Context) (*SysLogging, error)

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

func (*SysLoggingQuery) OnlyID

func (slq *SysLoggingQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*SysLoggingQuery) OnlyIDX

func (slq *SysLoggingQuery) OnlyIDX(ctx context.Context) string

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

func (*SysLoggingQuery) OnlyX

func (slq *SysLoggingQuery) OnlyX(ctx context.Context) *SysLogging

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

func (*SysLoggingQuery) Order

func (slq *SysLoggingQuery) Order(o ...OrderFunc) *SysLoggingQuery

Order adds an order step to the query.

func (*SysLoggingQuery) Select

func (slq *SysLoggingQuery) Select(field string, fields ...string) *SysLoggingSelect

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 {
	IsDel bool `json:"is_del,omitempty"`
}

client.SysLogging.Query().
	Select(syslogging.FieldIsDel).
	Scan(ctx, &v)

func (*SysLoggingQuery) Unique

func (slq *SysLoggingQuery) Unique(unique bool) *SysLoggingQuery

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

Where adds a new predicate for the SysLoggingQuery builder.

type SysLoggingSelect

type SysLoggingSelect struct {
	*SysLoggingQuery
	// contains filtered or unexported fields
}

SysLoggingSelect is the builder for selecting fields of SysLogging entities.

func (*SysLoggingSelect) Bool

func (sls *SysLoggingSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*SysLoggingSelect) BoolX

func (sls *SysLoggingSelect) BoolX(ctx context.Context) bool

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

func (*SysLoggingSelect) Bools

func (sls *SysLoggingSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*SysLoggingSelect) BoolsX

func (sls *SysLoggingSelect) BoolsX(ctx context.Context) []bool

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

func (*SysLoggingSelect) Float64

func (sls *SysLoggingSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*SysLoggingSelect) Float64X

func (sls *SysLoggingSelect) Float64X(ctx context.Context) float64

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

func (*SysLoggingSelect) Float64s

func (sls *SysLoggingSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*SysLoggingSelect) Float64sX

func (sls *SysLoggingSelect) Float64sX(ctx context.Context) []float64

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

func (*SysLoggingSelect) Int

func (sls *SysLoggingSelect) Int(ctx context.Context) (_ int, err error)

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

func (*SysLoggingSelect) IntX

func (sls *SysLoggingSelect) IntX(ctx context.Context) int

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

func (*SysLoggingSelect) Ints

func (sls *SysLoggingSelect) Ints(ctx context.Context) ([]int, error)

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

func (*SysLoggingSelect) IntsX

func (sls *SysLoggingSelect) IntsX(ctx context.Context) []int

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

func (*SysLoggingSelect) Scan

func (sls *SysLoggingSelect) Scan(ctx context.Context, v interface{}) error

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

func (*SysLoggingSelect) ScanX

func (sls *SysLoggingSelect) ScanX(ctx context.Context, v interface{})

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

func (*SysLoggingSelect) String

func (sls *SysLoggingSelect) String(ctx context.Context) (_ string, err error)

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

func (*SysLoggingSelect) StringX

func (sls *SysLoggingSelect) StringX(ctx context.Context) string

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

func (*SysLoggingSelect) Strings

func (sls *SysLoggingSelect) Strings(ctx context.Context) ([]string, error)

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

func (*SysLoggingSelect) StringsX

func (sls *SysLoggingSelect) StringsX(ctx context.Context) []string

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

type SysLoggingUpdate

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

SysLoggingUpdate is the builder for updating SysLogging entities.

func (*SysLoggingUpdate) Exec

func (slu *SysLoggingUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SysLoggingUpdate) ExecX

func (slu *SysLoggingUpdate) ExecX(ctx context.Context)

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

func (*SysLoggingUpdate) Mutation

func (slu *SysLoggingUpdate) Mutation() *SysLoggingMutation

Mutation returns the SysLoggingMutation object of the builder.

func (*SysLoggingUpdate) Save

func (slu *SysLoggingUpdate) Save(ctx context.Context) (int, error)

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

func (*SysLoggingUpdate) SaveX

func (slu *SysLoggingUpdate) SaveX(ctx context.Context) int

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

func (*SysLoggingUpdate) SetErrorStack

func (slu *SysLoggingUpdate) SetErrorStack(s string) *SysLoggingUpdate

SetErrorStack sets the "error_stack" field.

func (*SysLoggingUpdate) SetInput

SetInput applies the change-set in the UpdateSysLoggingInput on the update builder.

func (*SysLoggingUpdate) SetIsDel

func (slu *SysLoggingUpdate) SetIsDel(b bool) *SysLoggingUpdate

SetIsDel sets the "is_del" field.

func (*SysLoggingUpdate) SetLevel

func (slu *SysLoggingUpdate) SetLevel(s string) *SysLoggingUpdate

SetLevel sets the "level" field.

func (*SysLoggingUpdate) SetMemo

func (slu *SysLoggingUpdate) SetMemo(s string) *SysLoggingUpdate

SetMemo sets the "memo" field.

func (*SysLoggingUpdate) SetMessage

func (slu *SysLoggingUpdate) SetMessage(s string) *SysLoggingUpdate

SetMessage sets the "message" field.

func (*SysLoggingUpdate) SetNillableIsDel

func (slu *SysLoggingUpdate) SetNillableIsDel(b *bool) *SysLoggingUpdate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysLoggingUpdate) SetNillableMemo

func (slu *SysLoggingUpdate) SetNillableMemo(s *string) *SysLoggingUpdate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysLoggingUpdate) SetTag

func (slu *SysLoggingUpdate) SetTag(s string) *SysLoggingUpdate

SetTag sets the "tag" field.

func (*SysLoggingUpdate) SetTraceID

func (slu *SysLoggingUpdate) SetTraceID(s string) *SysLoggingUpdate

SetTraceID sets the "trace_id" field.

func (*SysLoggingUpdate) SetUserID

func (slu *SysLoggingUpdate) SetUserID(s string) *SysLoggingUpdate

SetUserID sets the "user_id" field.

func (*SysLoggingUpdate) SetVersion

func (slu *SysLoggingUpdate) SetVersion(s string) *SysLoggingUpdate

SetVersion sets the "version" field.

func (*SysLoggingUpdate) Where

Where adds a new predicate for the SysLoggingUpdate builder.

type SysLoggingUpdateOne

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

SysLoggingUpdateOne is the builder for updating a single SysLogging entity.

func (*SysLoggingUpdateOne) Exec

func (sluo *SysLoggingUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SysLoggingUpdateOne) ExecX

func (sluo *SysLoggingUpdateOne) ExecX(ctx context.Context)

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

func (*SysLoggingUpdateOne) Mutation

func (sluo *SysLoggingUpdateOne) Mutation() *SysLoggingMutation

Mutation returns the SysLoggingMutation object of the builder.

func (*SysLoggingUpdateOne) Save

func (sluo *SysLoggingUpdateOne) Save(ctx context.Context) (*SysLogging, error)

Save executes the query and returns the updated SysLogging entity.

func (*SysLoggingUpdateOne) SaveX

func (sluo *SysLoggingUpdateOne) SaveX(ctx context.Context) *SysLogging

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

func (*SysLoggingUpdateOne) Select

func (sluo *SysLoggingUpdateOne) Select(field string, fields ...string) *SysLoggingUpdateOne

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

func (*SysLoggingUpdateOne) SetErrorStack

func (sluo *SysLoggingUpdateOne) SetErrorStack(s string) *SysLoggingUpdateOne

SetErrorStack sets the "error_stack" field.

func (*SysLoggingUpdateOne) SetInput

SetInput applies the change-set in the UpdateSysLoggingInput on the update-one builder.

func (*SysLoggingUpdateOne) SetIsDel

func (sluo *SysLoggingUpdateOne) SetIsDel(b bool) *SysLoggingUpdateOne

SetIsDel sets the "is_del" field.

func (*SysLoggingUpdateOne) SetLevel

func (sluo *SysLoggingUpdateOne) SetLevel(s string) *SysLoggingUpdateOne

SetLevel sets the "level" field.

func (*SysLoggingUpdateOne) SetMemo

SetMemo sets the "memo" field.

func (*SysLoggingUpdateOne) SetMessage

func (sluo *SysLoggingUpdateOne) SetMessage(s string) *SysLoggingUpdateOne

SetMessage sets the "message" field.

func (*SysLoggingUpdateOne) SetNillableIsDel

func (sluo *SysLoggingUpdateOne) SetNillableIsDel(b *bool) *SysLoggingUpdateOne

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysLoggingUpdateOne) SetNillableMemo

func (sluo *SysLoggingUpdateOne) SetNillableMemo(s *string) *SysLoggingUpdateOne

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysLoggingUpdateOne) SetTag

SetTag sets the "tag" field.

func (*SysLoggingUpdateOne) SetTraceID

func (sluo *SysLoggingUpdateOne) SetTraceID(s string) *SysLoggingUpdateOne

SetTraceID sets the "trace_id" field.

func (*SysLoggingUpdateOne) SetUserID

func (sluo *SysLoggingUpdateOne) SetUserID(s string) *SysLoggingUpdateOne

SetUserID sets the "user_id" field.

func (*SysLoggingUpdateOne) SetVersion

func (sluo *SysLoggingUpdateOne) SetVersion(s string) *SysLoggingUpdateOne

SetVersion sets the "version" field.

type SysLoggings

type SysLoggings []*SysLogging

SysLoggings is a parsable slice of SysLogging.

type SysMenu

type SysMenu struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// IsDel holds the value of the "is_del" field.
	// 是否删除
	IsDel bool `json:"is_del,omitempty"`
	// Memo holds the value of the "memo" field.
	// 备注
	Memo string `json:"memo,omitempty"`
	// Sort holds the value of the "sort" field.
	// 排序, 在数据库里的排序
	Sort int32 `json:"sort,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	// 创建时间,由程序自动生成
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	// 更新时间,由程序自动生成
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	// 删除时间,
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// Status holds the value of the "status" field.
	// 状态,
	Status int16 `json:"status,omitempty"`
	// Name holds the value of the "name" field.
	// 菜单名称
	Name string `json:"name,omitempty"`
	// Icon holds the value of the "icon" field.
	// 菜单图标
	Icon string `json:"icon,omitempty"`
	// Router holds the value of the "router" field.
	// 前端路由
	Router string `json:"router,omitempty"`
	// IsShow holds the value of the "is_show" field.
	// 是否显示
	IsShow bool `json:"is_show,omitempty"`
	// ParentID holds the value of the "parent_id" field.
	// 父级id
	ParentID *string `json:"parent_id,omitempty"`
	// ParentPath holds the value of the "parent_path" field.
	// 父级路径: 1/2/3
	ParentPath *string `json:"parent_path,omitempty"`
	// contains filtered or unexported fields
}

SysMenu is the model entity for the SysMenu schema.

func (*SysMenu) String

func (sm *SysMenu) String() string

String implements the fmt.Stringer.

func (*SysMenu) Unwrap

func (sm *SysMenu) Unwrap() *SysMenu

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

func (sm *SysMenu) Update() *SysMenuUpdateOne

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

type SysMenuAction

type SysMenuAction struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// IsDel holds the value of the "is_del" field.
	// 是否删除
	IsDel bool `json:"is_del,omitempty"`
	// Sort holds the value of the "sort" field.
	// 排序, 在数据库里的排序
	Sort int32 `json:"sort,omitempty"`
	// Status holds the value of the "status" field.
	// 状态,
	Status int16 `json:"status,omitempty"`
	// Memo holds the value of the "memo" field.
	// 备注
	Memo string `json:"memo,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	// 创建时间,由程序自动生成
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	// 更新时间,由程序自动生成
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	// 删除时间,
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// MenuID holds the value of the "menu_id" field.
	// 菜单ID
	MenuID string `json:"menu_id,omitempty"`
	// Code holds the value of the "code" field.
	// 动作编号
	Code string `json:"code,omitempty"`
	// Name holds the value of the "name" field.
	// 动作名称
	Name string `json:"name,omitempty"`
	// contains filtered or unexported fields
}

SysMenuAction is the model entity for the SysMenuAction schema.

func (*SysMenuAction) String

func (sma *SysMenuAction) String() string

String implements the fmt.Stringer.

func (*SysMenuAction) Unwrap

func (sma *SysMenuAction) Unwrap() *SysMenuAction

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

func (sma *SysMenuAction) Update() *SysMenuActionUpdateOne

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

type SysMenuActionClient

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

SysMenuActionClient is a client for the SysMenuAction schema.

func NewSysMenuActionClient

func NewSysMenuActionClient(c config) *SysMenuActionClient

NewSysMenuActionClient returns a client for the SysMenuAction from the given config.

func (*SysMenuActionClient) Create

Create returns a create builder for SysMenuAction.

func (*SysMenuActionClient) CreateBulk

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

func (*SysMenuActionClient) Delete

Delete returns a delete builder for SysMenuAction.

func (*SysMenuActionClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SysMenuActionClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*SysMenuActionClient) Get

Get returns a SysMenuAction entity by its id.

func (*SysMenuActionClient) GetX

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

func (*SysMenuActionClient) Hooks

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

Hooks returns the client hooks.

func (*SysMenuActionClient) Query

Query returns a query builder for SysMenuAction.

func (*SysMenuActionClient) Update

Update returns an update builder for SysMenuAction.

func (*SysMenuActionClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SysMenuActionClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*SysMenuActionClient) Use

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

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

type SysMenuActionCreate

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

SysMenuActionCreate is the builder for creating a SysMenuAction entity.

func (*SysMenuActionCreate) Mutation

func (smac *SysMenuActionCreate) Mutation() *SysMenuActionMutation

Mutation returns the SysMenuActionMutation object of the builder.

func (*SysMenuActionCreate) Save

Save creates the SysMenuAction in the database.

func (*SysMenuActionCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*SysMenuActionCreate) SetCode

SetCode sets the "code" field.

func (*SysMenuActionCreate) SetCreatedAt

func (smac *SysMenuActionCreate) SetCreatedAt(t time.Time) *SysMenuActionCreate

SetCreatedAt sets the "created_at" field.

func (*SysMenuActionCreate) SetDeletedAt

func (smac *SysMenuActionCreate) SetDeletedAt(t time.Time) *SysMenuActionCreate

SetDeletedAt sets the "deleted_at" field.

func (*SysMenuActionCreate) SetID

SetID sets the "id" field.

func (*SysMenuActionCreate) SetInput

SetInput applies the change-set in the CreateSysMenuActionInput on the create builder.

func (*SysMenuActionCreate) SetIsDel

func (smac *SysMenuActionCreate) SetIsDel(b bool) *SysMenuActionCreate

SetIsDel sets the "is_del" field.

func (*SysMenuActionCreate) SetMemo

SetMemo sets the "memo" field.

func (*SysMenuActionCreate) SetMenuID

func (smac *SysMenuActionCreate) SetMenuID(s string) *SysMenuActionCreate

SetMenuID sets the "menu_id" field.

func (*SysMenuActionCreate) SetName

SetName sets the "name" field.

func (*SysMenuActionCreate) SetNillableCreatedAt

func (smac *SysMenuActionCreate) SetNillableCreatedAt(t *time.Time) *SysMenuActionCreate

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

func (*SysMenuActionCreate) SetNillableDeletedAt

func (smac *SysMenuActionCreate) SetNillableDeletedAt(t *time.Time) *SysMenuActionCreate

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

func (*SysMenuActionCreate) SetNillableID

func (smac *SysMenuActionCreate) SetNillableID(s *string) *SysMenuActionCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SysMenuActionCreate) SetNillableIsDel

func (smac *SysMenuActionCreate) SetNillableIsDel(b *bool) *SysMenuActionCreate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysMenuActionCreate) SetNillableMemo

func (smac *SysMenuActionCreate) SetNillableMemo(s *string) *SysMenuActionCreate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysMenuActionCreate) SetNillableSort

func (smac *SysMenuActionCreate) SetNillableSort(i *int32) *SysMenuActionCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysMenuActionCreate) SetNillableStatus

func (smac *SysMenuActionCreate) SetNillableStatus(i *int16) *SysMenuActionCreate

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

func (*SysMenuActionCreate) SetNillableUpdatedAt

func (smac *SysMenuActionCreate) SetNillableUpdatedAt(t *time.Time) *SysMenuActionCreate

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

func (*SysMenuActionCreate) SetSort

func (smac *SysMenuActionCreate) SetSort(i int32) *SysMenuActionCreate

SetSort sets the "sort" field.

func (*SysMenuActionCreate) SetStatus

func (smac *SysMenuActionCreate) SetStatus(i int16) *SysMenuActionCreate

SetStatus sets the "status" field.

func (*SysMenuActionCreate) SetUpdatedAt

func (smac *SysMenuActionCreate) SetUpdatedAt(t time.Time) *SysMenuActionCreate

SetUpdatedAt sets the "updated_at" field.

type SysMenuActionCreateBulk

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

SysMenuActionCreateBulk is the builder for creating many SysMenuAction entities in bulk.

func (*SysMenuActionCreateBulk) Save

Save creates the SysMenuAction entities in the database.

func (*SysMenuActionCreateBulk) SaveX

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

type SysMenuActionDelete

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

SysMenuActionDelete is the builder for deleting a SysMenuAction entity.

func (*SysMenuActionDelete) Exec

func (smad *SysMenuActionDelete) Exec(ctx context.Context) (int, error)

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

func (*SysMenuActionDelete) ExecX

func (smad *SysMenuActionDelete) ExecX(ctx context.Context) int

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

func (*SysMenuActionDelete) Where

Where adds a new predicate to the SysMenuActionDelete builder.

type SysMenuActionDeleteOne

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

SysMenuActionDeleteOne is the builder for deleting a single SysMenuAction entity.

func (*SysMenuActionDeleteOne) Exec

func (smado *SysMenuActionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SysMenuActionDeleteOne) ExecX

func (smado *SysMenuActionDeleteOne) ExecX(ctx context.Context)

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

type SysMenuActionGroupBy

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

SysMenuActionGroupBy is the group-by builder for SysMenuAction entities.

func (*SysMenuActionGroupBy) Aggregate

func (smagb *SysMenuActionGroupBy) Aggregate(fns ...AggregateFunc) *SysMenuActionGroupBy

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

func (*SysMenuActionGroupBy) Bool

func (smagb *SysMenuActionGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionGroupBy) BoolX

func (smagb *SysMenuActionGroupBy) BoolX(ctx context.Context) bool

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

func (*SysMenuActionGroupBy) Bools

func (smagb *SysMenuActionGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionGroupBy) BoolsX

func (smagb *SysMenuActionGroupBy) BoolsX(ctx context.Context) []bool

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

func (*SysMenuActionGroupBy) Float64

func (smagb *SysMenuActionGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionGroupBy) Float64X

func (smagb *SysMenuActionGroupBy) Float64X(ctx context.Context) float64

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

func (*SysMenuActionGroupBy) Float64s

func (smagb *SysMenuActionGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionGroupBy) Float64sX

func (smagb *SysMenuActionGroupBy) Float64sX(ctx context.Context) []float64

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

func (*SysMenuActionGroupBy) Int

func (smagb *SysMenuActionGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionGroupBy) IntX

func (smagb *SysMenuActionGroupBy) IntX(ctx context.Context) int

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

func (*SysMenuActionGroupBy) Ints

func (smagb *SysMenuActionGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionGroupBy) IntsX

func (smagb *SysMenuActionGroupBy) IntsX(ctx context.Context) []int

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

func (*SysMenuActionGroupBy) Scan

func (smagb *SysMenuActionGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SysMenuActionGroupBy) ScanX

func (smagb *SysMenuActionGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*SysMenuActionGroupBy) String

func (smagb *SysMenuActionGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionGroupBy) StringX

func (smagb *SysMenuActionGroupBy) StringX(ctx context.Context) string

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

func (*SysMenuActionGroupBy) Strings

func (smagb *SysMenuActionGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionGroupBy) StringsX

func (smagb *SysMenuActionGroupBy) StringsX(ctx context.Context) []string

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

type SysMenuActionMutation

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

SysMenuActionMutation represents an operation that mutates the SysMenuAction nodes in the graph.

func (*SysMenuActionMutation) AddField

func (m *SysMenuActionMutation) 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 (*SysMenuActionMutation) AddSort

func (m *SysMenuActionMutation) AddSort(i int32)

AddSort adds i to the "sort" field.

func (*SysMenuActionMutation) AddStatus

func (m *SysMenuActionMutation) AddStatus(i int16)

AddStatus adds i to the "status" field.

func (*SysMenuActionMutation) AddedEdges

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

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

func (*SysMenuActionMutation) AddedField

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

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

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

func (*SysMenuActionMutation) AddedIDs

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

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

func (*SysMenuActionMutation) AddedSort

func (m *SysMenuActionMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*SysMenuActionMutation) AddedStatus

func (m *SysMenuActionMutation) AddedStatus() (r int16, exists bool)

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

func (*SysMenuActionMutation) ClearDeletedAt

func (m *SysMenuActionMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysMenuActionMutation) ClearEdge

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

func (m *SysMenuActionMutation) 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 (*SysMenuActionMutation) ClearedEdges

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

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

func (*SysMenuActionMutation) ClearedFields

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

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

func (SysMenuActionMutation) Client

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

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

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

func (*SysMenuActionMutation) CreatedAt

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

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

func (*SysMenuActionMutation) DeletedAt

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

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

func (*SysMenuActionMutation) DeletedAtCleared

func (m *SysMenuActionMutation) DeletedAtCleared() bool

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

func (*SysMenuActionMutation) EdgeCleared

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

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

func (*SysMenuActionMutation) Field

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

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

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

func (*SysMenuActionMutation) Fields

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

func (m *SysMenuActionMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*SysMenuActionMutation) IsDel

func (m *SysMenuActionMutation) IsDel() (r bool, exists bool)

IsDel returns the value of the "is_del" field in the mutation.

func (*SysMenuActionMutation) Memo

func (m *SysMenuActionMutation) Memo() (r string, exists bool)

Memo returns the value of the "memo" field in the mutation.

func (*SysMenuActionMutation) MenuID

func (m *SysMenuActionMutation) MenuID() (r string, exists bool)

MenuID returns the value of the "menu_id" field in the mutation.

func (*SysMenuActionMutation) Name

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

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

func (*SysMenuActionMutation) OldCode

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

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

func (*SysMenuActionMutation) OldCreatedAt

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

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

func (*SysMenuActionMutation) OldDeletedAt

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

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

func (*SysMenuActionMutation) OldField

func (m *SysMenuActionMutation) 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 (*SysMenuActionMutation) OldIsDel

func (m *SysMenuActionMutation) OldIsDel(ctx context.Context) (v bool, err error)

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

func (*SysMenuActionMutation) OldMemo

func (m *SysMenuActionMutation) OldMemo(ctx context.Context) (v string, err error)

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

func (*SysMenuActionMutation) OldMenuID

func (m *SysMenuActionMutation) OldMenuID(ctx context.Context) (v string, err error)

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

func (*SysMenuActionMutation) OldName

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

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

func (*SysMenuActionMutation) OldSort

func (m *SysMenuActionMutation) OldSort(ctx context.Context) (v int32, err error)

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

func (*SysMenuActionMutation) OldStatus

func (m *SysMenuActionMutation) OldStatus(ctx context.Context) (v int16, err error)

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

func (*SysMenuActionMutation) OldUpdatedAt

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

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

func (*SysMenuActionMutation) Op

func (m *SysMenuActionMutation) Op() Op

Op returns the operation name.

func (*SysMenuActionMutation) RemovedEdges

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

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

func (*SysMenuActionMutation) RemovedIDs

func (m *SysMenuActionMutation) 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 (*SysMenuActionMutation) ResetCode

func (m *SysMenuActionMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*SysMenuActionMutation) ResetCreatedAt

func (m *SysMenuActionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SysMenuActionMutation) ResetDeletedAt

func (m *SysMenuActionMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*SysMenuActionMutation) ResetEdge

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

func (m *SysMenuActionMutation) 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 (*SysMenuActionMutation) ResetIsDel

func (m *SysMenuActionMutation) ResetIsDel()

ResetIsDel resets all changes to the "is_del" field.

func (*SysMenuActionMutation) ResetMemo

func (m *SysMenuActionMutation) ResetMemo()

ResetMemo resets all changes to the "memo" field.

func (*SysMenuActionMutation) ResetMenuID

func (m *SysMenuActionMutation) ResetMenuID()

ResetMenuID resets all changes to the "menu_id" field.

func (*SysMenuActionMutation) ResetName

func (m *SysMenuActionMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SysMenuActionMutation) ResetSort

func (m *SysMenuActionMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*SysMenuActionMutation) ResetStatus

func (m *SysMenuActionMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*SysMenuActionMutation) ResetUpdatedAt

func (m *SysMenuActionMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SysMenuActionMutation) SetCode

func (m *SysMenuActionMutation) SetCode(s string)

SetCode sets the "code" field.

func (*SysMenuActionMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*SysMenuActionMutation) SetDeletedAt

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

SetDeletedAt sets the "deleted_at" field.

func (*SysMenuActionMutation) SetField

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

func (m *SysMenuActionMutation) SetID(id string)

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

func (*SysMenuActionMutation) SetIsDel

func (m *SysMenuActionMutation) SetIsDel(b bool)

SetIsDel sets the "is_del" field.

func (*SysMenuActionMutation) SetMemo

func (m *SysMenuActionMutation) SetMemo(s string)

SetMemo sets the "memo" field.

func (*SysMenuActionMutation) SetMenuID

func (m *SysMenuActionMutation) SetMenuID(s string)

SetMenuID sets the "menu_id" field.

func (*SysMenuActionMutation) SetName

func (m *SysMenuActionMutation) SetName(s string)

SetName sets the "name" field.

func (*SysMenuActionMutation) SetSort

func (m *SysMenuActionMutation) SetSort(i int32)

SetSort sets the "sort" field.

func (*SysMenuActionMutation) SetStatus

func (m *SysMenuActionMutation) SetStatus(i int16)

SetStatus sets the "status" field.

func (*SysMenuActionMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*SysMenuActionMutation) Sort

func (m *SysMenuActionMutation) Sort() (r int32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*SysMenuActionMutation) Status

func (m *SysMenuActionMutation) Status() (r int16, exists bool)

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

func (SysMenuActionMutation) Tx

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

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

func (*SysMenuActionMutation) Type

func (m *SysMenuActionMutation) Type() string

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

func (*SysMenuActionMutation) UpdatedAt

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

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

type SysMenuActionQuery

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

SysMenuActionQuery is the builder for querying SysMenuAction entities.

func (*SysMenuActionQuery) All

func (smaq *SysMenuActionQuery) All(ctx context.Context) ([]*SysMenuAction, error)

All executes the query and returns a list of SysMenuActions.

func (*SysMenuActionQuery) AllX

func (smaq *SysMenuActionQuery) AllX(ctx context.Context) []*SysMenuAction

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

func (*SysMenuActionQuery) Clone

func (smaq *SysMenuActionQuery) Clone() *SysMenuActionQuery

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

func (*SysMenuActionQuery) Count

func (smaq *SysMenuActionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SysMenuActionQuery) CountX

func (smaq *SysMenuActionQuery) CountX(ctx context.Context) int

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

func (*SysMenuActionQuery) Exist

func (smaq *SysMenuActionQuery) Exist(ctx context.Context) (bool, error)

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

func (*SysMenuActionQuery) ExistX

func (smaq *SysMenuActionQuery) ExistX(ctx context.Context) bool

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

func (*SysMenuActionQuery) First

func (smaq *SysMenuActionQuery) First(ctx context.Context) (*SysMenuAction, error)

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

func (*SysMenuActionQuery) FirstID

func (smaq *SysMenuActionQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*SysMenuActionQuery) FirstIDX

func (smaq *SysMenuActionQuery) FirstIDX(ctx context.Context) string

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

func (*SysMenuActionQuery) FirstX

func (smaq *SysMenuActionQuery) FirstX(ctx context.Context) *SysMenuAction

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

func (*SysMenuActionQuery) GroupBy

func (smaq *SysMenuActionQuery) GroupBy(field string, fields ...string) *SysMenuActionGroupBy

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 {
	IsDel bool `json:"is_del,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SysMenuAction.Query().
	GroupBy(sysmenuaction.FieldIsDel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SysMenuActionQuery) IDs

func (smaq *SysMenuActionQuery) IDs(ctx context.Context) ([]string, error)

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

func (*SysMenuActionQuery) IDsX

func (smaq *SysMenuActionQuery) IDsX(ctx context.Context) []string

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

func (*SysMenuActionQuery) Limit

func (smaq *SysMenuActionQuery) Limit(limit int) *SysMenuActionQuery

Limit adds a limit step to the query.

func (*SysMenuActionQuery) Offset

func (smaq *SysMenuActionQuery) Offset(offset int) *SysMenuActionQuery

Offset adds an offset step to the query.

func (*SysMenuActionQuery) Only

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

func (*SysMenuActionQuery) OnlyID

func (smaq *SysMenuActionQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*SysMenuActionQuery) OnlyIDX

func (smaq *SysMenuActionQuery) OnlyIDX(ctx context.Context) string

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

func (*SysMenuActionQuery) OnlyX

func (smaq *SysMenuActionQuery) OnlyX(ctx context.Context) *SysMenuAction

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

func (*SysMenuActionQuery) Order

func (smaq *SysMenuActionQuery) Order(o ...OrderFunc) *SysMenuActionQuery

Order adds an order step to the query.

func (*SysMenuActionQuery) Select

func (smaq *SysMenuActionQuery) Select(field string, fields ...string) *SysMenuActionSelect

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 {
	IsDel bool `json:"is_del,omitempty"`
}

client.SysMenuAction.Query().
	Select(sysmenuaction.FieldIsDel).
	Scan(ctx, &v)

func (*SysMenuActionQuery) Unique

func (smaq *SysMenuActionQuery) Unique(unique bool) *SysMenuActionQuery

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

Where adds a new predicate for the SysMenuActionQuery builder.

type SysMenuActionResource

type SysMenuActionResource struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// IsDel holds the value of the "is_del" field.
	// 是否删除
	IsDel bool `json:"is_del,omitempty"`
	// Sort holds the value of the "sort" field.
	// 排序, 在数据库里的排序
	Sort int32 `json:"sort,omitempty"`
	// Memo holds the value of the "memo" field.
	// 备注
	Memo string `json:"memo,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	// 创建时间,由程序自动生成
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	// 更新时间,由程序自动生成
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	// 删除时间,
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// Status holds the value of the "status" field.
	// 状态,
	Status int16 `json:"status,omitempty"`
	// Method holds the value of the "method" field.
	// 资源HTTP请求方式(支持正则, get, delete, delete, put, patch )
	Method string `json:"method,omitempty"`
	// Path holds the value of the "path" field.
	// 资源HTTP请求路径(支持/:id匹配)
	Path string `json:"path,omitempty"`
	// ActionID holds the value of the "action_id" field.
	// sys_menu_action.id
	ActionID string `json:"action_id,omitempty"`
	// contains filtered or unexported fields
}

SysMenuActionResource is the model entity for the SysMenuActionResource schema.

func (*SysMenuActionResource) String

func (smar *SysMenuActionResource) String() string

String implements the fmt.Stringer.

func (*SysMenuActionResource) Unwrap

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

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

type SysMenuActionResourceClient

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

SysMenuActionResourceClient is a client for the SysMenuActionResource schema.

func NewSysMenuActionResourceClient

func NewSysMenuActionResourceClient(c config) *SysMenuActionResourceClient

NewSysMenuActionResourceClient returns a client for the SysMenuActionResource from the given config.

func (*SysMenuActionResourceClient) Create

Create returns a create builder for SysMenuActionResource.

func (*SysMenuActionResourceClient) CreateBulk

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

func (*SysMenuActionResourceClient) Delete

Delete returns a delete builder for SysMenuActionResource.

func (*SysMenuActionResourceClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SysMenuActionResourceClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*SysMenuActionResourceClient) Get

Get returns a SysMenuActionResource entity by its id.

func (*SysMenuActionResourceClient) GetX

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

func (*SysMenuActionResourceClient) Hooks

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

Hooks returns the client hooks.

func (*SysMenuActionResourceClient) Query

Query returns a query builder for SysMenuActionResource.

func (*SysMenuActionResourceClient) Update

Update returns an update builder for SysMenuActionResource.

func (*SysMenuActionResourceClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SysMenuActionResourceClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*SysMenuActionResourceClient) Use

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

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

type SysMenuActionResourceCreate

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

SysMenuActionResourceCreate is the builder for creating a SysMenuActionResource entity.

func (*SysMenuActionResourceCreate) Mutation

Mutation returns the SysMenuActionResourceMutation object of the builder.

func (*SysMenuActionResourceCreate) Save

Save creates the SysMenuActionResource in the database.

func (*SysMenuActionResourceCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*SysMenuActionResourceCreate) SetActionID

SetActionID sets the "action_id" field.

func (*SysMenuActionResourceCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*SysMenuActionResourceCreate) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*SysMenuActionResourceCreate) SetID

SetID sets the "id" field.

func (*SysMenuActionResourceCreate) SetInput

SetInput applies the change-set in the CreateSysMenuActionResourceInput on the create builder.

func (*SysMenuActionResourceCreate) SetIsDel

SetIsDel sets the "is_del" field.

func (*SysMenuActionResourceCreate) SetMemo

SetMemo sets the "memo" field.

func (*SysMenuActionResourceCreate) SetMethod

SetMethod sets the "method" field.

func (*SysMenuActionResourceCreate) SetNillableCreatedAt

func (smarc *SysMenuActionResourceCreate) SetNillableCreatedAt(t *time.Time) *SysMenuActionResourceCreate

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

func (*SysMenuActionResourceCreate) SetNillableDeletedAt

func (smarc *SysMenuActionResourceCreate) SetNillableDeletedAt(t *time.Time) *SysMenuActionResourceCreate

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

func (*SysMenuActionResourceCreate) SetNillableID

SetNillableID sets the "id" field if the given value is not nil.

func (*SysMenuActionResourceCreate) SetNillableIsDel

func (smarc *SysMenuActionResourceCreate) SetNillableIsDel(b *bool) *SysMenuActionResourceCreate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysMenuActionResourceCreate) SetNillableMemo

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysMenuActionResourceCreate) SetNillableSort

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysMenuActionResourceCreate) SetNillableStatus

func (smarc *SysMenuActionResourceCreate) SetNillableStatus(i *int16) *SysMenuActionResourceCreate

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

func (*SysMenuActionResourceCreate) SetNillableUpdatedAt

func (smarc *SysMenuActionResourceCreate) SetNillableUpdatedAt(t *time.Time) *SysMenuActionResourceCreate

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

func (*SysMenuActionResourceCreate) SetPath

SetPath sets the "path" field.

func (*SysMenuActionResourceCreate) SetSort

SetSort sets the "sort" field.

func (*SysMenuActionResourceCreate) SetStatus

SetStatus sets the "status" field.

func (*SysMenuActionResourceCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type SysMenuActionResourceCreateBulk

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

SysMenuActionResourceCreateBulk is the builder for creating many SysMenuActionResource entities in bulk.

func (*SysMenuActionResourceCreateBulk) Save

Save creates the SysMenuActionResource entities in the database.

func (*SysMenuActionResourceCreateBulk) SaveX

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

type SysMenuActionResourceDelete

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

SysMenuActionResourceDelete is the builder for deleting a SysMenuActionResource entity.

func (*SysMenuActionResourceDelete) Exec

func (smard *SysMenuActionResourceDelete) Exec(ctx context.Context) (int, error)

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

func (*SysMenuActionResourceDelete) ExecX

func (smard *SysMenuActionResourceDelete) ExecX(ctx context.Context) int

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

func (*SysMenuActionResourceDelete) Where

Where adds a new predicate to the SysMenuActionResourceDelete builder.

type SysMenuActionResourceDeleteOne

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

SysMenuActionResourceDeleteOne is the builder for deleting a single SysMenuActionResource entity.

func (*SysMenuActionResourceDeleteOne) Exec

Exec executes the deletion query.

func (*SysMenuActionResourceDeleteOne) ExecX

func (smardo *SysMenuActionResourceDeleteOne) ExecX(ctx context.Context)

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

type SysMenuActionResourceGroupBy

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

SysMenuActionResourceGroupBy is the group-by builder for SysMenuActionResource entities.

func (*SysMenuActionResourceGroupBy) Aggregate

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

func (*SysMenuActionResourceGroupBy) Bool

func (smargb *SysMenuActionResourceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionResourceGroupBy) BoolX

func (smargb *SysMenuActionResourceGroupBy) BoolX(ctx context.Context) bool

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

func (*SysMenuActionResourceGroupBy) Bools

func (smargb *SysMenuActionResourceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionResourceGroupBy) BoolsX

func (smargb *SysMenuActionResourceGroupBy) BoolsX(ctx context.Context) []bool

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

func (*SysMenuActionResourceGroupBy) Float64

func (smargb *SysMenuActionResourceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionResourceGroupBy) Float64X

func (smargb *SysMenuActionResourceGroupBy) Float64X(ctx context.Context) float64

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

func (*SysMenuActionResourceGroupBy) Float64s

func (smargb *SysMenuActionResourceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionResourceGroupBy) Float64sX

func (smargb *SysMenuActionResourceGroupBy) Float64sX(ctx context.Context) []float64

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

func (*SysMenuActionResourceGroupBy) Int

func (smargb *SysMenuActionResourceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionResourceGroupBy) IntX

func (smargb *SysMenuActionResourceGroupBy) IntX(ctx context.Context) int

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

func (*SysMenuActionResourceGroupBy) Ints

func (smargb *SysMenuActionResourceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionResourceGroupBy) IntsX

func (smargb *SysMenuActionResourceGroupBy) IntsX(ctx context.Context) []int

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

func (*SysMenuActionResourceGroupBy) Scan

func (smargb *SysMenuActionResourceGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SysMenuActionResourceGroupBy) ScanX

func (smargb *SysMenuActionResourceGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*SysMenuActionResourceGroupBy) String

func (smargb *SysMenuActionResourceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionResourceGroupBy) StringX

func (smargb *SysMenuActionResourceGroupBy) StringX(ctx context.Context) string

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

func (*SysMenuActionResourceGroupBy) Strings

func (smargb *SysMenuActionResourceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SysMenuActionResourceGroupBy) StringsX

func (smargb *SysMenuActionResourceGroupBy) StringsX(ctx context.Context) []string

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

type SysMenuActionResourceMutation

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

SysMenuActionResourceMutation represents an operation that mutates the SysMenuActionResource nodes in the graph.

func (*SysMenuActionResourceMutation) ActionID

func (m *SysMenuActionResourceMutation) ActionID() (r string, exists bool)

ActionID returns the value of the "action_id" field in the mutation.

func (*SysMenuActionResourceMutation) AddField

func (m *SysMenuActionResourceMutation) 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 (*SysMenuActionResourceMutation) AddSort

func (m *SysMenuActionResourceMutation) AddSort(i int32)

AddSort adds i to the "sort" field.

func (*SysMenuActionResourceMutation) AddStatus

func (m *SysMenuActionResourceMutation) AddStatus(i int16)

AddStatus adds i to the "status" field.

func (*SysMenuActionResourceMutation) AddedEdges

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

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

func (*SysMenuActionResourceMutation) AddedField

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

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

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

func (*SysMenuActionResourceMutation) AddedIDs

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

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

func (*SysMenuActionResourceMutation) AddedSort

func (m *SysMenuActionResourceMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*SysMenuActionResourceMutation) AddedStatus

func (m *SysMenuActionResourceMutation) AddedStatus() (r int16, exists bool)

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

func (*SysMenuActionResourceMutation) ClearDeletedAt

func (m *SysMenuActionResourceMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysMenuActionResourceMutation) ClearEdge

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

func (m *SysMenuActionResourceMutation) 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 (*SysMenuActionResourceMutation) ClearedEdges

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

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

func (*SysMenuActionResourceMutation) ClearedFields

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

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

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

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

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

func (*SysMenuActionResourceMutation) DeletedAt

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

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

func (*SysMenuActionResourceMutation) DeletedAtCleared

func (m *SysMenuActionResourceMutation) DeletedAtCleared() bool

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

func (*SysMenuActionResourceMutation) EdgeCleared

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

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

func (*SysMenuActionResourceMutation) Field

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 (*SysMenuActionResourceMutation) FieldCleared

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

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

func (*SysMenuActionResourceMutation) Fields

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

func (m *SysMenuActionResourceMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*SysMenuActionResourceMutation) IsDel

func (m *SysMenuActionResourceMutation) IsDel() (r bool, exists bool)

IsDel returns the value of the "is_del" field in the mutation.

func (*SysMenuActionResourceMutation) Memo

func (m *SysMenuActionResourceMutation) Memo() (r string, exists bool)

Memo returns the value of the "memo" field in the mutation.

func (*SysMenuActionResourceMutation) Method

func (m *SysMenuActionResourceMutation) Method() (r string, exists bool)

Method returns the value of the "method" field in the mutation.

func (*SysMenuActionResourceMutation) OldActionID

func (m *SysMenuActionResourceMutation) OldActionID(ctx context.Context) (v string, err error)

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

func (*SysMenuActionResourceMutation) OldCreatedAt

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

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

func (*SysMenuActionResourceMutation) OldDeletedAt

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

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

func (*SysMenuActionResourceMutation) OldField

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*SysMenuActionResourceMutation) OldIsDel

func (m *SysMenuActionResourceMutation) OldIsDel(ctx context.Context) (v bool, err error)

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

func (*SysMenuActionResourceMutation) OldMemo

func (m *SysMenuActionResourceMutation) OldMemo(ctx context.Context) (v string, err error)

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

func (*SysMenuActionResourceMutation) OldMethod

func (m *SysMenuActionResourceMutation) OldMethod(ctx context.Context) (v string, err error)

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

func (*SysMenuActionResourceMutation) OldPath

func (m *SysMenuActionResourceMutation) OldPath(ctx context.Context) (v string, err error)

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

func (*SysMenuActionResourceMutation) OldSort

func (m *SysMenuActionResourceMutation) OldSort(ctx context.Context) (v int32, err error)

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

func (*SysMenuActionResourceMutation) OldStatus

func (m *SysMenuActionResourceMutation) OldStatus(ctx context.Context) (v int16, err error)

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

func (*SysMenuActionResourceMutation) OldUpdatedAt

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

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

func (*SysMenuActionResourceMutation) Op

Op returns the operation name.

func (*SysMenuActionResourceMutation) Path

func (m *SysMenuActionResourceMutation) Path() (r string, exists bool)

Path returns the value of the "path" field in the mutation.

func (*SysMenuActionResourceMutation) RemovedEdges

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

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

func (*SysMenuActionResourceMutation) RemovedIDs

func (m *SysMenuActionResourceMutation) 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 (*SysMenuActionResourceMutation) ResetActionID

func (m *SysMenuActionResourceMutation) ResetActionID()

ResetActionID resets all changes to the "action_id" field.

func (*SysMenuActionResourceMutation) ResetCreatedAt

func (m *SysMenuActionResourceMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SysMenuActionResourceMutation) ResetDeletedAt

func (m *SysMenuActionResourceMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*SysMenuActionResourceMutation) ResetEdge

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

func (m *SysMenuActionResourceMutation) 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 (*SysMenuActionResourceMutation) ResetIsDel

func (m *SysMenuActionResourceMutation) ResetIsDel()

ResetIsDel resets all changes to the "is_del" field.

func (*SysMenuActionResourceMutation) ResetMemo

func (m *SysMenuActionResourceMutation) ResetMemo()

ResetMemo resets all changes to the "memo" field.

func (*SysMenuActionResourceMutation) ResetMethod

func (m *SysMenuActionResourceMutation) ResetMethod()

ResetMethod resets all changes to the "method" field.

func (*SysMenuActionResourceMutation) ResetPath

func (m *SysMenuActionResourceMutation) ResetPath()

ResetPath resets all changes to the "path" field.

func (*SysMenuActionResourceMutation) ResetSort

func (m *SysMenuActionResourceMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*SysMenuActionResourceMutation) ResetStatus

func (m *SysMenuActionResourceMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*SysMenuActionResourceMutation) ResetUpdatedAt

func (m *SysMenuActionResourceMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SysMenuActionResourceMutation) SetActionID

func (m *SysMenuActionResourceMutation) SetActionID(s string)

SetActionID sets the "action_id" field.

func (*SysMenuActionResourceMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*SysMenuActionResourceMutation) SetDeletedAt

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

SetDeletedAt sets the "deleted_at" field.

func (*SysMenuActionResourceMutation) SetField

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

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

func (*SysMenuActionResourceMutation) SetIsDel

func (m *SysMenuActionResourceMutation) SetIsDel(b bool)

SetIsDel sets the "is_del" field.

func (*SysMenuActionResourceMutation) SetMemo

func (m *SysMenuActionResourceMutation) SetMemo(s string)

SetMemo sets the "memo" field.

func (*SysMenuActionResourceMutation) SetMethod

func (m *SysMenuActionResourceMutation) SetMethod(s string)

SetMethod sets the "method" field.

func (*SysMenuActionResourceMutation) SetPath

func (m *SysMenuActionResourceMutation) SetPath(s string)

SetPath sets the "path" field.

func (*SysMenuActionResourceMutation) SetSort

func (m *SysMenuActionResourceMutation) SetSort(i int32)

SetSort sets the "sort" field.

func (*SysMenuActionResourceMutation) SetStatus

func (m *SysMenuActionResourceMutation) SetStatus(i int16)

SetStatus sets the "status" field.

func (*SysMenuActionResourceMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*SysMenuActionResourceMutation) Sort

func (m *SysMenuActionResourceMutation) Sort() (r int32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*SysMenuActionResourceMutation) Status

func (m *SysMenuActionResourceMutation) Status() (r int16, exists bool)

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

func (SysMenuActionResourceMutation) Tx

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

func (*SysMenuActionResourceMutation) Type

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

func (*SysMenuActionResourceMutation) UpdatedAt

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

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

type SysMenuActionResourceQuery

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

SysMenuActionResourceQuery is the builder for querying SysMenuActionResource entities.

func (*SysMenuActionResourceQuery) All

All executes the query and returns a list of SysMenuActionResources.

func (*SysMenuActionResourceQuery) AllX

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

func (*SysMenuActionResourceQuery) Clone

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

func (*SysMenuActionResourceQuery) Count

func (smarq *SysMenuActionResourceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SysMenuActionResourceQuery) CountX

func (smarq *SysMenuActionResourceQuery) CountX(ctx context.Context) int

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

func (*SysMenuActionResourceQuery) Exist

func (smarq *SysMenuActionResourceQuery) Exist(ctx context.Context) (bool, error)

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

func (*SysMenuActionResourceQuery) ExistX

func (smarq *SysMenuActionResourceQuery) ExistX(ctx context.Context) bool

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

func (*SysMenuActionResourceQuery) First

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

func (*SysMenuActionResourceQuery) FirstID

func (smarq *SysMenuActionResourceQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*SysMenuActionResourceQuery) FirstIDX

func (smarq *SysMenuActionResourceQuery) FirstIDX(ctx context.Context) string

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

func (*SysMenuActionResourceQuery) FirstX

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

func (*SysMenuActionResourceQuery) GroupBy

func (smarq *SysMenuActionResourceQuery) GroupBy(field string, fields ...string) *SysMenuActionResourceGroupBy

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 {
	IsDel bool `json:"is_del,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SysMenuActionResource.Query().
	GroupBy(sysmenuactionresource.FieldIsDel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SysMenuActionResourceQuery) IDs

func (smarq *SysMenuActionResourceQuery) IDs(ctx context.Context) ([]string, error)

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

func (*SysMenuActionResourceQuery) IDsX

func (smarq *SysMenuActionResourceQuery) IDsX(ctx context.Context) []string

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

func (*SysMenuActionResourceQuery) Limit

Limit adds a limit step to the query.

func (*SysMenuActionResourceQuery) Offset

Offset adds an offset step to the query.

func (*SysMenuActionResourceQuery) Only

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

func (*SysMenuActionResourceQuery) OnlyID

func (smarq *SysMenuActionResourceQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*SysMenuActionResourceQuery) OnlyIDX

func (smarq *SysMenuActionResourceQuery) OnlyIDX(ctx context.Context) string

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

func (*SysMenuActionResourceQuery) OnlyX

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

func (*SysMenuActionResourceQuery) Order

Order adds an order step to the query.

func (*SysMenuActionResourceQuery) Select

func (smarq *SysMenuActionResourceQuery) Select(field string, fields ...string) *SysMenuActionResourceSelect

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 {
	IsDel bool `json:"is_del,omitempty"`
}

client.SysMenuActionResource.Query().
	Select(sysmenuactionresource.FieldIsDel).
	Scan(ctx, &v)

func (*SysMenuActionResourceQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*SysMenuActionResourceQuery) Where

Where adds a new predicate for the SysMenuActionResourceQuery builder.

type SysMenuActionResourceSelect

type SysMenuActionResourceSelect struct {
	*SysMenuActionResourceQuery
	// contains filtered or unexported fields
}

SysMenuActionResourceSelect is the builder for selecting fields of SysMenuActionResource entities.

func (*SysMenuActionResourceSelect) Bool

func (smars *SysMenuActionResourceSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*SysMenuActionResourceSelect) BoolX

func (smars *SysMenuActionResourceSelect) BoolX(ctx context.Context) bool

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

func (*SysMenuActionResourceSelect) Bools

func (smars *SysMenuActionResourceSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*SysMenuActionResourceSelect) BoolsX

func (smars *SysMenuActionResourceSelect) BoolsX(ctx context.Context) []bool

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

func (*SysMenuActionResourceSelect) Float64

func (smars *SysMenuActionResourceSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*SysMenuActionResourceSelect) Float64X

func (smars *SysMenuActionResourceSelect) Float64X(ctx context.Context) float64

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

func (*SysMenuActionResourceSelect) Float64s

func (smars *SysMenuActionResourceSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*SysMenuActionResourceSelect) Float64sX

func (smars *SysMenuActionResourceSelect) Float64sX(ctx context.Context) []float64

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

func (*SysMenuActionResourceSelect) Int

func (smars *SysMenuActionResourceSelect) Int(ctx context.Context) (_ int, err error)

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

func (*SysMenuActionResourceSelect) IntX

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

func (*SysMenuActionResourceSelect) Ints

func (smars *SysMenuActionResourceSelect) Ints(ctx context.Context) ([]int, error)

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

func (*SysMenuActionResourceSelect) IntsX

func (smars *SysMenuActionResourceSelect) IntsX(ctx context.Context) []int

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

func (*SysMenuActionResourceSelect) Scan

func (smars *SysMenuActionResourceSelect) Scan(ctx context.Context, v interface{}) error

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

func (*SysMenuActionResourceSelect) ScanX

func (smars *SysMenuActionResourceSelect) ScanX(ctx context.Context, v interface{})

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

func (*SysMenuActionResourceSelect) String

func (smars *SysMenuActionResourceSelect) String(ctx context.Context) (_ string, err error)

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

func (*SysMenuActionResourceSelect) StringX

func (smars *SysMenuActionResourceSelect) StringX(ctx context.Context) string

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

func (*SysMenuActionResourceSelect) Strings

func (smars *SysMenuActionResourceSelect) Strings(ctx context.Context) ([]string, error)

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

func (*SysMenuActionResourceSelect) StringsX

func (smars *SysMenuActionResourceSelect) StringsX(ctx context.Context) []string

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

type SysMenuActionResourceUpdate

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

SysMenuActionResourceUpdate is the builder for updating SysMenuActionResource entities.

func (*SysMenuActionResourceUpdate) AddSort

AddSort adds i to the "sort" field.

func (*SysMenuActionResourceUpdate) AddStatus

AddStatus adds i to the "status" field.

func (*SysMenuActionResourceUpdate) ClearDeletedAt

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysMenuActionResourceUpdate) Exec

Exec executes the query.

func (*SysMenuActionResourceUpdate) ExecX

func (smaru *SysMenuActionResourceUpdate) ExecX(ctx context.Context)

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

func (*SysMenuActionResourceUpdate) Mutation

Mutation returns the SysMenuActionResourceMutation object of the builder.

func (*SysMenuActionResourceUpdate) Save

func (smaru *SysMenuActionResourceUpdate) Save(ctx context.Context) (int, error)

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

func (*SysMenuActionResourceUpdate) SaveX

func (smaru *SysMenuActionResourceUpdate) SaveX(ctx context.Context) int

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

func (*SysMenuActionResourceUpdate) SetActionID

SetActionID sets the "action_id" field.

func (*SysMenuActionResourceUpdate) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*SysMenuActionResourceUpdate) SetInput

SetInput applies the change-set in the UpdateSysMenuActionResourceInput on the update builder.

func (*SysMenuActionResourceUpdate) SetIsDel

SetIsDel sets the "is_del" field.

func (*SysMenuActionResourceUpdate) SetMemo

SetMemo sets the "memo" field.

func (*SysMenuActionResourceUpdate) SetMethod

SetMethod sets the "method" field.

func (*SysMenuActionResourceUpdate) SetNillableDeletedAt

func (smaru *SysMenuActionResourceUpdate) SetNillableDeletedAt(t *time.Time) *SysMenuActionResourceUpdate

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

func (*SysMenuActionResourceUpdate) SetNillableIsDel

func (smaru *SysMenuActionResourceUpdate) SetNillableIsDel(b *bool) *SysMenuActionResourceUpdate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysMenuActionResourceUpdate) SetNillableMemo

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysMenuActionResourceUpdate) SetNillableSort

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysMenuActionResourceUpdate) SetNillableStatus

func (smaru *SysMenuActionResourceUpdate) SetNillableStatus(i *int16) *SysMenuActionResourceUpdate

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

func (*SysMenuActionResourceUpdate) SetPath

SetPath sets the "path" field.

func (*SysMenuActionResourceUpdate) SetSort

SetSort sets the "sort" field.

func (*SysMenuActionResourceUpdate) SetStatus

SetStatus sets the "status" field.

func (*SysMenuActionResourceUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*SysMenuActionResourceUpdate) Where

Where adds a new predicate for the SysMenuActionResourceUpdate builder.

type SysMenuActionResourceUpdateOne

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

SysMenuActionResourceUpdateOne is the builder for updating a single SysMenuActionResource entity.

func (*SysMenuActionResourceUpdateOne) AddSort

AddSort adds i to the "sort" field.

func (*SysMenuActionResourceUpdateOne) AddStatus

AddStatus adds i to the "status" field.

func (*SysMenuActionResourceUpdateOne) ClearDeletedAt

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysMenuActionResourceUpdateOne) Exec

Exec executes the query on the entity.

func (*SysMenuActionResourceUpdateOne) ExecX

func (smaruo *SysMenuActionResourceUpdateOne) ExecX(ctx context.Context)

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

func (*SysMenuActionResourceUpdateOne) Mutation

Mutation returns the SysMenuActionResourceMutation object of the builder.

func (*SysMenuActionResourceUpdateOne) Save

Save executes the query and returns the updated SysMenuActionResource entity.

func (*SysMenuActionResourceUpdateOne) SaveX

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

func (*SysMenuActionResourceUpdateOne) Select

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

func (*SysMenuActionResourceUpdateOne) SetActionID

SetActionID sets the "action_id" field.

func (*SysMenuActionResourceUpdateOne) SetDeletedAt

SetDeletedAt sets the "deleted_at" field.

func (*SysMenuActionResourceUpdateOne) SetInput

SetInput applies the change-set in the UpdateSysMenuActionResourceInput on the update-one builder.

func (*SysMenuActionResourceUpdateOne) SetIsDel

SetIsDel sets the "is_del" field.

func (*SysMenuActionResourceUpdateOne) SetMemo

SetMemo sets the "memo" field.

func (*SysMenuActionResourceUpdateOne) SetMethod

SetMethod sets the "method" field.

func (*SysMenuActionResourceUpdateOne) SetNillableDeletedAt

func (smaruo *SysMenuActionResourceUpdateOne) SetNillableDeletedAt(t *time.Time) *SysMenuActionResourceUpdateOne

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

func (*SysMenuActionResourceUpdateOne) SetNillableIsDel

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysMenuActionResourceUpdateOne) SetNillableMemo

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysMenuActionResourceUpdateOne) SetNillableSort

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysMenuActionResourceUpdateOne) SetNillableStatus

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

func (*SysMenuActionResourceUpdateOne) SetPath

SetPath sets the "path" field.

func (*SysMenuActionResourceUpdateOne) SetSort

SetSort sets the "sort" field.

func (*SysMenuActionResourceUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*SysMenuActionResourceUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type SysMenuActionResources

type SysMenuActionResources []*SysMenuActionResource

SysMenuActionResources is a parsable slice of SysMenuActionResource.

type SysMenuActionSelect

type SysMenuActionSelect struct {
	*SysMenuActionQuery
	// contains filtered or unexported fields
}

SysMenuActionSelect is the builder for selecting fields of SysMenuAction entities.

func (*SysMenuActionSelect) Bool

func (smas *SysMenuActionSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*SysMenuActionSelect) BoolX

func (smas *SysMenuActionSelect) BoolX(ctx context.Context) bool

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

func (*SysMenuActionSelect) Bools

func (smas *SysMenuActionSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*SysMenuActionSelect) BoolsX

func (smas *SysMenuActionSelect) BoolsX(ctx context.Context) []bool

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

func (*SysMenuActionSelect) Float64

func (smas *SysMenuActionSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*SysMenuActionSelect) Float64X

func (smas *SysMenuActionSelect) Float64X(ctx context.Context) float64

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

func (*SysMenuActionSelect) Float64s

func (smas *SysMenuActionSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*SysMenuActionSelect) Float64sX

func (smas *SysMenuActionSelect) Float64sX(ctx context.Context) []float64

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

func (*SysMenuActionSelect) Int

func (smas *SysMenuActionSelect) Int(ctx context.Context) (_ int, err error)

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

func (*SysMenuActionSelect) IntX

func (smas *SysMenuActionSelect) IntX(ctx context.Context) int

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

func (*SysMenuActionSelect) Ints

func (smas *SysMenuActionSelect) Ints(ctx context.Context) ([]int, error)

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

func (*SysMenuActionSelect) IntsX

func (smas *SysMenuActionSelect) IntsX(ctx context.Context) []int

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

func (*SysMenuActionSelect) Scan

func (smas *SysMenuActionSelect) Scan(ctx context.Context, v interface{}) error

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

func (*SysMenuActionSelect) ScanX

func (smas *SysMenuActionSelect) ScanX(ctx context.Context, v interface{})

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

func (*SysMenuActionSelect) String

func (smas *SysMenuActionSelect) String(ctx context.Context) (_ string, err error)

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

func (*SysMenuActionSelect) StringX

func (smas *SysMenuActionSelect) StringX(ctx context.Context) string

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

func (*SysMenuActionSelect) Strings

func (smas *SysMenuActionSelect) Strings(ctx context.Context) ([]string, error)

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

func (*SysMenuActionSelect) StringsX

func (smas *SysMenuActionSelect) StringsX(ctx context.Context) []string

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

type SysMenuActionUpdate

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

SysMenuActionUpdate is the builder for updating SysMenuAction entities.

func (*SysMenuActionUpdate) AddSort

func (smau *SysMenuActionUpdate) AddSort(i int32) *SysMenuActionUpdate

AddSort adds i to the "sort" field.

func (*SysMenuActionUpdate) AddStatus

func (smau *SysMenuActionUpdate) AddStatus(i int16) *SysMenuActionUpdate

AddStatus adds i to the "status" field.

func (*SysMenuActionUpdate) ClearDeletedAt

func (smau *SysMenuActionUpdate) ClearDeletedAt() *SysMenuActionUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysMenuActionUpdate) Exec

func (smau *SysMenuActionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SysMenuActionUpdate) ExecX

func (smau *SysMenuActionUpdate) ExecX(ctx context.Context)

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

func (*SysMenuActionUpdate) Mutation

func (smau *SysMenuActionUpdate) Mutation() *SysMenuActionMutation

Mutation returns the SysMenuActionMutation object of the builder.

func (*SysMenuActionUpdate) Save

func (smau *SysMenuActionUpdate) Save(ctx context.Context) (int, error)

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

func (*SysMenuActionUpdate) SaveX

func (smau *SysMenuActionUpdate) SaveX(ctx context.Context) int

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

func (*SysMenuActionUpdate) SetCode

SetCode sets the "code" field.

func (*SysMenuActionUpdate) SetDeletedAt

func (smau *SysMenuActionUpdate) SetDeletedAt(t time.Time) *SysMenuActionUpdate

SetDeletedAt sets the "deleted_at" field.

func (*SysMenuActionUpdate) SetInput

SetInput applies the change-set in the UpdateSysMenuActionInput on the update builder.

func (*SysMenuActionUpdate) SetIsDel

func (smau *SysMenuActionUpdate) SetIsDel(b bool) *SysMenuActionUpdate

SetIsDel sets the "is_del" field.

func (*SysMenuActionUpdate) SetMemo

SetMemo sets the "memo" field.

func (*SysMenuActionUpdate) SetMenuID

func (smau *SysMenuActionUpdate) SetMenuID(s string) *SysMenuActionUpdate

SetMenuID sets the "menu_id" field.

func (*SysMenuActionUpdate) SetName

SetName sets the "name" field.

func (*SysMenuActionUpdate) SetNillableDeletedAt

func (smau *SysMenuActionUpdate) SetNillableDeletedAt(t *time.Time) *SysMenuActionUpdate

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

func (*SysMenuActionUpdate) SetNillableIsDel

func (smau *SysMenuActionUpdate) SetNillableIsDel(b *bool) *SysMenuActionUpdate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysMenuActionUpdate) SetNillableMemo

func (smau *SysMenuActionUpdate) SetNillableMemo(s *string) *SysMenuActionUpdate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysMenuActionUpdate) SetNillableSort

func (smau *SysMenuActionUpdate) SetNillableSort(i *int32) *SysMenuActionUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysMenuActionUpdate) SetNillableStatus

func (smau *SysMenuActionUpdate) SetNillableStatus(i *int16) *SysMenuActionUpdate

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

func (*SysMenuActionUpdate) SetSort

func (smau *SysMenuActionUpdate) SetSort(i int32) *SysMenuActionUpdate

SetSort sets the "sort" field.

func (*SysMenuActionUpdate) SetStatus

func (smau *SysMenuActionUpdate) SetStatus(i int16) *SysMenuActionUpdate

SetStatus sets the "status" field.

func (*SysMenuActionUpdate) SetUpdatedAt

func (smau *SysMenuActionUpdate) SetUpdatedAt(t time.Time) *SysMenuActionUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SysMenuActionUpdate) Where

Where adds a new predicate for the SysMenuActionUpdate builder.

type SysMenuActionUpdateOne

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

SysMenuActionUpdateOne is the builder for updating a single SysMenuAction entity.

func (*SysMenuActionUpdateOne) AddSort

AddSort adds i to the "sort" field.

func (*SysMenuActionUpdateOne) AddStatus

AddStatus adds i to the "status" field.

func (*SysMenuActionUpdateOne) ClearDeletedAt

func (smauo *SysMenuActionUpdateOne) ClearDeletedAt() *SysMenuActionUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysMenuActionUpdateOne) Exec

func (smauo *SysMenuActionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SysMenuActionUpdateOne) ExecX

func (smauo *SysMenuActionUpdateOne) ExecX(ctx context.Context)

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

func (*SysMenuActionUpdateOne) Mutation

func (smauo *SysMenuActionUpdateOne) Mutation() *SysMenuActionMutation

Mutation returns the SysMenuActionMutation object of the builder.

func (*SysMenuActionUpdateOne) Save

Save executes the query and returns the updated SysMenuAction entity.

func (*SysMenuActionUpdateOne) SaveX

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

func (*SysMenuActionUpdateOne) Select

func (smauo *SysMenuActionUpdateOne) Select(field string, fields ...string) *SysMenuActionUpdateOne

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

func (*SysMenuActionUpdateOne) SetCode

SetCode sets the "code" field.

func (*SysMenuActionUpdateOne) SetDeletedAt

func (smauo *SysMenuActionUpdateOne) SetDeletedAt(t time.Time) *SysMenuActionUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*SysMenuActionUpdateOne) SetInput

SetInput applies the change-set in the UpdateSysMenuActionInput on the update-one builder.

func (*SysMenuActionUpdateOne) SetIsDel

SetIsDel sets the "is_del" field.

func (*SysMenuActionUpdateOne) SetMemo

SetMemo sets the "memo" field.

func (*SysMenuActionUpdateOne) SetMenuID

SetMenuID sets the "menu_id" field.

func (*SysMenuActionUpdateOne) SetName

SetName sets the "name" field.

func (*SysMenuActionUpdateOne) SetNillableDeletedAt

func (smauo *SysMenuActionUpdateOne) SetNillableDeletedAt(t *time.Time) *SysMenuActionUpdateOne

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

func (*SysMenuActionUpdateOne) SetNillableIsDel

func (smauo *SysMenuActionUpdateOne) SetNillableIsDel(b *bool) *SysMenuActionUpdateOne

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysMenuActionUpdateOne) SetNillableMemo

func (smauo *SysMenuActionUpdateOne) SetNillableMemo(s *string) *SysMenuActionUpdateOne

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysMenuActionUpdateOne) SetNillableSort

func (smauo *SysMenuActionUpdateOne) SetNillableSort(i *int32) *SysMenuActionUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysMenuActionUpdateOne) SetNillableStatus

func (smauo *SysMenuActionUpdateOne) SetNillableStatus(i *int16) *SysMenuActionUpdateOne

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

func (*SysMenuActionUpdateOne) SetSort

SetSort sets the "sort" field.

func (*SysMenuActionUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*SysMenuActionUpdateOne) SetUpdatedAt

func (smauo *SysMenuActionUpdateOne) SetUpdatedAt(t time.Time) *SysMenuActionUpdateOne

SetUpdatedAt sets the "updated_at" field.

type SysMenuActions

type SysMenuActions []*SysMenuAction

SysMenuActions is a parsable slice of SysMenuAction.

type SysMenuClient

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

SysMenuClient is a client for the SysMenu schema.

func NewSysMenuClient

func NewSysMenuClient(c config) *SysMenuClient

NewSysMenuClient returns a client for the SysMenu from the given config.

func (*SysMenuClient) Create

func (c *SysMenuClient) Create() *SysMenuCreate

Create returns a create builder for SysMenu.

func (*SysMenuClient) CreateBulk

func (c *SysMenuClient) CreateBulk(builders ...*SysMenuCreate) *SysMenuCreateBulk

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

func (*SysMenuClient) Delete

func (c *SysMenuClient) Delete() *SysMenuDelete

Delete returns a delete builder for SysMenu.

func (*SysMenuClient) DeleteOne

func (c *SysMenuClient) DeleteOne(sm *SysMenu) *SysMenuDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SysMenuClient) DeleteOneID

func (c *SysMenuClient) DeleteOneID(id string) *SysMenuDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SysMenuClient) Get

func (c *SysMenuClient) Get(ctx context.Context, id string) (*SysMenu, error)

Get returns a SysMenu entity by its id.

func (*SysMenuClient) GetX

func (c *SysMenuClient) GetX(ctx context.Context, id string) *SysMenu

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

func (*SysMenuClient) Hooks

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

Hooks returns the client hooks.

func (*SysMenuClient) Query

func (c *SysMenuClient) Query() *SysMenuQuery

Query returns a query builder for SysMenu.

func (*SysMenuClient) Update

func (c *SysMenuClient) Update() *SysMenuUpdate

Update returns an update builder for SysMenu.

func (*SysMenuClient) UpdateOne

func (c *SysMenuClient) UpdateOne(sm *SysMenu) *SysMenuUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SysMenuClient) UpdateOneID

func (c *SysMenuClient) UpdateOneID(id string) *SysMenuUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SysMenuClient) Use

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

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

type SysMenuCreate

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

SysMenuCreate is the builder for creating a SysMenu entity.

func (*SysMenuCreate) Mutation

func (smc *SysMenuCreate) Mutation() *SysMenuMutation

Mutation returns the SysMenuMutation object of the builder.

func (*SysMenuCreate) Save

func (smc *SysMenuCreate) Save(ctx context.Context) (*SysMenu, error)

Save creates the SysMenu in the database.

func (*SysMenuCreate) SaveX

func (smc *SysMenuCreate) SaveX(ctx context.Context) *SysMenu

SaveX calls Save and panics if Save returns an error.

func (*SysMenuCreate) SetCreatedAt

func (smc *SysMenuCreate) SetCreatedAt(t time.Time) *SysMenuCreate

SetCreatedAt sets the "created_at" field.

func (*SysMenuCreate) SetDeletedAt

func (smc *SysMenuCreate) SetDeletedAt(t time.Time) *SysMenuCreate

SetDeletedAt sets the "deleted_at" field.

func (*SysMenuCreate) SetID

func (smc *SysMenuCreate) SetID(s string) *SysMenuCreate

SetID sets the "id" field.

func (*SysMenuCreate) SetIcon

func (smc *SysMenuCreate) SetIcon(s string) *SysMenuCreate

SetIcon sets the "icon" field.

func (*SysMenuCreate) SetInput

SetInput applies the change-set in the CreateSysMenuInput on the create builder.

func (*SysMenuCreate) SetIsDel

func (smc *SysMenuCreate) SetIsDel(b bool) *SysMenuCreate

SetIsDel sets the "is_del" field.

func (*SysMenuCreate) SetIsShow

func (smc *SysMenuCreate) SetIsShow(b bool) *SysMenuCreate

SetIsShow sets the "is_show" field.

func (*SysMenuCreate) SetMemo

func (smc *SysMenuCreate) SetMemo(s string) *SysMenuCreate

SetMemo sets the "memo" field.

func (*SysMenuCreate) SetName

func (smc *SysMenuCreate) SetName(s string) *SysMenuCreate

SetName sets the "name" field.

func (*SysMenuCreate) SetNillableCreatedAt

func (smc *SysMenuCreate) SetNillableCreatedAt(t *time.Time) *SysMenuCreate

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

func (*SysMenuCreate) SetNillableDeletedAt

func (smc *SysMenuCreate) SetNillableDeletedAt(t *time.Time) *SysMenuCreate

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

func (*SysMenuCreate) SetNillableID

func (smc *SysMenuCreate) SetNillableID(s *string) *SysMenuCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SysMenuCreate) SetNillableIsDel

func (smc *SysMenuCreate) SetNillableIsDel(b *bool) *SysMenuCreate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysMenuCreate) SetNillableIsShow

func (smc *SysMenuCreate) SetNillableIsShow(b *bool) *SysMenuCreate

SetNillableIsShow sets the "is_show" field if the given value is not nil.

func (*SysMenuCreate) SetNillableMemo

func (smc *SysMenuCreate) SetNillableMemo(s *string) *SysMenuCreate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysMenuCreate) SetNillableParentID

func (smc *SysMenuCreate) SetNillableParentID(s *string) *SysMenuCreate

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*SysMenuCreate) SetNillableParentPath

func (smc *SysMenuCreate) SetNillableParentPath(s *string) *SysMenuCreate

SetNillableParentPath sets the "parent_path" field if the given value is not nil.

func (*SysMenuCreate) SetNillableSort

func (smc *SysMenuCreate) SetNillableSort(i *int32) *SysMenuCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysMenuCreate) SetNillableStatus

func (smc *SysMenuCreate) SetNillableStatus(i *int16) *SysMenuCreate

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

func (*SysMenuCreate) SetNillableUpdatedAt

func (smc *SysMenuCreate) SetNillableUpdatedAt(t *time.Time) *SysMenuCreate

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

func (*SysMenuCreate) SetParentID

func (smc *SysMenuCreate) SetParentID(s string) *SysMenuCreate

SetParentID sets the "parent_id" field.

func (*SysMenuCreate) SetParentPath

func (smc *SysMenuCreate) SetParentPath(s string) *SysMenuCreate

SetParentPath sets the "parent_path" field.

func (*SysMenuCreate) SetRouter

func (smc *SysMenuCreate) SetRouter(s string) *SysMenuCreate

SetRouter sets the "router" field.

func (*SysMenuCreate) SetSort

func (smc *SysMenuCreate) SetSort(i int32) *SysMenuCreate

SetSort sets the "sort" field.

func (*SysMenuCreate) SetStatus

func (smc *SysMenuCreate) SetStatus(i int16) *SysMenuCreate

SetStatus sets the "status" field.

func (*SysMenuCreate) SetUpdatedAt

func (smc *SysMenuCreate) SetUpdatedAt(t time.Time) *SysMenuCreate

SetUpdatedAt sets the "updated_at" field.

type SysMenuCreateBulk

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

SysMenuCreateBulk is the builder for creating many SysMenu entities in bulk.

func (*SysMenuCreateBulk) Save

func (smcb *SysMenuCreateBulk) Save(ctx context.Context) ([]*SysMenu, error)

Save creates the SysMenu entities in the database.

func (*SysMenuCreateBulk) SaveX

func (smcb *SysMenuCreateBulk) SaveX(ctx context.Context) []*SysMenu

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

type SysMenuDelete

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

SysMenuDelete is the builder for deleting a SysMenu entity.

func (*SysMenuDelete) Exec

func (smd *SysMenuDelete) Exec(ctx context.Context) (int, error)

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

func (*SysMenuDelete) ExecX

func (smd *SysMenuDelete) ExecX(ctx context.Context) int

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

func (*SysMenuDelete) Where

func (smd *SysMenuDelete) Where(ps ...predicate.SysMenu) *SysMenuDelete

Where adds a new predicate to the SysMenuDelete builder.

type SysMenuDeleteOne

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

SysMenuDeleteOne is the builder for deleting a single SysMenu entity.

func (*SysMenuDeleteOne) Exec

func (smdo *SysMenuDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SysMenuDeleteOne) ExecX

func (smdo *SysMenuDeleteOne) ExecX(ctx context.Context)

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

type SysMenuGroupBy

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

SysMenuGroupBy is the group-by builder for SysMenu entities.

func (*SysMenuGroupBy) Aggregate

func (smgb *SysMenuGroupBy) Aggregate(fns ...AggregateFunc) *SysMenuGroupBy

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

func (*SysMenuGroupBy) Bool

func (smgb *SysMenuGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysMenuGroupBy) BoolX

func (smgb *SysMenuGroupBy) BoolX(ctx context.Context) bool

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

func (*SysMenuGroupBy) Bools

func (smgb *SysMenuGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SysMenuGroupBy) BoolsX

func (smgb *SysMenuGroupBy) BoolsX(ctx context.Context) []bool

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

func (*SysMenuGroupBy) Float64

func (smgb *SysMenuGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysMenuGroupBy) Float64X

func (smgb *SysMenuGroupBy) Float64X(ctx context.Context) float64

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

func (*SysMenuGroupBy) Float64s

func (smgb *SysMenuGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SysMenuGroupBy) Float64sX

func (smgb *SysMenuGroupBy) Float64sX(ctx context.Context) []float64

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

func (*SysMenuGroupBy) Int

func (smgb *SysMenuGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysMenuGroupBy) IntX

func (smgb *SysMenuGroupBy) IntX(ctx context.Context) int

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

func (*SysMenuGroupBy) Ints

func (smgb *SysMenuGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SysMenuGroupBy) IntsX

func (smgb *SysMenuGroupBy) IntsX(ctx context.Context) []int

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

func (*SysMenuGroupBy) Scan

func (smgb *SysMenuGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SysMenuGroupBy) ScanX

func (smgb *SysMenuGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*SysMenuGroupBy) String

func (smgb *SysMenuGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysMenuGroupBy) StringX

func (smgb *SysMenuGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SysMenuGroupBy) Strings

func (smgb *SysMenuGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SysMenuGroupBy) StringsX

func (smgb *SysMenuGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SysMenuMutation

type SysMenuMutation struct {
	// contains filtered or unexported fields
}

SysMenuMutation represents an operation that mutates the SysMenu nodes in the graph.

func (*SysMenuMutation) AddField

func (m *SysMenuMutation) 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 (*SysMenuMutation) AddSort

func (m *SysMenuMutation) AddSort(i int32)

AddSort adds i to the "sort" field.

func (*SysMenuMutation) AddStatus

func (m *SysMenuMutation) AddStatus(i int16)

AddStatus adds i to the "status" field.

func (*SysMenuMutation) AddedEdges

func (m *SysMenuMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SysMenuMutation) AddedField

func (m *SysMenuMutation) 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 (*SysMenuMutation) AddedFields

func (m *SysMenuMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SysMenuMutation) AddedIDs

func (m *SysMenuMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SysMenuMutation) AddedSort

func (m *SysMenuMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*SysMenuMutation) AddedStatus

func (m *SysMenuMutation) AddedStatus() (r int16, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*SysMenuMutation) ClearDeletedAt

func (m *SysMenuMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysMenuMutation) ClearEdge

func (m *SysMenuMutation) 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 (*SysMenuMutation) ClearField

func (m *SysMenuMutation) 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 (*SysMenuMutation) ClearParentID

func (m *SysMenuMutation) ClearParentID()

ClearParentID clears the value of the "parent_id" field.

func (*SysMenuMutation) ClearParentPath

func (m *SysMenuMutation) ClearParentPath()

ClearParentPath clears the value of the "parent_path" field.

func (*SysMenuMutation) ClearedEdges

func (m *SysMenuMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SysMenuMutation) ClearedFields

func (m *SysMenuMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SysMenuMutation) Client

func (m SysMenuMutation) 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 (*SysMenuMutation) CreatedAt

func (m *SysMenuMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*SysMenuMutation) DeletedAt

func (m *SysMenuMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*SysMenuMutation) DeletedAtCleared

func (m *SysMenuMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*SysMenuMutation) EdgeCleared

func (m *SysMenuMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SysMenuMutation) Field

func (m *SysMenuMutation) 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 (*SysMenuMutation) FieldCleared

func (m *SysMenuMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SysMenuMutation) Fields

func (m *SysMenuMutation) 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 (*SysMenuMutation) ID

func (m *SysMenuMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*SysMenuMutation) Icon

func (m *SysMenuMutation) Icon() (r string, exists bool)

Icon returns the value of the "icon" field in the mutation.

func (*SysMenuMutation) IsDel

func (m *SysMenuMutation) IsDel() (r bool, exists bool)

IsDel returns the value of the "is_del" field in the mutation.

func (*SysMenuMutation) IsShow

func (m *SysMenuMutation) IsShow() (r bool, exists bool)

IsShow returns the value of the "is_show" field in the mutation.

func (*SysMenuMutation) Memo

func (m *SysMenuMutation) Memo() (r string, exists bool)

Memo returns the value of the "memo" field in the mutation.

func (*SysMenuMutation) Name

func (m *SysMenuMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SysMenuMutation) OldCreatedAt

func (m *SysMenuMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the SysMenu entity. If the SysMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysMenuMutation) OldDeletedAt

func (m *SysMenuMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the SysMenu entity. If the SysMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysMenuMutation) OldField

func (m *SysMenuMutation) 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 (*SysMenuMutation) OldIcon

func (m *SysMenuMutation) OldIcon(ctx context.Context) (v string, err error)

OldIcon returns the old "icon" field's value of the SysMenu entity. If the SysMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysMenuMutation) OldIsDel

func (m *SysMenuMutation) OldIsDel(ctx context.Context) (v bool, err error)

OldIsDel returns the old "is_del" field's value of the SysMenu entity. If the SysMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysMenuMutation) OldIsShow

func (m *SysMenuMutation) OldIsShow(ctx context.Context) (v bool, err error)

OldIsShow returns the old "is_show" field's value of the SysMenu entity. If the SysMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysMenuMutation) OldMemo

func (m *SysMenuMutation) OldMemo(ctx context.Context) (v string, err error)

OldMemo returns the old "memo" field's value of the SysMenu entity. If the SysMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysMenuMutation) OldName

func (m *SysMenuMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the SysMenu entity. If the SysMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysMenuMutation) OldParentID

func (m *SysMenuMutation) OldParentID(ctx context.Context) (v *string, err error)

OldParentID returns the old "parent_id" field's value of the SysMenu entity. If the SysMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysMenuMutation) OldParentPath

func (m *SysMenuMutation) OldParentPath(ctx context.Context) (v *string, err error)

OldParentPath returns the old "parent_path" field's value of the SysMenu entity. If the SysMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysMenuMutation) OldRouter

func (m *SysMenuMutation) OldRouter(ctx context.Context) (v string, err error)

OldRouter returns the old "router" field's value of the SysMenu entity. If the SysMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysMenuMutation) OldSort

func (m *SysMenuMutation) OldSort(ctx context.Context) (v int32, err error)

OldSort returns the old "sort" field's value of the SysMenu entity. If the SysMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysMenuMutation) OldStatus

func (m *SysMenuMutation) OldStatus(ctx context.Context) (v int16, err error)

OldStatus returns the old "status" field's value of the SysMenu entity. If the SysMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysMenuMutation) OldUpdatedAt

func (m *SysMenuMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the SysMenu entity. If the SysMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysMenuMutation) Op

func (m *SysMenuMutation) Op() Op

Op returns the operation name.

func (*SysMenuMutation) ParentID

func (m *SysMenuMutation) ParentID() (r string, exists bool)

ParentID returns the value of the "parent_id" field in the mutation.

func (*SysMenuMutation) ParentIDCleared

func (m *SysMenuMutation) ParentIDCleared() bool

ParentIDCleared returns if the "parent_id" field was cleared in this mutation.

func (*SysMenuMutation) ParentPath

func (m *SysMenuMutation) ParentPath() (r string, exists bool)

ParentPath returns the value of the "parent_path" field in the mutation.

func (*SysMenuMutation) ParentPathCleared

func (m *SysMenuMutation) ParentPathCleared() bool

ParentPathCleared returns if the "parent_path" field was cleared in this mutation.

func (*SysMenuMutation) RemovedEdges

func (m *SysMenuMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SysMenuMutation) RemovedIDs

func (m *SysMenuMutation) 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 (*SysMenuMutation) ResetCreatedAt

func (m *SysMenuMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SysMenuMutation) ResetDeletedAt

func (m *SysMenuMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*SysMenuMutation) ResetEdge

func (m *SysMenuMutation) 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 (*SysMenuMutation) ResetField

func (m *SysMenuMutation) 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 (*SysMenuMutation) ResetIcon

func (m *SysMenuMutation) ResetIcon()

ResetIcon resets all changes to the "icon" field.

func (*SysMenuMutation) ResetIsDel

func (m *SysMenuMutation) ResetIsDel()

ResetIsDel resets all changes to the "is_del" field.

func (*SysMenuMutation) ResetIsShow

func (m *SysMenuMutation) ResetIsShow()

ResetIsShow resets all changes to the "is_show" field.

func (*SysMenuMutation) ResetMemo

func (m *SysMenuMutation) ResetMemo()

ResetMemo resets all changes to the "memo" field.

func (*SysMenuMutation) ResetName

func (m *SysMenuMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SysMenuMutation) ResetParentID

func (m *SysMenuMutation) ResetParentID()

ResetParentID resets all changes to the "parent_id" field.

func (*SysMenuMutation) ResetParentPath

func (m *SysMenuMutation) ResetParentPath()

ResetParentPath resets all changes to the "parent_path" field.

func (*SysMenuMutation) ResetRouter

func (m *SysMenuMutation) ResetRouter()

ResetRouter resets all changes to the "router" field.

func (*SysMenuMutation) ResetSort

func (m *SysMenuMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*SysMenuMutation) ResetStatus

func (m *SysMenuMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*SysMenuMutation) ResetUpdatedAt

func (m *SysMenuMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SysMenuMutation) Router

func (m *SysMenuMutation) Router() (r string, exists bool)

Router returns the value of the "router" field in the mutation.

func (*SysMenuMutation) SetCreatedAt

func (m *SysMenuMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*SysMenuMutation) SetDeletedAt

func (m *SysMenuMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*SysMenuMutation) SetField

func (m *SysMenuMutation) 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 (*SysMenuMutation) SetID

func (m *SysMenuMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of SysMenu entities.

func (*SysMenuMutation) SetIcon

func (m *SysMenuMutation) SetIcon(s string)

SetIcon sets the "icon" field.

func (*SysMenuMutation) SetIsDel

func (m *SysMenuMutation) SetIsDel(b bool)

SetIsDel sets the "is_del" field.

func (*SysMenuMutation) SetIsShow

func (m *SysMenuMutation) SetIsShow(b bool)

SetIsShow sets the "is_show" field.

func (*SysMenuMutation) SetMemo

func (m *SysMenuMutation) SetMemo(s string)

SetMemo sets the "memo" field.

func (*SysMenuMutation) SetName

func (m *SysMenuMutation) SetName(s string)

SetName sets the "name" field.

func (*SysMenuMutation) SetParentID

func (m *SysMenuMutation) SetParentID(s string)

SetParentID sets the "parent_id" field.

func (*SysMenuMutation) SetParentPath

func (m *SysMenuMutation) SetParentPath(s string)

SetParentPath sets the "parent_path" field.

func (*SysMenuMutation) SetRouter

func (m *SysMenuMutation) SetRouter(s string)

SetRouter sets the "router" field.

func (*SysMenuMutation) SetSort

func (m *SysMenuMutation) SetSort(i int32)

SetSort sets the "sort" field.

func (*SysMenuMutation) SetStatus

func (m *SysMenuMutation) SetStatus(i int16)

SetStatus sets the "status" field.

func (*SysMenuMutation) SetUpdatedAt

func (m *SysMenuMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*SysMenuMutation) Sort

func (m *SysMenuMutation) Sort() (r int32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*SysMenuMutation) Status

func (m *SysMenuMutation) Status() (r int16, exists bool)

Status returns the value of the "status" field in the mutation.

func (SysMenuMutation) Tx

func (m SysMenuMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SysMenuMutation) Type

func (m *SysMenuMutation) Type() string

Type returns the node type of this mutation (SysMenu).

func (*SysMenuMutation) UpdatedAt

func (m *SysMenuMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

type SysMenuQuery

type SysMenuQuery struct {
	// contains filtered or unexported fields
}

SysMenuQuery is the builder for querying SysMenu entities.

func (*SysMenuQuery) All

func (smq *SysMenuQuery) All(ctx context.Context) ([]*SysMenu, error)

All executes the query and returns a list of SysMenus.

func (*SysMenuQuery) AllX

func (smq *SysMenuQuery) AllX(ctx context.Context) []*SysMenu

AllX is like All, but panics if an error occurs.

func (*SysMenuQuery) Clone

func (smq *SysMenuQuery) Clone() *SysMenuQuery

Clone returns a duplicate of the SysMenuQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SysMenuQuery) Count

func (smq *SysMenuQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SysMenuQuery) CountX

func (smq *SysMenuQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SysMenuQuery) Exist

func (smq *SysMenuQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SysMenuQuery) ExistX

func (smq *SysMenuQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SysMenuQuery) First

func (smq *SysMenuQuery) First(ctx context.Context) (*SysMenu, error)

First returns the first SysMenu entity from the query. Returns a *NotFoundError when no SysMenu was found.

func (*SysMenuQuery) FirstID

func (smq *SysMenuQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first SysMenu ID from the query. Returns a *NotFoundError when no SysMenu ID was found.

func (*SysMenuQuery) FirstIDX

func (smq *SysMenuQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*SysMenuQuery) FirstX

func (smq *SysMenuQuery) FirstX(ctx context.Context) *SysMenu

FirstX is like First, but panics if an error occurs.

func (*SysMenuQuery) GroupBy

func (smq *SysMenuQuery) GroupBy(field string, fields ...string) *SysMenuGroupBy

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 {
	IsDel bool `json:"is_del,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SysMenu.Query().
	GroupBy(sysmenu.FieldIsDel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SysMenuQuery) IDs

func (smq *SysMenuQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of SysMenu IDs.

func (*SysMenuQuery) IDsX

func (smq *SysMenuQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*SysMenuQuery) Limit

func (smq *SysMenuQuery) Limit(limit int) *SysMenuQuery

Limit adds a limit step to the query.

func (*SysMenuQuery) Offset

func (smq *SysMenuQuery) Offset(offset int) *SysMenuQuery

Offset adds an offset step to the query.

func (*SysMenuQuery) Only

func (smq *SysMenuQuery) Only(ctx context.Context) (*SysMenu, error)

Only returns a single SysMenu entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one SysMenu entity is not found. Returns a *NotFoundError when no SysMenu entities are found.

func (*SysMenuQuery) OnlyID

func (smq *SysMenuQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only SysMenu ID in the query. Returns a *NotSingularError when exactly one SysMenu ID is not found. Returns a *NotFoundError when no entities are found.

func (*SysMenuQuery) OnlyIDX

func (smq *SysMenuQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SysMenuQuery) OnlyX

func (smq *SysMenuQuery) OnlyX(ctx context.Context) *SysMenu

OnlyX is like Only, but panics if an error occurs.

func (*SysMenuQuery) Order

func (smq *SysMenuQuery) Order(o ...OrderFunc) *SysMenuQuery

Order adds an order step to the query.

func (*SysMenuQuery) Select

func (smq *SysMenuQuery) Select(field string, fields ...string) *SysMenuSelect

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 {
	IsDel bool `json:"is_del,omitempty"`
}

client.SysMenu.Query().
	Select(sysmenu.FieldIsDel).
	Scan(ctx, &v)

func (*SysMenuQuery) Unique

func (smq *SysMenuQuery) Unique(unique bool) *SysMenuQuery

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 (*SysMenuQuery) Where

func (smq *SysMenuQuery) Where(ps ...predicate.SysMenu) *SysMenuQuery

Where adds a new predicate for the SysMenuQuery builder.

type SysMenuSelect

type SysMenuSelect struct {
	*SysMenuQuery
	// contains filtered or unexported fields
}

SysMenuSelect is the builder for selecting fields of SysMenu entities.

func (*SysMenuSelect) Bool

func (sms *SysMenuSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SysMenuSelect) BoolX

func (sms *SysMenuSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SysMenuSelect) Bools

func (sms *SysMenuSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SysMenuSelect) BoolsX

func (sms *SysMenuSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SysMenuSelect) Float64

func (sms *SysMenuSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SysMenuSelect) Float64X

func (sms *SysMenuSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SysMenuSelect) Float64s

func (sms *SysMenuSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SysMenuSelect) Float64sX

func (sms *SysMenuSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SysMenuSelect) Int

func (sms *SysMenuSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SysMenuSelect) IntX

func (sms *SysMenuSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SysMenuSelect) Ints

func (sms *SysMenuSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SysMenuSelect) IntsX

func (sms *SysMenuSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SysMenuSelect) Scan

func (sms *SysMenuSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*SysMenuSelect) ScanX

func (sms *SysMenuSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SysMenuSelect) String

func (sms *SysMenuSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SysMenuSelect) StringX

func (sms *SysMenuSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SysMenuSelect) Strings

func (sms *SysMenuSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SysMenuSelect) StringsX

func (sms *SysMenuSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SysMenuUpdate

type SysMenuUpdate struct {
	// contains filtered or unexported fields
}

SysMenuUpdate is the builder for updating SysMenu entities.

func (*SysMenuUpdate) AddSort

func (smu *SysMenuUpdate) AddSort(i int32) *SysMenuUpdate

AddSort adds i to the "sort" field.

func (*SysMenuUpdate) AddStatus

func (smu *SysMenuUpdate) AddStatus(i int16) *SysMenuUpdate

AddStatus adds i to the "status" field.

func (*SysMenuUpdate) ClearDeletedAt

func (smu *SysMenuUpdate) ClearDeletedAt() *SysMenuUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysMenuUpdate) ClearParentID

func (smu *SysMenuUpdate) ClearParentID() *SysMenuUpdate

ClearParentID clears the value of the "parent_id" field.

func (*SysMenuUpdate) ClearParentPath

func (smu *SysMenuUpdate) ClearParentPath() *SysMenuUpdate

ClearParentPath clears the value of the "parent_path" field.

func (*SysMenuUpdate) Exec

func (smu *SysMenuUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SysMenuUpdate) ExecX

func (smu *SysMenuUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SysMenuUpdate) Mutation

func (smu *SysMenuUpdate) Mutation() *SysMenuMutation

Mutation returns the SysMenuMutation object of the builder.

func (*SysMenuUpdate) Save

func (smu *SysMenuUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SysMenuUpdate) SaveX

func (smu *SysMenuUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SysMenuUpdate) SetDeletedAt

func (smu *SysMenuUpdate) SetDeletedAt(t time.Time) *SysMenuUpdate

SetDeletedAt sets the "deleted_at" field.

func (*SysMenuUpdate) SetIcon

func (smu *SysMenuUpdate) SetIcon(s string) *SysMenuUpdate

SetIcon sets the "icon" field.

func (*SysMenuUpdate) SetInput

SetInput applies the change-set in the UpdateSysMenuInput on the update builder.

func (*SysMenuUpdate) SetIsDel

func (smu *SysMenuUpdate) SetIsDel(b bool) *SysMenuUpdate

SetIsDel sets the "is_del" field.

func (*SysMenuUpdate) SetIsShow

func (smu *SysMenuUpdate) SetIsShow(b bool) *SysMenuUpdate

SetIsShow sets the "is_show" field.

func (*SysMenuUpdate) SetMemo

func (smu *SysMenuUpdate) SetMemo(s string) *SysMenuUpdate

SetMemo sets the "memo" field.

func (*SysMenuUpdate) SetName

func (smu *SysMenuUpdate) SetName(s string) *SysMenuUpdate

SetName sets the "name" field.

func (*SysMenuUpdate) SetNillableDeletedAt

func (smu *SysMenuUpdate) SetNillableDeletedAt(t *time.Time) *SysMenuUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysMenuUpdate) SetNillableIsDel

func (smu *SysMenuUpdate) SetNillableIsDel(b *bool) *SysMenuUpdate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysMenuUpdate) SetNillableIsShow

func (smu *SysMenuUpdate) SetNillableIsShow(b *bool) *SysMenuUpdate

SetNillableIsShow sets the "is_show" field if the given value is not nil.

func (*SysMenuUpdate) SetNillableMemo

func (smu *SysMenuUpdate) SetNillableMemo(s *string) *SysMenuUpdate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysMenuUpdate) SetNillableParentID

func (smu *SysMenuUpdate) SetNillableParentID(s *string) *SysMenuUpdate

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*SysMenuUpdate) SetNillableParentPath

func (smu *SysMenuUpdate) SetNillableParentPath(s *string) *SysMenuUpdate

SetNillableParentPath sets the "parent_path" field if the given value is not nil.

func (*SysMenuUpdate) SetNillableSort

func (smu *SysMenuUpdate) SetNillableSort(i *int32) *SysMenuUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysMenuUpdate) SetNillableStatus

func (smu *SysMenuUpdate) SetNillableStatus(i *int16) *SysMenuUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*SysMenuUpdate) SetParentID

func (smu *SysMenuUpdate) SetParentID(s string) *SysMenuUpdate

SetParentID sets the "parent_id" field.

func (*SysMenuUpdate) SetParentPath

func (smu *SysMenuUpdate) SetParentPath(s string) *SysMenuUpdate

SetParentPath sets the "parent_path" field.

func (*SysMenuUpdate) SetRouter

func (smu *SysMenuUpdate) SetRouter(s string) *SysMenuUpdate

SetRouter sets the "router" field.

func (*SysMenuUpdate) SetSort

func (smu *SysMenuUpdate) SetSort(i int32) *SysMenuUpdate

SetSort sets the "sort" field.

func (*SysMenuUpdate) SetStatus

func (smu *SysMenuUpdate) SetStatus(i int16) *SysMenuUpdate

SetStatus sets the "status" field.

func (*SysMenuUpdate) SetUpdatedAt

func (smu *SysMenuUpdate) SetUpdatedAt(t time.Time) *SysMenuUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SysMenuUpdate) Where

func (smu *SysMenuUpdate) Where(ps ...predicate.SysMenu) *SysMenuUpdate

Where adds a new predicate for the SysMenuUpdate builder.

type SysMenuUpdateOne

type SysMenuUpdateOne struct {
	// contains filtered or unexported fields
}

SysMenuUpdateOne is the builder for updating a single SysMenu entity.

func (*SysMenuUpdateOne) AddSort

func (smuo *SysMenuUpdateOne) AddSort(i int32) *SysMenuUpdateOne

AddSort adds i to the "sort" field.

func (*SysMenuUpdateOne) AddStatus

func (smuo *SysMenuUpdateOne) AddStatus(i int16) *SysMenuUpdateOne

AddStatus adds i to the "status" field.

func (*SysMenuUpdateOne) ClearDeletedAt

func (smuo *SysMenuUpdateOne) ClearDeletedAt() *SysMenuUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysMenuUpdateOne) ClearParentID

func (smuo *SysMenuUpdateOne) ClearParentID() *SysMenuUpdateOne

ClearParentID clears the value of the "parent_id" field.

func (*SysMenuUpdateOne) ClearParentPath

func (smuo *SysMenuUpdateOne) ClearParentPath() *SysMenuUpdateOne

ClearParentPath clears the value of the "parent_path" field.

func (*SysMenuUpdateOne) Exec

func (smuo *SysMenuUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SysMenuUpdateOne) ExecX

func (smuo *SysMenuUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SysMenuUpdateOne) Mutation

func (smuo *SysMenuUpdateOne) Mutation() *SysMenuMutation

Mutation returns the SysMenuMutation object of the builder.

func (*SysMenuUpdateOne) Save

func (smuo *SysMenuUpdateOne) Save(ctx context.Context) (*SysMenu, error)

Save executes the query and returns the updated SysMenu entity.

func (*SysMenuUpdateOne) SaveX

func (smuo *SysMenuUpdateOne) SaveX(ctx context.Context) *SysMenu

SaveX is like Save, but panics if an error occurs.

func (*SysMenuUpdateOne) Select

func (smuo *SysMenuUpdateOne) Select(field string, fields ...string) *SysMenuUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SysMenuUpdateOne) SetDeletedAt

func (smuo *SysMenuUpdateOne) SetDeletedAt(t time.Time) *SysMenuUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*SysMenuUpdateOne) SetIcon

func (smuo *SysMenuUpdateOne) SetIcon(s string) *SysMenuUpdateOne

SetIcon sets the "icon" field.

func (*SysMenuUpdateOne) SetInput

SetInput applies the change-set in the UpdateSysMenuInput on the update-one builder.

func (*SysMenuUpdateOne) SetIsDel

func (smuo *SysMenuUpdateOne) SetIsDel(b bool) *SysMenuUpdateOne

SetIsDel sets the "is_del" field.

func (*SysMenuUpdateOne) SetIsShow

func (smuo *SysMenuUpdateOne) SetIsShow(b bool) *SysMenuUpdateOne

SetIsShow sets the "is_show" field.

func (*SysMenuUpdateOne) SetMemo

func (smuo *SysMenuUpdateOne) SetMemo(s string) *SysMenuUpdateOne

SetMemo sets the "memo" field.

func (*SysMenuUpdateOne) SetName

func (smuo *SysMenuUpdateOne) SetName(s string) *SysMenuUpdateOne

SetName sets the "name" field.

func (*SysMenuUpdateOne) SetNillableDeletedAt

func (smuo *SysMenuUpdateOne) SetNillableDeletedAt(t *time.Time) *SysMenuUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysMenuUpdateOne) SetNillableIsDel

func (smuo *SysMenuUpdateOne) SetNillableIsDel(b *bool) *SysMenuUpdateOne

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysMenuUpdateOne) SetNillableIsShow

func (smuo *SysMenuUpdateOne) SetNillableIsShow(b *bool) *SysMenuUpdateOne

SetNillableIsShow sets the "is_show" field if the given value is not nil.

func (*SysMenuUpdateOne) SetNillableMemo

func (smuo *SysMenuUpdateOne) SetNillableMemo(s *string) *SysMenuUpdateOne

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysMenuUpdateOne) SetNillableParentID

func (smuo *SysMenuUpdateOne) SetNillableParentID(s *string) *SysMenuUpdateOne

SetNillableParentID sets the "parent_id" field if the given value is not nil.

func (*SysMenuUpdateOne) SetNillableParentPath

func (smuo *SysMenuUpdateOne) SetNillableParentPath(s *string) *SysMenuUpdateOne

SetNillableParentPath sets the "parent_path" field if the given value is not nil.

func (*SysMenuUpdateOne) SetNillableSort

func (smuo *SysMenuUpdateOne) SetNillableSort(i *int32) *SysMenuUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysMenuUpdateOne) SetNillableStatus

func (smuo *SysMenuUpdateOne) SetNillableStatus(i *int16) *SysMenuUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*SysMenuUpdateOne) SetParentID

func (smuo *SysMenuUpdateOne) SetParentID(s string) *SysMenuUpdateOne

SetParentID sets the "parent_id" field.

func (*SysMenuUpdateOne) SetParentPath

func (smuo *SysMenuUpdateOne) SetParentPath(s string) *SysMenuUpdateOne

SetParentPath sets the "parent_path" field.

func (*SysMenuUpdateOne) SetRouter

func (smuo *SysMenuUpdateOne) SetRouter(s string) *SysMenuUpdateOne

SetRouter sets the "router" field.

func (*SysMenuUpdateOne) SetSort

func (smuo *SysMenuUpdateOne) SetSort(i int32) *SysMenuUpdateOne

SetSort sets the "sort" field.

func (*SysMenuUpdateOne) SetStatus

func (smuo *SysMenuUpdateOne) SetStatus(i int16) *SysMenuUpdateOne

SetStatus sets the "status" field.

func (*SysMenuUpdateOne) SetUpdatedAt

func (smuo *SysMenuUpdateOne) SetUpdatedAt(t time.Time) *SysMenuUpdateOne

SetUpdatedAt sets the "updated_at" field.

type SysMenus

type SysMenus []*SysMenu

SysMenus is a parsable slice of SysMenu.

type SysRole

type SysRole struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// IsDel holds the value of the "is_del" field.
	// 是否删除
	IsDel bool `json:"is_del,omitempty"`
	// Status holds the value of the "status" field.
	// 状态,
	Status int16 `json:"status,omitempty"`
	// Sort holds the value of the "sort" field.
	// 排序, 在数据库里的排序
	Sort int32 `json:"sort,omitempty"`
	// Memo holds the value of the "memo" field.
	// 备注
	Memo string `json:"memo,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	// 创建时间,由程序自动生成
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	// 更新时间,由程序自动生成
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	// 删除时间,
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// Name holds the value of the "name" field.
	// 角色名称
	Name string `json:"name,omitempty"`
	// contains filtered or unexported fields
}

SysRole is the model entity for the SysRole schema.

func (*SysRole) String

func (sr *SysRole) String() string

String implements the fmt.Stringer.

func (*SysRole) Unwrap

func (sr *SysRole) Unwrap() *SysRole

Unwrap unwraps the SysRole 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 (*SysRole) Update

func (sr *SysRole) Update() *SysRoleUpdateOne

Update returns a builder for updating this SysRole. Note that you need to call SysRole.Unwrap() before calling this method if this SysRole was returned from a transaction, and the transaction was committed or rolled back.

type SysRoleClient

type SysRoleClient struct {
	// contains filtered or unexported fields
}

SysRoleClient is a client for the SysRole schema.

func NewSysRoleClient

func NewSysRoleClient(c config) *SysRoleClient

NewSysRoleClient returns a client for the SysRole from the given config.

func (*SysRoleClient) Create

func (c *SysRoleClient) Create() *SysRoleCreate

Create returns a create builder for SysRole.

func (*SysRoleClient) CreateBulk

func (c *SysRoleClient) CreateBulk(builders ...*SysRoleCreate) *SysRoleCreateBulk

CreateBulk returns a builder for creating a bulk of SysRole entities.

func (*SysRoleClient) Delete

func (c *SysRoleClient) Delete() *SysRoleDelete

Delete returns a delete builder for SysRole.

func (*SysRoleClient) DeleteOne

func (c *SysRoleClient) DeleteOne(sr *SysRole) *SysRoleDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SysRoleClient) DeleteOneID

func (c *SysRoleClient) DeleteOneID(id string) *SysRoleDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SysRoleClient) Get

func (c *SysRoleClient) Get(ctx context.Context, id string) (*SysRole, error)

Get returns a SysRole entity by its id.

func (*SysRoleClient) GetX

func (c *SysRoleClient) GetX(ctx context.Context, id string) *SysRole

GetX is like Get, but panics if an error occurs.

func (*SysRoleClient) Hooks

func (c *SysRoleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SysRoleClient) Query

func (c *SysRoleClient) Query() *SysRoleQuery

Query returns a query builder for SysRole.

func (*SysRoleClient) Update

func (c *SysRoleClient) Update() *SysRoleUpdate

Update returns an update builder for SysRole.

func (*SysRoleClient) UpdateOne

func (c *SysRoleClient) UpdateOne(sr *SysRole) *SysRoleUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SysRoleClient) UpdateOneID

func (c *SysRoleClient) UpdateOneID(id string) *SysRoleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SysRoleClient) Use

func (c *SysRoleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sysrole.Hooks(f(g(h())))`.

type SysRoleCreate

type SysRoleCreate struct {
	// contains filtered or unexported fields
}

SysRoleCreate is the builder for creating a SysRole entity.

func (*SysRoleCreate) Mutation

func (src *SysRoleCreate) Mutation() *SysRoleMutation

Mutation returns the SysRoleMutation object of the builder.

func (*SysRoleCreate) Save

func (src *SysRoleCreate) Save(ctx context.Context) (*SysRole, error)

Save creates the SysRole in the database.

func (*SysRoleCreate) SaveX

func (src *SysRoleCreate) SaveX(ctx context.Context) *SysRole

SaveX calls Save and panics if Save returns an error.

func (*SysRoleCreate) SetCreatedAt

func (src *SysRoleCreate) SetCreatedAt(t time.Time) *SysRoleCreate

SetCreatedAt sets the "created_at" field.

func (*SysRoleCreate) SetDeletedAt

func (src *SysRoleCreate) SetDeletedAt(t time.Time) *SysRoleCreate

SetDeletedAt sets the "deleted_at" field.

func (*SysRoleCreate) SetID

func (src *SysRoleCreate) SetID(s string) *SysRoleCreate

SetID sets the "id" field.

func (*SysRoleCreate) SetInput

SetInput applies the change-set in the CreateSysRoleInput on the create builder.

func (*SysRoleCreate) SetIsDel

func (src *SysRoleCreate) SetIsDel(b bool) *SysRoleCreate

SetIsDel sets the "is_del" field.

func (*SysRoleCreate) SetMemo

func (src *SysRoleCreate) SetMemo(s string) *SysRoleCreate

SetMemo sets the "memo" field.

func (*SysRoleCreate) SetName

func (src *SysRoleCreate) SetName(s string) *SysRoleCreate

SetName sets the "name" field.

func (*SysRoleCreate) SetNillableCreatedAt

func (src *SysRoleCreate) SetNillableCreatedAt(t *time.Time) *SysRoleCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*SysRoleCreate) SetNillableDeletedAt

func (src *SysRoleCreate) SetNillableDeletedAt(t *time.Time) *SysRoleCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysRoleCreate) SetNillableID

func (src *SysRoleCreate) SetNillableID(s *string) *SysRoleCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SysRoleCreate) SetNillableIsDel

func (src *SysRoleCreate) SetNillableIsDel(b *bool) *SysRoleCreate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysRoleCreate) SetNillableMemo

func (src *SysRoleCreate) SetNillableMemo(s *string) *SysRoleCreate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysRoleCreate) SetNillableSort

func (src *SysRoleCreate) SetNillableSort(i *int32) *SysRoleCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysRoleCreate) SetNillableStatus

func (src *SysRoleCreate) SetNillableStatus(i *int16) *SysRoleCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*SysRoleCreate) SetNillableUpdatedAt

func (src *SysRoleCreate) SetNillableUpdatedAt(t *time.Time) *SysRoleCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SysRoleCreate) SetSort

func (src *SysRoleCreate) SetSort(i int32) *SysRoleCreate

SetSort sets the "sort" field.

func (*SysRoleCreate) SetStatus

func (src *SysRoleCreate) SetStatus(i int16) *SysRoleCreate

SetStatus sets the "status" field.

func (*SysRoleCreate) SetUpdatedAt

func (src *SysRoleCreate) SetUpdatedAt(t time.Time) *SysRoleCreate

SetUpdatedAt sets the "updated_at" field.

type SysRoleCreateBulk

type SysRoleCreateBulk struct {
	// contains filtered or unexported fields
}

SysRoleCreateBulk is the builder for creating many SysRole entities in bulk.

func (*SysRoleCreateBulk) Save

func (srcb *SysRoleCreateBulk) Save(ctx context.Context) ([]*SysRole, error)

Save creates the SysRole entities in the database.

func (*SysRoleCreateBulk) SaveX

func (srcb *SysRoleCreateBulk) SaveX(ctx context.Context) []*SysRole

SaveX is like Save, but panics if an error occurs.

type SysRoleDelete

type SysRoleDelete struct {
	// contains filtered or unexported fields
}

SysRoleDelete is the builder for deleting a SysRole entity.

func (*SysRoleDelete) Exec

func (srd *SysRoleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SysRoleDelete) ExecX

func (srd *SysRoleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SysRoleDelete) Where

func (srd *SysRoleDelete) Where(ps ...predicate.SysRole) *SysRoleDelete

Where adds a new predicate to the SysRoleDelete builder.

type SysRoleDeleteOne

type SysRoleDeleteOne struct {
	// contains filtered or unexported fields
}

SysRoleDeleteOne is the builder for deleting a single SysRole entity.

func (*SysRoleDeleteOne) Exec

func (srdo *SysRoleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SysRoleDeleteOne) ExecX

func (srdo *SysRoleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type SysRoleGroupBy

type SysRoleGroupBy struct {
	// contains filtered or unexported fields
}

SysRoleGroupBy is the group-by builder for SysRole entities.

func (*SysRoleGroupBy) Aggregate

func (srgb *SysRoleGroupBy) Aggregate(fns ...AggregateFunc) *SysRoleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SysRoleGroupBy) Bool

func (srgb *SysRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysRoleGroupBy) BoolX

func (srgb *SysRoleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SysRoleGroupBy) Bools

func (srgb *SysRoleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SysRoleGroupBy) BoolsX

func (srgb *SysRoleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SysRoleGroupBy) Float64

func (srgb *SysRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysRoleGroupBy) Float64X

func (srgb *SysRoleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SysRoleGroupBy) Float64s

func (srgb *SysRoleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SysRoleGroupBy) Float64sX

func (srgb *SysRoleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SysRoleGroupBy) Int

func (srgb *SysRoleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysRoleGroupBy) IntX

func (srgb *SysRoleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SysRoleGroupBy) Ints

func (srgb *SysRoleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SysRoleGroupBy) IntsX

func (srgb *SysRoleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SysRoleGroupBy) Scan

func (srgb *SysRoleGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SysRoleGroupBy) ScanX

func (srgb *SysRoleGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SysRoleGroupBy) String

func (srgb *SysRoleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysRoleGroupBy) StringX

func (srgb *SysRoleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SysRoleGroupBy) Strings

func (srgb *SysRoleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SysRoleGroupBy) StringsX

func (srgb *SysRoleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SysRoleMenu

type SysRoleMenu struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// IsDel holds the value of the "is_del" field.
	// 是否删除
	IsDel bool `json:"is_del,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	// 创建时间,由程序自动生成
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	// 更新时间,由程序自动生成
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	// 删除时间,
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// RoleID holds the value of the "role_id" field.
	// 角色ID, sys_role.id
	RoleID string `json:"role_id,omitempty"`
	// MenuID holds the value of the "menu_id" field.
	// 菜单ID
	MenuID string `json:"menu_id,omitempty"`
	// ActionID holds the value of the "action_id" field.
	// 菜单ID, sys_menu_action.id
	ActionID *string `json:"action_id,omitempty"`
	// contains filtered or unexported fields
}

SysRoleMenu is the model entity for the SysRoleMenu schema.

func (*SysRoleMenu) String

func (srm *SysRoleMenu) String() string

String implements the fmt.Stringer.

func (*SysRoleMenu) Unwrap

func (srm *SysRoleMenu) Unwrap() *SysRoleMenu

Unwrap unwraps the SysRoleMenu 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 (*SysRoleMenu) Update

func (srm *SysRoleMenu) Update() *SysRoleMenuUpdateOne

Update returns a builder for updating this SysRoleMenu. Note that you need to call SysRoleMenu.Unwrap() before calling this method if this SysRoleMenu was returned from a transaction, and the transaction was committed or rolled back.

type SysRoleMenuClient

type SysRoleMenuClient struct {
	// contains filtered or unexported fields
}

SysRoleMenuClient is a client for the SysRoleMenu schema.

func NewSysRoleMenuClient

func NewSysRoleMenuClient(c config) *SysRoleMenuClient

NewSysRoleMenuClient returns a client for the SysRoleMenu from the given config.

func (*SysRoleMenuClient) Create

func (c *SysRoleMenuClient) Create() *SysRoleMenuCreate

Create returns a create builder for SysRoleMenu.

func (*SysRoleMenuClient) CreateBulk

func (c *SysRoleMenuClient) CreateBulk(builders ...*SysRoleMenuCreate) *SysRoleMenuCreateBulk

CreateBulk returns a builder for creating a bulk of SysRoleMenu entities.

func (*SysRoleMenuClient) Delete

func (c *SysRoleMenuClient) Delete() *SysRoleMenuDelete

Delete returns a delete builder for SysRoleMenu.

func (*SysRoleMenuClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SysRoleMenuClient) DeleteOneID

func (c *SysRoleMenuClient) DeleteOneID(id string) *SysRoleMenuDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SysRoleMenuClient) Get

Get returns a SysRoleMenu entity by its id.

func (*SysRoleMenuClient) GetX

GetX is like Get, but panics if an error occurs.

func (*SysRoleMenuClient) Hooks

func (c *SysRoleMenuClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SysRoleMenuClient) Query

func (c *SysRoleMenuClient) Query() *SysRoleMenuQuery

Query returns a query builder for SysRoleMenu.

func (*SysRoleMenuClient) Update

func (c *SysRoleMenuClient) Update() *SysRoleMenuUpdate

Update returns an update builder for SysRoleMenu.

func (*SysRoleMenuClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SysRoleMenuClient) UpdateOneID

func (c *SysRoleMenuClient) UpdateOneID(id string) *SysRoleMenuUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SysRoleMenuClient) Use

func (c *SysRoleMenuClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sysrolemenu.Hooks(f(g(h())))`.

type SysRoleMenuCreate

type SysRoleMenuCreate struct {
	// contains filtered or unexported fields
}

SysRoleMenuCreate is the builder for creating a SysRoleMenu entity.

func (*SysRoleMenuCreate) Mutation

func (srmc *SysRoleMenuCreate) Mutation() *SysRoleMenuMutation

Mutation returns the SysRoleMenuMutation object of the builder.

func (*SysRoleMenuCreate) Save

func (srmc *SysRoleMenuCreate) Save(ctx context.Context) (*SysRoleMenu, error)

Save creates the SysRoleMenu in the database.

func (*SysRoleMenuCreate) SaveX

func (srmc *SysRoleMenuCreate) SaveX(ctx context.Context) *SysRoleMenu

SaveX calls Save and panics if Save returns an error.

func (*SysRoleMenuCreate) SetActionID

func (srmc *SysRoleMenuCreate) SetActionID(s string) *SysRoleMenuCreate

SetActionID sets the "action_id" field.

func (*SysRoleMenuCreate) SetCreatedAt

func (srmc *SysRoleMenuCreate) SetCreatedAt(t time.Time) *SysRoleMenuCreate

SetCreatedAt sets the "created_at" field.

func (*SysRoleMenuCreate) SetDeletedAt

func (srmc *SysRoleMenuCreate) SetDeletedAt(t time.Time) *SysRoleMenuCreate

SetDeletedAt sets the "deleted_at" field.

func (*SysRoleMenuCreate) SetID

func (srmc *SysRoleMenuCreate) SetID(s string) *SysRoleMenuCreate

SetID sets the "id" field.

func (*SysRoleMenuCreate) SetInput

SetInput applies the change-set in the CreateSysRoleMenuInput on the create builder.

func (*SysRoleMenuCreate) SetIsDel

func (srmc *SysRoleMenuCreate) SetIsDel(b bool) *SysRoleMenuCreate

SetIsDel sets the "is_del" field.

func (*SysRoleMenuCreate) SetMenuID

func (srmc *SysRoleMenuCreate) SetMenuID(s string) *SysRoleMenuCreate

SetMenuID sets the "menu_id" field.

func (*SysRoleMenuCreate) SetNillableActionID

func (srmc *SysRoleMenuCreate) SetNillableActionID(s *string) *SysRoleMenuCreate

SetNillableActionID sets the "action_id" field if the given value is not nil.

func (*SysRoleMenuCreate) SetNillableCreatedAt

func (srmc *SysRoleMenuCreate) SetNillableCreatedAt(t *time.Time) *SysRoleMenuCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*SysRoleMenuCreate) SetNillableDeletedAt

func (srmc *SysRoleMenuCreate) SetNillableDeletedAt(t *time.Time) *SysRoleMenuCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysRoleMenuCreate) SetNillableID

func (srmc *SysRoleMenuCreate) SetNillableID(s *string) *SysRoleMenuCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SysRoleMenuCreate) SetNillableIsDel

func (srmc *SysRoleMenuCreate) SetNillableIsDel(b *bool) *SysRoleMenuCreate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysRoleMenuCreate) SetNillableUpdatedAt

func (srmc *SysRoleMenuCreate) SetNillableUpdatedAt(t *time.Time) *SysRoleMenuCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SysRoleMenuCreate) SetRoleID

func (srmc *SysRoleMenuCreate) SetRoleID(s string) *SysRoleMenuCreate

SetRoleID sets the "role_id" field.

func (*SysRoleMenuCreate) SetUpdatedAt

func (srmc *SysRoleMenuCreate) SetUpdatedAt(t time.Time) *SysRoleMenuCreate

SetUpdatedAt sets the "updated_at" field.

type SysRoleMenuCreateBulk

type SysRoleMenuCreateBulk struct {
	// contains filtered or unexported fields
}

SysRoleMenuCreateBulk is the builder for creating many SysRoleMenu entities in bulk.

func (*SysRoleMenuCreateBulk) Save

func (srmcb *SysRoleMenuCreateBulk) Save(ctx context.Context) ([]*SysRoleMenu, error)

Save creates the SysRoleMenu entities in the database.

func (*SysRoleMenuCreateBulk) SaveX

func (srmcb *SysRoleMenuCreateBulk) SaveX(ctx context.Context) []*SysRoleMenu

SaveX is like Save, but panics if an error occurs.

type SysRoleMenuDelete

type SysRoleMenuDelete struct {
	// contains filtered or unexported fields
}

SysRoleMenuDelete is the builder for deleting a SysRoleMenu entity.

func (*SysRoleMenuDelete) Exec

func (srmd *SysRoleMenuDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SysRoleMenuDelete) ExecX

func (srmd *SysRoleMenuDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SysRoleMenuDelete) Where

Where adds a new predicate to the SysRoleMenuDelete builder.

type SysRoleMenuDeleteOne

type SysRoleMenuDeleteOne struct {
	// contains filtered or unexported fields
}

SysRoleMenuDeleteOne is the builder for deleting a single SysRoleMenu entity.

func (*SysRoleMenuDeleteOne) Exec

func (srmdo *SysRoleMenuDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SysRoleMenuDeleteOne) ExecX

func (srmdo *SysRoleMenuDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type SysRoleMenuGroupBy

type SysRoleMenuGroupBy struct {
	// contains filtered or unexported fields
}

SysRoleMenuGroupBy is the group-by builder for SysRoleMenu entities.

func (*SysRoleMenuGroupBy) Aggregate

func (srmgb *SysRoleMenuGroupBy) Aggregate(fns ...AggregateFunc) *SysRoleMenuGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SysRoleMenuGroupBy) Bool

func (srmgb *SysRoleMenuGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysRoleMenuGroupBy) BoolX

func (srmgb *SysRoleMenuGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SysRoleMenuGroupBy) Bools

func (srmgb *SysRoleMenuGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SysRoleMenuGroupBy) BoolsX

func (srmgb *SysRoleMenuGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SysRoleMenuGroupBy) Float64

func (srmgb *SysRoleMenuGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysRoleMenuGroupBy) Float64X

func (srmgb *SysRoleMenuGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SysRoleMenuGroupBy) Float64s

func (srmgb *SysRoleMenuGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SysRoleMenuGroupBy) Float64sX

func (srmgb *SysRoleMenuGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SysRoleMenuGroupBy) Int

func (srmgb *SysRoleMenuGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysRoleMenuGroupBy) IntX

func (srmgb *SysRoleMenuGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SysRoleMenuGroupBy) Ints

func (srmgb *SysRoleMenuGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SysRoleMenuGroupBy) IntsX

func (srmgb *SysRoleMenuGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SysRoleMenuGroupBy) Scan

func (srmgb *SysRoleMenuGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SysRoleMenuGroupBy) ScanX

func (srmgb *SysRoleMenuGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SysRoleMenuGroupBy) String

func (srmgb *SysRoleMenuGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysRoleMenuGroupBy) StringX

func (srmgb *SysRoleMenuGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SysRoleMenuGroupBy) Strings

func (srmgb *SysRoleMenuGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SysRoleMenuGroupBy) StringsX

func (srmgb *SysRoleMenuGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SysRoleMenuMutation

type SysRoleMenuMutation struct {
	// contains filtered or unexported fields
}

SysRoleMenuMutation represents an operation that mutates the SysRoleMenu nodes in the graph.

func (*SysRoleMenuMutation) ActionID

func (m *SysRoleMenuMutation) ActionID() (r string, exists bool)

ActionID returns the value of the "action_id" field in the mutation.

func (*SysRoleMenuMutation) ActionIDCleared

func (m *SysRoleMenuMutation) ActionIDCleared() bool

ActionIDCleared returns if the "action_id" field was cleared in this mutation.

func (*SysRoleMenuMutation) AddField

func (m *SysRoleMenuMutation) 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 (*SysRoleMenuMutation) AddedEdges

func (m *SysRoleMenuMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SysRoleMenuMutation) AddedField

func (m *SysRoleMenuMutation) 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 (*SysRoleMenuMutation) AddedFields

func (m *SysRoleMenuMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SysRoleMenuMutation) AddedIDs

func (m *SysRoleMenuMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SysRoleMenuMutation) ClearActionID

func (m *SysRoleMenuMutation) ClearActionID()

ClearActionID clears the value of the "action_id" field.

func (*SysRoleMenuMutation) ClearDeletedAt

func (m *SysRoleMenuMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysRoleMenuMutation) ClearEdge

func (m *SysRoleMenuMutation) 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 (*SysRoleMenuMutation) ClearField

func (m *SysRoleMenuMutation) 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 (*SysRoleMenuMutation) ClearedEdges

func (m *SysRoleMenuMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SysRoleMenuMutation) ClearedFields

func (m *SysRoleMenuMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SysRoleMenuMutation) Client

func (m SysRoleMenuMutation) 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 (*SysRoleMenuMutation) CreatedAt

func (m *SysRoleMenuMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*SysRoleMenuMutation) DeletedAt

func (m *SysRoleMenuMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*SysRoleMenuMutation) DeletedAtCleared

func (m *SysRoleMenuMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*SysRoleMenuMutation) EdgeCleared

func (m *SysRoleMenuMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SysRoleMenuMutation) Field

func (m *SysRoleMenuMutation) 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 (*SysRoleMenuMutation) FieldCleared

func (m *SysRoleMenuMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SysRoleMenuMutation) Fields

func (m *SysRoleMenuMutation) 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 (*SysRoleMenuMutation) ID

func (m *SysRoleMenuMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*SysRoleMenuMutation) IsDel

func (m *SysRoleMenuMutation) IsDel() (r bool, exists bool)

IsDel returns the value of the "is_del" field in the mutation.

func (*SysRoleMenuMutation) MenuID

func (m *SysRoleMenuMutation) MenuID() (r string, exists bool)

MenuID returns the value of the "menu_id" field in the mutation.

func (*SysRoleMenuMutation) OldActionID

func (m *SysRoleMenuMutation) OldActionID(ctx context.Context) (v *string, err error)

OldActionID returns the old "action_id" field's value of the SysRoleMenu entity. If the SysRoleMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMenuMutation) OldCreatedAt

func (m *SysRoleMenuMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the SysRoleMenu entity. If the SysRoleMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMenuMutation) OldDeletedAt

func (m *SysRoleMenuMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the SysRoleMenu entity. If the SysRoleMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMenuMutation) OldField

func (m *SysRoleMenuMutation) 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 (*SysRoleMenuMutation) OldIsDel

func (m *SysRoleMenuMutation) OldIsDel(ctx context.Context) (v bool, err error)

OldIsDel returns the old "is_del" field's value of the SysRoleMenu entity. If the SysRoleMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMenuMutation) OldMenuID

func (m *SysRoleMenuMutation) OldMenuID(ctx context.Context) (v string, err error)

OldMenuID returns the old "menu_id" field's value of the SysRoleMenu entity. If the SysRoleMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMenuMutation) OldRoleID

func (m *SysRoleMenuMutation) OldRoleID(ctx context.Context) (v string, err error)

OldRoleID returns the old "role_id" field's value of the SysRoleMenu entity. If the SysRoleMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMenuMutation) OldUpdatedAt

func (m *SysRoleMenuMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the SysRoleMenu entity. If the SysRoleMenu object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMenuMutation) Op

func (m *SysRoleMenuMutation) Op() Op

Op returns the operation name.

func (*SysRoleMenuMutation) RemovedEdges

func (m *SysRoleMenuMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SysRoleMenuMutation) RemovedIDs

func (m *SysRoleMenuMutation) 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 (*SysRoleMenuMutation) ResetActionID

func (m *SysRoleMenuMutation) ResetActionID()

ResetActionID resets all changes to the "action_id" field.

func (*SysRoleMenuMutation) ResetCreatedAt

func (m *SysRoleMenuMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SysRoleMenuMutation) ResetDeletedAt

func (m *SysRoleMenuMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*SysRoleMenuMutation) ResetEdge

func (m *SysRoleMenuMutation) 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 (*SysRoleMenuMutation) ResetField

func (m *SysRoleMenuMutation) 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 (*SysRoleMenuMutation) ResetIsDel

func (m *SysRoleMenuMutation) ResetIsDel()

ResetIsDel resets all changes to the "is_del" field.

func (*SysRoleMenuMutation) ResetMenuID

func (m *SysRoleMenuMutation) ResetMenuID()

ResetMenuID resets all changes to the "menu_id" field.

func (*SysRoleMenuMutation) ResetRoleID

func (m *SysRoleMenuMutation) ResetRoleID()

ResetRoleID resets all changes to the "role_id" field.

func (*SysRoleMenuMutation) ResetUpdatedAt

func (m *SysRoleMenuMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SysRoleMenuMutation) RoleID

func (m *SysRoleMenuMutation) RoleID() (r string, exists bool)

RoleID returns the value of the "role_id" field in the mutation.

func (*SysRoleMenuMutation) SetActionID

func (m *SysRoleMenuMutation) SetActionID(s string)

SetActionID sets the "action_id" field.

func (*SysRoleMenuMutation) SetCreatedAt

func (m *SysRoleMenuMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*SysRoleMenuMutation) SetDeletedAt

func (m *SysRoleMenuMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*SysRoleMenuMutation) SetField

func (m *SysRoleMenuMutation) 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 (*SysRoleMenuMutation) SetID

func (m *SysRoleMenuMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of SysRoleMenu entities.

func (*SysRoleMenuMutation) SetIsDel

func (m *SysRoleMenuMutation) SetIsDel(b bool)

SetIsDel sets the "is_del" field.

func (*SysRoleMenuMutation) SetMenuID

func (m *SysRoleMenuMutation) SetMenuID(s string)

SetMenuID sets the "menu_id" field.

func (*SysRoleMenuMutation) SetRoleID

func (m *SysRoleMenuMutation) SetRoleID(s string)

SetRoleID sets the "role_id" field.

func (*SysRoleMenuMutation) SetUpdatedAt

func (m *SysRoleMenuMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (SysRoleMenuMutation) Tx

func (m SysRoleMenuMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SysRoleMenuMutation) Type

func (m *SysRoleMenuMutation) Type() string

Type returns the node type of this mutation (SysRoleMenu).

func (*SysRoleMenuMutation) UpdatedAt

func (m *SysRoleMenuMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

type SysRoleMenuQuery

type SysRoleMenuQuery struct {
	// contains filtered or unexported fields
}

SysRoleMenuQuery is the builder for querying SysRoleMenu entities.

func (*SysRoleMenuQuery) All

func (srmq *SysRoleMenuQuery) All(ctx context.Context) ([]*SysRoleMenu, error)

All executes the query and returns a list of SysRoleMenus.

func (*SysRoleMenuQuery) AllX

func (srmq *SysRoleMenuQuery) AllX(ctx context.Context) []*SysRoleMenu

AllX is like All, but panics if an error occurs.

func (*SysRoleMenuQuery) Clone

func (srmq *SysRoleMenuQuery) Clone() *SysRoleMenuQuery

Clone returns a duplicate of the SysRoleMenuQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SysRoleMenuQuery) Count

func (srmq *SysRoleMenuQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SysRoleMenuQuery) CountX

func (srmq *SysRoleMenuQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SysRoleMenuQuery) Exist

func (srmq *SysRoleMenuQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SysRoleMenuQuery) ExistX

func (srmq *SysRoleMenuQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SysRoleMenuQuery) First

func (srmq *SysRoleMenuQuery) First(ctx context.Context) (*SysRoleMenu, error)

First returns the first SysRoleMenu entity from the query. Returns a *NotFoundError when no SysRoleMenu was found.

func (*SysRoleMenuQuery) FirstID

func (srmq *SysRoleMenuQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first SysRoleMenu ID from the query. Returns a *NotFoundError when no SysRoleMenu ID was found.

func (*SysRoleMenuQuery) FirstIDX

func (srmq *SysRoleMenuQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*SysRoleMenuQuery) FirstX

func (srmq *SysRoleMenuQuery) FirstX(ctx context.Context) *SysRoleMenu

FirstX is like First, but panics if an error occurs.

func (*SysRoleMenuQuery) GroupBy

func (srmq *SysRoleMenuQuery) GroupBy(field string, fields ...string) *SysRoleMenuGroupBy

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 {
	IsDel bool `json:"is_del,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SysRoleMenu.Query().
	GroupBy(sysrolemenu.FieldIsDel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SysRoleMenuQuery) IDs

func (srmq *SysRoleMenuQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of SysRoleMenu IDs.

func (*SysRoleMenuQuery) IDsX

func (srmq *SysRoleMenuQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*SysRoleMenuQuery) Limit

func (srmq *SysRoleMenuQuery) Limit(limit int) *SysRoleMenuQuery

Limit adds a limit step to the query.

func (*SysRoleMenuQuery) Offset

func (srmq *SysRoleMenuQuery) Offset(offset int) *SysRoleMenuQuery

Offset adds an offset step to the query.

func (*SysRoleMenuQuery) Only

func (srmq *SysRoleMenuQuery) Only(ctx context.Context) (*SysRoleMenu, error)

Only returns a single SysRoleMenu entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one SysRoleMenu entity is not found. Returns a *NotFoundError when no SysRoleMenu entities are found.

func (*SysRoleMenuQuery) OnlyID

func (srmq *SysRoleMenuQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only SysRoleMenu ID in the query. Returns a *NotSingularError when exactly one SysRoleMenu ID is not found. Returns a *NotFoundError when no entities are found.

func (*SysRoleMenuQuery) OnlyIDX

func (srmq *SysRoleMenuQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SysRoleMenuQuery) OnlyX

func (srmq *SysRoleMenuQuery) OnlyX(ctx context.Context) *SysRoleMenu

OnlyX is like Only, but panics if an error occurs.

func (*SysRoleMenuQuery) Order

func (srmq *SysRoleMenuQuery) Order(o ...OrderFunc) *SysRoleMenuQuery

Order adds an order step to the query.

func (*SysRoleMenuQuery) Select

func (srmq *SysRoleMenuQuery) Select(field string, fields ...string) *SysRoleMenuSelect

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 {
	IsDel bool `json:"is_del,omitempty"`
}

client.SysRoleMenu.Query().
	Select(sysrolemenu.FieldIsDel).
	Scan(ctx, &v)

func (*SysRoleMenuQuery) Unique

func (srmq *SysRoleMenuQuery) Unique(unique bool) *SysRoleMenuQuery

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 (*SysRoleMenuQuery) Where

Where adds a new predicate for the SysRoleMenuQuery builder.

type SysRoleMenuSelect

type SysRoleMenuSelect struct {
	*SysRoleMenuQuery
	// contains filtered or unexported fields
}

SysRoleMenuSelect is the builder for selecting fields of SysRoleMenu entities.

func (*SysRoleMenuSelect) Bool

func (srms *SysRoleMenuSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SysRoleMenuSelect) BoolX

func (srms *SysRoleMenuSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SysRoleMenuSelect) Bools

func (srms *SysRoleMenuSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SysRoleMenuSelect) BoolsX

func (srms *SysRoleMenuSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SysRoleMenuSelect) Float64

func (srms *SysRoleMenuSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SysRoleMenuSelect) Float64X

func (srms *SysRoleMenuSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SysRoleMenuSelect) Float64s

func (srms *SysRoleMenuSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SysRoleMenuSelect) Float64sX

func (srms *SysRoleMenuSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SysRoleMenuSelect) Int

func (srms *SysRoleMenuSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SysRoleMenuSelect) IntX

func (srms *SysRoleMenuSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SysRoleMenuSelect) Ints

func (srms *SysRoleMenuSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SysRoleMenuSelect) IntsX

func (srms *SysRoleMenuSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SysRoleMenuSelect) Scan

func (srms *SysRoleMenuSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*SysRoleMenuSelect) ScanX

func (srms *SysRoleMenuSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SysRoleMenuSelect) String

func (srms *SysRoleMenuSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SysRoleMenuSelect) StringX

func (srms *SysRoleMenuSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SysRoleMenuSelect) Strings

func (srms *SysRoleMenuSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SysRoleMenuSelect) StringsX

func (srms *SysRoleMenuSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SysRoleMenuUpdate

type SysRoleMenuUpdate struct {
	// contains filtered or unexported fields
}

SysRoleMenuUpdate is the builder for updating SysRoleMenu entities.

func (*SysRoleMenuUpdate) ClearActionID

func (srmu *SysRoleMenuUpdate) ClearActionID() *SysRoleMenuUpdate

ClearActionID clears the value of the "action_id" field.

func (*SysRoleMenuUpdate) ClearDeletedAt

func (srmu *SysRoleMenuUpdate) ClearDeletedAt() *SysRoleMenuUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysRoleMenuUpdate) Exec

func (srmu *SysRoleMenuUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SysRoleMenuUpdate) ExecX

func (srmu *SysRoleMenuUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SysRoleMenuUpdate) Mutation

func (srmu *SysRoleMenuUpdate) Mutation() *SysRoleMenuMutation

Mutation returns the SysRoleMenuMutation object of the builder.

func (*SysRoleMenuUpdate) Save

func (srmu *SysRoleMenuUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SysRoleMenuUpdate) SaveX

func (srmu *SysRoleMenuUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SysRoleMenuUpdate) SetActionID

func (srmu *SysRoleMenuUpdate) SetActionID(s string) *SysRoleMenuUpdate

SetActionID sets the "action_id" field.

func (*SysRoleMenuUpdate) SetDeletedAt

func (srmu *SysRoleMenuUpdate) SetDeletedAt(t time.Time) *SysRoleMenuUpdate

SetDeletedAt sets the "deleted_at" field.

func (*SysRoleMenuUpdate) SetInput

SetInput applies the change-set in the UpdateSysRoleMenuInput on the update builder.

func (*SysRoleMenuUpdate) SetIsDel

func (srmu *SysRoleMenuUpdate) SetIsDel(b bool) *SysRoleMenuUpdate

SetIsDel sets the "is_del" field.

func (*SysRoleMenuUpdate) SetMenuID

func (srmu *SysRoleMenuUpdate) SetMenuID(s string) *SysRoleMenuUpdate

SetMenuID sets the "menu_id" field.

func (*SysRoleMenuUpdate) SetNillableActionID

func (srmu *SysRoleMenuUpdate) SetNillableActionID(s *string) *SysRoleMenuUpdate

SetNillableActionID sets the "action_id" field if the given value is not nil.

func (*SysRoleMenuUpdate) SetNillableDeletedAt

func (srmu *SysRoleMenuUpdate) SetNillableDeletedAt(t *time.Time) *SysRoleMenuUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysRoleMenuUpdate) SetNillableIsDel

func (srmu *SysRoleMenuUpdate) SetNillableIsDel(b *bool) *SysRoleMenuUpdate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysRoleMenuUpdate) SetRoleID

func (srmu *SysRoleMenuUpdate) SetRoleID(s string) *SysRoleMenuUpdate

SetRoleID sets the "role_id" field.

func (*SysRoleMenuUpdate) SetUpdatedAt

func (srmu *SysRoleMenuUpdate) SetUpdatedAt(t time.Time) *SysRoleMenuUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SysRoleMenuUpdate) Where

Where adds a new predicate for the SysRoleMenuUpdate builder.

type SysRoleMenuUpdateOne

type SysRoleMenuUpdateOne struct {
	// contains filtered or unexported fields
}

SysRoleMenuUpdateOne is the builder for updating a single SysRoleMenu entity.

func (*SysRoleMenuUpdateOne) ClearActionID

func (srmuo *SysRoleMenuUpdateOne) ClearActionID() *SysRoleMenuUpdateOne

ClearActionID clears the value of the "action_id" field.

func (*SysRoleMenuUpdateOne) ClearDeletedAt

func (srmuo *SysRoleMenuUpdateOne) ClearDeletedAt() *SysRoleMenuUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysRoleMenuUpdateOne) Exec

func (srmuo *SysRoleMenuUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SysRoleMenuUpdateOne) ExecX

func (srmuo *SysRoleMenuUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SysRoleMenuUpdateOne) Mutation

func (srmuo *SysRoleMenuUpdateOne) Mutation() *SysRoleMenuMutation

Mutation returns the SysRoleMenuMutation object of the builder.

func (*SysRoleMenuUpdateOne) Save

func (srmuo *SysRoleMenuUpdateOne) Save(ctx context.Context) (*SysRoleMenu, error)

Save executes the query and returns the updated SysRoleMenu entity.

func (*SysRoleMenuUpdateOne) SaveX

func (srmuo *SysRoleMenuUpdateOne) SaveX(ctx context.Context) *SysRoleMenu

SaveX is like Save, but panics if an error occurs.

func (*SysRoleMenuUpdateOne) Select

func (srmuo *SysRoleMenuUpdateOne) Select(field string, fields ...string) *SysRoleMenuUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SysRoleMenuUpdateOne) SetActionID

func (srmuo *SysRoleMenuUpdateOne) SetActionID(s string) *SysRoleMenuUpdateOne

SetActionID sets the "action_id" field.

func (*SysRoleMenuUpdateOne) SetDeletedAt

func (srmuo *SysRoleMenuUpdateOne) SetDeletedAt(t time.Time) *SysRoleMenuUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*SysRoleMenuUpdateOne) SetInput

SetInput applies the change-set in the UpdateSysRoleMenuInput on the update-one builder.

func (*SysRoleMenuUpdateOne) SetIsDel

func (srmuo *SysRoleMenuUpdateOne) SetIsDel(b bool) *SysRoleMenuUpdateOne

SetIsDel sets the "is_del" field.

func (*SysRoleMenuUpdateOne) SetMenuID

func (srmuo *SysRoleMenuUpdateOne) SetMenuID(s string) *SysRoleMenuUpdateOne

SetMenuID sets the "menu_id" field.

func (*SysRoleMenuUpdateOne) SetNillableActionID

func (srmuo *SysRoleMenuUpdateOne) SetNillableActionID(s *string) *SysRoleMenuUpdateOne

SetNillableActionID sets the "action_id" field if the given value is not nil.

func (*SysRoleMenuUpdateOne) SetNillableDeletedAt

func (srmuo *SysRoleMenuUpdateOne) SetNillableDeletedAt(t *time.Time) *SysRoleMenuUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysRoleMenuUpdateOne) SetNillableIsDel

func (srmuo *SysRoleMenuUpdateOne) SetNillableIsDel(b *bool) *SysRoleMenuUpdateOne

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysRoleMenuUpdateOne) SetRoleID

func (srmuo *SysRoleMenuUpdateOne) SetRoleID(s string) *SysRoleMenuUpdateOne

SetRoleID sets the "role_id" field.

func (*SysRoleMenuUpdateOne) SetUpdatedAt

func (srmuo *SysRoleMenuUpdateOne) SetUpdatedAt(t time.Time) *SysRoleMenuUpdateOne

SetUpdatedAt sets the "updated_at" field.

type SysRoleMenus

type SysRoleMenus []*SysRoleMenu

SysRoleMenus is a parsable slice of SysRoleMenu.

type SysRoleMutation

type SysRoleMutation struct {
	// contains filtered or unexported fields
}

SysRoleMutation represents an operation that mutates the SysRole nodes in the graph.

func (*SysRoleMutation) AddField

func (m *SysRoleMutation) 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 (*SysRoleMutation) AddSort

func (m *SysRoleMutation) AddSort(i int32)

AddSort adds i to the "sort" field.

func (*SysRoleMutation) AddStatus

func (m *SysRoleMutation) AddStatus(i int16)

AddStatus adds i to the "status" field.

func (*SysRoleMutation) AddedEdges

func (m *SysRoleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SysRoleMutation) AddedField

func (m *SysRoleMutation) 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 (*SysRoleMutation) AddedFields

func (m *SysRoleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SysRoleMutation) AddedIDs

func (m *SysRoleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SysRoleMutation) AddedSort

func (m *SysRoleMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*SysRoleMutation) AddedStatus

func (m *SysRoleMutation) AddedStatus() (r int16, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*SysRoleMutation) ClearDeletedAt

func (m *SysRoleMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysRoleMutation) ClearEdge

func (m *SysRoleMutation) 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 (*SysRoleMutation) ClearField

func (m *SysRoleMutation) 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 (*SysRoleMutation) ClearedEdges

func (m *SysRoleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SysRoleMutation) ClearedFields

func (m *SysRoleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SysRoleMutation) Client

func (m SysRoleMutation) 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 (*SysRoleMutation) CreatedAt

func (m *SysRoleMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*SysRoleMutation) DeletedAt

func (m *SysRoleMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*SysRoleMutation) DeletedAtCleared

func (m *SysRoleMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*SysRoleMutation) EdgeCleared

func (m *SysRoleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SysRoleMutation) Field

func (m *SysRoleMutation) 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 (*SysRoleMutation) FieldCleared

func (m *SysRoleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SysRoleMutation) Fields

func (m *SysRoleMutation) 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 (*SysRoleMutation) ID

func (m *SysRoleMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*SysRoleMutation) IsDel

func (m *SysRoleMutation) IsDel() (r bool, exists bool)

IsDel returns the value of the "is_del" field in the mutation.

func (*SysRoleMutation) Memo

func (m *SysRoleMutation) Memo() (r string, exists bool)

Memo returns the value of the "memo" field in the mutation.

func (*SysRoleMutation) Name

func (m *SysRoleMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*SysRoleMutation) OldCreatedAt

func (m *SysRoleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the SysRole entity. If the SysRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMutation) OldDeletedAt

func (m *SysRoleMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the SysRole entity. If the SysRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMutation) OldField

func (m *SysRoleMutation) 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 (*SysRoleMutation) OldIsDel

func (m *SysRoleMutation) OldIsDel(ctx context.Context) (v bool, err error)

OldIsDel returns the old "is_del" field's value of the SysRole entity. If the SysRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMutation) OldMemo

func (m *SysRoleMutation) OldMemo(ctx context.Context) (v string, err error)

OldMemo returns the old "memo" field's value of the SysRole entity. If the SysRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMutation) OldName

func (m *SysRoleMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the SysRole entity. If the SysRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMutation) OldSort

func (m *SysRoleMutation) OldSort(ctx context.Context) (v int32, err error)

OldSort returns the old "sort" field's value of the SysRole entity. If the SysRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMutation) OldStatus

func (m *SysRoleMutation) OldStatus(ctx context.Context) (v int16, err error)

OldStatus returns the old "status" field's value of the SysRole entity. If the SysRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMutation) OldUpdatedAt

func (m *SysRoleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the SysRole entity. If the SysRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysRoleMutation) Op

func (m *SysRoleMutation) Op() Op

Op returns the operation name.

func (*SysRoleMutation) RemovedEdges

func (m *SysRoleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SysRoleMutation) RemovedIDs

func (m *SysRoleMutation) 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 (*SysRoleMutation) ResetCreatedAt

func (m *SysRoleMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SysRoleMutation) ResetDeletedAt

func (m *SysRoleMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*SysRoleMutation) ResetEdge

func (m *SysRoleMutation) 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 (*SysRoleMutation) ResetField

func (m *SysRoleMutation) 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 (*SysRoleMutation) ResetIsDel

func (m *SysRoleMutation) ResetIsDel()

ResetIsDel resets all changes to the "is_del" field.

func (*SysRoleMutation) ResetMemo

func (m *SysRoleMutation) ResetMemo()

ResetMemo resets all changes to the "memo" field.

func (*SysRoleMutation) ResetName

func (m *SysRoleMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*SysRoleMutation) ResetSort

func (m *SysRoleMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*SysRoleMutation) ResetStatus

func (m *SysRoleMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*SysRoleMutation) ResetUpdatedAt

func (m *SysRoleMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SysRoleMutation) SetCreatedAt

func (m *SysRoleMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*SysRoleMutation) SetDeletedAt

func (m *SysRoleMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*SysRoleMutation) SetField

func (m *SysRoleMutation) 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 (*SysRoleMutation) SetID

func (m *SysRoleMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of SysRole entities.

func (*SysRoleMutation) SetIsDel

func (m *SysRoleMutation) SetIsDel(b bool)

SetIsDel sets the "is_del" field.

func (*SysRoleMutation) SetMemo

func (m *SysRoleMutation) SetMemo(s string)

SetMemo sets the "memo" field.

func (*SysRoleMutation) SetName

func (m *SysRoleMutation) SetName(s string)

SetName sets the "name" field.

func (*SysRoleMutation) SetSort

func (m *SysRoleMutation) SetSort(i int32)

SetSort sets the "sort" field.

func (*SysRoleMutation) SetStatus

func (m *SysRoleMutation) SetStatus(i int16)

SetStatus sets the "status" field.

func (*SysRoleMutation) SetUpdatedAt

func (m *SysRoleMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*SysRoleMutation) Sort

func (m *SysRoleMutation) Sort() (r int32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*SysRoleMutation) Status

func (m *SysRoleMutation) Status() (r int16, exists bool)

Status returns the value of the "status" field in the mutation.

func (SysRoleMutation) Tx

func (m SysRoleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SysRoleMutation) Type

func (m *SysRoleMutation) Type() string

Type returns the node type of this mutation (SysRole).

func (*SysRoleMutation) UpdatedAt

func (m *SysRoleMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

type SysRoleQuery

type SysRoleQuery struct {
	// contains filtered or unexported fields
}

SysRoleQuery is the builder for querying SysRole entities.

func (*SysRoleQuery) All

func (srq *SysRoleQuery) All(ctx context.Context) ([]*SysRole, error)

All executes the query and returns a list of SysRoles.

func (*SysRoleQuery) AllX

func (srq *SysRoleQuery) AllX(ctx context.Context) []*SysRole

AllX is like All, but panics if an error occurs.

func (*SysRoleQuery) Clone

func (srq *SysRoleQuery) Clone() *SysRoleQuery

Clone returns a duplicate of the SysRoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SysRoleQuery) Count

func (srq *SysRoleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SysRoleQuery) CountX

func (srq *SysRoleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SysRoleQuery) Exist

func (srq *SysRoleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SysRoleQuery) ExistX

func (srq *SysRoleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SysRoleQuery) First

func (srq *SysRoleQuery) First(ctx context.Context) (*SysRole, error)

First returns the first SysRole entity from the query. Returns a *NotFoundError when no SysRole was found.

func (*SysRoleQuery) FirstID

func (srq *SysRoleQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first SysRole ID from the query. Returns a *NotFoundError when no SysRole ID was found.

func (*SysRoleQuery) FirstIDX

func (srq *SysRoleQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*SysRoleQuery) FirstX

func (srq *SysRoleQuery) FirstX(ctx context.Context) *SysRole

FirstX is like First, but panics if an error occurs.

func (*SysRoleQuery) GroupBy

func (srq *SysRoleQuery) GroupBy(field string, fields ...string) *SysRoleGroupBy

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 {
	IsDel bool `json:"is_del,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SysRole.Query().
	GroupBy(sysrole.FieldIsDel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SysRoleQuery) IDs

func (srq *SysRoleQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of SysRole IDs.

func (*SysRoleQuery) IDsX

func (srq *SysRoleQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*SysRoleQuery) Limit

func (srq *SysRoleQuery) Limit(limit int) *SysRoleQuery

Limit adds a limit step to the query.

func (*SysRoleQuery) Offset

func (srq *SysRoleQuery) Offset(offset int) *SysRoleQuery

Offset adds an offset step to the query.

func (*SysRoleQuery) Only

func (srq *SysRoleQuery) Only(ctx context.Context) (*SysRole, error)

Only returns a single SysRole entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one SysRole entity is not found. Returns a *NotFoundError when no SysRole entities are found.

func (*SysRoleQuery) OnlyID

func (srq *SysRoleQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only SysRole ID in the query. Returns a *NotSingularError when exactly one SysRole ID is not found. Returns a *NotFoundError when no entities are found.

func (*SysRoleQuery) OnlyIDX

func (srq *SysRoleQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SysRoleQuery) OnlyX

func (srq *SysRoleQuery) OnlyX(ctx context.Context) *SysRole

OnlyX is like Only, but panics if an error occurs.

func (*SysRoleQuery) Order

func (srq *SysRoleQuery) Order(o ...OrderFunc) *SysRoleQuery

Order adds an order step to the query.

func (*SysRoleQuery) Select

func (srq *SysRoleQuery) Select(field string, fields ...string) *SysRoleSelect

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 {
	IsDel bool `json:"is_del,omitempty"`
}

client.SysRole.Query().
	Select(sysrole.FieldIsDel).
	Scan(ctx, &v)

func (*SysRoleQuery) Unique

func (srq *SysRoleQuery) Unique(unique bool) *SysRoleQuery

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 (*SysRoleQuery) Where

func (srq *SysRoleQuery) Where(ps ...predicate.SysRole) *SysRoleQuery

Where adds a new predicate for the SysRoleQuery builder.

type SysRoleSelect

type SysRoleSelect struct {
	*SysRoleQuery
	// contains filtered or unexported fields
}

SysRoleSelect is the builder for selecting fields of SysRole entities.

func (*SysRoleSelect) Bool

func (srs *SysRoleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SysRoleSelect) BoolX

func (srs *SysRoleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SysRoleSelect) Bools

func (srs *SysRoleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SysRoleSelect) BoolsX

func (srs *SysRoleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SysRoleSelect) Float64

func (srs *SysRoleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SysRoleSelect) Float64X

func (srs *SysRoleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SysRoleSelect) Float64s

func (srs *SysRoleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SysRoleSelect) Float64sX

func (srs *SysRoleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SysRoleSelect) Int

func (srs *SysRoleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SysRoleSelect) IntX

func (srs *SysRoleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SysRoleSelect) Ints

func (srs *SysRoleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SysRoleSelect) IntsX

func (srs *SysRoleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SysRoleSelect) Scan

func (srs *SysRoleSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*SysRoleSelect) ScanX

func (srs *SysRoleSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SysRoleSelect) String

func (srs *SysRoleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SysRoleSelect) StringX

func (srs *SysRoleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SysRoleSelect) Strings

func (srs *SysRoleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SysRoleSelect) StringsX

func (srs *SysRoleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SysRoleUpdate

type SysRoleUpdate struct {
	// contains filtered or unexported fields
}

SysRoleUpdate is the builder for updating SysRole entities.

func (*SysRoleUpdate) AddSort

func (sru *SysRoleUpdate) AddSort(i int32) *SysRoleUpdate

AddSort adds i to the "sort" field.

func (*SysRoleUpdate) AddStatus

func (sru *SysRoleUpdate) AddStatus(i int16) *SysRoleUpdate

AddStatus adds i to the "status" field.

func (*SysRoleUpdate) ClearDeletedAt

func (sru *SysRoleUpdate) ClearDeletedAt() *SysRoleUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysRoleUpdate) Exec

func (sru *SysRoleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SysRoleUpdate) ExecX

func (sru *SysRoleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SysRoleUpdate) Mutation

func (sru *SysRoleUpdate) Mutation() *SysRoleMutation

Mutation returns the SysRoleMutation object of the builder.

func (*SysRoleUpdate) Save

func (sru *SysRoleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SysRoleUpdate) SaveX

func (sru *SysRoleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SysRoleUpdate) SetDeletedAt

func (sru *SysRoleUpdate) SetDeletedAt(t time.Time) *SysRoleUpdate

SetDeletedAt sets the "deleted_at" field.

func (*SysRoleUpdate) SetInput

SetInput applies the change-set in the UpdateSysRoleInput on the update builder.

func (*SysRoleUpdate) SetIsDel

func (sru *SysRoleUpdate) SetIsDel(b bool) *SysRoleUpdate

SetIsDel sets the "is_del" field.

func (*SysRoleUpdate) SetMemo

func (sru *SysRoleUpdate) SetMemo(s string) *SysRoleUpdate

SetMemo sets the "memo" field.

func (*SysRoleUpdate) SetName

func (sru *SysRoleUpdate) SetName(s string) *SysRoleUpdate

SetName sets the "name" field.

func (*SysRoleUpdate) SetNillableDeletedAt

func (sru *SysRoleUpdate) SetNillableDeletedAt(t *time.Time) *SysRoleUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysRoleUpdate) SetNillableIsDel

func (sru *SysRoleUpdate) SetNillableIsDel(b *bool) *SysRoleUpdate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysRoleUpdate) SetNillableMemo

func (sru *SysRoleUpdate) SetNillableMemo(s *string) *SysRoleUpdate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysRoleUpdate) SetNillableSort

func (sru *SysRoleUpdate) SetNillableSort(i *int32) *SysRoleUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysRoleUpdate) SetNillableStatus

func (sru *SysRoleUpdate) SetNillableStatus(i *int16) *SysRoleUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*SysRoleUpdate) SetSort

func (sru *SysRoleUpdate) SetSort(i int32) *SysRoleUpdate

SetSort sets the "sort" field.

func (*SysRoleUpdate) SetStatus

func (sru *SysRoleUpdate) SetStatus(i int16) *SysRoleUpdate

SetStatus sets the "status" field.

func (*SysRoleUpdate) SetUpdatedAt

func (sru *SysRoleUpdate) SetUpdatedAt(t time.Time) *SysRoleUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SysRoleUpdate) Where

func (sru *SysRoleUpdate) Where(ps ...predicate.SysRole) *SysRoleUpdate

Where adds a new predicate for the SysRoleUpdate builder.

type SysRoleUpdateOne

type SysRoleUpdateOne struct {
	// contains filtered or unexported fields
}

SysRoleUpdateOne is the builder for updating a single SysRole entity.

func (*SysRoleUpdateOne) AddSort

func (sruo *SysRoleUpdateOne) AddSort(i int32) *SysRoleUpdateOne

AddSort adds i to the "sort" field.

func (*SysRoleUpdateOne) AddStatus

func (sruo *SysRoleUpdateOne) AddStatus(i int16) *SysRoleUpdateOne

AddStatus adds i to the "status" field.

func (*SysRoleUpdateOne) ClearDeletedAt

func (sruo *SysRoleUpdateOne) ClearDeletedAt() *SysRoleUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysRoleUpdateOne) Exec

func (sruo *SysRoleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SysRoleUpdateOne) ExecX

func (sruo *SysRoleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SysRoleUpdateOne) Mutation

func (sruo *SysRoleUpdateOne) Mutation() *SysRoleMutation

Mutation returns the SysRoleMutation object of the builder.

func (*SysRoleUpdateOne) Save

func (sruo *SysRoleUpdateOne) Save(ctx context.Context) (*SysRole, error)

Save executes the query and returns the updated SysRole entity.

func (*SysRoleUpdateOne) SaveX

func (sruo *SysRoleUpdateOne) SaveX(ctx context.Context) *SysRole

SaveX is like Save, but panics if an error occurs.

func (*SysRoleUpdateOne) Select

func (sruo *SysRoleUpdateOne) Select(field string, fields ...string) *SysRoleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SysRoleUpdateOne) SetDeletedAt

func (sruo *SysRoleUpdateOne) SetDeletedAt(t time.Time) *SysRoleUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*SysRoleUpdateOne) SetInput

SetInput applies the change-set in the UpdateSysRoleInput on the update-one builder.

func (*SysRoleUpdateOne) SetIsDel

func (sruo *SysRoleUpdateOne) SetIsDel(b bool) *SysRoleUpdateOne

SetIsDel sets the "is_del" field.

func (*SysRoleUpdateOne) SetMemo

func (sruo *SysRoleUpdateOne) SetMemo(s string) *SysRoleUpdateOne

SetMemo sets the "memo" field.

func (*SysRoleUpdateOne) SetName

func (sruo *SysRoleUpdateOne) SetName(s string) *SysRoleUpdateOne

SetName sets the "name" field.

func (*SysRoleUpdateOne) SetNillableDeletedAt

func (sruo *SysRoleUpdateOne) SetNillableDeletedAt(t *time.Time) *SysRoleUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysRoleUpdateOne) SetNillableIsDel

func (sruo *SysRoleUpdateOne) SetNillableIsDel(b *bool) *SysRoleUpdateOne

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysRoleUpdateOne) SetNillableMemo

func (sruo *SysRoleUpdateOne) SetNillableMemo(s *string) *SysRoleUpdateOne

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*SysRoleUpdateOne) SetNillableSort

func (sruo *SysRoleUpdateOne) SetNillableSort(i *int32) *SysRoleUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysRoleUpdateOne) SetNillableStatus

func (sruo *SysRoleUpdateOne) SetNillableStatus(i *int16) *SysRoleUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*SysRoleUpdateOne) SetSort

func (sruo *SysRoleUpdateOne) SetSort(i int32) *SysRoleUpdateOne

SetSort sets the "sort" field.

func (*SysRoleUpdateOne) SetStatus

func (sruo *SysRoleUpdateOne) SetStatus(i int16) *SysRoleUpdateOne

SetStatus sets the "status" field.

func (*SysRoleUpdateOne) SetUpdatedAt

func (sruo *SysRoleUpdateOne) SetUpdatedAt(t time.Time) *SysRoleUpdateOne

SetUpdatedAt sets the "updated_at" field.

type SysRoles

type SysRoles []*SysRole

SysRoles is a parsable slice of SysRole.

type SysUser

type SysUser struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// IsDel holds the value of the "is_del" field.
	// 是否删除
	IsDel bool `json:"is_del,omitempty"`
	// Sort holds the value of the "sort" field.
	// 排序, 在数据库里的排序
	Sort int32 `json:"sort,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	// 创建时间,由程序自动生成
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	// 更新时间,由程序自动生成
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	// 删除时间,
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// Status holds the value of the "status" field.
	// 状态,
	Status int16 `json:"status,omitempty"`
	// UserName holds the value of the "user_name" field.
	// 用户名
	UserName string `json:"user_name,omitempty"`
	// RealName holds the value of the "real_name" field.
	RealName *string `json:"real_name,omitempty"`
	// FirstName holds the value of the "first_name" field.
	// 名
	FirstName *string `json:"first_name,omitempty"`
	// LastName holds the value of the "last_name" field.
	// 姓
	LastName *string `json:"last_name,omitempty"`
	// Password holds the value of the "Password" field.
	// 密码
	Password string `json:"-"`
	// Email holds the value of the "Email" field.
	// 电子邮箱
	Email string `json:"email,omitempty"`
	// Phone holds the value of the "Phone" field.
	// 电话号码
	Phone string `json:"phone,omitempty"`
	// Salt holds the value of the "salt" field.
	// 盐
	Salt string `json:"salt,omitempty"`
	// contains filtered or unexported fields
}

SysUser is the model entity for the SysUser schema.

func (*SysUser) String

func (su *SysUser) String() string

String implements the fmt.Stringer.

func (*SysUser) Unwrap

func (su *SysUser) Unwrap() *SysUser

Unwrap unwraps the SysUser 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 (*SysUser) Update

func (su *SysUser) Update() *SysUserUpdateOne

Update returns a builder for updating this SysUser. Note that you need to call SysUser.Unwrap() before calling this method if this SysUser was returned from a transaction, and the transaction was committed or rolled back.

type SysUserClient

type SysUserClient struct {
	// contains filtered or unexported fields
}

SysUserClient is a client for the SysUser schema.

func NewSysUserClient

func NewSysUserClient(c config) *SysUserClient

NewSysUserClient returns a client for the SysUser from the given config.

func (*SysUserClient) Create

func (c *SysUserClient) Create() *SysUserCreate

Create returns a create builder for SysUser.

func (*SysUserClient) CreateBulk

func (c *SysUserClient) CreateBulk(builders ...*SysUserCreate) *SysUserCreateBulk

CreateBulk returns a builder for creating a bulk of SysUser entities.

func (*SysUserClient) Delete

func (c *SysUserClient) Delete() *SysUserDelete

Delete returns a delete builder for SysUser.

func (*SysUserClient) DeleteOne

func (c *SysUserClient) DeleteOne(su *SysUser) *SysUserDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SysUserClient) DeleteOneID

func (c *SysUserClient) DeleteOneID(id string) *SysUserDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SysUserClient) Get

func (c *SysUserClient) Get(ctx context.Context, id string) (*SysUser, error)

Get returns a SysUser entity by its id.

func (*SysUserClient) GetX

func (c *SysUserClient) GetX(ctx context.Context, id string) *SysUser

GetX is like Get, but panics if an error occurs.

func (*SysUserClient) Hooks

func (c *SysUserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SysUserClient) Query

func (c *SysUserClient) Query() *SysUserQuery

Query returns a query builder for SysUser.

func (*SysUserClient) Update

func (c *SysUserClient) Update() *SysUserUpdate

Update returns an update builder for SysUser.

func (*SysUserClient) UpdateOne

func (c *SysUserClient) UpdateOne(su *SysUser) *SysUserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SysUserClient) UpdateOneID

func (c *SysUserClient) UpdateOneID(id string) *SysUserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SysUserClient) Use

func (c *SysUserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sysuser.Hooks(f(g(h())))`.

type SysUserCreate

type SysUserCreate struct {
	// contains filtered or unexported fields
}

SysUserCreate is the builder for creating a SysUser entity.

func (*SysUserCreate) Mutation

func (suc *SysUserCreate) Mutation() *SysUserMutation

Mutation returns the SysUserMutation object of the builder.

func (*SysUserCreate) Save

func (suc *SysUserCreate) Save(ctx context.Context) (*SysUser, error)

Save creates the SysUser in the database.

func (*SysUserCreate) SaveX

func (suc *SysUserCreate) SaveX(ctx context.Context) *SysUser

SaveX calls Save and panics if Save returns an error.

func (*SysUserCreate) SetCreatedAt

func (suc *SysUserCreate) SetCreatedAt(t time.Time) *SysUserCreate

SetCreatedAt sets the "created_at" field.

func (*SysUserCreate) SetDeletedAt

func (suc *SysUserCreate) SetDeletedAt(t time.Time) *SysUserCreate

SetDeletedAt sets the "deleted_at" field.

func (*SysUserCreate) SetEmail

func (suc *SysUserCreate) SetEmail(s string) *SysUserCreate

SetEmail sets the "Email" field.

func (*SysUserCreate) SetFirstName

func (suc *SysUserCreate) SetFirstName(s string) *SysUserCreate

SetFirstName sets the "first_name" field.

func (*SysUserCreate) SetID

func (suc *SysUserCreate) SetID(s string) *SysUserCreate

SetID sets the "id" field.

func (*SysUserCreate) SetInput

SetInput applies the change-set in the CreateSysUserInput on the create builder.

func (*SysUserCreate) SetIsDel

func (suc *SysUserCreate) SetIsDel(b bool) *SysUserCreate

SetIsDel sets the "is_del" field.

func (*SysUserCreate) SetLastName

func (suc *SysUserCreate) SetLastName(s string) *SysUserCreate

SetLastName sets the "last_name" field.

func (*SysUserCreate) SetNillableCreatedAt

func (suc *SysUserCreate) SetNillableCreatedAt(t *time.Time) *SysUserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*SysUserCreate) SetNillableDeletedAt

func (suc *SysUserCreate) SetNillableDeletedAt(t *time.Time) *SysUserCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysUserCreate) SetNillableFirstName

func (suc *SysUserCreate) SetNillableFirstName(s *string) *SysUserCreate

SetNillableFirstName sets the "first_name" field if the given value is not nil.

func (*SysUserCreate) SetNillableID

func (suc *SysUserCreate) SetNillableID(s *string) *SysUserCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SysUserCreate) SetNillableIsDel

func (suc *SysUserCreate) SetNillableIsDel(b *bool) *SysUserCreate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysUserCreate) SetNillableLastName

func (suc *SysUserCreate) SetNillableLastName(s *string) *SysUserCreate

SetNillableLastName sets the "last_name" field if the given value is not nil.

func (*SysUserCreate) SetNillableRealName

func (suc *SysUserCreate) SetNillableRealName(s *string) *SysUserCreate

SetNillableRealName sets the "real_name" field if the given value is not nil.

func (*SysUserCreate) SetNillableSalt

func (suc *SysUserCreate) SetNillableSalt(s *string) *SysUserCreate

SetNillableSalt sets the "salt" field if the given value is not nil.

func (*SysUserCreate) SetNillableSort

func (suc *SysUserCreate) SetNillableSort(i *int32) *SysUserCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysUserCreate) SetNillableStatus

func (suc *SysUserCreate) SetNillableStatus(i *int16) *SysUserCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*SysUserCreate) SetNillableUpdatedAt

func (suc *SysUserCreate) SetNillableUpdatedAt(t *time.Time) *SysUserCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SysUserCreate) SetPassword

func (suc *SysUserCreate) SetPassword(s string) *SysUserCreate

SetPassword sets the "Password" field.

func (*SysUserCreate) SetPhone

func (suc *SysUserCreate) SetPhone(s string) *SysUserCreate

SetPhone sets the "Phone" field.

func (*SysUserCreate) SetRealName

func (suc *SysUserCreate) SetRealName(s string) *SysUserCreate

SetRealName sets the "real_name" field.

func (*SysUserCreate) SetSalt

func (suc *SysUserCreate) SetSalt(s string) *SysUserCreate

SetSalt sets the "salt" field.

func (*SysUserCreate) SetSort

func (suc *SysUserCreate) SetSort(i int32) *SysUserCreate

SetSort sets the "sort" field.

func (*SysUserCreate) SetStatus

func (suc *SysUserCreate) SetStatus(i int16) *SysUserCreate

SetStatus sets the "status" field.

func (*SysUserCreate) SetUpdatedAt

func (suc *SysUserCreate) SetUpdatedAt(t time.Time) *SysUserCreate

SetUpdatedAt sets the "updated_at" field.

func (*SysUserCreate) SetUserName

func (suc *SysUserCreate) SetUserName(s string) *SysUserCreate

SetUserName sets the "user_name" field.

type SysUserCreateBulk

type SysUserCreateBulk struct {
	// contains filtered or unexported fields
}

SysUserCreateBulk is the builder for creating many SysUser entities in bulk.

func (*SysUserCreateBulk) Save

func (sucb *SysUserCreateBulk) Save(ctx context.Context) ([]*SysUser, error)

Save creates the SysUser entities in the database.

func (*SysUserCreateBulk) SaveX

func (sucb *SysUserCreateBulk) SaveX(ctx context.Context) []*SysUser

SaveX is like Save, but panics if an error occurs.

type SysUserDelete

type SysUserDelete struct {
	// contains filtered or unexported fields
}

SysUserDelete is the builder for deleting a SysUser entity.

func (*SysUserDelete) Exec

func (sud *SysUserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SysUserDelete) ExecX

func (sud *SysUserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SysUserDelete) Where

func (sud *SysUserDelete) Where(ps ...predicate.SysUser) *SysUserDelete

Where adds a new predicate to the SysUserDelete builder.

type SysUserDeleteOne

type SysUserDeleteOne struct {
	// contains filtered or unexported fields
}

SysUserDeleteOne is the builder for deleting a single SysUser entity.

func (*SysUserDeleteOne) Exec

func (sudo *SysUserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SysUserDeleteOne) ExecX

func (sudo *SysUserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type SysUserGroupBy

type SysUserGroupBy struct {
	// contains filtered or unexported fields
}

SysUserGroupBy is the group-by builder for SysUser entities.

func (*SysUserGroupBy) Aggregate

func (sugb *SysUserGroupBy) Aggregate(fns ...AggregateFunc) *SysUserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SysUserGroupBy) Bool

func (sugb *SysUserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysUserGroupBy) BoolX

func (sugb *SysUserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SysUserGroupBy) Bools

func (sugb *SysUserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SysUserGroupBy) BoolsX

func (sugb *SysUserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SysUserGroupBy) Float64

func (sugb *SysUserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysUserGroupBy) Float64X

func (sugb *SysUserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SysUserGroupBy) Float64s

func (sugb *SysUserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SysUserGroupBy) Float64sX

func (sugb *SysUserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SysUserGroupBy) Int

func (sugb *SysUserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysUserGroupBy) IntX

func (sugb *SysUserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SysUserGroupBy) Ints

func (sugb *SysUserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SysUserGroupBy) IntsX

func (sugb *SysUserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SysUserGroupBy) Scan

func (sugb *SysUserGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SysUserGroupBy) ScanX

func (sugb *SysUserGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SysUserGroupBy) String

func (sugb *SysUserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysUserGroupBy) StringX

func (sugb *SysUserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SysUserGroupBy) Strings

func (sugb *SysUserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SysUserGroupBy) StringsX

func (sugb *SysUserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SysUserMutation

type SysUserMutation struct {
	// contains filtered or unexported fields
}

SysUserMutation represents an operation that mutates the SysUser nodes in the graph.

func (*SysUserMutation) AddField

func (m *SysUserMutation) 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 (*SysUserMutation) AddSort

func (m *SysUserMutation) AddSort(i int32)

AddSort adds i to the "sort" field.

func (*SysUserMutation) AddStatus

func (m *SysUserMutation) AddStatus(i int16)

AddStatus adds i to the "status" field.

func (*SysUserMutation) AddedEdges

func (m *SysUserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SysUserMutation) AddedField

func (m *SysUserMutation) 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 (*SysUserMutation) AddedFields

func (m *SysUserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SysUserMutation) AddedIDs

func (m *SysUserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SysUserMutation) AddedSort

func (m *SysUserMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*SysUserMutation) AddedStatus

func (m *SysUserMutation) AddedStatus() (r int16, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*SysUserMutation) ClearDeletedAt

func (m *SysUserMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysUserMutation) ClearEdge

func (m *SysUserMutation) 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 (*SysUserMutation) ClearField

func (m *SysUserMutation) 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 (*SysUserMutation) ClearFirstName

func (m *SysUserMutation) ClearFirstName()

ClearFirstName clears the value of the "first_name" field.

func (*SysUserMutation) ClearLastName

func (m *SysUserMutation) ClearLastName()

ClearLastName clears the value of the "last_name" field.

func (*SysUserMutation) ClearRealName

func (m *SysUserMutation) ClearRealName()

ClearRealName clears the value of the "real_name" field.

func (*SysUserMutation) ClearedEdges

func (m *SysUserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SysUserMutation) ClearedFields

func (m *SysUserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SysUserMutation) Client

func (m SysUserMutation) 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 (*SysUserMutation) CreatedAt

func (m *SysUserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*SysUserMutation) DeletedAt

func (m *SysUserMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*SysUserMutation) DeletedAtCleared

func (m *SysUserMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*SysUserMutation) EdgeCleared

func (m *SysUserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SysUserMutation) Email

func (m *SysUserMutation) Email() (r string, exists bool)

Email returns the value of the "Email" field in the mutation.

func (*SysUserMutation) Field

func (m *SysUserMutation) 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 (*SysUserMutation) FieldCleared

func (m *SysUserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SysUserMutation) Fields

func (m *SysUserMutation) 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 (*SysUserMutation) FirstName

func (m *SysUserMutation) FirstName() (r string, exists bool)

FirstName returns the value of the "first_name" field in the mutation.

func (*SysUserMutation) FirstNameCleared

func (m *SysUserMutation) FirstNameCleared() bool

FirstNameCleared returns if the "first_name" field was cleared in this mutation.

func (*SysUserMutation) ID

func (m *SysUserMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*SysUserMutation) IsDel

func (m *SysUserMutation) IsDel() (r bool, exists bool)

IsDel returns the value of the "is_del" field in the mutation.

func (*SysUserMutation) LastName

func (m *SysUserMutation) LastName() (r string, exists bool)

LastName returns the value of the "last_name" field in the mutation.

func (*SysUserMutation) LastNameCleared

func (m *SysUserMutation) LastNameCleared() bool

LastNameCleared returns if the "last_name" field was cleared in this mutation.

func (*SysUserMutation) OldCreatedAt

func (m *SysUserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) OldDeletedAt

func (m *SysUserMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) OldEmail

func (m *SysUserMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "Email" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) OldField

func (m *SysUserMutation) 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 (*SysUserMutation) OldFirstName

func (m *SysUserMutation) OldFirstName(ctx context.Context) (v *string, err error)

OldFirstName returns the old "first_name" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) OldIsDel

func (m *SysUserMutation) OldIsDel(ctx context.Context) (v bool, err error)

OldIsDel returns the old "is_del" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) OldLastName

func (m *SysUserMutation) OldLastName(ctx context.Context) (v *string, err error)

OldLastName returns the old "last_name" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) OldPassword

func (m *SysUserMutation) OldPassword(ctx context.Context) (v string, err error)

OldPassword returns the old "Password" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) OldPhone

func (m *SysUserMutation) OldPhone(ctx context.Context) (v string, err error)

OldPhone returns the old "Phone" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) OldRealName

func (m *SysUserMutation) OldRealName(ctx context.Context) (v *string, err error)

OldRealName returns the old "real_name" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) OldSalt

func (m *SysUserMutation) OldSalt(ctx context.Context) (v string, err error)

OldSalt returns the old "salt" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) OldSort

func (m *SysUserMutation) OldSort(ctx context.Context) (v int32, err error)

OldSort returns the old "sort" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) OldStatus

func (m *SysUserMutation) OldStatus(ctx context.Context) (v int16, err error)

OldStatus returns the old "status" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) OldUpdatedAt

func (m *SysUserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) OldUserName

func (m *SysUserMutation) OldUserName(ctx context.Context) (v string, err error)

OldUserName returns the old "user_name" field's value of the SysUser entity. If the SysUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserMutation) Op

func (m *SysUserMutation) Op() Op

Op returns the operation name.

func (*SysUserMutation) Password

func (m *SysUserMutation) Password() (r string, exists bool)

Password returns the value of the "Password" field in the mutation.

func (*SysUserMutation) Phone

func (m *SysUserMutation) Phone() (r string, exists bool)

Phone returns the value of the "Phone" field in the mutation.

func (*SysUserMutation) RealName

func (m *SysUserMutation) RealName() (r string, exists bool)

RealName returns the value of the "real_name" field in the mutation.

func (*SysUserMutation) RealNameCleared

func (m *SysUserMutation) RealNameCleared() bool

RealNameCleared returns if the "real_name" field was cleared in this mutation.

func (*SysUserMutation) RemovedEdges

func (m *SysUserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SysUserMutation) RemovedIDs

func (m *SysUserMutation) 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 (*SysUserMutation) ResetCreatedAt

func (m *SysUserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SysUserMutation) ResetDeletedAt

func (m *SysUserMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*SysUserMutation) ResetEdge

func (m *SysUserMutation) 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 (*SysUserMutation) ResetEmail

func (m *SysUserMutation) ResetEmail()

ResetEmail resets all changes to the "Email" field.

func (*SysUserMutation) ResetField

func (m *SysUserMutation) 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 (*SysUserMutation) ResetFirstName

func (m *SysUserMutation) ResetFirstName()

ResetFirstName resets all changes to the "first_name" field.

func (*SysUserMutation) ResetIsDel

func (m *SysUserMutation) ResetIsDel()

ResetIsDel resets all changes to the "is_del" field.

func (*SysUserMutation) ResetLastName

func (m *SysUserMutation) ResetLastName()

ResetLastName resets all changes to the "last_name" field.

func (*SysUserMutation) ResetPassword

func (m *SysUserMutation) ResetPassword()

ResetPassword resets all changes to the "Password" field.

func (*SysUserMutation) ResetPhone

func (m *SysUserMutation) ResetPhone()

ResetPhone resets all changes to the "Phone" field.

func (*SysUserMutation) ResetRealName

func (m *SysUserMutation) ResetRealName()

ResetRealName resets all changes to the "real_name" field.

func (*SysUserMutation) ResetSalt

func (m *SysUserMutation) ResetSalt()

ResetSalt resets all changes to the "salt" field.

func (*SysUserMutation) ResetSort

func (m *SysUserMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*SysUserMutation) ResetStatus

func (m *SysUserMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*SysUserMutation) ResetUpdatedAt

func (m *SysUserMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SysUserMutation) ResetUserName

func (m *SysUserMutation) ResetUserName()

ResetUserName resets all changes to the "user_name" field.

func (*SysUserMutation) Salt

func (m *SysUserMutation) Salt() (r string, exists bool)

Salt returns the value of the "salt" field in the mutation.

func (*SysUserMutation) SetCreatedAt

func (m *SysUserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*SysUserMutation) SetDeletedAt

func (m *SysUserMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*SysUserMutation) SetEmail

func (m *SysUserMutation) SetEmail(s string)

SetEmail sets the "Email" field.

func (*SysUserMutation) SetField

func (m *SysUserMutation) 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 (*SysUserMutation) SetFirstName

func (m *SysUserMutation) SetFirstName(s string)

SetFirstName sets the "first_name" field.

func (*SysUserMutation) SetID

func (m *SysUserMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of SysUser entities.

func (*SysUserMutation) SetIsDel

func (m *SysUserMutation) SetIsDel(b bool)

SetIsDel sets the "is_del" field.

func (*SysUserMutation) SetLastName

func (m *SysUserMutation) SetLastName(s string)

SetLastName sets the "last_name" field.

func (*SysUserMutation) SetPassword

func (m *SysUserMutation) SetPassword(s string)

SetPassword sets the "Password" field.

func (*SysUserMutation) SetPhone

func (m *SysUserMutation) SetPhone(s string)

SetPhone sets the "Phone" field.

func (*SysUserMutation) SetRealName

func (m *SysUserMutation) SetRealName(s string)

SetRealName sets the "real_name" field.

func (*SysUserMutation) SetSalt

func (m *SysUserMutation) SetSalt(s string)

SetSalt sets the "salt" field.

func (*SysUserMutation) SetSort

func (m *SysUserMutation) SetSort(i int32)

SetSort sets the "sort" field.

func (*SysUserMutation) SetStatus

func (m *SysUserMutation) SetStatus(i int16)

SetStatus sets the "status" field.

func (*SysUserMutation) SetUpdatedAt

func (m *SysUserMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*SysUserMutation) SetUserName

func (m *SysUserMutation) SetUserName(s string)

SetUserName sets the "user_name" field.

func (*SysUserMutation) Sort

func (m *SysUserMutation) Sort() (r int32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*SysUserMutation) Status

func (m *SysUserMutation) Status() (r int16, exists bool)

Status returns the value of the "status" field in the mutation.

func (SysUserMutation) Tx

func (m SysUserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SysUserMutation) Type

func (m *SysUserMutation) Type() string

Type returns the node type of this mutation (SysUser).

func (*SysUserMutation) UpdatedAt

func (m *SysUserMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*SysUserMutation) UserName

func (m *SysUserMutation) UserName() (r string, exists bool)

UserName returns the value of the "user_name" field in the mutation.

type SysUserQuery

type SysUserQuery struct {
	// contains filtered or unexported fields
}

SysUserQuery is the builder for querying SysUser entities.

func (*SysUserQuery) All

func (suq *SysUserQuery) All(ctx context.Context) ([]*SysUser, error)

All executes the query and returns a list of SysUsers.

func (*SysUserQuery) AllX

func (suq *SysUserQuery) AllX(ctx context.Context) []*SysUser

AllX is like All, but panics if an error occurs.

func (*SysUserQuery) Clone

func (suq *SysUserQuery) Clone() *SysUserQuery

Clone returns a duplicate of the SysUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SysUserQuery) Count

func (suq *SysUserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SysUserQuery) CountX

func (suq *SysUserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SysUserQuery) Exist

func (suq *SysUserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SysUserQuery) ExistX

func (suq *SysUserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SysUserQuery) First

func (suq *SysUserQuery) First(ctx context.Context) (*SysUser, error)

First returns the first SysUser entity from the query. Returns a *NotFoundError when no SysUser was found.

func (*SysUserQuery) FirstID

func (suq *SysUserQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first SysUser ID from the query. Returns a *NotFoundError when no SysUser ID was found.

func (*SysUserQuery) FirstIDX

func (suq *SysUserQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*SysUserQuery) FirstX

func (suq *SysUserQuery) FirstX(ctx context.Context) *SysUser

FirstX is like First, but panics if an error occurs.

func (*SysUserQuery) GroupBy

func (suq *SysUserQuery) GroupBy(field string, fields ...string) *SysUserGroupBy

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 {
	IsDel bool `json:"is_del,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SysUser.Query().
	GroupBy(sysuser.FieldIsDel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SysUserQuery) IDs

func (suq *SysUserQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of SysUser IDs.

func (*SysUserQuery) IDsX

func (suq *SysUserQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*SysUserQuery) Limit

func (suq *SysUserQuery) Limit(limit int) *SysUserQuery

Limit adds a limit step to the query.

func (*SysUserQuery) Offset

func (suq *SysUserQuery) Offset(offset int) *SysUserQuery

Offset adds an offset step to the query.

func (*SysUserQuery) Only

func (suq *SysUserQuery) Only(ctx context.Context) (*SysUser, error)

Only returns a single SysUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one SysUser entity is not found. Returns a *NotFoundError when no SysUser entities are found.

func (*SysUserQuery) OnlyID

func (suq *SysUserQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only SysUser ID in the query. Returns a *NotSingularError when exactly one SysUser ID is not found. Returns a *NotFoundError when no entities are found.

func (*SysUserQuery) OnlyIDX

func (suq *SysUserQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SysUserQuery) OnlyX

func (suq *SysUserQuery) OnlyX(ctx context.Context) *SysUser

OnlyX is like Only, but panics if an error occurs.

func (*SysUserQuery) Order

func (suq *SysUserQuery) Order(o ...OrderFunc) *SysUserQuery

Order adds an order step to the query.

func (*SysUserQuery) Select

func (suq *SysUserQuery) Select(field string, fields ...string) *SysUserSelect

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 {
	IsDel bool `json:"is_del,omitempty"`
}

client.SysUser.Query().
	Select(sysuser.FieldIsDel).
	Scan(ctx, &v)

func (*SysUserQuery) Unique

func (suq *SysUserQuery) Unique(unique bool) *SysUserQuery

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 (*SysUserQuery) Where

func (suq *SysUserQuery) Where(ps ...predicate.SysUser) *SysUserQuery

Where adds a new predicate for the SysUserQuery builder.

type SysUserRole

type SysUserRole struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// IsDel holds the value of the "is_del" field.
	// 是否删除
	IsDel bool `json:"is_del,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	// 创建时间,由程序自动生成
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	// 更新时间,由程序自动生成
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	// 删除时间,
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// UserID holds the value of the "user_id" field.
	// 用户ID, sys_user.id
	UserID string `json:"user_id,omitempty"`
	// RoleID holds the value of the "role_id" field.
	// 角色ID, sys_role.id
	RoleID string `json:"role_id,omitempty"`
	// contains filtered or unexported fields
}

SysUserRole is the model entity for the SysUserRole schema.

func (*SysUserRole) String

func (sur *SysUserRole) String() string

String implements the fmt.Stringer.

func (*SysUserRole) Unwrap

func (sur *SysUserRole) Unwrap() *SysUserRole

Unwrap unwraps the SysUserRole 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 (*SysUserRole) Update

func (sur *SysUserRole) Update() *SysUserRoleUpdateOne

Update returns a builder for updating this SysUserRole. Note that you need to call SysUserRole.Unwrap() before calling this method if this SysUserRole was returned from a transaction, and the transaction was committed or rolled back.

type SysUserRoleClient

type SysUserRoleClient struct {
	// contains filtered or unexported fields
}

SysUserRoleClient is a client for the SysUserRole schema.

func NewSysUserRoleClient

func NewSysUserRoleClient(c config) *SysUserRoleClient

NewSysUserRoleClient returns a client for the SysUserRole from the given config.

func (*SysUserRoleClient) Create

func (c *SysUserRoleClient) Create() *SysUserRoleCreate

Create returns a create builder for SysUserRole.

func (*SysUserRoleClient) CreateBulk

func (c *SysUserRoleClient) CreateBulk(builders ...*SysUserRoleCreate) *SysUserRoleCreateBulk

CreateBulk returns a builder for creating a bulk of SysUserRole entities.

func (*SysUserRoleClient) Delete

func (c *SysUserRoleClient) Delete() *SysUserRoleDelete

Delete returns a delete builder for SysUserRole.

func (*SysUserRoleClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SysUserRoleClient) DeleteOneID

func (c *SysUserRoleClient) DeleteOneID(id string) *SysUserRoleDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SysUserRoleClient) Get

Get returns a SysUserRole entity by its id.

func (*SysUserRoleClient) GetX

GetX is like Get, but panics if an error occurs.

func (*SysUserRoleClient) Hooks

func (c *SysUserRoleClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SysUserRoleClient) Query

func (c *SysUserRoleClient) Query() *SysUserRoleQuery

Query returns a query builder for SysUserRole.

func (*SysUserRoleClient) Update

func (c *SysUserRoleClient) Update() *SysUserRoleUpdate

Update returns an update builder for SysUserRole.

func (*SysUserRoleClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*SysUserRoleClient) UpdateOneID

func (c *SysUserRoleClient) UpdateOneID(id string) *SysUserRoleUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SysUserRoleClient) Use

func (c *SysUserRoleClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sysuserrole.Hooks(f(g(h())))`.

type SysUserRoleCreate

type SysUserRoleCreate struct {
	// contains filtered or unexported fields
}

SysUserRoleCreate is the builder for creating a SysUserRole entity.

func (*SysUserRoleCreate) Mutation

func (surc *SysUserRoleCreate) Mutation() *SysUserRoleMutation

Mutation returns the SysUserRoleMutation object of the builder.

func (*SysUserRoleCreate) Save

func (surc *SysUserRoleCreate) Save(ctx context.Context) (*SysUserRole, error)

Save creates the SysUserRole in the database.

func (*SysUserRoleCreate) SaveX

func (surc *SysUserRoleCreate) SaveX(ctx context.Context) *SysUserRole

SaveX calls Save and panics if Save returns an error.

func (*SysUserRoleCreate) SetCreatedAt

func (surc *SysUserRoleCreate) SetCreatedAt(t time.Time) *SysUserRoleCreate

SetCreatedAt sets the "created_at" field.

func (*SysUserRoleCreate) SetDeletedAt

func (surc *SysUserRoleCreate) SetDeletedAt(t time.Time) *SysUserRoleCreate

SetDeletedAt sets the "deleted_at" field.

func (*SysUserRoleCreate) SetID

func (surc *SysUserRoleCreate) SetID(s string) *SysUserRoleCreate

SetID sets the "id" field.

func (*SysUserRoleCreate) SetInput

SetInput applies the change-set in the CreateSysUserRoleInput on the create builder.

func (*SysUserRoleCreate) SetIsDel

func (surc *SysUserRoleCreate) SetIsDel(b bool) *SysUserRoleCreate

SetIsDel sets the "is_del" field.

func (*SysUserRoleCreate) SetNillableCreatedAt

func (surc *SysUserRoleCreate) SetNillableCreatedAt(t *time.Time) *SysUserRoleCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*SysUserRoleCreate) SetNillableDeletedAt

func (surc *SysUserRoleCreate) SetNillableDeletedAt(t *time.Time) *SysUserRoleCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysUserRoleCreate) SetNillableID

func (surc *SysUserRoleCreate) SetNillableID(s *string) *SysUserRoleCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SysUserRoleCreate) SetNillableIsDel

func (surc *SysUserRoleCreate) SetNillableIsDel(b *bool) *SysUserRoleCreate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysUserRoleCreate) SetNillableUpdatedAt

func (surc *SysUserRoleCreate) SetNillableUpdatedAt(t *time.Time) *SysUserRoleCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SysUserRoleCreate) SetRoleID

func (surc *SysUserRoleCreate) SetRoleID(s string) *SysUserRoleCreate

SetRoleID sets the "role_id" field.

func (*SysUserRoleCreate) SetUpdatedAt

func (surc *SysUserRoleCreate) SetUpdatedAt(t time.Time) *SysUserRoleCreate

SetUpdatedAt sets the "updated_at" field.

func (*SysUserRoleCreate) SetUserID

func (surc *SysUserRoleCreate) SetUserID(s string) *SysUserRoleCreate

SetUserID sets the "user_id" field.

type SysUserRoleCreateBulk

type SysUserRoleCreateBulk struct {
	// contains filtered or unexported fields
}

SysUserRoleCreateBulk is the builder for creating many SysUserRole entities in bulk.

func (*SysUserRoleCreateBulk) Save

func (surcb *SysUserRoleCreateBulk) Save(ctx context.Context) ([]*SysUserRole, error)

Save creates the SysUserRole entities in the database.

func (*SysUserRoleCreateBulk) SaveX

func (surcb *SysUserRoleCreateBulk) SaveX(ctx context.Context) []*SysUserRole

SaveX is like Save, but panics if an error occurs.

type SysUserRoleDelete

type SysUserRoleDelete struct {
	// contains filtered or unexported fields
}

SysUserRoleDelete is the builder for deleting a SysUserRole entity.

func (*SysUserRoleDelete) Exec

func (surd *SysUserRoleDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SysUserRoleDelete) ExecX

func (surd *SysUserRoleDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SysUserRoleDelete) Where

Where adds a new predicate to the SysUserRoleDelete builder.

type SysUserRoleDeleteOne

type SysUserRoleDeleteOne struct {
	// contains filtered or unexported fields
}

SysUserRoleDeleteOne is the builder for deleting a single SysUserRole entity.

func (*SysUserRoleDeleteOne) Exec

func (surdo *SysUserRoleDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SysUserRoleDeleteOne) ExecX

func (surdo *SysUserRoleDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type SysUserRoleGroupBy

type SysUserRoleGroupBy struct {
	// contains filtered or unexported fields
}

SysUserRoleGroupBy is the group-by builder for SysUserRole entities.

func (*SysUserRoleGroupBy) Aggregate

func (surgb *SysUserRoleGroupBy) Aggregate(fns ...AggregateFunc) *SysUserRoleGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SysUserRoleGroupBy) Bool

func (surgb *SysUserRoleGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysUserRoleGroupBy) BoolX

func (surgb *SysUserRoleGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SysUserRoleGroupBy) Bools

func (surgb *SysUserRoleGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*SysUserRoleGroupBy) BoolsX

func (surgb *SysUserRoleGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SysUserRoleGroupBy) Float64

func (surgb *SysUserRoleGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysUserRoleGroupBy) Float64X

func (surgb *SysUserRoleGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SysUserRoleGroupBy) Float64s

func (surgb *SysUserRoleGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*SysUserRoleGroupBy) Float64sX

func (surgb *SysUserRoleGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SysUserRoleGroupBy) Int

func (surgb *SysUserRoleGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysUserRoleGroupBy) IntX

func (surgb *SysUserRoleGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SysUserRoleGroupBy) Ints

func (surgb *SysUserRoleGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*SysUserRoleGroupBy) IntsX

func (surgb *SysUserRoleGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SysUserRoleGroupBy) Scan

func (surgb *SysUserRoleGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*SysUserRoleGroupBy) ScanX

func (surgb *SysUserRoleGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SysUserRoleGroupBy) String

func (surgb *SysUserRoleGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*SysUserRoleGroupBy) StringX

func (surgb *SysUserRoleGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SysUserRoleGroupBy) Strings

func (surgb *SysUserRoleGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*SysUserRoleGroupBy) StringsX

func (surgb *SysUserRoleGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SysUserRoleMutation

type SysUserRoleMutation struct {
	// contains filtered or unexported fields
}

SysUserRoleMutation represents an operation that mutates the SysUserRole nodes in the graph.

func (*SysUserRoleMutation) AddField

func (m *SysUserRoleMutation) 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 (*SysUserRoleMutation) AddedEdges

func (m *SysUserRoleMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SysUserRoleMutation) AddedField

func (m *SysUserRoleMutation) 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 (*SysUserRoleMutation) AddedFields

func (m *SysUserRoleMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SysUserRoleMutation) AddedIDs

func (m *SysUserRoleMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SysUserRoleMutation) ClearDeletedAt

func (m *SysUserRoleMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysUserRoleMutation) ClearEdge

func (m *SysUserRoleMutation) 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 (*SysUserRoleMutation) ClearField

func (m *SysUserRoleMutation) 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 (*SysUserRoleMutation) ClearedEdges

func (m *SysUserRoleMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SysUserRoleMutation) ClearedFields

func (m *SysUserRoleMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SysUserRoleMutation) Client

func (m SysUserRoleMutation) 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 (*SysUserRoleMutation) CreatedAt

func (m *SysUserRoleMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*SysUserRoleMutation) DeletedAt

func (m *SysUserRoleMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*SysUserRoleMutation) DeletedAtCleared

func (m *SysUserRoleMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*SysUserRoleMutation) EdgeCleared

func (m *SysUserRoleMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SysUserRoleMutation) Field

func (m *SysUserRoleMutation) 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 (*SysUserRoleMutation) FieldCleared

func (m *SysUserRoleMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SysUserRoleMutation) Fields

func (m *SysUserRoleMutation) 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 (*SysUserRoleMutation) ID

func (m *SysUserRoleMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*SysUserRoleMutation) IsDel

func (m *SysUserRoleMutation) IsDel() (r bool, exists bool)

IsDel returns the value of the "is_del" field in the mutation.

func (*SysUserRoleMutation) OldCreatedAt

func (m *SysUserRoleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the SysUserRole entity. If the SysUserRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserRoleMutation) OldDeletedAt

func (m *SysUserRoleMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the SysUserRole entity. If the SysUserRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserRoleMutation) OldField

func (m *SysUserRoleMutation) 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 (*SysUserRoleMutation) OldIsDel

func (m *SysUserRoleMutation) OldIsDel(ctx context.Context) (v bool, err error)

OldIsDel returns the old "is_del" field's value of the SysUserRole entity. If the SysUserRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserRoleMutation) OldRoleID

func (m *SysUserRoleMutation) OldRoleID(ctx context.Context) (v string, err error)

OldRoleID returns the old "role_id" field's value of the SysUserRole entity. If the SysUserRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserRoleMutation) OldUpdatedAt

func (m *SysUserRoleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the SysUserRole entity. If the SysUserRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserRoleMutation) OldUserID

func (m *SysUserRoleMutation) OldUserID(ctx context.Context) (v string, err error)

OldUserID returns the old "user_id" field's value of the SysUserRole entity. If the SysUserRole object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SysUserRoleMutation) Op

func (m *SysUserRoleMutation) Op() Op

Op returns the operation name.

func (*SysUserRoleMutation) RemovedEdges

func (m *SysUserRoleMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SysUserRoleMutation) RemovedIDs

func (m *SysUserRoleMutation) 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 (*SysUserRoleMutation) ResetCreatedAt

func (m *SysUserRoleMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SysUserRoleMutation) ResetDeletedAt

func (m *SysUserRoleMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*SysUserRoleMutation) ResetEdge

func (m *SysUserRoleMutation) 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 (*SysUserRoleMutation) ResetField

func (m *SysUserRoleMutation) 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 (*SysUserRoleMutation) ResetIsDel

func (m *SysUserRoleMutation) ResetIsDel()

ResetIsDel resets all changes to the "is_del" field.

func (*SysUserRoleMutation) ResetRoleID

func (m *SysUserRoleMutation) ResetRoleID()

ResetRoleID resets all changes to the "role_id" field.

func (*SysUserRoleMutation) ResetUpdatedAt

func (m *SysUserRoleMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SysUserRoleMutation) ResetUserID

func (m *SysUserRoleMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*SysUserRoleMutation) RoleID

func (m *SysUserRoleMutation) RoleID() (r string, exists bool)

RoleID returns the value of the "role_id" field in the mutation.

func (*SysUserRoleMutation) SetCreatedAt

func (m *SysUserRoleMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*SysUserRoleMutation) SetDeletedAt

func (m *SysUserRoleMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*SysUserRoleMutation) SetField

func (m *SysUserRoleMutation) 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 (*SysUserRoleMutation) SetID

func (m *SysUserRoleMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of SysUserRole entities.

func (*SysUserRoleMutation) SetIsDel

func (m *SysUserRoleMutation) SetIsDel(b bool)

SetIsDel sets the "is_del" field.

func (*SysUserRoleMutation) SetRoleID

func (m *SysUserRoleMutation) SetRoleID(s string)

SetRoleID sets the "role_id" field.

func (*SysUserRoleMutation) SetUpdatedAt

func (m *SysUserRoleMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*SysUserRoleMutation) SetUserID

func (m *SysUserRoleMutation) SetUserID(s string)

SetUserID sets the "user_id" field.

func (SysUserRoleMutation) Tx

func (m SysUserRoleMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SysUserRoleMutation) Type

func (m *SysUserRoleMutation) Type() string

Type returns the node type of this mutation (SysUserRole).

func (*SysUserRoleMutation) UpdatedAt

func (m *SysUserRoleMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*SysUserRoleMutation) UserID

func (m *SysUserRoleMutation) UserID() (r string, exists bool)

UserID returns the value of the "user_id" field in the mutation.

type SysUserRoleQuery

type SysUserRoleQuery struct {
	// contains filtered or unexported fields
}

SysUserRoleQuery is the builder for querying SysUserRole entities.

func (*SysUserRoleQuery) All

func (surq *SysUserRoleQuery) All(ctx context.Context) ([]*SysUserRole, error)

All executes the query and returns a list of SysUserRoles.

func (*SysUserRoleQuery) AllX

func (surq *SysUserRoleQuery) AllX(ctx context.Context) []*SysUserRole

AllX is like All, but panics if an error occurs.

func (*SysUserRoleQuery) Clone

func (surq *SysUserRoleQuery) Clone() *SysUserRoleQuery

Clone returns a duplicate of the SysUserRoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SysUserRoleQuery) Count

func (surq *SysUserRoleQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SysUserRoleQuery) CountX

func (surq *SysUserRoleQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SysUserRoleQuery) Exist

func (surq *SysUserRoleQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SysUserRoleQuery) ExistX

func (surq *SysUserRoleQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SysUserRoleQuery) First

func (surq *SysUserRoleQuery) First(ctx context.Context) (*SysUserRole, error)

First returns the first SysUserRole entity from the query. Returns a *NotFoundError when no SysUserRole was found.

func (*SysUserRoleQuery) FirstID

func (surq *SysUserRoleQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first SysUserRole ID from the query. Returns a *NotFoundError when no SysUserRole ID was found.

func (*SysUserRoleQuery) FirstIDX

func (surq *SysUserRoleQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*SysUserRoleQuery) FirstX

func (surq *SysUserRoleQuery) FirstX(ctx context.Context) *SysUserRole

FirstX is like First, but panics if an error occurs.

func (*SysUserRoleQuery) GroupBy

func (surq *SysUserRoleQuery) GroupBy(field string, fields ...string) *SysUserRoleGroupBy

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 {
	IsDel bool `json:"is_del,omitempty"`
	Count int `json:"count,omitempty"`
}

client.SysUserRole.Query().
	GroupBy(sysuserrole.FieldIsDel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SysUserRoleQuery) IDs

func (surq *SysUserRoleQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of SysUserRole IDs.

func (*SysUserRoleQuery) IDsX

func (surq *SysUserRoleQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*SysUserRoleQuery) Limit

func (surq *SysUserRoleQuery) Limit(limit int) *SysUserRoleQuery

Limit adds a limit step to the query.

func (*SysUserRoleQuery) Offset

func (surq *SysUserRoleQuery) Offset(offset int) *SysUserRoleQuery

Offset adds an offset step to the query.

func (*SysUserRoleQuery) Only

func (surq *SysUserRoleQuery) Only(ctx context.Context) (*SysUserRole, error)

Only returns a single SysUserRole entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one SysUserRole entity is not found. Returns a *NotFoundError when no SysUserRole entities are found.

func (*SysUserRoleQuery) OnlyID

func (surq *SysUserRoleQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only SysUserRole ID in the query. Returns a *NotSingularError when exactly one SysUserRole ID is not found. Returns a *NotFoundError when no entities are found.

func (*SysUserRoleQuery) OnlyIDX

func (surq *SysUserRoleQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SysUserRoleQuery) OnlyX

func (surq *SysUserRoleQuery) OnlyX(ctx context.Context) *SysUserRole

OnlyX is like Only, but panics if an error occurs.

func (*SysUserRoleQuery) Order

func (surq *SysUserRoleQuery) Order(o ...OrderFunc) *SysUserRoleQuery

Order adds an order step to the query.

func (*SysUserRoleQuery) Select

func (surq *SysUserRoleQuery) Select(field string, fields ...string) *SysUserRoleSelect

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 {
	IsDel bool `json:"is_del,omitempty"`
}

client.SysUserRole.Query().
	Select(sysuserrole.FieldIsDel).
	Scan(ctx, &v)

func (*SysUserRoleQuery) Unique

func (surq *SysUserRoleQuery) Unique(unique bool) *SysUserRoleQuery

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 (*SysUserRoleQuery) Where

Where adds a new predicate for the SysUserRoleQuery builder.

type SysUserRoleSelect

type SysUserRoleSelect struct {
	*SysUserRoleQuery
	// contains filtered or unexported fields
}

SysUserRoleSelect is the builder for selecting fields of SysUserRole entities.

func (*SysUserRoleSelect) Bool

func (surs *SysUserRoleSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SysUserRoleSelect) BoolX

func (surs *SysUserRoleSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SysUserRoleSelect) Bools

func (surs *SysUserRoleSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SysUserRoleSelect) BoolsX

func (surs *SysUserRoleSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SysUserRoleSelect) Float64

func (surs *SysUserRoleSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SysUserRoleSelect) Float64X

func (surs *SysUserRoleSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SysUserRoleSelect) Float64s

func (surs *SysUserRoleSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SysUserRoleSelect) Float64sX

func (surs *SysUserRoleSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SysUserRoleSelect) Int

func (surs *SysUserRoleSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SysUserRoleSelect) IntX

func (surs *SysUserRoleSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SysUserRoleSelect) Ints

func (surs *SysUserRoleSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SysUserRoleSelect) IntsX

func (surs *SysUserRoleSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SysUserRoleSelect) Scan

func (surs *SysUserRoleSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*SysUserRoleSelect) ScanX

func (surs *SysUserRoleSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SysUserRoleSelect) String

func (surs *SysUserRoleSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SysUserRoleSelect) StringX

func (surs *SysUserRoleSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SysUserRoleSelect) Strings

func (surs *SysUserRoleSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SysUserRoleSelect) StringsX

func (surs *SysUserRoleSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SysUserRoleUpdate

type SysUserRoleUpdate struct {
	// contains filtered or unexported fields
}

SysUserRoleUpdate is the builder for updating SysUserRole entities.

func (*SysUserRoleUpdate) ClearDeletedAt

func (suru *SysUserRoleUpdate) ClearDeletedAt() *SysUserRoleUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysUserRoleUpdate) Exec

func (suru *SysUserRoleUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SysUserRoleUpdate) ExecX

func (suru *SysUserRoleUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SysUserRoleUpdate) Mutation

func (suru *SysUserRoleUpdate) Mutation() *SysUserRoleMutation

Mutation returns the SysUserRoleMutation object of the builder.

func (*SysUserRoleUpdate) Save

func (suru *SysUserRoleUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SysUserRoleUpdate) SaveX

func (suru *SysUserRoleUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SysUserRoleUpdate) SetDeletedAt

func (suru *SysUserRoleUpdate) SetDeletedAt(t time.Time) *SysUserRoleUpdate

SetDeletedAt sets the "deleted_at" field.

func (*SysUserRoleUpdate) SetInput

SetInput applies the change-set in the UpdateSysUserRoleInput on the update builder.

func (*SysUserRoleUpdate) SetIsDel

func (suru *SysUserRoleUpdate) SetIsDel(b bool) *SysUserRoleUpdate

SetIsDel sets the "is_del" field.

func (*SysUserRoleUpdate) SetNillableDeletedAt

func (suru *SysUserRoleUpdate) SetNillableDeletedAt(t *time.Time) *SysUserRoleUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysUserRoleUpdate) SetNillableIsDel

func (suru *SysUserRoleUpdate) SetNillableIsDel(b *bool) *SysUserRoleUpdate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysUserRoleUpdate) SetRoleID

func (suru *SysUserRoleUpdate) SetRoleID(s string) *SysUserRoleUpdate

SetRoleID sets the "role_id" field.

func (*SysUserRoleUpdate) SetUpdatedAt

func (suru *SysUserRoleUpdate) SetUpdatedAt(t time.Time) *SysUserRoleUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SysUserRoleUpdate) SetUserID

func (suru *SysUserRoleUpdate) SetUserID(s string) *SysUserRoleUpdate

SetUserID sets the "user_id" field.

func (*SysUserRoleUpdate) Where

Where adds a new predicate for the SysUserRoleUpdate builder.

type SysUserRoleUpdateOne

type SysUserRoleUpdateOne struct {
	// contains filtered or unexported fields
}

SysUserRoleUpdateOne is the builder for updating a single SysUserRole entity.

func (*SysUserRoleUpdateOne) ClearDeletedAt

func (suruo *SysUserRoleUpdateOne) ClearDeletedAt() *SysUserRoleUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysUserRoleUpdateOne) Exec

func (suruo *SysUserRoleUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SysUserRoleUpdateOne) ExecX

func (suruo *SysUserRoleUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SysUserRoleUpdateOne) Mutation

func (suruo *SysUserRoleUpdateOne) Mutation() *SysUserRoleMutation

Mutation returns the SysUserRoleMutation object of the builder.

func (*SysUserRoleUpdateOne) Save

func (suruo *SysUserRoleUpdateOne) Save(ctx context.Context) (*SysUserRole, error)

Save executes the query and returns the updated SysUserRole entity.

func (*SysUserRoleUpdateOne) SaveX

func (suruo *SysUserRoleUpdateOne) SaveX(ctx context.Context) *SysUserRole

SaveX is like Save, but panics if an error occurs.

func (*SysUserRoleUpdateOne) Select

func (suruo *SysUserRoleUpdateOne) Select(field string, fields ...string) *SysUserRoleUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SysUserRoleUpdateOne) SetDeletedAt

func (suruo *SysUserRoleUpdateOne) SetDeletedAt(t time.Time) *SysUserRoleUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*SysUserRoleUpdateOne) SetInput

SetInput applies the change-set in the UpdateSysUserRoleInput on the update-one builder.

func (*SysUserRoleUpdateOne) SetIsDel

func (suruo *SysUserRoleUpdateOne) SetIsDel(b bool) *SysUserRoleUpdateOne

SetIsDel sets the "is_del" field.

func (*SysUserRoleUpdateOne) SetNillableDeletedAt

func (suruo *SysUserRoleUpdateOne) SetNillableDeletedAt(t *time.Time) *SysUserRoleUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysUserRoleUpdateOne) SetNillableIsDel

func (suruo *SysUserRoleUpdateOne) SetNillableIsDel(b *bool) *SysUserRoleUpdateOne

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysUserRoleUpdateOne) SetRoleID

func (suruo *SysUserRoleUpdateOne) SetRoleID(s string) *SysUserRoleUpdateOne

SetRoleID sets the "role_id" field.

func (*SysUserRoleUpdateOne) SetUpdatedAt

func (suruo *SysUserRoleUpdateOne) SetUpdatedAt(t time.Time) *SysUserRoleUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*SysUserRoleUpdateOne) SetUserID

func (suruo *SysUserRoleUpdateOne) SetUserID(s string) *SysUserRoleUpdateOne

SetUserID sets the "user_id" field.

type SysUserRoles

type SysUserRoles []*SysUserRole

SysUserRoles is a parsable slice of SysUserRole.

type SysUserSelect

type SysUserSelect struct {
	*SysUserQuery
	// contains filtered or unexported fields
}

SysUserSelect is the builder for selecting fields of SysUser entities.

func (*SysUserSelect) Bool

func (sus *SysUserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SysUserSelect) BoolX

func (sus *SysUserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SysUserSelect) Bools

func (sus *SysUserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SysUserSelect) BoolsX

func (sus *SysUserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SysUserSelect) Float64

func (sus *SysUserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SysUserSelect) Float64X

func (sus *SysUserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SysUserSelect) Float64s

func (sus *SysUserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SysUserSelect) Float64sX

func (sus *SysUserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SysUserSelect) Int

func (sus *SysUserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SysUserSelect) IntX

func (sus *SysUserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SysUserSelect) Ints

func (sus *SysUserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SysUserSelect) IntsX

func (sus *SysUserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SysUserSelect) Scan

func (sus *SysUserSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*SysUserSelect) ScanX

func (sus *SysUserSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*SysUserSelect) String

func (sus *SysUserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SysUserSelect) StringX

func (sus *SysUserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SysUserSelect) Strings

func (sus *SysUserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SysUserSelect) StringsX

func (sus *SysUserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SysUserUpdate

type SysUserUpdate struct {
	// contains filtered or unexported fields
}

SysUserUpdate is the builder for updating SysUser entities.

func (*SysUserUpdate) AddSort

func (suu *SysUserUpdate) AddSort(i int32) *SysUserUpdate

AddSort adds i to the "sort" field.

func (*SysUserUpdate) AddStatus

func (suu *SysUserUpdate) AddStatus(i int16) *SysUserUpdate

AddStatus adds i to the "status" field.

func (*SysUserUpdate) ClearDeletedAt

func (suu *SysUserUpdate) ClearDeletedAt() *SysUserUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysUserUpdate) ClearFirstName

func (suu *SysUserUpdate) ClearFirstName() *SysUserUpdate

ClearFirstName clears the value of the "first_name" field.

func (*SysUserUpdate) ClearLastName

func (suu *SysUserUpdate) ClearLastName() *SysUserUpdate

ClearLastName clears the value of the "last_name" field.

func (*SysUserUpdate) ClearRealName

func (suu *SysUserUpdate) ClearRealName() *SysUserUpdate

ClearRealName clears the value of the "real_name" field.

func (*SysUserUpdate) Exec

func (suu *SysUserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SysUserUpdate) ExecX

func (suu *SysUserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SysUserUpdate) Mutation

func (suu *SysUserUpdate) Mutation() *SysUserMutation

Mutation returns the SysUserMutation object of the builder.

func (*SysUserUpdate) Save

func (suu *SysUserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SysUserUpdate) SaveX

func (suu *SysUserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SysUserUpdate) SetDeletedAt

func (suu *SysUserUpdate) SetDeletedAt(t time.Time) *SysUserUpdate

SetDeletedAt sets the "deleted_at" field.

func (*SysUserUpdate) SetEmail

func (suu *SysUserUpdate) SetEmail(s string) *SysUserUpdate

SetEmail sets the "Email" field.

func (*SysUserUpdate) SetFirstName

func (suu *SysUserUpdate) SetFirstName(s string) *SysUserUpdate

SetFirstName sets the "first_name" field.

func (*SysUserUpdate) SetInput

SetInput applies the change-set in the UpdateSysUserInput on the update builder.

func (*SysUserUpdate) SetIsDel

func (suu *SysUserUpdate) SetIsDel(b bool) *SysUserUpdate

SetIsDel sets the "is_del" field.

func (*SysUserUpdate) SetLastName

func (suu *SysUserUpdate) SetLastName(s string) *SysUserUpdate

SetLastName sets the "last_name" field.

func (*SysUserUpdate) SetNillableDeletedAt

func (suu *SysUserUpdate) SetNillableDeletedAt(t *time.Time) *SysUserUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysUserUpdate) SetNillableFirstName

func (suu *SysUserUpdate) SetNillableFirstName(s *string) *SysUserUpdate

SetNillableFirstName sets the "first_name" field if the given value is not nil.

func (*SysUserUpdate) SetNillableIsDel

func (suu *SysUserUpdate) SetNillableIsDel(b *bool) *SysUserUpdate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysUserUpdate) SetNillableLastName

func (suu *SysUserUpdate) SetNillableLastName(s *string) *SysUserUpdate

SetNillableLastName sets the "last_name" field if the given value is not nil.

func (*SysUserUpdate) SetNillableRealName

func (suu *SysUserUpdate) SetNillableRealName(s *string) *SysUserUpdate

SetNillableRealName sets the "real_name" field if the given value is not nil.

func (*SysUserUpdate) SetNillableSalt

func (suu *SysUserUpdate) SetNillableSalt(s *string) *SysUserUpdate

SetNillableSalt sets the "salt" field if the given value is not nil.

func (*SysUserUpdate) SetNillableSort

func (suu *SysUserUpdate) SetNillableSort(i *int32) *SysUserUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysUserUpdate) SetNillableStatus

func (suu *SysUserUpdate) SetNillableStatus(i *int16) *SysUserUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*SysUserUpdate) SetPassword

func (suu *SysUserUpdate) SetPassword(s string) *SysUserUpdate

SetPassword sets the "Password" field.

func (*SysUserUpdate) SetPhone

func (suu *SysUserUpdate) SetPhone(s string) *SysUserUpdate

SetPhone sets the "Phone" field.

func (*SysUserUpdate) SetRealName

func (suu *SysUserUpdate) SetRealName(s string) *SysUserUpdate

SetRealName sets the "real_name" field.

func (*SysUserUpdate) SetSalt

func (suu *SysUserUpdate) SetSalt(s string) *SysUserUpdate

SetSalt sets the "salt" field.

func (*SysUserUpdate) SetSort

func (suu *SysUserUpdate) SetSort(i int32) *SysUserUpdate

SetSort sets the "sort" field.

func (*SysUserUpdate) SetStatus

func (suu *SysUserUpdate) SetStatus(i int16) *SysUserUpdate

SetStatus sets the "status" field.

func (*SysUserUpdate) SetUpdatedAt

func (suu *SysUserUpdate) SetUpdatedAt(t time.Time) *SysUserUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SysUserUpdate) Where

func (suu *SysUserUpdate) Where(ps ...predicate.SysUser) *SysUserUpdate

Where adds a new predicate for the SysUserUpdate builder.

type SysUserUpdateOne

type SysUserUpdateOne struct {
	// contains filtered or unexported fields
}

SysUserUpdateOne is the builder for updating a single SysUser entity.

func (*SysUserUpdateOne) AddSort

func (suuo *SysUserUpdateOne) AddSort(i int32) *SysUserUpdateOne

AddSort adds i to the "sort" field.

func (*SysUserUpdateOne) AddStatus

func (suuo *SysUserUpdateOne) AddStatus(i int16) *SysUserUpdateOne

AddStatus adds i to the "status" field.

func (*SysUserUpdateOne) ClearDeletedAt

func (suuo *SysUserUpdateOne) ClearDeletedAt() *SysUserUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*SysUserUpdateOne) ClearFirstName

func (suuo *SysUserUpdateOne) ClearFirstName() *SysUserUpdateOne

ClearFirstName clears the value of the "first_name" field.

func (*SysUserUpdateOne) ClearLastName

func (suuo *SysUserUpdateOne) ClearLastName() *SysUserUpdateOne

ClearLastName clears the value of the "last_name" field.

func (*SysUserUpdateOne) ClearRealName

func (suuo *SysUserUpdateOne) ClearRealName() *SysUserUpdateOne

ClearRealName clears the value of the "real_name" field.

func (*SysUserUpdateOne) Exec

func (suuo *SysUserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SysUserUpdateOne) ExecX

func (suuo *SysUserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SysUserUpdateOne) Mutation

func (suuo *SysUserUpdateOne) Mutation() *SysUserMutation

Mutation returns the SysUserMutation object of the builder.

func (*SysUserUpdateOne) Save

func (suuo *SysUserUpdateOne) Save(ctx context.Context) (*SysUser, error)

Save executes the query and returns the updated SysUser entity.

func (*SysUserUpdateOne) SaveX

func (suuo *SysUserUpdateOne) SaveX(ctx context.Context) *SysUser

SaveX is like Save, but panics if an error occurs.

func (*SysUserUpdateOne) Select

func (suuo *SysUserUpdateOne) Select(field string, fields ...string) *SysUserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SysUserUpdateOne) SetDeletedAt

func (suuo *SysUserUpdateOne) SetDeletedAt(t time.Time) *SysUserUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*SysUserUpdateOne) SetEmail

func (suuo *SysUserUpdateOne) SetEmail(s string) *SysUserUpdateOne

SetEmail sets the "Email" field.

func (*SysUserUpdateOne) SetFirstName

func (suuo *SysUserUpdateOne) SetFirstName(s string) *SysUserUpdateOne

SetFirstName sets the "first_name" field.

func (*SysUserUpdateOne) SetInput

SetInput applies the change-set in the UpdateSysUserInput on the update-one builder.

func (*SysUserUpdateOne) SetIsDel

func (suuo *SysUserUpdateOne) SetIsDel(b bool) *SysUserUpdateOne

SetIsDel sets the "is_del" field.

func (*SysUserUpdateOne) SetLastName

func (suuo *SysUserUpdateOne) SetLastName(s string) *SysUserUpdateOne

SetLastName sets the "last_name" field.

func (*SysUserUpdateOne) SetNillableDeletedAt

func (suuo *SysUserUpdateOne) SetNillableDeletedAt(t *time.Time) *SysUserUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*SysUserUpdateOne) SetNillableFirstName

func (suuo *SysUserUpdateOne) SetNillableFirstName(s *string) *SysUserUpdateOne

SetNillableFirstName sets the "first_name" field if the given value is not nil.

func (*SysUserUpdateOne) SetNillableIsDel

func (suuo *SysUserUpdateOne) SetNillableIsDel(b *bool) *SysUserUpdateOne

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*SysUserUpdateOne) SetNillableLastName

func (suuo *SysUserUpdateOne) SetNillableLastName(s *string) *SysUserUpdateOne

SetNillableLastName sets the "last_name" field if the given value is not nil.

func (*SysUserUpdateOne) SetNillableRealName

func (suuo *SysUserUpdateOne) SetNillableRealName(s *string) *SysUserUpdateOne

SetNillableRealName sets the "real_name" field if the given value is not nil.

func (*SysUserUpdateOne) SetNillableSalt

func (suuo *SysUserUpdateOne) SetNillableSalt(s *string) *SysUserUpdateOne

SetNillableSalt sets the "salt" field if the given value is not nil.

func (*SysUserUpdateOne) SetNillableSort

func (suuo *SysUserUpdateOne) SetNillableSort(i *int32) *SysUserUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*SysUserUpdateOne) SetNillableStatus

func (suuo *SysUserUpdateOne) SetNillableStatus(i *int16) *SysUserUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*SysUserUpdateOne) SetPassword

func (suuo *SysUserUpdateOne) SetPassword(s string) *SysUserUpdateOne

SetPassword sets the "Password" field.

func (*SysUserUpdateOne) SetPhone

func (suuo *SysUserUpdateOne) SetPhone(s string) *SysUserUpdateOne

SetPhone sets the "Phone" field.

func (*SysUserUpdateOne) SetRealName

func (suuo *SysUserUpdateOne) SetRealName(s string) *SysUserUpdateOne

SetRealName sets the "real_name" field.

func (*SysUserUpdateOne) SetSalt

func (suuo *SysUserUpdateOne) SetSalt(s string) *SysUserUpdateOne

SetSalt sets the "salt" field.

func (*SysUserUpdateOne) SetSort

func (suuo *SysUserUpdateOne) SetSort(i int32) *SysUserUpdateOne

SetSort sets the "sort" field.

func (*SysUserUpdateOne) SetStatus

func (suuo *SysUserUpdateOne) SetStatus(i int16) *SysUserUpdateOne

SetStatus sets the "status" field.

func (*SysUserUpdateOne) SetUpdatedAt

func (suuo *SysUserUpdateOne) SetUpdatedAt(t time.Time) *SysUserUpdateOne

SetUpdatedAt sets the "updated_at" field.

type SysUsers

type SysUsers []*SysUser

SysUsers is a parsable slice of SysUser.

type Tx

type Tx struct {

	// SysDict is the client for interacting with the SysDict builders.
	SysDict *SysDictClient
	// SysDictItem is the client for interacting with the SysDictItem builders.
	SysDictItem *SysDictItemClient
	// SysJwtBlock is the client for interacting with the SysJwtBlock builders.
	SysJwtBlock *SysJwtBlockClient
	// SysLogging is the client for interacting with the SysLogging builders.
	SysLogging *SysLoggingClient
	// SysMenu is the client for interacting with the SysMenu builders.
	SysMenu *SysMenuClient
	// SysMenuAction is the client for interacting with the SysMenuAction builders.
	SysMenuAction *SysMenuActionClient
	// SysMenuActionResource is the client for interacting with the SysMenuActionResource builders.
	SysMenuActionResource *SysMenuActionResourceClient
	// SysRole is the client for interacting with the SysRole builders.
	SysRole *SysRoleClient
	// SysRoleMenu is the client for interacting with the SysRoleMenu builders.
	SysRoleMenu *SysRoleMenuClient
	// SysUser is the client for interacting with the SysUser builders.
	SysUser *SysUserClient
	// SysUserRole is the client for interacting with the SysUserRole builders.
	SysUserRole *SysUserRoleClient
	// XxxDemo is the client for interacting with the XxxDemo builders.
	XxxDemo *XxxDemoClient
	// 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) 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) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type UpdateSysDictInput

type UpdateSysDictInput struct {
	IsDel          *bool
	Memo           *string
	Sort           *int32
	UpdatedAt      *time.Time
	DeletedAt      *time.Time
	ClearDeletedAt bool
	Status         *int16
	NameCn         *string
	NameEn         *string
}

UpdateSysDictInput represents a mutation input for updating sysdicts.

func (*UpdateSysDictInput) Mutate

func (i *UpdateSysDictInput) Mutate(m *SysDictMutation)

Mutate applies the UpdateSysDictInput on the SysDictMutation.

type UpdateSysDictItemInput

type UpdateSysDictItemInput struct {
	IsDel          *bool
	Memo           *string
	Sort           *int32
	UpdatedAt      *time.Time
	DeletedAt      *time.Time
	ClearDeletedAt bool
	Label          *string
	Value          *int
	Status         *int16
	DictID         *string
}

UpdateSysDictItemInput represents a mutation input for updating sysdictitems.

func (*UpdateSysDictItemInput) Mutate

Mutate applies the UpdateSysDictItemInput on the SysDictItemMutation.

type UpdateSysJwtBlockInput

type UpdateSysJwtBlockInput struct {
	IsDel          *bool
	Memo           *string
	UpdatedAt      *time.Time
	DeletedAt      *time.Time
	ClearDeletedAt bool
	Status         *int16
	Jwt            *string
}

UpdateSysJwtBlockInput represents a mutation input for updating sysjwtblocks.

func (*UpdateSysJwtBlockInput) Mutate

Mutate applies the UpdateSysJwtBlockInput on the SysJwtBlockMutation.

type UpdateSysLoggingInput

type UpdateSysLoggingInput struct {
	IsDel      *bool
	Memo       *string
	Level      *string
	TraceID    *string
	UserID     *string
	Tag        *string
	Version    *string
	Message    *string
	ErrorStack *string
}

UpdateSysLoggingInput represents a mutation input for updating sysloggings.

func (*UpdateSysLoggingInput) Mutate

Mutate applies the UpdateSysLoggingInput on the SysLoggingMutation.

type UpdateSysMenuActionInput

type UpdateSysMenuActionInput struct {
	IsDel          *bool
	Sort           *int32
	Status         *int16
	Memo           *string
	UpdatedAt      *time.Time
	DeletedAt      *time.Time
	ClearDeletedAt bool
	MenuID         *string
	Code           *string
	Name           *string
}

UpdateSysMenuActionInput represents a mutation input for updating sysmenuactions.

func (*UpdateSysMenuActionInput) Mutate

Mutate applies the UpdateSysMenuActionInput on the SysMenuActionMutation.

type UpdateSysMenuActionResourceInput

type UpdateSysMenuActionResourceInput struct {
	IsDel          *bool
	Sort           *int32
	Memo           *string
	UpdatedAt      *time.Time
	DeletedAt      *time.Time
	ClearDeletedAt bool
	Status         *int16
	Method         *string
	Path           *string
	ActionID       *string
}

UpdateSysMenuActionResourceInput represents a mutation input for updating sysmenuactionresources.

func (*UpdateSysMenuActionResourceInput) Mutate

Mutate applies the UpdateSysMenuActionResourceInput on the SysMenuActionResourceMutation.

type UpdateSysMenuInput

type UpdateSysMenuInput struct {
	IsDel           *bool
	Memo            *string
	Sort            *int32
	UpdatedAt       *time.Time
	DeletedAt       *time.Time
	ClearDeletedAt  bool
	Status          *int16
	Name            *string
	Icon            *string
	Router          *string
	IsShow          *bool
	ParentID        *string
	ClearParentID   bool
	ParentPath      *string
	ClearParentPath bool
}

UpdateSysMenuInput represents a mutation input for updating sysmenus.

func (*UpdateSysMenuInput) Mutate

func (i *UpdateSysMenuInput) Mutate(m *SysMenuMutation)

Mutate applies the UpdateSysMenuInput on the SysMenuMutation.

type UpdateSysRoleInput

type UpdateSysRoleInput struct {
	IsDel          *bool
	Status         *int16
	Sort           *int32
	Memo           *string
	UpdatedAt      *time.Time
	DeletedAt      *time.Time
	ClearDeletedAt bool
	Name           *string
}

UpdateSysRoleInput represents a mutation input for updating sysroles.

func (*UpdateSysRoleInput) Mutate

func (i *UpdateSysRoleInput) Mutate(m *SysRoleMutation)

Mutate applies the UpdateSysRoleInput on the SysRoleMutation.

type UpdateSysRoleMenuInput

type UpdateSysRoleMenuInput struct {
	IsDel          *bool
	UpdatedAt      *time.Time
	DeletedAt      *time.Time
	ClearDeletedAt bool
	RoleID         *string
	MenuID         *string
	ActionID       *string
	ClearActionID  bool
}

UpdateSysRoleMenuInput represents a mutation input for updating sysrolemenus.

func (*UpdateSysRoleMenuInput) Mutate

Mutate applies the UpdateSysRoleMenuInput on the SysRoleMenuMutation.

type UpdateSysUserInput

type UpdateSysUserInput struct {
	IsDel          *bool
	Sort           *int32
	UpdatedAt      *time.Time
	DeletedAt      *time.Time
	ClearDeletedAt bool
	Status         *int16
	RealName       *string
	ClearRealName  bool
	FirstName      *string
	ClearFirstName bool
	LastName       *string
	ClearLastName  bool
	Password       *string
	Email          *string
	Phone          *string
	Salt           *string
}

UpdateSysUserInput represents a mutation input for updating sysusers.

func (*UpdateSysUserInput) Mutate

func (i *UpdateSysUserInput) Mutate(m *SysUserMutation)

Mutate applies the UpdateSysUserInput on the SysUserMutation.

type UpdateSysUserRoleInput

type UpdateSysUserRoleInput struct {
	IsDel          *bool
	UpdatedAt      *time.Time
	DeletedAt      *time.Time
	ClearDeletedAt bool
	UserID         *string
	RoleID         *string
}

UpdateSysUserRoleInput represents a mutation input for updating sysuserroles.

func (*UpdateSysUserRoleInput) Mutate

Mutate applies the UpdateSysUserRoleInput on the SysUserRoleMutation.

type UpdateXxxDemoInput

type UpdateXxxDemoInput struct {
	IsDel          *bool
	Memo           *string
	Sort           *int32
	UpdatedAt      *time.Time
	DeletedAt      *time.Time
	ClearDeletedAt bool
	Code           *string
	Name           *string
	Status         *int16
}

UpdateXxxDemoInput represents a mutation input for updating xxxdemos.

func (*UpdateXxxDemoInput) Mutate

func (i *UpdateXxxDemoInput) Mutate(m *XxxDemoMutation)

Mutate applies the UpdateXxxDemoInput on the XxxDemoMutation.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field 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.

type XxxDemo

type XxxDemo struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// IsDel holds the value of the "is_del" field.
	// 是否删除
	IsDel bool `json:"is_del,omitempty"`
	// Memo holds the value of the "memo" field.
	// 备注
	Memo string `json:"memo,omitempty"`
	// Sort holds the value of the "sort" field.
	// 排序, 在数据库里的排序
	Sort int32 `json:"sort,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	// 创建时间,由程序自动生成
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	// 更新时间,由程序自动生成
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// DeletedAt holds the value of the "deleted_at" field.
	// 删除时间,
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	// Code holds the value of the "code" field.
	// 编号
	Code string `json:"code,omitempty"`
	// Name holds the value of the "name" field.
	// 名称
	Name string `json:"name,omitempty"`
	// Status holds the value of the "status" field.
	// 状态
	Status int16 `json:"status,omitempty"`
	// contains filtered or unexported fields
}

XxxDemo is the model entity for the XxxDemo schema.

func (*XxxDemo) String

func (xd *XxxDemo) String() string

String implements the fmt.Stringer.

func (*XxxDemo) Unwrap

func (xd *XxxDemo) Unwrap() *XxxDemo

Unwrap unwraps the XxxDemo 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 (*XxxDemo) Update

func (xd *XxxDemo) Update() *XxxDemoUpdateOne

Update returns a builder for updating this XxxDemo. Note that you need to call XxxDemo.Unwrap() before calling this method if this XxxDemo was returned from a transaction, and the transaction was committed or rolled back.

type XxxDemoClient

type XxxDemoClient struct {
	// contains filtered or unexported fields
}

XxxDemoClient is a client for the XxxDemo schema.

func NewXxxDemoClient

func NewXxxDemoClient(c config) *XxxDemoClient

NewXxxDemoClient returns a client for the XxxDemo from the given config.

func (*XxxDemoClient) Create

func (c *XxxDemoClient) Create() *XxxDemoCreate

Create returns a create builder for XxxDemo.

func (*XxxDemoClient) CreateBulk

func (c *XxxDemoClient) CreateBulk(builders ...*XxxDemoCreate) *XxxDemoCreateBulk

CreateBulk returns a builder for creating a bulk of XxxDemo entities.

func (*XxxDemoClient) Delete

func (c *XxxDemoClient) Delete() *XxxDemoDelete

Delete returns a delete builder for XxxDemo.

func (*XxxDemoClient) DeleteOne

func (c *XxxDemoClient) DeleteOne(xd *XxxDemo) *XxxDemoDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*XxxDemoClient) DeleteOneID

func (c *XxxDemoClient) DeleteOneID(id string) *XxxDemoDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*XxxDemoClient) Get

func (c *XxxDemoClient) Get(ctx context.Context, id string) (*XxxDemo, error)

Get returns a XxxDemo entity by its id.

func (*XxxDemoClient) GetX

func (c *XxxDemoClient) GetX(ctx context.Context, id string) *XxxDemo

GetX is like Get, but panics if an error occurs.

func (*XxxDemoClient) Hooks

func (c *XxxDemoClient) Hooks() []Hook

Hooks returns the client hooks.

func (*XxxDemoClient) Query

func (c *XxxDemoClient) Query() *XxxDemoQuery

Query returns a query builder for XxxDemo.

func (*XxxDemoClient) Update

func (c *XxxDemoClient) Update() *XxxDemoUpdate

Update returns an update builder for XxxDemo.

func (*XxxDemoClient) UpdateOne

func (c *XxxDemoClient) UpdateOne(xd *XxxDemo) *XxxDemoUpdateOne

UpdateOne returns an update builder for the given entity.

func (*XxxDemoClient) UpdateOneID

func (c *XxxDemoClient) UpdateOneID(id string) *XxxDemoUpdateOne

UpdateOneID returns an update builder for the given id.

func (*XxxDemoClient) Use

func (c *XxxDemoClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `xxxdemo.Hooks(f(g(h())))`.

type XxxDemoCreate

type XxxDemoCreate struct {
	// contains filtered or unexported fields
}

XxxDemoCreate is the builder for creating a XxxDemo entity.

func (*XxxDemoCreate) Mutation

func (xdc *XxxDemoCreate) Mutation() *XxxDemoMutation

Mutation returns the XxxDemoMutation object of the builder.

func (*XxxDemoCreate) Save

func (xdc *XxxDemoCreate) Save(ctx context.Context) (*XxxDemo, error)

Save creates the XxxDemo in the database.

func (*XxxDemoCreate) SaveX

func (xdc *XxxDemoCreate) SaveX(ctx context.Context) *XxxDemo

SaveX calls Save and panics if Save returns an error.

func (*XxxDemoCreate) SetCode

func (xdc *XxxDemoCreate) SetCode(s string) *XxxDemoCreate

SetCode sets the "code" field.

func (*XxxDemoCreate) SetCreatedAt

func (xdc *XxxDemoCreate) SetCreatedAt(t time.Time) *XxxDemoCreate

SetCreatedAt sets the "created_at" field.

func (*XxxDemoCreate) SetDeletedAt

func (xdc *XxxDemoCreate) SetDeletedAt(t time.Time) *XxxDemoCreate

SetDeletedAt sets the "deleted_at" field.

func (*XxxDemoCreate) SetID

func (xdc *XxxDemoCreate) SetID(s string) *XxxDemoCreate

SetID sets the "id" field.

func (*XxxDemoCreate) SetInput

SetInput applies the change-set in the CreateXxxDemoInput on the create builder.

func (*XxxDemoCreate) SetIsDel

func (xdc *XxxDemoCreate) SetIsDel(b bool) *XxxDemoCreate

SetIsDel sets the "is_del" field.

func (*XxxDemoCreate) SetMemo

func (xdc *XxxDemoCreate) SetMemo(s string) *XxxDemoCreate

SetMemo sets the "memo" field.

func (*XxxDemoCreate) SetName

func (xdc *XxxDemoCreate) SetName(s string) *XxxDemoCreate

SetName sets the "name" field.

func (*XxxDemoCreate) SetNillableCreatedAt

func (xdc *XxxDemoCreate) SetNillableCreatedAt(t *time.Time) *XxxDemoCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*XxxDemoCreate) SetNillableDeletedAt

func (xdc *XxxDemoCreate) SetNillableDeletedAt(t *time.Time) *XxxDemoCreate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*XxxDemoCreate) SetNillableID

func (xdc *XxxDemoCreate) SetNillableID(s *string) *XxxDemoCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*XxxDemoCreate) SetNillableIsDel

func (xdc *XxxDemoCreate) SetNillableIsDel(b *bool) *XxxDemoCreate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*XxxDemoCreate) SetNillableMemo

func (xdc *XxxDemoCreate) SetNillableMemo(s *string) *XxxDemoCreate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*XxxDemoCreate) SetNillableSort

func (xdc *XxxDemoCreate) SetNillableSort(i *int32) *XxxDemoCreate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*XxxDemoCreate) SetNillableStatus

func (xdc *XxxDemoCreate) SetNillableStatus(i *int16) *XxxDemoCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*XxxDemoCreate) SetNillableUpdatedAt

func (xdc *XxxDemoCreate) SetNillableUpdatedAt(t *time.Time) *XxxDemoCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*XxxDemoCreate) SetSort

func (xdc *XxxDemoCreate) SetSort(i int32) *XxxDemoCreate

SetSort sets the "sort" field.

func (*XxxDemoCreate) SetStatus

func (xdc *XxxDemoCreate) SetStatus(i int16) *XxxDemoCreate

SetStatus sets the "status" field.

func (*XxxDemoCreate) SetUpdatedAt

func (xdc *XxxDemoCreate) SetUpdatedAt(t time.Time) *XxxDemoCreate

SetUpdatedAt sets the "updated_at" field.

type XxxDemoCreateBulk

type XxxDemoCreateBulk struct {
	// contains filtered or unexported fields
}

XxxDemoCreateBulk is the builder for creating many XxxDemo entities in bulk.

func (*XxxDemoCreateBulk) Save

func (xdcb *XxxDemoCreateBulk) Save(ctx context.Context) ([]*XxxDemo, error)

Save creates the XxxDemo entities in the database.

func (*XxxDemoCreateBulk) SaveX

func (xdcb *XxxDemoCreateBulk) SaveX(ctx context.Context) []*XxxDemo

SaveX is like Save, but panics if an error occurs.

type XxxDemoDelete

type XxxDemoDelete struct {
	// contains filtered or unexported fields
}

XxxDemoDelete is the builder for deleting a XxxDemo entity.

func (*XxxDemoDelete) Exec

func (xdd *XxxDemoDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*XxxDemoDelete) ExecX

func (xdd *XxxDemoDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*XxxDemoDelete) Where

func (xdd *XxxDemoDelete) Where(ps ...predicate.XxxDemo) *XxxDemoDelete

Where adds a new predicate to the XxxDemoDelete builder.

type XxxDemoDeleteOne

type XxxDemoDeleteOne struct {
	// contains filtered or unexported fields
}

XxxDemoDeleteOne is the builder for deleting a single XxxDemo entity.

func (*XxxDemoDeleteOne) Exec

func (xddo *XxxDemoDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*XxxDemoDeleteOne) ExecX

func (xddo *XxxDemoDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type XxxDemoGroupBy

type XxxDemoGroupBy struct {
	// contains filtered or unexported fields
}

XxxDemoGroupBy is the group-by builder for XxxDemo entities.

func (*XxxDemoGroupBy) Aggregate

func (xdgb *XxxDemoGroupBy) Aggregate(fns ...AggregateFunc) *XxxDemoGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*XxxDemoGroupBy) Bool

func (xdgb *XxxDemoGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*XxxDemoGroupBy) BoolX

func (xdgb *XxxDemoGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*XxxDemoGroupBy) Bools

func (xdgb *XxxDemoGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*XxxDemoGroupBy) BoolsX

func (xdgb *XxxDemoGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*XxxDemoGroupBy) Float64

func (xdgb *XxxDemoGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*XxxDemoGroupBy) Float64X

func (xdgb *XxxDemoGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*XxxDemoGroupBy) Float64s

func (xdgb *XxxDemoGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*XxxDemoGroupBy) Float64sX

func (xdgb *XxxDemoGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*XxxDemoGroupBy) Int

func (xdgb *XxxDemoGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*XxxDemoGroupBy) IntX

func (xdgb *XxxDemoGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*XxxDemoGroupBy) Ints

func (xdgb *XxxDemoGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*XxxDemoGroupBy) IntsX

func (xdgb *XxxDemoGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*XxxDemoGroupBy) Scan

func (xdgb *XxxDemoGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*XxxDemoGroupBy) ScanX

func (xdgb *XxxDemoGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*XxxDemoGroupBy) String

func (xdgb *XxxDemoGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*XxxDemoGroupBy) StringX

func (xdgb *XxxDemoGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*XxxDemoGroupBy) Strings

func (xdgb *XxxDemoGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*XxxDemoGroupBy) StringsX

func (xdgb *XxxDemoGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type XxxDemoMutation

type XxxDemoMutation struct {
	// contains filtered or unexported fields
}

XxxDemoMutation represents an operation that mutates the XxxDemo nodes in the graph.

func (*XxxDemoMutation) AddField

func (m *XxxDemoMutation) 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 (*XxxDemoMutation) AddSort

func (m *XxxDemoMutation) AddSort(i int32)

AddSort adds i to the "sort" field.

func (*XxxDemoMutation) AddStatus

func (m *XxxDemoMutation) AddStatus(i int16)

AddStatus adds i to the "status" field.

func (*XxxDemoMutation) AddedEdges

func (m *XxxDemoMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*XxxDemoMutation) AddedField

func (m *XxxDemoMutation) 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 (*XxxDemoMutation) AddedFields

func (m *XxxDemoMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*XxxDemoMutation) AddedIDs

func (m *XxxDemoMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*XxxDemoMutation) AddedSort

func (m *XxxDemoMutation) AddedSort() (r int32, exists bool)

AddedSort returns the value that was added to the "sort" field in this mutation.

func (*XxxDemoMutation) AddedStatus

func (m *XxxDemoMutation) AddedStatus() (r int16, exists bool)

AddedStatus returns the value that was added to the "status" field in this mutation.

func (*XxxDemoMutation) ClearDeletedAt

func (m *XxxDemoMutation) ClearDeletedAt()

ClearDeletedAt clears the value of the "deleted_at" field.

func (*XxxDemoMutation) ClearEdge

func (m *XxxDemoMutation) 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 (*XxxDemoMutation) ClearField

func (m *XxxDemoMutation) 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 (*XxxDemoMutation) ClearedEdges

func (m *XxxDemoMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*XxxDemoMutation) ClearedFields

func (m *XxxDemoMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (XxxDemoMutation) Client

func (m XxxDemoMutation) 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 (*XxxDemoMutation) Code

func (m *XxxDemoMutation) Code() (r string, exists bool)

Code returns the value of the "code" field in the mutation.

func (*XxxDemoMutation) CreatedAt

func (m *XxxDemoMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*XxxDemoMutation) DeletedAt

func (m *XxxDemoMutation) DeletedAt() (r time.Time, exists bool)

DeletedAt returns the value of the "deleted_at" field in the mutation.

func (*XxxDemoMutation) DeletedAtCleared

func (m *XxxDemoMutation) DeletedAtCleared() bool

DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.

func (*XxxDemoMutation) EdgeCleared

func (m *XxxDemoMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*XxxDemoMutation) Field

func (m *XxxDemoMutation) 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 (*XxxDemoMutation) FieldCleared

func (m *XxxDemoMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*XxxDemoMutation) Fields

func (m *XxxDemoMutation) 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 (*XxxDemoMutation) ID

func (m *XxxDemoMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder.

func (*XxxDemoMutation) IsDel

func (m *XxxDemoMutation) IsDel() (r bool, exists bool)

IsDel returns the value of the "is_del" field in the mutation.

func (*XxxDemoMutation) Memo

func (m *XxxDemoMutation) Memo() (r string, exists bool)

Memo returns the value of the "memo" field in the mutation.

func (*XxxDemoMutation) Name

func (m *XxxDemoMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*XxxDemoMutation) OldCode

func (m *XxxDemoMutation) OldCode(ctx context.Context) (v string, err error)

OldCode returns the old "code" field's value of the XxxDemo entity. If the XxxDemo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*XxxDemoMutation) OldCreatedAt

func (m *XxxDemoMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the XxxDemo entity. If the XxxDemo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*XxxDemoMutation) OldDeletedAt

func (m *XxxDemoMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)

OldDeletedAt returns the old "deleted_at" field's value of the XxxDemo entity. If the XxxDemo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*XxxDemoMutation) OldField

func (m *XxxDemoMutation) 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 (*XxxDemoMutation) OldIsDel

func (m *XxxDemoMutation) OldIsDel(ctx context.Context) (v bool, err error)

OldIsDel returns the old "is_del" field's value of the XxxDemo entity. If the XxxDemo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*XxxDemoMutation) OldMemo

func (m *XxxDemoMutation) OldMemo(ctx context.Context) (v string, err error)

OldMemo returns the old "memo" field's value of the XxxDemo entity. If the XxxDemo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*XxxDemoMutation) OldName

func (m *XxxDemoMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the XxxDemo entity. If the XxxDemo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*XxxDemoMutation) OldSort

func (m *XxxDemoMutation) OldSort(ctx context.Context) (v int32, err error)

OldSort returns the old "sort" field's value of the XxxDemo entity. If the XxxDemo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*XxxDemoMutation) OldStatus

func (m *XxxDemoMutation) OldStatus(ctx context.Context) (v int16, err error)

OldStatus returns the old "status" field's value of the XxxDemo entity. If the XxxDemo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*XxxDemoMutation) OldUpdatedAt

func (m *XxxDemoMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the XxxDemo entity. If the XxxDemo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*XxxDemoMutation) Op

func (m *XxxDemoMutation) Op() Op

Op returns the operation name.

func (*XxxDemoMutation) RemovedEdges

func (m *XxxDemoMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*XxxDemoMutation) RemovedIDs

func (m *XxxDemoMutation) 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 (*XxxDemoMutation) ResetCode

func (m *XxxDemoMutation) ResetCode()

ResetCode resets all changes to the "code" field.

func (*XxxDemoMutation) ResetCreatedAt

func (m *XxxDemoMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*XxxDemoMutation) ResetDeletedAt

func (m *XxxDemoMutation) ResetDeletedAt()

ResetDeletedAt resets all changes to the "deleted_at" field.

func (*XxxDemoMutation) ResetEdge

func (m *XxxDemoMutation) 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 (*XxxDemoMutation) ResetField

func (m *XxxDemoMutation) 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 (*XxxDemoMutation) ResetIsDel

func (m *XxxDemoMutation) ResetIsDel()

ResetIsDel resets all changes to the "is_del" field.

func (*XxxDemoMutation) ResetMemo

func (m *XxxDemoMutation) ResetMemo()

ResetMemo resets all changes to the "memo" field.

func (*XxxDemoMutation) ResetName

func (m *XxxDemoMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*XxxDemoMutation) ResetSort

func (m *XxxDemoMutation) ResetSort()

ResetSort resets all changes to the "sort" field.

func (*XxxDemoMutation) ResetStatus

func (m *XxxDemoMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*XxxDemoMutation) ResetUpdatedAt

func (m *XxxDemoMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*XxxDemoMutation) SetCode

func (m *XxxDemoMutation) SetCode(s string)

SetCode sets the "code" field.

func (*XxxDemoMutation) SetCreatedAt

func (m *XxxDemoMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*XxxDemoMutation) SetDeletedAt

func (m *XxxDemoMutation) SetDeletedAt(t time.Time)

SetDeletedAt sets the "deleted_at" field.

func (*XxxDemoMutation) SetField

func (m *XxxDemoMutation) 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 (*XxxDemoMutation) SetID

func (m *XxxDemoMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of XxxDemo entities.

func (*XxxDemoMutation) SetIsDel

func (m *XxxDemoMutation) SetIsDel(b bool)

SetIsDel sets the "is_del" field.

func (*XxxDemoMutation) SetMemo

func (m *XxxDemoMutation) SetMemo(s string)

SetMemo sets the "memo" field.

func (*XxxDemoMutation) SetName

func (m *XxxDemoMutation) SetName(s string)

SetName sets the "name" field.

func (*XxxDemoMutation) SetSort

func (m *XxxDemoMutation) SetSort(i int32)

SetSort sets the "sort" field.

func (*XxxDemoMutation) SetStatus

func (m *XxxDemoMutation) SetStatus(i int16)

SetStatus sets the "status" field.

func (*XxxDemoMutation) SetUpdatedAt

func (m *XxxDemoMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*XxxDemoMutation) Sort

func (m *XxxDemoMutation) Sort() (r int32, exists bool)

Sort returns the value of the "sort" field in the mutation.

func (*XxxDemoMutation) Status

func (m *XxxDemoMutation) Status() (r int16, exists bool)

Status returns the value of the "status" field in the mutation.

func (XxxDemoMutation) Tx

func (m XxxDemoMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*XxxDemoMutation) Type

func (m *XxxDemoMutation) Type() string

Type returns the node type of this mutation (XxxDemo).

func (*XxxDemoMutation) UpdatedAt

func (m *XxxDemoMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

type XxxDemoQuery

type XxxDemoQuery struct {
	// contains filtered or unexported fields
}

XxxDemoQuery is the builder for querying XxxDemo entities.

func (*XxxDemoQuery) All

func (xdq *XxxDemoQuery) All(ctx context.Context) ([]*XxxDemo, error)

All executes the query and returns a list of XxxDemos.

func (*XxxDemoQuery) AllX

func (xdq *XxxDemoQuery) AllX(ctx context.Context) []*XxxDemo

AllX is like All, but panics if an error occurs.

func (*XxxDemoQuery) Clone

func (xdq *XxxDemoQuery) Clone() *XxxDemoQuery

Clone returns a duplicate of the XxxDemoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*XxxDemoQuery) Count

func (xdq *XxxDemoQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*XxxDemoQuery) CountX

func (xdq *XxxDemoQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*XxxDemoQuery) Exist

func (xdq *XxxDemoQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*XxxDemoQuery) ExistX

func (xdq *XxxDemoQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*XxxDemoQuery) First

func (xdq *XxxDemoQuery) First(ctx context.Context) (*XxxDemo, error)

First returns the first XxxDemo entity from the query. Returns a *NotFoundError when no XxxDemo was found.

func (*XxxDemoQuery) FirstID

func (xdq *XxxDemoQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first XxxDemo ID from the query. Returns a *NotFoundError when no XxxDemo ID was found.

func (*XxxDemoQuery) FirstIDX

func (xdq *XxxDemoQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*XxxDemoQuery) FirstX

func (xdq *XxxDemoQuery) FirstX(ctx context.Context) *XxxDemo

FirstX is like First, but panics if an error occurs.

func (*XxxDemoQuery) GroupBy

func (xdq *XxxDemoQuery) GroupBy(field string, fields ...string) *XxxDemoGroupBy

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 {
	IsDel bool `json:"is_del,omitempty"`
	Count int `json:"count,omitempty"`
}

client.XxxDemo.Query().
	GroupBy(xxxdemo.FieldIsDel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*XxxDemoQuery) IDs

func (xdq *XxxDemoQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of XxxDemo IDs.

func (*XxxDemoQuery) IDsX

func (xdq *XxxDemoQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*XxxDemoQuery) Limit

func (xdq *XxxDemoQuery) Limit(limit int) *XxxDemoQuery

Limit adds a limit step to the query.

func (*XxxDemoQuery) Offset

func (xdq *XxxDemoQuery) Offset(offset int) *XxxDemoQuery

Offset adds an offset step to the query.

func (*XxxDemoQuery) Only

func (xdq *XxxDemoQuery) Only(ctx context.Context) (*XxxDemo, error)

Only returns a single XxxDemo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one XxxDemo entity is not found. Returns a *NotFoundError when no XxxDemo entities are found.

func (*XxxDemoQuery) OnlyID

func (xdq *XxxDemoQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only XxxDemo ID in the query. Returns a *NotSingularError when exactly one XxxDemo ID is not found. Returns a *NotFoundError when no entities are found.

func (*XxxDemoQuery) OnlyIDX

func (xdq *XxxDemoQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*XxxDemoQuery) OnlyX

func (xdq *XxxDemoQuery) OnlyX(ctx context.Context) *XxxDemo

OnlyX is like Only, but panics if an error occurs.

func (*XxxDemoQuery) Order

func (xdq *XxxDemoQuery) Order(o ...OrderFunc) *XxxDemoQuery

Order adds an order step to the query.

func (*XxxDemoQuery) Select

func (xdq *XxxDemoQuery) Select(field string, fields ...string) *XxxDemoSelect

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 {
	IsDel bool `json:"is_del,omitempty"`
}

client.XxxDemo.Query().
	Select(xxxdemo.FieldIsDel).
	Scan(ctx, &v)

func (*XxxDemoQuery) Unique

func (xdq *XxxDemoQuery) Unique(unique bool) *XxxDemoQuery

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 (*XxxDemoQuery) Where

func (xdq *XxxDemoQuery) Where(ps ...predicate.XxxDemo) *XxxDemoQuery

Where adds a new predicate for the XxxDemoQuery builder.

type XxxDemoSelect

type XxxDemoSelect struct {
	*XxxDemoQuery
	// contains filtered or unexported fields
}

XxxDemoSelect is the builder for selecting fields of XxxDemo entities.

func (*XxxDemoSelect) Bool

func (xds *XxxDemoSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*XxxDemoSelect) BoolX

func (xds *XxxDemoSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*XxxDemoSelect) Bools

func (xds *XxxDemoSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*XxxDemoSelect) BoolsX

func (xds *XxxDemoSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*XxxDemoSelect) Float64

func (xds *XxxDemoSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*XxxDemoSelect) Float64X

func (xds *XxxDemoSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*XxxDemoSelect) Float64s

func (xds *XxxDemoSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*XxxDemoSelect) Float64sX

func (xds *XxxDemoSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*XxxDemoSelect) Int

func (xds *XxxDemoSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*XxxDemoSelect) IntX

func (xds *XxxDemoSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*XxxDemoSelect) Ints

func (xds *XxxDemoSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*XxxDemoSelect) IntsX

func (xds *XxxDemoSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*XxxDemoSelect) Scan

func (xds *XxxDemoSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*XxxDemoSelect) ScanX

func (xds *XxxDemoSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*XxxDemoSelect) String

func (xds *XxxDemoSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*XxxDemoSelect) StringX

func (xds *XxxDemoSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*XxxDemoSelect) Strings

func (xds *XxxDemoSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*XxxDemoSelect) StringsX

func (xds *XxxDemoSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type XxxDemoUpdate

type XxxDemoUpdate struct {
	// contains filtered or unexported fields
}

XxxDemoUpdate is the builder for updating XxxDemo entities.

func (*XxxDemoUpdate) AddSort

func (xdu *XxxDemoUpdate) AddSort(i int32) *XxxDemoUpdate

AddSort adds i to the "sort" field.

func (*XxxDemoUpdate) AddStatus

func (xdu *XxxDemoUpdate) AddStatus(i int16) *XxxDemoUpdate

AddStatus adds i to the "status" field.

func (*XxxDemoUpdate) ClearDeletedAt

func (xdu *XxxDemoUpdate) ClearDeletedAt() *XxxDemoUpdate

ClearDeletedAt clears the value of the "deleted_at" field.

func (*XxxDemoUpdate) Exec

func (xdu *XxxDemoUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*XxxDemoUpdate) ExecX

func (xdu *XxxDemoUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*XxxDemoUpdate) Mutation

func (xdu *XxxDemoUpdate) Mutation() *XxxDemoMutation

Mutation returns the XxxDemoMutation object of the builder.

func (*XxxDemoUpdate) Save

func (xdu *XxxDemoUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*XxxDemoUpdate) SaveX

func (xdu *XxxDemoUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*XxxDemoUpdate) SetCode

func (xdu *XxxDemoUpdate) SetCode(s string) *XxxDemoUpdate

SetCode sets the "code" field.

func (*XxxDemoUpdate) SetDeletedAt

func (xdu *XxxDemoUpdate) SetDeletedAt(t time.Time) *XxxDemoUpdate

SetDeletedAt sets the "deleted_at" field.

func (*XxxDemoUpdate) SetInput

SetInput applies the change-set in the UpdateXxxDemoInput on the update builder.

func (*XxxDemoUpdate) SetIsDel

func (xdu *XxxDemoUpdate) SetIsDel(b bool) *XxxDemoUpdate

SetIsDel sets the "is_del" field.

func (*XxxDemoUpdate) SetMemo

func (xdu *XxxDemoUpdate) SetMemo(s string) *XxxDemoUpdate

SetMemo sets the "memo" field.

func (*XxxDemoUpdate) SetName

func (xdu *XxxDemoUpdate) SetName(s string) *XxxDemoUpdate

SetName sets the "name" field.

func (*XxxDemoUpdate) SetNillableDeletedAt

func (xdu *XxxDemoUpdate) SetNillableDeletedAt(t *time.Time) *XxxDemoUpdate

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*XxxDemoUpdate) SetNillableIsDel

func (xdu *XxxDemoUpdate) SetNillableIsDel(b *bool) *XxxDemoUpdate

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*XxxDemoUpdate) SetNillableMemo

func (xdu *XxxDemoUpdate) SetNillableMemo(s *string) *XxxDemoUpdate

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*XxxDemoUpdate) SetNillableSort

func (xdu *XxxDemoUpdate) SetNillableSort(i *int32) *XxxDemoUpdate

SetNillableSort sets the "sort" field if the given value is not nil.

func (*XxxDemoUpdate) SetNillableStatus

func (xdu *XxxDemoUpdate) SetNillableStatus(i *int16) *XxxDemoUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*XxxDemoUpdate) SetSort

func (xdu *XxxDemoUpdate) SetSort(i int32) *XxxDemoUpdate

SetSort sets the "sort" field.

func (*XxxDemoUpdate) SetStatus

func (xdu *XxxDemoUpdate) SetStatus(i int16) *XxxDemoUpdate

SetStatus sets the "status" field.

func (*XxxDemoUpdate) SetUpdatedAt

func (xdu *XxxDemoUpdate) SetUpdatedAt(t time.Time) *XxxDemoUpdate

SetUpdatedAt sets the "updated_at" field.

func (*XxxDemoUpdate) Where

func (xdu *XxxDemoUpdate) Where(ps ...predicate.XxxDemo) *XxxDemoUpdate

Where adds a new predicate for the XxxDemoUpdate builder.

type XxxDemoUpdateOne

type XxxDemoUpdateOne struct {
	// contains filtered or unexported fields
}

XxxDemoUpdateOne is the builder for updating a single XxxDemo entity.

func (*XxxDemoUpdateOne) AddSort

func (xduo *XxxDemoUpdateOne) AddSort(i int32) *XxxDemoUpdateOne

AddSort adds i to the "sort" field.

func (*XxxDemoUpdateOne) AddStatus

func (xduo *XxxDemoUpdateOne) AddStatus(i int16) *XxxDemoUpdateOne

AddStatus adds i to the "status" field.

func (*XxxDemoUpdateOne) ClearDeletedAt

func (xduo *XxxDemoUpdateOne) ClearDeletedAt() *XxxDemoUpdateOne

ClearDeletedAt clears the value of the "deleted_at" field.

func (*XxxDemoUpdateOne) Exec

func (xduo *XxxDemoUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*XxxDemoUpdateOne) ExecX

func (xduo *XxxDemoUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*XxxDemoUpdateOne) Mutation

func (xduo *XxxDemoUpdateOne) Mutation() *XxxDemoMutation

Mutation returns the XxxDemoMutation object of the builder.

func (*XxxDemoUpdateOne) Save

func (xduo *XxxDemoUpdateOne) Save(ctx context.Context) (*XxxDemo, error)

Save executes the query and returns the updated XxxDemo entity.

func (*XxxDemoUpdateOne) SaveX

func (xduo *XxxDemoUpdateOne) SaveX(ctx context.Context) *XxxDemo

SaveX is like Save, but panics if an error occurs.

func (*XxxDemoUpdateOne) Select

func (xduo *XxxDemoUpdateOne) Select(field string, fields ...string) *XxxDemoUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*XxxDemoUpdateOne) SetCode

func (xduo *XxxDemoUpdateOne) SetCode(s string) *XxxDemoUpdateOne

SetCode sets the "code" field.

func (*XxxDemoUpdateOne) SetDeletedAt

func (xduo *XxxDemoUpdateOne) SetDeletedAt(t time.Time) *XxxDemoUpdateOne

SetDeletedAt sets the "deleted_at" field.

func (*XxxDemoUpdateOne) SetInput

SetInput applies the change-set in the UpdateXxxDemoInput on the update-one builder.

func (*XxxDemoUpdateOne) SetIsDel

func (xduo *XxxDemoUpdateOne) SetIsDel(b bool) *XxxDemoUpdateOne

SetIsDel sets the "is_del" field.

func (*XxxDemoUpdateOne) SetMemo

func (xduo *XxxDemoUpdateOne) SetMemo(s string) *XxxDemoUpdateOne

SetMemo sets the "memo" field.

func (*XxxDemoUpdateOne) SetName

func (xduo *XxxDemoUpdateOne) SetName(s string) *XxxDemoUpdateOne

SetName sets the "name" field.

func (*XxxDemoUpdateOne) SetNillableDeletedAt

func (xduo *XxxDemoUpdateOne) SetNillableDeletedAt(t *time.Time) *XxxDemoUpdateOne

SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.

func (*XxxDemoUpdateOne) SetNillableIsDel

func (xduo *XxxDemoUpdateOne) SetNillableIsDel(b *bool) *XxxDemoUpdateOne

SetNillableIsDel sets the "is_del" field if the given value is not nil.

func (*XxxDemoUpdateOne) SetNillableMemo

func (xduo *XxxDemoUpdateOne) SetNillableMemo(s *string) *XxxDemoUpdateOne

SetNillableMemo sets the "memo" field if the given value is not nil.

func (*XxxDemoUpdateOne) SetNillableSort

func (xduo *XxxDemoUpdateOne) SetNillableSort(i *int32) *XxxDemoUpdateOne

SetNillableSort sets the "sort" field if the given value is not nil.

func (*XxxDemoUpdateOne) SetNillableStatus

func (xduo *XxxDemoUpdateOne) SetNillableStatus(i *int16) *XxxDemoUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*XxxDemoUpdateOne) SetSort

func (xduo *XxxDemoUpdateOne) SetSort(i int32) *XxxDemoUpdateOne

SetSort sets the "sort" field.

func (*XxxDemoUpdateOne) SetStatus

func (xduo *XxxDemoUpdateOne) SetStatus(i int16) *XxxDemoUpdateOne

SetStatus sets the "status" field.

func (*XxxDemoUpdateOne) SetUpdatedAt

func (xduo *XxxDemoUpdateOne) SetUpdatedAt(t time.Time) *XxxDemoUpdateOne

SetUpdatedAt sets the "updated_at" field.

type XxxDemos

type XxxDemos []*XxxDemo

XxxDemos is a parsable slice of XxxDemo.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL