ent

package
v0.0.0-...-9f34937 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 50 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.
	TypeMsgAlert      = "MsgAlert"
	TypeMsgChannel    = "MsgChannel"
	TypeMsgEvent      = "MsgEvent"
	TypeMsgInternal   = "MsgInternal"
	TypeMsgInternalTo = "MsgInternalTo"
	TypeMsgSubscriber = "MsgSubscriber"
	TypeMsgTemplate   = "MsgTemplate"
	TypeMsgType       = "MsgType"
	TypeNlog          = "Nlog"
	TypeNlogAlert     = "NlogAlert"
	TypeOrgRoleUser   = "OrgRoleUser"
	TypeSilence       = "Silence"
	TypeUser          = "User"
)

Variables

View Source
var DefaultMsgAlertOrder = &MsgAlertOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &MsgAlertOrderField{
		Value: func(ma *MsgAlert) (ent.Value, error) {
			return ma.ID, nil
		},
		column: msgalert.FieldID,
		toTerm: msgalert.ByID,
		toCursor: func(ma *MsgAlert) Cursor {
			return Cursor{ID: ma.ID}
		},
	},
}

DefaultMsgAlertOrder is the default ordering of MsgAlert.

View Source
var DefaultMsgChannelOrder = &MsgChannelOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &MsgChannelOrderField{
		Value: func(mc *MsgChannel) (ent.Value, error) {
			return mc.ID, nil
		},
		column: msgchannel.FieldID,
		toTerm: msgchannel.ByID,
		toCursor: func(mc *MsgChannel) Cursor {
			return Cursor{ID: mc.ID}
		},
	},
}

DefaultMsgChannelOrder is the default ordering of MsgChannel.

View Source
var DefaultMsgEventOrder = &MsgEventOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &MsgEventOrderField{
		Value: func(me *MsgEvent) (ent.Value, error) {
			return me.ID, nil
		},
		column: msgevent.FieldID,
		toTerm: msgevent.ByID,
		toCursor: func(me *MsgEvent) Cursor {
			return Cursor{ID: me.ID}
		},
	},
}

DefaultMsgEventOrder is the default ordering of MsgEvent.

View Source
var DefaultMsgInternalOrder = &MsgInternalOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &MsgInternalOrderField{
		Value: func(mi *MsgInternal) (ent.Value, error) {
			return mi.ID, nil
		},
		column: msginternal.FieldID,
		toTerm: msginternal.ByID,
		toCursor: func(mi *MsgInternal) Cursor {
			return Cursor{ID: mi.ID}
		},
	},
}

DefaultMsgInternalOrder is the default ordering of MsgInternal.

View Source
var DefaultMsgInternalToOrder = &MsgInternalToOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &MsgInternalToOrderField{
		Value: func(mit *MsgInternalTo) (ent.Value, error) {
			return mit.ID, nil
		},
		column: msginternalto.FieldID,
		toTerm: msginternalto.ByID,
		toCursor: func(mit *MsgInternalTo) Cursor {
			return Cursor{ID: mit.ID}
		},
	},
}

DefaultMsgInternalToOrder is the default ordering of MsgInternalTo.

View Source
var DefaultMsgSubscriberOrder = &MsgSubscriberOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &MsgSubscriberOrderField{
		Value: func(ms *MsgSubscriber) (ent.Value, error) {
			return ms.ID, nil
		},
		column: msgsubscriber.FieldID,
		toTerm: msgsubscriber.ByID,
		toCursor: func(ms *MsgSubscriber) Cursor {
			return Cursor{ID: ms.ID}
		},
	},
}

DefaultMsgSubscriberOrder is the default ordering of MsgSubscriber.

View Source
var DefaultMsgTemplateOrder = &MsgTemplateOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &MsgTemplateOrderField{
		Value: func(mt *MsgTemplate) (ent.Value, error) {
			return mt.ID, nil
		},
		column: msgtemplate.FieldID,
		toTerm: msgtemplate.ByID,
		toCursor: func(mt *MsgTemplate) Cursor {
			return Cursor{ID: mt.ID}
		},
	},
}

DefaultMsgTemplateOrder is the default ordering of MsgTemplate.

View Source
var DefaultMsgTypeOrder = &MsgTypeOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &MsgTypeOrderField{
		Value: func(mt *MsgType) (ent.Value, error) {
			return mt.ID, nil
		},
		column: msgtype.FieldID,
		toTerm: msgtype.ByID,
		toCursor: func(mt *MsgType) Cursor {
			return Cursor{ID: mt.ID}
		},
	},
}

DefaultMsgTypeOrder is the default ordering of MsgType.

View Source
var DefaultNlogAlertOrder = &NlogAlertOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &NlogAlertOrderField{
		Value: func(na *NlogAlert) (ent.Value, error) {
			return na.ID, nil
		},
		column: nlogalert.FieldID,
		toTerm: nlogalert.ByID,
		toCursor: func(na *NlogAlert) Cursor {
			return Cursor{ID: na.ID}
		},
	},
}

DefaultNlogAlertOrder is the default ordering of NlogAlert.

View Source
var DefaultNlogOrder = &NlogOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &NlogOrderField{
		Value: func(n *Nlog) (ent.Value, error) {
			return n.ID, nil
		},
		column: nlog.FieldID,
		toTerm: nlog.ByID,
		toCursor: func(n *Nlog) Cursor {
			return Cursor{ID: n.ID}
		},
	},
}

DefaultNlogOrder is the default ordering of Nlog.

View Source
var DefaultSilenceOrder = &SilenceOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &SilenceOrderField{
		Value: func(s *Silence) (ent.Value, error) {
			return s.ID, nil
		},
		column: silence.FieldID,
		toTerm: silence.ByID,
		toCursor: func(s *Silence) Cursor {
			return Cursor{ID: s.ID}
		},
	},
}

DefaultSilenceOrder is the default ordering of Silence.

View Source
var DefaultUserOrder = &UserOrder{
	Direction: entgql.OrderDirectionAsc,
	Field: &UserOrderField{
		Value: func(u *User) (ent.Value, error) {
			return u.ID, nil
		},
		column: user.FieldID,
		toTerm: user.ByID,
		toCursor: func(u *User) Cursor {
			return Cursor{ID: u.ID}
		},
	},
}

DefaultUserOrder is the default ordering of User.

View Source
var ErrEmptyMsgAlertWhereInput = errors.New("ent: empty predicate MsgAlertWhereInput")

ErrEmptyMsgAlertWhereInput is returned in case the MsgAlertWhereInput is empty.

View Source
var ErrEmptyMsgChannelWhereInput = errors.New("ent: empty predicate MsgChannelWhereInput")

ErrEmptyMsgChannelWhereInput is returned in case the MsgChannelWhereInput is empty.

View Source
var ErrEmptyMsgEventWhereInput = errors.New("ent: empty predicate MsgEventWhereInput")

ErrEmptyMsgEventWhereInput is returned in case the MsgEventWhereInput is empty.

View Source
var ErrEmptyMsgInternalToWhereInput = errors.New("ent: empty predicate MsgInternalToWhereInput")

ErrEmptyMsgInternalToWhereInput is returned in case the MsgInternalToWhereInput is empty.

View Source
var ErrEmptyMsgInternalWhereInput = errors.New("ent: empty predicate MsgInternalWhereInput")

ErrEmptyMsgInternalWhereInput is returned in case the MsgInternalWhereInput is empty.

View Source
var ErrEmptyMsgSubscriberWhereInput = errors.New("ent: empty predicate MsgSubscriberWhereInput")

ErrEmptyMsgSubscriberWhereInput is returned in case the MsgSubscriberWhereInput is empty.

View Source
var ErrEmptyMsgTemplateWhereInput = errors.New("ent: empty predicate MsgTemplateWhereInput")

ErrEmptyMsgTemplateWhereInput is returned in case the MsgTemplateWhereInput is empty.

View Source
var ErrEmptyMsgTypeWhereInput = errors.New("ent: empty predicate MsgTypeWhereInput")

ErrEmptyMsgTypeWhereInput is returned in case the MsgTypeWhereInput is empty.

View Source
var ErrEmptyNlogAlertWhereInput = errors.New("ent: empty predicate NlogAlertWhereInput")

ErrEmptyNlogAlertWhereInput is returned in case the NlogAlertWhereInput is empty.

View Source
var ErrEmptyNlogWhereInput = errors.New("ent: empty predicate NlogWhereInput")

ErrEmptyNlogWhereInput is returned in case the NlogWhereInput is empty.

View Source
var ErrEmptySilenceWhereInput = errors.New("ent: empty predicate SilenceWhereInput")

ErrEmptySilenceWhereInput is returned in case the SilenceWhereInput is empty.

View Source
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

View Source
var (
	// MsgAlertOrderFieldCreatedAt orders MsgAlert by created_at.
	MsgAlertOrderFieldCreatedAt = &MsgAlertOrderField{
		Value: func(ma *MsgAlert) (ent.Value, error) {
			return ma.CreatedAt, nil
		},
		column: msgalert.FieldCreatedAt,
		toTerm: msgalert.ByCreatedAt,
		toCursor: func(ma *MsgAlert) Cursor {
			return Cursor{
				ID:    ma.ID,
				Value: ma.CreatedAt,
			}
		},
	}
)
View Source
var (
	// MsgChannelOrderFieldCreatedAt orders MsgChannel by created_at.
	MsgChannelOrderFieldCreatedAt = &MsgChannelOrderField{
		Value: func(mc *MsgChannel) (ent.Value, error) {
			return mc.CreatedAt, nil
		},
		column: msgchannel.FieldCreatedAt,
		toTerm: msgchannel.ByCreatedAt,
		toCursor: func(mc *MsgChannel) Cursor {
			return Cursor{
				ID:    mc.ID,
				Value: mc.CreatedAt,
			}
		},
	}
)
View Source
var (
	// MsgEventOrderFieldCreatedAt orders MsgEvent by created_at.
	MsgEventOrderFieldCreatedAt = &MsgEventOrderField{
		Value: func(me *MsgEvent) (ent.Value, error) {
			return me.CreatedAt, nil
		},
		column: msgevent.FieldCreatedAt,
		toTerm: msgevent.ByCreatedAt,
		toCursor: func(me *MsgEvent) Cursor {
			return Cursor{
				ID:    me.ID,
				Value: me.CreatedAt,
			}
		},
	}
)
View Source
var (
	// MsgInternalOrderFieldCreatedAt orders MsgInternal by created_at.
	MsgInternalOrderFieldCreatedAt = &MsgInternalOrderField{
		Value: func(mi *MsgInternal) (ent.Value, error) {
			return mi.CreatedAt, nil
		},
		column: msginternal.FieldCreatedAt,
		toTerm: msginternal.ByCreatedAt,
		toCursor: func(mi *MsgInternal) Cursor {
			return Cursor{
				ID:    mi.ID,
				Value: mi.CreatedAt,
			}
		},
	}
)
View Source
var (
	// MsgInternalToOrderFieldCreatedAt orders MsgInternalTo by created_at.
	MsgInternalToOrderFieldCreatedAt = &MsgInternalToOrderField{
		Value: func(mit *MsgInternalTo) (ent.Value, error) {
			return mit.CreatedAt, nil
		},
		column: msginternalto.FieldCreatedAt,
		toTerm: msginternalto.ByCreatedAt,
		toCursor: func(mit *MsgInternalTo) Cursor {
			return Cursor{
				ID:    mit.ID,
				Value: mit.CreatedAt,
			}
		},
	}
)
View Source
var (
	// MsgSubscriberOrderFieldCreatedAt orders MsgSubscriber by created_at.
	MsgSubscriberOrderFieldCreatedAt = &MsgSubscriberOrderField{
		Value: func(ms *MsgSubscriber) (ent.Value, error) {
			return ms.CreatedAt, nil
		},
		column: msgsubscriber.FieldCreatedAt,
		toTerm: msgsubscriber.ByCreatedAt,
		toCursor: func(ms *MsgSubscriber) Cursor {
			return Cursor{
				ID:    ms.ID,
				Value: ms.CreatedAt,
			}
		},
	}
)
View Source
var (
	// MsgTemplateOrderFieldCreatedAt orders MsgTemplate by created_at.
	MsgTemplateOrderFieldCreatedAt = &MsgTemplateOrderField{
		Value: func(mt *MsgTemplate) (ent.Value, error) {
			return mt.CreatedAt, nil
		},
		column: msgtemplate.FieldCreatedAt,
		toTerm: msgtemplate.ByCreatedAt,
		toCursor: func(mt *MsgTemplate) Cursor {
			return Cursor{
				ID:    mt.ID,
				Value: mt.CreatedAt,
			}
		},
	}
)
View Source
var (
	// MsgTypeOrderFieldCreatedAt orders MsgType by created_at.
	MsgTypeOrderFieldCreatedAt = &MsgTypeOrderField{
		Value: func(mt *MsgType) (ent.Value, error) {
			return mt.CreatedAt, nil
		},
		column: msgtype.FieldCreatedAt,
		toTerm: msgtype.ByCreatedAt,
		toCursor: func(mt *MsgType) Cursor {
			return Cursor{
				ID:    mt.ID,
				Value: mt.CreatedAt,
			}
		},
	}
)
View Source
var (
	// NlogAlertOrderFieldCreatedAt orders NlogAlert by created_at.
	NlogAlertOrderFieldCreatedAt = &NlogAlertOrderField{
		Value: func(na *NlogAlert) (ent.Value, error) {
			return na.CreatedAt, nil
		},
		column: nlogalert.FieldCreatedAt,
		toTerm: nlogalert.ByCreatedAt,
		toCursor: func(na *NlogAlert) Cursor {
			return Cursor{
				ID:    na.ID,
				Value: na.CreatedAt,
			}
		},
	}
)
View Source
var (
	// NlogOrderFieldCreatedAt orders Nlog by created_at.
	NlogOrderFieldCreatedAt = &NlogOrderField{
		Value: func(n *Nlog) (ent.Value, error) {
			return n.CreatedAt, nil
		},
		column: nlog.FieldCreatedAt,
		toTerm: nlog.ByCreatedAt,
		toCursor: func(n *Nlog) Cursor {
			return Cursor{
				ID:    n.ID,
				Value: n.CreatedAt,
			}
		},
	}
)
View Source
var (
	// SilenceOrderFieldCreatedAt orders Silence by created_at.
	SilenceOrderFieldCreatedAt = &SilenceOrderField{
		Value: func(s *Silence) (ent.Value, error) {
			return s.CreatedAt, nil
		},
		column: silence.FieldCreatedAt,
		toTerm: silence.ByCreatedAt,
		toCursor: func(s *Silence) Cursor {
			return Cursor{
				ID:    s.ID,
				Value: s.CreatedAt,
			}
		},
	}
)

Functions

func Asc

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

Asc applies the given fields in ASC order.

func Desc

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

Desc applies the given fields in DESC order.

func GlobalID

func GlobalID(tp, id string) (string, error)

GlobalID returns the global identifier for the given type and id.

func IntFromGlobalID

func IntFromGlobalID(s string) (int, error)

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

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

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

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

NewContext returns a new context with the given Client attached.

func NewTxContext

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

NewTxContext returns a new context with the given Tx attached.

func OpenTxFromContext

func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)

OpenTxFromContext open transactions from client stored in context.

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
	// MsgAlert is the client for interacting with the MsgAlert builders.
	MsgAlert *MsgAlertClient
	// MsgChannel is the client for interacting with the MsgChannel builders.
	MsgChannel *MsgChannelClient
	// MsgEvent is the client for interacting with the MsgEvent builders.
	MsgEvent *MsgEventClient
	// MsgInternal is the client for interacting with the MsgInternal builders.
	MsgInternal *MsgInternalClient
	// MsgInternalTo is the client for interacting with the MsgInternalTo builders.
	MsgInternalTo *MsgInternalToClient
	// MsgSubscriber is the client for interacting with the MsgSubscriber builders.
	MsgSubscriber *MsgSubscriberClient
	// MsgTemplate is the client for interacting with the MsgTemplate builders.
	MsgTemplate *MsgTemplateClient
	// MsgType is the client for interacting with the MsgType builders.
	MsgType *MsgTypeClient
	// Nlog is the client for interacting with the Nlog builders.
	Nlog *NlogClient
	// NlogAlert is the client for interacting with the NlogAlert builders.
	NlogAlert *NlogAlertClient
	// OrgRoleUser is the client for interacting with the OrgRoleUser builders.
	OrgRoleUser *OrgRoleUserClient
	// Silence is the client for interacting with the Silence builders.
	Silence *SilenceClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// 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().
	MsgAlert.
	Query().
	Count(ctx)

func (*Client) Intercept

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

Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.

func (*Client) Mutate

func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)

Mutate implements the ent.Mutator interface.

func (*Client) Noder

func (c *Client) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)

Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.

c.Noder(ctx, id)
c.Noder(ctx, id, ent.WithNodeType(typeResolver))

func (*Client) NoderEx

func (c *Client) NoderEx(ctx context.Context, id string) (Noder, error)

func (*Client) Noders

func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)

func (*Client) NodersEx

func (c *Client) NodersEx(ctx context.Context, ids []string, opts ...NodeOption) ([]Noder, error)

func (*Client) OpenTx

func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)

OpenTx opens a transaction and returns a transactional context along with the created transaction.

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

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

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type ConstraintError

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

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type CreateMsgChannelInput

type CreateMsgChannelInput struct {
	Name         string
	TenantID     int
	ReceiverType profile.ReceiverType
	Receiver     *profile.Receiver
	Comments     *string
}

CreateMsgChannelInput represents a mutation input for creating msgchannels.

func (*CreateMsgChannelInput) Mutate

Mutate applies the CreateMsgChannelInput on the MsgChannelMutation builder.

type CreateMsgEventInput

type CreateMsgEventInput struct {
	Name      string
	Comments  *string
	Route     *profile.Route
	Modes     string
	MsgTypeID int
}

CreateMsgEventInput represents a mutation input for creating msgevents.

func (*CreateMsgEventInput) Mutate

func (i *CreateMsgEventInput) Mutate(m *MsgEventMutation)

Mutate applies the CreateMsgEventInput on the MsgEventMutation builder.

type CreateMsgSubscriberInput

type CreateMsgSubscriberInput struct {
	TenantID  int
	OrgRoleID *int
	Exclude   *bool
	MsgTypeID int
	UserID    *int
}

CreateMsgSubscriberInput represents a mutation input for creating msgsubscribers.

func (*CreateMsgSubscriberInput) Mutate

Mutate applies the CreateMsgSubscriberInput on the MsgSubscriberMutation builder.

type CreateMsgTemplateInput

type CreateMsgTemplateInput struct {
	MsgTypeID          int
	TenantID           int
	Name               string
	ReceiverType       profile.ReceiverType
	Format             msgtemplate.Format
	Subject            *string
	From               *string
	To                 *string
	Cc                 *string
	Bcc                *string
	Body               *string
	Tpl                *string
	TplFileID          *int
	Attachments        []string
	AttachmentsFileIds []int
	Comments           *string
	EventID            int
}

CreateMsgTemplateInput represents a mutation input for creating msgtemplates.

func (*CreateMsgTemplateInput) Mutate

Mutate applies the CreateMsgTemplateInput on the MsgTemplateMutation builder.

type CreateMsgTypeInput

type CreateMsgTypeInput struct {
	AppID     *int
	Category  string
	Name      string
	Status    *typex.SimpleStatus
	Comments  *string
	CanSubs   *bool
	CanCustom *bool
}

CreateMsgTypeInput represents a mutation input for creating msgtypes.

func (*CreateMsgTypeInput) Mutate

func (i *CreateMsgTypeInput) Mutate(m *MsgTypeMutation)

Mutate applies the CreateMsgTypeInput on the MsgTypeMutation builder.

type CreateSilenceInput

type CreateSilenceInput struct {
	TenantID int
	Matchers []*label.Matcher
	StartsAt time.Time
	EndsAt   time.Time
	Comments *string
	State    *alert.SilenceState
}

CreateSilenceInput represents a mutation input for creating silences.

func (*CreateSilenceInput) Mutate

func (i *CreateSilenceInput) Mutate(m *SilenceMutation)

Mutate applies the CreateSilenceInput on the SilenceMutation builder.

type Cursor

type Cursor = entgql.Cursor[int]

Common entgql types.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type InterceptFunc

type InterceptFunc = ent.InterceptFunc

ent aliases to avoid import conflicts in user's code.

type Interceptor

type Interceptor = ent.Interceptor

ent aliases to avoid import conflicts in user's code.

type MsgAlert

type MsgAlert struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID int `json:"tenant_id,omitempty"`
	// 标签
	Labels *label.LabelSet `json:"labels,omitempty"`
	// 注解
	Annotations *label.LabelSet `json:"annotations,omitempty"`
	// 开始时间
	StartsAt time.Time `json:"starts_at,omitempty"`
	// 结束时间
	EndsAt time.Time `json:"ends_at,omitempty"`
	// generatorURL
	URL string `json:"url,omitempty"`
	// 状态
	Timeout bool `json:"timeout,omitempty"`
	// 指纹hash值
	Fingerprint string `json:"fingerprint,omitempty"`
	// 通知状态,firing: 触发通知,resolved: 已处理过
	State alert.AlertStatus `json:"state,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"`
	// 是否移除
	Deleted bool `json:"deleted,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MsgAlertQuery when eager-loading is set.
	Edges MsgAlertEdges `json:"edges"`
	// contains filtered or unexported fields
}

MsgAlert is the model entity for the MsgAlert schema.

func (*MsgAlert) GlobalID

func (ma *MsgAlert) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given MsgAlert node.

func (*MsgAlert) IsNode

func (*MsgAlert) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*MsgAlert) NamedNlog

func (ma *MsgAlert) NamedNlog(name string) ([]*Nlog, error)

NamedNlog returns the Nlog named value or an error if the edge was not loaded in eager-loading with this name.

func (*MsgAlert) NamedNlogAlerts

func (ma *MsgAlert) NamedNlogAlerts(name string) ([]*NlogAlert, error)

NamedNlogAlerts returns the NlogAlerts named value or an error if the edge was not loaded in eager-loading with this name.

func (*MsgAlert) Nlog

func (ma *MsgAlert) Nlog(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *NlogOrder, where *NlogWhereInput,
) (*NlogConnection, error)

func (*MsgAlert) NlogAlerts

func (ma *MsgAlert) NlogAlerts(
	ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, orderBy *NlogAlertOrder, where *NlogAlertWhereInput,
) (*NlogAlertConnection, error)

func (*MsgAlert) QueryNlog

func (ma *MsgAlert) QueryNlog() *NlogQuery

QueryNlog queries the "nlog" edge of the MsgAlert entity.

func (*MsgAlert) QueryNlogAlerts

func (ma *MsgAlert) QueryNlogAlerts() *NlogAlertQuery

QueryNlogAlerts queries the "nlog_alerts" edge of the MsgAlert entity.

func (*MsgAlert) String

func (ma *MsgAlert) String() string

String implements the fmt.Stringer.

func (*MsgAlert) ToEdge

func (ma *MsgAlert) ToEdge(order *MsgAlertOrder) *MsgAlertEdge

ToEdge converts MsgAlert into MsgAlertEdge.

func (*MsgAlert) Unwrap

func (ma *MsgAlert) Unwrap() *MsgAlert

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

func (ma *MsgAlert) Update() *MsgAlertUpdateOne

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

func (*MsgAlert) Value

func (ma *MsgAlert) Value(name string) (ent.Value, error)

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

type MsgAlertClient

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

MsgAlertClient is a client for the MsgAlert schema.

func NewMsgAlertClient

func NewMsgAlertClient(c config) *MsgAlertClient

NewMsgAlertClient returns a client for the MsgAlert from the given config.

func (*MsgAlertClient) Create

func (c *MsgAlertClient) Create() *MsgAlertCreate

Create returns a builder for creating a MsgAlert entity.

func (*MsgAlertClient) CreateBulk

func (c *MsgAlertClient) CreateBulk(builders ...*MsgAlertCreate) *MsgAlertCreateBulk

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

func (*MsgAlertClient) Delete

func (c *MsgAlertClient) Delete() *MsgAlertDelete

Delete returns a delete builder for MsgAlert.

func (*MsgAlertClient) DeleteOne

func (c *MsgAlertClient) DeleteOne(ma *MsgAlert) *MsgAlertDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MsgAlertClient) DeleteOneID

func (c *MsgAlertClient) DeleteOneID(id int) *MsgAlertDeleteOne

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

func (*MsgAlertClient) Get

func (c *MsgAlertClient) Get(ctx context.Context, id int) (*MsgAlert, error)

Get returns a MsgAlert entity by its id.

func (*MsgAlertClient) GetX

func (c *MsgAlertClient) GetX(ctx context.Context, id int) *MsgAlert

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

func (*MsgAlertClient) Hooks

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

Hooks returns the client hooks.

func (*MsgAlertClient) Intercept

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

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

func (*MsgAlertClient) Interceptors

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

Interceptors returns the client interceptors.

func (*MsgAlertClient) MapCreateBulk

func (c *MsgAlertClient) MapCreateBulk(slice any, setFunc func(*MsgAlertCreate, int)) *MsgAlertCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MsgAlertClient) Query

func (c *MsgAlertClient) Query() *MsgAlertQuery

Query returns a query builder for MsgAlert.

func (*MsgAlertClient) QueryNlog

func (c *MsgAlertClient) QueryNlog(ma *MsgAlert) *NlogQuery

QueryNlog queries the nlog edge of a MsgAlert.

func (*MsgAlertClient) QueryNlogAlerts

func (c *MsgAlertClient) QueryNlogAlerts(ma *MsgAlert) *NlogAlertQuery

QueryNlogAlerts queries the nlog_alerts edge of a MsgAlert.

func (*MsgAlertClient) Update

func (c *MsgAlertClient) Update() *MsgAlertUpdate

Update returns an update builder for MsgAlert.

func (*MsgAlertClient) UpdateOne

func (c *MsgAlertClient) UpdateOne(ma *MsgAlert) *MsgAlertUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MsgAlertClient) UpdateOneID

func (c *MsgAlertClient) UpdateOneID(id int) *MsgAlertUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MsgAlertClient) Use

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

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

type MsgAlertConnection

type MsgAlertConnection struct {
	Edges      []*MsgAlertEdge `json:"edges"`
	PageInfo   PageInfo        `json:"pageInfo"`
	TotalCount int             `json:"totalCount"`
}

MsgAlertConnection is the connection containing edges to MsgAlert.

type MsgAlertCreate

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

MsgAlertCreate is the builder for creating a MsgAlert entity.

func (*MsgAlertCreate) AddNlog

func (mac *MsgAlertCreate) AddNlog(n ...*Nlog) *MsgAlertCreate

AddNlog adds the "nlog" edges to the Nlog entity.

func (*MsgAlertCreate) AddNlogAlertIDs

func (mac *MsgAlertCreate) AddNlogAlertIDs(ids ...int) *MsgAlertCreate

AddNlogAlertIDs adds the "nlog_alerts" edge to the NlogAlert entity by IDs.

func (*MsgAlertCreate) AddNlogAlerts

func (mac *MsgAlertCreate) AddNlogAlerts(n ...*NlogAlert) *MsgAlertCreate

AddNlogAlerts adds the "nlog_alerts" edges to the NlogAlert entity.

func (*MsgAlertCreate) AddNlogIDs

func (mac *MsgAlertCreate) AddNlogIDs(ids ...int) *MsgAlertCreate

AddNlogIDs adds the "nlog" edge to the Nlog entity by IDs.

func (*MsgAlertCreate) Exec

func (mac *MsgAlertCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgAlertCreate) ExecX

func (mac *MsgAlertCreate) ExecX(ctx context.Context)

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

func (*MsgAlertCreate) Mutation

func (mac *MsgAlertCreate) Mutation() *MsgAlertMutation

Mutation returns the MsgAlertMutation object of the builder.

func (*MsgAlertCreate) OnConflict

func (mac *MsgAlertCreate) OnConflict(opts ...sql.ConflictOption) *MsgAlertUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgAlert.Create().
	SetTenantID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgAlertUpsert) {
		SetTenantID(v+v).
	}).
	Exec(ctx)

func (*MsgAlertCreate) OnConflictColumns

func (mac *MsgAlertCreate) OnConflictColumns(columns ...string) *MsgAlertUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgAlert.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgAlertCreate) Save

func (mac *MsgAlertCreate) Save(ctx context.Context) (*MsgAlert, error)

Save creates the MsgAlert in the database.

func (*MsgAlertCreate) SaveX

func (mac *MsgAlertCreate) SaveX(ctx context.Context) *MsgAlert

SaveX calls Save and panics if Save returns an error.

func (*MsgAlertCreate) SetAnnotations

func (mac *MsgAlertCreate) SetAnnotations(ls *label.LabelSet) *MsgAlertCreate

SetAnnotations sets the "annotations" field.

func (*MsgAlertCreate) SetCreatedAt

func (mac *MsgAlertCreate) SetCreatedAt(t time.Time) *MsgAlertCreate

SetCreatedAt sets the "created_at" field.

func (*MsgAlertCreate) SetDeleted

func (mac *MsgAlertCreate) SetDeleted(b bool) *MsgAlertCreate

SetDeleted sets the "deleted" field.

func (*MsgAlertCreate) SetEndsAt

func (mac *MsgAlertCreate) SetEndsAt(t time.Time) *MsgAlertCreate

SetEndsAt sets the "ends_at" field.

func (*MsgAlertCreate) SetFingerprint

func (mac *MsgAlertCreate) SetFingerprint(s string) *MsgAlertCreate

SetFingerprint sets the "fingerprint" field.

func (*MsgAlertCreate) SetID

func (mac *MsgAlertCreate) SetID(i int) *MsgAlertCreate

SetID sets the "id" field.

func (*MsgAlertCreate) SetLabels

func (mac *MsgAlertCreate) SetLabels(ls *label.LabelSet) *MsgAlertCreate

SetLabels sets the "labels" field.

func (*MsgAlertCreate) SetNillableCreatedAt

func (mac *MsgAlertCreate) SetNillableCreatedAt(t *time.Time) *MsgAlertCreate

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

func (*MsgAlertCreate) SetNillableDeleted

func (mac *MsgAlertCreate) SetNillableDeleted(b *bool) *MsgAlertCreate

SetNillableDeleted sets the "deleted" field if the given value is not nil.

func (*MsgAlertCreate) SetNillableEndsAt

func (mac *MsgAlertCreate) SetNillableEndsAt(t *time.Time) *MsgAlertCreate

SetNillableEndsAt sets the "ends_at" field if the given value is not nil.

func (*MsgAlertCreate) SetNillableState

func (mac *MsgAlertCreate) SetNillableState(as *alert.AlertStatus) *MsgAlertCreate

SetNillableState sets the "state" field if the given value is not nil.

func (*MsgAlertCreate) SetNillableTimeout

func (mac *MsgAlertCreate) SetNillableTimeout(b *bool) *MsgAlertCreate

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*MsgAlertCreate) SetNillableURL

func (mac *MsgAlertCreate) SetNillableURL(s *string) *MsgAlertCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*MsgAlertCreate) SetNillableUpdatedAt

func (mac *MsgAlertCreate) SetNillableUpdatedAt(t *time.Time) *MsgAlertCreate

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

func (*MsgAlertCreate) SetStartsAt

func (mac *MsgAlertCreate) SetStartsAt(t time.Time) *MsgAlertCreate

SetStartsAt sets the "starts_at" field.

func (*MsgAlertCreate) SetState

func (mac *MsgAlertCreate) SetState(as alert.AlertStatus) *MsgAlertCreate

SetState sets the "state" field.

func (*MsgAlertCreate) SetTenantID

func (mac *MsgAlertCreate) SetTenantID(i int) *MsgAlertCreate

SetTenantID sets the "tenant_id" field.

func (*MsgAlertCreate) SetTimeout

func (mac *MsgAlertCreate) SetTimeout(b bool) *MsgAlertCreate

SetTimeout sets the "timeout" field.

func (*MsgAlertCreate) SetURL

func (mac *MsgAlertCreate) SetURL(s string) *MsgAlertCreate

SetURL sets the "url" field.

func (*MsgAlertCreate) SetUpdatedAt

func (mac *MsgAlertCreate) SetUpdatedAt(t time.Time) *MsgAlertCreate

SetUpdatedAt sets the "updated_at" field.

type MsgAlertCreateBulk

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

MsgAlertCreateBulk is the builder for creating many MsgAlert entities in bulk.

func (*MsgAlertCreateBulk) Exec

func (macb *MsgAlertCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgAlertCreateBulk) ExecX

func (macb *MsgAlertCreateBulk) ExecX(ctx context.Context)

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

func (*MsgAlertCreateBulk) OnConflict

func (macb *MsgAlertCreateBulk) OnConflict(opts ...sql.ConflictOption) *MsgAlertUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgAlert.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgAlertUpsert) {
		SetTenantID(v+v).
	}).
	Exec(ctx)

func (*MsgAlertCreateBulk) OnConflictColumns

func (macb *MsgAlertCreateBulk) OnConflictColumns(columns ...string) *MsgAlertUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgAlert.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgAlertCreateBulk) Save

func (macb *MsgAlertCreateBulk) Save(ctx context.Context) ([]*MsgAlert, error)

Save creates the MsgAlert entities in the database.

func (*MsgAlertCreateBulk) SaveX

func (macb *MsgAlertCreateBulk) SaveX(ctx context.Context) []*MsgAlert

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

type MsgAlertDelete

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

MsgAlertDelete is the builder for deleting a MsgAlert entity.

func (*MsgAlertDelete) Exec

func (mad *MsgAlertDelete) Exec(ctx context.Context) (int, error)

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

func (*MsgAlertDelete) ExecX

func (mad *MsgAlertDelete) ExecX(ctx context.Context) int

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

func (*MsgAlertDelete) Where

func (mad *MsgAlertDelete) Where(ps ...predicate.MsgAlert) *MsgAlertDelete

Where appends a list predicates to the MsgAlertDelete builder.

type MsgAlertDeleteOne

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

MsgAlertDeleteOne is the builder for deleting a single MsgAlert entity.

func (*MsgAlertDeleteOne) Exec

func (mado *MsgAlertDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MsgAlertDeleteOne) ExecX

func (mado *MsgAlertDeleteOne) ExecX(ctx context.Context)

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

func (*MsgAlertDeleteOne) Where

Where appends a list predicates to the MsgAlertDelete builder.

type MsgAlertEdge

type MsgAlertEdge struct {
	Node   *MsgAlert `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

MsgAlertEdge is the edge representation of MsgAlert.

type MsgAlertEdges

type MsgAlertEdges struct {
	// 消息日志
	Nlog []*Nlog `json:"nlog,omitempty"`
	// NlogAlerts holds the value of the nlog_alerts edge.
	NlogAlerts []*NlogAlert `json:"nlog_alerts,omitempty"`
	// contains filtered or unexported fields
}

MsgAlertEdges holds the relations/edges for other nodes in the graph.

func (MsgAlertEdges) NlogAlertsOrErr

func (e MsgAlertEdges) NlogAlertsOrErr() ([]*NlogAlert, error)

NlogAlertsOrErr returns the NlogAlerts value or an error if the edge was not loaded in eager-loading.

func (MsgAlertEdges) NlogOrErr

func (e MsgAlertEdges) NlogOrErr() ([]*Nlog, error)

NlogOrErr returns the Nlog value or an error if the edge was not loaded in eager-loading.

type MsgAlertGroupBy

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

MsgAlertGroupBy is the group-by builder for MsgAlert entities.

func (*MsgAlertGroupBy) Aggregate

func (magb *MsgAlertGroupBy) Aggregate(fns ...AggregateFunc) *MsgAlertGroupBy

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

func (*MsgAlertGroupBy) Bool

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

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

func (*MsgAlertGroupBy) BoolX

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

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

func (*MsgAlertGroupBy) Bools

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

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

func (*MsgAlertGroupBy) BoolsX

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

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

func (*MsgAlertGroupBy) Float64

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

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

func (*MsgAlertGroupBy) Float64X

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

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

func (*MsgAlertGroupBy) Float64s

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

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

func (*MsgAlertGroupBy) Float64sX

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

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

func (*MsgAlertGroupBy) Int

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

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

func (*MsgAlertGroupBy) IntX

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

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

func (*MsgAlertGroupBy) Ints

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

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

func (*MsgAlertGroupBy) IntsX

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

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

func (*MsgAlertGroupBy) Scan

func (magb *MsgAlertGroupBy) Scan(ctx context.Context, v any) error

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

func (*MsgAlertGroupBy) ScanX

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

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

func (*MsgAlertGroupBy) String

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

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

func (*MsgAlertGroupBy) StringX

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

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

func (*MsgAlertGroupBy) Strings

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

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

func (*MsgAlertGroupBy) StringsX

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

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

type MsgAlertMutation

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

MsgAlertMutation represents an operation that mutates the MsgAlert nodes in the graph.

func (*MsgAlertMutation) AddField

func (m *MsgAlertMutation) 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 (*MsgAlertMutation) AddNlogAlertIDs

func (m *MsgAlertMutation) AddNlogAlertIDs(ids ...int)

AddNlogAlertIDs adds the "nlog_alerts" edge to the NlogAlert entity by ids.

func (*MsgAlertMutation) AddNlogIDs

func (m *MsgAlertMutation) AddNlogIDs(ids ...int)

AddNlogIDs adds the "nlog" edge to the Nlog entity by ids.

func (*MsgAlertMutation) AddTenantID

func (m *MsgAlertMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*MsgAlertMutation) AddedEdges

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

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

func (*MsgAlertMutation) AddedField

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

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

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

func (*MsgAlertMutation) AddedIDs

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

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

func (*MsgAlertMutation) AddedTenantID

func (m *MsgAlertMutation) AddedTenantID() (r int, exists bool)

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

func (*MsgAlertMutation) Annotations

func (m *MsgAlertMutation) Annotations() (r *label.LabelSet, exists bool)

Annotations returns the value of the "annotations" field in the mutation.

func (*MsgAlertMutation) AnnotationsCleared

func (m *MsgAlertMutation) AnnotationsCleared() bool

AnnotationsCleared returns if the "annotations" field was cleared in this mutation.

func (*MsgAlertMutation) ClearAnnotations

func (m *MsgAlertMutation) ClearAnnotations()

ClearAnnotations clears the value of the "annotations" field.

func (*MsgAlertMutation) ClearEdge

func (m *MsgAlertMutation) 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 (*MsgAlertMutation) ClearEndsAt

func (m *MsgAlertMutation) ClearEndsAt()

ClearEndsAt clears the value of the "ends_at" field.

func (*MsgAlertMutation) ClearField

func (m *MsgAlertMutation) 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 (*MsgAlertMutation) ClearLabels

func (m *MsgAlertMutation) ClearLabels()

ClearLabels clears the value of the "labels" field.

func (*MsgAlertMutation) ClearNlog

func (m *MsgAlertMutation) ClearNlog()

ClearNlog clears the "nlog" edge to the Nlog entity.

func (*MsgAlertMutation) ClearNlogAlerts

func (m *MsgAlertMutation) ClearNlogAlerts()

ClearNlogAlerts clears the "nlog_alerts" edge to the NlogAlert entity.

func (*MsgAlertMutation) ClearURL

func (m *MsgAlertMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*MsgAlertMutation) ClearUpdatedAt

func (m *MsgAlertMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgAlertMutation) ClearedEdges

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

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

func (*MsgAlertMutation) ClearedFields

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

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

func (MsgAlertMutation) Client

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

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

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

func (*MsgAlertMutation) Deleted

func (m *MsgAlertMutation) Deleted() (r bool, exists bool)

Deleted returns the value of the "deleted" field in the mutation.

func (*MsgAlertMutation) EdgeCleared

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

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

func (*MsgAlertMutation) EndsAt

func (m *MsgAlertMutation) EndsAt() (r time.Time, exists bool)

EndsAt returns the value of the "ends_at" field in the mutation.

func (*MsgAlertMutation) EndsAtCleared

func (m *MsgAlertMutation) EndsAtCleared() bool

EndsAtCleared returns if the "ends_at" field was cleared in this mutation.

func (*MsgAlertMutation) Field

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

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

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

func (*MsgAlertMutation) Fields

func (m *MsgAlertMutation) 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 (*MsgAlertMutation) Fingerprint

func (m *MsgAlertMutation) Fingerprint() (r string, exists bool)

Fingerprint returns the value of the "fingerprint" field in the mutation.

func (*MsgAlertMutation) ID

func (m *MsgAlertMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*MsgAlertMutation) IDs

func (m *MsgAlertMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*MsgAlertMutation) Labels

func (m *MsgAlertMutation) Labels() (r *label.LabelSet, exists bool)

Labels returns the value of the "labels" field in the mutation.

func (*MsgAlertMutation) LabelsCleared

func (m *MsgAlertMutation) LabelsCleared() bool

LabelsCleared returns if the "labels" field was cleared in this mutation.

func (*MsgAlertMutation) NlogAlertsCleared

func (m *MsgAlertMutation) NlogAlertsCleared() bool

NlogAlertsCleared reports if the "nlog_alerts" edge to the NlogAlert entity was cleared.

func (*MsgAlertMutation) NlogAlertsIDs

func (m *MsgAlertMutation) NlogAlertsIDs() (ids []int)

NlogAlertsIDs returns the "nlog_alerts" edge IDs in the mutation.

func (*MsgAlertMutation) NlogCleared

func (m *MsgAlertMutation) NlogCleared() bool

NlogCleared reports if the "nlog" edge to the Nlog entity was cleared.

func (*MsgAlertMutation) NlogIDs

func (m *MsgAlertMutation) NlogIDs() (ids []int)

NlogIDs returns the "nlog" edge IDs in the mutation.

func (*MsgAlertMutation) OldAnnotations

func (m *MsgAlertMutation) OldAnnotations(ctx context.Context) (v *label.LabelSet, err error)

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

func (*MsgAlertMutation) OldCreatedAt

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

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

func (*MsgAlertMutation) OldDeleted

func (m *MsgAlertMutation) OldDeleted(ctx context.Context) (v bool, err error)

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

func (*MsgAlertMutation) OldEndsAt

func (m *MsgAlertMutation) OldEndsAt(ctx context.Context) (v time.Time, err error)

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

func (*MsgAlertMutation) OldField

func (m *MsgAlertMutation) 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 (*MsgAlertMutation) OldFingerprint

func (m *MsgAlertMutation) OldFingerprint(ctx context.Context) (v string, err error)

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

func (*MsgAlertMutation) OldLabels

func (m *MsgAlertMutation) OldLabels(ctx context.Context) (v *label.LabelSet, err error)

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

func (*MsgAlertMutation) OldStartsAt

func (m *MsgAlertMutation) OldStartsAt(ctx context.Context) (v time.Time, err error)

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

func (*MsgAlertMutation) OldState

func (m *MsgAlertMutation) OldState(ctx context.Context) (v alert.AlertStatus, err error)

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

func (*MsgAlertMutation) OldTenantID

func (m *MsgAlertMutation) OldTenantID(ctx context.Context) (v int, err error)

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

func (*MsgAlertMutation) OldTimeout

func (m *MsgAlertMutation) OldTimeout(ctx context.Context) (v bool, err error)

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

func (*MsgAlertMutation) OldURL

func (m *MsgAlertMutation) OldURL(ctx context.Context) (v string, err error)

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

func (*MsgAlertMutation) OldUpdatedAt

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

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

func (*MsgAlertMutation) Op

func (m *MsgAlertMutation) Op() Op

Op returns the operation name.

func (*MsgAlertMutation) RemoveNlogAlertIDs

func (m *MsgAlertMutation) RemoveNlogAlertIDs(ids ...int)

RemoveNlogAlertIDs removes the "nlog_alerts" edge to the NlogAlert entity by IDs.

func (*MsgAlertMutation) RemoveNlogIDs

func (m *MsgAlertMutation) RemoveNlogIDs(ids ...int)

RemoveNlogIDs removes the "nlog" edge to the Nlog entity by IDs.

func (*MsgAlertMutation) RemovedEdges

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

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

func (*MsgAlertMutation) RemovedIDs

func (m *MsgAlertMutation) 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 (*MsgAlertMutation) RemovedNlogAlertsIDs

func (m *MsgAlertMutation) RemovedNlogAlertsIDs() (ids []int)

RemovedNlogAlerts returns the removed IDs of the "nlog_alerts" edge to the NlogAlert entity.

func (*MsgAlertMutation) RemovedNlogIDs

func (m *MsgAlertMutation) RemovedNlogIDs() (ids []int)

RemovedNlog returns the removed IDs of the "nlog" edge to the Nlog entity.

func (*MsgAlertMutation) ResetAnnotations

func (m *MsgAlertMutation) ResetAnnotations()

ResetAnnotations resets all changes to the "annotations" field.

func (*MsgAlertMutation) ResetCreatedAt

func (m *MsgAlertMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*MsgAlertMutation) ResetDeleted

func (m *MsgAlertMutation) ResetDeleted()

ResetDeleted resets all changes to the "deleted" field.

func (*MsgAlertMutation) ResetEdge

func (m *MsgAlertMutation) 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 (*MsgAlertMutation) ResetEndsAt

func (m *MsgAlertMutation) ResetEndsAt()

ResetEndsAt resets all changes to the "ends_at" field.

func (*MsgAlertMutation) ResetField

func (m *MsgAlertMutation) 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 (*MsgAlertMutation) ResetFingerprint

func (m *MsgAlertMutation) ResetFingerprint()

ResetFingerprint resets all changes to the "fingerprint" field.

func (*MsgAlertMutation) ResetLabels

func (m *MsgAlertMutation) ResetLabels()

ResetLabels resets all changes to the "labels" field.

func (*MsgAlertMutation) ResetNlog

func (m *MsgAlertMutation) ResetNlog()

ResetNlog resets all changes to the "nlog" edge.

func (*MsgAlertMutation) ResetNlogAlerts

func (m *MsgAlertMutation) ResetNlogAlerts()

ResetNlogAlerts resets all changes to the "nlog_alerts" edge.

func (*MsgAlertMutation) ResetStartsAt

func (m *MsgAlertMutation) ResetStartsAt()

ResetStartsAt resets all changes to the "starts_at" field.

func (*MsgAlertMutation) ResetState

func (m *MsgAlertMutation) ResetState()

ResetState resets all changes to the "state" field.

func (*MsgAlertMutation) ResetTenantID

func (m *MsgAlertMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*MsgAlertMutation) ResetTimeout

func (m *MsgAlertMutation) ResetTimeout()

ResetTimeout resets all changes to the "timeout" field.

func (*MsgAlertMutation) ResetURL

func (m *MsgAlertMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*MsgAlertMutation) ResetUpdatedAt

func (m *MsgAlertMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*MsgAlertMutation) SetAnnotations

func (m *MsgAlertMutation) SetAnnotations(ls *label.LabelSet)

SetAnnotations sets the "annotations" field.

func (*MsgAlertMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*MsgAlertMutation) SetDeleted

func (m *MsgAlertMutation) SetDeleted(b bool)

SetDeleted sets the "deleted" field.

func (*MsgAlertMutation) SetEndsAt

func (m *MsgAlertMutation) SetEndsAt(t time.Time)

SetEndsAt sets the "ends_at" field.

func (*MsgAlertMutation) SetField

func (m *MsgAlertMutation) 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 (*MsgAlertMutation) SetFingerprint

func (m *MsgAlertMutation) SetFingerprint(s string)

SetFingerprint sets the "fingerprint" field.

func (*MsgAlertMutation) SetID

func (m *MsgAlertMutation) SetID(id int)

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

func (*MsgAlertMutation) SetLabels

func (m *MsgAlertMutation) SetLabels(ls *label.LabelSet)

SetLabels sets the "labels" field.

func (*MsgAlertMutation) SetOp

func (m *MsgAlertMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MsgAlertMutation) SetStartsAt

func (m *MsgAlertMutation) SetStartsAt(t time.Time)

SetStartsAt sets the "starts_at" field.

func (*MsgAlertMutation) SetState

func (m *MsgAlertMutation) SetState(as alert.AlertStatus)

SetState sets the "state" field.

func (*MsgAlertMutation) SetTenantID

func (m *MsgAlertMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*MsgAlertMutation) SetTimeout

func (m *MsgAlertMutation) SetTimeout(b bool)

SetTimeout sets the "timeout" field.

func (*MsgAlertMutation) SetURL

func (m *MsgAlertMutation) SetURL(s string)

SetURL sets the "url" field.

func (*MsgAlertMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*MsgAlertMutation) StartsAt

func (m *MsgAlertMutation) StartsAt() (r time.Time, exists bool)

StartsAt returns the value of the "starts_at" field in the mutation.

func (*MsgAlertMutation) State

func (m *MsgAlertMutation) State() (r alert.AlertStatus, exists bool)

State returns the value of the "state" field in the mutation.

func (*MsgAlertMutation) TenantID

func (m *MsgAlertMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (*MsgAlertMutation) Timeout

func (m *MsgAlertMutation) Timeout() (r bool, exists bool)

Timeout returns the value of the "timeout" field in the mutation.

func (MsgAlertMutation) Tx

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

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

func (*MsgAlertMutation) Type

func (m *MsgAlertMutation) Type() string

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

func (*MsgAlertMutation) URL

func (m *MsgAlertMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*MsgAlertMutation) URLCleared

func (m *MsgAlertMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*MsgAlertMutation) UpdatedAt

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

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

func (*MsgAlertMutation) UpdatedAtCleared

func (m *MsgAlertMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*MsgAlertMutation) Where

func (m *MsgAlertMutation) Where(ps ...predicate.MsgAlert)

Where appends a list predicates to the MsgAlertMutation builder.

func (*MsgAlertMutation) WhereP

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

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

type MsgAlertOrder

type MsgAlertOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *MsgAlertOrderField `json:"field"`
}

MsgAlertOrder defines the ordering of MsgAlert.

type MsgAlertOrderField

type MsgAlertOrderField struct {
	// Value extracts the ordering value from the given MsgAlert.
	Value func(*MsgAlert) (ent.Value, error)
	// contains filtered or unexported fields
}

MsgAlertOrderField defines the ordering field of MsgAlert.

func (MsgAlertOrderField) MarshalGQL

func (f MsgAlertOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (MsgAlertOrderField) String

func (f MsgAlertOrderField) String() string

String implement fmt.Stringer interface.

func (*MsgAlertOrderField) UnmarshalGQL

func (f *MsgAlertOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type MsgAlertPaginateOption

type MsgAlertPaginateOption func(*msgalertPager) error

MsgAlertPaginateOption enables pagination customization.

func WithMsgAlertFilter

func WithMsgAlertFilter(filter func(*MsgAlertQuery) (*MsgAlertQuery, error)) MsgAlertPaginateOption

WithMsgAlertFilter configures pagination filter.

func WithMsgAlertOrder

func WithMsgAlertOrder(order *MsgAlertOrder) MsgAlertPaginateOption

WithMsgAlertOrder configures pagination ordering.

type MsgAlertQuery

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

MsgAlertQuery is the builder for querying MsgAlert entities.

func (*MsgAlertQuery) Aggregate

func (maq *MsgAlertQuery) Aggregate(fns ...AggregateFunc) *MsgAlertSelect

Aggregate returns a MsgAlertSelect configured with the given aggregations.

func (*MsgAlertQuery) All

func (maq *MsgAlertQuery) All(ctx context.Context) ([]*MsgAlert, error)

All executes the query and returns a list of MsgAlerts.

func (*MsgAlertQuery) AllX

func (maq *MsgAlertQuery) AllX(ctx context.Context) []*MsgAlert

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

func (*MsgAlertQuery) Clone

func (maq *MsgAlertQuery) Clone() *MsgAlertQuery

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

func (*MsgAlertQuery) CollectFields

func (ma *MsgAlertQuery) CollectFields(ctx context.Context, satisfies ...string) (*MsgAlertQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*MsgAlertQuery) Count

func (maq *MsgAlertQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MsgAlertQuery) CountX

func (maq *MsgAlertQuery) CountX(ctx context.Context) int

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

func (*MsgAlertQuery) Exist

func (maq *MsgAlertQuery) Exist(ctx context.Context) (bool, error)

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

func (*MsgAlertQuery) ExistX

func (maq *MsgAlertQuery) ExistX(ctx context.Context) bool

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

func (*MsgAlertQuery) First

func (maq *MsgAlertQuery) First(ctx context.Context) (*MsgAlert, error)

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

func (*MsgAlertQuery) FirstID

func (maq *MsgAlertQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*MsgAlertQuery) FirstIDX

func (maq *MsgAlertQuery) FirstIDX(ctx context.Context) int

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

func (*MsgAlertQuery) FirstX

func (maq *MsgAlertQuery) FirstX(ctx context.Context) *MsgAlert

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

func (*MsgAlertQuery) GroupBy

func (maq *MsgAlertQuery) GroupBy(field string, fields ...string) *MsgAlertGroupBy

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 {
	TenantID int `json:"tenant_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MsgAlert.Query().
	GroupBy(msgalert.FieldTenantID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MsgAlertQuery) IDs

func (maq *MsgAlertQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*MsgAlertQuery) IDsX

func (maq *MsgAlertQuery) IDsX(ctx context.Context) []int

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

func (*MsgAlertQuery) Limit

func (maq *MsgAlertQuery) Limit(limit int) *MsgAlertQuery

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

func (*MsgAlertQuery) Offset

func (maq *MsgAlertQuery) Offset(offset int) *MsgAlertQuery

Offset to start from.

func (*MsgAlertQuery) Only

func (maq *MsgAlertQuery) Only(ctx context.Context) (*MsgAlert, error)

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

func (*MsgAlertQuery) OnlyID

func (maq *MsgAlertQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*MsgAlertQuery) OnlyIDX

func (maq *MsgAlertQuery) OnlyIDX(ctx context.Context) int

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

func (*MsgAlertQuery) OnlyX

func (maq *MsgAlertQuery) OnlyX(ctx context.Context) *MsgAlert

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

func (*MsgAlertQuery) Order

func (maq *MsgAlertQuery) Order(o ...msgalert.OrderOption) *MsgAlertQuery

Order specifies how the records should be ordered.

func (*MsgAlertQuery) Paginate

func (ma *MsgAlertQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...MsgAlertPaginateOption,
) (*MsgAlertConnection, error)

Paginate executes the query and returns a relay based cursor connection to MsgAlert.

func (*MsgAlertQuery) QueryNlog

func (maq *MsgAlertQuery) QueryNlog() *NlogQuery

QueryNlog chains the current query on the "nlog" edge.

func (*MsgAlertQuery) QueryNlogAlerts

func (maq *MsgAlertQuery) QueryNlogAlerts() *NlogAlertQuery

QueryNlogAlerts chains the current query on the "nlog_alerts" edge.

func (*MsgAlertQuery) Select

func (maq *MsgAlertQuery) Select(fields ...string) *MsgAlertSelect

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 {
	TenantID int `json:"tenant_id,omitempty"`
}

client.MsgAlert.Query().
	Select(msgalert.FieldTenantID).
	Scan(ctx, &v)

func (*MsgAlertQuery) Unique

func (maq *MsgAlertQuery) Unique(unique bool) *MsgAlertQuery

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

func (maq *MsgAlertQuery) Where(ps ...predicate.MsgAlert) *MsgAlertQuery

Where adds a new predicate for the MsgAlertQuery builder.

func (*MsgAlertQuery) WithNamedNlog

func (maq *MsgAlertQuery) WithNamedNlog(name string, opts ...func(*NlogQuery)) *MsgAlertQuery

WithNamedNlog tells the query-builder to eager-load the nodes that are connected to the "nlog" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*MsgAlertQuery) WithNamedNlogAlerts

func (maq *MsgAlertQuery) WithNamedNlogAlerts(name string, opts ...func(*NlogAlertQuery)) *MsgAlertQuery

WithNamedNlogAlerts tells the query-builder to eager-load the nodes that are connected to the "nlog_alerts" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*MsgAlertQuery) WithNlog

func (maq *MsgAlertQuery) WithNlog(opts ...func(*NlogQuery)) *MsgAlertQuery

WithNlog tells the query-builder to eager-load the nodes that are connected to the "nlog" edge. The optional arguments are used to configure the query builder of the edge.

func (*MsgAlertQuery) WithNlogAlerts

func (maq *MsgAlertQuery) WithNlogAlerts(opts ...func(*NlogAlertQuery)) *MsgAlertQuery

WithNlogAlerts tells the query-builder to eager-load the nodes that are connected to the "nlog_alerts" edge. The optional arguments are used to configure the query builder of the edge.

type MsgAlertSelect

type MsgAlertSelect struct {
	*MsgAlertQuery
	// contains filtered or unexported fields
}

MsgAlertSelect is the builder for selecting fields of MsgAlert entities.

func (*MsgAlertSelect) Aggregate

func (mas *MsgAlertSelect) Aggregate(fns ...AggregateFunc) *MsgAlertSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MsgAlertSelect) Bool

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

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

func (*MsgAlertSelect) BoolX

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

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

func (*MsgAlertSelect) Bools

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

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

func (*MsgAlertSelect) BoolsX

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

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

func (*MsgAlertSelect) Float64

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

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

func (*MsgAlertSelect) Float64X

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

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

func (*MsgAlertSelect) Float64s

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

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

func (*MsgAlertSelect) Float64sX

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

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

func (*MsgAlertSelect) Int

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

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

func (*MsgAlertSelect) IntX

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

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

func (*MsgAlertSelect) Ints

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

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

func (*MsgAlertSelect) IntsX

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

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

func (*MsgAlertSelect) Scan

func (mas *MsgAlertSelect) Scan(ctx context.Context, v any) error

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

func (*MsgAlertSelect) ScanX

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

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

func (*MsgAlertSelect) String

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

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

func (*MsgAlertSelect) StringX

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

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

func (*MsgAlertSelect) Strings

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

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

func (*MsgAlertSelect) StringsX

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

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

type MsgAlertUpdate

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

MsgAlertUpdate is the builder for updating MsgAlert entities.

func (*MsgAlertUpdate) AddNlog

func (mau *MsgAlertUpdate) AddNlog(n ...*Nlog) *MsgAlertUpdate

AddNlog adds the "nlog" edges to the Nlog entity.

func (*MsgAlertUpdate) AddNlogAlertIDs

func (mau *MsgAlertUpdate) AddNlogAlertIDs(ids ...int) *MsgAlertUpdate

AddNlogAlertIDs adds the "nlog_alerts" edge to the NlogAlert entity by IDs.

func (*MsgAlertUpdate) AddNlogAlerts

func (mau *MsgAlertUpdate) AddNlogAlerts(n ...*NlogAlert) *MsgAlertUpdate

AddNlogAlerts adds the "nlog_alerts" edges to the NlogAlert entity.

func (*MsgAlertUpdate) AddNlogIDs

func (mau *MsgAlertUpdate) AddNlogIDs(ids ...int) *MsgAlertUpdate

AddNlogIDs adds the "nlog" edge to the Nlog entity by IDs.

func (*MsgAlertUpdate) ClearAnnotations

func (mau *MsgAlertUpdate) ClearAnnotations() *MsgAlertUpdate

ClearAnnotations clears the value of the "annotations" field.

func (*MsgAlertUpdate) ClearEndsAt

func (mau *MsgAlertUpdate) ClearEndsAt() *MsgAlertUpdate

ClearEndsAt clears the value of the "ends_at" field.

func (*MsgAlertUpdate) ClearLabels

func (mau *MsgAlertUpdate) ClearLabels() *MsgAlertUpdate

ClearLabels clears the value of the "labels" field.

func (*MsgAlertUpdate) ClearNlog

func (mau *MsgAlertUpdate) ClearNlog() *MsgAlertUpdate

ClearNlog clears all "nlog" edges to the Nlog entity.

func (*MsgAlertUpdate) ClearNlogAlerts

func (mau *MsgAlertUpdate) ClearNlogAlerts() *MsgAlertUpdate

ClearNlogAlerts clears all "nlog_alerts" edges to the NlogAlert entity.

func (*MsgAlertUpdate) ClearURL

func (mau *MsgAlertUpdate) ClearURL() *MsgAlertUpdate

ClearURL clears the value of the "url" field.

func (*MsgAlertUpdate) ClearUpdatedAt

func (mau *MsgAlertUpdate) ClearUpdatedAt() *MsgAlertUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgAlertUpdate) Exec

func (mau *MsgAlertUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgAlertUpdate) ExecX

func (mau *MsgAlertUpdate) ExecX(ctx context.Context)

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

func (*MsgAlertUpdate) Mutation

func (mau *MsgAlertUpdate) Mutation() *MsgAlertMutation

Mutation returns the MsgAlertMutation object of the builder.

func (*MsgAlertUpdate) RemoveNlog

func (mau *MsgAlertUpdate) RemoveNlog(n ...*Nlog) *MsgAlertUpdate

RemoveNlog removes "nlog" edges to Nlog entities.

func (*MsgAlertUpdate) RemoveNlogAlertIDs

func (mau *MsgAlertUpdate) RemoveNlogAlertIDs(ids ...int) *MsgAlertUpdate

RemoveNlogAlertIDs removes the "nlog_alerts" edge to NlogAlert entities by IDs.

func (*MsgAlertUpdate) RemoveNlogAlerts

func (mau *MsgAlertUpdate) RemoveNlogAlerts(n ...*NlogAlert) *MsgAlertUpdate

RemoveNlogAlerts removes "nlog_alerts" edges to NlogAlert entities.

func (*MsgAlertUpdate) RemoveNlogIDs

func (mau *MsgAlertUpdate) RemoveNlogIDs(ids ...int) *MsgAlertUpdate

RemoveNlogIDs removes the "nlog" edge to Nlog entities by IDs.

func (*MsgAlertUpdate) Save

func (mau *MsgAlertUpdate) Save(ctx context.Context) (int, error)

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

func (*MsgAlertUpdate) SaveX

func (mau *MsgAlertUpdate) SaveX(ctx context.Context) int

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

func (*MsgAlertUpdate) SetAnnotations

func (mau *MsgAlertUpdate) SetAnnotations(ls *label.LabelSet) *MsgAlertUpdate

SetAnnotations sets the "annotations" field.

func (*MsgAlertUpdate) SetDeleted

func (mau *MsgAlertUpdate) SetDeleted(b bool) *MsgAlertUpdate

SetDeleted sets the "deleted" field.

func (*MsgAlertUpdate) SetEndsAt

func (mau *MsgAlertUpdate) SetEndsAt(t time.Time) *MsgAlertUpdate

SetEndsAt sets the "ends_at" field.

func (*MsgAlertUpdate) SetFingerprint

func (mau *MsgAlertUpdate) SetFingerprint(s string) *MsgAlertUpdate

SetFingerprint sets the "fingerprint" field.

func (*MsgAlertUpdate) SetLabels

func (mau *MsgAlertUpdate) SetLabels(ls *label.LabelSet) *MsgAlertUpdate

SetLabels sets the "labels" field.

func (*MsgAlertUpdate) SetNillableDeleted

func (mau *MsgAlertUpdate) SetNillableDeleted(b *bool) *MsgAlertUpdate

SetNillableDeleted sets the "deleted" field if the given value is not nil.

func (*MsgAlertUpdate) SetNillableEndsAt

func (mau *MsgAlertUpdate) SetNillableEndsAt(t *time.Time) *MsgAlertUpdate

SetNillableEndsAt sets the "ends_at" field if the given value is not nil.

func (*MsgAlertUpdate) SetNillableState

func (mau *MsgAlertUpdate) SetNillableState(as *alert.AlertStatus) *MsgAlertUpdate

SetNillableState sets the "state" field if the given value is not nil.

func (*MsgAlertUpdate) SetNillableTimeout

func (mau *MsgAlertUpdate) SetNillableTimeout(b *bool) *MsgAlertUpdate

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*MsgAlertUpdate) SetNillableURL

func (mau *MsgAlertUpdate) SetNillableURL(s *string) *MsgAlertUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*MsgAlertUpdate) SetNillableUpdatedAt

func (mau *MsgAlertUpdate) SetNillableUpdatedAt(t *time.Time) *MsgAlertUpdate

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

func (*MsgAlertUpdate) SetStartsAt

func (mau *MsgAlertUpdate) SetStartsAt(t time.Time) *MsgAlertUpdate

SetStartsAt sets the "starts_at" field.

func (*MsgAlertUpdate) SetState

func (mau *MsgAlertUpdate) SetState(as alert.AlertStatus) *MsgAlertUpdate

SetState sets the "state" field.

func (*MsgAlertUpdate) SetTimeout

func (mau *MsgAlertUpdate) SetTimeout(b bool) *MsgAlertUpdate

SetTimeout sets the "timeout" field.

func (*MsgAlertUpdate) SetURL

func (mau *MsgAlertUpdate) SetURL(s string) *MsgAlertUpdate

SetURL sets the "url" field.

func (*MsgAlertUpdate) SetUpdatedAt

func (mau *MsgAlertUpdate) SetUpdatedAt(t time.Time) *MsgAlertUpdate

SetUpdatedAt sets the "updated_at" field.

func (*MsgAlertUpdate) Where

func (mau *MsgAlertUpdate) Where(ps ...predicate.MsgAlert) *MsgAlertUpdate

Where appends a list predicates to the MsgAlertUpdate builder.

type MsgAlertUpdateOne

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

MsgAlertUpdateOne is the builder for updating a single MsgAlert entity.

func (*MsgAlertUpdateOne) AddNlog

func (mauo *MsgAlertUpdateOne) AddNlog(n ...*Nlog) *MsgAlertUpdateOne

AddNlog adds the "nlog" edges to the Nlog entity.

func (*MsgAlertUpdateOne) AddNlogAlertIDs

func (mauo *MsgAlertUpdateOne) AddNlogAlertIDs(ids ...int) *MsgAlertUpdateOne

AddNlogAlertIDs adds the "nlog_alerts" edge to the NlogAlert entity by IDs.

func (*MsgAlertUpdateOne) AddNlogAlerts

func (mauo *MsgAlertUpdateOne) AddNlogAlerts(n ...*NlogAlert) *MsgAlertUpdateOne

AddNlogAlerts adds the "nlog_alerts" edges to the NlogAlert entity.

func (*MsgAlertUpdateOne) AddNlogIDs

func (mauo *MsgAlertUpdateOne) AddNlogIDs(ids ...int) *MsgAlertUpdateOne

AddNlogIDs adds the "nlog" edge to the Nlog entity by IDs.

func (*MsgAlertUpdateOne) ClearAnnotations

func (mauo *MsgAlertUpdateOne) ClearAnnotations() *MsgAlertUpdateOne

ClearAnnotations clears the value of the "annotations" field.

func (*MsgAlertUpdateOne) ClearEndsAt

func (mauo *MsgAlertUpdateOne) ClearEndsAt() *MsgAlertUpdateOne

ClearEndsAt clears the value of the "ends_at" field.

func (*MsgAlertUpdateOne) ClearLabels

func (mauo *MsgAlertUpdateOne) ClearLabels() *MsgAlertUpdateOne

ClearLabels clears the value of the "labels" field.

func (*MsgAlertUpdateOne) ClearNlog

func (mauo *MsgAlertUpdateOne) ClearNlog() *MsgAlertUpdateOne

ClearNlog clears all "nlog" edges to the Nlog entity.

func (*MsgAlertUpdateOne) ClearNlogAlerts

func (mauo *MsgAlertUpdateOne) ClearNlogAlerts() *MsgAlertUpdateOne

ClearNlogAlerts clears all "nlog_alerts" edges to the NlogAlert entity.

func (*MsgAlertUpdateOne) ClearURL

func (mauo *MsgAlertUpdateOne) ClearURL() *MsgAlertUpdateOne

ClearURL clears the value of the "url" field.

func (*MsgAlertUpdateOne) ClearUpdatedAt

func (mauo *MsgAlertUpdateOne) ClearUpdatedAt() *MsgAlertUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgAlertUpdateOne) Exec

func (mauo *MsgAlertUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MsgAlertUpdateOne) ExecX

func (mauo *MsgAlertUpdateOne) ExecX(ctx context.Context)

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

func (*MsgAlertUpdateOne) Mutation

func (mauo *MsgAlertUpdateOne) Mutation() *MsgAlertMutation

Mutation returns the MsgAlertMutation object of the builder.

func (*MsgAlertUpdateOne) RemoveNlog

func (mauo *MsgAlertUpdateOne) RemoveNlog(n ...*Nlog) *MsgAlertUpdateOne

RemoveNlog removes "nlog" edges to Nlog entities.

func (*MsgAlertUpdateOne) RemoveNlogAlertIDs

func (mauo *MsgAlertUpdateOne) RemoveNlogAlertIDs(ids ...int) *MsgAlertUpdateOne

RemoveNlogAlertIDs removes the "nlog_alerts" edge to NlogAlert entities by IDs.

func (*MsgAlertUpdateOne) RemoveNlogAlerts

func (mauo *MsgAlertUpdateOne) RemoveNlogAlerts(n ...*NlogAlert) *MsgAlertUpdateOne

RemoveNlogAlerts removes "nlog_alerts" edges to NlogAlert entities.

func (*MsgAlertUpdateOne) RemoveNlogIDs

func (mauo *MsgAlertUpdateOne) RemoveNlogIDs(ids ...int) *MsgAlertUpdateOne

RemoveNlogIDs removes the "nlog" edge to Nlog entities by IDs.

func (*MsgAlertUpdateOne) Save

func (mauo *MsgAlertUpdateOne) Save(ctx context.Context) (*MsgAlert, error)

Save executes the query and returns the updated MsgAlert entity.

func (*MsgAlertUpdateOne) SaveX

func (mauo *MsgAlertUpdateOne) SaveX(ctx context.Context) *MsgAlert

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

func (*MsgAlertUpdateOne) Select

func (mauo *MsgAlertUpdateOne) Select(field string, fields ...string) *MsgAlertUpdateOne

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

func (*MsgAlertUpdateOne) SetAnnotations

func (mauo *MsgAlertUpdateOne) SetAnnotations(ls *label.LabelSet) *MsgAlertUpdateOne

SetAnnotations sets the "annotations" field.

func (*MsgAlertUpdateOne) SetDeleted

func (mauo *MsgAlertUpdateOne) SetDeleted(b bool) *MsgAlertUpdateOne

SetDeleted sets the "deleted" field.

func (*MsgAlertUpdateOne) SetEndsAt

func (mauo *MsgAlertUpdateOne) SetEndsAt(t time.Time) *MsgAlertUpdateOne

SetEndsAt sets the "ends_at" field.

func (*MsgAlertUpdateOne) SetFingerprint

func (mauo *MsgAlertUpdateOne) SetFingerprint(s string) *MsgAlertUpdateOne

SetFingerprint sets the "fingerprint" field.

func (*MsgAlertUpdateOne) SetLabels

func (mauo *MsgAlertUpdateOne) SetLabels(ls *label.LabelSet) *MsgAlertUpdateOne

SetLabels sets the "labels" field.

func (*MsgAlertUpdateOne) SetNillableDeleted

func (mauo *MsgAlertUpdateOne) SetNillableDeleted(b *bool) *MsgAlertUpdateOne

SetNillableDeleted sets the "deleted" field if the given value is not nil.

func (*MsgAlertUpdateOne) SetNillableEndsAt

func (mauo *MsgAlertUpdateOne) SetNillableEndsAt(t *time.Time) *MsgAlertUpdateOne

SetNillableEndsAt sets the "ends_at" field if the given value is not nil.

func (*MsgAlertUpdateOne) SetNillableState

func (mauo *MsgAlertUpdateOne) SetNillableState(as *alert.AlertStatus) *MsgAlertUpdateOne

SetNillableState sets the "state" field if the given value is not nil.

func (*MsgAlertUpdateOne) SetNillableTimeout

func (mauo *MsgAlertUpdateOne) SetNillableTimeout(b *bool) *MsgAlertUpdateOne

SetNillableTimeout sets the "timeout" field if the given value is not nil.

func (*MsgAlertUpdateOne) SetNillableURL

func (mauo *MsgAlertUpdateOne) SetNillableURL(s *string) *MsgAlertUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*MsgAlertUpdateOne) SetNillableUpdatedAt

func (mauo *MsgAlertUpdateOne) SetNillableUpdatedAt(t *time.Time) *MsgAlertUpdateOne

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

func (*MsgAlertUpdateOne) SetStartsAt

func (mauo *MsgAlertUpdateOne) SetStartsAt(t time.Time) *MsgAlertUpdateOne

SetStartsAt sets the "starts_at" field.

func (*MsgAlertUpdateOne) SetState

SetState sets the "state" field.

func (*MsgAlertUpdateOne) SetTimeout

func (mauo *MsgAlertUpdateOne) SetTimeout(b bool) *MsgAlertUpdateOne

SetTimeout sets the "timeout" field.

func (*MsgAlertUpdateOne) SetURL

func (mauo *MsgAlertUpdateOne) SetURL(s string) *MsgAlertUpdateOne

SetURL sets the "url" field.

func (*MsgAlertUpdateOne) SetUpdatedAt

func (mauo *MsgAlertUpdateOne) SetUpdatedAt(t time.Time) *MsgAlertUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*MsgAlertUpdateOne) Where

Where appends a list predicates to the MsgAlertUpdate builder.

type MsgAlertUpsert

type MsgAlertUpsert struct {
	*sql.UpdateSet
}

MsgAlertUpsert is the "OnConflict" setter.

func (*MsgAlertUpsert) ClearAnnotations

func (u *MsgAlertUpsert) ClearAnnotations() *MsgAlertUpsert

ClearAnnotations clears the value of the "annotations" field.

func (*MsgAlertUpsert) ClearEndsAt

func (u *MsgAlertUpsert) ClearEndsAt() *MsgAlertUpsert

ClearEndsAt clears the value of the "ends_at" field.

func (*MsgAlertUpsert) ClearLabels

func (u *MsgAlertUpsert) ClearLabels() *MsgAlertUpsert

ClearLabels clears the value of the "labels" field.

func (*MsgAlertUpsert) ClearURL

func (u *MsgAlertUpsert) ClearURL() *MsgAlertUpsert

ClearURL clears the value of the "url" field.

func (*MsgAlertUpsert) ClearUpdatedAt

func (u *MsgAlertUpsert) ClearUpdatedAt() *MsgAlertUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgAlertUpsert) SetAnnotations

func (u *MsgAlertUpsert) SetAnnotations(v *label.LabelSet) *MsgAlertUpsert

SetAnnotations sets the "annotations" field.

func (*MsgAlertUpsert) SetDeleted

func (u *MsgAlertUpsert) SetDeleted(v bool) *MsgAlertUpsert

SetDeleted sets the "deleted" field.

func (*MsgAlertUpsert) SetEndsAt

func (u *MsgAlertUpsert) SetEndsAt(v time.Time) *MsgAlertUpsert

SetEndsAt sets the "ends_at" field.

func (*MsgAlertUpsert) SetFingerprint

func (u *MsgAlertUpsert) SetFingerprint(v string) *MsgAlertUpsert

SetFingerprint sets the "fingerprint" field.

func (*MsgAlertUpsert) SetLabels

func (u *MsgAlertUpsert) SetLabels(v *label.LabelSet) *MsgAlertUpsert

SetLabels sets the "labels" field.

func (*MsgAlertUpsert) SetStartsAt

func (u *MsgAlertUpsert) SetStartsAt(v time.Time) *MsgAlertUpsert

SetStartsAt sets the "starts_at" field.

func (*MsgAlertUpsert) SetState

SetState sets the "state" field.

func (*MsgAlertUpsert) SetTimeout

func (u *MsgAlertUpsert) SetTimeout(v bool) *MsgAlertUpsert

SetTimeout sets the "timeout" field.

func (*MsgAlertUpsert) SetURL

func (u *MsgAlertUpsert) SetURL(v string) *MsgAlertUpsert

SetURL sets the "url" field.

func (*MsgAlertUpsert) SetUpdatedAt

func (u *MsgAlertUpsert) SetUpdatedAt(v time.Time) *MsgAlertUpsert

SetUpdatedAt sets the "updated_at" field.

func (*MsgAlertUpsert) UpdateAnnotations

func (u *MsgAlertUpsert) UpdateAnnotations() *MsgAlertUpsert

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*MsgAlertUpsert) UpdateDeleted

func (u *MsgAlertUpsert) UpdateDeleted() *MsgAlertUpsert

UpdateDeleted sets the "deleted" field to the value that was provided on create.

func (*MsgAlertUpsert) UpdateEndsAt

func (u *MsgAlertUpsert) UpdateEndsAt() *MsgAlertUpsert

UpdateEndsAt sets the "ends_at" field to the value that was provided on create.

func (*MsgAlertUpsert) UpdateFingerprint

func (u *MsgAlertUpsert) UpdateFingerprint() *MsgAlertUpsert

UpdateFingerprint sets the "fingerprint" field to the value that was provided on create.

func (*MsgAlertUpsert) UpdateLabels

func (u *MsgAlertUpsert) UpdateLabels() *MsgAlertUpsert

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*MsgAlertUpsert) UpdateStartsAt

func (u *MsgAlertUpsert) UpdateStartsAt() *MsgAlertUpsert

UpdateStartsAt sets the "starts_at" field to the value that was provided on create.

func (*MsgAlertUpsert) UpdateState

func (u *MsgAlertUpsert) UpdateState() *MsgAlertUpsert

UpdateState sets the "state" field to the value that was provided on create.

func (*MsgAlertUpsert) UpdateTimeout

func (u *MsgAlertUpsert) UpdateTimeout() *MsgAlertUpsert

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*MsgAlertUpsert) UpdateURL

func (u *MsgAlertUpsert) UpdateURL() *MsgAlertUpsert

UpdateURL sets the "url" field to the value that was provided on create.

func (*MsgAlertUpsert) UpdateUpdatedAt

func (u *MsgAlertUpsert) UpdateUpdatedAt() *MsgAlertUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type MsgAlertUpsertBulk

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

MsgAlertUpsertBulk is the builder for "upsert"-ing a bulk of MsgAlert nodes.

func (*MsgAlertUpsertBulk) ClearAnnotations

func (u *MsgAlertUpsertBulk) ClearAnnotations() *MsgAlertUpsertBulk

ClearAnnotations clears the value of the "annotations" field.

func (*MsgAlertUpsertBulk) ClearEndsAt

func (u *MsgAlertUpsertBulk) ClearEndsAt() *MsgAlertUpsertBulk

ClearEndsAt clears the value of the "ends_at" field.

func (*MsgAlertUpsertBulk) ClearLabels

func (u *MsgAlertUpsertBulk) ClearLabels() *MsgAlertUpsertBulk

ClearLabels clears the value of the "labels" field.

func (*MsgAlertUpsertBulk) ClearURL

func (u *MsgAlertUpsertBulk) ClearURL() *MsgAlertUpsertBulk

ClearURL clears the value of the "url" field.

func (*MsgAlertUpsertBulk) ClearUpdatedAt

func (u *MsgAlertUpsertBulk) ClearUpdatedAt() *MsgAlertUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgAlertUpsertBulk) DoNothing

func (u *MsgAlertUpsertBulk) DoNothing() *MsgAlertUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgAlertUpsertBulk) Exec

func (u *MsgAlertUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgAlertUpsertBulk) ExecX

func (u *MsgAlertUpsertBulk) ExecX(ctx context.Context)

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

func (*MsgAlertUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgAlert.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*MsgAlertUpsertBulk) SetAnnotations

func (u *MsgAlertUpsertBulk) SetAnnotations(v *label.LabelSet) *MsgAlertUpsertBulk

SetAnnotations sets the "annotations" field.

func (*MsgAlertUpsertBulk) SetDeleted

func (u *MsgAlertUpsertBulk) SetDeleted(v bool) *MsgAlertUpsertBulk

SetDeleted sets the "deleted" field.

func (*MsgAlertUpsertBulk) SetEndsAt

SetEndsAt sets the "ends_at" field.

func (*MsgAlertUpsertBulk) SetFingerprint

func (u *MsgAlertUpsertBulk) SetFingerprint(v string) *MsgAlertUpsertBulk

SetFingerprint sets the "fingerprint" field.

func (*MsgAlertUpsertBulk) SetLabels

SetLabels sets the "labels" field.

func (*MsgAlertUpsertBulk) SetStartsAt

func (u *MsgAlertUpsertBulk) SetStartsAt(v time.Time) *MsgAlertUpsertBulk

SetStartsAt sets the "starts_at" field.

func (*MsgAlertUpsertBulk) SetState

SetState sets the "state" field.

func (*MsgAlertUpsertBulk) SetTimeout

func (u *MsgAlertUpsertBulk) SetTimeout(v bool) *MsgAlertUpsertBulk

SetTimeout sets the "timeout" field.

func (*MsgAlertUpsertBulk) SetURL

SetURL sets the "url" field.

func (*MsgAlertUpsertBulk) SetUpdatedAt

func (u *MsgAlertUpsertBulk) SetUpdatedAt(v time.Time) *MsgAlertUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*MsgAlertUpsertBulk) Update

func (u *MsgAlertUpsertBulk) Update(set func(*MsgAlertUpsert)) *MsgAlertUpsertBulk

Update allows overriding fields `UPDATE` values. See the MsgAlertCreateBulk.OnConflict documentation for more info.

func (*MsgAlertUpsertBulk) UpdateAnnotations

func (u *MsgAlertUpsertBulk) UpdateAnnotations() *MsgAlertUpsertBulk

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*MsgAlertUpsertBulk) UpdateDeleted

func (u *MsgAlertUpsertBulk) UpdateDeleted() *MsgAlertUpsertBulk

UpdateDeleted sets the "deleted" field to the value that was provided on create.

func (*MsgAlertUpsertBulk) UpdateEndsAt

func (u *MsgAlertUpsertBulk) UpdateEndsAt() *MsgAlertUpsertBulk

UpdateEndsAt sets the "ends_at" field to the value that was provided on create.

func (*MsgAlertUpsertBulk) UpdateFingerprint

func (u *MsgAlertUpsertBulk) UpdateFingerprint() *MsgAlertUpsertBulk

UpdateFingerprint sets the "fingerprint" field to the value that was provided on create.

func (*MsgAlertUpsertBulk) UpdateLabels

func (u *MsgAlertUpsertBulk) UpdateLabels() *MsgAlertUpsertBulk

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*MsgAlertUpsertBulk) UpdateNewValues

func (u *MsgAlertUpsertBulk) UpdateNewValues() *MsgAlertUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.MsgAlert.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msgalert.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgAlertUpsertBulk) UpdateStartsAt

func (u *MsgAlertUpsertBulk) UpdateStartsAt() *MsgAlertUpsertBulk

UpdateStartsAt sets the "starts_at" field to the value that was provided on create.

func (*MsgAlertUpsertBulk) UpdateState

func (u *MsgAlertUpsertBulk) UpdateState() *MsgAlertUpsertBulk

UpdateState sets the "state" field to the value that was provided on create.

func (*MsgAlertUpsertBulk) UpdateTimeout

func (u *MsgAlertUpsertBulk) UpdateTimeout() *MsgAlertUpsertBulk

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*MsgAlertUpsertBulk) UpdateURL

func (u *MsgAlertUpsertBulk) UpdateURL() *MsgAlertUpsertBulk

UpdateURL sets the "url" field to the value that was provided on create.

func (*MsgAlertUpsertBulk) UpdateUpdatedAt

func (u *MsgAlertUpsertBulk) UpdateUpdatedAt() *MsgAlertUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type MsgAlertUpsertOne

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

MsgAlertUpsertOne is the builder for "upsert"-ing

one MsgAlert node.

func (*MsgAlertUpsertOne) ClearAnnotations

func (u *MsgAlertUpsertOne) ClearAnnotations() *MsgAlertUpsertOne

ClearAnnotations clears the value of the "annotations" field.

func (*MsgAlertUpsertOne) ClearEndsAt

func (u *MsgAlertUpsertOne) ClearEndsAt() *MsgAlertUpsertOne

ClearEndsAt clears the value of the "ends_at" field.

func (*MsgAlertUpsertOne) ClearLabels

func (u *MsgAlertUpsertOne) ClearLabels() *MsgAlertUpsertOne

ClearLabels clears the value of the "labels" field.

func (*MsgAlertUpsertOne) ClearURL

func (u *MsgAlertUpsertOne) ClearURL() *MsgAlertUpsertOne

ClearURL clears the value of the "url" field.

func (*MsgAlertUpsertOne) ClearUpdatedAt

func (u *MsgAlertUpsertOne) ClearUpdatedAt() *MsgAlertUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgAlertUpsertOne) DoNothing

func (u *MsgAlertUpsertOne) DoNothing() *MsgAlertUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgAlertUpsertOne) Exec

func (u *MsgAlertUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgAlertUpsertOne) ExecX

func (u *MsgAlertUpsertOne) ExecX(ctx context.Context)

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

func (*MsgAlertUpsertOne) ID

func (u *MsgAlertUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*MsgAlertUpsertOne) IDX

func (u *MsgAlertUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*MsgAlertUpsertOne) Ignore

func (u *MsgAlertUpsertOne) Ignore() *MsgAlertUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgAlert.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*MsgAlertUpsertOne) SetAnnotations

func (u *MsgAlertUpsertOne) SetAnnotations(v *label.LabelSet) *MsgAlertUpsertOne

SetAnnotations sets the "annotations" field.

func (*MsgAlertUpsertOne) SetDeleted

func (u *MsgAlertUpsertOne) SetDeleted(v bool) *MsgAlertUpsertOne

SetDeleted sets the "deleted" field.

func (*MsgAlertUpsertOne) SetEndsAt

func (u *MsgAlertUpsertOne) SetEndsAt(v time.Time) *MsgAlertUpsertOne

SetEndsAt sets the "ends_at" field.

func (*MsgAlertUpsertOne) SetFingerprint

func (u *MsgAlertUpsertOne) SetFingerprint(v string) *MsgAlertUpsertOne

SetFingerprint sets the "fingerprint" field.

func (*MsgAlertUpsertOne) SetLabels

SetLabels sets the "labels" field.

func (*MsgAlertUpsertOne) SetStartsAt

func (u *MsgAlertUpsertOne) SetStartsAt(v time.Time) *MsgAlertUpsertOne

SetStartsAt sets the "starts_at" field.

func (*MsgAlertUpsertOne) SetState

SetState sets the "state" field.

func (*MsgAlertUpsertOne) SetTimeout

func (u *MsgAlertUpsertOne) SetTimeout(v bool) *MsgAlertUpsertOne

SetTimeout sets the "timeout" field.

func (*MsgAlertUpsertOne) SetURL

SetURL sets the "url" field.

func (*MsgAlertUpsertOne) SetUpdatedAt

func (u *MsgAlertUpsertOne) SetUpdatedAt(v time.Time) *MsgAlertUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*MsgAlertUpsertOne) Update

func (u *MsgAlertUpsertOne) Update(set func(*MsgAlertUpsert)) *MsgAlertUpsertOne

Update allows overriding fields `UPDATE` values. See the MsgAlertCreate.OnConflict documentation for more info.

func (*MsgAlertUpsertOne) UpdateAnnotations

func (u *MsgAlertUpsertOne) UpdateAnnotations() *MsgAlertUpsertOne

UpdateAnnotations sets the "annotations" field to the value that was provided on create.

func (*MsgAlertUpsertOne) UpdateDeleted

func (u *MsgAlertUpsertOne) UpdateDeleted() *MsgAlertUpsertOne

UpdateDeleted sets the "deleted" field to the value that was provided on create.

func (*MsgAlertUpsertOne) UpdateEndsAt

func (u *MsgAlertUpsertOne) UpdateEndsAt() *MsgAlertUpsertOne

UpdateEndsAt sets the "ends_at" field to the value that was provided on create.

func (*MsgAlertUpsertOne) UpdateFingerprint

func (u *MsgAlertUpsertOne) UpdateFingerprint() *MsgAlertUpsertOne

UpdateFingerprint sets the "fingerprint" field to the value that was provided on create.

func (*MsgAlertUpsertOne) UpdateLabels

func (u *MsgAlertUpsertOne) UpdateLabels() *MsgAlertUpsertOne

UpdateLabels sets the "labels" field to the value that was provided on create.

func (*MsgAlertUpsertOne) UpdateNewValues

func (u *MsgAlertUpsertOne) UpdateNewValues() *MsgAlertUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.MsgAlert.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msgalert.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgAlertUpsertOne) UpdateStartsAt

func (u *MsgAlertUpsertOne) UpdateStartsAt() *MsgAlertUpsertOne

UpdateStartsAt sets the "starts_at" field to the value that was provided on create.

func (*MsgAlertUpsertOne) UpdateState

func (u *MsgAlertUpsertOne) UpdateState() *MsgAlertUpsertOne

UpdateState sets the "state" field to the value that was provided on create.

func (*MsgAlertUpsertOne) UpdateTimeout

func (u *MsgAlertUpsertOne) UpdateTimeout() *MsgAlertUpsertOne

UpdateTimeout sets the "timeout" field to the value that was provided on create.

func (*MsgAlertUpsertOne) UpdateURL

func (u *MsgAlertUpsertOne) UpdateURL() *MsgAlertUpsertOne

UpdateURL sets the "url" field to the value that was provided on create.

func (*MsgAlertUpsertOne) UpdateUpdatedAt

func (u *MsgAlertUpsertOne) UpdateUpdatedAt() *MsgAlertUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type MsgAlertWhereInput

type MsgAlertWhereInput struct {
	Predicates []predicate.MsgAlert  `json:"-"`
	Not        *MsgAlertWhereInput   `json:"not,omitempty"`
	Or         []*MsgAlertWhereInput `json:"or,omitempty"`
	And        []*MsgAlertWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "starts_at" field predicates.
	StartsAt      *time.Time  `json:"startsAt,omitempty"`
	StartsAtNEQ   *time.Time  `json:"startsAtNEQ,omitempty"`
	StartsAtIn    []time.Time `json:"startsAtIn,omitempty"`
	StartsAtNotIn []time.Time `json:"startsAtNotIn,omitempty"`
	StartsAtGT    *time.Time  `json:"startsAtGT,omitempty"`
	StartsAtGTE   *time.Time  `json:"startsAtGTE,omitempty"`
	StartsAtLT    *time.Time  `json:"startsAtLT,omitempty"`
	StartsAtLTE   *time.Time  `json:"startsAtLTE,omitempty"`

	// "ends_at" field predicates.
	EndsAt       *time.Time  `json:"endsAt,omitempty"`
	EndsAtNEQ    *time.Time  `json:"endsAtNEQ,omitempty"`
	EndsAtIn     []time.Time `json:"endsAtIn,omitempty"`
	EndsAtNotIn  []time.Time `json:"endsAtNotIn,omitempty"`
	EndsAtGT     *time.Time  `json:"endsAtGT,omitempty"`
	EndsAtGTE    *time.Time  `json:"endsAtGTE,omitempty"`
	EndsAtLT     *time.Time  `json:"endsAtLT,omitempty"`
	EndsAtLTE    *time.Time  `json:"endsAtLTE,omitempty"`
	EndsAtIsNil  bool        `json:"endsAtIsNil,omitempty"`
	EndsAtNotNil bool        `json:"endsAtNotNil,omitempty"`

	// "url" field predicates.
	URL             *string  `json:"url,omitempty"`
	URLNEQ          *string  `json:"urlNEQ,omitempty"`
	URLIn           []string `json:"urlIn,omitempty"`
	URLNotIn        []string `json:"urlNotIn,omitempty"`
	URLGT           *string  `json:"urlGT,omitempty"`
	URLGTE          *string  `json:"urlGTE,omitempty"`
	URLLT           *string  `json:"urlLT,omitempty"`
	URLLTE          *string  `json:"urlLTE,omitempty"`
	URLContains     *string  `json:"urlContains,omitempty"`
	URLHasPrefix    *string  `json:"urlHasPrefix,omitempty"`
	URLHasSuffix    *string  `json:"urlHasSuffix,omitempty"`
	URLIsNil        bool     `json:"urlIsNil,omitempty"`
	URLNotNil       bool     `json:"urlNotNil,omitempty"`
	URLEqualFold    *string  `json:"urlEqualFold,omitempty"`
	URLContainsFold *string  `json:"urlContainsFold,omitempty"`

	// "timeout" field predicates.
	Timeout    *bool `json:"timeout,omitempty"`
	TimeoutNEQ *bool `json:"timeoutNEQ,omitempty"`

	// "fingerprint" field predicates.
	Fingerprint             *string  `json:"fingerprint,omitempty"`
	FingerprintNEQ          *string  `json:"fingerprintNEQ,omitempty"`
	FingerprintIn           []string `json:"fingerprintIn,omitempty"`
	FingerprintNotIn        []string `json:"fingerprintNotIn,omitempty"`
	FingerprintGT           *string  `json:"fingerprintGT,omitempty"`
	FingerprintGTE          *string  `json:"fingerprintGTE,omitempty"`
	FingerprintLT           *string  `json:"fingerprintLT,omitempty"`
	FingerprintLTE          *string  `json:"fingerprintLTE,omitempty"`
	FingerprintContains     *string  `json:"fingerprintContains,omitempty"`
	FingerprintHasPrefix    *string  `json:"fingerprintHasPrefix,omitempty"`
	FingerprintHasSuffix    *string  `json:"fingerprintHasSuffix,omitempty"`
	FingerprintEqualFold    *string  `json:"fingerprintEqualFold,omitempty"`
	FingerprintContainsFold *string  `json:"fingerprintContainsFold,omitempty"`

	// "state" field predicates.
	State      *alert.AlertStatus  `json:"state,omitempty"`
	StateNEQ   *alert.AlertStatus  `json:"stateNEQ,omitempty"`
	StateIn    []alert.AlertStatus `json:"stateIn,omitempty"`
	StateNotIn []alert.AlertStatus `json:"stateNotIn,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "deleted" field predicates.
	Deleted    *bool `json:"deleted,omitempty"`
	DeletedNEQ *bool `json:"deletedNEQ,omitempty"`

	// "nlog" edge predicates.
	HasNlog     *bool             `json:"hasNlog,omitempty"`
	HasNlogWith []*NlogWhereInput `json:"hasNlogWith,omitempty"`

	// "nlog_alerts" edge predicates.
	HasNlogAlerts     *bool                  `json:"hasNlogAlerts,omitempty"`
	HasNlogAlertsWith []*NlogAlertWhereInput `json:"hasNlogAlertsWith,omitempty"`
}

MsgAlertWhereInput represents a where input for filtering MsgAlert queries.

func (*MsgAlertWhereInput) AddPredicates

func (i *MsgAlertWhereInput) AddPredicates(predicates ...predicate.MsgAlert)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*MsgAlertWhereInput) Filter

Filter applies the MsgAlertWhereInput filter on the MsgAlertQuery builder.

func (*MsgAlertWhereInput) P

P returns a predicate for filtering msgalerts. An error is returned if the input is empty or invalid.

type MsgAlerts

type MsgAlerts []*MsgAlert

MsgAlerts is a parsable slice of MsgAlert.

type MsgChannel

type MsgChannel struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 消息通道名称
	Name string `json:"name,omitempty"`
	// 组织ID
	TenantID int `json:"tenant_id,omitempty"`
	// 支持的消息模式:站内信,app推送,邮件,短信,微信等
	ReceiverType profile.ReceiverType `json:"receiver_type,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// 通道配置Json格式
	Receiver *profile.Receiver `json:"receiver,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// contains filtered or unexported fields
}

MsgChannel is the model entity for the MsgChannel schema.

func (*MsgChannel) GlobalID

func (mc *MsgChannel) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given MsgChannel node.

func (*MsgChannel) IsNode

func (*MsgChannel) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*MsgChannel) String

func (mc *MsgChannel) String() string

String implements the fmt.Stringer.

func (*MsgChannel) ToEdge

func (mc *MsgChannel) ToEdge(order *MsgChannelOrder) *MsgChannelEdge

ToEdge converts MsgChannel into MsgChannelEdge.

func (*MsgChannel) Unwrap

func (mc *MsgChannel) Unwrap() *MsgChannel

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

func (mc *MsgChannel) Update() *MsgChannelUpdateOne

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

func (*MsgChannel) Value

func (mc *MsgChannel) Value(name string) (ent.Value, error)

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

type MsgChannelClient

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

MsgChannelClient is a client for the MsgChannel schema.

func NewMsgChannelClient

func NewMsgChannelClient(c config) *MsgChannelClient

NewMsgChannelClient returns a client for the MsgChannel from the given config.

func (*MsgChannelClient) Create

func (c *MsgChannelClient) Create() *MsgChannelCreate

Create returns a builder for creating a MsgChannel entity.

func (*MsgChannelClient) CreateBulk

func (c *MsgChannelClient) CreateBulk(builders ...*MsgChannelCreate) *MsgChannelCreateBulk

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

func (*MsgChannelClient) Delete

func (c *MsgChannelClient) Delete() *MsgChannelDelete

Delete returns a delete builder for MsgChannel.

func (*MsgChannelClient) DeleteOne

func (c *MsgChannelClient) DeleteOne(mc *MsgChannel) *MsgChannelDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MsgChannelClient) DeleteOneID

func (c *MsgChannelClient) DeleteOneID(id int) *MsgChannelDeleteOne

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

func (*MsgChannelClient) Get

func (c *MsgChannelClient) Get(ctx context.Context, id int) (*MsgChannel, error)

Get returns a MsgChannel entity by its id.

func (*MsgChannelClient) GetX

func (c *MsgChannelClient) GetX(ctx context.Context, id int) *MsgChannel

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

func (*MsgChannelClient) Hooks

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

Hooks returns the client hooks.

func (*MsgChannelClient) Intercept

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

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

func (*MsgChannelClient) Interceptors

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

Interceptors returns the client interceptors.

func (*MsgChannelClient) MapCreateBulk

func (c *MsgChannelClient) MapCreateBulk(slice any, setFunc func(*MsgChannelCreate, int)) *MsgChannelCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MsgChannelClient) Query

func (c *MsgChannelClient) Query() *MsgChannelQuery

Query returns a query builder for MsgChannel.

func (*MsgChannelClient) Update

func (c *MsgChannelClient) Update() *MsgChannelUpdate

Update returns an update builder for MsgChannel.

func (*MsgChannelClient) UpdateOne

func (c *MsgChannelClient) UpdateOne(mc *MsgChannel) *MsgChannelUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MsgChannelClient) UpdateOneID

func (c *MsgChannelClient) UpdateOneID(id int) *MsgChannelUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MsgChannelClient) Use

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

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

type MsgChannelConnection

type MsgChannelConnection struct {
	Edges      []*MsgChannelEdge `json:"edges"`
	PageInfo   PageInfo          `json:"pageInfo"`
	TotalCount int               `json:"totalCount"`
}

MsgChannelConnection is the connection containing edges to MsgChannel.

type MsgChannelCreate

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

MsgChannelCreate is the builder for creating a MsgChannel entity.

func (*MsgChannelCreate) Exec

func (mcc *MsgChannelCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgChannelCreate) ExecX

func (mcc *MsgChannelCreate) ExecX(ctx context.Context)

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

func (*MsgChannelCreate) Mutation

func (mcc *MsgChannelCreate) Mutation() *MsgChannelMutation

Mutation returns the MsgChannelMutation object of the builder.

func (*MsgChannelCreate) OnConflict

func (mcc *MsgChannelCreate) OnConflict(opts ...sql.ConflictOption) *MsgChannelUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgChannel.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgChannelUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*MsgChannelCreate) OnConflictColumns

func (mcc *MsgChannelCreate) OnConflictColumns(columns ...string) *MsgChannelUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgChannel.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgChannelCreate) Save

func (mcc *MsgChannelCreate) Save(ctx context.Context) (*MsgChannel, error)

Save creates the MsgChannel in the database.

func (*MsgChannelCreate) SaveX

func (mcc *MsgChannelCreate) SaveX(ctx context.Context) *MsgChannel

SaveX calls Save and panics if Save returns an error.

func (*MsgChannelCreate) SetComments

func (mcc *MsgChannelCreate) SetComments(s string) *MsgChannelCreate

SetComments sets the "comments" field.

func (*MsgChannelCreate) SetCreatedAt

func (mcc *MsgChannelCreate) SetCreatedAt(t time.Time) *MsgChannelCreate

SetCreatedAt sets the "created_at" field.

func (*MsgChannelCreate) SetCreatedBy

func (mcc *MsgChannelCreate) SetCreatedBy(i int) *MsgChannelCreate

SetCreatedBy sets the "created_by" field.

func (*MsgChannelCreate) SetID

func (mcc *MsgChannelCreate) SetID(i int) *MsgChannelCreate

SetID sets the "id" field.

func (*MsgChannelCreate) SetInput

SetInput applies the change-set in the CreateMsgChannelInput on the MsgChannelCreate builder.

func (*MsgChannelCreate) SetName

func (mcc *MsgChannelCreate) SetName(s string) *MsgChannelCreate

SetName sets the "name" field.

func (*MsgChannelCreate) SetNillableComments

func (mcc *MsgChannelCreate) SetNillableComments(s *string) *MsgChannelCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*MsgChannelCreate) SetNillableCreatedAt

func (mcc *MsgChannelCreate) SetNillableCreatedAt(t *time.Time) *MsgChannelCreate

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

func (*MsgChannelCreate) SetNillableStatus

func (mcc *MsgChannelCreate) SetNillableStatus(ts *typex.SimpleStatus) *MsgChannelCreate

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

func (*MsgChannelCreate) SetNillableUpdatedAt

func (mcc *MsgChannelCreate) SetNillableUpdatedAt(t *time.Time) *MsgChannelCreate

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

func (*MsgChannelCreate) SetNillableUpdatedBy

func (mcc *MsgChannelCreate) SetNillableUpdatedBy(i *int) *MsgChannelCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgChannelCreate) SetReceiver

func (mcc *MsgChannelCreate) SetReceiver(pr *profile.Receiver) *MsgChannelCreate

SetReceiver sets the "receiver" field.

func (*MsgChannelCreate) SetReceiverType

func (mcc *MsgChannelCreate) SetReceiverType(pt profile.ReceiverType) *MsgChannelCreate

SetReceiverType sets the "receiver_type" field.

func (*MsgChannelCreate) SetStatus

SetStatus sets the "status" field.

func (*MsgChannelCreate) SetTenantID

func (mcc *MsgChannelCreate) SetTenantID(i int) *MsgChannelCreate

SetTenantID sets the "tenant_id" field.

func (*MsgChannelCreate) SetUpdatedAt

func (mcc *MsgChannelCreate) SetUpdatedAt(t time.Time) *MsgChannelCreate

SetUpdatedAt sets the "updated_at" field.

func (*MsgChannelCreate) SetUpdatedBy

func (mcc *MsgChannelCreate) SetUpdatedBy(i int) *MsgChannelCreate

SetUpdatedBy sets the "updated_by" field.

type MsgChannelCreateBulk

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

MsgChannelCreateBulk is the builder for creating many MsgChannel entities in bulk.

func (*MsgChannelCreateBulk) Exec

func (mccb *MsgChannelCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgChannelCreateBulk) ExecX

func (mccb *MsgChannelCreateBulk) ExecX(ctx context.Context)

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

func (*MsgChannelCreateBulk) OnConflict

func (mccb *MsgChannelCreateBulk) OnConflict(opts ...sql.ConflictOption) *MsgChannelUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgChannel.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgChannelUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*MsgChannelCreateBulk) OnConflictColumns

func (mccb *MsgChannelCreateBulk) OnConflictColumns(columns ...string) *MsgChannelUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgChannel.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgChannelCreateBulk) Save

func (mccb *MsgChannelCreateBulk) Save(ctx context.Context) ([]*MsgChannel, error)

Save creates the MsgChannel entities in the database.

func (*MsgChannelCreateBulk) SaveX

func (mccb *MsgChannelCreateBulk) SaveX(ctx context.Context) []*MsgChannel

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

type MsgChannelDelete

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

MsgChannelDelete is the builder for deleting a MsgChannel entity.

func (*MsgChannelDelete) Exec

func (mcd *MsgChannelDelete) Exec(ctx context.Context) (int, error)

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

func (*MsgChannelDelete) ExecX

func (mcd *MsgChannelDelete) ExecX(ctx context.Context) int

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

func (*MsgChannelDelete) Where

Where appends a list predicates to the MsgChannelDelete builder.

type MsgChannelDeleteOne

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

MsgChannelDeleteOne is the builder for deleting a single MsgChannel entity.

func (*MsgChannelDeleteOne) Exec

func (mcdo *MsgChannelDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MsgChannelDeleteOne) ExecX

func (mcdo *MsgChannelDeleteOne) ExecX(ctx context.Context)

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

func (*MsgChannelDeleteOne) Where

Where appends a list predicates to the MsgChannelDelete builder.

type MsgChannelEdge

type MsgChannelEdge struct {
	Node   *MsgChannel `json:"node"`
	Cursor Cursor      `json:"cursor"`
}

MsgChannelEdge is the edge representation of MsgChannel.

type MsgChannelGroupBy

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

MsgChannelGroupBy is the group-by builder for MsgChannel entities.

func (*MsgChannelGroupBy) Aggregate

func (mcgb *MsgChannelGroupBy) Aggregate(fns ...AggregateFunc) *MsgChannelGroupBy

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

func (*MsgChannelGroupBy) Bool

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

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

func (*MsgChannelGroupBy) BoolX

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

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

func (*MsgChannelGroupBy) Bools

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

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

func (*MsgChannelGroupBy) BoolsX

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

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

func (*MsgChannelGroupBy) Float64

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

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

func (*MsgChannelGroupBy) Float64X

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

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

func (*MsgChannelGroupBy) Float64s

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

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

func (*MsgChannelGroupBy) Float64sX

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

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

func (*MsgChannelGroupBy) Int

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

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

func (*MsgChannelGroupBy) IntX

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

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

func (*MsgChannelGroupBy) Ints

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

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

func (*MsgChannelGroupBy) IntsX

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

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

func (*MsgChannelGroupBy) Scan

func (mcgb *MsgChannelGroupBy) Scan(ctx context.Context, v any) error

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

func (*MsgChannelGroupBy) ScanX

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

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

func (*MsgChannelGroupBy) String

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

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

func (*MsgChannelGroupBy) StringX

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

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

func (*MsgChannelGroupBy) Strings

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

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

func (*MsgChannelGroupBy) StringsX

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

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

type MsgChannelMutation

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

MsgChannelMutation represents an operation that mutates the MsgChannel nodes in the graph.

func (*MsgChannelMutation) AddCreatedBy

func (m *MsgChannelMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*MsgChannelMutation) AddField

func (m *MsgChannelMutation) 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 (*MsgChannelMutation) AddTenantID

func (m *MsgChannelMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*MsgChannelMutation) AddUpdatedBy

func (m *MsgChannelMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgChannelMutation) AddedCreatedBy

func (m *MsgChannelMutation) AddedCreatedBy() (r int, exists bool)

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

func (*MsgChannelMutation) AddedEdges

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

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

func (*MsgChannelMutation) AddedField

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

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

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

func (*MsgChannelMutation) AddedIDs

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

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

func (*MsgChannelMutation) AddedTenantID

func (m *MsgChannelMutation) AddedTenantID() (r int, exists bool)

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

func (*MsgChannelMutation) AddedUpdatedBy

func (m *MsgChannelMutation) AddedUpdatedBy() (r int, exists bool)

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

func (*MsgChannelMutation) ClearComments

func (m *MsgChannelMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*MsgChannelMutation) ClearEdge

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

func (m *MsgChannelMutation) 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 (*MsgChannelMutation) ClearReceiver

func (m *MsgChannelMutation) ClearReceiver()

ClearReceiver clears the value of the "receiver" field.

func (*MsgChannelMutation) ClearStatus

func (m *MsgChannelMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*MsgChannelMutation) ClearUpdatedAt

func (m *MsgChannelMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgChannelMutation) ClearUpdatedBy

func (m *MsgChannelMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgChannelMutation) ClearedEdges

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

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

func (*MsgChannelMutation) ClearedFields

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

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

func (MsgChannelMutation) Client

func (m MsgChannelMutation) 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 (*MsgChannelMutation) Comments

func (m *MsgChannelMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*MsgChannelMutation) CommentsCleared

func (m *MsgChannelMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*MsgChannelMutation) CreatedAt

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

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

func (*MsgChannelMutation) CreatedBy

func (m *MsgChannelMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*MsgChannelMutation) EdgeCleared

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

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

func (*MsgChannelMutation) Field

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

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

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

func (*MsgChannelMutation) Fields

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

func (m *MsgChannelMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*MsgChannelMutation) IDs

func (m *MsgChannelMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*MsgChannelMutation) Name

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

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

func (*MsgChannelMutation) OldComments

func (m *MsgChannelMutation) OldComments(ctx context.Context) (v string, err error)

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

func (*MsgChannelMutation) OldCreatedAt

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

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

func (*MsgChannelMutation) OldCreatedBy

func (m *MsgChannelMutation) OldCreatedBy(ctx context.Context) (v int, err error)

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

func (*MsgChannelMutation) OldField

func (m *MsgChannelMutation) 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 (*MsgChannelMutation) OldName

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

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

func (*MsgChannelMutation) OldReceiver

func (m *MsgChannelMutation) OldReceiver(ctx context.Context) (v *profile.Receiver, err error)

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

func (*MsgChannelMutation) OldReceiverType

func (m *MsgChannelMutation) OldReceiverType(ctx context.Context) (v profile.ReceiverType, err error)

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

func (*MsgChannelMutation) OldStatus

func (m *MsgChannelMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

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

func (*MsgChannelMutation) OldTenantID

func (m *MsgChannelMutation) OldTenantID(ctx context.Context) (v int, err error)

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

func (*MsgChannelMutation) OldUpdatedAt

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

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

func (*MsgChannelMutation) OldUpdatedBy

func (m *MsgChannelMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

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

func (*MsgChannelMutation) Op

func (m *MsgChannelMutation) Op() Op

Op returns the operation name.

func (*MsgChannelMutation) Receiver

func (m *MsgChannelMutation) Receiver() (r *profile.Receiver, exists bool)

Receiver returns the value of the "receiver" field in the mutation.

func (*MsgChannelMutation) ReceiverCleared

func (m *MsgChannelMutation) ReceiverCleared() bool

ReceiverCleared returns if the "receiver" field was cleared in this mutation.

func (*MsgChannelMutation) ReceiverType

func (m *MsgChannelMutation) ReceiverType() (r profile.ReceiverType, exists bool)

ReceiverType returns the value of the "receiver_type" field in the mutation.

func (*MsgChannelMutation) RemovedEdges

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

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

func (*MsgChannelMutation) RemovedIDs

func (m *MsgChannelMutation) 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 (*MsgChannelMutation) ResetComments

func (m *MsgChannelMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*MsgChannelMutation) ResetCreatedAt

func (m *MsgChannelMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*MsgChannelMutation) ResetCreatedBy

func (m *MsgChannelMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*MsgChannelMutation) ResetEdge

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

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

func (m *MsgChannelMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*MsgChannelMutation) ResetReceiver

func (m *MsgChannelMutation) ResetReceiver()

ResetReceiver resets all changes to the "receiver" field.

func (*MsgChannelMutation) ResetReceiverType

func (m *MsgChannelMutation) ResetReceiverType()

ResetReceiverType resets all changes to the "receiver_type" field.

func (*MsgChannelMutation) ResetStatus

func (m *MsgChannelMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*MsgChannelMutation) ResetTenantID

func (m *MsgChannelMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*MsgChannelMutation) ResetUpdatedAt

func (m *MsgChannelMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*MsgChannelMutation) ResetUpdatedBy

func (m *MsgChannelMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*MsgChannelMutation) SetComments

func (m *MsgChannelMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*MsgChannelMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*MsgChannelMutation) SetCreatedBy

func (m *MsgChannelMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*MsgChannelMutation) SetField

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

func (m *MsgChannelMutation) SetID(id int)

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

func (*MsgChannelMutation) SetName

func (m *MsgChannelMutation) SetName(s string)

SetName sets the "name" field.

func (*MsgChannelMutation) SetOp

func (m *MsgChannelMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MsgChannelMutation) SetReceiver

func (m *MsgChannelMutation) SetReceiver(pr *profile.Receiver)

SetReceiver sets the "receiver" field.

func (*MsgChannelMutation) SetReceiverType

func (m *MsgChannelMutation) SetReceiverType(pt profile.ReceiverType)

SetReceiverType sets the "receiver_type" field.

func (*MsgChannelMutation) SetStatus

func (m *MsgChannelMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*MsgChannelMutation) SetTenantID

func (m *MsgChannelMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*MsgChannelMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*MsgChannelMutation) SetUpdatedBy

func (m *MsgChannelMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*MsgChannelMutation) Status

func (m *MsgChannelMutation) Status() (r typex.SimpleStatus, exists bool)

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

func (*MsgChannelMutation) StatusCleared

func (m *MsgChannelMutation) StatusCleared() bool

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

func (*MsgChannelMutation) TenantID

func (m *MsgChannelMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (MsgChannelMutation) Tx

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

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

func (*MsgChannelMutation) Type

func (m *MsgChannelMutation) Type() string

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

func (*MsgChannelMutation) UpdatedAt

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

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

func (*MsgChannelMutation) UpdatedAtCleared

func (m *MsgChannelMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*MsgChannelMutation) UpdatedBy

func (m *MsgChannelMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*MsgChannelMutation) UpdatedByCleared

func (m *MsgChannelMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*MsgChannelMutation) Where

func (m *MsgChannelMutation) Where(ps ...predicate.MsgChannel)

Where appends a list predicates to the MsgChannelMutation builder.

func (*MsgChannelMutation) WhereP

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

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

type MsgChannelOrder

type MsgChannelOrder struct {
	Direction OrderDirection        `json:"direction"`
	Field     *MsgChannelOrderField `json:"field"`
}

MsgChannelOrder defines the ordering of MsgChannel.

type MsgChannelOrderField

type MsgChannelOrderField struct {
	// Value extracts the ordering value from the given MsgChannel.
	Value func(*MsgChannel) (ent.Value, error)
	// contains filtered or unexported fields
}

MsgChannelOrderField defines the ordering field of MsgChannel.

func (MsgChannelOrderField) MarshalGQL

func (f MsgChannelOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (MsgChannelOrderField) String

func (f MsgChannelOrderField) String() string

String implement fmt.Stringer interface.

func (*MsgChannelOrderField) UnmarshalGQL

func (f *MsgChannelOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type MsgChannelPaginateOption

type MsgChannelPaginateOption func(*msgchannelPager) error

MsgChannelPaginateOption enables pagination customization.

func WithMsgChannelFilter

func WithMsgChannelFilter(filter func(*MsgChannelQuery) (*MsgChannelQuery, error)) MsgChannelPaginateOption

WithMsgChannelFilter configures pagination filter.

func WithMsgChannelOrder

func WithMsgChannelOrder(order *MsgChannelOrder) MsgChannelPaginateOption

WithMsgChannelOrder configures pagination ordering.

type MsgChannelQuery

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

MsgChannelQuery is the builder for querying MsgChannel entities.

func (*MsgChannelQuery) Aggregate

func (mcq *MsgChannelQuery) Aggregate(fns ...AggregateFunc) *MsgChannelSelect

Aggregate returns a MsgChannelSelect configured with the given aggregations.

func (*MsgChannelQuery) All

func (mcq *MsgChannelQuery) All(ctx context.Context) ([]*MsgChannel, error)

All executes the query and returns a list of MsgChannels.

func (*MsgChannelQuery) AllX

func (mcq *MsgChannelQuery) AllX(ctx context.Context) []*MsgChannel

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

func (*MsgChannelQuery) Clone

func (mcq *MsgChannelQuery) Clone() *MsgChannelQuery

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

func (*MsgChannelQuery) CollectFields

func (mc *MsgChannelQuery) CollectFields(ctx context.Context, satisfies ...string) (*MsgChannelQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*MsgChannelQuery) Count

func (mcq *MsgChannelQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MsgChannelQuery) CountX

func (mcq *MsgChannelQuery) CountX(ctx context.Context) int

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

func (*MsgChannelQuery) Exist

func (mcq *MsgChannelQuery) Exist(ctx context.Context) (bool, error)

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

func (*MsgChannelQuery) ExistX

func (mcq *MsgChannelQuery) ExistX(ctx context.Context) bool

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

func (*MsgChannelQuery) First

func (mcq *MsgChannelQuery) First(ctx context.Context) (*MsgChannel, error)

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

func (*MsgChannelQuery) FirstID

func (mcq *MsgChannelQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*MsgChannelQuery) FirstIDX

func (mcq *MsgChannelQuery) FirstIDX(ctx context.Context) int

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

func (*MsgChannelQuery) FirstX

func (mcq *MsgChannelQuery) FirstX(ctx context.Context) *MsgChannel

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

func (*MsgChannelQuery) GroupBy

func (mcq *MsgChannelQuery) GroupBy(field string, fields ...string) *MsgChannelGroupBy

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 {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MsgChannel.Query().
	GroupBy(msgchannel.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MsgChannelQuery) IDs

func (mcq *MsgChannelQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*MsgChannelQuery) IDsX

func (mcq *MsgChannelQuery) IDsX(ctx context.Context) []int

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

func (*MsgChannelQuery) Limit

func (mcq *MsgChannelQuery) Limit(limit int) *MsgChannelQuery

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

func (*MsgChannelQuery) Offset

func (mcq *MsgChannelQuery) Offset(offset int) *MsgChannelQuery

Offset to start from.

func (*MsgChannelQuery) Only

func (mcq *MsgChannelQuery) Only(ctx context.Context) (*MsgChannel, error)

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

func (*MsgChannelQuery) OnlyID

func (mcq *MsgChannelQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*MsgChannelQuery) OnlyIDX

func (mcq *MsgChannelQuery) OnlyIDX(ctx context.Context) int

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

func (*MsgChannelQuery) OnlyX

func (mcq *MsgChannelQuery) OnlyX(ctx context.Context) *MsgChannel

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

func (*MsgChannelQuery) Order

Order specifies how the records should be ordered.

func (*MsgChannelQuery) Paginate

func (mc *MsgChannelQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...MsgChannelPaginateOption,
) (*MsgChannelConnection, error)

Paginate executes the query and returns a relay based cursor connection to MsgChannel.

func (*MsgChannelQuery) Select

func (mcq *MsgChannelQuery) Select(fields ...string) *MsgChannelSelect

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 {
	CreatedBy int `json:"created_by,omitempty"`
}

client.MsgChannel.Query().
	Select(msgchannel.FieldCreatedBy).
	Scan(ctx, &v)

func (*MsgChannelQuery) Unique

func (mcq *MsgChannelQuery) Unique(unique bool) *MsgChannelQuery

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

Where adds a new predicate for the MsgChannelQuery builder.

type MsgChannelSelect

type MsgChannelSelect struct {
	*MsgChannelQuery
	// contains filtered or unexported fields
}

MsgChannelSelect is the builder for selecting fields of MsgChannel entities.

func (*MsgChannelSelect) Aggregate

func (mcs *MsgChannelSelect) Aggregate(fns ...AggregateFunc) *MsgChannelSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MsgChannelSelect) Bool

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

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

func (*MsgChannelSelect) BoolX

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

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

func (*MsgChannelSelect) Bools

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

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

func (*MsgChannelSelect) BoolsX

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

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

func (*MsgChannelSelect) Float64

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

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

func (*MsgChannelSelect) Float64X

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

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

func (*MsgChannelSelect) Float64s

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

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

func (*MsgChannelSelect) Float64sX

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

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

func (*MsgChannelSelect) Int

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

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

func (*MsgChannelSelect) IntX

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

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

func (*MsgChannelSelect) Ints

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

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

func (*MsgChannelSelect) IntsX

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

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

func (*MsgChannelSelect) Scan

func (mcs *MsgChannelSelect) Scan(ctx context.Context, v any) error

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

func (*MsgChannelSelect) ScanX

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

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

func (*MsgChannelSelect) String

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

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

func (*MsgChannelSelect) StringX

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

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

func (*MsgChannelSelect) Strings

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

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

func (*MsgChannelSelect) StringsX

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

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

type MsgChannelUpdate

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

MsgChannelUpdate is the builder for updating MsgChannel entities.

func (*MsgChannelUpdate) AddTenantID

func (mcu *MsgChannelUpdate) AddTenantID(i int) *MsgChannelUpdate

AddTenantID adds i to the "tenant_id" field.

func (*MsgChannelUpdate) AddUpdatedBy

func (mcu *MsgChannelUpdate) AddUpdatedBy(i int) *MsgChannelUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgChannelUpdate) ClearComments

func (mcu *MsgChannelUpdate) ClearComments() *MsgChannelUpdate

ClearComments clears the value of the "comments" field.

func (*MsgChannelUpdate) ClearReceiver

func (mcu *MsgChannelUpdate) ClearReceiver() *MsgChannelUpdate

ClearReceiver clears the value of the "receiver" field.

func (*MsgChannelUpdate) ClearStatus

func (mcu *MsgChannelUpdate) ClearStatus() *MsgChannelUpdate

ClearStatus clears the value of the "status" field.

func (*MsgChannelUpdate) ClearUpdatedAt

func (mcu *MsgChannelUpdate) ClearUpdatedAt() *MsgChannelUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgChannelUpdate) ClearUpdatedBy

func (mcu *MsgChannelUpdate) ClearUpdatedBy() *MsgChannelUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgChannelUpdate) Exec

func (mcu *MsgChannelUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgChannelUpdate) ExecX

func (mcu *MsgChannelUpdate) ExecX(ctx context.Context)

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

func (*MsgChannelUpdate) Mutation

func (mcu *MsgChannelUpdate) Mutation() *MsgChannelMutation

Mutation returns the MsgChannelMutation object of the builder.

func (*MsgChannelUpdate) Save

func (mcu *MsgChannelUpdate) Save(ctx context.Context) (int, error)

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

func (*MsgChannelUpdate) SaveX

func (mcu *MsgChannelUpdate) SaveX(ctx context.Context) int

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

func (*MsgChannelUpdate) SetComments

func (mcu *MsgChannelUpdate) SetComments(s string) *MsgChannelUpdate

SetComments sets the "comments" field.

func (*MsgChannelUpdate) SetInput

SetInput applies the change-set in the UpdateMsgChannelInput on the MsgChannelUpdate builder.

func (*MsgChannelUpdate) SetName

func (mcu *MsgChannelUpdate) SetName(s string) *MsgChannelUpdate

SetName sets the "name" field.

func (*MsgChannelUpdate) SetNillableComments

func (mcu *MsgChannelUpdate) SetNillableComments(s *string) *MsgChannelUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*MsgChannelUpdate) SetNillableStatus

func (mcu *MsgChannelUpdate) SetNillableStatus(ts *typex.SimpleStatus) *MsgChannelUpdate

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

func (*MsgChannelUpdate) SetNillableUpdatedAt

func (mcu *MsgChannelUpdate) SetNillableUpdatedAt(t *time.Time) *MsgChannelUpdate

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

func (*MsgChannelUpdate) SetNillableUpdatedBy

func (mcu *MsgChannelUpdate) SetNillableUpdatedBy(i *int) *MsgChannelUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgChannelUpdate) SetReceiver

func (mcu *MsgChannelUpdate) SetReceiver(pr *profile.Receiver) *MsgChannelUpdate

SetReceiver sets the "receiver" field.

func (*MsgChannelUpdate) SetReceiverType

func (mcu *MsgChannelUpdate) SetReceiverType(pt profile.ReceiverType) *MsgChannelUpdate

SetReceiverType sets the "receiver_type" field.

func (*MsgChannelUpdate) SetStatus

SetStatus sets the "status" field.

func (*MsgChannelUpdate) SetTenantID

func (mcu *MsgChannelUpdate) SetTenantID(i int) *MsgChannelUpdate

SetTenantID sets the "tenant_id" field.

func (*MsgChannelUpdate) SetUpdatedAt

func (mcu *MsgChannelUpdate) SetUpdatedAt(t time.Time) *MsgChannelUpdate

SetUpdatedAt sets the "updated_at" field.

func (*MsgChannelUpdate) SetUpdatedBy

func (mcu *MsgChannelUpdate) SetUpdatedBy(i int) *MsgChannelUpdate

SetUpdatedBy sets the "updated_by" field.

func (*MsgChannelUpdate) Where

Where appends a list predicates to the MsgChannelUpdate builder.

type MsgChannelUpdateOne

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

MsgChannelUpdateOne is the builder for updating a single MsgChannel entity.

func (*MsgChannelUpdateOne) AddTenantID

func (mcuo *MsgChannelUpdateOne) AddTenantID(i int) *MsgChannelUpdateOne

AddTenantID adds i to the "tenant_id" field.

func (*MsgChannelUpdateOne) AddUpdatedBy

func (mcuo *MsgChannelUpdateOne) AddUpdatedBy(i int) *MsgChannelUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgChannelUpdateOne) ClearComments

func (mcuo *MsgChannelUpdateOne) ClearComments() *MsgChannelUpdateOne

ClearComments clears the value of the "comments" field.

func (*MsgChannelUpdateOne) ClearReceiver

func (mcuo *MsgChannelUpdateOne) ClearReceiver() *MsgChannelUpdateOne

ClearReceiver clears the value of the "receiver" field.

func (*MsgChannelUpdateOne) ClearStatus

func (mcuo *MsgChannelUpdateOne) ClearStatus() *MsgChannelUpdateOne

ClearStatus clears the value of the "status" field.

func (*MsgChannelUpdateOne) ClearUpdatedAt

func (mcuo *MsgChannelUpdateOne) ClearUpdatedAt() *MsgChannelUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgChannelUpdateOne) ClearUpdatedBy

func (mcuo *MsgChannelUpdateOne) ClearUpdatedBy() *MsgChannelUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgChannelUpdateOne) Exec

func (mcuo *MsgChannelUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MsgChannelUpdateOne) ExecX

func (mcuo *MsgChannelUpdateOne) ExecX(ctx context.Context)

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

func (*MsgChannelUpdateOne) Mutation

func (mcuo *MsgChannelUpdateOne) Mutation() *MsgChannelMutation

Mutation returns the MsgChannelMutation object of the builder.

func (*MsgChannelUpdateOne) Save

func (mcuo *MsgChannelUpdateOne) Save(ctx context.Context) (*MsgChannel, error)

Save executes the query and returns the updated MsgChannel entity.

func (*MsgChannelUpdateOne) SaveX

func (mcuo *MsgChannelUpdateOne) SaveX(ctx context.Context) *MsgChannel

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

func (*MsgChannelUpdateOne) Select

func (mcuo *MsgChannelUpdateOne) Select(field string, fields ...string) *MsgChannelUpdateOne

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

func (*MsgChannelUpdateOne) SetComments

func (mcuo *MsgChannelUpdateOne) SetComments(s string) *MsgChannelUpdateOne

SetComments sets the "comments" field.

func (*MsgChannelUpdateOne) SetInput

SetInput applies the change-set in the UpdateMsgChannelInput on the MsgChannelUpdateOne builder.

func (*MsgChannelUpdateOne) SetName

SetName sets the "name" field.

func (*MsgChannelUpdateOne) SetNillableComments

func (mcuo *MsgChannelUpdateOne) SetNillableComments(s *string) *MsgChannelUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*MsgChannelUpdateOne) SetNillableStatus

func (mcuo *MsgChannelUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *MsgChannelUpdateOne

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

func (*MsgChannelUpdateOne) SetNillableUpdatedAt

func (mcuo *MsgChannelUpdateOne) SetNillableUpdatedAt(t *time.Time) *MsgChannelUpdateOne

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

func (*MsgChannelUpdateOne) SetNillableUpdatedBy

func (mcuo *MsgChannelUpdateOne) SetNillableUpdatedBy(i *int) *MsgChannelUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgChannelUpdateOne) SetReceiver

func (mcuo *MsgChannelUpdateOne) SetReceiver(pr *profile.Receiver) *MsgChannelUpdateOne

SetReceiver sets the "receiver" field.

func (*MsgChannelUpdateOne) SetReceiverType

func (mcuo *MsgChannelUpdateOne) SetReceiverType(pt profile.ReceiverType) *MsgChannelUpdateOne

SetReceiverType sets the "receiver_type" field.

func (*MsgChannelUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*MsgChannelUpdateOne) SetTenantID

func (mcuo *MsgChannelUpdateOne) SetTenantID(i int) *MsgChannelUpdateOne

SetTenantID sets the "tenant_id" field.

func (*MsgChannelUpdateOne) SetUpdatedAt

func (mcuo *MsgChannelUpdateOne) SetUpdatedAt(t time.Time) *MsgChannelUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*MsgChannelUpdateOne) SetUpdatedBy

func (mcuo *MsgChannelUpdateOne) SetUpdatedBy(i int) *MsgChannelUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*MsgChannelUpdateOne) Where

Where appends a list predicates to the MsgChannelUpdate builder.

type MsgChannelUpsert

type MsgChannelUpsert struct {
	*sql.UpdateSet
}

MsgChannelUpsert is the "OnConflict" setter.

func (*MsgChannelUpsert) AddTenantID

func (u *MsgChannelUpsert) AddTenantID(v int) *MsgChannelUpsert

AddTenantID adds v to the "tenant_id" field.

func (*MsgChannelUpsert) AddUpdatedBy

func (u *MsgChannelUpsert) AddUpdatedBy(v int) *MsgChannelUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgChannelUpsert) ClearComments

func (u *MsgChannelUpsert) ClearComments() *MsgChannelUpsert

ClearComments clears the value of the "comments" field.

func (*MsgChannelUpsert) ClearReceiver

func (u *MsgChannelUpsert) ClearReceiver() *MsgChannelUpsert

ClearReceiver clears the value of the "receiver" field.

func (*MsgChannelUpsert) ClearStatus

func (u *MsgChannelUpsert) ClearStatus() *MsgChannelUpsert

ClearStatus clears the value of the "status" field.

func (*MsgChannelUpsert) ClearUpdatedAt

func (u *MsgChannelUpsert) ClearUpdatedAt() *MsgChannelUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgChannelUpsert) ClearUpdatedBy

func (u *MsgChannelUpsert) ClearUpdatedBy() *MsgChannelUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgChannelUpsert) SetComments

func (u *MsgChannelUpsert) SetComments(v string) *MsgChannelUpsert

SetComments sets the "comments" field.

func (*MsgChannelUpsert) SetName

func (u *MsgChannelUpsert) SetName(v string) *MsgChannelUpsert

SetName sets the "name" field.

func (*MsgChannelUpsert) SetReceiver

func (u *MsgChannelUpsert) SetReceiver(v *profile.Receiver) *MsgChannelUpsert

SetReceiver sets the "receiver" field.

func (*MsgChannelUpsert) SetReceiverType

func (u *MsgChannelUpsert) SetReceiverType(v profile.ReceiverType) *MsgChannelUpsert

SetReceiverType sets the "receiver_type" field.

func (*MsgChannelUpsert) SetStatus

SetStatus sets the "status" field.

func (*MsgChannelUpsert) SetTenantID

func (u *MsgChannelUpsert) SetTenantID(v int) *MsgChannelUpsert

SetTenantID sets the "tenant_id" field.

func (*MsgChannelUpsert) SetUpdatedAt

func (u *MsgChannelUpsert) SetUpdatedAt(v time.Time) *MsgChannelUpsert

SetUpdatedAt sets the "updated_at" field.

func (*MsgChannelUpsert) SetUpdatedBy

func (u *MsgChannelUpsert) SetUpdatedBy(v int) *MsgChannelUpsert

SetUpdatedBy sets the "updated_by" field.

func (*MsgChannelUpsert) UpdateComments

func (u *MsgChannelUpsert) UpdateComments() *MsgChannelUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*MsgChannelUpsert) UpdateName

func (u *MsgChannelUpsert) UpdateName() *MsgChannelUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*MsgChannelUpsert) UpdateReceiver

func (u *MsgChannelUpsert) UpdateReceiver() *MsgChannelUpsert

UpdateReceiver sets the "receiver" field to the value that was provided on create.

func (*MsgChannelUpsert) UpdateReceiverType

func (u *MsgChannelUpsert) UpdateReceiverType() *MsgChannelUpsert

UpdateReceiverType sets the "receiver_type" field to the value that was provided on create.

func (*MsgChannelUpsert) UpdateStatus

func (u *MsgChannelUpsert) UpdateStatus() *MsgChannelUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*MsgChannelUpsert) UpdateTenantID

func (u *MsgChannelUpsert) UpdateTenantID() *MsgChannelUpsert

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*MsgChannelUpsert) UpdateUpdatedAt

func (u *MsgChannelUpsert) UpdateUpdatedAt() *MsgChannelUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgChannelUpsert) UpdateUpdatedBy

func (u *MsgChannelUpsert) UpdateUpdatedBy() *MsgChannelUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgChannelUpsertBulk

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

MsgChannelUpsertBulk is the builder for "upsert"-ing a bulk of MsgChannel nodes.

func (*MsgChannelUpsertBulk) AddTenantID

func (u *MsgChannelUpsertBulk) AddTenantID(v int) *MsgChannelUpsertBulk

AddTenantID adds v to the "tenant_id" field.

func (*MsgChannelUpsertBulk) AddUpdatedBy

func (u *MsgChannelUpsertBulk) AddUpdatedBy(v int) *MsgChannelUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgChannelUpsertBulk) ClearComments

func (u *MsgChannelUpsertBulk) ClearComments() *MsgChannelUpsertBulk

ClearComments clears the value of the "comments" field.

func (*MsgChannelUpsertBulk) ClearReceiver

func (u *MsgChannelUpsertBulk) ClearReceiver() *MsgChannelUpsertBulk

ClearReceiver clears the value of the "receiver" field.

func (*MsgChannelUpsertBulk) ClearStatus

func (u *MsgChannelUpsertBulk) ClearStatus() *MsgChannelUpsertBulk

ClearStatus clears the value of the "status" field.

func (*MsgChannelUpsertBulk) ClearUpdatedAt

func (u *MsgChannelUpsertBulk) ClearUpdatedAt() *MsgChannelUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgChannelUpsertBulk) ClearUpdatedBy

func (u *MsgChannelUpsertBulk) ClearUpdatedBy() *MsgChannelUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgChannelUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgChannelUpsertBulk) Exec

Exec executes the query.

func (*MsgChannelUpsertBulk) ExecX

func (u *MsgChannelUpsertBulk) ExecX(ctx context.Context)

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

func (*MsgChannelUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgChannel.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*MsgChannelUpsertBulk) SetComments

SetComments sets the "comments" field.

func (*MsgChannelUpsertBulk) SetName

SetName sets the "name" field.

func (*MsgChannelUpsertBulk) SetReceiver

SetReceiver sets the "receiver" field.

func (*MsgChannelUpsertBulk) SetReceiverType

SetReceiverType sets the "receiver_type" field.

func (*MsgChannelUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*MsgChannelUpsertBulk) SetTenantID

func (u *MsgChannelUpsertBulk) SetTenantID(v int) *MsgChannelUpsertBulk

SetTenantID sets the "tenant_id" field.

func (*MsgChannelUpsertBulk) SetUpdatedAt

func (u *MsgChannelUpsertBulk) SetUpdatedAt(v time.Time) *MsgChannelUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*MsgChannelUpsertBulk) SetUpdatedBy

func (u *MsgChannelUpsertBulk) SetUpdatedBy(v int) *MsgChannelUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*MsgChannelUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the MsgChannelCreateBulk.OnConflict documentation for more info.

func (*MsgChannelUpsertBulk) UpdateComments

func (u *MsgChannelUpsertBulk) UpdateComments() *MsgChannelUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*MsgChannelUpsertBulk) UpdateName

func (u *MsgChannelUpsertBulk) UpdateName() *MsgChannelUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*MsgChannelUpsertBulk) UpdateNewValues

func (u *MsgChannelUpsertBulk) UpdateNewValues() *MsgChannelUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.MsgChannel.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msgchannel.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgChannelUpsertBulk) UpdateReceiver

func (u *MsgChannelUpsertBulk) UpdateReceiver() *MsgChannelUpsertBulk

UpdateReceiver sets the "receiver" field to the value that was provided on create.

func (*MsgChannelUpsertBulk) UpdateReceiverType

func (u *MsgChannelUpsertBulk) UpdateReceiverType() *MsgChannelUpsertBulk

UpdateReceiverType sets the "receiver_type" field to the value that was provided on create.

func (*MsgChannelUpsertBulk) UpdateStatus

func (u *MsgChannelUpsertBulk) UpdateStatus() *MsgChannelUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*MsgChannelUpsertBulk) UpdateTenantID

func (u *MsgChannelUpsertBulk) UpdateTenantID() *MsgChannelUpsertBulk

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*MsgChannelUpsertBulk) UpdateUpdatedAt

func (u *MsgChannelUpsertBulk) UpdateUpdatedAt() *MsgChannelUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgChannelUpsertBulk) UpdateUpdatedBy

func (u *MsgChannelUpsertBulk) UpdateUpdatedBy() *MsgChannelUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgChannelUpsertOne

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

MsgChannelUpsertOne is the builder for "upsert"-ing

one MsgChannel node.

func (*MsgChannelUpsertOne) AddTenantID

func (u *MsgChannelUpsertOne) AddTenantID(v int) *MsgChannelUpsertOne

AddTenantID adds v to the "tenant_id" field.

func (*MsgChannelUpsertOne) AddUpdatedBy

func (u *MsgChannelUpsertOne) AddUpdatedBy(v int) *MsgChannelUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgChannelUpsertOne) ClearComments

func (u *MsgChannelUpsertOne) ClearComments() *MsgChannelUpsertOne

ClearComments clears the value of the "comments" field.

func (*MsgChannelUpsertOne) ClearReceiver

func (u *MsgChannelUpsertOne) ClearReceiver() *MsgChannelUpsertOne

ClearReceiver clears the value of the "receiver" field.

func (*MsgChannelUpsertOne) ClearStatus

func (u *MsgChannelUpsertOne) ClearStatus() *MsgChannelUpsertOne

ClearStatus clears the value of the "status" field.

func (*MsgChannelUpsertOne) ClearUpdatedAt

func (u *MsgChannelUpsertOne) ClearUpdatedAt() *MsgChannelUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgChannelUpsertOne) ClearUpdatedBy

func (u *MsgChannelUpsertOne) ClearUpdatedBy() *MsgChannelUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgChannelUpsertOne) DoNothing

func (u *MsgChannelUpsertOne) DoNothing() *MsgChannelUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgChannelUpsertOne) Exec

Exec executes the query.

func (*MsgChannelUpsertOne) ExecX

func (u *MsgChannelUpsertOne) ExecX(ctx context.Context)

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

func (*MsgChannelUpsertOne) ID

func (u *MsgChannelUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*MsgChannelUpsertOne) IDX

func (u *MsgChannelUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*MsgChannelUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgChannel.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*MsgChannelUpsertOne) SetComments

func (u *MsgChannelUpsertOne) SetComments(v string) *MsgChannelUpsertOne

SetComments sets the "comments" field.

func (*MsgChannelUpsertOne) SetName

SetName sets the "name" field.

func (*MsgChannelUpsertOne) SetReceiver

SetReceiver sets the "receiver" field.

func (*MsgChannelUpsertOne) SetReceiverType

SetReceiverType sets the "receiver_type" field.

func (*MsgChannelUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*MsgChannelUpsertOne) SetTenantID

func (u *MsgChannelUpsertOne) SetTenantID(v int) *MsgChannelUpsertOne

SetTenantID sets the "tenant_id" field.

func (*MsgChannelUpsertOne) SetUpdatedAt

func (u *MsgChannelUpsertOne) SetUpdatedAt(v time.Time) *MsgChannelUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*MsgChannelUpsertOne) SetUpdatedBy

func (u *MsgChannelUpsertOne) SetUpdatedBy(v int) *MsgChannelUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*MsgChannelUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the MsgChannelCreate.OnConflict documentation for more info.

func (*MsgChannelUpsertOne) UpdateComments

func (u *MsgChannelUpsertOne) UpdateComments() *MsgChannelUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*MsgChannelUpsertOne) UpdateName

func (u *MsgChannelUpsertOne) UpdateName() *MsgChannelUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*MsgChannelUpsertOne) UpdateNewValues

func (u *MsgChannelUpsertOne) UpdateNewValues() *MsgChannelUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.MsgChannel.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msgchannel.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgChannelUpsertOne) UpdateReceiver

func (u *MsgChannelUpsertOne) UpdateReceiver() *MsgChannelUpsertOne

UpdateReceiver sets the "receiver" field to the value that was provided on create.

func (*MsgChannelUpsertOne) UpdateReceiverType

func (u *MsgChannelUpsertOne) UpdateReceiverType() *MsgChannelUpsertOne

UpdateReceiverType sets the "receiver_type" field to the value that was provided on create.

func (*MsgChannelUpsertOne) UpdateStatus

func (u *MsgChannelUpsertOne) UpdateStatus() *MsgChannelUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*MsgChannelUpsertOne) UpdateTenantID

func (u *MsgChannelUpsertOne) UpdateTenantID() *MsgChannelUpsertOne

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*MsgChannelUpsertOne) UpdateUpdatedAt

func (u *MsgChannelUpsertOne) UpdateUpdatedAt() *MsgChannelUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgChannelUpsertOne) UpdateUpdatedBy

func (u *MsgChannelUpsertOne) UpdateUpdatedBy() *MsgChannelUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgChannelWhereInput

type MsgChannelWhereInput struct {
	Predicates []predicate.MsgChannel  `json:"-"`
	Not        *MsgChannelWhereInput   `json:"not,omitempty"`
	Or         []*MsgChannelWhereInput `json:"or,omitempty"`
	And        []*MsgChannelWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "receiver_type" field predicates.
	ReceiverType      *profile.ReceiverType  `json:"receiverType,omitempty"`
	ReceiverTypeNEQ   *profile.ReceiverType  `json:"receiverTypeNEQ,omitempty"`
	ReceiverTypeIn    []profile.ReceiverType `json:"receiverTypeIn,omitempty"`
	ReceiverTypeNotIn []profile.ReceiverType `json:"receiverTypeNotIn,omitempty"`

	// "status" field predicates.
	Status       *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ    *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn  []typex.SimpleStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool                 `json:"statusIsNil,omitempty"`
	StatusNotNil bool                 `json:"statusNotNil,omitempty"`

	// "comments" field predicates.
	Comments             *string  `json:"comments,omitempty"`
	CommentsNEQ          *string  `json:"commentsNEQ,omitempty"`
	CommentsIn           []string `json:"commentsIn,omitempty"`
	CommentsNotIn        []string `json:"commentsNotIn,omitempty"`
	CommentsGT           *string  `json:"commentsGT,omitempty"`
	CommentsGTE          *string  `json:"commentsGTE,omitempty"`
	CommentsLT           *string  `json:"commentsLT,omitempty"`
	CommentsLTE          *string  `json:"commentsLTE,omitempty"`
	CommentsContains     *string  `json:"commentsContains,omitempty"`
	CommentsHasPrefix    *string  `json:"commentsHasPrefix,omitempty"`
	CommentsHasSuffix    *string  `json:"commentsHasSuffix,omitempty"`
	CommentsIsNil        bool     `json:"commentsIsNil,omitempty"`
	CommentsNotNil       bool     `json:"commentsNotNil,omitempty"`
	CommentsEqualFold    *string  `json:"commentsEqualFold,omitempty"`
	CommentsContainsFold *string  `json:"commentsContainsFold,omitempty"`
}

MsgChannelWhereInput represents a where input for filtering MsgChannel queries.

func (*MsgChannelWhereInput) AddPredicates

func (i *MsgChannelWhereInput) AddPredicates(predicates ...predicate.MsgChannel)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*MsgChannelWhereInput) Filter

Filter applies the MsgChannelWhereInput filter on the MsgChannelQuery builder.

func (*MsgChannelWhereInput) P

P returns a predicate for filtering msgchannels. An error is returned if the input is empty or invalid.

type MsgChannels

type MsgChannels []*MsgChannel

MsgChannels is a parsable slice of MsgChannel.

type MsgEvent

type MsgEvent struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 消息类型ID
	MsgTypeID int `json:"msg_type_id,omitempty"`
	// 消息事件名称,应用内唯一
	Name string `json:"name,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// 消息路由配置
	Route *profile.Route `json:"route,omitempty"`
	// 根据route配置对应的以,分隔的mode列表
	Modes string `json:"modes,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MsgEventQuery when eager-loading is set.
	Edges MsgEventEdges `json:"edges"`
	// contains filtered or unexported fields
}

MsgEvent is the model entity for the MsgEvent schema.

func (*MsgEvent) CustomerTemplate

func (me *MsgEvent) CustomerTemplate(ctx context.Context) (result []*MsgTemplate, err error)

func (*MsgEvent) GlobalID

func (me *MsgEvent) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given MsgEvent node.

func (*MsgEvent) IsNode

func (*MsgEvent) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*MsgEvent) MsgType

func (me *MsgEvent) MsgType(ctx context.Context) (*MsgType, error)

func (*MsgEvent) NamedCustomerTemplate

func (me *MsgEvent) NamedCustomerTemplate(name string) ([]*MsgTemplate, error)

NamedCustomerTemplate returns the CustomerTemplate named value or an error if the edge was not loaded in eager-loading with this name.

func (*MsgEvent) QueryCustomerTemplate

func (me *MsgEvent) QueryCustomerTemplate() *MsgTemplateQuery

QueryCustomerTemplate queries the "customer_template" edge of the MsgEvent entity.

func (*MsgEvent) QueryMsgType

func (me *MsgEvent) QueryMsgType() *MsgTypeQuery

QueryMsgType queries the "msg_type" edge of the MsgEvent entity.

func (*MsgEvent) String

func (me *MsgEvent) String() string

String implements the fmt.Stringer.

func (*MsgEvent) ToEdge

func (me *MsgEvent) ToEdge(order *MsgEventOrder) *MsgEventEdge

ToEdge converts MsgEvent into MsgEventEdge.

func (*MsgEvent) Unwrap

func (me *MsgEvent) Unwrap() *MsgEvent

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

func (me *MsgEvent) Update() *MsgEventUpdateOne

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

func (*MsgEvent) Value

func (me *MsgEvent) Value(name string) (ent.Value, error)

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

type MsgEventClient

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

MsgEventClient is a client for the MsgEvent schema.

func NewMsgEventClient

func NewMsgEventClient(c config) *MsgEventClient

NewMsgEventClient returns a client for the MsgEvent from the given config.

func (*MsgEventClient) Create

func (c *MsgEventClient) Create() *MsgEventCreate

Create returns a builder for creating a MsgEvent entity.

func (*MsgEventClient) CreateBulk

func (c *MsgEventClient) CreateBulk(builders ...*MsgEventCreate) *MsgEventCreateBulk

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

func (*MsgEventClient) Delete

func (c *MsgEventClient) Delete() *MsgEventDelete

Delete returns a delete builder for MsgEvent.

func (*MsgEventClient) DeleteOne

func (c *MsgEventClient) DeleteOne(me *MsgEvent) *MsgEventDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MsgEventClient) DeleteOneID

func (c *MsgEventClient) DeleteOneID(id int) *MsgEventDeleteOne

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

func (*MsgEventClient) Get

func (c *MsgEventClient) Get(ctx context.Context, id int) (*MsgEvent, error)

Get returns a MsgEvent entity by its id.

func (*MsgEventClient) GetX

func (c *MsgEventClient) GetX(ctx context.Context, id int) *MsgEvent

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

func (*MsgEventClient) Hooks

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

Hooks returns the client hooks.

func (*MsgEventClient) Intercept

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

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

func (*MsgEventClient) Interceptors

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

Interceptors returns the client interceptors.

func (*MsgEventClient) MapCreateBulk

func (c *MsgEventClient) MapCreateBulk(slice any, setFunc func(*MsgEventCreate, int)) *MsgEventCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MsgEventClient) Query

func (c *MsgEventClient) Query() *MsgEventQuery

Query returns a query builder for MsgEvent.

func (*MsgEventClient) QueryCustomerTemplate

func (c *MsgEventClient) QueryCustomerTemplate(me *MsgEvent) *MsgTemplateQuery

QueryCustomerTemplate queries the customer_template edge of a MsgEvent.

func (*MsgEventClient) QueryMsgType

func (c *MsgEventClient) QueryMsgType(me *MsgEvent) *MsgTypeQuery

QueryMsgType queries the msg_type edge of a MsgEvent.

func (*MsgEventClient) Update

func (c *MsgEventClient) Update() *MsgEventUpdate

Update returns an update builder for MsgEvent.

func (*MsgEventClient) UpdateOne

func (c *MsgEventClient) UpdateOne(me *MsgEvent) *MsgEventUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MsgEventClient) UpdateOneID

func (c *MsgEventClient) UpdateOneID(id int) *MsgEventUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MsgEventClient) Use

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

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

type MsgEventConnection

type MsgEventConnection struct {
	Edges      []*MsgEventEdge `json:"edges"`
	PageInfo   PageInfo        `json:"pageInfo"`
	TotalCount int             `json:"totalCount"`
}

MsgEventConnection is the connection containing edges to MsgEvent.

type MsgEventCreate

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

MsgEventCreate is the builder for creating a MsgEvent entity.

func (*MsgEventCreate) AddCustomerTemplate

func (mec *MsgEventCreate) AddCustomerTemplate(m ...*MsgTemplate) *MsgEventCreate

AddCustomerTemplate adds the "customer_template" edges to the MsgTemplate entity.

func (*MsgEventCreate) AddCustomerTemplateIDs

func (mec *MsgEventCreate) AddCustomerTemplateIDs(ids ...int) *MsgEventCreate

AddCustomerTemplateIDs adds the "customer_template" edge to the MsgTemplate entity by IDs.

func (*MsgEventCreate) Exec

func (mec *MsgEventCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgEventCreate) ExecX

func (mec *MsgEventCreate) ExecX(ctx context.Context)

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

func (*MsgEventCreate) Mutation

func (mec *MsgEventCreate) Mutation() *MsgEventMutation

Mutation returns the MsgEventMutation object of the builder.

func (*MsgEventCreate) OnConflict

func (mec *MsgEventCreate) OnConflict(opts ...sql.ConflictOption) *MsgEventUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgEvent.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgEventUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*MsgEventCreate) OnConflictColumns

func (mec *MsgEventCreate) OnConflictColumns(columns ...string) *MsgEventUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgEvent.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgEventCreate) Save

func (mec *MsgEventCreate) Save(ctx context.Context) (*MsgEvent, error)

Save creates the MsgEvent in the database.

func (*MsgEventCreate) SaveX

func (mec *MsgEventCreate) SaveX(ctx context.Context) *MsgEvent

SaveX calls Save and panics if Save returns an error.

func (*MsgEventCreate) SetComments

func (mec *MsgEventCreate) SetComments(s string) *MsgEventCreate

SetComments sets the "comments" field.

func (*MsgEventCreate) SetCreatedAt

func (mec *MsgEventCreate) SetCreatedAt(t time.Time) *MsgEventCreate

SetCreatedAt sets the "created_at" field.

func (*MsgEventCreate) SetCreatedBy

func (mec *MsgEventCreate) SetCreatedBy(i int) *MsgEventCreate

SetCreatedBy sets the "created_by" field.

func (*MsgEventCreate) SetID

func (mec *MsgEventCreate) SetID(i int) *MsgEventCreate

SetID sets the "id" field.

func (*MsgEventCreate) SetInput

SetInput applies the change-set in the CreateMsgEventInput on the MsgEventCreate builder.

func (*MsgEventCreate) SetModes

func (mec *MsgEventCreate) SetModes(s string) *MsgEventCreate

SetModes sets the "modes" field.

func (*MsgEventCreate) SetMsgType

func (mec *MsgEventCreate) SetMsgType(m *MsgType) *MsgEventCreate

SetMsgType sets the "msg_type" edge to the MsgType entity.

func (*MsgEventCreate) SetMsgTypeID

func (mec *MsgEventCreate) SetMsgTypeID(i int) *MsgEventCreate

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgEventCreate) SetName

func (mec *MsgEventCreate) SetName(s string) *MsgEventCreate

SetName sets the "name" field.

func (*MsgEventCreate) SetNillableComments

func (mec *MsgEventCreate) SetNillableComments(s *string) *MsgEventCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*MsgEventCreate) SetNillableCreatedAt

func (mec *MsgEventCreate) SetNillableCreatedAt(t *time.Time) *MsgEventCreate

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

func (*MsgEventCreate) SetNillableStatus

func (mec *MsgEventCreate) SetNillableStatus(ts *typex.SimpleStatus) *MsgEventCreate

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

func (*MsgEventCreate) SetNillableUpdatedAt

func (mec *MsgEventCreate) SetNillableUpdatedAt(t *time.Time) *MsgEventCreate

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

func (*MsgEventCreate) SetNillableUpdatedBy

func (mec *MsgEventCreate) SetNillableUpdatedBy(i *int) *MsgEventCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgEventCreate) SetRoute

func (mec *MsgEventCreate) SetRoute(pr *profile.Route) *MsgEventCreate

SetRoute sets the "route" field.

func (*MsgEventCreate) SetStatus

func (mec *MsgEventCreate) SetStatus(ts typex.SimpleStatus) *MsgEventCreate

SetStatus sets the "status" field.

func (*MsgEventCreate) SetUpdatedAt

func (mec *MsgEventCreate) SetUpdatedAt(t time.Time) *MsgEventCreate

SetUpdatedAt sets the "updated_at" field.

func (*MsgEventCreate) SetUpdatedBy

func (mec *MsgEventCreate) SetUpdatedBy(i int) *MsgEventCreate

SetUpdatedBy sets the "updated_by" field.

type MsgEventCreateBulk

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

MsgEventCreateBulk is the builder for creating many MsgEvent entities in bulk.

func (*MsgEventCreateBulk) Exec

func (mecb *MsgEventCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgEventCreateBulk) ExecX

func (mecb *MsgEventCreateBulk) ExecX(ctx context.Context)

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

func (*MsgEventCreateBulk) OnConflict

func (mecb *MsgEventCreateBulk) OnConflict(opts ...sql.ConflictOption) *MsgEventUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgEvent.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgEventUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*MsgEventCreateBulk) OnConflictColumns

func (mecb *MsgEventCreateBulk) OnConflictColumns(columns ...string) *MsgEventUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgEvent.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgEventCreateBulk) Save

func (mecb *MsgEventCreateBulk) Save(ctx context.Context) ([]*MsgEvent, error)

Save creates the MsgEvent entities in the database.

func (*MsgEventCreateBulk) SaveX

func (mecb *MsgEventCreateBulk) SaveX(ctx context.Context) []*MsgEvent

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

type MsgEventDelete

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

MsgEventDelete is the builder for deleting a MsgEvent entity.

func (*MsgEventDelete) Exec

func (med *MsgEventDelete) Exec(ctx context.Context) (int, error)

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

func (*MsgEventDelete) ExecX

func (med *MsgEventDelete) ExecX(ctx context.Context) int

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

func (*MsgEventDelete) Where

func (med *MsgEventDelete) Where(ps ...predicate.MsgEvent) *MsgEventDelete

Where appends a list predicates to the MsgEventDelete builder.

type MsgEventDeleteOne

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

MsgEventDeleteOne is the builder for deleting a single MsgEvent entity.

func (*MsgEventDeleteOne) Exec

func (medo *MsgEventDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MsgEventDeleteOne) ExecX

func (medo *MsgEventDeleteOne) ExecX(ctx context.Context)

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

func (*MsgEventDeleteOne) Where

Where appends a list predicates to the MsgEventDelete builder.

type MsgEventEdge

type MsgEventEdge struct {
	Node   *MsgEvent `json:"node"`
	Cursor Cursor    `json:"cursor"`
}

MsgEventEdge is the edge representation of MsgEvent.

type MsgEventEdges

type MsgEventEdges struct {
	// 消息类型
	MsgType *MsgType `json:"msg_type,omitempty"`
	// 自定义的消息模板
	CustomerTemplate []*MsgTemplate `json:"customer_template,omitempty"`
	// contains filtered or unexported fields
}

MsgEventEdges holds the relations/edges for other nodes in the graph.

func (MsgEventEdges) CustomerTemplateOrErr

func (e MsgEventEdges) CustomerTemplateOrErr() ([]*MsgTemplate, error)

CustomerTemplateOrErr returns the CustomerTemplate value or an error if the edge was not loaded in eager-loading.

func (MsgEventEdges) MsgTypeOrErr

func (e MsgEventEdges) MsgTypeOrErr() (*MsgType, error)

MsgTypeOrErr returns the MsgType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type MsgEventGroupBy

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

MsgEventGroupBy is the group-by builder for MsgEvent entities.

func (*MsgEventGroupBy) Aggregate

func (megb *MsgEventGroupBy) Aggregate(fns ...AggregateFunc) *MsgEventGroupBy

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

func (*MsgEventGroupBy) Bool

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

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

func (*MsgEventGroupBy) BoolX

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

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

func (*MsgEventGroupBy) Bools

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

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

func (*MsgEventGroupBy) BoolsX

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

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

func (*MsgEventGroupBy) Float64

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

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

func (*MsgEventGroupBy) Float64X

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

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

func (*MsgEventGroupBy) Float64s

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

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

func (*MsgEventGroupBy) Float64sX

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

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

func (*MsgEventGroupBy) Int

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

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

func (*MsgEventGroupBy) IntX

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

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

func (*MsgEventGroupBy) Ints

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

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

func (*MsgEventGroupBy) IntsX

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

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

func (*MsgEventGroupBy) Scan

func (megb *MsgEventGroupBy) Scan(ctx context.Context, v any) error

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

func (*MsgEventGroupBy) ScanX

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

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

func (*MsgEventGroupBy) String

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

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

func (*MsgEventGroupBy) StringX

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

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

func (*MsgEventGroupBy) Strings

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

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

func (*MsgEventGroupBy) StringsX

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

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

type MsgEventMutation

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

MsgEventMutation represents an operation that mutates the MsgEvent nodes in the graph.

func (*MsgEventMutation) AddCreatedBy

func (m *MsgEventMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*MsgEventMutation) AddCustomerTemplateIDs

func (m *MsgEventMutation) AddCustomerTemplateIDs(ids ...int)

AddCustomerTemplateIDs adds the "customer_template" edge to the MsgTemplate entity by ids.

func (*MsgEventMutation) AddField

func (m *MsgEventMutation) 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 (*MsgEventMutation) AddUpdatedBy

func (m *MsgEventMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgEventMutation) AddedCreatedBy

func (m *MsgEventMutation) AddedCreatedBy() (r int, exists bool)

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

func (*MsgEventMutation) AddedEdges

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

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

func (*MsgEventMutation) AddedField

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

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

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

func (*MsgEventMutation) AddedIDs

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

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

func (*MsgEventMutation) AddedUpdatedBy

func (m *MsgEventMutation) AddedUpdatedBy() (r int, exists bool)

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

func (*MsgEventMutation) ClearComments

func (m *MsgEventMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*MsgEventMutation) ClearCustomerTemplate

func (m *MsgEventMutation) ClearCustomerTemplate()

ClearCustomerTemplate clears the "customer_template" edge to the MsgTemplate entity.

func (*MsgEventMutation) ClearEdge

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

func (m *MsgEventMutation) 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 (*MsgEventMutation) ClearMsgType

func (m *MsgEventMutation) ClearMsgType()

ClearMsgType clears the "msg_type" edge to the MsgType entity.

func (*MsgEventMutation) ClearRoute

func (m *MsgEventMutation) ClearRoute()

ClearRoute clears the value of the "route" field.

func (*MsgEventMutation) ClearStatus

func (m *MsgEventMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*MsgEventMutation) ClearUpdatedAt

func (m *MsgEventMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgEventMutation) ClearUpdatedBy

func (m *MsgEventMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgEventMutation) ClearedEdges

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

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

func (*MsgEventMutation) ClearedFields

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

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

func (MsgEventMutation) Client

func (m MsgEventMutation) 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 (*MsgEventMutation) Comments

func (m *MsgEventMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*MsgEventMutation) CommentsCleared

func (m *MsgEventMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*MsgEventMutation) CreatedAt

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

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

func (*MsgEventMutation) CreatedBy

func (m *MsgEventMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*MsgEventMutation) CustomerTemplateCleared

func (m *MsgEventMutation) CustomerTemplateCleared() bool

CustomerTemplateCleared reports if the "customer_template" edge to the MsgTemplate entity was cleared.

func (*MsgEventMutation) CustomerTemplateIDs

func (m *MsgEventMutation) CustomerTemplateIDs() (ids []int)

CustomerTemplateIDs returns the "customer_template" edge IDs in the mutation.

func (*MsgEventMutation) EdgeCleared

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

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

func (*MsgEventMutation) Field

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

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

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

func (*MsgEventMutation) Fields

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

func (m *MsgEventMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*MsgEventMutation) IDs

func (m *MsgEventMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*MsgEventMutation) Modes

func (m *MsgEventMutation) Modes() (r string, exists bool)

Modes returns the value of the "modes" field in the mutation.

func (*MsgEventMutation) MsgTypeCleared

func (m *MsgEventMutation) MsgTypeCleared() bool

MsgTypeCleared reports if the "msg_type" edge to the MsgType entity was cleared.

func (*MsgEventMutation) MsgTypeID

func (m *MsgEventMutation) MsgTypeID() (r int, exists bool)

MsgTypeID returns the value of the "msg_type_id" field in the mutation.

func (*MsgEventMutation) MsgTypeIDs

func (m *MsgEventMutation) MsgTypeIDs() (ids []int)

MsgTypeIDs returns the "msg_type" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MsgTypeID instead. It exists only for internal usage by the builders.

func (*MsgEventMutation) Name

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

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

func (*MsgEventMutation) OldComments

func (m *MsgEventMutation) OldComments(ctx context.Context) (v string, err error)

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

func (*MsgEventMutation) OldCreatedAt

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

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

func (*MsgEventMutation) OldCreatedBy

func (m *MsgEventMutation) OldCreatedBy(ctx context.Context) (v int, err error)

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

func (*MsgEventMutation) OldField

func (m *MsgEventMutation) 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 (*MsgEventMutation) OldModes

func (m *MsgEventMutation) OldModes(ctx context.Context) (v string, err error)

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

func (*MsgEventMutation) OldMsgTypeID

func (m *MsgEventMutation) OldMsgTypeID(ctx context.Context) (v int, err error)

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

func (*MsgEventMutation) OldName

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

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

func (*MsgEventMutation) OldRoute

func (m *MsgEventMutation) OldRoute(ctx context.Context) (v *profile.Route, err error)

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

func (*MsgEventMutation) OldStatus

func (m *MsgEventMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

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

func (*MsgEventMutation) OldUpdatedAt

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

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

func (*MsgEventMutation) OldUpdatedBy

func (m *MsgEventMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

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

func (*MsgEventMutation) Op

func (m *MsgEventMutation) Op() Op

Op returns the operation name.

func (*MsgEventMutation) RemoveCustomerTemplateIDs

func (m *MsgEventMutation) RemoveCustomerTemplateIDs(ids ...int)

RemoveCustomerTemplateIDs removes the "customer_template" edge to the MsgTemplate entity by IDs.

func (*MsgEventMutation) RemovedCustomerTemplateIDs

func (m *MsgEventMutation) RemovedCustomerTemplateIDs() (ids []int)

RemovedCustomerTemplate returns the removed IDs of the "customer_template" edge to the MsgTemplate entity.

func (*MsgEventMutation) RemovedEdges

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

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

func (*MsgEventMutation) RemovedIDs

func (m *MsgEventMutation) 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 (*MsgEventMutation) ResetComments

func (m *MsgEventMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*MsgEventMutation) ResetCreatedAt

func (m *MsgEventMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*MsgEventMutation) ResetCreatedBy

func (m *MsgEventMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*MsgEventMutation) ResetCustomerTemplate

func (m *MsgEventMutation) ResetCustomerTemplate()

ResetCustomerTemplate resets all changes to the "customer_template" edge.

func (*MsgEventMutation) ResetEdge

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

func (m *MsgEventMutation) 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 (*MsgEventMutation) ResetModes

func (m *MsgEventMutation) ResetModes()

ResetModes resets all changes to the "modes" field.

func (*MsgEventMutation) ResetMsgType

func (m *MsgEventMutation) ResetMsgType()

ResetMsgType resets all changes to the "msg_type" edge.

func (*MsgEventMutation) ResetMsgTypeID

func (m *MsgEventMutation) ResetMsgTypeID()

ResetMsgTypeID resets all changes to the "msg_type_id" field.

func (*MsgEventMutation) ResetName

func (m *MsgEventMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*MsgEventMutation) ResetRoute

func (m *MsgEventMutation) ResetRoute()

ResetRoute resets all changes to the "route" field.

func (*MsgEventMutation) ResetStatus

func (m *MsgEventMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*MsgEventMutation) ResetUpdatedAt

func (m *MsgEventMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*MsgEventMutation) ResetUpdatedBy

func (m *MsgEventMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*MsgEventMutation) Route

func (m *MsgEventMutation) Route() (r *profile.Route, exists bool)

Route returns the value of the "route" field in the mutation.

func (*MsgEventMutation) RouteCleared

func (m *MsgEventMutation) RouteCleared() bool

RouteCleared returns if the "route" field was cleared in this mutation.

func (*MsgEventMutation) SetComments

func (m *MsgEventMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*MsgEventMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*MsgEventMutation) SetCreatedBy

func (m *MsgEventMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*MsgEventMutation) SetField

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

func (m *MsgEventMutation) SetID(id int)

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

func (*MsgEventMutation) SetModes

func (m *MsgEventMutation) SetModes(s string)

SetModes sets the "modes" field.

func (*MsgEventMutation) SetMsgTypeID

func (m *MsgEventMutation) SetMsgTypeID(i int)

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgEventMutation) SetName

func (m *MsgEventMutation) SetName(s string)

SetName sets the "name" field.

func (*MsgEventMutation) SetOp

func (m *MsgEventMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MsgEventMutation) SetRoute

func (m *MsgEventMutation) SetRoute(pr *profile.Route)

SetRoute sets the "route" field.

func (*MsgEventMutation) SetStatus

func (m *MsgEventMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*MsgEventMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*MsgEventMutation) SetUpdatedBy

func (m *MsgEventMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*MsgEventMutation) Status

func (m *MsgEventMutation) Status() (r typex.SimpleStatus, exists bool)

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

func (*MsgEventMutation) StatusCleared

func (m *MsgEventMutation) StatusCleared() bool

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

func (MsgEventMutation) Tx

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

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

func (*MsgEventMutation) Type

func (m *MsgEventMutation) Type() string

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

func (*MsgEventMutation) UpdatedAt

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

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

func (*MsgEventMutation) UpdatedAtCleared

func (m *MsgEventMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*MsgEventMutation) UpdatedBy

func (m *MsgEventMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*MsgEventMutation) UpdatedByCleared

func (m *MsgEventMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*MsgEventMutation) Where

func (m *MsgEventMutation) Where(ps ...predicate.MsgEvent)

Where appends a list predicates to the MsgEventMutation builder.

func (*MsgEventMutation) WhereP

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

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

type MsgEventOrder

type MsgEventOrder struct {
	Direction OrderDirection      `json:"direction"`
	Field     *MsgEventOrderField `json:"field"`
}

MsgEventOrder defines the ordering of MsgEvent.

type MsgEventOrderField

type MsgEventOrderField struct {
	// Value extracts the ordering value from the given MsgEvent.
	Value func(*MsgEvent) (ent.Value, error)
	// contains filtered or unexported fields
}

MsgEventOrderField defines the ordering field of MsgEvent.

func (MsgEventOrderField) MarshalGQL

func (f MsgEventOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (MsgEventOrderField) String

func (f MsgEventOrderField) String() string

String implement fmt.Stringer interface.

func (*MsgEventOrderField) UnmarshalGQL

func (f *MsgEventOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type MsgEventPaginateOption

type MsgEventPaginateOption func(*msgeventPager) error

MsgEventPaginateOption enables pagination customization.

func WithMsgEventFilter

func WithMsgEventFilter(filter func(*MsgEventQuery) (*MsgEventQuery, error)) MsgEventPaginateOption

WithMsgEventFilter configures pagination filter.

func WithMsgEventOrder

func WithMsgEventOrder(order *MsgEventOrder) MsgEventPaginateOption

WithMsgEventOrder configures pagination ordering.

type MsgEventQuery

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

MsgEventQuery is the builder for querying MsgEvent entities.

func (*MsgEventQuery) Aggregate

func (meq *MsgEventQuery) Aggregate(fns ...AggregateFunc) *MsgEventSelect

Aggregate returns a MsgEventSelect configured with the given aggregations.

func (*MsgEventQuery) All

func (meq *MsgEventQuery) All(ctx context.Context) ([]*MsgEvent, error)

All executes the query and returns a list of MsgEvents.

func (*MsgEventQuery) AllX

func (meq *MsgEventQuery) AllX(ctx context.Context) []*MsgEvent

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

func (*MsgEventQuery) Clone

func (meq *MsgEventQuery) Clone() *MsgEventQuery

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

func (*MsgEventQuery) CollectFields

func (me *MsgEventQuery) CollectFields(ctx context.Context, satisfies ...string) (*MsgEventQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*MsgEventQuery) Count

func (meq *MsgEventQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MsgEventQuery) CountX

func (meq *MsgEventQuery) CountX(ctx context.Context) int

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

func (*MsgEventQuery) Exist

func (meq *MsgEventQuery) Exist(ctx context.Context) (bool, error)

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

func (*MsgEventQuery) ExistX

func (meq *MsgEventQuery) ExistX(ctx context.Context) bool

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

func (*MsgEventQuery) First

func (meq *MsgEventQuery) First(ctx context.Context) (*MsgEvent, error)

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

func (*MsgEventQuery) FirstID

func (meq *MsgEventQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*MsgEventQuery) FirstIDX

func (meq *MsgEventQuery) FirstIDX(ctx context.Context) int

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

func (*MsgEventQuery) FirstX

func (meq *MsgEventQuery) FirstX(ctx context.Context) *MsgEvent

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

func (*MsgEventQuery) GroupBy

func (meq *MsgEventQuery) GroupBy(field string, fields ...string) *MsgEventGroupBy

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 {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MsgEvent.Query().
	GroupBy(msgevent.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MsgEventQuery) IDs

func (meq *MsgEventQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*MsgEventQuery) IDsX

func (meq *MsgEventQuery) IDsX(ctx context.Context) []int

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

func (*MsgEventQuery) Limit

func (meq *MsgEventQuery) Limit(limit int) *MsgEventQuery

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

func (*MsgEventQuery) Offset

func (meq *MsgEventQuery) Offset(offset int) *MsgEventQuery

Offset to start from.

func (*MsgEventQuery) Only

func (meq *MsgEventQuery) Only(ctx context.Context) (*MsgEvent, error)

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

func (*MsgEventQuery) OnlyID

func (meq *MsgEventQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*MsgEventQuery) OnlyIDX

func (meq *MsgEventQuery) OnlyIDX(ctx context.Context) int

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

func (*MsgEventQuery) OnlyX

func (meq *MsgEventQuery) OnlyX(ctx context.Context) *MsgEvent

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

func (*MsgEventQuery) Order

func (meq *MsgEventQuery) Order(o ...msgevent.OrderOption) *MsgEventQuery

Order specifies how the records should be ordered.

func (*MsgEventQuery) Paginate

func (me *MsgEventQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...MsgEventPaginateOption,
) (*MsgEventConnection, error)

Paginate executes the query and returns a relay based cursor connection to MsgEvent.

func (*MsgEventQuery) QueryCustomerTemplate

func (meq *MsgEventQuery) QueryCustomerTemplate() *MsgTemplateQuery

QueryCustomerTemplate chains the current query on the "customer_template" edge.

func (*MsgEventQuery) QueryMsgType

func (meq *MsgEventQuery) QueryMsgType() *MsgTypeQuery

QueryMsgType chains the current query on the "msg_type" edge.

func (*MsgEventQuery) Select

func (meq *MsgEventQuery) Select(fields ...string) *MsgEventSelect

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 {
	CreatedBy int `json:"created_by,omitempty"`
}

client.MsgEvent.Query().
	Select(msgevent.FieldCreatedBy).
	Scan(ctx, &v)

func (*MsgEventQuery) Unique

func (meq *MsgEventQuery) Unique(unique bool) *MsgEventQuery

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

func (meq *MsgEventQuery) Where(ps ...predicate.MsgEvent) *MsgEventQuery

Where adds a new predicate for the MsgEventQuery builder.

func (*MsgEventQuery) WithCustomerTemplate

func (meq *MsgEventQuery) WithCustomerTemplate(opts ...func(*MsgTemplateQuery)) *MsgEventQuery

WithCustomerTemplate tells the query-builder to eager-load the nodes that are connected to the "customer_template" edge. The optional arguments are used to configure the query builder of the edge.

func (*MsgEventQuery) WithMsgType

func (meq *MsgEventQuery) WithMsgType(opts ...func(*MsgTypeQuery)) *MsgEventQuery

WithMsgType tells the query-builder to eager-load the nodes that are connected to the "msg_type" edge. The optional arguments are used to configure the query builder of the edge.

func (*MsgEventQuery) WithNamedCustomerTemplate

func (meq *MsgEventQuery) WithNamedCustomerTemplate(name string, opts ...func(*MsgTemplateQuery)) *MsgEventQuery

WithNamedCustomerTemplate tells the query-builder to eager-load the nodes that are connected to the "customer_template" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type MsgEventSelect

type MsgEventSelect struct {
	*MsgEventQuery
	// contains filtered or unexported fields
}

MsgEventSelect is the builder for selecting fields of MsgEvent entities.

func (*MsgEventSelect) Aggregate

func (mes *MsgEventSelect) Aggregate(fns ...AggregateFunc) *MsgEventSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MsgEventSelect) Bool

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

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

func (*MsgEventSelect) BoolX

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

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

func (*MsgEventSelect) Bools

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

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

func (*MsgEventSelect) BoolsX

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

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

func (*MsgEventSelect) Float64

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

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

func (*MsgEventSelect) Float64X

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

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

func (*MsgEventSelect) Float64s

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

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

func (*MsgEventSelect) Float64sX

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

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

func (*MsgEventSelect) Int

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

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

func (*MsgEventSelect) IntX

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

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

func (*MsgEventSelect) Ints

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

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

func (*MsgEventSelect) IntsX

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

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

func (*MsgEventSelect) Scan

func (mes *MsgEventSelect) Scan(ctx context.Context, v any) error

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

func (*MsgEventSelect) ScanX

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

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

func (*MsgEventSelect) String

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

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

func (*MsgEventSelect) StringX

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

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

func (*MsgEventSelect) Strings

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

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

func (*MsgEventSelect) StringsX

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

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

type MsgEventUpdate

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

MsgEventUpdate is the builder for updating MsgEvent entities.

func (*MsgEventUpdate) AddCustomerTemplate

func (meu *MsgEventUpdate) AddCustomerTemplate(m ...*MsgTemplate) *MsgEventUpdate

AddCustomerTemplate adds the "customer_template" edges to the MsgTemplate entity.

func (*MsgEventUpdate) AddCustomerTemplateIDs

func (meu *MsgEventUpdate) AddCustomerTemplateIDs(ids ...int) *MsgEventUpdate

AddCustomerTemplateIDs adds the "customer_template" edge to the MsgTemplate entity by IDs.

func (*MsgEventUpdate) AddUpdatedBy

func (meu *MsgEventUpdate) AddUpdatedBy(i int) *MsgEventUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgEventUpdate) ClearComments

func (meu *MsgEventUpdate) ClearComments() *MsgEventUpdate

ClearComments clears the value of the "comments" field.

func (*MsgEventUpdate) ClearCustomerTemplate

func (meu *MsgEventUpdate) ClearCustomerTemplate() *MsgEventUpdate

ClearCustomerTemplate clears all "customer_template" edges to the MsgTemplate entity.

func (*MsgEventUpdate) ClearMsgType

func (meu *MsgEventUpdate) ClearMsgType() *MsgEventUpdate

ClearMsgType clears the "msg_type" edge to the MsgType entity.

func (*MsgEventUpdate) ClearRoute

func (meu *MsgEventUpdate) ClearRoute() *MsgEventUpdate

ClearRoute clears the value of the "route" field.

func (*MsgEventUpdate) ClearStatus

func (meu *MsgEventUpdate) ClearStatus() *MsgEventUpdate

ClearStatus clears the value of the "status" field.

func (*MsgEventUpdate) ClearUpdatedAt

func (meu *MsgEventUpdate) ClearUpdatedAt() *MsgEventUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgEventUpdate) ClearUpdatedBy

func (meu *MsgEventUpdate) ClearUpdatedBy() *MsgEventUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgEventUpdate) Exec

func (meu *MsgEventUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgEventUpdate) ExecX

func (meu *MsgEventUpdate) ExecX(ctx context.Context)

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

func (*MsgEventUpdate) Mutation

func (meu *MsgEventUpdate) Mutation() *MsgEventMutation

Mutation returns the MsgEventMutation object of the builder.

func (*MsgEventUpdate) RemoveCustomerTemplate

func (meu *MsgEventUpdate) RemoveCustomerTemplate(m ...*MsgTemplate) *MsgEventUpdate

RemoveCustomerTemplate removes "customer_template" edges to MsgTemplate entities.

func (*MsgEventUpdate) RemoveCustomerTemplateIDs

func (meu *MsgEventUpdate) RemoveCustomerTemplateIDs(ids ...int) *MsgEventUpdate

RemoveCustomerTemplateIDs removes the "customer_template" edge to MsgTemplate entities by IDs.

func (*MsgEventUpdate) Save

func (meu *MsgEventUpdate) Save(ctx context.Context) (int, error)

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

func (*MsgEventUpdate) SaveX

func (meu *MsgEventUpdate) SaveX(ctx context.Context) int

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

func (*MsgEventUpdate) SetComments

func (meu *MsgEventUpdate) SetComments(s string) *MsgEventUpdate

SetComments sets the "comments" field.

func (*MsgEventUpdate) SetInput

SetInput applies the change-set in the UpdateMsgEventInput on the MsgEventUpdate builder.

func (*MsgEventUpdate) SetModes

func (meu *MsgEventUpdate) SetModes(s string) *MsgEventUpdate

SetModes sets the "modes" field.

func (*MsgEventUpdate) SetMsgType

func (meu *MsgEventUpdate) SetMsgType(m *MsgType) *MsgEventUpdate

SetMsgType sets the "msg_type" edge to the MsgType entity.

func (*MsgEventUpdate) SetMsgTypeID

func (meu *MsgEventUpdate) SetMsgTypeID(i int) *MsgEventUpdate

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgEventUpdate) SetName

func (meu *MsgEventUpdate) SetName(s string) *MsgEventUpdate

SetName sets the "name" field.

func (*MsgEventUpdate) SetNillableComments

func (meu *MsgEventUpdate) SetNillableComments(s *string) *MsgEventUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*MsgEventUpdate) SetNillableStatus

func (meu *MsgEventUpdate) SetNillableStatus(ts *typex.SimpleStatus) *MsgEventUpdate

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

func (*MsgEventUpdate) SetNillableUpdatedAt

func (meu *MsgEventUpdate) SetNillableUpdatedAt(t *time.Time) *MsgEventUpdate

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

func (*MsgEventUpdate) SetNillableUpdatedBy

func (meu *MsgEventUpdate) SetNillableUpdatedBy(i *int) *MsgEventUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgEventUpdate) SetRoute

func (meu *MsgEventUpdate) SetRoute(pr *profile.Route) *MsgEventUpdate

SetRoute sets the "route" field.

func (*MsgEventUpdate) SetStatus

func (meu *MsgEventUpdate) SetStatus(ts typex.SimpleStatus) *MsgEventUpdate

SetStatus sets the "status" field.

func (*MsgEventUpdate) SetUpdatedAt

func (meu *MsgEventUpdate) SetUpdatedAt(t time.Time) *MsgEventUpdate

SetUpdatedAt sets the "updated_at" field.

func (*MsgEventUpdate) SetUpdatedBy

func (meu *MsgEventUpdate) SetUpdatedBy(i int) *MsgEventUpdate

SetUpdatedBy sets the "updated_by" field.

func (*MsgEventUpdate) Where

func (meu *MsgEventUpdate) Where(ps ...predicate.MsgEvent) *MsgEventUpdate

Where appends a list predicates to the MsgEventUpdate builder.

type MsgEventUpdateOne

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

MsgEventUpdateOne is the builder for updating a single MsgEvent entity.

func (*MsgEventUpdateOne) AddCustomerTemplate

func (meuo *MsgEventUpdateOne) AddCustomerTemplate(m ...*MsgTemplate) *MsgEventUpdateOne

AddCustomerTemplate adds the "customer_template" edges to the MsgTemplate entity.

func (*MsgEventUpdateOne) AddCustomerTemplateIDs

func (meuo *MsgEventUpdateOne) AddCustomerTemplateIDs(ids ...int) *MsgEventUpdateOne

AddCustomerTemplateIDs adds the "customer_template" edge to the MsgTemplate entity by IDs.

func (*MsgEventUpdateOne) AddUpdatedBy

func (meuo *MsgEventUpdateOne) AddUpdatedBy(i int) *MsgEventUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgEventUpdateOne) ClearComments

func (meuo *MsgEventUpdateOne) ClearComments() *MsgEventUpdateOne

ClearComments clears the value of the "comments" field.

func (*MsgEventUpdateOne) ClearCustomerTemplate

func (meuo *MsgEventUpdateOne) ClearCustomerTemplate() *MsgEventUpdateOne

ClearCustomerTemplate clears all "customer_template" edges to the MsgTemplate entity.

func (*MsgEventUpdateOne) ClearMsgType

func (meuo *MsgEventUpdateOne) ClearMsgType() *MsgEventUpdateOne

ClearMsgType clears the "msg_type" edge to the MsgType entity.

func (*MsgEventUpdateOne) ClearRoute

func (meuo *MsgEventUpdateOne) ClearRoute() *MsgEventUpdateOne

ClearRoute clears the value of the "route" field.

func (*MsgEventUpdateOne) ClearStatus

func (meuo *MsgEventUpdateOne) ClearStatus() *MsgEventUpdateOne

ClearStatus clears the value of the "status" field.

func (*MsgEventUpdateOne) ClearUpdatedAt

func (meuo *MsgEventUpdateOne) ClearUpdatedAt() *MsgEventUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgEventUpdateOne) ClearUpdatedBy

func (meuo *MsgEventUpdateOne) ClearUpdatedBy() *MsgEventUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgEventUpdateOne) Exec

func (meuo *MsgEventUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MsgEventUpdateOne) ExecX

func (meuo *MsgEventUpdateOne) ExecX(ctx context.Context)

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

func (*MsgEventUpdateOne) Mutation

func (meuo *MsgEventUpdateOne) Mutation() *MsgEventMutation

Mutation returns the MsgEventMutation object of the builder.

func (*MsgEventUpdateOne) RemoveCustomerTemplate

func (meuo *MsgEventUpdateOne) RemoveCustomerTemplate(m ...*MsgTemplate) *MsgEventUpdateOne

RemoveCustomerTemplate removes "customer_template" edges to MsgTemplate entities.

func (*MsgEventUpdateOne) RemoveCustomerTemplateIDs

func (meuo *MsgEventUpdateOne) RemoveCustomerTemplateIDs(ids ...int) *MsgEventUpdateOne

RemoveCustomerTemplateIDs removes the "customer_template" edge to MsgTemplate entities by IDs.

func (*MsgEventUpdateOne) Save

func (meuo *MsgEventUpdateOne) Save(ctx context.Context) (*MsgEvent, error)

Save executes the query and returns the updated MsgEvent entity.

func (*MsgEventUpdateOne) SaveX

func (meuo *MsgEventUpdateOne) SaveX(ctx context.Context) *MsgEvent

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

func (*MsgEventUpdateOne) Select

func (meuo *MsgEventUpdateOne) Select(field string, fields ...string) *MsgEventUpdateOne

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

func (*MsgEventUpdateOne) SetComments

func (meuo *MsgEventUpdateOne) SetComments(s string) *MsgEventUpdateOne

SetComments sets the "comments" field.

func (*MsgEventUpdateOne) SetInput

SetInput applies the change-set in the UpdateMsgEventInput on the MsgEventUpdateOne builder.

func (*MsgEventUpdateOne) SetModes

func (meuo *MsgEventUpdateOne) SetModes(s string) *MsgEventUpdateOne

SetModes sets the "modes" field.

func (*MsgEventUpdateOne) SetMsgType

func (meuo *MsgEventUpdateOne) SetMsgType(m *MsgType) *MsgEventUpdateOne

SetMsgType sets the "msg_type" edge to the MsgType entity.

func (*MsgEventUpdateOne) SetMsgTypeID

func (meuo *MsgEventUpdateOne) SetMsgTypeID(i int) *MsgEventUpdateOne

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgEventUpdateOne) SetName

func (meuo *MsgEventUpdateOne) SetName(s string) *MsgEventUpdateOne

SetName sets the "name" field.

func (*MsgEventUpdateOne) SetNillableComments

func (meuo *MsgEventUpdateOne) SetNillableComments(s *string) *MsgEventUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*MsgEventUpdateOne) SetNillableStatus

func (meuo *MsgEventUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *MsgEventUpdateOne

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

func (*MsgEventUpdateOne) SetNillableUpdatedAt

func (meuo *MsgEventUpdateOne) SetNillableUpdatedAt(t *time.Time) *MsgEventUpdateOne

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

func (*MsgEventUpdateOne) SetNillableUpdatedBy

func (meuo *MsgEventUpdateOne) SetNillableUpdatedBy(i *int) *MsgEventUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgEventUpdateOne) SetRoute

func (meuo *MsgEventUpdateOne) SetRoute(pr *profile.Route) *MsgEventUpdateOne

SetRoute sets the "route" field.

func (*MsgEventUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*MsgEventUpdateOne) SetUpdatedAt

func (meuo *MsgEventUpdateOne) SetUpdatedAt(t time.Time) *MsgEventUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*MsgEventUpdateOne) SetUpdatedBy

func (meuo *MsgEventUpdateOne) SetUpdatedBy(i int) *MsgEventUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*MsgEventUpdateOne) Where

Where appends a list predicates to the MsgEventUpdate builder.

type MsgEventUpsert

type MsgEventUpsert struct {
	*sql.UpdateSet
}

MsgEventUpsert is the "OnConflict" setter.

func (*MsgEventUpsert) AddUpdatedBy

func (u *MsgEventUpsert) AddUpdatedBy(v int) *MsgEventUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgEventUpsert) ClearComments

func (u *MsgEventUpsert) ClearComments() *MsgEventUpsert

ClearComments clears the value of the "comments" field.

func (*MsgEventUpsert) ClearRoute

func (u *MsgEventUpsert) ClearRoute() *MsgEventUpsert

ClearRoute clears the value of the "route" field.

func (*MsgEventUpsert) ClearStatus

func (u *MsgEventUpsert) ClearStatus() *MsgEventUpsert

ClearStatus clears the value of the "status" field.

func (*MsgEventUpsert) ClearUpdatedAt

func (u *MsgEventUpsert) ClearUpdatedAt() *MsgEventUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgEventUpsert) ClearUpdatedBy

func (u *MsgEventUpsert) ClearUpdatedBy() *MsgEventUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgEventUpsert) SetComments

func (u *MsgEventUpsert) SetComments(v string) *MsgEventUpsert

SetComments sets the "comments" field.

func (*MsgEventUpsert) SetModes

func (u *MsgEventUpsert) SetModes(v string) *MsgEventUpsert

SetModes sets the "modes" field.

func (*MsgEventUpsert) SetMsgTypeID

func (u *MsgEventUpsert) SetMsgTypeID(v int) *MsgEventUpsert

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgEventUpsert) SetName

func (u *MsgEventUpsert) SetName(v string) *MsgEventUpsert

SetName sets the "name" field.

func (*MsgEventUpsert) SetRoute

func (u *MsgEventUpsert) SetRoute(v *profile.Route) *MsgEventUpsert

SetRoute sets the "route" field.

func (*MsgEventUpsert) SetStatus

SetStatus sets the "status" field.

func (*MsgEventUpsert) SetUpdatedAt

func (u *MsgEventUpsert) SetUpdatedAt(v time.Time) *MsgEventUpsert

SetUpdatedAt sets the "updated_at" field.

func (*MsgEventUpsert) SetUpdatedBy

func (u *MsgEventUpsert) SetUpdatedBy(v int) *MsgEventUpsert

SetUpdatedBy sets the "updated_by" field.

func (*MsgEventUpsert) UpdateComments

func (u *MsgEventUpsert) UpdateComments() *MsgEventUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*MsgEventUpsert) UpdateModes

func (u *MsgEventUpsert) UpdateModes() *MsgEventUpsert

UpdateModes sets the "modes" field to the value that was provided on create.

func (*MsgEventUpsert) UpdateMsgTypeID

func (u *MsgEventUpsert) UpdateMsgTypeID() *MsgEventUpsert

UpdateMsgTypeID sets the "msg_type_id" field to the value that was provided on create.

func (*MsgEventUpsert) UpdateName

func (u *MsgEventUpsert) UpdateName() *MsgEventUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*MsgEventUpsert) UpdateRoute

func (u *MsgEventUpsert) UpdateRoute() *MsgEventUpsert

UpdateRoute sets the "route" field to the value that was provided on create.

func (*MsgEventUpsert) UpdateStatus

func (u *MsgEventUpsert) UpdateStatus() *MsgEventUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*MsgEventUpsert) UpdateUpdatedAt

func (u *MsgEventUpsert) UpdateUpdatedAt() *MsgEventUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgEventUpsert) UpdateUpdatedBy

func (u *MsgEventUpsert) UpdateUpdatedBy() *MsgEventUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgEventUpsertBulk

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

MsgEventUpsertBulk is the builder for "upsert"-ing a bulk of MsgEvent nodes.

func (*MsgEventUpsertBulk) AddUpdatedBy

func (u *MsgEventUpsertBulk) AddUpdatedBy(v int) *MsgEventUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgEventUpsertBulk) ClearComments

func (u *MsgEventUpsertBulk) ClearComments() *MsgEventUpsertBulk

ClearComments clears the value of the "comments" field.

func (*MsgEventUpsertBulk) ClearRoute

func (u *MsgEventUpsertBulk) ClearRoute() *MsgEventUpsertBulk

ClearRoute clears the value of the "route" field.

func (*MsgEventUpsertBulk) ClearStatus

func (u *MsgEventUpsertBulk) ClearStatus() *MsgEventUpsertBulk

ClearStatus clears the value of the "status" field.

func (*MsgEventUpsertBulk) ClearUpdatedAt

func (u *MsgEventUpsertBulk) ClearUpdatedAt() *MsgEventUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgEventUpsertBulk) ClearUpdatedBy

func (u *MsgEventUpsertBulk) ClearUpdatedBy() *MsgEventUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgEventUpsertBulk) DoNothing

func (u *MsgEventUpsertBulk) DoNothing() *MsgEventUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgEventUpsertBulk) Exec

func (u *MsgEventUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgEventUpsertBulk) ExecX

func (u *MsgEventUpsertBulk) ExecX(ctx context.Context)

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

func (*MsgEventUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgEvent.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*MsgEventUpsertBulk) SetComments

func (u *MsgEventUpsertBulk) SetComments(v string) *MsgEventUpsertBulk

SetComments sets the "comments" field.

func (*MsgEventUpsertBulk) SetModes

SetModes sets the "modes" field.

func (*MsgEventUpsertBulk) SetMsgTypeID

func (u *MsgEventUpsertBulk) SetMsgTypeID(v int) *MsgEventUpsertBulk

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgEventUpsertBulk) SetName

SetName sets the "name" field.

func (*MsgEventUpsertBulk) SetRoute

SetRoute sets the "route" field.

func (*MsgEventUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*MsgEventUpsertBulk) SetUpdatedAt

func (u *MsgEventUpsertBulk) SetUpdatedAt(v time.Time) *MsgEventUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*MsgEventUpsertBulk) SetUpdatedBy

func (u *MsgEventUpsertBulk) SetUpdatedBy(v int) *MsgEventUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*MsgEventUpsertBulk) Update

func (u *MsgEventUpsertBulk) Update(set func(*MsgEventUpsert)) *MsgEventUpsertBulk

Update allows overriding fields `UPDATE` values. See the MsgEventCreateBulk.OnConflict documentation for more info.

func (*MsgEventUpsertBulk) UpdateComments

func (u *MsgEventUpsertBulk) UpdateComments() *MsgEventUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*MsgEventUpsertBulk) UpdateModes

func (u *MsgEventUpsertBulk) UpdateModes() *MsgEventUpsertBulk

UpdateModes sets the "modes" field to the value that was provided on create.

func (*MsgEventUpsertBulk) UpdateMsgTypeID

func (u *MsgEventUpsertBulk) UpdateMsgTypeID() *MsgEventUpsertBulk

UpdateMsgTypeID sets the "msg_type_id" field to the value that was provided on create.

func (*MsgEventUpsertBulk) UpdateName

func (u *MsgEventUpsertBulk) UpdateName() *MsgEventUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*MsgEventUpsertBulk) UpdateNewValues

func (u *MsgEventUpsertBulk) UpdateNewValues() *MsgEventUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.MsgEvent.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msgevent.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgEventUpsertBulk) UpdateRoute

func (u *MsgEventUpsertBulk) UpdateRoute() *MsgEventUpsertBulk

UpdateRoute sets the "route" field to the value that was provided on create.

func (*MsgEventUpsertBulk) UpdateStatus

func (u *MsgEventUpsertBulk) UpdateStatus() *MsgEventUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*MsgEventUpsertBulk) UpdateUpdatedAt

func (u *MsgEventUpsertBulk) UpdateUpdatedAt() *MsgEventUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgEventUpsertBulk) UpdateUpdatedBy

func (u *MsgEventUpsertBulk) UpdateUpdatedBy() *MsgEventUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgEventUpsertOne

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

MsgEventUpsertOne is the builder for "upsert"-ing

one MsgEvent node.

func (*MsgEventUpsertOne) AddUpdatedBy

func (u *MsgEventUpsertOne) AddUpdatedBy(v int) *MsgEventUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgEventUpsertOne) ClearComments

func (u *MsgEventUpsertOne) ClearComments() *MsgEventUpsertOne

ClearComments clears the value of the "comments" field.

func (*MsgEventUpsertOne) ClearRoute

func (u *MsgEventUpsertOne) ClearRoute() *MsgEventUpsertOne

ClearRoute clears the value of the "route" field.

func (*MsgEventUpsertOne) ClearStatus

func (u *MsgEventUpsertOne) ClearStatus() *MsgEventUpsertOne

ClearStatus clears the value of the "status" field.

func (*MsgEventUpsertOne) ClearUpdatedAt

func (u *MsgEventUpsertOne) ClearUpdatedAt() *MsgEventUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgEventUpsertOne) ClearUpdatedBy

func (u *MsgEventUpsertOne) ClearUpdatedBy() *MsgEventUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgEventUpsertOne) DoNothing

func (u *MsgEventUpsertOne) DoNothing() *MsgEventUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgEventUpsertOne) Exec

func (u *MsgEventUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgEventUpsertOne) ExecX

func (u *MsgEventUpsertOne) ExecX(ctx context.Context)

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

func (*MsgEventUpsertOne) ID

func (u *MsgEventUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*MsgEventUpsertOne) IDX

func (u *MsgEventUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*MsgEventUpsertOne) Ignore

func (u *MsgEventUpsertOne) Ignore() *MsgEventUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgEvent.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*MsgEventUpsertOne) SetComments

func (u *MsgEventUpsertOne) SetComments(v string) *MsgEventUpsertOne

SetComments sets the "comments" field.

func (*MsgEventUpsertOne) SetModes

func (u *MsgEventUpsertOne) SetModes(v string) *MsgEventUpsertOne

SetModes sets the "modes" field.

func (*MsgEventUpsertOne) SetMsgTypeID

func (u *MsgEventUpsertOne) SetMsgTypeID(v int) *MsgEventUpsertOne

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgEventUpsertOne) SetName

SetName sets the "name" field.

func (*MsgEventUpsertOne) SetRoute

SetRoute sets the "route" field.

func (*MsgEventUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*MsgEventUpsertOne) SetUpdatedAt

func (u *MsgEventUpsertOne) SetUpdatedAt(v time.Time) *MsgEventUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*MsgEventUpsertOne) SetUpdatedBy

func (u *MsgEventUpsertOne) SetUpdatedBy(v int) *MsgEventUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*MsgEventUpsertOne) Update

func (u *MsgEventUpsertOne) Update(set func(*MsgEventUpsert)) *MsgEventUpsertOne

Update allows overriding fields `UPDATE` values. See the MsgEventCreate.OnConflict documentation for more info.

func (*MsgEventUpsertOne) UpdateComments

func (u *MsgEventUpsertOne) UpdateComments() *MsgEventUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*MsgEventUpsertOne) UpdateModes

func (u *MsgEventUpsertOne) UpdateModes() *MsgEventUpsertOne

UpdateModes sets the "modes" field to the value that was provided on create.

func (*MsgEventUpsertOne) UpdateMsgTypeID

func (u *MsgEventUpsertOne) UpdateMsgTypeID() *MsgEventUpsertOne

UpdateMsgTypeID sets the "msg_type_id" field to the value that was provided on create.

func (*MsgEventUpsertOne) UpdateName

func (u *MsgEventUpsertOne) UpdateName() *MsgEventUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*MsgEventUpsertOne) UpdateNewValues

func (u *MsgEventUpsertOne) UpdateNewValues() *MsgEventUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.MsgEvent.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msgevent.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgEventUpsertOne) UpdateRoute

func (u *MsgEventUpsertOne) UpdateRoute() *MsgEventUpsertOne

UpdateRoute sets the "route" field to the value that was provided on create.

func (*MsgEventUpsertOne) UpdateStatus

func (u *MsgEventUpsertOne) UpdateStatus() *MsgEventUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*MsgEventUpsertOne) UpdateUpdatedAt

func (u *MsgEventUpsertOne) UpdateUpdatedAt() *MsgEventUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgEventUpsertOne) UpdateUpdatedBy

func (u *MsgEventUpsertOne) UpdateUpdatedBy() *MsgEventUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgEventWhereInput

type MsgEventWhereInput struct {
	Predicates []predicate.MsgEvent  `json:"-"`
	Not        *MsgEventWhereInput   `json:"not,omitempty"`
	Or         []*MsgEventWhereInput `json:"or,omitempty"`
	And        []*MsgEventWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "msg_type_id" field predicates.
	MsgTypeID      *int  `json:"msgTypeID,omitempty"`
	MsgTypeIDNEQ   *int  `json:"msgTypeIDNEQ,omitempty"`
	MsgTypeIDIn    []int `json:"msgTypeIDIn,omitempty"`
	MsgTypeIDNotIn []int `json:"msgTypeIDNotIn,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "status" field predicates.
	Status       *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ    *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn  []typex.SimpleStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool                 `json:"statusIsNil,omitempty"`
	StatusNotNil bool                 `json:"statusNotNil,omitempty"`

	// "modes" field predicates.
	Modes             *string  `json:"modes,omitempty"`
	ModesNEQ          *string  `json:"modesNEQ,omitempty"`
	ModesIn           []string `json:"modesIn,omitempty"`
	ModesNotIn        []string `json:"modesNotIn,omitempty"`
	ModesGT           *string  `json:"modesGT,omitempty"`
	ModesGTE          *string  `json:"modesGTE,omitempty"`
	ModesLT           *string  `json:"modesLT,omitempty"`
	ModesLTE          *string  `json:"modesLTE,omitempty"`
	ModesContains     *string  `json:"modesContains,omitempty"`
	ModesHasPrefix    *string  `json:"modesHasPrefix,omitempty"`
	ModesHasSuffix    *string  `json:"modesHasSuffix,omitempty"`
	ModesEqualFold    *string  `json:"modesEqualFold,omitempty"`
	ModesContainsFold *string  `json:"modesContainsFold,omitempty"`

	// "msg_type" edge predicates.
	HasMsgType     *bool                `json:"hasMsgType,omitempty"`
	HasMsgTypeWith []*MsgTypeWhereInput `json:"hasMsgTypeWith,omitempty"`

	// "customer_template" edge predicates.
	HasCustomerTemplate     *bool                    `json:"hasCustomerTemplate,omitempty"`
	HasCustomerTemplateWith []*MsgTemplateWhereInput `json:"hasCustomerTemplateWith,omitempty"`
}

MsgEventWhereInput represents a where input for filtering MsgEvent queries.

func (*MsgEventWhereInput) AddPredicates

func (i *MsgEventWhereInput) AddPredicates(predicates ...predicate.MsgEvent)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*MsgEventWhereInput) Filter

Filter applies the MsgEventWhereInput filter on the MsgEventQuery builder.

func (*MsgEventWhereInput) P

P returns a predicate for filtering msgevents. An error is returned if the input is empty or invalid.

type MsgEvents

type MsgEvents []*MsgEvent

MsgEvents is a parsable slice of MsgEvent.

type MsgInternal

type MsgInternal struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID int `json:"tenant_id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 消息类型分类
	Category string `json:"category,omitempty"`
	// 标题
	Subject string `json:"subject,omitempty"`
	// 消息体
	Body string `json:"body,omitempty"`
	// 内容类型: html,txt
	Format string `json:"format,omitempty"`
	// 消息跳转
	Redirect string `json:"redirect,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MsgInternalQuery when eager-loading is set.
	Edges MsgInternalEdges `json:"edges"`
	// contains filtered or unexported fields
}

MsgInternal is the model entity for the MsgInternal schema.

func (*MsgInternal) GlobalID

func (mi *MsgInternal) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given MsgInternal node.

func (*MsgInternal) IsNode

func (*MsgInternal) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*MsgInternal) MsgInternalTo

func (mi *MsgInternal) MsgInternalTo(ctx context.Context) (result []*MsgInternalTo, err error)

func (*MsgInternal) NamedMsgInternalTo

func (mi *MsgInternal) NamedMsgInternalTo(name string) ([]*MsgInternalTo, error)

NamedMsgInternalTo returns the MsgInternalTo named value or an error if the edge was not loaded in eager-loading with this name.

func (*MsgInternal) QueryMsgInternalTo

func (mi *MsgInternal) QueryMsgInternalTo() *MsgInternalToQuery

QueryMsgInternalTo queries the "msg_internal_to" edge of the MsgInternal entity.

func (*MsgInternal) String

func (mi *MsgInternal) String() string

String implements the fmt.Stringer.

func (*MsgInternal) ToEdge

func (mi *MsgInternal) ToEdge(order *MsgInternalOrder) *MsgInternalEdge

ToEdge converts MsgInternal into MsgInternalEdge.

func (*MsgInternal) Unwrap

func (mi *MsgInternal) Unwrap() *MsgInternal

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

func (mi *MsgInternal) Update() *MsgInternalUpdateOne

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

func (*MsgInternal) Value

func (mi *MsgInternal) Value(name string) (ent.Value, error)

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

type MsgInternalClient

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

MsgInternalClient is a client for the MsgInternal schema.

func NewMsgInternalClient

func NewMsgInternalClient(c config) *MsgInternalClient

NewMsgInternalClient returns a client for the MsgInternal from the given config.

func (*MsgInternalClient) Create

func (c *MsgInternalClient) Create() *MsgInternalCreate

Create returns a builder for creating a MsgInternal entity.

func (*MsgInternalClient) CreateBulk

func (c *MsgInternalClient) CreateBulk(builders ...*MsgInternalCreate) *MsgInternalCreateBulk

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

func (*MsgInternalClient) Delete

func (c *MsgInternalClient) Delete() *MsgInternalDelete

Delete returns a delete builder for MsgInternal.

func (*MsgInternalClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MsgInternalClient) DeleteOneID

func (c *MsgInternalClient) DeleteOneID(id int) *MsgInternalDeleteOne

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

func (*MsgInternalClient) Get

func (c *MsgInternalClient) Get(ctx context.Context, id int) (*MsgInternal, error)

Get returns a MsgInternal entity by its id.

func (*MsgInternalClient) GetX

func (c *MsgInternalClient) GetX(ctx context.Context, id int) *MsgInternal

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

func (*MsgInternalClient) Hooks

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

Hooks returns the client hooks.

func (*MsgInternalClient) Intercept

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

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

func (*MsgInternalClient) Interceptors

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

Interceptors returns the client interceptors.

func (*MsgInternalClient) MapCreateBulk

func (c *MsgInternalClient) MapCreateBulk(slice any, setFunc func(*MsgInternalCreate, int)) *MsgInternalCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MsgInternalClient) Query

func (c *MsgInternalClient) Query() *MsgInternalQuery

Query returns a query builder for MsgInternal.

func (*MsgInternalClient) QueryMsgInternalTo

func (c *MsgInternalClient) QueryMsgInternalTo(mi *MsgInternal) *MsgInternalToQuery

QueryMsgInternalTo queries the msg_internal_to edge of a MsgInternal.

func (*MsgInternalClient) Update

func (c *MsgInternalClient) Update() *MsgInternalUpdate

Update returns an update builder for MsgInternal.

func (*MsgInternalClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MsgInternalClient) UpdateOneID

func (c *MsgInternalClient) UpdateOneID(id int) *MsgInternalUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MsgInternalClient) Use

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

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

type MsgInternalConnection

type MsgInternalConnection struct {
	Edges      []*MsgInternalEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

MsgInternalConnection is the connection containing edges to MsgInternal.

type MsgInternalCreate

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

MsgInternalCreate is the builder for creating a MsgInternal entity.

func (*MsgInternalCreate) AddMsgInternalTo

func (mic *MsgInternalCreate) AddMsgInternalTo(m ...*MsgInternalTo) *MsgInternalCreate

AddMsgInternalTo adds the "msg_internal_to" edges to the MsgInternalTo entity.

func (*MsgInternalCreate) AddMsgInternalToIDs

func (mic *MsgInternalCreate) AddMsgInternalToIDs(ids ...int) *MsgInternalCreate

AddMsgInternalToIDs adds the "msg_internal_to" edge to the MsgInternalTo entity by IDs.

func (*MsgInternalCreate) Exec

func (mic *MsgInternalCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgInternalCreate) ExecX

func (mic *MsgInternalCreate) ExecX(ctx context.Context)

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

func (*MsgInternalCreate) Mutation

func (mic *MsgInternalCreate) Mutation() *MsgInternalMutation

Mutation returns the MsgInternalMutation object of the builder.

func (*MsgInternalCreate) OnConflict

func (mic *MsgInternalCreate) OnConflict(opts ...sql.ConflictOption) *MsgInternalUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgInternal.Create().
	SetTenantID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgInternalUpsert) {
		SetTenantID(v+v).
	}).
	Exec(ctx)

func (*MsgInternalCreate) OnConflictColumns

func (mic *MsgInternalCreate) OnConflictColumns(columns ...string) *MsgInternalUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgInternal.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgInternalCreate) Save

func (mic *MsgInternalCreate) Save(ctx context.Context) (*MsgInternal, error)

Save creates the MsgInternal in the database.

func (*MsgInternalCreate) SaveX

func (mic *MsgInternalCreate) SaveX(ctx context.Context) *MsgInternal

SaveX calls Save and panics if Save returns an error.

func (*MsgInternalCreate) SetBody

func (mic *MsgInternalCreate) SetBody(s string) *MsgInternalCreate

SetBody sets the "body" field.

func (*MsgInternalCreate) SetCategory

func (mic *MsgInternalCreate) SetCategory(s string) *MsgInternalCreate

SetCategory sets the "category" field.

func (*MsgInternalCreate) SetCreatedAt

func (mic *MsgInternalCreate) SetCreatedAt(t time.Time) *MsgInternalCreate

SetCreatedAt sets the "created_at" field.

func (*MsgInternalCreate) SetCreatedBy

func (mic *MsgInternalCreate) SetCreatedBy(i int) *MsgInternalCreate

SetCreatedBy sets the "created_by" field.

func (*MsgInternalCreate) SetFormat

func (mic *MsgInternalCreate) SetFormat(s string) *MsgInternalCreate

SetFormat sets the "format" field.

func (*MsgInternalCreate) SetID

func (mic *MsgInternalCreate) SetID(i int) *MsgInternalCreate

SetID sets the "id" field.

func (*MsgInternalCreate) SetNillableBody

func (mic *MsgInternalCreate) SetNillableBody(s *string) *MsgInternalCreate

SetNillableBody sets the "body" field if the given value is not nil.

func (*MsgInternalCreate) SetNillableCreatedAt

func (mic *MsgInternalCreate) SetNillableCreatedAt(t *time.Time) *MsgInternalCreate

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

func (*MsgInternalCreate) SetNillableRedirect

func (mic *MsgInternalCreate) SetNillableRedirect(s *string) *MsgInternalCreate

SetNillableRedirect sets the "redirect" field if the given value is not nil.

func (*MsgInternalCreate) SetNillableUpdatedAt

func (mic *MsgInternalCreate) SetNillableUpdatedAt(t *time.Time) *MsgInternalCreate

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

func (*MsgInternalCreate) SetNillableUpdatedBy

func (mic *MsgInternalCreate) SetNillableUpdatedBy(i *int) *MsgInternalCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgInternalCreate) SetRedirect

func (mic *MsgInternalCreate) SetRedirect(s string) *MsgInternalCreate

SetRedirect sets the "redirect" field.

func (*MsgInternalCreate) SetSubject

func (mic *MsgInternalCreate) SetSubject(s string) *MsgInternalCreate

SetSubject sets the "subject" field.

func (*MsgInternalCreate) SetTenantID

func (mic *MsgInternalCreate) SetTenantID(i int) *MsgInternalCreate

SetTenantID sets the "tenant_id" field.

func (*MsgInternalCreate) SetUpdatedAt

func (mic *MsgInternalCreate) SetUpdatedAt(t time.Time) *MsgInternalCreate

SetUpdatedAt sets the "updated_at" field.

func (*MsgInternalCreate) SetUpdatedBy

func (mic *MsgInternalCreate) SetUpdatedBy(i int) *MsgInternalCreate

SetUpdatedBy sets the "updated_by" field.

type MsgInternalCreateBulk

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

MsgInternalCreateBulk is the builder for creating many MsgInternal entities in bulk.

func (*MsgInternalCreateBulk) Exec

func (micb *MsgInternalCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgInternalCreateBulk) ExecX

func (micb *MsgInternalCreateBulk) ExecX(ctx context.Context)

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

func (*MsgInternalCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgInternal.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgInternalUpsert) {
		SetTenantID(v+v).
	}).
	Exec(ctx)

func (*MsgInternalCreateBulk) OnConflictColumns

func (micb *MsgInternalCreateBulk) OnConflictColumns(columns ...string) *MsgInternalUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgInternal.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgInternalCreateBulk) Save

func (micb *MsgInternalCreateBulk) Save(ctx context.Context) ([]*MsgInternal, error)

Save creates the MsgInternal entities in the database.

func (*MsgInternalCreateBulk) SaveX

func (micb *MsgInternalCreateBulk) SaveX(ctx context.Context) []*MsgInternal

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

type MsgInternalDelete

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

MsgInternalDelete is the builder for deleting a MsgInternal entity.

func (*MsgInternalDelete) Exec

func (mid *MsgInternalDelete) Exec(ctx context.Context) (int, error)

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

func (*MsgInternalDelete) ExecX

func (mid *MsgInternalDelete) ExecX(ctx context.Context) int

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

func (*MsgInternalDelete) Where

Where appends a list predicates to the MsgInternalDelete builder.

type MsgInternalDeleteOne

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

MsgInternalDeleteOne is the builder for deleting a single MsgInternal entity.

func (*MsgInternalDeleteOne) Exec

func (mido *MsgInternalDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MsgInternalDeleteOne) ExecX

func (mido *MsgInternalDeleteOne) ExecX(ctx context.Context)

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

func (*MsgInternalDeleteOne) Where

Where appends a list predicates to the MsgInternalDelete builder.

type MsgInternalEdge

type MsgInternalEdge struct {
	Node   *MsgInternal `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

MsgInternalEdge is the edge representation of MsgInternal.

type MsgInternalEdges

type MsgInternalEdges struct {
	// MsgInternalTo holds the value of the msg_internal_to edge.
	MsgInternalTo []*MsgInternalTo `json:"msg_internal_to,omitempty"`
	// contains filtered or unexported fields
}

MsgInternalEdges holds the relations/edges for other nodes in the graph.

func (MsgInternalEdges) MsgInternalToOrErr

func (e MsgInternalEdges) MsgInternalToOrErr() ([]*MsgInternalTo, error)

MsgInternalToOrErr returns the MsgInternalTo value or an error if the edge was not loaded in eager-loading.

type MsgInternalGroupBy

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

MsgInternalGroupBy is the group-by builder for MsgInternal entities.

func (*MsgInternalGroupBy) Aggregate

func (migb *MsgInternalGroupBy) Aggregate(fns ...AggregateFunc) *MsgInternalGroupBy

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

func (*MsgInternalGroupBy) Bool

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

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

func (*MsgInternalGroupBy) BoolX

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

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

func (*MsgInternalGroupBy) Bools

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

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

func (*MsgInternalGroupBy) BoolsX

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

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

func (*MsgInternalGroupBy) Float64

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

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

func (*MsgInternalGroupBy) Float64X

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

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

func (*MsgInternalGroupBy) Float64s

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

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

func (*MsgInternalGroupBy) Float64sX

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

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

func (*MsgInternalGroupBy) Int

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

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

func (*MsgInternalGroupBy) IntX

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

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

func (*MsgInternalGroupBy) Ints

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

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

func (*MsgInternalGroupBy) IntsX

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

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

func (*MsgInternalGroupBy) Scan

func (migb *MsgInternalGroupBy) Scan(ctx context.Context, v any) error

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

func (*MsgInternalGroupBy) ScanX

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

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

func (*MsgInternalGroupBy) String

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

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

func (*MsgInternalGroupBy) StringX

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

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

func (*MsgInternalGroupBy) Strings

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

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

func (*MsgInternalGroupBy) StringsX

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

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

type MsgInternalMutation

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

MsgInternalMutation represents an operation that mutates the MsgInternal nodes in the graph.

func (*MsgInternalMutation) AddCreatedBy

func (m *MsgInternalMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*MsgInternalMutation) AddField

func (m *MsgInternalMutation) 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 (*MsgInternalMutation) AddMsgInternalToIDs

func (m *MsgInternalMutation) AddMsgInternalToIDs(ids ...int)

AddMsgInternalToIDs adds the "msg_internal_to" edge to the MsgInternalTo entity by ids.

func (*MsgInternalMutation) AddTenantID

func (m *MsgInternalMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*MsgInternalMutation) AddUpdatedBy

func (m *MsgInternalMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgInternalMutation) AddedCreatedBy

func (m *MsgInternalMutation) AddedCreatedBy() (r int, exists bool)

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

func (*MsgInternalMutation) AddedEdges

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

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

func (*MsgInternalMutation) AddedField

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

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

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

func (*MsgInternalMutation) AddedIDs

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

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

func (*MsgInternalMutation) AddedTenantID

func (m *MsgInternalMutation) AddedTenantID() (r int, exists bool)

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

func (*MsgInternalMutation) AddedUpdatedBy

func (m *MsgInternalMutation) AddedUpdatedBy() (r int, exists bool)

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

func (*MsgInternalMutation) Body

func (m *MsgInternalMutation) Body() (r string, exists bool)

Body returns the value of the "body" field in the mutation.

func (*MsgInternalMutation) BodyCleared

func (m *MsgInternalMutation) BodyCleared() bool

BodyCleared returns if the "body" field was cleared in this mutation.

func (*MsgInternalMutation) Category

func (m *MsgInternalMutation) Category() (r string, exists bool)

Category returns the value of the "category" field in the mutation.

func (*MsgInternalMutation) ClearBody

func (m *MsgInternalMutation) ClearBody()

ClearBody clears the value of the "body" field.

func (*MsgInternalMutation) ClearEdge

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

func (m *MsgInternalMutation) 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 (*MsgInternalMutation) ClearMsgInternalTo

func (m *MsgInternalMutation) ClearMsgInternalTo()

ClearMsgInternalTo clears the "msg_internal_to" edge to the MsgInternalTo entity.

func (*MsgInternalMutation) ClearRedirect

func (m *MsgInternalMutation) ClearRedirect()

ClearRedirect clears the value of the "redirect" field.

func (*MsgInternalMutation) ClearUpdatedAt

func (m *MsgInternalMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgInternalMutation) ClearUpdatedBy

func (m *MsgInternalMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgInternalMutation) ClearedEdges

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

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

func (*MsgInternalMutation) ClearedFields

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

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

func (MsgInternalMutation) Client

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

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

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

func (*MsgInternalMutation) CreatedBy

func (m *MsgInternalMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*MsgInternalMutation) EdgeCleared

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

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

func (*MsgInternalMutation) Field

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

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

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

func (*MsgInternalMutation) Fields

func (m *MsgInternalMutation) 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 (*MsgInternalMutation) Format

func (m *MsgInternalMutation) Format() (r string, exists bool)

Format returns the value of the "format" field in the mutation.

func (*MsgInternalMutation) ID

func (m *MsgInternalMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*MsgInternalMutation) IDs

func (m *MsgInternalMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*MsgInternalMutation) MsgInternalToCleared

func (m *MsgInternalMutation) MsgInternalToCleared() bool

MsgInternalToCleared reports if the "msg_internal_to" edge to the MsgInternalTo entity was cleared.

func (*MsgInternalMutation) MsgInternalToIDs

func (m *MsgInternalMutation) MsgInternalToIDs() (ids []int)

MsgInternalToIDs returns the "msg_internal_to" edge IDs in the mutation.

func (*MsgInternalMutation) OldBody

func (m *MsgInternalMutation) OldBody(ctx context.Context) (v string, err error)

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

func (*MsgInternalMutation) OldCategory

func (m *MsgInternalMutation) OldCategory(ctx context.Context) (v string, err error)

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

func (*MsgInternalMutation) OldCreatedAt

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

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

func (*MsgInternalMutation) OldCreatedBy

func (m *MsgInternalMutation) OldCreatedBy(ctx context.Context) (v int, err error)

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

func (*MsgInternalMutation) OldField

func (m *MsgInternalMutation) 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 (*MsgInternalMutation) OldFormat

func (m *MsgInternalMutation) OldFormat(ctx context.Context) (v string, err error)

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

func (*MsgInternalMutation) OldRedirect

func (m *MsgInternalMutation) OldRedirect(ctx context.Context) (v string, err error)

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

func (*MsgInternalMutation) OldSubject

func (m *MsgInternalMutation) OldSubject(ctx context.Context) (v string, err error)

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

func (*MsgInternalMutation) OldTenantID

func (m *MsgInternalMutation) OldTenantID(ctx context.Context) (v int, err error)

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

func (*MsgInternalMutation) OldUpdatedAt

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

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

func (*MsgInternalMutation) OldUpdatedBy

func (m *MsgInternalMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

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

func (*MsgInternalMutation) Op

func (m *MsgInternalMutation) Op() Op

Op returns the operation name.

func (*MsgInternalMutation) Redirect

func (m *MsgInternalMutation) Redirect() (r string, exists bool)

Redirect returns the value of the "redirect" field in the mutation.

func (*MsgInternalMutation) RedirectCleared

func (m *MsgInternalMutation) RedirectCleared() bool

RedirectCleared returns if the "redirect" field was cleared in this mutation.

func (*MsgInternalMutation) RemoveMsgInternalToIDs

func (m *MsgInternalMutation) RemoveMsgInternalToIDs(ids ...int)

RemoveMsgInternalToIDs removes the "msg_internal_to" edge to the MsgInternalTo entity by IDs.

func (*MsgInternalMutation) RemovedEdges

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

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

func (*MsgInternalMutation) RemovedIDs

func (m *MsgInternalMutation) 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 (*MsgInternalMutation) RemovedMsgInternalToIDs

func (m *MsgInternalMutation) RemovedMsgInternalToIDs() (ids []int)

RemovedMsgInternalTo returns the removed IDs of the "msg_internal_to" edge to the MsgInternalTo entity.

func (*MsgInternalMutation) ResetBody

func (m *MsgInternalMutation) ResetBody()

ResetBody resets all changes to the "body" field.

func (*MsgInternalMutation) ResetCategory

func (m *MsgInternalMutation) ResetCategory()

ResetCategory resets all changes to the "category" field.

func (*MsgInternalMutation) ResetCreatedAt

func (m *MsgInternalMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*MsgInternalMutation) ResetCreatedBy

func (m *MsgInternalMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*MsgInternalMutation) ResetEdge

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

func (m *MsgInternalMutation) 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 (*MsgInternalMutation) ResetFormat

func (m *MsgInternalMutation) ResetFormat()

ResetFormat resets all changes to the "format" field.

func (*MsgInternalMutation) ResetMsgInternalTo

func (m *MsgInternalMutation) ResetMsgInternalTo()

ResetMsgInternalTo resets all changes to the "msg_internal_to" edge.

func (*MsgInternalMutation) ResetRedirect

func (m *MsgInternalMutation) ResetRedirect()

ResetRedirect resets all changes to the "redirect" field.

func (*MsgInternalMutation) ResetSubject

func (m *MsgInternalMutation) ResetSubject()

ResetSubject resets all changes to the "subject" field.

func (*MsgInternalMutation) ResetTenantID

func (m *MsgInternalMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*MsgInternalMutation) ResetUpdatedAt

func (m *MsgInternalMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*MsgInternalMutation) ResetUpdatedBy

func (m *MsgInternalMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*MsgInternalMutation) SetBody

func (m *MsgInternalMutation) SetBody(s string)

SetBody sets the "body" field.

func (*MsgInternalMutation) SetCategory

func (m *MsgInternalMutation) SetCategory(s string)

SetCategory sets the "category" field.

func (*MsgInternalMutation) SetCreatedAt

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

SetCreatedAt sets the "created_at" field.

func (*MsgInternalMutation) SetCreatedBy

func (m *MsgInternalMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*MsgInternalMutation) SetField

func (m *MsgInternalMutation) 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 (*MsgInternalMutation) SetFormat

func (m *MsgInternalMutation) SetFormat(s string)

SetFormat sets the "format" field.

func (*MsgInternalMutation) SetID

func (m *MsgInternalMutation) SetID(id int)

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

func (*MsgInternalMutation) SetOp

func (m *MsgInternalMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MsgInternalMutation) SetRedirect

func (m *MsgInternalMutation) SetRedirect(s string)

SetRedirect sets the "redirect" field.

func (*MsgInternalMutation) SetSubject

func (m *MsgInternalMutation) SetSubject(s string)

SetSubject sets the "subject" field.

func (*MsgInternalMutation) SetTenantID

func (m *MsgInternalMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*MsgInternalMutation) SetUpdatedAt

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

SetUpdatedAt sets the "updated_at" field.

func (*MsgInternalMutation) SetUpdatedBy

func (m *MsgInternalMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*MsgInternalMutation) Subject

func (m *MsgInternalMutation) Subject() (r string, exists bool)

Subject returns the value of the "subject" field in the mutation.

func (*MsgInternalMutation) TenantID

func (m *MsgInternalMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (MsgInternalMutation) Tx

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

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

func (*MsgInternalMutation) Type

func (m *MsgInternalMutation) Type() string

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

func (*MsgInternalMutation) UpdatedAt

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

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

func (*MsgInternalMutation) UpdatedAtCleared

func (m *MsgInternalMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*MsgInternalMutation) UpdatedBy

func (m *MsgInternalMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*MsgInternalMutation) UpdatedByCleared

func (m *MsgInternalMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*MsgInternalMutation) Where

func (m *MsgInternalMutation) Where(ps ...predicate.MsgInternal)

Where appends a list predicates to the MsgInternalMutation builder.

func (*MsgInternalMutation) WhereP

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

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

type MsgInternalOrder

type MsgInternalOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *MsgInternalOrderField `json:"field"`
}

MsgInternalOrder defines the ordering of MsgInternal.

type MsgInternalOrderField

type MsgInternalOrderField struct {
	// Value extracts the ordering value from the given MsgInternal.
	Value func(*MsgInternal) (ent.Value, error)
	// contains filtered or unexported fields
}

MsgInternalOrderField defines the ordering field of MsgInternal.

func (MsgInternalOrderField) MarshalGQL

func (f MsgInternalOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (MsgInternalOrderField) String

func (f MsgInternalOrderField) String() string

String implement fmt.Stringer interface.

func (*MsgInternalOrderField) UnmarshalGQL

func (f *MsgInternalOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type MsgInternalPaginateOption

type MsgInternalPaginateOption func(*msginternalPager) error

MsgInternalPaginateOption enables pagination customization.

func WithMsgInternalFilter

func WithMsgInternalFilter(filter func(*MsgInternalQuery) (*MsgInternalQuery, error)) MsgInternalPaginateOption

WithMsgInternalFilter configures pagination filter.

func WithMsgInternalOrder

func WithMsgInternalOrder(order *MsgInternalOrder) MsgInternalPaginateOption

WithMsgInternalOrder configures pagination ordering.

type MsgInternalQuery

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

MsgInternalQuery is the builder for querying MsgInternal entities.

func (*MsgInternalQuery) Aggregate

func (miq *MsgInternalQuery) Aggregate(fns ...AggregateFunc) *MsgInternalSelect

Aggregate returns a MsgInternalSelect configured with the given aggregations.

func (*MsgInternalQuery) All

func (miq *MsgInternalQuery) All(ctx context.Context) ([]*MsgInternal, error)

All executes the query and returns a list of MsgInternals.

func (*MsgInternalQuery) AllX

func (miq *MsgInternalQuery) AllX(ctx context.Context) []*MsgInternal

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

func (*MsgInternalQuery) Clone

func (miq *MsgInternalQuery) Clone() *MsgInternalQuery

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

func (*MsgInternalQuery) CollectFields

func (mi *MsgInternalQuery) CollectFields(ctx context.Context, satisfies ...string) (*MsgInternalQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*MsgInternalQuery) Count

func (miq *MsgInternalQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MsgInternalQuery) CountX

func (miq *MsgInternalQuery) CountX(ctx context.Context) int

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

func (*MsgInternalQuery) Exist

func (miq *MsgInternalQuery) Exist(ctx context.Context) (bool, error)

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

func (*MsgInternalQuery) ExistX

func (miq *MsgInternalQuery) ExistX(ctx context.Context) bool

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

func (*MsgInternalQuery) First

func (miq *MsgInternalQuery) First(ctx context.Context) (*MsgInternal, error)

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

func (*MsgInternalQuery) FirstID

func (miq *MsgInternalQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*MsgInternalQuery) FirstIDX

func (miq *MsgInternalQuery) FirstIDX(ctx context.Context) int

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

func (*MsgInternalQuery) FirstX

func (miq *MsgInternalQuery) FirstX(ctx context.Context) *MsgInternal

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

func (*MsgInternalQuery) GroupBy

func (miq *MsgInternalQuery) GroupBy(field string, fields ...string) *MsgInternalGroupBy

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 {
	TenantID int `json:"tenant_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MsgInternal.Query().
	GroupBy(msginternal.FieldTenantID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MsgInternalQuery) IDs

func (miq *MsgInternalQuery) IDs(ctx context.Context) (ids []int, err error)

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

func (*MsgInternalQuery) IDsX

func (miq *MsgInternalQuery) IDsX(ctx context.Context) []int

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

func (*MsgInternalQuery) Limit

func (miq *MsgInternalQuery) Limit(limit int) *MsgInternalQuery

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

func (*MsgInternalQuery) Offset

func (miq *MsgInternalQuery) Offset(offset int) *MsgInternalQuery

Offset to start from.

func (*MsgInternalQuery) Only

func (miq *MsgInternalQuery) Only(ctx context.Context) (*MsgInternal, error)

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

func (*MsgInternalQuery) OnlyID

func (miq *MsgInternalQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*MsgInternalQuery) OnlyIDX

func (miq *MsgInternalQuery) OnlyIDX(ctx context.Context) int

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

func (*MsgInternalQuery) OnlyX

func (miq *MsgInternalQuery) OnlyX(ctx context.Context) *MsgInternal

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

func (*MsgInternalQuery) Order

Order specifies how the records should be ordered.

func (*MsgInternalQuery) Paginate

func (mi *MsgInternalQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...MsgInternalPaginateOption,
) (*MsgInternalConnection, error)

Paginate executes the query and returns a relay based cursor connection to MsgInternal.

func (*MsgInternalQuery) QueryMsgInternalTo

func (miq *MsgInternalQuery) QueryMsgInternalTo() *MsgInternalToQuery

QueryMsgInternalTo chains the current query on the "msg_internal_to" edge.

func (*MsgInternalQuery) Select

func (miq *MsgInternalQuery) Select(fields ...string) *MsgInternalSelect

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 {
	TenantID int `json:"tenant_id,omitempty"`
}

client.MsgInternal.Query().
	Select(msginternal.FieldTenantID).
	Scan(ctx, &v)

func (*MsgInternalQuery) Unique

func (miq *MsgInternalQuery) Unique(unique bool) *MsgInternalQuery

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

Where adds a new predicate for the MsgInternalQuery builder.

func (*MsgInternalQuery) WithMsgInternalTo

func (miq *MsgInternalQuery) WithMsgInternalTo(opts ...func(*MsgInternalToQuery)) *MsgInternalQuery

WithMsgInternalTo tells the query-builder to eager-load the nodes that are connected to the "msg_internal_to" edge. The optional arguments are used to configure the query builder of the edge.

func (*MsgInternalQuery) WithNamedMsgInternalTo

func (miq *MsgInternalQuery) WithNamedMsgInternalTo(name string, opts ...func(*MsgInternalToQuery)) *MsgInternalQuery

WithNamedMsgInternalTo tells the query-builder to eager-load the nodes that are connected to the "msg_internal_to" edge with the given name. The optional arguments are used to configure the query builder of the edge.

type MsgInternalSelect

type MsgInternalSelect struct {
	*MsgInternalQuery
	// contains filtered or unexported fields
}

MsgInternalSelect is the builder for selecting fields of MsgInternal entities.

func (*MsgInternalSelect) Aggregate

func (mis *MsgInternalSelect) Aggregate(fns ...AggregateFunc) *MsgInternalSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MsgInternalSelect) Bool

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

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

func (*MsgInternalSelect) BoolX

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

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

func (*MsgInternalSelect) Bools

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

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

func (*MsgInternalSelect) BoolsX

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

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

func (*MsgInternalSelect) Float64

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

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

func (*MsgInternalSelect) Float64X

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

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

func (*MsgInternalSelect) Float64s

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

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

func (*MsgInternalSelect) Float64sX

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

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

func (*MsgInternalSelect) Int

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

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

func (*MsgInternalSelect) IntX

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

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

func (*MsgInternalSelect) Ints

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

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

func (*MsgInternalSelect) IntsX

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

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

func (*MsgInternalSelect) Scan

func (mis *MsgInternalSelect) Scan(ctx context.Context, v any) error

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

func (*MsgInternalSelect) ScanX

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

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

func (*MsgInternalSelect) String

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

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

func (*MsgInternalSelect) StringX

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

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

func (*MsgInternalSelect) Strings

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

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

func (*MsgInternalSelect) StringsX

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

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

type MsgInternalTo

type MsgInternalTo struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID int `json:"tenant_id,omitempty"`
	// 站内信ID
	MsgInternalID int `json:"msg_internal_id,omitempty"`
	// 用户ID
	UserID int `json:"user_id,omitempty"`
	// 阅读时间
	ReadAt time.Time `json:"read_at,omitempty"`
	// 删除时间
	DeleteAt time.Time `json:"delete_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MsgInternalToQuery when eager-loading is set.
	Edges MsgInternalToEdges `json:"edges"`
	// contains filtered or unexported fields
}

MsgInternalTo is the model entity for the MsgInternalTo schema.

func (*MsgInternalTo) GlobalID

func (mit *MsgInternalTo) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given MsgInternalTo node.

func (*MsgInternalTo) IsNode

func (*MsgInternalTo) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*MsgInternalTo) MsgInternal

func (mit *MsgInternalTo) MsgInternal(ctx context.Context) (*MsgInternal, error)

func (*MsgInternalTo) QueryMsgInternal

func (mit *MsgInternalTo) QueryMsgInternal() *MsgInternalQuery

QueryMsgInternal queries the "msg_internal" edge of the MsgInternalTo entity.

func (*MsgInternalTo) QueryUser

func (mit *MsgInternalTo) QueryUser() *UserQuery

QueryUser queries the "user" edge of the MsgInternalTo entity.

func (*MsgInternalTo) String

func (mit *MsgInternalTo) String() string

String implements the fmt.Stringer.

func (*MsgInternalTo) ToEdge

func (mit *MsgInternalTo) ToEdge(order *MsgInternalToOrder) *MsgInternalToEdge

ToEdge converts MsgInternalTo into MsgInternalToEdge.

func (*MsgInternalTo) Unwrap

func (mit *MsgInternalTo) Unwrap() *MsgInternalTo

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

func (mit *MsgInternalTo) Update() *MsgInternalToUpdateOne

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

func (*MsgInternalTo) User

func (mit *MsgInternalTo) User(ctx context.Context) (*User, error)

func (*MsgInternalTo) Value

func (mit *MsgInternalTo) Value(name string) (ent.Value, error)

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

type MsgInternalToClient

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

MsgInternalToClient is a client for the MsgInternalTo schema.

func NewMsgInternalToClient

func NewMsgInternalToClient(c config) *MsgInternalToClient

NewMsgInternalToClient returns a client for the MsgInternalTo from the given config.

func (*MsgInternalToClient) Create

Create returns a builder for creating a MsgInternalTo entity.

func (*MsgInternalToClient) CreateBulk

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

func (*MsgInternalToClient) Delete

Delete returns a delete builder for MsgInternalTo.

func (*MsgInternalToClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MsgInternalToClient) DeleteOneID

func (c *MsgInternalToClient) DeleteOneID(id int) *MsgInternalToDeleteOne

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

func (*MsgInternalToClient) Get

Get returns a MsgInternalTo entity by its id.

func (*MsgInternalToClient) GetX

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

func (*MsgInternalToClient) Hooks

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

Hooks returns the client hooks.

func (*MsgInternalToClient) Intercept

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

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

func (*MsgInternalToClient) Interceptors

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

Interceptors returns the client interceptors.

func (*MsgInternalToClient) MapCreateBulk

func (c *MsgInternalToClient) MapCreateBulk(slice any, setFunc func(*MsgInternalToCreate, int)) *MsgInternalToCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MsgInternalToClient) Query

Query returns a query builder for MsgInternalTo.

func (*MsgInternalToClient) QueryMsgInternal

func (c *MsgInternalToClient) QueryMsgInternal(mit *MsgInternalTo) *MsgInternalQuery

QueryMsgInternal queries the msg_internal edge of a MsgInternalTo.

func (*MsgInternalToClient) QueryUser

func (c *MsgInternalToClient) QueryUser(mit *MsgInternalTo) *UserQuery

QueryUser queries the user edge of a MsgInternalTo.

func (*MsgInternalToClient) Update

Update returns an update builder for MsgInternalTo.

func (*MsgInternalToClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MsgInternalToClient) UpdateOneID

func (c *MsgInternalToClient) UpdateOneID(id int) *MsgInternalToUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MsgInternalToClient) Use

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

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

type MsgInternalToConnection

type MsgInternalToConnection struct {
	Edges      []*MsgInternalToEdge `json:"edges"`
	PageInfo   PageInfo             `json:"pageInfo"`
	TotalCount int                  `json:"totalCount"`
}

MsgInternalToConnection is the connection containing edges to MsgInternalTo.

type MsgInternalToCreate

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

MsgInternalToCreate is the builder for creating a MsgInternalTo entity.

func (*MsgInternalToCreate) Exec

func (mitc *MsgInternalToCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgInternalToCreate) ExecX

func (mitc *MsgInternalToCreate) ExecX(ctx context.Context)

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

func (*MsgInternalToCreate) Mutation

func (mitc *MsgInternalToCreate) Mutation() *MsgInternalToMutation

Mutation returns the MsgInternalToMutation object of the builder.

func (*MsgInternalToCreate) OnConflict

func (mitc *MsgInternalToCreate) OnConflict(opts ...sql.ConflictOption) *MsgInternalToUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgInternalTo.Create().
	SetTenantID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgInternalToUpsert) {
		SetTenantID(v+v).
	}).
	Exec(ctx)

func (*MsgInternalToCreate) OnConflictColumns

func (mitc *MsgInternalToCreate) OnConflictColumns(columns ...string) *MsgInternalToUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgInternalTo.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgInternalToCreate) Save

Save creates the MsgInternalTo in the database.

func (*MsgInternalToCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*MsgInternalToCreate) SetCreatedAt

func (mitc *MsgInternalToCreate) SetCreatedAt(t time.Time) *MsgInternalToCreate

SetCreatedAt sets the "created_at" field.

func (*MsgInternalToCreate) SetDeleteAt

func (mitc *MsgInternalToCreate) SetDeleteAt(t time.Time) *MsgInternalToCreate

SetDeleteAt sets the "delete_at" field.

func (*MsgInternalToCreate) SetID

SetID sets the "id" field.

func (*MsgInternalToCreate) SetMsgInternal

func (mitc *MsgInternalToCreate) SetMsgInternal(m *MsgInternal) *MsgInternalToCreate

SetMsgInternal sets the "msg_internal" edge to the MsgInternal entity.

func (*MsgInternalToCreate) SetMsgInternalID

func (mitc *MsgInternalToCreate) SetMsgInternalID(i int) *MsgInternalToCreate

SetMsgInternalID sets the "msg_internal_id" field.

func (*MsgInternalToCreate) SetNillableCreatedAt

func (mitc *MsgInternalToCreate) SetNillableCreatedAt(t *time.Time) *MsgInternalToCreate

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

func (*MsgInternalToCreate) SetNillableDeleteAt

func (mitc *MsgInternalToCreate) SetNillableDeleteAt(t *time.Time) *MsgInternalToCreate

SetNillableDeleteAt sets the "delete_at" field if the given value is not nil.

func (*MsgInternalToCreate) SetNillableReadAt

func (mitc *MsgInternalToCreate) SetNillableReadAt(t *time.Time) *MsgInternalToCreate

SetNillableReadAt sets the "read_at" field if the given value is not nil.

func (*MsgInternalToCreate) SetReadAt

func (mitc *MsgInternalToCreate) SetReadAt(t time.Time) *MsgInternalToCreate

SetReadAt sets the "read_at" field.

func (*MsgInternalToCreate) SetTenantID

func (mitc *MsgInternalToCreate) SetTenantID(i int) *MsgInternalToCreate

SetTenantID sets the "tenant_id" field.

func (*MsgInternalToCreate) SetUser

func (mitc *MsgInternalToCreate) SetUser(u *User) *MsgInternalToCreate

SetUser sets the "user" edge to the User entity.

func (*MsgInternalToCreate) SetUserID

func (mitc *MsgInternalToCreate) SetUserID(i int) *MsgInternalToCreate

SetUserID sets the "user_id" field.

type MsgInternalToCreateBulk

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

MsgInternalToCreateBulk is the builder for creating many MsgInternalTo entities in bulk.

func (*MsgInternalToCreateBulk) Exec

func (mitcb *MsgInternalToCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgInternalToCreateBulk) ExecX

func (mitcb *MsgInternalToCreateBulk) ExecX(ctx context.Context)

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

func (*MsgInternalToCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgInternalTo.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgInternalToUpsert) {
		SetTenantID(v+v).
	}).
	Exec(ctx)

func (*MsgInternalToCreateBulk) OnConflictColumns

func (mitcb *MsgInternalToCreateBulk) OnConflictColumns(columns ...string) *MsgInternalToUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgInternalTo.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgInternalToCreateBulk) Save

Save creates the MsgInternalTo entities in the database.

func (*MsgInternalToCreateBulk) SaveX

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

type MsgInternalToDelete

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

MsgInternalToDelete is the builder for deleting a MsgInternalTo entity.

func (*MsgInternalToDelete) Exec

func (mitd *MsgInternalToDelete) Exec(ctx context.Context) (int, error)

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

func (*MsgInternalToDelete) ExecX

func (mitd *MsgInternalToDelete) ExecX(ctx context.Context) int

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

func (*MsgInternalToDelete) Where

Where appends a list predicates to the MsgInternalToDelete builder.

type MsgInternalToDeleteOne

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

MsgInternalToDeleteOne is the builder for deleting a single MsgInternalTo entity.

func (*MsgInternalToDeleteOne) Exec

func (mitdo *MsgInternalToDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MsgInternalToDeleteOne) ExecX

func (mitdo *MsgInternalToDeleteOne) ExecX(ctx context.Context)

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

func (*MsgInternalToDeleteOne) Where

Where appends a list predicates to the MsgInternalToDelete builder.

type MsgInternalToEdge

type MsgInternalToEdge struct {
	Node   *MsgInternalTo `json:"node"`
	Cursor Cursor         `json:"cursor"`
}

MsgInternalToEdge is the edge representation of MsgInternalTo.

type MsgInternalToEdges

type MsgInternalToEdges struct {
	// MsgInternal holds the value of the msg_internal edge.
	MsgInternal *MsgInternal `json:"msg_internal,omitempty"`
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

MsgInternalToEdges holds the relations/edges for other nodes in the graph.

func (MsgInternalToEdges) MsgInternalOrErr

func (e MsgInternalToEdges) MsgInternalOrErr() (*MsgInternal, error)

MsgInternalOrErr returns the MsgInternal value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (MsgInternalToEdges) UserOrErr

func (e MsgInternalToEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type MsgInternalToGroupBy

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

MsgInternalToGroupBy is the group-by builder for MsgInternalTo entities.

func (*MsgInternalToGroupBy) Aggregate

func (mitgb *MsgInternalToGroupBy) Aggregate(fns ...AggregateFunc) *MsgInternalToGroupBy

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

func (*MsgInternalToGroupBy) Bool

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

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

func (*MsgInternalToGroupBy) BoolX

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

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

func (*MsgInternalToGroupBy) Bools

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

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

func (*MsgInternalToGroupBy) BoolsX

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

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

func (*MsgInternalToGroupBy) Float64

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

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

func (*MsgInternalToGroupBy) Float64X

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

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

func (*MsgInternalToGroupBy) Float64s

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

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

func (*MsgInternalToGroupBy) Float64sX

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

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

func (*MsgInternalToGroupBy) Int

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

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

func (*MsgInternalToGroupBy) IntX

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

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

func (*MsgInternalToGroupBy) Ints

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

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

func (*MsgInternalToGroupBy) IntsX

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

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

func (*MsgInternalToGroupBy) Scan

func (mitgb *MsgInternalToGroupBy) Scan(ctx context.Context, v any) error

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

func (*MsgInternalToGroupBy) ScanX

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

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

func (*MsgInternalToGroupBy) String

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

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

func (*MsgInternalToGroupBy) StringX

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

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

func (*MsgInternalToGroupBy) Strings

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

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

func (*MsgInternalToGroupBy) StringsX

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

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

type MsgInternalToMutation

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

MsgInternalToMutation represents an operation that mutates the MsgInternalTo nodes in the graph.

func (*MsgInternalToMutation) AddField

func (m *MsgInternalToMutation) 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 (*MsgInternalToMutation) AddTenantID

func (m *MsgInternalToMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*MsgInternalToMutation) AddedEdges

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

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

func (*MsgInternalToMutation) AddedField

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

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

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

func (*MsgInternalToMutation) AddedIDs

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

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

func (*MsgInternalToMutation) AddedTenantID

func (m *MsgInternalToMutation) AddedTenantID() (r int, exists bool)

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

func (*MsgInternalToMutation) ClearDeleteAt

func (m *MsgInternalToMutation) ClearDeleteAt()

ClearDeleteAt clears the value of the "delete_at" field.

func (*MsgInternalToMutation) ClearEdge

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

func (m *MsgInternalToMutation) 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 (*MsgInternalToMutation) ClearMsgInternal

func (m *MsgInternalToMutation) ClearMsgInternal()

ClearMsgInternal clears the "msg_internal" edge to the MsgInternal entity.

func (*MsgInternalToMutation) ClearReadAt

func (m *MsgInternalToMutation) ClearReadAt()

ClearReadAt clears the value of the "read_at" field.

func (*MsgInternalToMutation) ClearUser

func (m *MsgInternalToMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*MsgInternalToMutation) ClearedEdges

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

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

func (*MsgInternalToMutation) ClearedFields

func (m *MsgInternalToMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MsgInternalToMutation) Client

func (m MsgInternalToMutation) 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 (*MsgInternalToMutation) CreatedAt

func (m *MsgInternalToMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*MsgInternalToMutation) DeleteAt

func (m *MsgInternalToMutation) DeleteAt() (r time.Time, exists bool)

DeleteAt returns the value of the "delete_at" field in the mutation.

func (*MsgInternalToMutation) DeleteAtCleared

func (m *MsgInternalToMutation) DeleteAtCleared() bool

DeleteAtCleared returns if the "delete_at" field was cleared in this mutation.

func (*MsgInternalToMutation) EdgeCleared

func (m *MsgInternalToMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MsgInternalToMutation) Field

func (m *MsgInternalToMutation) 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 (*MsgInternalToMutation) FieldCleared

func (m *MsgInternalToMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MsgInternalToMutation) Fields

func (m *MsgInternalToMutation) 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 (*MsgInternalToMutation) ID

func (m *MsgInternalToMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*MsgInternalToMutation) IDs

func (m *MsgInternalToMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*MsgInternalToMutation) MsgInternalCleared

func (m *MsgInternalToMutation) MsgInternalCleared() bool

MsgInternalCleared reports if the "msg_internal" edge to the MsgInternal entity was cleared.

func (*MsgInternalToMutation) MsgInternalID

func (m *MsgInternalToMutation) MsgInternalID() (r int, exists bool)

MsgInternalID returns the value of the "msg_internal_id" field in the mutation.

func (*MsgInternalToMutation) MsgInternalIDs

func (m *MsgInternalToMutation) MsgInternalIDs() (ids []int)

MsgInternalIDs returns the "msg_internal" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MsgInternalID instead. It exists only for internal usage by the builders.

func (*MsgInternalToMutation) OldCreatedAt

func (m *MsgInternalToMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the MsgInternalTo entity. If the MsgInternalTo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgInternalToMutation) OldDeleteAt

func (m *MsgInternalToMutation) OldDeleteAt(ctx context.Context) (v time.Time, err error)

OldDeleteAt returns the old "delete_at" field's value of the MsgInternalTo entity. If the MsgInternalTo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgInternalToMutation) OldField

func (m *MsgInternalToMutation) 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 (*MsgInternalToMutation) OldMsgInternalID

func (m *MsgInternalToMutation) OldMsgInternalID(ctx context.Context) (v int, err error)

OldMsgInternalID returns the old "msg_internal_id" field's value of the MsgInternalTo entity. If the MsgInternalTo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgInternalToMutation) OldReadAt

func (m *MsgInternalToMutation) OldReadAt(ctx context.Context) (v time.Time, err error)

OldReadAt returns the old "read_at" field's value of the MsgInternalTo entity. If the MsgInternalTo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgInternalToMutation) OldTenantID

func (m *MsgInternalToMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the MsgInternalTo entity. If the MsgInternalTo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgInternalToMutation) OldUserID

func (m *MsgInternalToMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the MsgInternalTo entity. If the MsgInternalTo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgInternalToMutation) Op

func (m *MsgInternalToMutation) Op() Op

Op returns the operation name.

func (*MsgInternalToMutation) ReadAt

func (m *MsgInternalToMutation) ReadAt() (r time.Time, exists bool)

ReadAt returns the value of the "read_at" field in the mutation.

func (*MsgInternalToMutation) ReadAtCleared

func (m *MsgInternalToMutation) ReadAtCleared() bool

ReadAtCleared returns if the "read_at" field was cleared in this mutation.

func (*MsgInternalToMutation) RemovedEdges

func (m *MsgInternalToMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MsgInternalToMutation) RemovedIDs

func (m *MsgInternalToMutation) 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 (*MsgInternalToMutation) ResetCreatedAt

func (m *MsgInternalToMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*MsgInternalToMutation) ResetDeleteAt

func (m *MsgInternalToMutation) ResetDeleteAt()

ResetDeleteAt resets all changes to the "delete_at" field.

func (*MsgInternalToMutation) ResetEdge

func (m *MsgInternalToMutation) 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 (*MsgInternalToMutation) ResetField

func (m *MsgInternalToMutation) 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 (*MsgInternalToMutation) ResetMsgInternal

func (m *MsgInternalToMutation) ResetMsgInternal()

ResetMsgInternal resets all changes to the "msg_internal" edge.

func (*MsgInternalToMutation) ResetMsgInternalID

func (m *MsgInternalToMutation) ResetMsgInternalID()

ResetMsgInternalID resets all changes to the "msg_internal_id" field.

func (*MsgInternalToMutation) ResetReadAt

func (m *MsgInternalToMutation) ResetReadAt()

ResetReadAt resets all changes to the "read_at" field.

func (*MsgInternalToMutation) ResetTenantID

func (m *MsgInternalToMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*MsgInternalToMutation) ResetUser

func (m *MsgInternalToMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*MsgInternalToMutation) ResetUserID

func (m *MsgInternalToMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*MsgInternalToMutation) SetCreatedAt

func (m *MsgInternalToMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*MsgInternalToMutation) SetDeleteAt

func (m *MsgInternalToMutation) SetDeleteAt(t time.Time)

SetDeleteAt sets the "delete_at" field.

func (*MsgInternalToMutation) SetField

func (m *MsgInternalToMutation) 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 (*MsgInternalToMutation) SetID

func (m *MsgInternalToMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of MsgInternalTo entities.

func (*MsgInternalToMutation) SetMsgInternalID

func (m *MsgInternalToMutation) SetMsgInternalID(i int)

SetMsgInternalID sets the "msg_internal_id" field.

func (*MsgInternalToMutation) SetOp

func (m *MsgInternalToMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MsgInternalToMutation) SetReadAt

func (m *MsgInternalToMutation) SetReadAt(t time.Time)

SetReadAt sets the "read_at" field.

func (*MsgInternalToMutation) SetTenantID

func (m *MsgInternalToMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*MsgInternalToMutation) SetUserID

func (m *MsgInternalToMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (*MsgInternalToMutation) TenantID

func (m *MsgInternalToMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (MsgInternalToMutation) Tx

func (m MsgInternalToMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MsgInternalToMutation) Type

func (m *MsgInternalToMutation) Type() string

Type returns the node type of this mutation (MsgInternalTo).

func (*MsgInternalToMutation) UserCleared

func (m *MsgInternalToMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*MsgInternalToMutation) UserID

func (m *MsgInternalToMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*MsgInternalToMutation) UserIDs

func (m *MsgInternalToMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*MsgInternalToMutation) Where

Where appends a list predicates to the MsgInternalToMutation builder.

func (*MsgInternalToMutation) WhereP

func (m *MsgInternalToMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MsgInternalToMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MsgInternalToOrder

type MsgInternalToOrder struct {
	Direction OrderDirection           `json:"direction"`
	Field     *MsgInternalToOrderField `json:"field"`
}

MsgInternalToOrder defines the ordering of MsgInternalTo.

type MsgInternalToOrderField

type MsgInternalToOrderField struct {
	// Value extracts the ordering value from the given MsgInternalTo.
	Value func(*MsgInternalTo) (ent.Value, error)
	// contains filtered or unexported fields
}

MsgInternalToOrderField defines the ordering field of MsgInternalTo.

func (MsgInternalToOrderField) MarshalGQL

func (f MsgInternalToOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (MsgInternalToOrderField) String

func (f MsgInternalToOrderField) String() string

String implement fmt.Stringer interface.

func (*MsgInternalToOrderField) UnmarshalGQL

func (f *MsgInternalToOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type MsgInternalToPaginateOption

type MsgInternalToPaginateOption func(*msginternaltoPager) error

MsgInternalToPaginateOption enables pagination customization.

func WithMsgInternalToFilter

func WithMsgInternalToFilter(filter func(*MsgInternalToQuery) (*MsgInternalToQuery, error)) MsgInternalToPaginateOption

WithMsgInternalToFilter configures pagination filter.

func WithMsgInternalToOrder

func WithMsgInternalToOrder(order *MsgInternalToOrder) MsgInternalToPaginateOption

WithMsgInternalToOrder configures pagination ordering.

type MsgInternalToQuery

type MsgInternalToQuery struct {
	// contains filtered or unexported fields
}

MsgInternalToQuery is the builder for querying MsgInternalTo entities.

func (*MsgInternalToQuery) Aggregate

func (mitq *MsgInternalToQuery) Aggregate(fns ...AggregateFunc) *MsgInternalToSelect

Aggregate returns a MsgInternalToSelect configured with the given aggregations.

func (*MsgInternalToQuery) All

func (mitq *MsgInternalToQuery) All(ctx context.Context) ([]*MsgInternalTo, error)

All executes the query and returns a list of MsgInternalTos.

func (*MsgInternalToQuery) AllX

func (mitq *MsgInternalToQuery) AllX(ctx context.Context) []*MsgInternalTo

AllX is like All, but panics if an error occurs.

func (*MsgInternalToQuery) Clone

func (mitq *MsgInternalToQuery) Clone() *MsgInternalToQuery

Clone returns a duplicate of the MsgInternalToQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MsgInternalToQuery) CollectFields

func (mit *MsgInternalToQuery) CollectFields(ctx context.Context, satisfies ...string) (*MsgInternalToQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*MsgInternalToQuery) Count

func (mitq *MsgInternalToQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MsgInternalToQuery) CountX

func (mitq *MsgInternalToQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MsgInternalToQuery) Exist

func (mitq *MsgInternalToQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MsgInternalToQuery) ExistX

func (mitq *MsgInternalToQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MsgInternalToQuery) First

func (mitq *MsgInternalToQuery) First(ctx context.Context) (*MsgInternalTo, error)

First returns the first MsgInternalTo entity from the query. Returns a *NotFoundError when no MsgInternalTo was found.

func (*MsgInternalToQuery) FirstID

func (mitq *MsgInternalToQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first MsgInternalTo ID from the query. Returns a *NotFoundError when no MsgInternalTo ID was found.

func (*MsgInternalToQuery) FirstIDX

func (mitq *MsgInternalToQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MsgInternalToQuery) FirstX

func (mitq *MsgInternalToQuery) FirstX(ctx context.Context) *MsgInternalTo

FirstX is like First, but panics if an error occurs.

func (*MsgInternalToQuery) GroupBy

func (mitq *MsgInternalToQuery) GroupBy(field string, fields ...string) *MsgInternalToGroupBy

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 {
	TenantID int `json:"tenant_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MsgInternalTo.Query().
	GroupBy(msginternalto.FieldTenantID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MsgInternalToQuery) IDs

func (mitq *MsgInternalToQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of MsgInternalTo IDs.

func (*MsgInternalToQuery) IDsX

func (mitq *MsgInternalToQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MsgInternalToQuery) Limit

func (mitq *MsgInternalToQuery) Limit(limit int) *MsgInternalToQuery

Limit the number of records to be returned by this query.

func (*MsgInternalToQuery) Offset

func (mitq *MsgInternalToQuery) Offset(offset int) *MsgInternalToQuery

Offset to start from.

func (*MsgInternalToQuery) Only

Only returns a single MsgInternalTo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MsgInternalTo entity is found. Returns a *NotFoundError when no MsgInternalTo entities are found.

func (*MsgInternalToQuery) OnlyID

func (mitq *MsgInternalToQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only MsgInternalTo ID in the query. Returns a *NotSingularError when more than one MsgInternalTo ID is found. Returns a *NotFoundError when no entities are found.

func (*MsgInternalToQuery) OnlyIDX

func (mitq *MsgInternalToQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MsgInternalToQuery) OnlyX

func (mitq *MsgInternalToQuery) OnlyX(ctx context.Context) *MsgInternalTo

OnlyX is like Only, but panics if an error occurs.

func (*MsgInternalToQuery) Order

Order specifies how the records should be ordered.

func (*MsgInternalToQuery) Paginate

func (mit *MsgInternalToQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...MsgInternalToPaginateOption,
) (*MsgInternalToConnection, error)

Paginate executes the query and returns a relay based cursor connection to MsgInternalTo.

func (*MsgInternalToQuery) QueryMsgInternal

func (mitq *MsgInternalToQuery) QueryMsgInternal() *MsgInternalQuery

QueryMsgInternal chains the current query on the "msg_internal" edge.

func (*MsgInternalToQuery) QueryUser

func (mitq *MsgInternalToQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*MsgInternalToQuery) Select

func (mitq *MsgInternalToQuery) Select(fields ...string) *MsgInternalToSelect

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 {
	TenantID int `json:"tenant_id,omitempty"`
}

client.MsgInternalTo.Query().
	Select(msginternalto.FieldTenantID).
	Scan(ctx, &v)

func (*MsgInternalToQuery) Unique

func (mitq *MsgInternalToQuery) Unique(unique bool) *MsgInternalToQuery

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 (*MsgInternalToQuery) Where

Where adds a new predicate for the MsgInternalToQuery builder.

func (*MsgInternalToQuery) WithMsgInternal

func (mitq *MsgInternalToQuery) WithMsgInternal(opts ...func(*MsgInternalQuery)) *MsgInternalToQuery

WithMsgInternal tells the query-builder to eager-load the nodes that are connected to the "msg_internal" edge. The optional arguments are used to configure the query builder of the edge.

func (*MsgInternalToQuery) WithUser

func (mitq *MsgInternalToQuery) WithUser(opts ...func(*UserQuery)) *MsgInternalToQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type MsgInternalToSelect

type MsgInternalToSelect struct {
	*MsgInternalToQuery
	// contains filtered or unexported fields
}

MsgInternalToSelect is the builder for selecting fields of MsgInternalTo entities.

func (*MsgInternalToSelect) Aggregate

func (mits *MsgInternalToSelect) Aggregate(fns ...AggregateFunc) *MsgInternalToSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MsgInternalToSelect) Bool

func (s *MsgInternalToSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MsgInternalToSelect) BoolX

func (s *MsgInternalToSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MsgInternalToSelect) Bools

func (s *MsgInternalToSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MsgInternalToSelect) BoolsX

func (s *MsgInternalToSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MsgInternalToSelect) Float64

func (s *MsgInternalToSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MsgInternalToSelect) Float64X

func (s *MsgInternalToSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MsgInternalToSelect) Float64s

func (s *MsgInternalToSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MsgInternalToSelect) Float64sX

func (s *MsgInternalToSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MsgInternalToSelect) Int

func (s *MsgInternalToSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MsgInternalToSelect) IntX

func (s *MsgInternalToSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MsgInternalToSelect) Ints

func (s *MsgInternalToSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MsgInternalToSelect) IntsX

func (s *MsgInternalToSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MsgInternalToSelect) Scan

func (mits *MsgInternalToSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MsgInternalToSelect) ScanX

func (s *MsgInternalToSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MsgInternalToSelect) String

func (s *MsgInternalToSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MsgInternalToSelect) StringX

func (s *MsgInternalToSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MsgInternalToSelect) Strings

func (s *MsgInternalToSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MsgInternalToSelect) StringsX

func (s *MsgInternalToSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MsgInternalToUpdate

type MsgInternalToUpdate struct {
	// contains filtered or unexported fields
}

MsgInternalToUpdate is the builder for updating MsgInternalTo entities.

func (*MsgInternalToUpdate) ClearDeleteAt

func (mitu *MsgInternalToUpdate) ClearDeleteAt() *MsgInternalToUpdate

ClearDeleteAt clears the value of the "delete_at" field.

func (*MsgInternalToUpdate) ClearReadAt

func (mitu *MsgInternalToUpdate) ClearReadAt() *MsgInternalToUpdate

ClearReadAt clears the value of the "read_at" field.

func (*MsgInternalToUpdate) Exec

func (mitu *MsgInternalToUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgInternalToUpdate) ExecX

func (mitu *MsgInternalToUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgInternalToUpdate) Mutation

func (mitu *MsgInternalToUpdate) Mutation() *MsgInternalToMutation

Mutation returns the MsgInternalToMutation object of the builder.

func (*MsgInternalToUpdate) Save

func (mitu *MsgInternalToUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MsgInternalToUpdate) SaveX

func (mitu *MsgInternalToUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MsgInternalToUpdate) SetDeleteAt

func (mitu *MsgInternalToUpdate) SetDeleteAt(t time.Time) *MsgInternalToUpdate

SetDeleteAt sets the "delete_at" field.

func (*MsgInternalToUpdate) SetNillableDeleteAt

func (mitu *MsgInternalToUpdate) SetNillableDeleteAt(t *time.Time) *MsgInternalToUpdate

SetNillableDeleteAt sets the "delete_at" field if the given value is not nil.

func (*MsgInternalToUpdate) SetNillableReadAt

func (mitu *MsgInternalToUpdate) SetNillableReadAt(t *time.Time) *MsgInternalToUpdate

SetNillableReadAt sets the "read_at" field if the given value is not nil.

func (*MsgInternalToUpdate) SetReadAt

func (mitu *MsgInternalToUpdate) SetReadAt(t time.Time) *MsgInternalToUpdate

SetReadAt sets the "read_at" field.

func (*MsgInternalToUpdate) Where

Where appends a list predicates to the MsgInternalToUpdate builder.

type MsgInternalToUpdateOne

type MsgInternalToUpdateOne struct {
	// contains filtered or unexported fields
}

MsgInternalToUpdateOne is the builder for updating a single MsgInternalTo entity.

func (*MsgInternalToUpdateOne) ClearDeleteAt

func (mituo *MsgInternalToUpdateOne) ClearDeleteAt() *MsgInternalToUpdateOne

ClearDeleteAt clears the value of the "delete_at" field.

func (*MsgInternalToUpdateOne) ClearReadAt

func (mituo *MsgInternalToUpdateOne) ClearReadAt() *MsgInternalToUpdateOne

ClearReadAt clears the value of the "read_at" field.

func (*MsgInternalToUpdateOne) Exec

func (mituo *MsgInternalToUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MsgInternalToUpdateOne) ExecX

func (mituo *MsgInternalToUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgInternalToUpdateOne) Mutation

func (mituo *MsgInternalToUpdateOne) Mutation() *MsgInternalToMutation

Mutation returns the MsgInternalToMutation object of the builder.

func (*MsgInternalToUpdateOne) Save

Save executes the query and returns the updated MsgInternalTo entity.

func (*MsgInternalToUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*MsgInternalToUpdateOne) Select

func (mituo *MsgInternalToUpdateOne) Select(field string, fields ...string) *MsgInternalToUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MsgInternalToUpdateOne) SetDeleteAt

func (mituo *MsgInternalToUpdateOne) SetDeleteAt(t time.Time) *MsgInternalToUpdateOne

SetDeleteAt sets the "delete_at" field.

func (*MsgInternalToUpdateOne) SetNillableDeleteAt

func (mituo *MsgInternalToUpdateOne) SetNillableDeleteAt(t *time.Time) *MsgInternalToUpdateOne

SetNillableDeleteAt sets the "delete_at" field if the given value is not nil.

func (*MsgInternalToUpdateOne) SetNillableReadAt

func (mituo *MsgInternalToUpdateOne) SetNillableReadAt(t *time.Time) *MsgInternalToUpdateOne

SetNillableReadAt sets the "read_at" field if the given value is not nil.

func (*MsgInternalToUpdateOne) SetReadAt

SetReadAt sets the "read_at" field.

func (*MsgInternalToUpdateOne) Where

Where appends a list predicates to the MsgInternalToUpdate builder.

type MsgInternalToUpsert

type MsgInternalToUpsert struct {
	*sql.UpdateSet
}

MsgInternalToUpsert is the "OnConflict" setter.

func (*MsgInternalToUpsert) ClearDeleteAt

func (u *MsgInternalToUpsert) ClearDeleteAt() *MsgInternalToUpsert

ClearDeleteAt clears the value of the "delete_at" field.

func (*MsgInternalToUpsert) ClearReadAt

func (u *MsgInternalToUpsert) ClearReadAt() *MsgInternalToUpsert

ClearReadAt clears the value of the "read_at" field.

func (*MsgInternalToUpsert) SetDeleteAt

func (u *MsgInternalToUpsert) SetDeleteAt(v time.Time) *MsgInternalToUpsert

SetDeleteAt sets the "delete_at" field.

func (*MsgInternalToUpsert) SetReadAt

SetReadAt sets the "read_at" field.

func (*MsgInternalToUpsert) UpdateDeleteAt

func (u *MsgInternalToUpsert) UpdateDeleteAt() *MsgInternalToUpsert

UpdateDeleteAt sets the "delete_at" field to the value that was provided on create.

func (*MsgInternalToUpsert) UpdateReadAt

func (u *MsgInternalToUpsert) UpdateReadAt() *MsgInternalToUpsert

UpdateReadAt sets the "read_at" field to the value that was provided on create.

type MsgInternalToUpsertBulk

type MsgInternalToUpsertBulk struct {
	// contains filtered or unexported fields
}

MsgInternalToUpsertBulk is the builder for "upsert"-ing a bulk of MsgInternalTo nodes.

func (*MsgInternalToUpsertBulk) ClearDeleteAt

ClearDeleteAt clears the value of the "delete_at" field.

func (*MsgInternalToUpsertBulk) ClearReadAt

ClearReadAt clears the value of the "read_at" field.

func (*MsgInternalToUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgInternalToUpsertBulk) Exec

Exec executes the query.

func (*MsgInternalToUpsertBulk) ExecX

func (u *MsgInternalToUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgInternalToUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgInternalTo.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*MsgInternalToUpsertBulk) SetDeleteAt

SetDeleteAt sets the "delete_at" field.

func (*MsgInternalToUpsertBulk) SetReadAt

SetReadAt sets the "read_at" field.

func (*MsgInternalToUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the MsgInternalToCreateBulk.OnConflict documentation for more info.

func (*MsgInternalToUpsertBulk) UpdateDeleteAt

func (u *MsgInternalToUpsertBulk) UpdateDeleteAt() *MsgInternalToUpsertBulk

UpdateDeleteAt sets the "delete_at" field to the value that was provided on create.

func (*MsgInternalToUpsertBulk) UpdateNewValues

func (u *MsgInternalToUpsertBulk) UpdateNewValues() *MsgInternalToUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.MsgInternalTo.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msginternalto.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgInternalToUpsertBulk) UpdateReadAt

UpdateReadAt sets the "read_at" field to the value that was provided on create.

type MsgInternalToUpsertOne

type MsgInternalToUpsertOne struct {
	// contains filtered or unexported fields
}

MsgInternalToUpsertOne is the builder for "upsert"-ing

one MsgInternalTo node.

func (*MsgInternalToUpsertOne) ClearDeleteAt

func (u *MsgInternalToUpsertOne) ClearDeleteAt() *MsgInternalToUpsertOne

ClearDeleteAt clears the value of the "delete_at" field.

func (*MsgInternalToUpsertOne) ClearReadAt

ClearReadAt clears the value of the "read_at" field.

func (*MsgInternalToUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgInternalToUpsertOne) Exec

Exec executes the query.

func (*MsgInternalToUpsertOne) ExecX

func (u *MsgInternalToUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgInternalToUpsertOne) ID

func (u *MsgInternalToUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*MsgInternalToUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*MsgInternalToUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgInternalTo.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*MsgInternalToUpsertOne) SetDeleteAt

SetDeleteAt sets the "delete_at" field.

func (*MsgInternalToUpsertOne) SetReadAt

SetReadAt sets the "read_at" field.

func (*MsgInternalToUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the MsgInternalToCreate.OnConflict documentation for more info.

func (*MsgInternalToUpsertOne) UpdateDeleteAt

func (u *MsgInternalToUpsertOne) UpdateDeleteAt() *MsgInternalToUpsertOne

UpdateDeleteAt sets the "delete_at" field to the value that was provided on create.

func (*MsgInternalToUpsertOne) UpdateNewValues

func (u *MsgInternalToUpsertOne) UpdateNewValues() *MsgInternalToUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.MsgInternalTo.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msginternalto.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgInternalToUpsertOne) UpdateReadAt

UpdateReadAt sets the "read_at" field to the value that was provided on create.

type MsgInternalToWhereInput

type MsgInternalToWhereInput struct {
	Predicates []predicate.MsgInternalTo  `json:"-"`
	Not        *MsgInternalToWhereInput   `json:"not,omitempty"`
	Or         []*MsgInternalToWhereInput `json:"or,omitempty"`
	And        []*MsgInternalToWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "msg_internal_id" field predicates.
	MsgInternalID      *int  `json:"msgInternalID,omitempty"`
	MsgInternalIDNEQ   *int  `json:"msgInternalIDNEQ,omitempty"`
	MsgInternalIDIn    []int `json:"msgInternalIDIn,omitempty"`
	MsgInternalIDNotIn []int `json:"msgInternalIDNotIn,omitempty"`

	// "user_id" field predicates.
	UserID      *int  `json:"userID,omitempty"`
	UserIDNEQ   *int  `json:"userIDNEQ,omitempty"`
	UserIDIn    []int `json:"userIDIn,omitempty"`
	UserIDNotIn []int `json:"userIDNotIn,omitempty"`

	// "read_at" field predicates.
	ReadAt       *time.Time  `json:"readAt,omitempty"`
	ReadAtNEQ    *time.Time  `json:"readAtNEQ,omitempty"`
	ReadAtIn     []time.Time `json:"readAtIn,omitempty"`
	ReadAtNotIn  []time.Time `json:"readAtNotIn,omitempty"`
	ReadAtGT     *time.Time  `json:"readAtGT,omitempty"`
	ReadAtGTE    *time.Time  `json:"readAtGTE,omitempty"`
	ReadAtLT     *time.Time  `json:"readAtLT,omitempty"`
	ReadAtLTE    *time.Time  `json:"readAtLTE,omitempty"`
	ReadAtIsNil  bool        `json:"readAtIsNil,omitempty"`
	ReadAtNotNil bool        `json:"readAtNotNil,omitempty"`

	// "delete_at" field predicates.
	DeleteAt       *time.Time  `json:"deleteAt,omitempty"`
	DeleteAtNEQ    *time.Time  `json:"deleteAtNEQ,omitempty"`
	DeleteAtIn     []time.Time `json:"deleteAtIn,omitempty"`
	DeleteAtNotIn  []time.Time `json:"deleteAtNotIn,omitempty"`
	DeleteAtGT     *time.Time  `json:"deleteAtGT,omitempty"`
	DeleteAtGTE    *time.Time  `json:"deleteAtGTE,omitempty"`
	DeleteAtLT     *time.Time  `json:"deleteAtLT,omitempty"`
	DeleteAtLTE    *time.Time  `json:"deleteAtLTE,omitempty"`
	DeleteAtIsNil  bool        `json:"deleteAtIsNil,omitempty"`
	DeleteAtNotNil bool        `json:"deleteAtNotNil,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "msg_internal" edge predicates.
	HasMsgInternal     *bool                    `json:"hasMsgInternal,omitempty"`
	HasMsgInternalWith []*MsgInternalWhereInput `json:"hasMsgInternalWith,omitempty"`
}

MsgInternalToWhereInput represents a where input for filtering MsgInternalTo queries.

func (*MsgInternalToWhereInput) AddPredicates

func (i *MsgInternalToWhereInput) AddPredicates(predicates ...predicate.MsgInternalTo)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*MsgInternalToWhereInput) Filter

Filter applies the MsgInternalToWhereInput filter on the MsgInternalToQuery builder.

func (*MsgInternalToWhereInput) P

P returns a predicate for filtering msginternaltos. An error is returned if the input is empty or invalid.

type MsgInternalTos

type MsgInternalTos []*MsgInternalTo

MsgInternalTos is a parsable slice of MsgInternalTo.

type MsgInternalUpdate

type MsgInternalUpdate struct {
	// contains filtered or unexported fields
}

MsgInternalUpdate is the builder for updating MsgInternal entities.

func (*MsgInternalUpdate) AddMsgInternalTo

func (miu *MsgInternalUpdate) AddMsgInternalTo(m ...*MsgInternalTo) *MsgInternalUpdate

AddMsgInternalTo adds the "msg_internal_to" edges to the MsgInternalTo entity.

func (*MsgInternalUpdate) AddMsgInternalToIDs

func (miu *MsgInternalUpdate) AddMsgInternalToIDs(ids ...int) *MsgInternalUpdate

AddMsgInternalToIDs adds the "msg_internal_to" edge to the MsgInternalTo entity by IDs.

func (*MsgInternalUpdate) AddUpdatedBy

func (miu *MsgInternalUpdate) AddUpdatedBy(i int) *MsgInternalUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgInternalUpdate) ClearBody

func (miu *MsgInternalUpdate) ClearBody() *MsgInternalUpdate

ClearBody clears the value of the "body" field.

func (*MsgInternalUpdate) ClearMsgInternalTo

func (miu *MsgInternalUpdate) ClearMsgInternalTo() *MsgInternalUpdate

ClearMsgInternalTo clears all "msg_internal_to" edges to the MsgInternalTo entity.

func (*MsgInternalUpdate) ClearRedirect

func (miu *MsgInternalUpdate) ClearRedirect() *MsgInternalUpdate

ClearRedirect clears the value of the "redirect" field.

func (*MsgInternalUpdate) ClearUpdatedAt

func (miu *MsgInternalUpdate) ClearUpdatedAt() *MsgInternalUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgInternalUpdate) ClearUpdatedBy

func (miu *MsgInternalUpdate) ClearUpdatedBy() *MsgInternalUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgInternalUpdate) Exec

func (miu *MsgInternalUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgInternalUpdate) ExecX

func (miu *MsgInternalUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgInternalUpdate) Mutation

func (miu *MsgInternalUpdate) Mutation() *MsgInternalMutation

Mutation returns the MsgInternalMutation object of the builder.

func (*MsgInternalUpdate) RemoveMsgInternalTo

func (miu *MsgInternalUpdate) RemoveMsgInternalTo(m ...*MsgInternalTo) *MsgInternalUpdate

RemoveMsgInternalTo removes "msg_internal_to" edges to MsgInternalTo entities.

func (*MsgInternalUpdate) RemoveMsgInternalToIDs

func (miu *MsgInternalUpdate) RemoveMsgInternalToIDs(ids ...int) *MsgInternalUpdate

RemoveMsgInternalToIDs removes the "msg_internal_to" edge to MsgInternalTo entities by IDs.

func (*MsgInternalUpdate) Save

func (miu *MsgInternalUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MsgInternalUpdate) SaveX

func (miu *MsgInternalUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MsgInternalUpdate) SetBody

func (miu *MsgInternalUpdate) SetBody(s string) *MsgInternalUpdate

SetBody sets the "body" field.

func (*MsgInternalUpdate) SetCategory

func (miu *MsgInternalUpdate) SetCategory(s string) *MsgInternalUpdate

SetCategory sets the "category" field.

func (*MsgInternalUpdate) SetFormat

func (miu *MsgInternalUpdate) SetFormat(s string) *MsgInternalUpdate

SetFormat sets the "format" field.

func (*MsgInternalUpdate) SetNillableBody

func (miu *MsgInternalUpdate) SetNillableBody(s *string) *MsgInternalUpdate

SetNillableBody sets the "body" field if the given value is not nil.

func (*MsgInternalUpdate) SetNillableRedirect

func (miu *MsgInternalUpdate) SetNillableRedirect(s *string) *MsgInternalUpdate

SetNillableRedirect sets the "redirect" field if the given value is not nil.

func (*MsgInternalUpdate) SetNillableUpdatedAt

func (miu *MsgInternalUpdate) SetNillableUpdatedAt(t *time.Time) *MsgInternalUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MsgInternalUpdate) SetNillableUpdatedBy

func (miu *MsgInternalUpdate) SetNillableUpdatedBy(i *int) *MsgInternalUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgInternalUpdate) SetRedirect

func (miu *MsgInternalUpdate) SetRedirect(s string) *MsgInternalUpdate

SetRedirect sets the "redirect" field.

func (*MsgInternalUpdate) SetSubject

func (miu *MsgInternalUpdate) SetSubject(s string) *MsgInternalUpdate

SetSubject sets the "subject" field.

func (*MsgInternalUpdate) SetUpdatedAt

func (miu *MsgInternalUpdate) SetUpdatedAt(t time.Time) *MsgInternalUpdate

SetUpdatedAt sets the "updated_at" field.

func (*MsgInternalUpdate) SetUpdatedBy

func (miu *MsgInternalUpdate) SetUpdatedBy(i int) *MsgInternalUpdate

SetUpdatedBy sets the "updated_by" field.

func (*MsgInternalUpdate) Where

Where appends a list predicates to the MsgInternalUpdate builder.

type MsgInternalUpdateOne

type MsgInternalUpdateOne struct {
	// contains filtered or unexported fields
}

MsgInternalUpdateOne is the builder for updating a single MsgInternal entity.

func (*MsgInternalUpdateOne) AddMsgInternalTo

func (miuo *MsgInternalUpdateOne) AddMsgInternalTo(m ...*MsgInternalTo) *MsgInternalUpdateOne

AddMsgInternalTo adds the "msg_internal_to" edges to the MsgInternalTo entity.

func (*MsgInternalUpdateOne) AddMsgInternalToIDs

func (miuo *MsgInternalUpdateOne) AddMsgInternalToIDs(ids ...int) *MsgInternalUpdateOne

AddMsgInternalToIDs adds the "msg_internal_to" edge to the MsgInternalTo entity by IDs.

func (*MsgInternalUpdateOne) AddUpdatedBy

func (miuo *MsgInternalUpdateOne) AddUpdatedBy(i int) *MsgInternalUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgInternalUpdateOne) ClearBody

func (miuo *MsgInternalUpdateOne) ClearBody() *MsgInternalUpdateOne

ClearBody clears the value of the "body" field.

func (*MsgInternalUpdateOne) ClearMsgInternalTo

func (miuo *MsgInternalUpdateOne) ClearMsgInternalTo() *MsgInternalUpdateOne

ClearMsgInternalTo clears all "msg_internal_to" edges to the MsgInternalTo entity.

func (*MsgInternalUpdateOne) ClearRedirect

func (miuo *MsgInternalUpdateOne) ClearRedirect() *MsgInternalUpdateOne

ClearRedirect clears the value of the "redirect" field.

func (*MsgInternalUpdateOne) ClearUpdatedAt

func (miuo *MsgInternalUpdateOne) ClearUpdatedAt() *MsgInternalUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgInternalUpdateOne) ClearUpdatedBy

func (miuo *MsgInternalUpdateOne) ClearUpdatedBy() *MsgInternalUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgInternalUpdateOne) Exec

func (miuo *MsgInternalUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MsgInternalUpdateOne) ExecX

func (miuo *MsgInternalUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgInternalUpdateOne) Mutation

func (miuo *MsgInternalUpdateOne) Mutation() *MsgInternalMutation

Mutation returns the MsgInternalMutation object of the builder.

func (*MsgInternalUpdateOne) RemoveMsgInternalTo

func (miuo *MsgInternalUpdateOne) RemoveMsgInternalTo(m ...*MsgInternalTo) *MsgInternalUpdateOne

RemoveMsgInternalTo removes "msg_internal_to" edges to MsgInternalTo entities.

func (*MsgInternalUpdateOne) RemoveMsgInternalToIDs

func (miuo *MsgInternalUpdateOne) RemoveMsgInternalToIDs(ids ...int) *MsgInternalUpdateOne

RemoveMsgInternalToIDs removes the "msg_internal_to" edge to MsgInternalTo entities by IDs.

func (*MsgInternalUpdateOne) Save

Save executes the query and returns the updated MsgInternal entity.

func (*MsgInternalUpdateOne) SaveX

func (miuo *MsgInternalUpdateOne) SaveX(ctx context.Context) *MsgInternal

SaveX is like Save, but panics if an error occurs.

func (*MsgInternalUpdateOne) Select

func (miuo *MsgInternalUpdateOne) Select(field string, fields ...string) *MsgInternalUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MsgInternalUpdateOne) SetBody

SetBody sets the "body" field.

func (*MsgInternalUpdateOne) SetCategory

func (miuo *MsgInternalUpdateOne) SetCategory(s string) *MsgInternalUpdateOne

SetCategory sets the "category" field.

func (*MsgInternalUpdateOne) SetFormat

func (miuo *MsgInternalUpdateOne) SetFormat(s string) *MsgInternalUpdateOne

SetFormat sets the "format" field.

func (*MsgInternalUpdateOne) SetNillableBody

func (miuo *MsgInternalUpdateOne) SetNillableBody(s *string) *MsgInternalUpdateOne

SetNillableBody sets the "body" field if the given value is not nil.

func (*MsgInternalUpdateOne) SetNillableRedirect

func (miuo *MsgInternalUpdateOne) SetNillableRedirect(s *string) *MsgInternalUpdateOne

SetNillableRedirect sets the "redirect" field if the given value is not nil.

func (*MsgInternalUpdateOne) SetNillableUpdatedAt

func (miuo *MsgInternalUpdateOne) SetNillableUpdatedAt(t *time.Time) *MsgInternalUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MsgInternalUpdateOne) SetNillableUpdatedBy

func (miuo *MsgInternalUpdateOne) SetNillableUpdatedBy(i *int) *MsgInternalUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgInternalUpdateOne) SetRedirect

func (miuo *MsgInternalUpdateOne) SetRedirect(s string) *MsgInternalUpdateOne

SetRedirect sets the "redirect" field.

func (*MsgInternalUpdateOne) SetSubject

func (miuo *MsgInternalUpdateOne) SetSubject(s string) *MsgInternalUpdateOne

SetSubject sets the "subject" field.

func (*MsgInternalUpdateOne) SetUpdatedAt

func (miuo *MsgInternalUpdateOne) SetUpdatedAt(t time.Time) *MsgInternalUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*MsgInternalUpdateOne) SetUpdatedBy

func (miuo *MsgInternalUpdateOne) SetUpdatedBy(i int) *MsgInternalUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*MsgInternalUpdateOne) Where

Where appends a list predicates to the MsgInternalUpdate builder.

type MsgInternalUpsert

type MsgInternalUpsert struct {
	*sql.UpdateSet
}

MsgInternalUpsert is the "OnConflict" setter.

func (*MsgInternalUpsert) AddUpdatedBy

func (u *MsgInternalUpsert) AddUpdatedBy(v int) *MsgInternalUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgInternalUpsert) ClearBody

func (u *MsgInternalUpsert) ClearBody() *MsgInternalUpsert

ClearBody clears the value of the "body" field.

func (*MsgInternalUpsert) ClearRedirect

func (u *MsgInternalUpsert) ClearRedirect() *MsgInternalUpsert

ClearRedirect clears the value of the "redirect" field.

func (*MsgInternalUpsert) ClearUpdatedAt

func (u *MsgInternalUpsert) ClearUpdatedAt() *MsgInternalUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgInternalUpsert) ClearUpdatedBy

func (u *MsgInternalUpsert) ClearUpdatedBy() *MsgInternalUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgInternalUpsert) SetBody

SetBody sets the "body" field.

func (*MsgInternalUpsert) SetCategory

func (u *MsgInternalUpsert) SetCategory(v string) *MsgInternalUpsert

SetCategory sets the "category" field.

func (*MsgInternalUpsert) SetFormat

func (u *MsgInternalUpsert) SetFormat(v string) *MsgInternalUpsert

SetFormat sets the "format" field.

func (*MsgInternalUpsert) SetRedirect

func (u *MsgInternalUpsert) SetRedirect(v string) *MsgInternalUpsert

SetRedirect sets the "redirect" field.

func (*MsgInternalUpsert) SetSubject

func (u *MsgInternalUpsert) SetSubject(v string) *MsgInternalUpsert

SetSubject sets the "subject" field.

func (*MsgInternalUpsert) SetUpdatedAt

func (u *MsgInternalUpsert) SetUpdatedAt(v time.Time) *MsgInternalUpsert

SetUpdatedAt sets the "updated_at" field.

func (*MsgInternalUpsert) SetUpdatedBy

func (u *MsgInternalUpsert) SetUpdatedBy(v int) *MsgInternalUpsert

SetUpdatedBy sets the "updated_by" field.

func (*MsgInternalUpsert) UpdateBody

func (u *MsgInternalUpsert) UpdateBody() *MsgInternalUpsert

UpdateBody sets the "body" field to the value that was provided on create.

func (*MsgInternalUpsert) UpdateCategory

func (u *MsgInternalUpsert) UpdateCategory() *MsgInternalUpsert

UpdateCategory sets the "category" field to the value that was provided on create.

func (*MsgInternalUpsert) UpdateFormat

func (u *MsgInternalUpsert) UpdateFormat() *MsgInternalUpsert

UpdateFormat sets the "format" field to the value that was provided on create.

func (*MsgInternalUpsert) UpdateRedirect

func (u *MsgInternalUpsert) UpdateRedirect() *MsgInternalUpsert

UpdateRedirect sets the "redirect" field to the value that was provided on create.

func (*MsgInternalUpsert) UpdateSubject

func (u *MsgInternalUpsert) UpdateSubject() *MsgInternalUpsert

UpdateSubject sets the "subject" field to the value that was provided on create.

func (*MsgInternalUpsert) UpdateUpdatedAt

func (u *MsgInternalUpsert) UpdateUpdatedAt() *MsgInternalUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgInternalUpsert) UpdateUpdatedBy

func (u *MsgInternalUpsert) UpdateUpdatedBy() *MsgInternalUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgInternalUpsertBulk

type MsgInternalUpsertBulk struct {
	// contains filtered or unexported fields
}

MsgInternalUpsertBulk is the builder for "upsert"-ing a bulk of MsgInternal nodes.

func (*MsgInternalUpsertBulk) AddUpdatedBy

func (u *MsgInternalUpsertBulk) AddUpdatedBy(v int) *MsgInternalUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgInternalUpsertBulk) ClearBody

ClearBody clears the value of the "body" field.

func (*MsgInternalUpsertBulk) ClearRedirect

func (u *MsgInternalUpsertBulk) ClearRedirect() *MsgInternalUpsertBulk

ClearRedirect clears the value of the "redirect" field.

func (*MsgInternalUpsertBulk) ClearUpdatedAt

func (u *MsgInternalUpsertBulk) ClearUpdatedAt() *MsgInternalUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgInternalUpsertBulk) ClearUpdatedBy

func (u *MsgInternalUpsertBulk) ClearUpdatedBy() *MsgInternalUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgInternalUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgInternalUpsertBulk) Exec

Exec executes the query.

func (*MsgInternalUpsertBulk) ExecX

func (u *MsgInternalUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgInternalUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgInternal.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*MsgInternalUpsertBulk) SetBody

SetBody sets the "body" field.

func (*MsgInternalUpsertBulk) SetCategory

SetCategory sets the "category" field.

func (*MsgInternalUpsertBulk) SetFormat

SetFormat sets the "format" field.

func (*MsgInternalUpsertBulk) SetRedirect

SetRedirect sets the "redirect" field.

func (*MsgInternalUpsertBulk) SetSubject

SetSubject sets the "subject" field.

func (*MsgInternalUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*MsgInternalUpsertBulk) SetUpdatedBy

func (u *MsgInternalUpsertBulk) SetUpdatedBy(v int) *MsgInternalUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*MsgInternalUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the MsgInternalCreateBulk.OnConflict documentation for more info.

func (*MsgInternalUpsertBulk) UpdateBody

UpdateBody sets the "body" field to the value that was provided on create.

func (*MsgInternalUpsertBulk) UpdateCategory

func (u *MsgInternalUpsertBulk) UpdateCategory() *MsgInternalUpsertBulk

UpdateCategory sets the "category" field to the value that was provided on create.

func (*MsgInternalUpsertBulk) UpdateFormat

func (u *MsgInternalUpsertBulk) UpdateFormat() *MsgInternalUpsertBulk

UpdateFormat sets the "format" field to the value that was provided on create.

func (*MsgInternalUpsertBulk) UpdateNewValues

func (u *MsgInternalUpsertBulk) UpdateNewValues() *MsgInternalUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.MsgInternal.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msginternal.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgInternalUpsertBulk) UpdateRedirect

func (u *MsgInternalUpsertBulk) UpdateRedirect() *MsgInternalUpsertBulk

UpdateRedirect sets the "redirect" field to the value that was provided on create.

func (*MsgInternalUpsertBulk) UpdateSubject

func (u *MsgInternalUpsertBulk) UpdateSubject() *MsgInternalUpsertBulk

UpdateSubject sets the "subject" field to the value that was provided on create.

func (*MsgInternalUpsertBulk) UpdateUpdatedAt

func (u *MsgInternalUpsertBulk) UpdateUpdatedAt() *MsgInternalUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgInternalUpsertBulk) UpdateUpdatedBy

func (u *MsgInternalUpsertBulk) UpdateUpdatedBy() *MsgInternalUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgInternalUpsertOne

type MsgInternalUpsertOne struct {
	// contains filtered or unexported fields
}

MsgInternalUpsertOne is the builder for "upsert"-ing

one MsgInternal node.

func (*MsgInternalUpsertOne) AddUpdatedBy

func (u *MsgInternalUpsertOne) AddUpdatedBy(v int) *MsgInternalUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgInternalUpsertOne) ClearBody

ClearBody clears the value of the "body" field.

func (*MsgInternalUpsertOne) ClearRedirect

func (u *MsgInternalUpsertOne) ClearRedirect() *MsgInternalUpsertOne

ClearRedirect clears the value of the "redirect" field.

func (*MsgInternalUpsertOne) ClearUpdatedAt

func (u *MsgInternalUpsertOne) ClearUpdatedAt() *MsgInternalUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgInternalUpsertOne) ClearUpdatedBy

func (u *MsgInternalUpsertOne) ClearUpdatedBy() *MsgInternalUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgInternalUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgInternalUpsertOne) Exec

Exec executes the query.

func (*MsgInternalUpsertOne) ExecX

func (u *MsgInternalUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgInternalUpsertOne) ID

func (u *MsgInternalUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*MsgInternalUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*MsgInternalUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgInternal.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*MsgInternalUpsertOne) SetBody

SetBody sets the "body" field.

func (*MsgInternalUpsertOne) SetCategory

SetCategory sets the "category" field.

func (*MsgInternalUpsertOne) SetFormat

SetFormat sets the "format" field.

func (*MsgInternalUpsertOne) SetRedirect

SetRedirect sets the "redirect" field.

func (*MsgInternalUpsertOne) SetSubject

SetSubject sets the "subject" field.

func (*MsgInternalUpsertOne) SetUpdatedAt

func (u *MsgInternalUpsertOne) SetUpdatedAt(v time.Time) *MsgInternalUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*MsgInternalUpsertOne) SetUpdatedBy

func (u *MsgInternalUpsertOne) SetUpdatedBy(v int) *MsgInternalUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*MsgInternalUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the MsgInternalCreate.OnConflict documentation for more info.

func (*MsgInternalUpsertOne) UpdateBody

func (u *MsgInternalUpsertOne) UpdateBody() *MsgInternalUpsertOne

UpdateBody sets the "body" field to the value that was provided on create.

func (*MsgInternalUpsertOne) UpdateCategory

func (u *MsgInternalUpsertOne) UpdateCategory() *MsgInternalUpsertOne

UpdateCategory sets the "category" field to the value that was provided on create.

func (*MsgInternalUpsertOne) UpdateFormat

func (u *MsgInternalUpsertOne) UpdateFormat() *MsgInternalUpsertOne

UpdateFormat sets the "format" field to the value that was provided on create.

func (*MsgInternalUpsertOne) UpdateNewValues

func (u *MsgInternalUpsertOne) UpdateNewValues() *MsgInternalUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.MsgInternal.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msginternal.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgInternalUpsertOne) UpdateRedirect

func (u *MsgInternalUpsertOne) UpdateRedirect() *MsgInternalUpsertOne

UpdateRedirect sets the "redirect" field to the value that was provided on create.

func (*MsgInternalUpsertOne) UpdateSubject

func (u *MsgInternalUpsertOne) UpdateSubject() *MsgInternalUpsertOne

UpdateSubject sets the "subject" field to the value that was provided on create.

func (*MsgInternalUpsertOne) UpdateUpdatedAt

func (u *MsgInternalUpsertOne) UpdateUpdatedAt() *MsgInternalUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgInternalUpsertOne) UpdateUpdatedBy

func (u *MsgInternalUpsertOne) UpdateUpdatedBy() *MsgInternalUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgInternalWhereInput

type MsgInternalWhereInput struct {
	Predicates []predicate.MsgInternal  `json:"-"`
	Not        *MsgInternalWhereInput   `json:"not,omitempty"`
	Or         []*MsgInternalWhereInput `json:"or,omitempty"`
	And        []*MsgInternalWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "category" field predicates.
	Category             *string  `json:"category,omitempty"`
	CategoryNEQ          *string  `json:"categoryNEQ,omitempty"`
	CategoryIn           []string `json:"categoryIn,omitempty"`
	CategoryNotIn        []string `json:"categoryNotIn,omitempty"`
	CategoryGT           *string  `json:"categoryGT,omitempty"`
	CategoryGTE          *string  `json:"categoryGTE,omitempty"`
	CategoryLT           *string  `json:"categoryLT,omitempty"`
	CategoryLTE          *string  `json:"categoryLTE,omitempty"`
	CategoryContains     *string  `json:"categoryContains,omitempty"`
	CategoryHasPrefix    *string  `json:"categoryHasPrefix,omitempty"`
	CategoryHasSuffix    *string  `json:"categoryHasSuffix,omitempty"`
	CategoryEqualFold    *string  `json:"categoryEqualFold,omitempty"`
	CategoryContainsFold *string  `json:"categoryContainsFold,omitempty"`

	// "subject" field predicates.
	Subject             *string  `json:"subject,omitempty"`
	SubjectNEQ          *string  `json:"subjectNEQ,omitempty"`
	SubjectIn           []string `json:"subjectIn,omitempty"`
	SubjectNotIn        []string `json:"subjectNotIn,omitempty"`
	SubjectGT           *string  `json:"subjectGT,omitempty"`
	SubjectGTE          *string  `json:"subjectGTE,omitempty"`
	SubjectLT           *string  `json:"subjectLT,omitempty"`
	SubjectLTE          *string  `json:"subjectLTE,omitempty"`
	SubjectContains     *string  `json:"subjectContains,omitempty"`
	SubjectHasPrefix    *string  `json:"subjectHasPrefix,omitempty"`
	SubjectHasSuffix    *string  `json:"subjectHasSuffix,omitempty"`
	SubjectEqualFold    *string  `json:"subjectEqualFold,omitempty"`
	SubjectContainsFold *string  `json:"subjectContainsFold,omitempty"`

	// "format" field predicates.
	Format             *string  `json:"format,omitempty"`
	FormatNEQ          *string  `json:"formatNEQ,omitempty"`
	FormatIn           []string `json:"formatIn,omitempty"`
	FormatNotIn        []string `json:"formatNotIn,omitempty"`
	FormatGT           *string  `json:"formatGT,omitempty"`
	FormatGTE          *string  `json:"formatGTE,omitempty"`
	FormatLT           *string  `json:"formatLT,omitempty"`
	FormatLTE          *string  `json:"formatLTE,omitempty"`
	FormatContains     *string  `json:"formatContains,omitempty"`
	FormatHasPrefix    *string  `json:"formatHasPrefix,omitempty"`
	FormatHasSuffix    *string  `json:"formatHasSuffix,omitempty"`
	FormatEqualFold    *string  `json:"formatEqualFold,omitempty"`
	FormatContainsFold *string  `json:"formatContainsFold,omitempty"`

	// "redirect" field predicates.
	Redirect             *string  `json:"redirect,omitempty"`
	RedirectNEQ          *string  `json:"redirectNEQ,omitempty"`
	RedirectIn           []string `json:"redirectIn,omitempty"`
	RedirectNotIn        []string `json:"redirectNotIn,omitempty"`
	RedirectGT           *string  `json:"redirectGT,omitempty"`
	RedirectGTE          *string  `json:"redirectGTE,omitempty"`
	RedirectLT           *string  `json:"redirectLT,omitempty"`
	RedirectLTE          *string  `json:"redirectLTE,omitempty"`
	RedirectContains     *string  `json:"redirectContains,omitempty"`
	RedirectHasPrefix    *string  `json:"redirectHasPrefix,omitempty"`
	RedirectHasSuffix    *string  `json:"redirectHasSuffix,omitempty"`
	RedirectIsNil        bool     `json:"redirectIsNil,omitempty"`
	RedirectNotNil       bool     `json:"redirectNotNil,omitempty"`
	RedirectEqualFold    *string  `json:"redirectEqualFold,omitempty"`
	RedirectContainsFold *string  `json:"redirectContainsFold,omitempty"`

	// "msg_internal_to" edge predicates.
	HasMsgInternalTo     *bool                      `json:"hasMsgInternalTo,omitempty"`
	HasMsgInternalToWith []*MsgInternalToWhereInput `json:"hasMsgInternalToWith,omitempty"`
}

MsgInternalWhereInput represents a where input for filtering MsgInternal queries.

func (*MsgInternalWhereInput) AddPredicates

func (i *MsgInternalWhereInput) AddPredicates(predicates ...predicate.MsgInternal)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*MsgInternalWhereInput) Filter

Filter applies the MsgInternalWhereInput filter on the MsgInternalQuery builder.

func (*MsgInternalWhereInput) P

P returns a predicate for filtering msginternals. An error is returned if the input is empty or invalid.

type MsgInternals

type MsgInternals []*MsgInternal

MsgInternals is a parsable slice of MsgInternal.

type MsgSubscriber

type MsgSubscriber struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 应用消息类型ID
	MsgTypeID int `json:"msg_type_id,omitempty"`
	// 组织ID
	TenantID int `json:"tenant_id,omitempty"`
	// 用户ID
	UserID int `json:"user_id,omitempty"`
	// 用户组ID
	OrgRoleID int `json:"org_role_id,omitempty"`
	// 是否排除
	Exclude bool `json:"exclude,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MsgSubscriberQuery when eager-loading is set.
	Edges MsgSubscriberEdges `json:"edges"`
	// contains filtered or unexported fields
}

MsgSubscriber is the model entity for the MsgSubscriber schema.

func (*MsgSubscriber) GlobalID

func (ms *MsgSubscriber) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given MsgSubscriber node.

func (*MsgSubscriber) IsNode

func (*MsgSubscriber) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*MsgSubscriber) MsgType

func (ms *MsgSubscriber) MsgType(ctx context.Context) (*MsgType, error)

func (*MsgSubscriber) QueryMsgType

func (ms *MsgSubscriber) QueryMsgType() *MsgTypeQuery

QueryMsgType queries the "msg_type" edge of the MsgSubscriber entity.

func (*MsgSubscriber) QueryUser

func (ms *MsgSubscriber) QueryUser() *UserQuery

QueryUser queries the "user" edge of the MsgSubscriber entity.

func (*MsgSubscriber) String

func (ms *MsgSubscriber) String() string

String implements the fmt.Stringer.

func (*MsgSubscriber) ToEdge

ToEdge converts MsgSubscriber into MsgSubscriberEdge.

func (*MsgSubscriber) Unwrap

func (ms *MsgSubscriber) Unwrap() *MsgSubscriber

Unwrap unwraps the MsgSubscriber 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 (*MsgSubscriber) Update

func (ms *MsgSubscriber) Update() *MsgSubscriberUpdateOne

Update returns a builder for updating this MsgSubscriber. Note that you need to call MsgSubscriber.Unwrap() before calling this method if this MsgSubscriber was returned from a transaction, and the transaction was committed or rolled back.

func (*MsgSubscriber) User

func (ms *MsgSubscriber) User(ctx context.Context) (*User, error)

func (*MsgSubscriber) Value

func (ms *MsgSubscriber) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the MsgSubscriber. This includes values selected through modifiers, order, etc.

type MsgSubscriberClient

type MsgSubscriberClient struct {
	// contains filtered or unexported fields
}

MsgSubscriberClient is a client for the MsgSubscriber schema.

func NewMsgSubscriberClient

func NewMsgSubscriberClient(c config) *MsgSubscriberClient

NewMsgSubscriberClient returns a client for the MsgSubscriber from the given config.

func (*MsgSubscriberClient) Create

Create returns a builder for creating a MsgSubscriber entity.

func (*MsgSubscriberClient) CreateBulk

CreateBulk returns a builder for creating a bulk of MsgSubscriber entities.

func (*MsgSubscriberClient) Delete

Delete returns a delete builder for MsgSubscriber.

func (*MsgSubscriberClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MsgSubscriberClient) DeleteOneID

func (c *MsgSubscriberClient) DeleteOneID(id int) *MsgSubscriberDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MsgSubscriberClient) Get

Get returns a MsgSubscriber entity by its id.

func (*MsgSubscriberClient) GetX

GetX is like Get, but panics if an error occurs.

func (*MsgSubscriberClient) Hooks

func (c *MsgSubscriberClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MsgSubscriberClient) Intercept

func (c *MsgSubscriberClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `msgsubscriber.Intercept(f(g(h())))`.

func (*MsgSubscriberClient) Interceptors

func (c *MsgSubscriberClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MsgSubscriberClient) MapCreateBulk

func (c *MsgSubscriberClient) MapCreateBulk(slice any, setFunc func(*MsgSubscriberCreate, int)) *MsgSubscriberCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MsgSubscriberClient) Query

Query returns a query builder for MsgSubscriber.

func (*MsgSubscriberClient) QueryMsgType

func (c *MsgSubscriberClient) QueryMsgType(ms *MsgSubscriber) *MsgTypeQuery

QueryMsgType queries the msg_type edge of a MsgSubscriber.

func (*MsgSubscriberClient) QueryUser

func (c *MsgSubscriberClient) QueryUser(ms *MsgSubscriber) *UserQuery

QueryUser queries the user edge of a MsgSubscriber.

func (*MsgSubscriberClient) Update

Update returns an update builder for MsgSubscriber.

func (*MsgSubscriberClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MsgSubscriberClient) UpdateOneID

func (c *MsgSubscriberClient) UpdateOneID(id int) *MsgSubscriberUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MsgSubscriberClient) Use

func (c *MsgSubscriberClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `msgsubscriber.Hooks(f(g(h())))`.

type MsgSubscriberConnection

type MsgSubscriberConnection struct {
	Edges      []*MsgSubscriberEdge `json:"edges"`
	PageInfo   PageInfo             `json:"pageInfo"`
	TotalCount int                  `json:"totalCount"`
}

MsgSubscriberConnection is the connection containing edges to MsgSubscriber.

type MsgSubscriberCreate

type MsgSubscriberCreate struct {
	// contains filtered or unexported fields
}

MsgSubscriberCreate is the builder for creating a MsgSubscriber entity.

func (*MsgSubscriberCreate) Exec

func (msc *MsgSubscriberCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgSubscriberCreate) ExecX

func (msc *MsgSubscriberCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgSubscriberCreate) Mutation

func (msc *MsgSubscriberCreate) Mutation() *MsgSubscriberMutation

Mutation returns the MsgSubscriberMutation object of the builder.

func (*MsgSubscriberCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgSubscriber.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgSubscriberUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*MsgSubscriberCreate) OnConflictColumns

func (msc *MsgSubscriberCreate) OnConflictColumns(columns ...string) *MsgSubscriberUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgSubscriber.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgSubscriberCreate) Save

Save creates the MsgSubscriber in the database.

func (*MsgSubscriberCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*MsgSubscriberCreate) SetCreatedAt

func (msc *MsgSubscriberCreate) SetCreatedAt(t time.Time) *MsgSubscriberCreate

SetCreatedAt sets the "created_at" field.

func (*MsgSubscriberCreate) SetCreatedBy

func (msc *MsgSubscriberCreate) SetCreatedBy(i int) *MsgSubscriberCreate

SetCreatedBy sets the "created_by" field.

func (*MsgSubscriberCreate) SetExclude

func (msc *MsgSubscriberCreate) SetExclude(b bool) *MsgSubscriberCreate

SetExclude sets the "exclude" field.

func (*MsgSubscriberCreate) SetID

SetID sets the "id" field.

func (*MsgSubscriberCreate) SetInput

SetInput applies the change-set in the CreateMsgSubscriberInput on the MsgSubscriberCreate builder.

func (*MsgSubscriberCreate) SetMsgType

func (msc *MsgSubscriberCreate) SetMsgType(m *MsgType) *MsgSubscriberCreate

SetMsgType sets the "msg_type" edge to the MsgType entity.

func (*MsgSubscriberCreate) SetMsgTypeID

func (msc *MsgSubscriberCreate) SetMsgTypeID(i int) *MsgSubscriberCreate

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgSubscriberCreate) SetNillableCreatedAt

func (msc *MsgSubscriberCreate) SetNillableCreatedAt(t *time.Time) *MsgSubscriberCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*MsgSubscriberCreate) SetNillableExclude

func (msc *MsgSubscriberCreate) SetNillableExclude(b *bool) *MsgSubscriberCreate

SetNillableExclude sets the "exclude" field if the given value is not nil.

func (*MsgSubscriberCreate) SetNillableOrgRoleID

func (msc *MsgSubscriberCreate) SetNillableOrgRoleID(i *int) *MsgSubscriberCreate

SetNillableOrgRoleID sets the "org_role_id" field if the given value is not nil.

func (*MsgSubscriberCreate) SetNillableUpdatedAt

func (msc *MsgSubscriberCreate) SetNillableUpdatedAt(t *time.Time) *MsgSubscriberCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MsgSubscriberCreate) SetNillableUpdatedBy

func (msc *MsgSubscriberCreate) SetNillableUpdatedBy(i *int) *MsgSubscriberCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgSubscriberCreate) SetNillableUserID

func (msc *MsgSubscriberCreate) SetNillableUserID(i *int) *MsgSubscriberCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*MsgSubscriberCreate) SetOrgRoleID

func (msc *MsgSubscriberCreate) SetOrgRoleID(i int) *MsgSubscriberCreate

SetOrgRoleID sets the "org_role_id" field.

func (*MsgSubscriberCreate) SetTenantID

func (msc *MsgSubscriberCreate) SetTenantID(i int) *MsgSubscriberCreate

SetTenantID sets the "tenant_id" field.

func (*MsgSubscriberCreate) SetUpdatedAt

func (msc *MsgSubscriberCreate) SetUpdatedAt(t time.Time) *MsgSubscriberCreate

SetUpdatedAt sets the "updated_at" field.

func (*MsgSubscriberCreate) SetUpdatedBy

func (msc *MsgSubscriberCreate) SetUpdatedBy(i int) *MsgSubscriberCreate

SetUpdatedBy sets the "updated_by" field.

func (*MsgSubscriberCreate) SetUser

func (msc *MsgSubscriberCreate) SetUser(u *User) *MsgSubscriberCreate

SetUser sets the "user" edge to the User entity.

func (*MsgSubscriberCreate) SetUserID

func (msc *MsgSubscriberCreate) SetUserID(i int) *MsgSubscriberCreate

SetUserID sets the "user_id" field.

type MsgSubscriberCreateBulk

type MsgSubscriberCreateBulk struct {
	// contains filtered or unexported fields
}

MsgSubscriberCreateBulk is the builder for creating many MsgSubscriber entities in bulk.

func (*MsgSubscriberCreateBulk) Exec

func (mscb *MsgSubscriberCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgSubscriberCreateBulk) ExecX

func (mscb *MsgSubscriberCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgSubscriberCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgSubscriber.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgSubscriberUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*MsgSubscriberCreateBulk) OnConflictColumns

func (mscb *MsgSubscriberCreateBulk) OnConflictColumns(columns ...string) *MsgSubscriberUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgSubscriber.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgSubscriberCreateBulk) Save

Save creates the MsgSubscriber entities in the database.

func (*MsgSubscriberCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type MsgSubscriberDelete

type MsgSubscriberDelete struct {
	// contains filtered or unexported fields
}

MsgSubscriberDelete is the builder for deleting a MsgSubscriber entity.

func (*MsgSubscriberDelete) Exec

func (msd *MsgSubscriberDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MsgSubscriberDelete) ExecX

func (msd *MsgSubscriberDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MsgSubscriberDelete) Where

Where appends a list predicates to the MsgSubscriberDelete builder.

type MsgSubscriberDeleteOne

type MsgSubscriberDeleteOne struct {
	// contains filtered or unexported fields
}

MsgSubscriberDeleteOne is the builder for deleting a single MsgSubscriber entity.

func (*MsgSubscriberDeleteOne) Exec

func (msdo *MsgSubscriberDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MsgSubscriberDeleteOne) ExecX

func (msdo *MsgSubscriberDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgSubscriberDeleteOne) Where

Where appends a list predicates to the MsgSubscriberDelete builder.

type MsgSubscriberEdge

type MsgSubscriberEdge struct {
	Node   *MsgSubscriber `json:"node"`
	Cursor Cursor         `json:"cursor"`
}

MsgSubscriberEdge is the edge representation of MsgSubscriber.

type MsgSubscriberEdges

type MsgSubscriberEdges struct {
	// MsgType holds the value of the msg_type edge.
	MsgType *MsgType `json:"msg_type,omitempty"`
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

MsgSubscriberEdges holds the relations/edges for other nodes in the graph.

func (MsgSubscriberEdges) MsgTypeOrErr

func (e MsgSubscriberEdges) MsgTypeOrErr() (*MsgType, error)

MsgTypeOrErr returns the MsgType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (MsgSubscriberEdges) UserOrErr

func (e MsgSubscriberEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type MsgSubscriberGroupBy

type MsgSubscriberGroupBy struct {
	// contains filtered or unexported fields
}

MsgSubscriberGroupBy is the group-by builder for MsgSubscriber entities.

func (*MsgSubscriberGroupBy) Aggregate

func (msgb *MsgSubscriberGroupBy) Aggregate(fns ...AggregateFunc) *MsgSubscriberGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MsgSubscriberGroupBy) Bool

func (s *MsgSubscriberGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberGroupBy) BoolX

func (s *MsgSubscriberGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MsgSubscriberGroupBy) Bools

func (s *MsgSubscriberGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberGroupBy) BoolsX

func (s *MsgSubscriberGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MsgSubscriberGroupBy) Float64

func (s *MsgSubscriberGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberGroupBy) Float64X

func (s *MsgSubscriberGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MsgSubscriberGroupBy) Float64s

func (s *MsgSubscriberGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberGroupBy) Float64sX

func (s *MsgSubscriberGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MsgSubscriberGroupBy) Int

func (s *MsgSubscriberGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberGroupBy) IntX

func (s *MsgSubscriberGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MsgSubscriberGroupBy) Ints

func (s *MsgSubscriberGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberGroupBy) IntsX

func (s *MsgSubscriberGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MsgSubscriberGroupBy) Scan

func (msgb *MsgSubscriberGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MsgSubscriberGroupBy) ScanX

func (s *MsgSubscriberGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MsgSubscriberGroupBy) String

func (s *MsgSubscriberGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberGroupBy) StringX

func (s *MsgSubscriberGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MsgSubscriberGroupBy) Strings

func (s *MsgSubscriberGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberGroupBy) StringsX

func (s *MsgSubscriberGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MsgSubscriberMutation

type MsgSubscriberMutation struct {
	// contains filtered or unexported fields
}

MsgSubscriberMutation represents an operation that mutates the MsgSubscriber nodes in the graph.

func (*MsgSubscriberMutation) AddCreatedBy

func (m *MsgSubscriberMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*MsgSubscriberMutation) AddField

func (m *MsgSubscriberMutation) 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 (*MsgSubscriberMutation) AddOrgRoleID

func (m *MsgSubscriberMutation) AddOrgRoleID(i int)

AddOrgRoleID adds i to the "org_role_id" field.

func (*MsgSubscriberMutation) AddTenantID

func (m *MsgSubscriberMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*MsgSubscriberMutation) AddUpdatedBy

func (m *MsgSubscriberMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgSubscriberMutation) AddedCreatedBy

func (m *MsgSubscriberMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*MsgSubscriberMutation) AddedEdges

func (m *MsgSubscriberMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MsgSubscriberMutation) AddedField

func (m *MsgSubscriberMutation) 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 (*MsgSubscriberMutation) AddedFields

func (m *MsgSubscriberMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MsgSubscriberMutation) AddedIDs

func (m *MsgSubscriberMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MsgSubscriberMutation) AddedOrgRoleID

func (m *MsgSubscriberMutation) AddedOrgRoleID() (r int, exists bool)

AddedOrgRoleID returns the value that was added to the "org_role_id" field in this mutation.

func (*MsgSubscriberMutation) AddedTenantID

func (m *MsgSubscriberMutation) AddedTenantID() (r int, exists bool)

AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.

func (*MsgSubscriberMutation) AddedUpdatedBy

func (m *MsgSubscriberMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*MsgSubscriberMutation) ClearEdge

func (m *MsgSubscriberMutation) 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 (*MsgSubscriberMutation) ClearExclude

func (m *MsgSubscriberMutation) ClearExclude()

ClearExclude clears the value of the "exclude" field.

func (*MsgSubscriberMutation) ClearField

func (m *MsgSubscriberMutation) 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 (*MsgSubscriberMutation) ClearMsgType

func (m *MsgSubscriberMutation) ClearMsgType()

ClearMsgType clears the "msg_type" edge to the MsgType entity.

func (*MsgSubscriberMutation) ClearOrgRoleID

func (m *MsgSubscriberMutation) ClearOrgRoleID()

ClearOrgRoleID clears the value of the "org_role_id" field.

func (*MsgSubscriberMutation) ClearUpdatedAt

func (m *MsgSubscriberMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgSubscriberMutation) ClearUpdatedBy

func (m *MsgSubscriberMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgSubscriberMutation) ClearUser

func (m *MsgSubscriberMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*MsgSubscriberMutation) ClearUserID

func (m *MsgSubscriberMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*MsgSubscriberMutation) ClearedEdges

func (m *MsgSubscriberMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MsgSubscriberMutation) ClearedFields

func (m *MsgSubscriberMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MsgSubscriberMutation) Client

func (m MsgSubscriberMutation) 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 (*MsgSubscriberMutation) CreatedAt

func (m *MsgSubscriberMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*MsgSubscriberMutation) CreatedBy

func (m *MsgSubscriberMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*MsgSubscriberMutation) EdgeCleared

func (m *MsgSubscriberMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MsgSubscriberMutation) Exclude

func (m *MsgSubscriberMutation) Exclude() (r bool, exists bool)

Exclude returns the value of the "exclude" field in the mutation.

func (*MsgSubscriberMutation) ExcludeCleared

func (m *MsgSubscriberMutation) ExcludeCleared() bool

ExcludeCleared returns if the "exclude" field was cleared in this mutation.

func (*MsgSubscriberMutation) Field

func (m *MsgSubscriberMutation) 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 (*MsgSubscriberMutation) FieldCleared

func (m *MsgSubscriberMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MsgSubscriberMutation) Fields

func (m *MsgSubscriberMutation) 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 (*MsgSubscriberMutation) ID

func (m *MsgSubscriberMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*MsgSubscriberMutation) IDs

func (m *MsgSubscriberMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*MsgSubscriberMutation) MsgTypeCleared

func (m *MsgSubscriberMutation) MsgTypeCleared() bool

MsgTypeCleared reports if the "msg_type" edge to the MsgType entity was cleared.

func (*MsgSubscriberMutation) MsgTypeID

func (m *MsgSubscriberMutation) MsgTypeID() (r int, exists bool)

MsgTypeID returns the value of the "msg_type_id" field in the mutation.

func (*MsgSubscriberMutation) MsgTypeIDs

func (m *MsgSubscriberMutation) MsgTypeIDs() (ids []int)

MsgTypeIDs returns the "msg_type" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MsgTypeID instead. It exists only for internal usage by the builders.

func (*MsgSubscriberMutation) OldCreatedAt

func (m *MsgSubscriberMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the MsgSubscriber entity. If the MsgSubscriber object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgSubscriberMutation) OldCreatedBy

func (m *MsgSubscriberMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the MsgSubscriber entity. If the MsgSubscriber object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgSubscriberMutation) OldExclude

func (m *MsgSubscriberMutation) OldExclude(ctx context.Context) (v bool, err error)

OldExclude returns the old "exclude" field's value of the MsgSubscriber entity. If the MsgSubscriber object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgSubscriberMutation) OldField

func (m *MsgSubscriberMutation) 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 (*MsgSubscriberMutation) OldMsgTypeID

func (m *MsgSubscriberMutation) OldMsgTypeID(ctx context.Context) (v int, err error)

OldMsgTypeID returns the old "msg_type_id" field's value of the MsgSubscriber entity. If the MsgSubscriber object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgSubscriberMutation) OldOrgRoleID

func (m *MsgSubscriberMutation) OldOrgRoleID(ctx context.Context) (v int, err error)

OldOrgRoleID returns the old "org_role_id" field's value of the MsgSubscriber entity. If the MsgSubscriber object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgSubscriberMutation) OldTenantID

func (m *MsgSubscriberMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the MsgSubscriber entity. If the MsgSubscriber object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgSubscriberMutation) OldUpdatedAt

func (m *MsgSubscriberMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the MsgSubscriber entity. If the MsgSubscriber object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgSubscriberMutation) OldUpdatedBy

func (m *MsgSubscriberMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the MsgSubscriber entity. If the MsgSubscriber object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgSubscriberMutation) OldUserID

func (m *MsgSubscriberMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the MsgSubscriber entity. If the MsgSubscriber object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgSubscriberMutation) Op

func (m *MsgSubscriberMutation) Op() Op

Op returns the operation name.

func (*MsgSubscriberMutation) OrgRoleID

func (m *MsgSubscriberMutation) OrgRoleID() (r int, exists bool)

OrgRoleID returns the value of the "org_role_id" field in the mutation.

func (*MsgSubscriberMutation) OrgRoleIDCleared

func (m *MsgSubscriberMutation) OrgRoleIDCleared() bool

OrgRoleIDCleared returns if the "org_role_id" field was cleared in this mutation.

func (*MsgSubscriberMutation) RemovedEdges

func (m *MsgSubscriberMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MsgSubscriberMutation) RemovedIDs

func (m *MsgSubscriberMutation) 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 (*MsgSubscriberMutation) ResetCreatedAt

func (m *MsgSubscriberMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*MsgSubscriberMutation) ResetCreatedBy

func (m *MsgSubscriberMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*MsgSubscriberMutation) ResetEdge

func (m *MsgSubscriberMutation) 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 (*MsgSubscriberMutation) ResetExclude

func (m *MsgSubscriberMutation) ResetExclude()

ResetExclude resets all changes to the "exclude" field.

func (*MsgSubscriberMutation) ResetField

func (m *MsgSubscriberMutation) 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 (*MsgSubscriberMutation) ResetMsgType

func (m *MsgSubscriberMutation) ResetMsgType()

ResetMsgType resets all changes to the "msg_type" edge.

func (*MsgSubscriberMutation) ResetMsgTypeID

func (m *MsgSubscriberMutation) ResetMsgTypeID()

ResetMsgTypeID resets all changes to the "msg_type_id" field.

func (*MsgSubscriberMutation) ResetOrgRoleID

func (m *MsgSubscriberMutation) ResetOrgRoleID()

ResetOrgRoleID resets all changes to the "org_role_id" field.

func (*MsgSubscriberMutation) ResetTenantID

func (m *MsgSubscriberMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*MsgSubscriberMutation) ResetUpdatedAt

func (m *MsgSubscriberMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*MsgSubscriberMutation) ResetUpdatedBy

func (m *MsgSubscriberMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*MsgSubscriberMutation) ResetUser

func (m *MsgSubscriberMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*MsgSubscriberMutation) ResetUserID

func (m *MsgSubscriberMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*MsgSubscriberMutation) SetCreatedAt

func (m *MsgSubscriberMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*MsgSubscriberMutation) SetCreatedBy

func (m *MsgSubscriberMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*MsgSubscriberMutation) SetExclude

func (m *MsgSubscriberMutation) SetExclude(b bool)

SetExclude sets the "exclude" field.

func (*MsgSubscriberMutation) SetField

func (m *MsgSubscriberMutation) 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 (*MsgSubscriberMutation) SetID

func (m *MsgSubscriberMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of MsgSubscriber entities.

func (*MsgSubscriberMutation) SetMsgTypeID

func (m *MsgSubscriberMutation) SetMsgTypeID(i int)

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgSubscriberMutation) SetOp

func (m *MsgSubscriberMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MsgSubscriberMutation) SetOrgRoleID

func (m *MsgSubscriberMutation) SetOrgRoleID(i int)

SetOrgRoleID sets the "org_role_id" field.

func (*MsgSubscriberMutation) SetTenantID

func (m *MsgSubscriberMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*MsgSubscriberMutation) SetUpdatedAt

func (m *MsgSubscriberMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*MsgSubscriberMutation) SetUpdatedBy

func (m *MsgSubscriberMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*MsgSubscriberMutation) SetUserID

func (m *MsgSubscriberMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (*MsgSubscriberMutation) TenantID

func (m *MsgSubscriberMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (MsgSubscriberMutation) Tx

func (m MsgSubscriberMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MsgSubscriberMutation) Type

func (m *MsgSubscriberMutation) Type() string

Type returns the node type of this mutation (MsgSubscriber).

func (*MsgSubscriberMutation) UpdatedAt

func (m *MsgSubscriberMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*MsgSubscriberMutation) UpdatedAtCleared

func (m *MsgSubscriberMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*MsgSubscriberMutation) UpdatedBy

func (m *MsgSubscriberMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*MsgSubscriberMutation) UpdatedByCleared

func (m *MsgSubscriberMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*MsgSubscriberMutation) UserCleared

func (m *MsgSubscriberMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*MsgSubscriberMutation) UserID

func (m *MsgSubscriberMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*MsgSubscriberMutation) UserIDCleared

func (m *MsgSubscriberMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*MsgSubscriberMutation) UserIDs

func (m *MsgSubscriberMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*MsgSubscriberMutation) Where

Where appends a list predicates to the MsgSubscriberMutation builder.

func (*MsgSubscriberMutation) WhereP

func (m *MsgSubscriberMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MsgSubscriberMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MsgSubscriberOrder

type MsgSubscriberOrder struct {
	Direction OrderDirection           `json:"direction"`
	Field     *MsgSubscriberOrderField `json:"field"`
}

MsgSubscriberOrder defines the ordering of MsgSubscriber.

type MsgSubscriberOrderField

type MsgSubscriberOrderField struct {
	// Value extracts the ordering value from the given MsgSubscriber.
	Value func(*MsgSubscriber) (ent.Value, error)
	// contains filtered or unexported fields
}

MsgSubscriberOrderField defines the ordering field of MsgSubscriber.

func (MsgSubscriberOrderField) MarshalGQL

func (f MsgSubscriberOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (MsgSubscriberOrderField) String

func (f MsgSubscriberOrderField) String() string

String implement fmt.Stringer interface.

func (*MsgSubscriberOrderField) UnmarshalGQL

func (f *MsgSubscriberOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type MsgSubscriberPaginateOption

type MsgSubscriberPaginateOption func(*msgsubscriberPager) error

MsgSubscriberPaginateOption enables pagination customization.

func WithMsgSubscriberFilter

func WithMsgSubscriberFilter(filter func(*MsgSubscriberQuery) (*MsgSubscriberQuery, error)) MsgSubscriberPaginateOption

WithMsgSubscriberFilter configures pagination filter.

func WithMsgSubscriberOrder

func WithMsgSubscriberOrder(order *MsgSubscriberOrder) MsgSubscriberPaginateOption

WithMsgSubscriberOrder configures pagination ordering.

type MsgSubscriberQuery

type MsgSubscriberQuery struct {
	// contains filtered or unexported fields
}

MsgSubscriberQuery is the builder for querying MsgSubscriber entities.

func (*MsgSubscriberQuery) Aggregate

func (msq *MsgSubscriberQuery) Aggregate(fns ...AggregateFunc) *MsgSubscriberSelect

Aggregate returns a MsgSubscriberSelect configured with the given aggregations.

func (*MsgSubscriberQuery) All

All executes the query and returns a list of MsgSubscribers.

func (*MsgSubscriberQuery) AllX

func (msq *MsgSubscriberQuery) AllX(ctx context.Context) []*MsgSubscriber

AllX is like All, but panics if an error occurs.

func (*MsgSubscriberQuery) Clone

func (msq *MsgSubscriberQuery) Clone() *MsgSubscriberQuery

Clone returns a duplicate of the MsgSubscriberQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MsgSubscriberQuery) CollectFields

func (ms *MsgSubscriberQuery) CollectFields(ctx context.Context, satisfies ...string) (*MsgSubscriberQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*MsgSubscriberQuery) Count

func (msq *MsgSubscriberQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MsgSubscriberQuery) CountX

func (msq *MsgSubscriberQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MsgSubscriberQuery) Exist

func (msq *MsgSubscriberQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MsgSubscriberQuery) ExistX

func (msq *MsgSubscriberQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MsgSubscriberQuery) First

First returns the first MsgSubscriber entity from the query. Returns a *NotFoundError when no MsgSubscriber was found.

func (*MsgSubscriberQuery) FirstID

func (msq *MsgSubscriberQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first MsgSubscriber ID from the query. Returns a *NotFoundError when no MsgSubscriber ID was found.

func (*MsgSubscriberQuery) FirstIDX

func (msq *MsgSubscriberQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MsgSubscriberQuery) FirstX

func (msq *MsgSubscriberQuery) FirstX(ctx context.Context) *MsgSubscriber

FirstX is like First, but panics if an error occurs.

func (*MsgSubscriberQuery) GroupBy

func (msq *MsgSubscriberQuery) GroupBy(field string, fields ...string) *MsgSubscriberGroupBy

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 {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MsgSubscriber.Query().
	GroupBy(msgsubscriber.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MsgSubscriberQuery) IDs

func (msq *MsgSubscriberQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of MsgSubscriber IDs.

func (*MsgSubscriberQuery) IDsX

func (msq *MsgSubscriberQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MsgSubscriberQuery) Limit

func (msq *MsgSubscriberQuery) Limit(limit int) *MsgSubscriberQuery

Limit the number of records to be returned by this query.

func (*MsgSubscriberQuery) Offset

func (msq *MsgSubscriberQuery) Offset(offset int) *MsgSubscriberQuery

Offset to start from.

func (*MsgSubscriberQuery) Only

Only returns a single MsgSubscriber entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MsgSubscriber entity is found. Returns a *NotFoundError when no MsgSubscriber entities are found.

func (*MsgSubscriberQuery) OnlyID

func (msq *MsgSubscriberQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only MsgSubscriber ID in the query. Returns a *NotSingularError when more than one MsgSubscriber ID is found. Returns a *NotFoundError when no entities are found.

func (*MsgSubscriberQuery) OnlyIDX

func (msq *MsgSubscriberQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MsgSubscriberQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*MsgSubscriberQuery) Order

Order specifies how the records should be ordered.

func (*MsgSubscriberQuery) Paginate

func (ms *MsgSubscriberQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...MsgSubscriberPaginateOption,
) (*MsgSubscriberConnection, error)

Paginate executes the query and returns a relay based cursor connection to MsgSubscriber.

func (*MsgSubscriberQuery) QueryMsgType

func (msq *MsgSubscriberQuery) QueryMsgType() *MsgTypeQuery

QueryMsgType chains the current query on the "msg_type" edge.

func (*MsgSubscriberQuery) QueryUser

func (msq *MsgSubscriberQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*MsgSubscriberQuery) Select

func (msq *MsgSubscriberQuery) Select(fields ...string) *MsgSubscriberSelect

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 {
	CreatedBy int `json:"created_by,omitempty"`
}

client.MsgSubscriber.Query().
	Select(msgsubscriber.FieldCreatedBy).
	Scan(ctx, &v)

func (*MsgSubscriberQuery) Unique

func (msq *MsgSubscriberQuery) Unique(unique bool) *MsgSubscriberQuery

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 (*MsgSubscriberQuery) Where

Where adds a new predicate for the MsgSubscriberQuery builder.

func (*MsgSubscriberQuery) WithMsgType

func (msq *MsgSubscriberQuery) WithMsgType(opts ...func(*MsgTypeQuery)) *MsgSubscriberQuery

WithMsgType tells the query-builder to eager-load the nodes that are connected to the "msg_type" edge. The optional arguments are used to configure the query builder of the edge.

func (*MsgSubscriberQuery) WithUser

func (msq *MsgSubscriberQuery) WithUser(opts ...func(*UserQuery)) *MsgSubscriberQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type MsgSubscriberSelect

type MsgSubscriberSelect struct {
	*MsgSubscriberQuery
	// contains filtered or unexported fields
}

MsgSubscriberSelect is the builder for selecting fields of MsgSubscriber entities.

func (*MsgSubscriberSelect) Aggregate

func (mss *MsgSubscriberSelect) Aggregate(fns ...AggregateFunc) *MsgSubscriberSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MsgSubscriberSelect) Bool

func (s *MsgSubscriberSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberSelect) BoolX

func (s *MsgSubscriberSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MsgSubscriberSelect) Bools

func (s *MsgSubscriberSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberSelect) BoolsX

func (s *MsgSubscriberSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MsgSubscriberSelect) Float64

func (s *MsgSubscriberSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberSelect) Float64X

func (s *MsgSubscriberSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MsgSubscriberSelect) Float64s

func (s *MsgSubscriberSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberSelect) Float64sX

func (s *MsgSubscriberSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MsgSubscriberSelect) Int

func (s *MsgSubscriberSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberSelect) IntX

func (s *MsgSubscriberSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MsgSubscriberSelect) Ints

func (s *MsgSubscriberSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberSelect) IntsX

func (s *MsgSubscriberSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MsgSubscriberSelect) Scan

func (mss *MsgSubscriberSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MsgSubscriberSelect) ScanX

func (s *MsgSubscriberSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MsgSubscriberSelect) String

func (s *MsgSubscriberSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberSelect) StringX

func (s *MsgSubscriberSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MsgSubscriberSelect) Strings

func (s *MsgSubscriberSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MsgSubscriberSelect) StringsX

func (s *MsgSubscriberSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MsgSubscriberUpdate

type MsgSubscriberUpdate struct {
	// contains filtered or unexported fields
}

MsgSubscriberUpdate is the builder for updating MsgSubscriber entities.

func (*MsgSubscriberUpdate) AddOrgRoleID

func (msu *MsgSubscriberUpdate) AddOrgRoleID(i int) *MsgSubscriberUpdate

AddOrgRoleID adds i to the "org_role_id" field.

func (*MsgSubscriberUpdate) AddTenantID

func (msu *MsgSubscriberUpdate) AddTenantID(i int) *MsgSubscriberUpdate

AddTenantID adds i to the "tenant_id" field.

func (*MsgSubscriberUpdate) AddUpdatedBy

func (msu *MsgSubscriberUpdate) AddUpdatedBy(i int) *MsgSubscriberUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgSubscriberUpdate) ClearExclude

func (msu *MsgSubscriberUpdate) ClearExclude() *MsgSubscriberUpdate

ClearExclude clears the value of the "exclude" field.

func (*MsgSubscriberUpdate) ClearMsgType

func (msu *MsgSubscriberUpdate) ClearMsgType() *MsgSubscriberUpdate

ClearMsgType clears the "msg_type" edge to the MsgType entity.

func (*MsgSubscriberUpdate) ClearOrgRoleID

func (msu *MsgSubscriberUpdate) ClearOrgRoleID() *MsgSubscriberUpdate

ClearOrgRoleID clears the value of the "org_role_id" field.

func (*MsgSubscriberUpdate) ClearUpdatedAt

func (msu *MsgSubscriberUpdate) ClearUpdatedAt() *MsgSubscriberUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgSubscriberUpdate) ClearUpdatedBy

func (msu *MsgSubscriberUpdate) ClearUpdatedBy() *MsgSubscriberUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgSubscriberUpdate) ClearUser

func (msu *MsgSubscriberUpdate) ClearUser() *MsgSubscriberUpdate

ClearUser clears the "user" edge to the User entity.

func (*MsgSubscriberUpdate) ClearUserID

func (msu *MsgSubscriberUpdate) ClearUserID() *MsgSubscriberUpdate

ClearUserID clears the value of the "user_id" field.

func (*MsgSubscriberUpdate) Exec

func (msu *MsgSubscriberUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgSubscriberUpdate) ExecX

func (msu *MsgSubscriberUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgSubscriberUpdate) Mutation

func (msu *MsgSubscriberUpdate) Mutation() *MsgSubscriberMutation

Mutation returns the MsgSubscriberMutation object of the builder.

func (*MsgSubscriberUpdate) Save

func (msu *MsgSubscriberUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MsgSubscriberUpdate) SaveX

func (msu *MsgSubscriberUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MsgSubscriberUpdate) SetExclude

func (msu *MsgSubscriberUpdate) SetExclude(b bool) *MsgSubscriberUpdate

SetExclude sets the "exclude" field.

func (*MsgSubscriberUpdate) SetInput

SetInput applies the change-set in the UpdateMsgSubscriberInput on the MsgSubscriberUpdate builder.

func (*MsgSubscriberUpdate) SetMsgType

func (msu *MsgSubscriberUpdate) SetMsgType(m *MsgType) *MsgSubscriberUpdate

SetMsgType sets the "msg_type" edge to the MsgType entity.

func (*MsgSubscriberUpdate) SetMsgTypeID

func (msu *MsgSubscriberUpdate) SetMsgTypeID(i int) *MsgSubscriberUpdate

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgSubscriberUpdate) SetNillableExclude

func (msu *MsgSubscriberUpdate) SetNillableExclude(b *bool) *MsgSubscriberUpdate

SetNillableExclude sets the "exclude" field if the given value is not nil.

func (*MsgSubscriberUpdate) SetNillableOrgRoleID

func (msu *MsgSubscriberUpdate) SetNillableOrgRoleID(i *int) *MsgSubscriberUpdate

SetNillableOrgRoleID sets the "org_role_id" field if the given value is not nil.

func (*MsgSubscriberUpdate) SetNillableUpdatedAt

func (msu *MsgSubscriberUpdate) SetNillableUpdatedAt(t *time.Time) *MsgSubscriberUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MsgSubscriberUpdate) SetNillableUpdatedBy

func (msu *MsgSubscriberUpdate) SetNillableUpdatedBy(i *int) *MsgSubscriberUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgSubscriberUpdate) SetNillableUserID

func (msu *MsgSubscriberUpdate) SetNillableUserID(i *int) *MsgSubscriberUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*MsgSubscriberUpdate) SetOrgRoleID

func (msu *MsgSubscriberUpdate) SetOrgRoleID(i int) *MsgSubscriberUpdate

SetOrgRoleID sets the "org_role_id" field.

func (*MsgSubscriberUpdate) SetTenantID

func (msu *MsgSubscriberUpdate) SetTenantID(i int) *MsgSubscriberUpdate

SetTenantID sets the "tenant_id" field.

func (*MsgSubscriberUpdate) SetUpdatedAt

func (msu *MsgSubscriberUpdate) SetUpdatedAt(t time.Time) *MsgSubscriberUpdate

SetUpdatedAt sets the "updated_at" field.

func (*MsgSubscriberUpdate) SetUpdatedBy

func (msu *MsgSubscriberUpdate) SetUpdatedBy(i int) *MsgSubscriberUpdate

SetUpdatedBy sets the "updated_by" field.

func (*MsgSubscriberUpdate) SetUser

func (msu *MsgSubscriberUpdate) SetUser(u *User) *MsgSubscriberUpdate

SetUser sets the "user" edge to the User entity.

func (*MsgSubscriberUpdate) SetUserID

func (msu *MsgSubscriberUpdate) SetUserID(i int) *MsgSubscriberUpdate

SetUserID sets the "user_id" field.

func (*MsgSubscriberUpdate) Where

Where appends a list predicates to the MsgSubscriberUpdate builder.

type MsgSubscriberUpdateOne

type MsgSubscriberUpdateOne struct {
	// contains filtered or unexported fields
}

MsgSubscriberUpdateOne is the builder for updating a single MsgSubscriber entity.

func (*MsgSubscriberUpdateOne) AddOrgRoleID

func (msuo *MsgSubscriberUpdateOne) AddOrgRoleID(i int) *MsgSubscriberUpdateOne

AddOrgRoleID adds i to the "org_role_id" field.

func (*MsgSubscriberUpdateOne) AddTenantID

func (msuo *MsgSubscriberUpdateOne) AddTenantID(i int) *MsgSubscriberUpdateOne

AddTenantID adds i to the "tenant_id" field.

func (*MsgSubscriberUpdateOne) AddUpdatedBy

func (msuo *MsgSubscriberUpdateOne) AddUpdatedBy(i int) *MsgSubscriberUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgSubscriberUpdateOne) ClearExclude

func (msuo *MsgSubscriberUpdateOne) ClearExclude() *MsgSubscriberUpdateOne

ClearExclude clears the value of the "exclude" field.

func (*MsgSubscriberUpdateOne) ClearMsgType

func (msuo *MsgSubscriberUpdateOne) ClearMsgType() *MsgSubscriberUpdateOne

ClearMsgType clears the "msg_type" edge to the MsgType entity.

func (*MsgSubscriberUpdateOne) ClearOrgRoleID

func (msuo *MsgSubscriberUpdateOne) ClearOrgRoleID() *MsgSubscriberUpdateOne

ClearOrgRoleID clears the value of the "org_role_id" field.

func (*MsgSubscriberUpdateOne) ClearUpdatedAt

func (msuo *MsgSubscriberUpdateOne) ClearUpdatedAt() *MsgSubscriberUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgSubscriberUpdateOne) ClearUpdatedBy

func (msuo *MsgSubscriberUpdateOne) ClearUpdatedBy() *MsgSubscriberUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgSubscriberUpdateOne) ClearUser

ClearUser clears the "user" edge to the User entity.

func (*MsgSubscriberUpdateOne) ClearUserID

func (msuo *MsgSubscriberUpdateOne) ClearUserID() *MsgSubscriberUpdateOne

ClearUserID clears the value of the "user_id" field.

func (*MsgSubscriberUpdateOne) Exec

func (msuo *MsgSubscriberUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MsgSubscriberUpdateOne) ExecX

func (msuo *MsgSubscriberUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgSubscriberUpdateOne) Mutation

Mutation returns the MsgSubscriberMutation object of the builder.

func (*MsgSubscriberUpdateOne) Save

Save executes the query and returns the updated MsgSubscriber entity.

func (*MsgSubscriberUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*MsgSubscriberUpdateOne) Select

func (msuo *MsgSubscriberUpdateOne) Select(field string, fields ...string) *MsgSubscriberUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MsgSubscriberUpdateOne) SetExclude

func (msuo *MsgSubscriberUpdateOne) SetExclude(b bool) *MsgSubscriberUpdateOne

SetExclude sets the "exclude" field.

func (*MsgSubscriberUpdateOne) SetInput

SetInput applies the change-set in the UpdateMsgSubscriberInput on the MsgSubscriberUpdateOne builder.

func (*MsgSubscriberUpdateOne) SetMsgType

SetMsgType sets the "msg_type" edge to the MsgType entity.

func (*MsgSubscriberUpdateOne) SetMsgTypeID

func (msuo *MsgSubscriberUpdateOne) SetMsgTypeID(i int) *MsgSubscriberUpdateOne

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgSubscriberUpdateOne) SetNillableExclude

func (msuo *MsgSubscriberUpdateOne) SetNillableExclude(b *bool) *MsgSubscriberUpdateOne

SetNillableExclude sets the "exclude" field if the given value is not nil.

func (*MsgSubscriberUpdateOne) SetNillableOrgRoleID

func (msuo *MsgSubscriberUpdateOne) SetNillableOrgRoleID(i *int) *MsgSubscriberUpdateOne

SetNillableOrgRoleID sets the "org_role_id" field if the given value is not nil.

func (*MsgSubscriberUpdateOne) SetNillableUpdatedAt

func (msuo *MsgSubscriberUpdateOne) SetNillableUpdatedAt(t *time.Time) *MsgSubscriberUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MsgSubscriberUpdateOne) SetNillableUpdatedBy

func (msuo *MsgSubscriberUpdateOne) SetNillableUpdatedBy(i *int) *MsgSubscriberUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgSubscriberUpdateOne) SetNillableUserID

func (msuo *MsgSubscriberUpdateOne) SetNillableUserID(i *int) *MsgSubscriberUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*MsgSubscriberUpdateOne) SetOrgRoleID

func (msuo *MsgSubscriberUpdateOne) SetOrgRoleID(i int) *MsgSubscriberUpdateOne

SetOrgRoleID sets the "org_role_id" field.

func (*MsgSubscriberUpdateOne) SetTenantID

func (msuo *MsgSubscriberUpdateOne) SetTenantID(i int) *MsgSubscriberUpdateOne

SetTenantID sets the "tenant_id" field.

func (*MsgSubscriberUpdateOne) SetUpdatedAt

func (msuo *MsgSubscriberUpdateOne) SetUpdatedAt(t time.Time) *MsgSubscriberUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*MsgSubscriberUpdateOne) SetUpdatedBy

func (msuo *MsgSubscriberUpdateOne) SetUpdatedBy(i int) *MsgSubscriberUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*MsgSubscriberUpdateOne) SetUser

SetUser sets the "user" edge to the User entity.

func (*MsgSubscriberUpdateOne) SetUserID

SetUserID sets the "user_id" field.

func (*MsgSubscriberUpdateOne) Where

Where appends a list predicates to the MsgSubscriberUpdate builder.

type MsgSubscriberUpsert

type MsgSubscriberUpsert struct {
	*sql.UpdateSet
}

MsgSubscriberUpsert is the "OnConflict" setter.

func (*MsgSubscriberUpsert) AddOrgRoleID

func (u *MsgSubscriberUpsert) AddOrgRoleID(v int) *MsgSubscriberUpsert

AddOrgRoleID adds v to the "org_role_id" field.

func (*MsgSubscriberUpsert) AddTenantID

func (u *MsgSubscriberUpsert) AddTenantID(v int) *MsgSubscriberUpsert

AddTenantID adds v to the "tenant_id" field.

func (*MsgSubscriberUpsert) AddUpdatedBy

func (u *MsgSubscriberUpsert) AddUpdatedBy(v int) *MsgSubscriberUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgSubscriberUpsert) ClearExclude

func (u *MsgSubscriberUpsert) ClearExclude() *MsgSubscriberUpsert

ClearExclude clears the value of the "exclude" field.

func (*MsgSubscriberUpsert) ClearOrgRoleID

func (u *MsgSubscriberUpsert) ClearOrgRoleID() *MsgSubscriberUpsert

ClearOrgRoleID clears the value of the "org_role_id" field.

func (*MsgSubscriberUpsert) ClearUpdatedAt

func (u *MsgSubscriberUpsert) ClearUpdatedAt() *MsgSubscriberUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgSubscriberUpsert) ClearUpdatedBy

func (u *MsgSubscriberUpsert) ClearUpdatedBy() *MsgSubscriberUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgSubscriberUpsert) ClearUserID

func (u *MsgSubscriberUpsert) ClearUserID() *MsgSubscriberUpsert

ClearUserID clears the value of the "user_id" field.

func (*MsgSubscriberUpsert) SetExclude

func (u *MsgSubscriberUpsert) SetExclude(v bool) *MsgSubscriberUpsert

SetExclude sets the "exclude" field.

func (*MsgSubscriberUpsert) SetMsgTypeID

func (u *MsgSubscriberUpsert) SetMsgTypeID(v int) *MsgSubscriberUpsert

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgSubscriberUpsert) SetOrgRoleID

func (u *MsgSubscriberUpsert) SetOrgRoleID(v int) *MsgSubscriberUpsert

SetOrgRoleID sets the "org_role_id" field.

func (*MsgSubscriberUpsert) SetTenantID

func (u *MsgSubscriberUpsert) SetTenantID(v int) *MsgSubscriberUpsert

SetTenantID sets the "tenant_id" field.

func (*MsgSubscriberUpsert) SetUpdatedAt

func (u *MsgSubscriberUpsert) SetUpdatedAt(v time.Time) *MsgSubscriberUpsert

SetUpdatedAt sets the "updated_at" field.

func (*MsgSubscriberUpsert) SetUpdatedBy

func (u *MsgSubscriberUpsert) SetUpdatedBy(v int) *MsgSubscriberUpsert

SetUpdatedBy sets the "updated_by" field.

func (*MsgSubscriberUpsert) SetUserID

func (u *MsgSubscriberUpsert) SetUserID(v int) *MsgSubscriberUpsert

SetUserID sets the "user_id" field.

func (*MsgSubscriberUpsert) UpdateExclude

func (u *MsgSubscriberUpsert) UpdateExclude() *MsgSubscriberUpsert

UpdateExclude sets the "exclude" field to the value that was provided on create.

func (*MsgSubscriberUpsert) UpdateMsgTypeID

func (u *MsgSubscriberUpsert) UpdateMsgTypeID() *MsgSubscriberUpsert

UpdateMsgTypeID sets the "msg_type_id" field to the value that was provided on create.

func (*MsgSubscriberUpsert) UpdateOrgRoleID

func (u *MsgSubscriberUpsert) UpdateOrgRoleID() *MsgSubscriberUpsert

UpdateOrgRoleID sets the "org_role_id" field to the value that was provided on create.

func (*MsgSubscriberUpsert) UpdateTenantID

func (u *MsgSubscriberUpsert) UpdateTenantID() *MsgSubscriberUpsert

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*MsgSubscriberUpsert) UpdateUpdatedAt

func (u *MsgSubscriberUpsert) UpdateUpdatedAt() *MsgSubscriberUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgSubscriberUpsert) UpdateUpdatedBy

func (u *MsgSubscriberUpsert) UpdateUpdatedBy() *MsgSubscriberUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*MsgSubscriberUpsert) UpdateUserID

func (u *MsgSubscriberUpsert) UpdateUserID() *MsgSubscriberUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type MsgSubscriberUpsertBulk

type MsgSubscriberUpsertBulk struct {
	// contains filtered or unexported fields
}

MsgSubscriberUpsertBulk is the builder for "upsert"-ing a bulk of MsgSubscriber nodes.

func (*MsgSubscriberUpsertBulk) AddOrgRoleID

AddOrgRoleID adds v to the "org_role_id" field.

func (*MsgSubscriberUpsertBulk) AddTenantID

AddTenantID adds v to the "tenant_id" field.

func (*MsgSubscriberUpsertBulk) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgSubscriberUpsertBulk) ClearExclude

ClearExclude clears the value of the "exclude" field.

func (*MsgSubscriberUpsertBulk) ClearOrgRoleID

func (u *MsgSubscriberUpsertBulk) ClearOrgRoleID() *MsgSubscriberUpsertBulk

ClearOrgRoleID clears the value of the "org_role_id" field.

func (*MsgSubscriberUpsertBulk) ClearUpdatedAt

func (u *MsgSubscriberUpsertBulk) ClearUpdatedAt() *MsgSubscriberUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgSubscriberUpsertBulk) ClearUpdatedBy

func (u *MsgSubscriberUpsertBulk) ClearUpdatedBy() *MsgSubscriberUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgSubscriberUpsertBulk) ClearUserID

ClearUserID clears the value of the "user_id" field.

func (*MsgSubscriberUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgSubscriberUpsertBulk) Exec

Exec executes the query.

func (*MsgSubscriberUpsertBulk) ExecX

func (u *MsgSubscriberUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgSubscriberUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgSubscriber.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*MsgSubscriberUpsertBulk) SetExclude

SetExclude sets the "exclude" field.

func (*MsgSubscriberUpsertBulk) SetMsgTypeID

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgSubscriberUpsertBulk) SetOrgRoleID

SetOrgRoleID sets the "org_role_id" field.

func (*MsgSubscriberUpsertBulk) SetTenantID

SetTenantID sets the "tenant_id" field.

func (*MsgSubscriberUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*MsgSubscriberUpsertBulk) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*MsgSubscriberUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*MsgSubscriberUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the MsgSubscriberCreateBulk.OnConflict documentation for more info.

func (*MsgSubscriberUpsertBulk) UpdateExclude

UpdateExclude sets the "exclude" field to the value that was provided on create.

func (*MsgSubscriberUpsertBulk) UpdateMsgTypeID

func (u *MsgSubscriberUpsertBulk) UpdateMsgTypeID() *MsgSubscriberUpsertBulk

UpdateMsgTypeID sets the "msg_type_id" field to the value that was provided on create.

func (*MsgSubscriberUpsertBulk) UpdateNewValues

func (u *MsgSubscriberUpsertBulk) UpdateNewValues() *MsgSubscriberUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.MsgSubscriber.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msgsubscriber.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgSubscriberUpsertBulk) UpdateOrgRoleID

func (u *MsgSubscriberUpsertBulk) UpdateOrgRoleID() *MsgSubscriberUpsertBulk

UpdateOrgRoleID sets the "org_role_id" field to the value that was provided on create.

func (*MsgSubscriberUpsertBulk) UpdateTenantID

func (u *MsgSubscriberUpsertBulk) UpdateTenantID() *MsgSubscriberUpsertBulk

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*MsgSubscriberUpsertBulk) UpdateUpdatedAt

func (u *MsgSubscriberUpsertBulk) UpdateUpdatedAt() *MsgSubscriberUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgSubscriberUpsertBulk) UpdateUpdatedBy

func (u *MsgSubscriberUpsertBulk) UpdateUpdatedBy() *MsgSubscriberUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*MsgSubscriberUpsertBulk) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type MsgSubscriberUpsertOne

type MsgSubscriberUpsertOne struct {
	// contains filtered or unexported fields
}

MsgSubscriberUpsertOne is the builder for "upsert"-ing

one MsgSubscriber node.

func (*MsgSubscriberUpsertOne) AddOrgRoleID

AddOrgRoleID adds v to the "org_role_id" field.

func (*MsgSubscriberUpsertOne) AddTenantID

AddTenantID adds v to the "tenant_id" field.

func (*MsgSubscriberUpsertOne) AddUpdatedBy

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgSubscriberUpsertOne) ClearExclude

ClearExclude clears the value of the "exclude" field.

func (*MsgSubscriberUpsertOne) ClearOrgRoleID

func (u *MsgSubscriberUpsertOne) ClearOrgRoleID() *MsgSubscriberUpsertOne

ClearOrgRoleID clears the value of the "org_role_id" field.

func (*MsgSubscriberUpsertOne) ClearUpdatedAt

func (u *MsgSubscriberUpsertOne) ClearUpdatedAt() *MsgSubscriberUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgSubscriberUpsertOne) ClearUpdatedBy

func (u *MsgSubscriberUpsertOne) ClearUpdatedBy() *MsgSubscriberUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgSubscriberUpsertOne) ClearUserID

ClearUserID clears the value of the "user_id" field.

func (*MsgSubscriberUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgSubscriberUpsertOne) Exec

Exec executes the query.

func (*MsgSubscriberUpsertOne) ExecX

func (u *MsgSubscriberUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgSubscriberUpsertOne) ID

func (u *MsgSubscriberUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*MsgSubscriberUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*MsgSubscriberUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgSubscriber.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*MsgSubscriberUpsertOne) SetExclude

SetExclude sets the "exclude" field.

func (*MsgSubscriberUpsertOne) SetMsgTypeID

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgSubscriberUpsertOne) SetOrgRoleID

SetOrgRoleID sets the "org_role_id" field.

func (*MsgSubscriberUpsertOne) SetTenantID

SetTenantID sets the "tenant_id" field.

func (*MsgSubscriberUpsertOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*MsgSubscriberUpsertOne) SetUpdatedBy

SetUpdatedBy sets the "updated_by" field.

func (*MsgSubscriberUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*MsgSubscriberUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the MsgSubscriberCreate.OnConflict documentation for more info.

func (*MsgSubscriberUpsertOne) UpdateExclude

func (u *MsgSubscriberUpsertOne) UpdateExclude() *MsgSubscriberUpsertOne

UpdateExclude sets the "exclude" field to the value that was provided on create.

func (*MsgSubscriberUpsertOne) UpdateMsgTypeID

func (u *MsgSubscriberUpsertOne) UpdateMsgTypeID() *MsgSubscriberUpsertOne

UpdateMsgTypeID sets the "msg_type_id" field to the value that was provided on create.

func (*MsgSubscriberUpsertOne) UpdateNewValues

func (u *MsgSubscriberUpsertOne) UpdateNewValues() *MsgSubscriberUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.MsgSubscriber.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msgsubscriber.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgSubscriberUpsertOne) UpdateOrgRoleID

func (u *MsgSubscriberUpsertOne) UpdateOrgRoleID() *MsgSubscriberUpsertOne

UpdateOrgRoleID sets the "org_role_id" field to the value that was provided on create.

func (*MsgSubscriberUpsertOne) UpdateTenantID

func (u *MsgSubscriberUpsertOne) UpdateTenantID() *MsgSubscriberUpsertOne

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*MsgSubscriberUpsertOne) UpdateUpdatedAt

func (u *MsgSubscriberUpsertOne) UpdateUpdatedAt() *MsgSubscriberUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgSubscriberUpsertOne) UpdateUpdatedBy

func (u *MsgSubscriberUpsertOne) UpdateUpdatedBy() *MsgSubscriberUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

func (*MsgSubscriberUpsertOne) UpdateUserID

UpdateUserID sets the "user_id" field to the value that was provided on create.

type MsgSubscriberWhereInput

type MsgSubscriberWhereInput struct {
	Predicates []predicate.MsgSubscriber  `json:"-"`
	Not        *MsgSubscriberWhereInput   `json:"not,omitempty"`
	Or         []*MsgSubscriberWhereInput `json:"or,omitempty"`
	And        []*MsgSubscriberWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "msg_type_id" field predicates.
	MsgTypeID      *int  `json:"msgTypeID,omitempty"`
	MsgTypeIDNEQ   *int  `json:"msgTypeIDNEQ,omitempty"`
	MsgTypeIDIn    []int `json:"msgTypeIDIn,omitempty"`
	MsgTypeIDNotIn []int `json:"msgTypeIDNotIn,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "user_id" field predicates.
	UserID       *int  `json:"userID,omitempty"`
	UserIDNEQ    *int  `json:"userIDNEQ,omitempty"`
	UserIDIn     []int `json:"userIDIn,omitempty"`
	UserIDNotIn  []int `json:"userIDNotIn,omitempty"`
	UserIDIsNil  bool  `json:"userIDIsNil,omitempty"`
	UserIDNotNil bool  `json:"userIDNotNil,omitempty"`

	// "org_role_id" field predicates.
	OrgRoleID       *int  `json:"orgRoleID,omitempty"`
	OrgRoleIDNEQ    *int  `json:"orgRoleIDNEQ,omitempty"`
	OrgRoleIDIn     []int `json:"orgRoleIDIn,omitempty"`
	OrgRoleIDNotIn  []int `json:"orgRoleIDNotIn,omitempty"`
	OrgRoleIDGT     *int  `json:"orgRoleIDGT,omitempty"`
	OrgRoleIDGTE    *int  `json:"orgRoleIDGTE,omitempty"`
	OrgRoleIDLT     *int  `json:"orgRoleIDLT,omitempty"`
	OrgRoleIDLTE    *int  `json:"orgRoleIDLTE,omitempty"`
	OrgRoleIDIsNil  bool  `json:"orgRoleIDIsNil,omitempty"`
	OrgRoleIDNotNil bool  `json:"orgRoleIDNotNil,omitempty"`

	// "exclude" field predicates.
	Exclude       *bool `json:"exclude,omitempty"`
	ExcludeNEQ    *bool `json:"excludeNEQ,omitempty"`
	ExcludeIsNil  bool  `json:"excludeIsNil,omitempty"`
	ExcludeNotNil bool  `json:"excludeNotNil,omitempty"`

	// "msg_type" edge predicates.
	HasMsgType     *bool                `json:"hasMsgType,omitempty"`
	HasMsgTypeWith []*MsgTypeWhereInput `json:"hasMsgTypeWith,omitempty"`
}

MsgSubscriberWhereInput represents a where input for filtering MsgSubscriber queries.

func (*MsgSubscriberWhereInput) AddPredicates

func (i *MsgSubscriberWhereInput) AddPredicates(predicates ...predicate.MsgSubscriber)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*MsgSubscriberWhereInput) Filter

Filter applies the MsgSubscriberWhereInput filter on the MsgSubscriberQuery builder.

func (*MsgSubscriberWhereInput) P

P returns a predicate for filtering msgsubscribers. An error is returned if the input is empty or invalid.

type MsgSubscribers

type MsgSubscribers []*MsgSubscriber

MsgSubscribers is a parsable slice of MsgSubscriber.

type MsgTemplate

type MsgTemplate struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 应用消息类型ID
	MsgTypeID int `json:"msg_type_id,omitempty"`
	// 消息事件ID
	MsgEventID int `json:"msg_event_id,omitempty"`
	// 组织ID
	TenantID int `json:"tenant_id,omitempty"`
	// 消息模板名称
	Name string `json:"name,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// 消息模式:站内信,app推送,邮件,短信,微信等
	ReceiverType profile.ReceiverType `json:"receiver_type,omitempty"`
	// 消息类型:文本,网页,需要结合mod确定支持的格式
	Format msgtemplate.Format `json:"format,omitempty"`
	// 标题
	Subject string `json:"subject,omitempty"`
	// 发件人
	From string `json:"from,omitempty"`
	// 收件人
	To string `json:"to,omitempty"`
	// 抄送
	Cc string `json:"cc,omitempty"`
	// 密送
	Bcc string `json:"bcc,omitempty"`
	// 消息体
	Body string `json:"body,omitempty"`
	// 模板地址。key:/msg/tpl/temp/1/xxx
	Tpl string `json:"tpl,omitempty"`
	// 模板地址
	TplFileID *int `json:"tpl_file_id,omitempty"`
	// 附件地址。key:/msg/att/1/xxx
	Attachments []string `json:"attachments,omitempty"`
	// 附件ids
	AttachmentsFileIds []int `json:"attachments_file_ids,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MsgTemplateQuery when eager-loading is set.
	Edges MsgTemplateEdges `json:"edges"`
	// contains filtered or unexported fields
}

MsgTemplate is the model entity for the MsgTemplate schema.

func (*MsgTemplate) Event

func (mt *MsgTemplate) Event(ctx context.Context) (*MsgEvent, error)

func (*MsgTemplate) GlobalID

func (mt *MsgTemplate) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given MsgTemplate node.

func (*MsgTemplate) IsNode

func (*MsgTemplate) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*MsgTemplate) QueryEvent

func (mt *MsgTemplate) QueryEvent() *MsgEventQuery

QueryEvent queries the "event" edge of the MsgTemplate entity.

func (*MsgTemplate) String

func (mt *MsgTemplate) String() string

String implements the fmt.Stringer.

func (*MsgTemplate) ToEdge

func (mt *MsgTemplate) ToEdge(order *MsgTemplateOrder) *MsgTemplateEdge

ToEdge converts MsgTemplate into MsgTemplateEdge.

func (*MsgTemplate) Unwrap

func (mt *MsgTemplate) Unwrap() *MsgTemplate

Unwrap unwraps the MsgTemplate 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 (*MsgTemplate) Update

func (mt *MsgTemplate) Update() *MsgTemplateUpdateOne

Update returns a builder for updating this MsgTemplate. Note that you need to call MsgTemplate.Unwrap() before calling this method if this MsgTemplate was returned from a transaction, and the transaction was committed or rolled back.

func (*MsgTemplate) Value

func (mt *MsgTemplate) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the MsgTemplate. This includes values selected through modifiers, order, etc.

type MsgTemplateClient

type MsgTemplateClient struct {
	// contains filtered or unexported fields
}

MsgTemplateClient is a client for the MsgTemplate schema.

func NewMsgTemplateClient

func NewMsgTemplateClient(c config) *MsgTemplateClient

NewMsgTemplateClient returns a client for the MsgTemplate from the given config.

func (*MsgTemplateClient) Create

func (c *MsgTemplateClient) Create() *MsgTemplateCreate

Create returns a builder for creating a MsgTemplate entity.

func (*MsgTemplateClient) CreateBulk

func (c *MsgTemplateClient) CreateBulk(builders ...*MsgTemplateCreate) *MsgTemplateCreateBulk

CreateBulk returns a builder for creating a bulk of MsgTemplate entities.

func (*MsgTemplateClient) Delete

func (c *MsgTemplateClient) Delete() *MsgTemplateDelete

Delete returns a delete builder for MsgTemplate.

func (*MsgTemplateClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MsgTemplateClient) DeleteOneID

func (c *MsgTemplateClient) DeleteOneID(id int) *MsgTemplateDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MsgTemplateClient) Get

func (c *MsgTemplateClient) Get(ctx context.Context, id int) (*MsgTemplate, error)

Get returns a MsgTemplate entity by its id.

func (*MsgTemplateClient) GetX

func (c *MsgTemplateClient) GetX(ctx context.Context, id int) *MsgTemplate

GetX is like Get, but panics if an error occurs.

func (*MsgTemplateClient) Hooks

func (c *MsgTemplateClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MsgTemplateClient) Intercept

func (c *MsgTemplateClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `msgtemplate.Intercept(f(g(h())))`.

func (*MsgTemplateClient) Interceptors

func (c *MsgTemplateClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MsgTemplateClient) MapCreateBulk

func (c *MsgTemplateClient) MapCreateBulk(slice any, setFunc func(*MsgTemplateCreate, int)) *MsgTemplateCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MsgTemplateClient) Query

func (c *MsgTemplateClient) Query() *MsgTemplateQuery

Query returns a query builder for MsgTemplate.

func (*MsgTemplateClient) QueryEvent

func (c *MsgTemplateClient) QueryEvent(mt *MsgTemplate) *MsgEventQuery

QueryEvent queries the event edge of a MsgTemplate.

func (*MsgTemplateClient) Update

func (c *MsgTemplateClient) Update() *MsgTemplateUpdate

Update returns an update builder for MsgTemplate.

func (*MsgTemplateClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*MsgTemplateClient) UpdateOneID

func (c *MsgTemplateClient) UpdateOneID(id int) *MsgTemplateUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MsgTemplateClient) Use

func (c *MsgTemplateClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `msgtemplate.Hooks(f(g(h())))`.

type MsgTemplateConnection

type MsgTemplateConnection struct {
	Edges      []*MsgTemplateEdge `json:"edges"`
	PageInfo   PageInfo           `json:"pageInfo"`
	TotalCount int                `json:"totalCount"`
}

MsgTemplateConnection is the connection containing edges to MsgTemplate.

type MsgTemplateCreate

type MsgTemplateCreate struct {
	// contains filtered or unexported fields
}

MsgTemplateCreate is the builder for creating a MsgTemplate entity.

func (*MsgTemplateCreate) Exec

func (mtc *MsgTemplateCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgTemplateCreate) ExecX

func (mtc *MsgTemplateCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTemplateCreate) Mutation

func (mtc *MsgTemplateCreate) Mutation() *MsgTemplateMutation

Mutation returns the MsgTemplateMutation object of the builder.

func (*MsgTemplateCreate) OnConflict

func (mtc *MsgTemplateCreate) OnConflict(opts ...sql.ConflictOption) *MsgTemplateUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgTemplate.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgTemplateUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*MsgTemplateCreate) OnConflictColumns

func (mtc *MsgTemplateCreate) OnConflictColumns(columns ...string) *MsgTemplateUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgTemplate.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgTemplateCreate) Save

func (mtc *MsgTemplateCreate) Save(ctx context.Context) (*MsgTemplate, error)

Save creates the MsgTemplate in the database.

func (*MsgTemplateCreate) SaveX

func (mtc *MsgTemplateCreate) SaveX(ctx context.Context) *MsgTemplate

SaveX calls Save and panics if Save returns an error.

func (*MsgTemplateCreate) SetAttachments

func (mtc *MsgTemplateCreate) SetAttachments(s []string) *MsgTemplateCreate

SetAttachments sets the "attachments" field.

func (*MsgTemplateCreate) SetAttachmentsFileIds

func (mtc *MsgTemplateCreate) SetAttachmentsFileIds(i []int) *MsgTemplateCreate

SetAttachmentsFileIds sets the "attachments_file_ids" field.

func (*MsgTemplateCreate) SetBcc

func (mtc *MsgTemplateCreate) SetBcc(s string) *MsgTemplateCreate

SetBcc sets the "bcc" field.

func (*MsgTemplateCreate) SetBody

func (mtc *MsgTemplateCreate) SetBody(s string) *MsgTemplateCreate

SetBody sets the "body" field.

func (*MsgTemplateCreate) SetCc

SetCc sets the "cc" field.

func (*MsgTemplateCreate) SetComments

func (mtc *MsgTemplateCreate) SetComments(s string) *MsgTemplateCreate

SetComments sets the "comments" field.

func (*MsgTemplateCreate) SetCreatedAt

func (mtc *MsgTemplateCreate) SetCreatedAt(t time.Time) *MsgTemplateCreate

SetCreatedAt sets the "created_at" field.

func (*MsgTemplateCreate) SetCreatedBy

func (mtc *MsgTemplateCreate) SetCreatedBy(i int) *MsgTemplateCreate

SetCreatedBy sets the "created_by" field.

func (*MsgTemplateCreate) SetEvent

func (mtc *MsgTemplateCreate) SetEvent(m *MsgEvent) *MsgTemplateCreate

SetEvent sets the "event" edge to the MsgEvent entity.

func (*MsgTemplateCreate) SetEventID

func (mtc *MsgTemplateCreate) SetEventID(id int) *MsgTemplateCreate

SetEventID sets the "event" edge to the MsgEvent entity by ID.

func (*MsgTemplateCreate) SetFormat

SetFormat sets the "format" field.

func (*MsgTemplateCreate) SetFrom

func (mtc *MsgTemplateCreate) SetFrom(s string) *MsgTemplateCreate

SetFrom sets the "from" field.

func (*MsgTemplateCreate) SetID

func (mtc *MsgTemplateCreate) SetID(i int) *MsgTemplateCreate

SetID sets the "id" field.

func (*MsgTemplateCreate) SetInput

SetInput applies the change-set in the CreateMsgTemplateInput on the MsgTemplateCreate builder.

func (*MsgTemplateCreate) SetMsgEventID

func (mtc *MsgTemplateCreate) SetMsgEventID(i int) *MsgTemplateCreate

SetMsgEventID sets the "msg_event_id" field.

func (*MsgTemplateCreate) SetMsgTypeID

func (mtc *MsgTemplateCreate) SetMsgTypeID(i int) *MsgTemplateCreate

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgTemplateCreate) SetName

func (mtc *MsgTemplateCreate) SetName(s string) *MsgTemplateCreate

SetName sets the "name" field.

func (*MsgTemplateCreate) SetNillableBcc

func (mtc *MsgTemplateCreate) SetNillableBcc(s *string) *MsgTemplateCreate

SetNillableBcc sets the "bcc" field if the given value is not nil.

func (*MsgTemplateCreate) SetNillableBody

func (mtc *MsgTemplateCreate) SetNillableBody(s *string) *MsgTemplateCreate

SetNillableBody sets the "body" field if the given value is not nil.

func (*MsgTemplateCreate) SetNillableCc

func (mtc *MsgTemplateCreate) SetNillableCc(s *string) *MsgTemplateCreate

SetNillableCc sets the "cc" field if the given value is not nil.

func (*MsgTemplateCreate) SetNillableComments

func (mtc *MsgTemplateCreate) SetNillableComments(s *string) *MsgTemplateCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*MsgTemplateCreate) SetNillableCreatedAt

func (mtc *MsgTemplateCreate) SetNillableCreatedAt(t *time.Time) *MsgTemplateCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*MsgTemplateCreate) SetNillableFrom

func (mtc *MsgTemplateCreate) SetNillableFrom(s *string) *MsgTemplateCreate

SetNillableFrom sets the "from" field if the given value is not nil.

func (*MsgTemplateCreate) SetNillableStatus

func (mtc *MsgTemplateCreate) SetNillableStatus(ts *typex.SimpleStatus) *MsgTemplateCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*MsgTemplateCreate) SetNillableSubject

func (mtc *MsgTemplateCreate) SetNillableSubject(s *string) *MsgTemplateCreate

SetNillableSubject sets the "subject" field if the given value is not nil.

func (*MsgTemplateCreate) SetNillableTo

func (mtc *MsgTemplateCreate) SetNillableTo(s *string) *MsgTemplateCreate

SetNillableTo sets the "to" field if the given value is not nil.

func (*MsgTemplateCreate) SetNillableTpl

func (mtc *MsgTemplateCreate) SetNillableTpl(s *string) *MsgTemplateCreate

SetNillableTpl sets the "tpl" field if the given value is not nil.

func (*MsgTemplateCreate) SetNillableTplFileID

func (mtc *MsgTemplateCreate) SetNillableTplFileID(i *int) *MsgTemplateCreate

SetNillableTplFileID sets the "tpl_file_id" field if the given value is not nil.

func (*MsgTemplateCreate) SetNillableUpdatedAt

func (mtc *MsgTemplateCreate) SetNillableUpdatedAt(t *time.Time) *MsgTemplateCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MsgTemplateCreate) SetNillableUpdatedBy

func (mtc *MsgTemplateCreate) SetNillableUpdatedBy(i *int) *MsgTemplateCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgTemplateCreate) SetReceiverType

func (mtc *MsgTemplateCreate) SetReceiverType(pt profile.ReceiverType) *MsgTemplateCreate

SetReceiverType sets the "receiver_type" field.

func (*MsgTemplateCreate) SetStatus

SetStatus sets the "status" field.

func (*MsgTemplateCreate) SetSubject

func (mtc *MsgTemplateCreate) SetSubject(s string) *MsgTemplateCreate

SetSubject sets the "subject" field.

func (*MsgTemplateCreate) SetTenantID

func (mtc *MsgTemplateCreate) SetTenantID(i int) *MsgTemplateCreate

SetTenantID sets the "tenant_id" field.

func (*MsgTemplateCreate) SetTo

SetTo sets the "to" field.

func (*MsgTemplateCreate) SetTpl

func (mtc *MsgTemplateCreate) SetTpl(s string) *MsgTemplateCreate

SetTpl sets the "tpl" field.

func (*MsgTemplateCreate) SetTplFileID

func (mtc *MsgTemplateCreate) SetTplFileID(i int) *MsgTemplateCreate

SetTplFileID sets the "tpl_file_id" field.

func (*MsgTemplateCreate) SetUpdatedAt

func (mtc *MsgTemplateCreate) SetUpdatedAt(t time.Time) *MsgTemplateCreate

SetUpdatedAt sets the "updated_at" field.

func (*MsgTemplateCreate) SetUpdatedBy

func (mtc *MsgTemplateCreate) SetUpdatedBy(i int) *MsgTemplateCreate

SetUpdatedBy sets the "updated_by" field.

type MsgTemplateCreateBulk

type MsgTemplateCreateBulk struct {
	// contains filtered or unexported fields
}

MsgTemplateCreateBulk is the builder for creating many MsgTemplate entities in bulk.

func (*MsgTemplateCreateBulk) Exec

func (mtcb *MsgTemplateCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgTemplateCreateBulk) ExecX

func (mtcb *MsgTemplateCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTemplateCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgTemplate.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgTemplateUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*MsgTemplateCreateBulk) OnConflictColumns

func (mtcb *MsgTemplateCreateBulk) OnConflictColumns(columns ...string) *MsgTemplateUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgTemplate.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgTemplateCreateBulk) Save

func (mtcb *MsgTemplateCreateBulk) Save(ctx context.Context) ([]*MsgTemplate, error)

Save creates the MsgTemplate entities in the database.

func (*MsgTemplateCreateBulk) SaveX

func (mtcb *MsgTemplateCreateBulk) SaveX(ctx context.Context) []*MsgTemplate

SaveX is like Save, but panics if an error occurs.

type MsgTemplateDelete

type MsgTemplateDelete struct {
	// contains filtered or unexported fields
}

MsgTemplateDelete is the builder for deleting a MsgTemplate entity.

func (*MsgTemplateDelete) Exec

func (mtd *MsgTemplateDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MsgTemplateDelete) ExecX

func (mtd *MsgTemplateDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MsgTemplateDelete) Where

Where appends a list predicates to the MsgTemplateDelete builder.

type MsgTemplateDeleteOne

type MsgTemplateDeleteOne struct {
	// contains filtered or unexported fields
}

MsgTemplateDeleteOne is the builder for deleting a single MsgTemplate entity.

func (*MsgTemplateDeleteOne) Exec

func (mtdo *MsgTemplateDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MsgTemplateDeleteOne) ExecX

func (mtdo *MsgTemplateDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTemplateDeleteOne) Where

Where appends a list predicates to the MsgTemplateDelete builder.

type MsgTemplateEdge

type MsgTemplateEdge struct {
	Node   *MsgTemplate `json:"node"`
	Cursor Cursor       `json:"cursor"`
}

MsgTemplateEdge is the edge representation of MsgTemplate.

type MsgTemplateEdges

type MsgTemplateEdges struct {
	// Event holds the value of the event edge.
	Event *MsgEvent `json:"event,omitempty"`
	// contains filtered or unexported fields
}

MsgTemplateEdges holds the relations/edges for other nodes in the graph.

func (MsgTemplateEdges) EventOrErr

func (e MsgTemplateEdges) EventOrErr() (*MsgEvent, error)

EventOrErr returns the Event value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type MsgTemplateGroupBy

type MsgTemplateGroupBy struct {
	// contains filtered or unexported fields
}

MsgTemplateGroupBy is the group-by builder for MsgTemplate entities.

func (*MsgTemplateGroupBy) Aggregate

func (mtgb *MsgTemplateGroupBy) Aggregate(fns ...AggregateFunc) *MsgTemplateGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MsgTemplateGroupBy) Bool

func (s *MsgTemplateGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MsgTemplateGroupBy) BoolX

func (s *MsgTemplateGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MsgTemplateGroupBy) Bools

func (s *MsgTemplateGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MsgTemplateGroupBy) BoolsX

func (s *MsgTemplateGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MsgTemplateGroupBy) Float64

func (s *MsgTemplateGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MsgTemplateGroupBy) Float64X

func (s *MsgTemplateGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MsgTemplateGroupBy) Float64s

func (s *MsgTemplateGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MsgTemplateGroupBy) Float64sX

func (s *MsgTemplateGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MsgTemplateGroupBy) Int

func (s *MsgTemplateGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MsgTemplateGroupBy) IntX

func (s *MsgTemplateGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MsgTemplateGroupBy) Ints

func (s *MsgTemplateGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MsgTemplateGroupBy) IntsX

func (s *MsgTemplateGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MsgTemplateGroupBy) Scan

func (mtgb *MsgTemplateGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MsgTemplateGroupBy) ScanX

func (s *MsgTemplateGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MsgTemplateGroupBy) String

func (s *MsgTemplateGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MsgTemplateGroupBy) StringX

func (s *MsgTemplateGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MsgTemplateGroupBy) Strings

func (s *MsgTemplateGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MsgTemplateGroupBy) StringsX

func (s *MsgTemplateGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MsgTemplateMutation

type MsgTemplateMutation struct {
	// contains filtered or unexported fields
}

MsgTemplateMutation represents an operation that mutates the MsgTemplate nodes in the graph.

func (*MsgTemplateMutation) AddCreatedBy

func (m *MsgTemplateMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*MsgTemplateMutation) AddField

func (m *MsgTemplateMutation) 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 (*MsgTemplateMutation) AddMsgTypeID

func (m *MsgTemplateMutation) AddMsgTypeID(i int)

AddMsgTypeID adds i to the "msg_type_id" field.

func (*MsgTemplateMutation) AddTenantID

func (m *MsgTemplateMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*MsgTemplateMutation) AddTplFileID

func (m *MsgTemplateMutation) AddTplFileID(i int)

AddTplFileID adds i to the "tpl_file_id" field.

func (*MsgTemplateMutation) AddUpdatedBy

func (m *MsgTemplateMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgTemplateMutation) AddedCreatedBy

func (m *MsgTemplateMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*MsgTemplateMutation) AddedEdges

func (m *MsgTemplateMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MsgTemplateMutation) AddedField

func (m *MsgTemplateMutation) 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 (*MsgTemplateMutation) AddedFields

func (m *MsgTemplateMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MsgTemplateMutation) AddedIDs

func (m *MsgTemplateMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MsgTemplateMutation) AddedMsgTypeID

func (m *MsgTemplateMutation) AddedMsgTypeID() (r int, exists bool)

AddedMsgTypeID returns the value that was added to the "msg_type_id" field in this mutation.

func (*MsgTemplateMutation) AddedTenantID

func (m *MsgTemplateMutation) AddedTenantID() (r int, exists bool)

AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.

func (*MsgTemplateMutation) AddedTplFileID

func (m *MsgTemplateMutation) AddedTplFileID() (r int, exists bool)

AddedTplFileID returns the value that was added to the "tpl_file_id" field in this mutation.

func (*MsgTemplateMutation) AddedUpdatedBy

func (m *MsgTemplateMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*MsgTemplateMutation) AppendAttachments

func (m *MsgTemplateMutation) AppendAttachments(s []string)

AppendAttachments adds s to the "attachments" field.

func (*MsgTemplateMutation) AppendAttachmentsFileIds

func (m *MsgTemplateMutation) AppendAttachmentsFileIds(i []int)

AppendAttachmentsFileIds adds i to the "attachments_file_ids" field.

func (*MsgTemplateMutation) AppendedAttachments

func (m *MsgTemplateMutation) AppendedAttachments() ([]string, bool)

AppendedAttachments returns the list of values that were appended to the "attachments" field in this mutation.

func (*MsgTemplateMutation) AppendedAttachmentsFileIds

func (m *MsgTemplateMutation) AppendedAttachmentsFileIds() ([]int, bool)

AppendedAttachmentsFileIds returns the list of values that were appended to the "attachments_file_ids" field in this mutation.

func (*MsgTemplateMutation) Attachments

func (m *MsgTemplateMutation) Attachments() (r []string, exists bool)

Attachments returns the value of the "attachments" field in the mutation.

func (*MsgTemplateMutation) AttachmentsCleared

func (m *MsgTemplateMutation) AttachmentsCleared() bool

AttachmentsCleared returns if the "attachments" field was cleared in this mutation.

func (*MsgTemplateMutation) AttachmentsFileIds

func (m *MsgTemplateMutation) AttachmentsFileIds() (r []int, exists bool)

AttachmentsFileIds returns the value of the "attachments_file_ids" field in the mutation.

func (*MsgTemplateMutation) AttachmentsFileIdsCleared

func (m *MsgTemplateMutation) AttachmentsFileIdsCleared() bool

AttachmentsFileIdsCleared returns if the "attachments_file_ids" field was cleared in this mutation.

func (*MsgTemplateMutation) Bcc

func (m *MsgTemplateMutation) Bcc() (r string, exists bool)

Bcc returns the value of the "bcc" field in the mutation.

func (*MsgTemplateMutation) BccCleared

func (m *MsgTemplateMutation) BccCleared() bool

BccCleared returns if the "bcc" field was cleared in this mutation.

func (*MsgTemplateMutation) Body

func (m *MsgTemplateMutation) Body() (r string, exists bool)

Body returns the value of the "body" field in the mutation.

func (*MsgTemplateMutation) BodyCleared

func (m *MsgTemplateMutation) BodyCleared() bool

BodyCleared returns if the "body" field was cleared in this mutation.

func (*MsgTemplateMutation) Cc

func (m *MsgTemplateMutation) Cc() (r string, exists bool)

Cc returns the value of the "cc" field in the mutation.

func (*MsgTemplateMutation) CcCleared

func (m *MsgTemplateMutation) CcCleared() bool

CcCleared returns if the "cc" field was cleared in this mutation.

func (*MsgTemplateMutation) ClearAttachments

func (m *MsgTemplateMutation) ClearAttachments()

ClearAttachments clears the value of the "attachments" field.

func (*MsgTemplateMutation) ClearAttachmentsFileIds

func (m *MsgTemplateMutation) ClearAttachmentsFileIds()

ClearAttachmentsFileIds clears the value of the "attachments_file_ids" field.

func (*MsgTemplateMutation) ClearBcc

func (m *MsgTemplateMutation) ClearBcc()

ClearBcc clears the value of the "bcc" field.

func (*MsgTemplateMutation) ClearBody

func (m *MsgTemplateMutation) ClearBody()

ClearBody clears the value of the "body" field.

func (*MsgTemplateMutation) ClearCc

func (m *MsgTemplateMutation) ClearCc()

ClearCc clears the value of the "cc" field.

func (*MsgTemplateMutation) ClearComments

func (m *MsgTemplateMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*MsgTemplateMutation) ClearEdge

func (m *MsgTemplateMutation) 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 (*MsgTemplateMutation) ClearEvent

func (m *MsgTemplateMutation) ClearEvent()

ClearEvent clears the "event" edge to the MsgEvent entity.

func (*MsgTemplateMutation) ClearField

func (m *MsgTemplateMutation) 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 (*MsgTemplateMutation) ClearFrom

func (m *MsgTemplateMutation) ClearFrom()

ClearFrom clears the value of the "from" field.

func (*MsgTemplateMutation) ClearStatus

func (m *MsgTemplateMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*MsgTemplateMutation) ClearSubject

func (m *MsgTemplateMutation) ClearSubject()

ClearSubject clears the value of the "subject" field.

func (*MsgTemplateMutation) ClearTo

func (m *MsgTemplateMutation) ClearTo()

ClearTo clears the value of the "to" field.

func (*MsgTemplateMutation) ClearTpl

func (m *MsgTemplateMutation) ClearTpl()

ClearTpl clears the value of the "tpl" field.

func (*MsgTemplateMutation) ClearTplFileID

func (m *MsgTemplateMutation) ClearTplFileID()

ClearTplFileID clears the value of the "tpl_file_id" field.

func (*MsgTemplateMutation) ClearUpdatedAt

func (m *MsgTemplateMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgTemplateMutation) ClearUpdatedBy

func (m *MsgTemplateMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgTemplateMutation) ClearedEdges

func (m *MsgTemplateMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MsgTemplateMutation) ClearedFields

func (m *MsgTemplateMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MsgTemplateMutation) Client

func (m MsgTemplateMutation) 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 (*MsgTemplateMutation) Comments

func (m *MsgTemplateMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*MsgTemplateMutation) CommentsCleared

func (m *MsgTemplateMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*MsgTemplateMutation) CreatedAt

func (m *MsgTemplateMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*MsgTemplateMutation) CreatedBy

func (m *MsgTemplateMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*MsgTemplateMutation) EdgeCleared

func (m *MsgTemplateMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MsgTemplateMutation) EventCleared

func (m *MsgTemplateMutation) EventCleared() bool

EventCleared reports if the "event" edge to the MsgEvent entity was cleared.

func (*MsgTemplateMutation) EventID

func (m *MsgTemplateMutation) EventID() (id int, exists bool)

EventID returns the "event" edge ID in the mutation.

func (*MsgTemplateMutation) EventIDs

func (m *MsgTemplateMutation) EventIDs() (ids []int)

EventIDs returns the "event" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EventID instead. It exists only for internal usage by the builders.

func (*MsgTemplateMutation) Field

func (m *MsgTemplateMutation) 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 (*MsgTemplateMutation) FieldCleared

func (m *MsgTemplateMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MsgTemplateMutation) Fields

func (m *MsgTemplateMutation) 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 (*MsgTemplateMutation) Format

func (m *MsgTemplateMutation) Format() (r msgtemplate.Format, exists bool)

Format returns the value of the "format" field in the mutation.

func (*MsgTemplateMutation) From

func (m *MsgTemplateMutation) From() (r string, exists bool)

From returns the value of the "from" field in the mutation.

func (*MsgTemplateMutation) FromCleared

func (m *MsgTemplateMutation) FromCleared() bool

FromCleared returns if the "from" field was cleared in this mutation.

func (*MsgTemplateMutation) ID

func (m *MsgTemplateMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*MsgTemplateMutation) IDs

func (m *MsgTemplateMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*MsgTemplateMutation) MsgEventID

func (m *MsgTemplateMutation) MsgEventID() (r int, exists bool)

MsgEventID returns the value of the "msg_event_id" field in the mutation.

func (*MsgTemplateMutation) MsgTypeID

func (m *MsgTemplateMutation) MsgTypeID() (r int, exists bool)

MsgTypeID returns the value of the "msg_type_id" field in the mutation.

func (*MsgTemplateMutation) Name

func (m *MsgTemplateMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*MsgTemplateMutation) OldAttachments

func (m *MsgTemplateMutation) OldAttachments(ctx context.Context) (v []string, err error)

OldAttachments returns the old "attachments" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldAttachmentsFileIds

func (m *MsgTemplateMutation) OldAttachmentsFileIds(ctx context.Context) (v []int, err error)

OldAttachmentsFileIds returns the old "attachments_file_ids" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldBcc

func (m *MsgTemplateMutation) OldBcc(ctx context.Context) (v string, err error)

OldBcc returns the old "bcc" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldBody

func (m *MsgTemplateMutation) OldBody(ctx context.Context) (v string, err error)

OldBody returns the old "body" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldCc

func (m *MsgTemplateMutation) OldCc(ctx context.Context) (v string, err error)

OldCc returns the old "cc" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldComments

func (m *MsgTemplateMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldCreatedAt

func (m *MsgTemplateMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldCreatedBy

func (m *MsgTemplateMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldField

func (m *MsgTemplateMutation) 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 (*MsgTemplateMutation) OldFormat

func (m *MsgTemplateMutation) OldFormat(ctx context.Context) (v msgtemplate.Format, err error)

OldFormat returns the old "format" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldFrom

func (m *MsgTemplateMutation) OldFrom(ctx context.Context) (v string, err error)

OldFrom returns the old "from" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldMsgEventID

func (m *MsgTemplateMutation) OldMsgEventID(ctx context.Context) (v int, err error)

OldMsgEventID returns the old "msg_event_id" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldMsgTypeID

func (m *MsgTemplateMutation) OldMsgTypeID(ctx context.Context) (v int, err error)

OldMsgTypeID returns the old "msg_type_id" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldName

func (m *MsgTemplateMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldReceiverType

func (m *MsgTemplateMutation) OldReceiverType(ctx context.Context) (v profile.ReceiverType, err error)

OldReceiverType returns the old "receiver_type" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldStatus

func (m *MsgTemplateMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldSubject

func (m *MsgTemplateMutation) OldSubject(ctx context.Context) (v string, err error)

OldSubject returns the old "subject" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldTenantID

func (m *MsgTemplateMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldTo

func (m *MsgTemplateMutation) OldTo(ctx context.Context) (v string, err error)

OldTo returns the old "to" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldTpl

func (m *MsgTemplateMutation) OldTpl(ctx context.Context) (v string, err error)

OldTpl returns the old "tpl" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldTplFileID

func (m *MsgTemplateMutation) OldTplFileID(ctx context.Context) (v *int, err error)

OldTplFileID returns the old "tpl_file_id" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldUpdatedAt

func (m *MsgTemplateMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) OldUpdatedBy

func (m *MsgTemplateMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the MsgTemplate entity. If the MsgTemplate object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTemplateMutation) Op

func (m *MsgTemplateMutation) Op() Op

Op returns the operation name.

func (*MsgTemplateMutation) ReceiverType

func (m *MsgTemplateMutation) ReceiverType() (r profile.ReceiverType, exists bool)

ReceiverType returns the value of the "receiver_type" field in the mutation.

func (*MsgTemplateMutation) RemovedEdges

func (m *MsgTemplateMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MsgTemplateMutation) RemovedIDs

func (m *MsgTemplateMutation) 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 (*MsgTemplateMutation) ResetAttachments

func (m *MsgTemplateMutation) ResetAttachments()

ResetAttachments resets all changes to the "attachments" field.

func (*MsgTemplateMutation) ResetAttachmentsFileIds

func (m *MsgTemplateMutation) ResetAttachmentsFileIds()

ResetAttachmentsFileIds resets all changes to the "attachments_file_ids" field.

func (*MsgTemplateMutation) ResetBcc

func (m *MsgTemplateMutation) ResetBcc()

ResetBcc resets all changes to the "bcc" field.

func (*MsgTemplateMutation) ResetBody

func (m *MsgTemplateMutation) ResetBody()

ResetBody resets all changes to the "body" field.

func (*MsgTemplateMutation) ResetCc

func (m *MsgTemplateMutation) ResetCc()

ResetCc resets all changes to the "cc" field.

func (*MsgTemplateMutation) ResetComments

func (m *MsgTemplateMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*MsgTemplateMutation) ResetCreatedAt

func (m *MsgTemplateMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*MsgTemplateMutation) ResetCreatedBy

func (m *MsgTemplateMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*MsgTemplateMutation) ResetEdge

func (m *MsgTemplateMutation) 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 (*MsgTemplateMutation) ResetEvent

func (m *MsgTemplateMutation) ResetEvent()

ResetEvent resets all changes to the "event" edge.

func (*MsgTemplateMutation) ResetField

func (m *MsgTemplateMutation) 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 (*MsgTemplateMutation) ResetFormat

func (m *MsgTemplateMutation) ResetFormat()

ResetFormat resets all changes to the "format" field.

func (*MsgTemplateMutation) ResetFrom

func (m *MsgTemplateMutation) ResetFrom()

ResetFrom resets all changes to the "from" field.

func (*MsgTemplateMutation) ResetMsgEventID

func (m *MsgTemplateMutation) ResetMsgEventID()

ResetMsgEventID resets all changes to the "msg_event_id" field.

func (*MsgTemplateMutation) ResetMsgTypeID

func (m *MsgTemplateMutation) ResetMsgTypeID()

ResetMsgTypeID resets all changes to the "msg_type_id" field.

func (*MsgTemplateMutation) ResetName

func (m *MsgTemplateMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*MsgTemplateMutation) ResetReceiverType

func (m *MsgTemplateMutation) ResetReceiverType()

ResetReceiverType resets all changes to the "receiver_type" field.

func (*MsgTemplateMutation) ResetStatus

func (m *MsgTemplateMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*MsgTemplateMutation) ResetSubject

func (m *MsgTemplateMutation) ResetSubject()

ResetSubject resets all changes to the "subject" field.

func (*MsgTemplateMutation) ResetTenantID

func (m *MsgTemplateMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*MsgTemplateMutation) ResetTo

func (m *MsgTemplateMutation) ResetTo()

ResetTo resets all changes to the "to" field.

func (*MsgTemplateMutation) ResetTpl

func (m *MsgTemplateMutation) ResetTpl()

ResetTpl resets all changes to the "tpl" field.

func (*MsgTemplateMutation) ResetTplFileID

func (m *MsgTemplateMutation) ResetTplFileID()

ResetTplFileID resets all changes to the "tpl_file_id" field.

func (*MsgTemplateMutation) ResetUpdatedAt

func (m *MsgTemplateMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*MsgTemplateMutation) ResetUpdatedBy

func (m *MsgTemplateMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*MsgTemplateMutation) SetAttachments

func (m *MsgTemplateMutation) SetAttachments(s []string)

SetAttachments sets the "attachments" field.

func (*MsgTemplateMutation) SetAttachmentsFileIds

func (m *MsgTemplateMutation) SetAttachmentsFileIds(i []int)

SetAttachmentsFileIds sets the "attachments_file_ids" field.

func (*MsgTemplateMutation) SetBcc

func (m *MsgTemplateMutation) SetBcc(s string)

SetBcc sets the "bcc" field.

func (*MsgTemplateMutation) SetBody

func (m *MsgTemplateMutation) SetBody(s string)

SetBody sets the "body" field.

func (*MsgTemplateMutation) SetCc

func (m *MsgTemplateMutation) SetCc(s string)

SetCc sets the "cc" field.

func (*MsgTemplateMutation) SetComments

func (m *MsgTemplateMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*MsgTemplateMutation) SetCreatedAt

func (m *MsgTemplateMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*MsgTemplateMutation) SetCreatedBy

func (m *MsgTemplateMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*MsgTemplateMutation) SetEventID

func (m *MsgTemplateMutation) SetEventID(id int)

SetEventID sets the "event" edge to the MsgEvent entity by id.

func (*MsgTemplateMutation) SetField

func (m *MsgTemplateMutation) 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 (*MsgTemplateMutation) SetFormat

func (m *MsgTemplateMutation) SetFormat(value msgtemplate.Format)

SetFormat sets the "format" field.

func (*MsgTemplateMutation) SetFrom

func (m *MsgTemplateMutation) SetFrom(s string)

SetFrom sets the "from" field.

func (*MsgTemplateMutation) SetID

func (m *MsgTemplateMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of MsgTemplate entities.

func (*MsgTemplateMutation) SetMsgEventID

func (m *MsgTemplateMutation) SetMsgEventID(i int)

SetMsgEventID sets the "msg_event_id" field.

func (*MsgTemplateMutation) SetMsgTypeID

func (m *MsgTemplateMutation) SetMsgTypeID(i int)

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgTemplateMutation) SetName

func (m *MsgTemplateMutation) SetName(s string)

SetName sets the "name" field.

func (*MsgTemplateMutation) SetOp

func (m *MsgTemplateMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MsgTemplateMutation) SetReceiverType

func (m *MsgTemplateMutation) SetReceiverType(pt profile.ReceiverType)

SetReceiverType sets the "receiver_type" field.

func (*MsgTemplateMutation) SetStatus

func (m *MsgTemplateMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*MsgTemplateMutation) SetSubject

func (m *MsgTemplateMutation) SetSubject(s string)

SetSubject sets the "subject" field.

func (*MsgTemplateMutation) SetTenantID

func (m *MsgTemplateMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*MsgTemplateMutation) SetTo

func (m *MsgTemplateMutation) SetTo(s string)

SetTo sets the "to" field.

func (*MsgTemplateMutation) SetTpl

func (m *MsgTemplateMutation) SetTpl(s string)

SetTpl sets the "tpl" field.

func (*MsgTemplateMutation) SetTplFileID

func (m *MsgTemplateMutation) SetTplFileID(i int)

SetTplFileID sets the "tpl_file_id" field.

func (*MsgTemplateMutation) SetUpdatedAt

func (m *MsgTemplateMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*MsgTemplateMutation) SetUpdatedBy

func (m *MsgTemplateMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*MsgTemplateMutation) Status

func (m *MsgTemplateMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*MsgTemplateMutation) StatusCleared

func (m *MsgTemplateMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*MsgTemplateMutation) Subject

func (m *MsgTemplateMutation) Subject() (r string, exists bool)

Subject returns the value of the "subject" field in the mutation.

func (*MsgTemplateMutation) SubjectCleared

func (m *MsgTemplateMutation) SubjectCleared() bool

SubjectCleared returns if the "subject" field was cleared in this mutation.

func (*MsgTemplateMutation) TenantID

func (m *MsgTemplateMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (*MsgTemplateMutation) To

func (m *MsgTemplateMutation) To() (r string, exists bool)

To returns the value of the "to" field in the mutation.

func (*MsgTemplateMutation) ToCleared

func (m *MsgTemplateMutation) ToCleared() bool

ToCleared returns if the "to" field was cleared in this mutation.

func (*MsgTemplateMutation) Tpl

func (m *MsgTemplateMutation) Tpl() (r string, exists bool)

Tpl returns the value of the "tpl" field in the mutation.

func (*MsgTemplateMutation) TplCleared

func (m *MsgTemplateMutation) TplCleared() bool

TplCleared returns if the "tpl" field was cleared in this mutation.

func (*MsgTemplateMutation) TplFileID

func (m *MsgTemplateMutation) TplFileID() (r int, exists bool)

TplFileID returns the value of the "tpl_file_id" field in the mutation.

func (*MsgTemplateMutation) TplFileIDCleared

func (m *MsgTemplateMutation) TplFileIDCleared() bool

TplFileIDCleared returns if the "tpl_file_id" field was cleared in this mutation.

func (MsgTemplateMutation) Tx

func (m MsgTemplateMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MsgTemplateMutation) Type

func (m *MsgTemplateMutation) Type() string

Type returns the node type of this mutation (MsgTemplate).

func (*MsgTemplateMutation) UpdatedAt

func (m *MsgTemplateMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*MsgTemplateMutation) UpdatedAtCleared

func (m *MsgTemplateMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*MsgTemplateMutation) UpdatedBy

func (m *MsgTemplateMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*MsgTemplateMutation) UpdatedByCleared

func (m *MsgTemplateMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*MsgTemplateMutation) Where

func (m *MsgTemplateMutation) Where(ps ...predicate.MsgTemplate)

Where appends a list predicates to the MsgTemplateMutation builder.

func (*MsgTemplateMutation) WhereP

func (m *MsgTemplateMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MsgTemplateMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MsgTemplateOrder

type MsgTemplateOrder struct {
	Direction OrderDirection         `json:"direction"`
	Field     *MsgTemplateOrderField `json:"field"`
}

MsgTemplateOrder defines the ordering of MsgTemplate.

type MsgTemplateOrderField

type MsgTemplateOrderField struct {
	// Value extracts the ordering value from the given MsgTemplate.
	Value func(*MsgTemplate) (ent.Value, error)
	// contains filtered or unexported fields
}

MsgTemplateOrderField defines the ordering field of MsgTemplate.

func (MsgTemplateOrderField) MarshalGQL

func (f MsgTemplateOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (MsgTemplateOrderField) String

func (f MsgTemplateOrderField) String() string

String implement fmt.Stringer interface.

func (*MsgTemplateOrderField) UnmarshalGQL

func (f *MsgTemplateOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type MsgTemplatePaginateOption

type MsgTemplatePaginateOption func(*msgtemplatePager) error

MsgTemplatePaginateOption enables pagination customization.

func WithMsgTemplateFilter

func WithMsgTemplateFilter(filter func(*MsgTemplateQuery) (*MsgTemplateQuery, error)) MsgTemplatePaginateOption

WithMsgTemplateFilter configures pagination filter.

func WithMsgTemplateOrder

func WithMsgTemplateOrder(order *MsgTemplateOrder) MsgTemplatePaginateOption

WithMsgTemplateOrder configures pagination ordering.

type MsgTemplateQuery

type MsgTemplateQuery struct {
	// contains filtered or unexported fields
}

MsgTemplateQuery is the builder for querying MsgTemplate entities.

func (*MsgTemplateQuery) Aggregate

func (mtq *MsgTemplateQuery) Aggregate(fns ...AggregateFunc) *MsgTemplateSelect

Aggregate returns a MsgTemplateSelect configured with the given aggregations.

func (*MsgTemplateQuery) All

func (mtq *MsgTemplateQuery) All(ctx context.Context) ([]*MsgTemplate, error)

All executes the query and returns a list of MsgTemplates.

func (*MsgTemplateQuery) AllX

func (mtq *MsgTemplateQuery) AllX(ctx context.Context) []*MsgTemplate

AllX is like All, but panics if an error occurs.

func (*MsgTemplateQuery) Clone

func (mtq *MsgTemplateQuery) Clone() *MsgTemplateQuery

Clone returns a duplicate of the MsgTemplateQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MsgTemplateQuery) CollectFields

func (mt *MsgTemplateQuery) CollectFields(ctx context.Context, satisfies ...string) (*MsgTemplateQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*MsgTemplateQuery) Count

func (mtq *MsgTemplateQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MsgTemplateQuery) CountX

func (mtq *MsgTemplateQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MsgTemplateQuery) Exist

func (mtq *MsgTemplateQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MsgTemplateQuery) ExistX

func (mtq *MsgTemplateQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MsgTemplateQuery) First

func (mtq *MsgTemplateQuery) First(ctx context.Context) (*MsgTemplate, error)

First returns the first MsgTemplate entity from the query. Returns a *NotFoundError when no MsgTemplate was found.

func (*MsgTemplateQuery) FirstID

func (mtq *MsgTemplateQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first MsgTemplate ID from the query. Returns a *NotFoundError when no MsgTemplate ID was found.

func (*MsgTemplateQuery) FirstIDX

func (mtq *MsgTemplateQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MsgTemplateQuery) FirstX

func (mtq *MsgTemplateQuery) FirstX(ctx context.Context) *MsgTemplate

FirstX is like First, but panics if an error occurs.

func (*MsgTemplateQuery) GroupBy

func (mtq *MsgTemplateQuery) GroupBy(field string, fields ...string) *MsgTemplateGroupBy

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 {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MsgTemplate.Query().
	GroupBy(msgtemplate.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MsgTemplateQuery) IDs

func (mtq *MsgTemplateQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of MsgTemplate IDs.

func (*MsgTemplateQuery) IDsX

func (mtq *MsgTemplateQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MsgTemplateQuery) Limit

func (mtq *MsgTemplateQuery) Limit(limit int) *MsgTemplateQuery

Limit the number of records to be returned by this query.

func (*MsgTemplateQuery) Offset

func (mtq *MsgTemplateQuery) Offset(offset int) *MsgTemplateQuery

Offset to start from.

func (*MsgTemplateQuery) Only

func (mtq *MsgTemplateQuery) Only(ctx context.Context) (*MsgTemplate, error)

Only returns a single MsgTemplate entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MsgTemplate entity is found. Returns a *NotFoundError when no MsgTemplate entities are found.

func (*MsgTemplateQuery) OnlyID

func (mtq *MsgTemplateQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only MsgTemplate ID in the query. Returns a *NotSingularError when more than one MsgTemplate ID is found. Returns a *NotFoundError when no entities are found.

func (*MsgTemplateQuery) OnlyIDX

func (mtq *MsgTemplateQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MsgTemplateQuery) OnlyX

func (mtq *MsgTemplateQuery) OnlyX(ctx context.Context) *MsgTemplate

OnlyX is like Only, but panics if an error occurs.

func (*MsgTemplateQuery) Order

Order specifies how the records should be ordered.

func (*MsgTemplateQuery) Paginate

func (mt *MsgTemplateQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...MsgTemplatePaginateOption,
) (*MsgTemplateConnection, error)

Paginate executes the query and returns a relay based cursor connection to MsgTemplate.

func (*MsgTemplateQuery) QueryEvent

func (mtq *MsgTemplateQuery) QueryEvent() *MsgEventQuery

QueryEvent chains the current query on the "event" edge.

func (*MsgTemplateQuery) Select

func (mtq *MsgTemplateQuery) Select(fields ...string) *MsgTemplateSelect

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 {
	CreatedBy int `json:"created_by,omitempty"`
}

client.MsgTemplate.Query().
	Select(msgtemplate.FieldCreatedBy).
	Scan(ctx, &v)

func (*MsgTemplateQuery) Unique

func (mtq *MsgTemplateQuery) Unique(unique bool) *MsgTemplateQuery

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 (*MsgTemplateQuery) Where

Where adds a new predicate for the MsgTemplateQuery builder.

func (*MsgTemplateQuery) WithEvent

func (mtq *MsgTemplateQuery) WithEvent(opts ...func(*MsgEventQuery)) *MsgTemplateQuery

WithEvent tells the query-builder to eager-load the nodes that are connected to the "event" edge. The optional arguments are used to configure the query builder of the edge.

type MsgTemplateSelect

type MsgTemplateSelect struct {
	*MsgTemplateQuery
	// contains filtered or unexported fields
}

MsgTemplateSelect is the builder for selecting fields of MsgTemplate entities.

func (*MsgTemplateSelect) Aggregate

func (mts *MsgTemplateSelect) Aggregate(fns ...AggregateFunc) *MsgTemplateSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MsgTemplateSelect) Bool

func (s *MsgTemplateSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MsgTemplateSelect) BoolX

func (s *MsgTemplateSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MsgTemplateSelect) Bools

func (s *MsgTemplateSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MsgTemplateSelect) BoolsX

func (s *MsgTemplateSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MsgTemplateSelect) Float64

func (s *MsgTemplateSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MsgTemplateSelect) Float64X

func (s *MsgTemplateSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MsgTemplateSelect) Float64s

func (s *MsgTemplateSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MsgTemplateSelect) Float64sX

func (s *MsgTemplateSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MsgTemplateSelect) Int

func (s *MsgTemplateSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MsgTemplateSelect) IntX

func (s *MsgTemplateSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MsgTemplateSelect) Ints

func (s *MsgTemplateSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MsgTemplateSelect) IntsX

func (s *MsgTemplateSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MsgTemplateSelect) Scan

func (mts *MsgTemplateSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MsgTemplateSelect) ScanX

func (s *MsgTemplateSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MsgTemplateSelect) String

func (s *MsgTemplateSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MsgTemplateSelect) StringX

func (s *MsgTemplateSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MsgTemplateSelect) Strings

func (s *MsgTemplateSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MsgTemplateSelect) StringsX

func (s *MsgTemplateSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MsgTemplateUpdate

type MsgTemplateUpdate struct {
	// contains filtered or unexported fields
}

MsgTemplateUpdate is the builder for updating MsgTemplate entities.

func (*MsgTemplateUpdate) AddMsgTypeID

func (mtu *MsgTemplateUpdate) AddMsgTypeID(i int) *MsgTemplateUpdate

AddMsgTypeID adds i to the "msg_type_id" field.

func (*MsgTemplateUpdate) AddTenantID

func (mtu *MsgTemplateUpdate) AddTenantID(i int) *MsgTemplateUpdate

AddTenantID adds i to the "tenant_id" field.

func (*MsgTemplateUpdate) AddTplFileID

func (mtu *MsgTemplateUpdate) AddTplFileID(i int) *MsgTemplateUpdate

AddTplFileID adds i to the "tpl_file_id" field.

func (*MsgTemplateUpdate) AddUpdatedBy

func (mtu *MsgTemplateUpdate) AddUpdatedBy(i int) *MsgTemplateUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgTemplateUpdate) AppendAttachments

func (mtu *MsgTemplateUpdate) AppendAttachments(s []string) *MsgTemplateUpdate

AppendAttachments appends s to the "attachments" field.

func (*MsgTemplateUpdate) AppendAttachmentsFileIds

func (mtu *MsgTemplateUpdate) AppendAttachmentsFileIds(i []int) *MsgTemplateUpdate

AppendAttachmentsFileIds appends i to the "attachments_file_ids" field.

func (*MsgTemplateUpdate) ClearAttachments

func (mtu *MsgTemplateUpdate) ClearAttachments() *MsgTemplateUpdate

ClearAttachments clears the value of the "attachments" field.

func (*MsgTemplateUpdate) ClearAttachmentsFileIds

func (mtu *MsgTemplateUpdate) ClearAttachmentsFileIds() *MsgTemplateUpdate

ClearAttachmentsFileIds clears the value of the "attachments_file_ids" field.

func (*MsgTemplateUpdate) ClearBcc

func (mtu *MsgTemplateUpdate) ClearBcc() *MsgTemplateUpdate

ClearBcc clears the value of the "bcc" field.

func (*MsgTemplateUpdate) ClearBody

func (mtu *MsgTemplateUpdate) ClearBody() *MsgTemplateUpdate

ClearBody clears the value of the "body" field.

func (*MsgTemplateUpdate) ClearCc

func (mtu *MsgTemplateUpdate) ClearCc() *MsgTemplateUpdate

ClearCc clears the value of the "cc" field.

func (*MsgTemplateUpdate) ClearComments

func (mtu *MsgTemplateUpdate) ClearComments() *MsgTemplateUpdate

ClearComments clears the value of the "comments" field.

func (*MsgTemplateUpdate) ClearEvent

func (mtu *MsgTemplateUpdate) ClearEvent() *MsgTemplateUpdate

ClearEvent clears the "event" edge to the MsgEvent entity.

func (*MsgTemplateUpdate) ClearFrom

func (mtu *MsgTemplateUpdate) ClearFrom() *MsgTemplateUpdate

ClearFrom clears the value of the "from" field.

func (*MsgTemplateUpdate) ClearStatus

func (mtu *MsgTemplateUpdate) ClearStatus() *MsgTemplateUpdate

ClearStatus clears the value of the "status" field.

func (*MsgTemplateUpdate) ClearSubject

func (mtu *MsgTemplateUpdate) ClearSubject() *MsgTemplateUpdate

ClearSubject clears the value of the "subject" field.

func (*MsgTemplateUpdate) ClearTo

func (mtu *MsgTemplateUpdate) ClearTo() *MsgTemplateUpdate

ClearTo clears the value of the "to" field.

func (*MsgTemplateUpdate) ClearTpl

func (mtu *MsgTemplateUpdate) ClearTpl() *MsgTemplateUpdate

ClearTpl clears the value of the "tpl" field.

func (*MsgTemplateUpdate) ClearTplFileID

func (mtu *MsgTemplateUpdate) ClearTplFileID() *MsgTemplateUpdate

ClearTplFileID clears the value of the "tpl_file_id" field.

func (*MsgTemplateUpdate) ClearUpdatedAt

func (mtu *MsgTemplateUpdate) ClearUpdatedAt() *MsgTemplateUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgTemplateUpdate) ClearUpdatedBy

func (mtu *MsgTemplateUpdate) ClearUpdatedBy() *MsgTemplateUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgTemplateUpdate) Exec

func (mtu *MsgTemplateUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgTemplateUpdate) ExecX

func (mtu *MsgTemplateUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTemplateUpdate) Mutation

func (mtu *MsgTemplateUpdate) Mutation() *MsgTemplateMutation

Mutation returns the MsgTemplateMutation object of the builder.

func (*MsgTemplateUpdate) Save

func (mtu *MsgTemplateUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MsgTemplateUpdate) SaveX

func (mtu *MsgTemplateUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MsgTemplateUpdate) SetAttachments

func (mtu *MsgTemplateUpdate) SetAttachments(s []string) *MsgTemplateUpdate

SetAttachments sets the "attachments" field.

func (*MsgTemplateUpdate) SetAttachmentsFileIds

func (mtu *MsgTemplateUpdate) SetAttachmentsFileIds(i []int) *MsgTemplateUpdate

SetAttachmentsFileIds sets the "attachments_file_ids" field.

func (*MsgTemplateUpdate) SetBcc

func (mtu *MsgTemplateUpdate) SetBcc(s string) *MsgTemplateUpdate

SetBcc sets the "bcc" field.

func (*MsgTemplateUpdate) SetBody

func (mtu *MsgTemplateUpdate) SetBody(s string) *MsgTemplateUpdate

SetBody sets the "body" field.

func (*MsgTemplateUpdate) SetCc

SetCc sets the "cc" field.

func (*MsgTemplateUpdate) SetComments

func (mtu *MsgTemplateUpdate) SetComments(s string) *MsgTemplateUpdate

SetComments sets the "comments" field.

func (*MsgTemplateUpdate) SetEvent

func (mtu *MsgTemplateUpdate) SetEvent(m *MsgEvent) *MsgTemplateUpdate

SetEvent sets the "event" edge to the MsgEvent entity.

func (*MsgTemplateUpdate) SetEventID

func (mtu *MsgTemplateUpdate) SetEventID(id int) *MsgTemplateUpdate

SetEventID sets the "event" edge to the MsgEvent entity by ID.

func (*MsgTemplateUpdate) SetFormat

SetFormat sets the "format" field.

func (*MsgTemplateUpdate) SetFrom

func (mtu *MsgTemplateUpdate) SetFrom(s string) *MsgTemplateUpdate

SetFrom sets the "from" field.

func (*MsgTemplateUpdate) SetInput

SetInput applies the change-set in the UpdateMsgTemplateInput on the MsgTemplateUpdate builder.

func (*MsgTemplateUpdate) SetMsgEventID

func (mtu *MsgTemplateUpdate) SetMsgEventID(i int) *MsgTemplateUpdate

SetMsgEventID sets the "msg_event_id" field.

func (*MsgTemplateUpdate) SetMsgTypeID

func (mtu *MsgTemplateUpdate) SetMsgTypeID(i int) *MsgTemplateUpdate

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgTemplateUpdate) SetName

func (mtu *MsgTemplateUpdate) SetName(s string) *MsgTemplateUpdate

SetName sets the "name" field.

func (*MsgTemplateUpdate) SetNillableBcc

func (mtu *MsgTemplateUpdate) SetNillableBcc(s *string) *MsgTemplateUpdate

SetNillableBcc sets the "bcc" field if the given value is not nil.

func (*MsgTemplateUpdate) SetNillableBody

func (mtu *MsgTemplateUpdate) SetNillableBody(s *string) *MsgTemplateUpdate

SetNillableBody sets the "body" field if the given value is not nil.

func (*MsgTemplateUpdate) SetNillableCc

func (mtu *MsgTemplateUpdate) SetNillableCc(s *string) *MsgTemplateUpdate

SetNillableCc sets the "cc" field if the given value is not nil.

func (*MsgTemplateUpdate) SetNillableComments

func (mtu *MsgTemplateUpdate) SetNillableComments(s *string) *MsgTemplateUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*MsgTemplateUpdate) SetNillableFrom

func (mtu *MsgTemplateUpdate) SetNillableFrom(s *string) *MsgTemplateUpdate

SetNillableFrom sets the "from" field if the given value is not nil.

func (*MsgTemplateUpdate) SetNillableStatus

func (mtu *MsgTemplateUpdate) SetNillableStatus(ts *typex.SimpleStatus) *MsgTemplateUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*MsgTemplateUpdate) SetNillableSubject

func (mtu *MsgTemplateUpdate) SetNillableSubject(s *string) *MsgTemplateUpdate

SetNillableSubject sets the "subject" field if the given value is not nil.

func (*MsgTemplateUpdate) SetNillableTo

func (mtu *MsgTemplateUpdate) SetNillableTo(s *string) *MsgTemplateUpdate

SetNillableTo sets the "to" field if the given value is not nil.

func (*MsgTemplateUpdate) SetNillableTpl

func (mtu *MsgTemplateUpdate) SetNillableTpl(s *string) *MsgTemplateUpdate

SetNillableTpl sets the "tpl" field if the given value is not nil.

func (*MsgTemplateUpdate) SetNillableTplFileID

func (mtu *MsgTemplateUpdate) SetNillableTplFileID(i *int) *MsgTemplateUpdate

SetNillableTplFileID sets the "tpl_file_id" field if the given value is not nil.

func (*MsgTemplateUpdate) SetNillableUpdatedAt

func (mtu *MsgTemplateUpdate) SetNillableUpdatedAt(t *time.Time) *MsgTemplateUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MsgTemplateUpdate) SetNillableUpdatedBy

func (mtu *MsgTemplateUpdate) SetNillableUpdatedBy(i *int) *MsgTemplateUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgTemplateUpdate) SetReceiverType

func (mtu *MsgTemplateUpdate) SetReceiverType(pt profile.ReceiverType) *MsgTemplateUpdate

SetReceiverType sets the "receiver_type" field.

func (*MsgTemplateUpdate) SetStatus

SetStatus sets the "status" field.

func (*MsgTemplateUpdate) SetSubject

func (mtu *MsgTemplateUpdate) SetSubject(s string) *MsgTemplateUpdate

SetSubject sets the "subject" field.

func (*MsgTemplateUpdate) SetTenantID

func (mtu *MsgTemplateUpdate) SetTenantID(i int) *MsgTemplateUpdate

SetTenantID sets the "tenant_id" field.

func (*MsgTemplateUpdate) SetTo

SetTo sets the "to" field.

func (*MsgTemplateUpdate) SetTpl

func (mtu *MsgTemplateUpdate) SetTpl(s string) *MsgTemplateUpdate

SetTpl sets the "tpl" field.

func (*MsgTemplateUpdate) SetTplFileID

func (mtu *MsgTemplateUpdate) SetTplFileID(i int) *MsgTemplateUpdate

SetTplFileID sets the "tpl_file_id" field.

func (*MsgTemplateUpdate) SetUpdatedAt

func (mtu *MsgTemplateUpdate) SetUpdatedAt(t time.Time) *MsgTemplateUpdate

SetUpdatedAt sets the "updated_at" field.

func (*MsgTemplateUpdate) SetUpdatedBy

func (mtu *MsgTemplateUpdate) SetUpdatedBy(i int) *MsgTemplateUpdate

SetUpdatedBy sets the "updated_by" field.

func (*MsgTemplateUpdate) Where

Where appends a list predicates to the MsgTemplateUpdate builder.

type MsgTemplateUpdateOne

type MsgTemplateUpdateOne struct {
	// contains filtered or unexported fields
}

MsgTemplateUpdateOne is the builder for updating a single MsgTemplate entity.

func (*MsgTemplateUpdateOne) AddMsgTypeID

func (mtuo *MsgTemplateUpdateOne) AddMsgTypeID(i int) *MsgTemplateUpdateOne

AddMsgTypeID adds i to the "msg_type_id" field.

func (*MsgTemplateUpdateOne) AddTenantID

func (mtuo *MsgTemplateUpdateOne) AddTenantID(i int) *MsgTemplateUpdateOne

AddTenantID adds i to the "tenant_id" field.

func (*MsgTemplateUpdateOne) AddTplFileID

func (mtuo *MsgTemplateUpdateOne) AddTplFileID(i int) *MsgTemplateUpdateOne

AddTplFileID adds i to the "tpl_file_id" field.

func (*MsgTemplateUpdateOne) AddUpdatedBy

func (mtuo *MsgTemplateUpdateOne) AddUpdatedBy(i int) *MsgTemplateUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgTemplateUpdateOne) AppendAttachments

func (mtuo *MsgTemplateUpdateOne) AppendAttachments(s []string) *MsgTemplateUpdateOne

AppendAttachments appends s to the "attachments" field.

func (*MsgTemplateUpdateOne) AppendAttachmentsFileIds

func (mtuo *MsgTemplateUpdateOne) AppendAttachmentsFileIds(i []int) *MsgTemplateUpdateOne

AppendAttachmentsFileIds appends i to the "attachments_file_ids" field.

func (*MsgTemplateUpdateOne) ClearAttachments

func (mtuo *MsgTemplateUpdateOne) ClearAttachments() *MsgTemplateUpdateOne

ClearAttachments clears the value of the "attachments" field.

func (*MsgTemplateUpdateOne) ClearAttachmentsFileIds

func (mtuo *MsgTemplateUpdateOne) ClearAttachmentsFileIds() *MsgTemplateUpdateOne

ClearAttachmentsFileIds clears the value of the "attachments_file_ids" field.

func (*MsgTemplateUpdateOne) ClearBcc

func (mtuo *MsgTemplateUpdateOne) ClearBcc() *MsgTemplateUpdateOne

ClearBcc clears the value of the "bcc" field.

func (*MsgTemplateUpdateOne) ClearBody

func (mtuo *MsgTemplateUpdateOne) ClearBody() *MsgTemplateUpdateOne

ClearBody clears the value of the "body" field.

func (*MsgTemplateUpdateOne) ClearCc

func (mtuo *MsgTemplateUpdateOne) ClearCc() *MsgTemplateUpdateOne

ClearCc clears the value of the "cc" field.

func (*MsgTemplateUpdateOne) ClearComments

func (mtuo *MsgTemplateUpdateOne) ClearComments() *MsgTemplateUpdateOne

ClearComments clears the value of the "comments" field.

func (*MsgTemplateUpdateOne) ClearEvent

func (mtuo *MsgTemplateUpdateOne) ClearEvent() *MsgTemplateUpdateOne

ClearEvent clears the "event" edge to the MsgEvent entity.

func (*MsgTemplateUpdateOne) ClearFrom

func (mtuo *MsgTemplateUpdateOne) ClearFrom() *MsgTemplateUpdateOne

ClearFrom clears the value of the "from" field.

func (*MsgTemplateUpdateOne) ClearStatus

func (mtuo *MsgTemplateUpdateOne) ClearStatus() *MsgTemplateUpdateOne

ClearStatus clears the value of the "status" field.

func (*MsgTemplateUpdateOne) ClearSubject

func (mtuo *MsgTemplateUpdateOne) ClearSubject() *MsgTemplateUpdateOne

ClearSubject clears the value of the "subject" field.

func (*MsgTemplateUpdateOne) ClearTo

func (mtuo *MsgTemplateUpdateOne) ClearTo() *MsgTemplateUpdateOne

ClearTo clears the value of the "to" field.

func (*MsgTemplateUpdateOne) ClearTpl

func (mtuo *MsgTemplateUpdateOne) ClearTpl() *MsgTemplateUpdateOne

ClearTpl clears the value of the "tpl" field.

func (*MsgTemplateUpdateOne) ClearTplFileID

func (mtuo *MsgTemplateUpdateOne) ClearTplFileID() *MsgTemplateUpdateOne

ClearTplFileID clears the value of the "tpl_file_id" field.

func (*MsgTemplateUpdateOne) ClearUpdatedAt

func (mtuo *MsgTemplateUpdateOne) ClearUpdatedAt() *MsgTemplateUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgTemplateUpdateOne) ClearUpdatedBy

func (mtuo *MsgTemplateUpdateOne) ClearUpdatedBy() *MsgTemplateUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgTemplateUpdateOne) Exec

func (mtuo *MsgTemplateUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MsgTemplateUpdateOne) ExecX

func (mtuo *MsgTemplateUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTemplateUpdateOne) Mutation

func (mtuo *MsgTemplateUpdateOne) Mutation() *MsgTemplateMutation

Mutation returns the MsgTemplateMutation object of the builder.

func (*MsgTemplateUpdateOne) Save

Save executes the query and returns the updated MsgTemplate entity.

func (*MsgTemplateUpdateOne) SaveX

func (mtuo *MsgTemplateUpdateOne) SaveX(ctx context.Context) *MsgTemplate

SaveX is like Save, but panics if an error occurs.

func (*MsgTemplateUpdateOne) Select

func (mtuo *MsgTemplateUpdateOne) Select(field string, fields ...string) *MsgTemplateUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MsgTemplateUpdateOne) SetAttachments

func (mtuo *MsgTemplateUpdateOne) SetAttachments(s []string) *MsgTemplateUpdateOne

SetAttachments sets the "attachments" field.

func (*MsgTemplateUpdateOne) SetAttachmentsFileIds

func (mtuo *MsgTemplateUpdateOne) SetAttachmentsFileIds(i []int) *MsgTemplateUpdateOne

SetAttachmentsFileIds sets the "attachments_file_ids" field.

func (*MsgTemplateUpdateOne) SetBcc

SetBcc sets the "bcc" field.

func (*MsgTemplateUpdateOne) SetBody

SetBody sets the "body" field.

func (*MsgTemplateUpdateOne) SetCc

SetCc sets the "cc" field.

func (*MsgTemplateUpdateOne) SetComments

func (mtuo *MsgTemplateUpdateOne) SetComments(s string) *MsgTemplateUpdateOne

SetComments sets the "comments" field.

func (*MsgTemplateUpdateOne) SetEvent

SetEvent sets the "event" edge to the MsgEvent entity.

func (*MsgTemplateUpdateOne) SetEventID

func (mtuo *MsgTemplateUpdateOne) SetEventID(id int) *MsgTemplateUpdateOne

SetEventID sets the "event" edge to the MsgEvent entity by ID.

func (*MsgTemplateUpdateOne) SetFormat

SetFormat sets the "format" field.

func (*MsgTemplateUpdateOne) SetFrom

SetFrom sets the "from" field.

func (*MsgTemplateUpdateOne) SetInput

SetInput applies the change-set in the UpdateMsgTemplateInput on the MsgTemplateUpdateOne builder.

func (*MsgTemplateUpdateOne) SetMsgEventID

func (mtuo *MsgTemplateUpdateOne) SetMsgEventID(i int) *MsgTemplateUpdateOne

SetMsgEventID sets the "msg_event_id" field.

func (*MsgTemplateUpdateOne) SetMsgTypeID

func (mtuo *MsgTemplateUpdateOne) SetMsgTypeID(i int) *MsgTemplateUpdateOne

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgTemplateUpdateOne) SetName

SetName sets the "name" field.

func (*MsgTemplateUpdateOne) SetNillableBcc

func (mtuo *MsgTemplateUpdateOne) SetNillableBcc(s *string) *MsgTemplateUpdateOne

SetNillableBcc sets the "bcc" field if the given value is not nil.

func (*MsgTemplateUpdateOne) SetNillableBody

func (mtuo *MsgTemplateUpdateOne) SetNillableBody(s *string) *MsgTemplateUpdateOne

SetNillableBody sets the "body" field if the given value is not nil.

func (*MsgTemplateUpdateOne) SetNillableCc

func (mtuo *MsgTemplateUpdateOne) SetNillableCc(s *string) *MsgTemplateUpdateOne

SetNillableCc sets the "cc" field if the given value is not nil.

func (*MsgTemplateUpdateOne) SetNillableComments

func (mtuo *MsgTemplateUpdateOne) SetNillableComments(s *string) *MsgTemplateUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*MsgTemplateUpdateOne) SetNillableFrom

func (mtuo *MsgTemplateUpdateOne) SetNillableFrom(s *string) *MsgTemplateUpdateOne

SetNillableFrom sets the "from" field if the given value is not nil.

func (*MsgTemplateUpdateOne) SetNillableStatus

func (mtuo *MsgTemplateUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *MsgTemplateUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*MsgTemplateUpdateOne) SetNillableSubject

func (mtuo *MsgTemplateUpdateOne) SetNillableSubject(s *string) *MsgTemplateUpdateOne

SetNillableSubject sets the "subject" field if the given value is not nil.

func (*MsgTemplateUpdateOne) SetNillableTo

func (mtuo *MsgTemplateUpdateOne) SetNillableTo(s *string) *MsgTemplateUpdateOne

SetNillableTo sets the "to" field if the given value is not nil.

func (*MsgTemplateUpdateOne) SetNillableTpl

func (mtuo *MsgTemplateUpdateOne) SetNillableTpl(s *string) *MsgTemplateUpdateOne

SetNillableTpl sets the "tpl" field if the given value is not nil.

func (*MsgTemplateUpdateOne) SetNillableTplFileID

func (mtuo *MsgTemplateUpdateOne) SetNillableTplFileID(i *int) *MsgTemplateUpdateOne

SetNillableTplFileID sets the "tpl_file_id" field if the given value is not nil.

func (*MsgTemplateUpdateOne) SetNillableUpdatedAt

func (mtuo *MsgTemplateUpdateOne) SetNillableUpdatedAt(t *time.Time) *MsgTemplateUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MsgTemplateUpdateOne) SetNillableUpdatedBy

func (mtuo *MsgTemplateUpdateOne) SetNillableUpdatedBy(i *int) *MsgTemplateUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgTemplateUpdateOne) SetReceiverType

SetReceiverType sets the "receiver_type" field.

func (*MsgTemplateUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*MsgTemplateUpdateOne) SetSubject

func (mtuo *MsgTemplateUpdateOne) SetSubject(s string) *MsgTemplateUpdateOne

SetSubject sets the "subject" field.

func (*MsgTemplateUpdateOne) SetTenantID

func (mtuo *MsgTemplateUpdateOne) SetTenantID(i int) *MsgTemplateUpdateOne

SetTenantID sets the "tenant_id" field.

func (*MsgTemplateUpdateOne) SetTo

SetTo sets the "to" field.

func (*MsgTemplateUpdateOne) SetTpl

SetTpl sets the "tpl" field.

func (*MsgTemplateUpdateOne) SetTplFileID

func (mtuo *MsgTemplateUpdateOne) SetTplFileID(i int) *MsgTemplateUpdateOne

SetTplFileID sets the "tpl_file_id" field.

func (*MsgTemplateUpdateOne) SetUpdatedAt

func (mtuo *MsgTemplateUpdateOne) SetUpdatedAt(t time.Time) *MsgTemplateUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*MsgTemplateUpdateOne) SetUpdatedBy

func (mtuo *MsgTemplateUpdateOne) SetUpdatedBy(i int) *MsgTemplateUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*MsgTemplateUpdateOne) Where

Where appends a list predicates to the MsgTemplateUpdate builder.

type MsgTemplateUpsert

type MsgTemplateUpsert struct {
	*sql.UpdateSet
}

MsgTemplateUpsert is the "OnConflict" setter.

func (*MsgTemplateUpsert) AddMsgTypeID

func (u *MsgTemplateUpsert) AddMsgTypeID(v int) *MsgTemplateUpsert

AddMsgTypeID adds v to the "msg_type_id" field.

func (*MsgTemplateUpsert) AddTenantID

func (u *MsgTemplateUpsert) AddTenantID(v int) *MsgTemplateUpsert

AddTenantID adds v to the "tenant_id" field.

func (*MsgTemplateUpsert) AddTplFileID

func (u *MsgTemplateUpsert) AddTplFileID(v int) *MsgTemplateUpsert

AddTplFileID adds v to the "tpl_file_id" field.

func (*MsgTemplateUpsert) AddUpdatedBy

func (u *MsgTemplateUpsert) AddUpdatedBy(v int) *MsgTemplateUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgTemplateUpsert) ClearAttachments

func (u *MsgTemplateUpsert) ClearAttachments() *MsgTemplateUpsert

ClearAttachments clears the value of the "attachments" field.

func (*MsgTemplateUpsert) ClearAttachmentsFileIds

func (u *MsgTemplateUpsert) ClearAttachmentsFileIds() *MsgTemplateUpsert

ClearAttachmentsFileIds clears the value of the "attachments_file_ids" field.

func (*MsgTemplateUpsert) ClearBcc

func (u *MsgTemplateUpsert) ClearBcc() *MsgTemplateUpsert

ClearBcc clears the value of the "bcc" field.

func (*MsgTemplateUpsert) ClearBody

func (u *MsgTemplateUpsert) ClearBody() *MsgTemplateUpsert

ClearBody clears the value of the "body" field.

func (*MsgTemplateUpsert) ClearCc

func (u *MsgTemplateUpsert) ClearCc() *MsgTemplateUpsert

ClearCc clears the value of the "cc" field.

func (*MsgTemplateUpsert) ClearComments

func (u *MsgTemplateUpsert) ClearComments() *MsgTemplateUpsert

ClearComments clears the value of the "comments" field.

func (*MsgTemplateUpsert) ClearFrom

func (u *MsgTemplateUpsert) ClearFrom() *MsgTemplateUpsert

ClearFrom clears the value of the "from" field.

func (*MsgTemplateUpsert) ClearStatus

func (u *MsgTemplateUpsert) ClearStatus() *MsgTemplateUpsert

ClearStatus clears the value of the "status" field.

func (*MsgTemplateUpsert) ClearSubject

func (u *MsgTemplateUpsert) ClearSubject() *MsgTemplateUpsert

ClearSubject clears the value of the "subject" field.

func (*MsgTemplateUpsert) ClearTo

func (u *MsgTemplateUpsert) ClearTo() *MsgTemplateUpsert

ClearTo clears the value of the "to" field.

func (*MsgTemplateUpsert) ClearTpl

func (u *MsgTemplateUpsert) ClearTpl() *MsgTemplateUpsert

ClearTpl clears the value of the "tpl" field.

func (*MsgTemplateUpsert) ClearTplFileID

func (u *MsgTemplateUpsert) ClearTplFileID() *MsgTemplateUpsert

ClearTplFileID clears the value of the "tpl_file_id" field.

func (*MsgTemplateUpsert) ClearUpdatedAt

func (u *MsgTemplateUpsert) ClearUpdatedAt() *MsgTemplateUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgTemplateUpsert) ClearUpdatedBy

func (u *MsgTemplateUpsert) ClearUpdatedBy() *MsgTemplateUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgTemplateUpsert) SetAttachments

func (u *MsgTemplateUpsert) SetAttachments(v []string) *MsgTemplateUpsert

SetAttachments sets the "attachments" field.

func (*MsgTemplateUpsert) SetAttachmentsFileIds

func (u *MsgTemplateUpsert) SetAttachmentsFileIds(v []int) *MsgTemplateUpsert

SetAttachmentsFileIds sets the "attachments_file_ids" field.

func (*MsgTemplateUpsert) SetBcc

SetBcc sets the "bcc" field.

func (*MsgTemplateUpsert) SetBody

SetBody sets the "body" field.

func (*MsgTemplateUpsert) SetCc

SetCc sets the "cc" field.

func (*MsgTemplateUpsert) SetComments

func (u *MsgTemplateUpsert) SetComments(v string) *MsgTemplateUpsert

SetComments sets the "comments" field.

func (*MsgTemplateUpsert) SetFormat

SetFormat sets the "format" field.

func (*MsgTemplateUpsert) SetFrom

SetFrom sets the "from" field.

func (*MsgTemplateUpsert) SetMsgEventID

func (u *MsgTemplateUpsert) SetMsgEventID(v int) *MsgTemplateUpsert

SetMsgEventID sets the "msg_event_id" field.

func (*MsgTemplateUpsert) SetMsgTypeID

func (u *MsgTemplateUpsert) SetMsgTypeID(v int) *MsgTemplateUpsert

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgTemplateUpsert) SetName

SetName sets the "name" field.

func (*MsgTemplateUpsert) SetReceiverType

SetReceiverType sets the "receiver_type" field.

func (*MsgTemplateUpsert) SetStatus

SetStatus sets the "status" field.

func (*MsgTemplateUpsert) SetSubject

func (u *MsgTemplateUpsert) SetSubject(v string) *MsgTemplateUpsert

SetSubject sets the "subject" field.

func (*MsgTemplateUpsert) SetTenantID

func (u *MsgTemplateUpsert) SetTenantID(v int) *MsgTemplateUpsert

SetTenantID sets the "tenant_id" field.

func (*MsgTemplateUpsert) SetTo

SetTo sets the "to" field.

func (*MsgTemplateUpsert) SetTpl

SetTpl sets the "tpl" field.

func (*MsgTemplateUpsert) SetTplFileID

func (u *MsgTemplateUpsert) SetTplFileID(v int) *MsgTemplateUpsert

SetTplFileID sets the "tpl_file_id" field.

func (*MsgTemplateUpsert) SetUpdatedAt

func (u *MsgTemplateUpsert) SetUpdatedAt(v time.Time) *MsgTemplateUpsert

SetUpdatedAt sets the "updated_at" field.

func (*MsgTemplateUpsert) SetUpdatedBy

func (u *MsgTemplateUpsert) SetUpdatedBy(v int) *MsgTemplateUpsert

SetUpdatedBy sets the "updated_by" field.

func (*MsgTemplateUpsert) UpdateAttachments

func (u *MsgTemplateUpsert) UpdateAttachments() *MsgTemplateUpsert

UpdateAttachments sets the "attachments" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateAttachmentsFileIds

func (u *MsgTemplateUpsert) UpdateAttachmentsFileIds() *MsgTemplateUpsert

UpdateAttachmentsFileIds sets the "attachments_file_ids" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateBcc

func (u *MsgTemplateUpsert) UpdateBcc() *MsgTemplateUpsert

UpdateBcc sets the "bcc" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateBody

func (u *MsgTemplateUpsert) UpdateBody() *MsgTemplateUpsert

UpdateBody sets the "body" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateCc

func (u *MsgTemplateUpsert) UpdateCc() *MsgTemplateUpsert

UpdateCc sets the "cc" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateComments

func (u *MsgTemplateUpsert) UpdateComments() *MsgTemplateUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateFormat

func (u *MsgTemplateUpsert) UpdateFormat() *MsgTemplateUpsert

UpdateFormat sets the "format" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateFrom

func (u *MsgTemplateUpsert) UpdateFrom() *MsgTemplateUpsert

UpdateFrom sets the "from" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateMsgEventID

func (u *MsgTemplateUpsert) UpdateMsgEventID() *MsgTemplateUpsert

UpdateMsgEventID sets the "msg_event_id" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateMsgTypeID

func (u *MsgTemplateUpsert) UpdateMsgTypeID() *MsgTemplateUpsert

UpdateMsgTypeID sets the "msg_type_id" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateName

func (u *MsgTemplateUpsert) UpdateName() *MsgTemplateUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateReceiverType

func (u *MsgTemplateUpsert) UpdateReceiverType() *MsgTemplateUpsert

UpdateReceiverType sets the "receiver_type" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateStatus

func (u *MsgTemplateUpsert) UpdateStatus() *MsgTemplateUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateSubject

func (u *MsgTemplateUpsert) UpdateSubject() *MsgTemplateUpsert

UpdateSubject sets the "subject" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateTenantID

func (u *MsgTemplateUpsert) UpdateTenantID() *MsgTemplateUpsert

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateTo

func (u *MsgTemplateUpsert) UpdateTo() *MsgTemplateUpsert

UpdateTo sets the "to" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateTpl

func (u *MsgTemplateUpsert) UpdateTpl() *MsgTemplateUpsert

UpdateTpl sets the "tpl" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateTplFileID

func (u *MsgTemplateUpsert) UpdateTplFileID() *MsgTemplateUpsert

UpdateTplFileID sets the "tpl_file_id" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateUpdatedAt

func (u *MsgTemplateUpsert) UpdateUpdatedAt() *MsgTemplateUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgTemplateUpsert) UpdateUpdatedBy

func (u *MsgTemplateUpsert) UpdateUpdatedBy() *MsgTemplateUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgTemplateUpsertBulk

type MsgTemplateUpsertBulk struct {
	// contains filtered or unexported fields
}

MsgTemplateUpsertBulk is the builder for "upsert"-ing a bulk of MsgTemplate nodes.

func (*MsgTemplateUpsertBulk) AddMsgTypeID

func (u *MsgTemplateUpsertBulk) AddMsgTypeID(v int) *MsgTemplateUpsertBulk

AddMsgTypeID adds v to the "msg_type_id" field.

func (*MsgTemplateUpsertBulk) AddTenantID

func (u *MsgTemplateUpsertBulk) AddTenantID(v int) *MsgTemplateUpsertBulk

AddTenantID adds v to the "tenant_id" field.

func (*MsgTemplateUpsertBulk) AddTplFileID

func (u *MsgTemplateUpsertBulk) AddTplFileID(v int) *MsgTemplateUpsertBulk

AddTplFileID adds v to the "tpl_file_id" field.

func (*MsgTemplateUpsertBulk) AddUpdatedBy

func (u *MsgTemplateUpsertBulk) AddUpdatedBy(v int) *MsgTemplateUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgTemplateUpsertBulk) ClearAttachments

func (u *MsgTemplateUpsertBulk) ClearAttachments() *MsgTemplateUpsertBulk

ClearAttachments clears the value of the "attachments" field.

func (*MsgTemplateUpsertBulk) ClearAttachmentsFileIds

func (u *MsgTemplateUpsertBulk) ClearAttachmentsFileIds() *MsgTemplateUpsertBulk

ClearAttachmentsFileIds clears the value of the "attachments_file_ids" field.

func (*MsgTemplateUpsertBulk) ClearBcc

ClearBcc clears the value of the "bcc" field.

func (*MsgTemplateUpsertBulk) ClearBody

ClearBody clears the value of the "body" field.

func (*MsgTemplateUpsertBulk) ClearCc

ClearCc clears the value of the "cc" field.

func (*MsgTemplateUpsertBulk) ClearComments

func (u *MsgTemplateUpsertBulk) ClearComments() *MsgTemplateUpsertBulk

ClearComments clears the value of the "comments" field.

func (*MsgTemplateUpsertBulk) ClearFrom

ClearFrom clears the value of the "from" field.

func (*MsgTemplateUpsertBulk) ClearStatus

func (u *MsgTemplateUpsertBulk) ClearStatus() *MsgTemplateUpsertBulk

ClearStatus clears the value of the "status" field.

func (*MsgTemplateUpsertBulk) ClearSubject

func (u *MsgTemplateUpsertBulk) ClearSubject() *MsgTemplateUpsertBulk

ClearSubject clears the value of the "subject" field.

func (*MsgTemplateUpsertBulk) ClearTo

ClearTo clears the value of the "to" field.

func (*MsgTemplateUpsertBulk) ClearTpl

ClearTpl clears the value of the "tpl" field.

func (*MsgTemplateUpsertBulk) ClearTplFileID

func (u *MsgTemplateUpsertBulk) ClearTplFileID() *MsgTemplateUpsertBulk

ClearTplFileID clears the value of the "tpl_file_id" field.

func (*MsgTemplateUpsertBulk) ClearUpdatedAt

func (u *MsgTemplateUpsertBulk) ClearUpdatedAt() *MsgTemplateUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgTemplateUpsertBulk) ClearUpdatedBy

func (u *MsgTemplateUpsertBulk) ClearUpdatedBy() *MsgTemplateUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgTemplateUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgTemplateUpsertBulk) Exec

Exec executes the query.

func (*MsgTemplateUpsertBulk) ExecX

func (u *MsgTemplateUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTemplateUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgTemplate.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*MsgTemplateUpsertBulk) SetAttachments

func (u *MsgTemplateUpsertBulk) SetAttachments(v []string) *MsgTemplateUpsertBulk

SetAttachments sets the "attachments" field.

func (*MsgTemplateUpsertBulk) SetAttachmentsFileIds

func (u *MsgTemplateUpsertBulk) SetAttachmentsFileIds(v []int) *MsgTemplateUpsertBulk

SetAttachmentsFileIds sets the "attachments_file_ids" field.

func (*MsgTemplateUpsertBulk) SetBcc

SetBcc sets the "bcc" field.

func (*MsgTemplateUpsertBulk) SetBody

SetBody sets the "body" field.

func (*MsgTemplateUpsertBulk) SetCc

SetCc sets the "cc" field.

func (*MsgTemplateUpsertBulk) SetComments

SetComments sets the "comments" field.

func (*MsgTemplateUpsertBulk) SetFormat

SetFormat sets the "format" field.

func (*MsgTemplateUpsertBulk) SetFrom

SetFrom sets the "from" field.

func (*MsgTemplateUpsertBulk) SetMsgEventID

func (u *MsgTemplateUpsertBulk) SetMsgEventID(v int) *MsgTemplateUpsertBulk

SetMsgEventID sets the "msg_event_id" field.

func (*MsgTemplateUpsertBulk) SetMsgTypeID

func (u *MsgTemplateUpsertBulk) SetMsgTypeID(v int) *MsgTemplateUpsertBulk

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgTemplateUpsertBulk) SetName

SetName sets the "name" field.

func (*MsgTemplateUpsertBulk) SetReceiverType

SetReceiverType sets the "receiver_type" field.

func (*MsgTemplateUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*MsgTemplateUpsertBulk) SetSubject

SetSubject sets the "subject" field.

func (*MsgTemplateUpsertBulk) SetTenantID

func (u *MsgTemplateUpsertBulk) SetTenantID(v int) *MsgTemplateUpsertBulk

SetTenantID sets the "tenant_id" field.

func (*MsgTemplateUpsertBulk) SetTo

SetTo sets the "to" field.

func (*MsgTemplateUpsertBulk) SetTpl

SetTpl sets the "tpl" field.

func (*MsgTemplateUpsertBulk) SetTplFileID

func (u *MsgTemplateUpsertBulk) SetTplFileID(v int) *MsgTemplateUpsertBulk

SetTplFileID sets the "tpl_file_id" field.

func (*MsgTemplateUpsertBulk) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*MsgTemplateUpsertBulk) SetUpdatedBy

func (u *MsgTemplateUpsertBulk) SetUpdatedBy(v int) *MsgTemplateUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*MsgTemplateUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the MsgTemplateCreateBulk.OnConflict documentation for more info.

func (*MsgTemplateUpsertBulk) UpdateAttachments

func (u *MsgTemplateUpsertBulk) UpdateAttachments() *MsgTemplateUpsertBulk

UpdateAttachments sets the "attachments" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateAttachmentsFileIds

func (u *MsgTemplateUpsertBulk) UpdateAttachmentsFileIds() *MsgTemplateUpsertBulk

UpdateAttachmentsFileIds sets the "attachments_file_ids" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateBcc

UpdateBcc sets the "bcc" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateBody

UpdateBody sets the "body" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateCc

UpdateCc sets the "cc" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateComments

func (u *MsgTemplateUpsertBulk) UpdateComments() *MsgTemplateUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateFormat

func (u *MsgTemplateUpsertBulk) UpdateFormat() *MsgTemplateUpsertBulk

UpdateFormat sets the "format" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateFrom

UpdateFrom sets the "from" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateMsgEventID

func (u *MsgTemplateUpsertBulk) UpdateMsgEventID() *MsgTemplateUpsertBulk

UpdateMsgEventID sets the "msg_event_id" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateMsgTypeID

func (u *MsgTemplateUpsertBulk) UpdateMsgTypeID() *MsgTemplateUpsertBulk

UpdateMsgTypeID sets the "msg_type_id" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateNewValues

func (u *MsgTemplateUpsertBulk) UpdateNewValues() *MsgTemplateUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.MsgTemplate.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msgtemplate.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgTemplateUpsertBulk) UpdateReceiverType

func (u *MsgTemplateUpsertBulk) UpdateReceiverType() *MsgTemplateUpsertBulk

UpdateReceiverType sets the "receiver_type" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateStatus

func (u *MsgTemplateUpsertBulk) UpdateStatus() *MsgTemplateUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateSubject

func (u *MsgTemplateUpsertBulk) UpdateSubject() *MsgTemplateUpsertBulk

UpdateSubject sets the "subject" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateTenantID

func (u *MsgTemplateUpsertBulk) UpdateTenantID() *MsgTemplateUpsertBulk

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateTo

UpdateTo sets the "to" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateTpl

UpdateTpl sets the "tpl" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateTplFileID

func (u *MsgTemplateUpsertBulk) UpdateTplFileID() *MsgTemplateUpsertBulk

UpdateTplFileID sets the "tpl_file_id" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateUpdatedAt

func (u *MsgTemplateUpsertBulk) UpdateUpdatedAt() *MsgTemplateUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgTemplateUpsertBulk) UpdateUpdatedBy

func (u *MsgTemplateUpsertBulk) UpdateUpdatedBy() *MsgTemplateUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgTemplateUpsertOne

type MsgTemplateUpsertOne struct {
	// contains filtered or unexported fields
}

MsgTemplateUpsertOne is the builder for "upsert"-ing

one MsgTemplate node.

func (*MsgTemplateUpsertOne) AddMsgTypeID

func (u *MsgTemplateUpsertOne) AddMsgTypeID(v int) *MsgTemplateUpsertOne

AddMsgTypeID adds v to the "msg_type_id" field.

func (*MsgTemplateUpsertOne) AddTenantID

func (u *MsgTemplateUpsertOne) AddTenantID(v int) *MsgTemplateUpsertOne

AddTenantID adds v to the "tenant_id" field.

func (*MsgTemplateUpsertOne) AddTplFileID

func (u *MsgTemplateUpsertOne) AddTplFileID(v int) *MsgTemplateUpsertOne

AddTplFileID adds v to the "tpl_file_id" field.

func (*MsgTemplateUpsertOne) AddUpdatedBy

func (u *MsgTemplateUpsertOne) AddUpdatedBy(v int) *MsgTemplateUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgTemplateUpsertOne) ClearAttachments

func (u *MsgTemplateUpsertOne) ClearAttachments() *MsgTemplateUpsertOne

ClearAttachments clears the value of the "attachments" field.

func (*MsgTemplateUpsertOne) ClearAttachmentsFileIds

func (u *MsgTemplateUpsertOne) ClearAttachmentsFileIds() *MsgTemplateUpsertOne

ClearAttachmentsFileIds clears the value of the "attachments_file_ids" field.

func (*MsgTemplateUpsertOne) ClearBcc

ClearBcc clears the value of the "bcc" field.

func (*MsgTemplateUpsertOne) ClearBody

ClearBody clears the value of the "body" field.

func (*MsgTemplateUpsertOne) ClearCc

ClearCc clears the value of the "cc" field.

func (*MsgTemplateUpsertOne) ClearComments

func (u *MsgTemplateUpsertOne) ClearComments() *MsgTemplateUpsertOne

ClearComments clears the value of the "comments" field.

func (*MsgTemplateUpsertOne) ClearFrom

ClearFrom clears the value of the "from" field.

func (*MsgTemplateUpsertOne) ClearStatus

func (u *MsgTemplateUpsertOne) ClearStatus() *MsgTemplateUpsertOne

ClearStatus clears the value of the "status" field.

func (*MsgTemplateUpsertOne) ClearSubject

func (u *MsgTemplateUpsertOne) ClearSubject() *MsgTemplateUpsertOne

ClearSubject clears the value of the "subject" field.

func (*MsgTemplateUpsertOne) ClearTo

ClearTo clears the value of the "to" field.

func (*MsgTemplateUpsertOne) ClearTpl

ClearTpl clears the value of the "tpl" field.

func (*MsgTemplateUpsertOne) ClearTplFileID

func (u *MsgTemplateUpsertOne) ClearTplFileID() *MsgTemplateUpsertOne

ClearTplFileID clears the value of the "tpl_file_id" field.

func (*MsgTemplateUpsertOne) ClearUpdatedAt

func (u *MsgTemplateUpsertOne) ClearUpdatedAt() *MsgTemplateUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgTemplateUpsertOne) ClearUpdatedBy

func (u *MsgTemplateUpsertOne) ClearUpdatedBy() *MsgTemplateUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgTemplateUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgTemplateUpsertOne) Exec

Exec executes the query.

func (*MsgTemplateUpsertOne) ExecX

func (u *MsgTemplateUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTemplateUpsertOne) ID

func (u *MsgTemplateUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*MsgTemplateUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*MsgTemplateUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgTemplate.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*MsgTemplateUpsertOne) SetAttachments

func (u *MsgTemplateUpsertOne) SetAttachments(v []string) *MsgTemplateUpsertOne

SetAttachments sets the "attachments" field.

func (*MsgTemplateUpsertOne) SetAttachmentsFileIds

func (u *MsgTemplateUpsertOne) SetAttachmentsFileIds(v []int) *MsgTemplateUpsertOne

SetAttachmentsFileIds sets the "attachments_file_ids" field.

func (*MsgTemplateUpsertOne) SetBcc

SetBcc sets the "bcc" field.

func (*MsgTemplateUpsertOne) SetBody

SetBody sets the "body" field.

func (*MsgTemplateUpsertOne) SetCc

SetCc sets the "cc" field.

func (*MsgTemplateUpsertOne) SetComments

SetComments sets the "comments" field.

func (*MsgTemplateUpsertOne) SetFormat

SetFormat sets the "format" field.

func (*MsgTemplateUpsertOne) SetFrom

SetFrom sets the "from" field.

func (*MsgTemplateUpsertOne) SetMsgEventID

func (u *MsgTemplateUpsertOne) SetMsgEventID(v int) *MsgTemplateUpsertOne

SetMsgEventID sets the "msg_event_id" field.

func (*MsgTemplateUpsertOne) SetMsgTypeID

func (u *MsgTemplateUpsertOne) SetMsgTypeID(v int) *MsgTemplateUpsertOne

SetMsgTypeID sets the "msg_type_id" field.

func (*MsgTemplateUpsertOne) SetName

SetName sets the "name" field.

func (*MsgTemplateUpsertOne) SetReceiverType

SetReceiverType sets the "receiver_type" field.

func (*MsgTemplateUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*MsgTemplateUpsertOne) SetSubject

SetSubject sets the "subject" field.

func (*MsgTemplateUpsertOne) SetTenantID

func (u *MsgTemplateUpsertOne) SetTenantID(v int) *MsgTemplateUpsertOne

SetTenantID sets the "tenant_id" field.

func (*MsgTemplateUpsertOne) SetTo

SetTo sets the "to" field.

func (*MsgTemplateUpsertOne) SetTpl

SetTpl sets the "tpl" field.

func (*MsgTemplateUpsertOne) SetTplFileID

func (u *MsgTemplateUpsertOne) SetTplFileID(v int) *MsgTemplateUpsertOne

SetTplFileID sets the "tpl_file_id" field.

func (*MsgTemplateUpsertOne) SetUpdatedAt

func (u *MsgTemplateUpsertOne) SetUpdatedAt(v time.Time) *MsgTemplateUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*MsgTemplateUpsertOne) SetUpdatedBy

func (u *MsgTemplateUpsertOne) SetUpdatedBy(v int) *MsgTemplateUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*MsgTemplateUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the MsgTemplateCreate.OnConflict documentation for more info.

func (*MsgTemplateUpsertOne) UpdateAttachments

func (u *MsgTemplateUpsertOne) UpdateAttachments() *MsgTemplateUpsertOne

UpdateAttachments sets the "attachments" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateAttachmentsFileIds

func (u *MsgTemplateUpsertOne) UpdateAttachmentsFileIds() *MsgTemplateUpsertOne

UpdateAttachmentsFileIds sets the "attachments_file_ids" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateBcc

UpdateBcc sets the "bcc" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateBody

func (u *MsgTemplateUpsertOne) UpdateBody() *MsgTemplateUpsertOne

UpdateBody sets the "body" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateCc

UpdateCc sets the "cc" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateComments

func (u *MsgTemplateUpsertOne) UpdateComments() *MsgTemplateUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateFormat

func (u *MsgTemplateUpsertOne) UpdateFormat() *MsgTemplateUpsertOne

UpdateFormat sets the "format" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateFrom

func (u *MsgTemplateUpsertOne) UpdateFrom() *MsgTemplateUpsertOne

UpdateFrom sets the "from" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateMsgEventID

func (u *MsgTemplateUpsertOne) UpdateMsgEventID() *MsgTemplateUpsertOne

UpdateMsgEventID sets the "msg_event_id" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateMsgTypeID

func (u *MsgTemplateUpsertOne) UpdateMsgTypeID() *MsgTemplateUpsertOne

UpdateMsgTypeID sets the "msg_type_id" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateName

func (u *MsgTemplateUpsertOne) UpdateName() *MsgTemplateUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateNewValues

func (u *MsgTemplateUpsertOne) UpdateNewValues() *MsgTemplateUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.MsgTemplate.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msgtemplate.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgTemplateUpsertOne) UpdateReceiverType

func (u *MsgTemplateUpsertOne) UpdateReceiverType() *MsgTemplateUpsertOne

UpdateReceiverType sets the "receiver_type" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateStatus

func (u *MsgTemplateUpsertOne) UpdateStatus() *MsgTemplateUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateSubject

func (u *MsgTemplateUpsertOne) UpdateSubject() *MsgTemplateUpsertOne

UpdateSubject sets the "subject" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateTenantID

func (u *MsgTemplateUpsertOne) UpdateTenantID() *MsgTemplateUpsertOne

UpdateTenantID sets the "tenant_id" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateTo

UpdateTo sets the "to" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateTpl

UpdateTpl sets the "tpl" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateTplFileID

func (u *MsgTemplateUpsertOne) UpdateTplFileID() *MsgTemplateUpsertOne

UpdateTplFileID sets the "tpl_file_id" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateUpdatedAt

func (u *MsgTemplateUpsertOne) UpdateUpdatedAt() *MsgTemplateUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgTemplateUpsertOne) UpdateUpdatedBy

func (u *MsgTemplateUpsertOne) UpdateUpdatedBy() *MsgTemplateUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgTemplateWhereInput

type MsgTemplateWhereInput struct {
	Predicates []predicate.MsgTemplate  `json:"-"`
	Not        *MsgTemplateWhereInput   `json:"not,omitempty"`
	Or         []*MsgTemplateWhereInput `json:"or,omitempty"`
	And        []*MsgTemplateWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "msg_type_id" field predicates.
	MsgTypeID      *int  `json:"msgTypeID,omitempty"`
	MsgTypeIDNEQ   *int  `json:"msgTypeIDNEQ,omitempty"`
	MsgTypeIDIn    []int `json:"msgTypeIDIn,omitempty"`
	MsgTypeIDNotIn []int `json:"msgTypeIDNotIn,omitempty"`
	MsgTypeIDGT    *int  `json:"msgTypeIDGT,omitempty"`
	MsgTypeIDGTE   *int  `json:"msgTypeIDGTE,omitempty"`
	MsgTypeIDLT    *int  `json:"msgTypeIDLT,omitempty"`
	MsgTypeIDLTE   *int  `json:"msgTypeIDLTE,omitempty"`

	// "msg_event_id" field predicates.
	MsgEventID      *int  `json:"msgEventID,omitempty"`
	MsgEventIDNEQ   *int  `json:"msgEventIDNEQ,omitempty"`
	MsgEventIDIn    []int `json:"msgEventIDIn,omitempty"`
	MsgEventIDNotIn []int `json:"msgEventIDNotIn,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "status" field predicates.
	Status       *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ    *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn  []typex.SimpleStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool                 `json:"statusIsNil,omitempty"`
	StatusNotNil bool                 `json:"statusNotNil,omitempty"`

	// "receiver_type" field predicates.
	ReceiverType      *profile.ReceiverType  `json:"receiverType,omitempty"`
	ReceiverTypeNEQ   *profile.ReceiverType  `json:"receiverTypeNEQ,omitempty"`
	ReceiverTypeIn    []profile.ReceiverType `json:"receiverTypeIn,omitempty"`
	ReceiverTypeNotIn []profile.ReceiverType `json:"receiverTypeNotIn,omitempty"`

	// "format" field predicates.
	Format      *msgtemplate.Format  `json:"format,omitempty"`
	FormatNEQ   *msgtemplate.Format  `json:"formatNEQ,omitempty"`
	FormatIn    []msgtemplate.Format `json:"formatIn,omitempty"`
	FormatNotIn []msgtemplate.Format `json:"formatNotIn,omitempty"`

	// "subject" field predicates.
	Subject             *string  `json:"subject,omitempty"`
	SubjectNEQ          *string  `json:"subjectNEQ,omitempty"`
	SubjectIn           []string `json:"subjectIn,omitempty"`
	SubjectNotIn        []string `json:"subjectNotIn,omitempty"`
	SubjectGT           *string  `json:"subjectGT,omitempty"`
	SubjectGTE          *string  `json:"subjectGTE,omitempty"`
	SubjectLT           *string  `json:"subjectLT,omitempty"`
	SubjectLTE          *string  `json:"subjectLTE,omitempty"`
	SubjectContains     *string  `json:"subjectContains,omitempty"`
	SubjectHasPrefix    *string  `json:"subjectHasPrefix,omitempty"`
	SubjectHasSuffix    *string  `json:"subjectHasSuffix,omitempty"`
	SubjectIsNil        bool     `json:"subjectIsNil,omitempty"`
	SubjectNotNil       bool     `json:"subjectNotNil,omitempty"`
	SubjectEqualFold    *string  `json:"subjectEqualFold,omitempty"`
	SubjectContainsFold *string  `json:"subjectContainsFold,omitempty"`

	// "from" field predicates.
	From             *string  `json:"from,omitempty"`
	FromNEQ          *string  `json:"fromNEQ,omitempty"`
	FromIn           []string `json:"fromIn,omitempty"`
	FromNotIn        []string `json:"fromNotIn,omitempty"`
	FromGT           *string  `json:"fromGT,omitempty"`
	FromGTE          *string  `json:"fromGTE,omitempty"`
	FromLT           *string  `json:"fromLT,omitempty"`
	FromLTE          *string  `json:"fromLTE,omitempty"`
	FromContains     *string  `json:"fromContains,omitempty"`
	FromHasPrefix    *string  `json:"fromHasPrefix,omitempty"`
	FromHasSuffix    *string  `json:"fromHasSuffix,omitempty"`
	FromIsNil        bool     `json:"fromIsNil,omitempty"`
	FromNotNil       bool     `json:"fromNotNil,omitempty"`
	FromEqualFold    *string  `json:"fromEqualFold,omitempty"`
	FromContainsFold *string  `json:"fromContainsFold,omitempty"`

	// "to" field predicates.
	To             *string  `json:"to,omitempty"`
	ToNEQ          *string  `json:"toNEQ,omitempty"`
	ToIn           []string `json:"toIn,omitempty"`
	ToNotIn        []string `json:"toNotIn,omitempty"`
	ToGT           *string  `json:"toGT,omitempty"`
	ToGTE          *string  `json:"toGTE,omitempty"`
	ToLT           *string  `json:"toLT,omitempty"`
	ToLTE          *string  `json:"toLTE,omitempty"`
	ToContains     *string  `json:"toContains,omitempty"`
	ToHasPrefix    *string  `json:"toHasPrefix,omitempty"`
	ToHasSuffix    *string  `json:"toHasSuffix,omitempty"`
	ToIsNil        bool     `json:"toIsNil,omitempty"`
	ToNotNil       bool     `json:"toNotNil,omitempty"`
	ToEqualFold    *string  `json:"toEqualFold,omitempty"`
	ToContainsFold *string  `json:"toContainsFold,omitempty"`

	// "cc" field predicates.
	Cc             *string  `json:"cc,omitempty"`
	CcNEQ          *string  `json:"ccNEQ,omitempty"`
	CcIn           []string `json:"ccIn,omitempty"`
	CcNotIn        []string `json:"ccNotIn,omitempty"`
	CcGT           *string  `json:"ccGT,omitempty"`
	CcGTE          *string  `json:"ccGTE,omitempty"`
	CcLT           *string  `json:"ccLT,omitempty"`
	CcLTE          *string  `json:"ccLTE,omitempty"`
	CcContains     *string  `json:"ccContains,omitempty"`
	CcHasPrefix    *string  `json:"ccHasPrefix,omitempty"`
	CcHasSuffix    *string  `json:"ccHasSuffix,omitempty"`
	CcIsNil        bool     `json:"ccIsNil,omitempty"`
	CcNotNil       bool     `json:"ccNotNil,omitempty"`
	CcEqualFold    *string  `json:"ccEqualFold,omitempty"`
	CcContainsFold *string  `json:"ccContainsFold,omitempty"`

	// "bcc" field predicates.
	Bcc             *string  `json:"bcc,omitempty"`
	BccNEQ          *string  `json:"bccNEQ,omitempty"`
	BccIn           []string `json:"bccIn,omitempty"`
	BccNotIn        []string `json:"bccNotIn,omitempty"`
	BccGT           *string  `json:"bccGT,omitempty"`
	BccGTE          *string  `json:"bccGTE,omitempty"`
	BccLT           *string  `json:"bccLT,omitempty"`
	BccLTE          *string  `json:"bccLTE,omitempty"`
	BccContains     *string  `json:"bccContains,omitempty"`
	BccHasPrefix    *string  `json:"bccHasPrefix,omitempty"`
	BccHasSuffix    *string  `json:"bccHasSuffix,omitempty"`
	BccIsNil        bool     `json:"bccIsNil,omitempty"`
	BccNotNil       bool     `json:"bccNotNil,omitempty"`
	BccEqualFold    *string  `json:"bccEqualFold,omitempty"`
	BccContainsFold *string  `json:"bccContainsFold,omitempty"`

	// "event" edge predicates.
	HasEvent     *bool                 `json:"hasEvent,omitempty"`
	HasEventWith []*MsgEventWhereInput `json:"hasEventWith,omitempty"`
}

MsgTemplateWhereInput represents a where input for filtering MsgTemplate queries.

func (*MsgTemplateWhereInput) AddPredicates

func (i *MsgTemplateWhereInput) AddPredicates(predicates ...predicate.MsgTemplate)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*MsgTemplateWhereInput) Filter

Filter applies the MsgTemplateWhereInput filter on the MsgTemplateQuery builder.

func (*MsgTemplateWhereInput) P

P returns a predicate for filtering msgtemplates. An error is returned if the input is empty or invalid.

type MsgTemplates

type MsgTemplates []*MsgTemplate

MsgTemplates is a parsable slice of MsgTemplate.

type MsgType

type MsgType struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// 应用ID
	AppID int `json:"app_id,omitempty"`
	// 消息类型分类
	Category string `json:"category,omitempty"`
	// 消息类型名称,应用内唯一
	Name string `json:"name,omitempty"`
	// 状态
	Status typex.SimpleStatus `json:"status,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// 是否可订阅
	CanSubs bool `json:"can_subs,omitempty"`
	// 是否可定制
	CanCustom bool `json:"can_custom,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the MsgTypeQuery when eager-loading is set.
	Edges MsgTypeEdges `json:"edges"`
	// contains filtered or unexported fields
}

MsgType is the model entity for the MsgType schema.

func (*MsgType) Events

func (mt *MsgType) Events(ctx context.Context) (result []*MsgEvent, err error)

func (*MsgType) GlobalID

func (mt *MsgType) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given MsgType node.

func (*MsgType) IsNode

func (*MsgType) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*MsgType) NamedEvents

func (mt *MsgType) NamedEvents(name string) ([]*MsgEvent, error)

NamedEvents returns the Events named value or an error if the edge was not loaded in eager-loading with this name.

func (*MsgType) NamedSubscribers

func (mt *MsgType) NamedSubscribers(name string) ([]*MsgSubscriber, error)

NamedSubscribers returns the Subscribers named value or an error if the edge was not loaded in eager-loading with this name.

func (*MsgType) QueryEvents

func (mt *MsgType) QueryEvents() *MsgEventQuery

QueryEvents queries the "events" edge of the MsgType entity.

func (*MsgType) QuerySubscribers

func (mt *MsgType) QuerySubscribers() *MsgSubscriberQuery

QuerySubscribers queries the "subscribers" edge of the MsgType entity.

func (*MsgType) String

func (mt *MsgType) String() string

String implements the fmt.Stringer.

func (*MsgType) Subscribers

func (mt *MsgType) Subscribers(ctx context.Context) (result []*MsgSubscriber, err error)

func (*MsgType) ToEdge

func (mt *MsgType) ToEdge(order *MsgTypeOrder) *MsgTypeEdge

ToEdge converts MsgType into MsgTypeEdge.

func (*MsgType) Unwrap

func (mt *MsgType) Unwrap() *MsgType

Unwrap unwraps the MsgType 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 (*MsgType) Update

func (mt *MsgType) Update() *MsgTypeUpdateOne

Update returns a builder for updating this MsgType. Note that you need to call MsgType.Unwrap() before calling this method if this MsgType was returned from a transaction, and the transaction was committed or rolled back.

func (*MsgType) Value

func (mt *MsgType) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the MsgType. This includes values selected through modifiers, order, etc.

type MsgTypeClient

type MsgTypeClient struct {
	// contains filtered or unexported fields
}

MsgTypeClient is a client for the MsgType schema.

func NewMsgTypeClient

func NewMsgTypeClient(c config) *MsgTypeClient

NewMsgTypeClient returns a client for the MsgType from the given config.

func (*MsgTypeClient) Create

func (c *MsgTypeClient) Create() *MsgTypeCreate

Create returns a builder for creating a MsgType entity.

func (*MsgTypeClient) CreateBulk

func (c *MsgTypeClient) CreateBulk(builders ...*MsgTypeCreate) *MsgTypeCreateBulk

CreateBulk returns a builder for creating a bulk of MsgType entities.

func (*MsgTypeClient) Delete

func (c *MsgTypeClient) Delete() *MsgTypeDelete

Delete returns a delete builder for MsgType.

func (*MsgTypeClient) DeleteOne

func (c *MsgTypeClient) DeleteOne(mt *MsgType) *MsgTypeDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*MsgTypeClient) DeleteOneID

func (c *MsgTypeClient) DeleteOneID(id int) *MsgTypeDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*MsgTypeClient) Get

func (c *MsgTypeClient) Get(ctx context.Context, id int) (*MsgType, error)

Get returns a MsgType entity by its id.

func (*MsgTypeClient) GetX

func (c *MsgTypeClient) GetX(ctx context.Context, id int) *MsgType

GetX is like Get, but panics if an error occurs.

func (*MsgTypeClient) Hooks

func (c *MsgTypeClient) Hooks() []Hook

Hooks returns the client hooks.

func (*MsgTypeClient) Intercept

func (c *MsgTypeClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `msgtype.Intercept(f(g(h())))`.

func (*MsgTypeClient) Interceptors

func (c *MsgTypeClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*MsgTypeClient) MapCreateBulk

func (c *MsgTypeClient) MapCreateBulk(slice any, setFunc func(*MsgTypeCreate, int)) *MsgTypeCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*MsgTypeClient) Query

func (c *MsgTypeClient) Query() *MsgTypeQuery

Query returns a query builder for MsgType.

func (*MsgTypeClient) QueryEvents

func (c *MsgTypeClient) QueryEvents(mt *MsgType) *MsgEventQuery

QueryEvents queries the events edge of a MsgType.

func (*MsgTypeClient) QuerySubscribers

func (c *MsgTypeClient) QuerySubscribers(mt *MsgType) *MsgSubscriberQuery

QuerySubscribers queries the subscribers edge of a MsgType.

func (*MsgTypeClient) Update

func (c *MsgTypeClient) Update() *MsgTypeUpdate

Update returns an update builder for MsgType.

func (*MsgTypeClient) UpdateOne

func (c *MsgTypeClient) UpdateOne(mt *MsgType) *MsgTypeUpdateOne

UpdateOne returns an update builder for the given entity.

func (*MsgTypeClient) UpdateOneID

func (c *MsgTypeClient) UpdateOneID(id int) *MsgTypeUpdateOne

UpdateOneID returns an update builder for the given id.

func (*MsgTypeClient) Use

func (c *MsgTypeClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `msgtype.Hooks(f(g(h())))`.

type MsgTypeConnection

type MsgTypeConnection struct {
	Edges      []*MsgTypeEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

MsgTypeConnection is the connection containing edges to MsgType.

type MsgTypeCreate

type MsgTypeCreate struct {
	// contains filtered or unexported fields
}

MsgTypeCreate is the builder for creating a MsgType entity.

func (*MsgTypeCreate) AddEventIDs

func (mtc *MsgTypeCreate) AddEventIDs(ids ...int) *MsgTypeCreate

AddEventIDs adds the "events" edge to the MsgEvent entity by IDs.

func (*MsgTypeCreate) AddEvents

func (mtc *MsgTypeCreate) AddEvents(m ...*MsgEvent) *MsgTypeCreate

AddEvents adds the "events" edges to the MsgEvent entity.

func (*MsgTypeCreate) AddSubscriberIDs

func (mtc *MsgTypeCreate) AddSubscriberIDs(ids ...int) *MsgTypeCreate

AddSubscriberIDs adds the "subscribers" edge to the MsgSubscriber entity by IDs.

func (*MsgTypeCreate) AddSubscribers

func (mtc *MsgTypeCreate) AddSubscribers(m ...*MsgSubscriber) *MsgTypeCreate

AddSubscribers adds the "subscribers" edges to the MsgSubscriber entity.

func (*MsgTypeCreate) Exec

func (mtc *MsgTypeCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgTypeCreate) ExecX

func (mtc *MsgTypeCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTypeCreate) Mutation

func (mtc *MsgTypeCreate) Mutation() *MsgTypeMutation

Mutation returns the MsgTypeMutation object of the builder.

func (*MsgTypeCreate) OnConflict

func (mtc *MsgTypeCreate) OnConflict(opts ...sql.ConflictOption) *MsgTypeUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgType.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgTypeUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*MsgTypeCreate) OnConflictColumns

func (mtc *MsgTypeCreate) OnConflictColumns(columns ...string) *MsgTypeUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgType.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgTypeCreate) Save

func (mtc *MsgTypeCreate) Save(ctx context.Context) (*MsgType, error)

Save creates the MsgType in the database.

func (*MsgTypeCreate) SaveX

func (mtc *MsgTypeCreate) SaveX(ctx context.Context) *MsgType

SaveX calls Save and panics if Save returns an error.

func (*MsgTypeCreate) SetAppID

func (mtc *MsgTypeCreate) SetAppID(i int) *MsgTypeCreate

SetAppID sets the "app_id" field.

func (*MsgTypeCreate) SetCanCustom

func (mtc *MsgTypeCreate) SetCanCustom(b bool) *MsgTypeCreate

SetCanCustom sets the "can_custom" field.

func (*MsgTypeCreate) SetCanSubs

func (mtc *MsgTypeCreate) SetCanSubs(b bool) *MsgTypeCreate

SetCanSubs sets the "can_subs" field.

func (*MsgTypeCreate) SetCategory

func (mtc *MsgTypeCreate) SetCategory(s string) *MsgTypeCreate

SetCategory sets the "category" field.

func (*MsgTypeCreate) SetComments

func (mtc *MsgTypeCreate) SetComments(s string) *MsgTypeCreate

SetComments sets the "comments" field.

func (*MsgTypeCreate) SetCreatedAt

func (mtc *MsgTypeCreate) SetCreatedAt(t time.Time) *MsgTypeCreate

SetCreatedAt sets the "created_at" field.

func (*MsgTypeCreate) SetCreatedBy

func (mtc *MsgTypeCreate) SetCreatedBy(i int) *MsgTypeCreate

SetCreatedBy sets the "created_by" field.

func (*MsgTypeCreate) SetID

func (mtc *MsgTypeCreate) SetID(i int) *MsgTypeCreate

SetID sets the "id" field.

func (*MsgTypeCreate) SetInput

SetInput applies the change-set in the CreateMsgTypeInput on the MsgTypeCreate builder.

func (*MsgTypeCreate) SetName

func (mtc *MsgTypeCreate) SetName(s string) *MsgTypeCreate

SetName sets the "name" field.

func (*MsgTypeCreate) SetNillableAppID

func (mtc *MsgTypeCreate) SetNillableAppID(i *int) *MsgTypeCreate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*MsgTypeCreate) SetNillableCanCustom

func (mtc *MsgTypeCreate) SetNillableCanCustom(b *bool) *MsgTypeCreate

SetNillableCanCustom sets the "can_custom" field if the given value is not nil.

func (*MsgTypeCreate) SetNillableCanSubs

func (mtc *MsgTypeCreate) SetNillableCanSubs(b *bool) *MsgTypeCreate

SetNillableCanSubs sets the "can_subs" field if the given value is not nil.

func (*MsgTypeCreate) SetNillableComments

func (mtc *MsgTypeCreate) SetNillableComments(s *string) *MsgTypeCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*MsgTypeCreate) SetNillableCreatedAt

func (mtc *MsgTypeCreate) SetNillableCreatedAt(t *time.Time) *MsgTypeCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*MsgTypeCreate) SetNillableStatus

func (mtc *MsgTypeCreate) SetNillableStatus(ts *typex.SimpleStatus) *MsgTypeCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*MsgTypeCreate) SetNillableUpdatedAt

func (mtc *MsgTypeCreate) SetNillableUpdatedAt(t *time.Time) *MsgTypeCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MsgTypeCreate) SetNillableUpdatedBy

func (mtc *MsgTypeCreate) SetNillableUpdatedBy(i *int) *MsgTypeCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgTypeCreate) SetStatus

func (mtc *MsgTypeCreate) SetStatus(ts typex.SimpleStatus) *MsgTypeCreate

SetStatus sets the "status" field.

func (*MsgTypeCreate) SetUpdatedAt

func (mtc *MsgTypeCreate) SetUpdatedAt(t time.Time) *MsgTypeCreate

SetUpdatedAt sets the "updated_at" field.

func (*MsgTypeCreate) SetUpdatedBy

func (mtc *MsgTypeCreate) SetUpdatedBy(i int) *MsgTypeCreate

SetUpdatedBy sets the "updated_by" field.

type MsgTypeCreateBulk

type MsgTypeCreateBulk struct {
	// contains filtered or unexported fields
}

MsgTypeCreateBulk is the builder for creating many MsgType entities in bulk.

func (*MsgTypeCreateBulk) Exec

func (mtcb *MsgTypeCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgTypeCreateBulk) ExecX

func (mtcb *MsgTypeCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTypeCreateBulk) OnConflict

func (mtcb *MsgTypeCreateBulk) OnConflict(opts ...sql.ConflictOption) *MsgTypeUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.MsgType.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.MsgTypeUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*MsgTypeCreateBulk) OnConflictColumns

func (mtcb *MsgTypeCreateBulk) OnConflictColumns(columns ...string) *MsgTypeUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.MsgType.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*MsgTypeCreateBulk) Save

func (mtcb *MsgTypeCreateBulk) Save(ctx context.Context) ([]*MsgType, error)

Save creates the MsgType entities in the database.

func (*MsgTypeCreateBulk) SaveX

func (mtcb *MsgTypeCreateBulk) SaveX(ctx context.Context) []*MsgType

SaveX is like Save, but panics if an error occurs.

type MsgTypeDelete

type MsgTypeDelete struct {
	// contains filtered or unexported fields
}

MsgTypeDelete is the builder for deleting a MsgType entity.

func (*MsgTypeDelete) Exec

func (mtd *MsgTypeDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*MsgTypeDelete) ExecX

func (mtd *MsgTypeDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*MsgTypeDelete) Where

func (mtd *MsgTypeDelete) Where(ps ...predicate.MsgType) *MsgTypeDelete

Where appends a list predicates to the MsgTypeDelete builder.

type MsgTypeDeleteOne

type MsgTypeDeleteOne struct {
	// contains filtered or unexported fields
}

MsgTypeDeleteOne is the builder for deleting a single MsgType entity.

func (*MsgTypeDeleteOne) Exec

func (mtdo *MsgTypeDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*MsgTypeDeleteOne) ExecX

func (mtdo *MsgTypeDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTypeDeleteOne) Where

func (mtdo *MsgTypeDeleteOne) Where(ps ...predicate.MsgType) *MsgTypeDeleteOne

Where appends a list predicates to the MsgTypeDelete builder.

type MsgTypeEdge

type MsgTypeEdge struct {
	Node   *MsgType `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

MsgTypeEdge is the edge representation of MsgType.

type MsgTypeEdges

type MsgTypeEdges struct {
	// 消息事件
	Events []*MsgEvent `json:"events,omitempty"`
	// 订阅者
	Subscribers []*MsgSubscriber `json:"subscribers,omitempty"`
	// contains filtered or unexported fields
}

MsgTypeEdges holds the relations/edges for other nodes in the graph.

func (MsgTypeEdges) EventsOrErr

func (e MsgTypeEdges) EventsOrErr() ([]*MsgEvent, error)

EventsOrErr returns the Events value or an error if the edge was not loaded in eager-loading.

func (MsgTypeEdges) SubscribersOrErr

func (e MsgTypeEdges) SubscribersOrErr() ([]*MsgSubscriber, error)

SubscribersOrErr returns the Subscribers value or an error if the edge was not loaded in eager-loading.

type MsgTypeGroupBy

type MsgTypeGroupBy struct {
	// contains filtered or unexported fields
}

MsgTypeGroupBy is the group-by builder for MsgType entities.

func (*MsgTypeGroupBy) Aggregate

func (mtgb *MsgTypeGroupBy) Aggregate(fns ...AggregateFunc) *MsgTypeGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*MsgTypeGroupBy) Bool

func (s *MsgTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MsgTypeGroupBy) BoolX

func (s *MsgTypeGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MsgTypeGroupBy) Bools

func (s *MsgTypeGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MsgTypeGroupBy) BoolsX

func (s *MsgTypeGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MsgTypeGroupBy) Float64

func (s *MsgTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MsgTypeGroupBy) Float64X

func (s *MsgTypeGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MsgTypeGroupBy) Float64s

func (s *MsgTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MsgTypeGroupBy) Float64sX

func (s *MsgTypeGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MsgTypeGroupBy) Int

func (s *MsgTypeGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MsgTypeGroupBy) IntX

func (s *MsgTypeGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MsgTypeGroupBy) Ints

func (s *MsgTypeGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MsgTypeGroupBy) IntsX

func (s *MsgTypeGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MsgTypeGroupBy) Scan

func (mtgb *MsgTypeGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MsgTypeGroupBy) ScanX

func (s *MsgTypeGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MsgTypeGroupBy) String

func (s *MsgTypeGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MsgTypeGroupBy) StringX

func (s *MsgTypeGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MsgTypeGroupBy) Strings

func (s *MsgTypeGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MsgTypeGroupBy) StringsX

func (s *MsgTypeGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MsgTypeMutation

type MsgTypeMutation struct {
	// contains filtered or unexported fields
}

MsgTypeMutation represents an operation that mutates the MsgType nodes in the graph.

func (*MsgTypeMutation) AddAppID

func (m *MsgTypeMutation) AddAppID(i int)

AddAppID adds i to the "app_id" field.

func (*MsgTypeMutation) AddCreatedBy

func (m *MsgTypeMutation) AddCreatedBy(i int)

AddCreatedBy adds i to the "created_by" field.

func (*MsgTypeMutation) AddEventIDs

func (m *MsgTypeMutation) AddEventIDs(ids ...int)

AddEventIDs adds the "events" edge to the MsgEvent entity by ids.

func (*MsgTypeMutation) AddField

func (m *MsgTypeMutation) 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 (*MsgTypeMutation) AddSubscriberIDs

func (m *MsgTypeMutation) AddSubscriberIDs(ids ...int)

AddSubscriberIDs adds the "subscribers" edge to the MsgSubscriber entity by ids.

func (*MsgTypeMutation) AddUpdatedBy

func (m *MsgTypeMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgTypeMutation) AddedAppID

func (m *MsgTypeMutation) AddedAppID() (r int, exists bool)

AddedAppID returns the value that was added to the "app_id" field in this mutation.

func (*MsgTypeMutation) AddedCreatedBy

func (m *MsgTypeMutation) AddedCreatedBy() (r int, exists bool)

AddedCreatedBy returns the value that was added to the "created_by" field in this mutation.

func (*MsgTypeMutation) AddedEdges

func (m *MsgTypeMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*MsgTypeMutation) AddedField

func (m *MsgTypeMutation) 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 (*MsgTypeMutation) AddedFields

func (m *MsgTypeMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*MsgTypeMutation) AddedIDs

func (m *MsgTypeMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*MsgTypeMutation) AddedUpdatedBy

func (m *MsgTypeMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*MsgTypeMutation) AppID

func (m *MsgTypeMutation) AppID() (r int, exists bool)

AppID returns the value of the "app_id" field in the mutation.

func (*MsgTypeMutation) AppIDCleared

func (m *MsgTypeMutation) AppIDCleared() bool

AppIDCleared returns if the "app_id" field was cleared in this mutation.

func (*MsgTypeMutation) CanCustom

func (m *MsgTypeMutation) CanCustom() (r bool, exists bool)

CanCustom returns the value of the "can_custom" field in the mutation.

func (*MsgTypeMutation) CanCustomCleared

func (m *MsgTypeMutation) CanCustomCleared() bool

CanCustomCleared returns if the "can_custom" field was cleared in this mutation.

func (*MsgTypeMutation) CanSubs

func (m *MsgTypeMutation) CanSubs() (r bool, exists bool)

CanSubs returns the value of the "can_subs" field in the mutation.

func (*MsgTypeMutation) CanSubsCleared

func (m *MsgTypeMutation) CanSubsCleared() bool

CanSubsCleared returns if the "can_subs" field was cleared in this mutation.

func (*MsgTypeMutation) Category

func (m *MsgTypeMutation) Category() (r string, exists bool)

Category returns the value of the "category" field in the mutation.

func (*MsgTypeMutation) ClearAppID

func (m *MsgTypeMutation) ClearAppID()

ClearAppID clears the value of the "app_id" field.

func (*MsgTypeMutation) ClearCanCustom

func (m *MsgTypeMutation) ClearCanCustom()

ClearCanCustom clears the value of the "can_custom" field.

func (*MsgTypeMutation) ClearCanSubs

func (m *MsgTypeMutation) ClearCanSubs()

ClearCanSubs clears the value of the "can_subs" field.

func (*MsgTypeMutation) ClearComments

func (m *MsgTypeMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*MsgTypeMutation) ClearEdge

func (m *MsgTypeMutation) 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 (*MsgTypeMutation) ClearEvents

func (m *MsgTypeMutation) ClearEvents()

ClearEvents clears the "events" edge to the MsgEvent entity.

func (*MsgTypeMutation) ClearField

func (m *MsgTypeMutation) 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 (*MsgTypeMutation) ClearStatus

func (m *MsgTypeMutation) ClearStatus()

ClearStatus clears the value of the "status" field.

func (*MsgTypeMutation) ClearSubscribers

func (m *MsgTypeMutation) ClearSubscribers()

ClearSubscribers clears the "subscribers" edge to the MsgSubscriber entity.

func (*MsgTypeMutation) ClearUpdatedAt

func (m *MsgTypeMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgTypeMutation) ClearUpdatedBy

func (m *MsgTypeMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgTypeMutation) ClearedEdges

func (m *MsgTypeMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*MsgTypeMutation) ClearedFields

func (m *MsgTypeMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (MsgTypeMutation) Client

func (m MsgTypeMutation) 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 (*MsgTypeMutation) Comments

func (m *MsgTypeMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*MsgTypeMutation) CommentsCleared

func (m *MsgTypeMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*MsgTypeMutation) CreatedAt

func (m *MsgTypeMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*MsgTypeMutation) CreatedBy

func (m *MsgTypeMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*MsgTypeMutation) EdgeCleared

func (m *MsgTypeMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*MsgTypeMutation) EventsCleared

func (m *MsgTypeMutation) EventsCleared() bool

EventsCleared reports if the "events" edge to the MsgEvent entity was cleared.

func (*MsgTypeMutation) EventsIDs

func (m *MsgTypeMutation) EventsIDs() (ids []int)

EventsIDs returns the "events" edge IDs in the mutation.

func (*MsgTypeMutation) Field

func (m *MsgTypeMutation) 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 (*MsgTypeMutation) FieldCleared

func (m *MsgTypeMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*MsgTypeMutation) Fields

func (m *MsgTypeMutation) 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 (*MsgTypeMutation) ID

func (m *MsgTypeMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*MsgTypeMutation) IDs

func (m *MsgTypeMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*MsgTypeMutation) Name

func (m *MsgTypeMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*MsgTypeMutation) OldAppID

func (m *MsgTypeMutation) OldAppID(ctx context.Context) (v int, err error)

OldAppID returns the old "app_id" field's value of the MsgType entity. If the MsgType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTypeMutation) OldCanCustom

func (m *MsgTypeMutation) OldCanCustom(ctx context.Context) (v bool, err error)

OldCanCustom returns the old "can_custom" field's value of the MsgType entity. If the MsgType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTypeMutation) OldCanSubs

func (m *MsgTypeMutation) OldCanSubs(ctx context.Context) (v bool, err error)

OldCanSubs returns the old "can_subs" field's value of the MsgType entity. If the MsgType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTypeMutation) OldCategory

func (m *MsgTypeMutation) OldCategory(ctx context.Context) (v string, err error)

OldCategory returns the old "category" field's value of the MsgType entity. If the MsgType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTypeMutation) OldComments

func (m *MsgTypeMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the MsgType entity. If the MsgType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTypeMutation) OldCreatedAt

func (m *MsgTypeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the MsgType entity. If the MsgType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTypeMutation) OldCreatedBy

func (m *MsgTypeMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the MsgType entity. If the MsgType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTypeMutation) OldField

func (m *MsgTypeMutation) 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 (*MsgTypeMutation) OldName

func (m *MsgTypeMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the MsgType entity. If the MsgType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTypeMutation) OldStatus

func (m *MsgTypeMutation) OldStatus(ctx context.Context) (v typex.SimpleStatus, err error)

OldStatus returns the old "status" field's value of the MsgType entity. If the MsgType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTypeMutation) OldUpdatedAt

func (m *MsgTypeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the MsgType entity. If the MsgType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTypeMutation) OldUpdatedBy

func (m *MsgTypeMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the MsgType entity. If the MsgType object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*MsgTypeMutation) Op

func (m *MsgTypeMutation) Op() Op

Op returns the operation name.

func (*MsgTypeMutation) RemoveEventIDs

func (m *MsgTypeMutation) RemoveEventIDs(ids ...int)

RemoveEventIDs removes the "events" edge to the MsgEvent entity by IDs.

func (*MsgTypeMutation) RemoveSubscriberIDs

func (m *MsgTypeMutation) RemoveSubscriberIDs(ids ...int)

RemoveSubscriberIDs removes the "subscribers" edge to the MsgSubscriber entity by IDs.

func (*MsgTypeMutation) RemovedEdges

func (m *MsgTypeMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*MsgTypeMutation) RemovedEventsIDs

func (m *MsgTypeMutation) RemovedEventsIDs() (ids []int)

RemovedEvents returns the removed IDs of the "events" edge to the MsgEvent entity.

func (*MsgTypeMutation) RemovedIDs

func (m *MsgTypeMutation) 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 (*MsgTypeMutation) RemovedSubscribersIDs

func (m *MsgTypeMutation) RemovedSubscribersIDs() (ids []int)

RemovedSubscribers returns the removed IDs of the "subscribers" edge to the MsgSubscriber entity.

func (*MsgTypeMutation) ResetAppID

func (m *MsgTypeMutation) ResetAppID()

ResetAppID resets all changes to the "app_id" field.

func (*MsgTypeMutation) ResetCanCustom

func (m *MsgTypeMutation) ResetCanCustom()

ResetCanCustom resets all changes to the "can_custom" field.

func (*MsgTypeMutation) ResetCanSubs

func (m *MsgTypeMutation) ResetCanSubs()

ResetCanSubs resets all changes to the "can_subs" field.

func (*MsgTypeMutation) ResetCategory

func (m *MsgTypeMutation) ResetCategory()

ResetCategory resets all changes to the "category" field.

func (*MsgTypeMutation) ResetComments

func (m *MsgTypeMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*MsgTypeMutation) ResetCreatedAt

func (m *MsgTypeMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*MsgTypeMutation) ResetCreatedBy

func (m *MsgTypeMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*MsgTypeMutation) ResetEdge

func (m *MsgTypeMutation) 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 (*MsgTypeMutation) ResetEvents

func (m *MsgTypeMutation) ResetEvents()

ResetEvents resets all changes to the "events" edge.

func (*MsgTypeMutation) ResetField

func (m *MsgTypeMutation) 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 (*MsgTypeMutation) ResetName

func (m *MsgTypeMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*MsgTypeMutation) ResetStatus

func (m *MsgTypeMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*MsgTypeMutation) ResetSubscribers

func (m *MsgTypeMutation) ResetSubscribers()

ResetSubscribers resets all changes to the "subscribers" edge.

func (*MsgTypeMutation) ResetUpdatedAt

func (m *MsgTypeMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*MsgTypeMutation) ResetUpdatedBy

func (m *MsgTypeMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*MsgTypeMutation) SetAppID

func (m *MsgTypeMutation) SetAppID(i int)

SetAppID sets the "app_id" field.

func (*MsgTypeMutation) SetCanCustom

func (m *MsgTypeMutation) SetCanCustom(b bool)

SetCanCustom sets the "can_custom" field.

func (*MsgTypeMutation) SetCanSubs

func (m *MsgTypeMutation) SetCanSubs(b bool)

SetCanSubs sets the "can_subs" field.

func (*MsgTypeMutation) SetCategory

func (m *MsgTypeMutation) SetCategory(s string)

SetCategory sets the "category" field.

func (*MsgTypeMutation) SetComments

func (m *MsgTypeMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*MsgTypeMutation) SetCreatedAt

func (m *MsgTypeMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*MsgTypeMutation) SetCreatedBy

func (m *MsgTypeMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*MsgTypeMutation) SetField

func (m *MsgTypeMutation) 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 (*MsgTypeMutation) SetID

func (m *MsgTypeMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of MsgType entities.

func (*MsgTypeMutation) SetName

func (m *MsgTypeMutation) SetName(s string)

SetName sets the "name" field.

func (*MsgTypeMutation) SetOp

func (m *MsgTypeMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*MsgTypeMutation) SetStatus

func (m *MsgTypeMutation) SetStatus(ts typex.SimpleStatus)

SetStatus sets the "status" field.

func (*MsgTypeMutation) SetUpdatedAt

func (m *MsgTypeMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*MsgTypeMutation) SetUpdatedBy

func (m *MsgTypeMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*MsgTypeMutation) Status

func (m *MsgTypeMutation) Status() (r typex.SimpleStatus, exists bool)

Status returns the value of the "status" field in the mutation.

func (*MsgTypeMutation) StatusCleared

func (m *MsgTypeMutation) StatusCleared() bool

StatusCleared returns if the "status" field was cleared in this mutation.

func (*MsgTypeMutation) SubscribersCleared

func (m *MsgTypeMutation) SubscribersCleared() bool

SubscribersCleared reports if the "subscribers" edge to the MsgSubscriber entity was cleared.

func (*MsgTypeMutation) SubscribersIDs

func (m *MsgTypeMutation) SubscribersIDs() (ids []int)

SubscribersIDs returns the "subscribers" edge IDs in the mutation.

func (MsgTypeMutation) Tx

func (m MsgTypeMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*MsgTypeMutation) Type

func (m *MsgTypeMutation) Type() string

Type returns the node type of this mutation (MsgType).

func (*MsgTypeMutation) UpdatedAt

func (m *MsgTypeMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*MsgTypeMutation) UpdatedAtCleared

func (m *MsgTypeMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*MsgTypeMutation) UpdatedBy

func (m *MsgTypeMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*MsgTypeMutation) UpdatedByCleared

func (m *MsgTypeMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*MsgTypeMutation) Where

func (m *MsgTypeMutation) Where(ps ...predicate.MsgType)

Where appends a list predicates to the MsgTypeMutation builder.

func (*MsgTypeMutation) WhereP

func (m *MsgTypeMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the MsgTypeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type MsgTypeOrder

type MsgTypeOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *MsgTypeOrderField `json:"field"`
}

MsgTypeOrder defines the ordering of MsgType.

type MsgTypeOrderField

type MsgTypeOrderField struct {
	// Value extracts the ordering value from the given MsgType.
	Value func(*MsgType) (ent.Value, error)
	// contains filtered or unexported fields
}

MsgTypeOrderField defines the ordering field of MsgType.

func (MsgTypeOrderField) MarshalGQL

func (f MsgTypeOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (MsgTypeOrderField) String

func (f MsgTypeOrderField) String() string

String implement fmt.Stringer interface.

func (*MsgTypeOrderField) UnmarshalGQL

func (f *MsgTypeOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type MsgTypePaginateOption

type MsgTypePaginateOption func(*msgtypePager) error

MsgTypePaginateOption enables pagination customization.

func WithMsgTypeFilter

func WithMsgTypeFilter(filter func(*MsgTypeQuery) (*MsgTypeQuery, error)) MsgTypePaginateOption

WithMsgTypeFilter configures pagination filter.

func WithMsgTypeOrder

func WithMsgTypeOrder(order *MsgTypeOrder) MsgTypePaginateOption

WithMsgTypeOrder configures pagination ordering.

type MsgTypeQuery

type MsgTypeQuery struct {
	// contains filtered or unexported fields
}

MsgTypeQuery is the builder for querying MsgType entities.

func (*MsgTypeQuery) Aggregate

func (mtq *MsgTypeQuery) Aggregate(fns ...AggregateFunc) *MsgTypeSelect

Aggregate returns a MsgTypeSelect configured with the given aggregations.

func (*MsgTypeQuery) All

func (mtq *MsgTypeQuery) All(ctx context.Context) ([]*MsgType, error)

All executes the query and returns a list of MsgTypes.

func (*MsgTypeQuery) AllX

func (mtq *MsgTypeQuery) AllX(ctx context.Context) []*MsgType

AllX is like All, but panics if an error occurs.

func (*MsgTypeQuery) Clone

func (mtq *MsgTypeQuery) Clone() *MsgTypeQuery

Clone returns a duplicate of the MsgTypeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*MsgTypeQuery) CollectFields

func (mt *MsgTypeQuery) CollectFields(ctx context.Context, satisfies ...string) (*MsgTypeQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*MsgTypeQuery) Count

func (mtq *MsgTypeQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*MsgTypeQuery) CountX

func (mtq *MsgTypeQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*MsgTypeQuery) Exist

func (mtq *MsgTypeQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*MsgTypeQuery) ExistX

func (mtq *MsgTypeQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*MsgTypeQuery) First

func (mtq *MsgTypeQuery) First(ctx context.Context) (*MsgType, error)

First returns the first MsgType entity from the query. Returns a *NotFoundError when no MsgType was found.

func (*MsgTypeQuery) FirstID

func (mtq *MsgTypeQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first MsgType ID from the query. Returns a *NotFoundError when no MsgType ID was found.

func (*MsgTypeQuery) FirstIDX

func (mtq *MsgTypeQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*MsgTypeQuery) FirstX

func (mtq *MsgTypeQuery) FirstX(ctx context.Context) *MsgType

FirstX is like First, but panics if an error occurs.

func (*MsgTypeQuery) GroupBy

func (mtq *MsgTypeQuery) GroupBy(field string, fields ...string) *MsgTypeGroupBy

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 {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.MsgType.Query().
	GroupBy(msgtype.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*MsgTypeQuery) IDs

func (mtq *MsgTypeQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of MsgType IDs.

func (*MsgTypeQuery) IDsX

func (mtq *MsgTypeQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*MsgTypeQuery) Limit

func (mtq *MsgTypeQuery) Limit(limit int) *MsgTypeQuery

Limit the number of records to be returned by this query.

func (*MsgTypeQuery) Offset

func (mtq *MsgTypeQuery) Offset(offset int) *MsgTypeQuery

Offset to start from.

func (*MsgTypeQuery) Only

func (mtq *MsgTypeQuery) Only(ctx context.Context) (*MsgType, error)

Only returns a single MsgType entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one MsgType entity is found. Returns a *NotFoundError when no MsgType entities are found.

func (*MsgTypeQuery) OnlyID

func (mtq *MsgTypeQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only MsgType ID in the query. Returns a *NotSingularError when more than one MsgType ID is found. Returns a *NotFoundError when no entities are found.

func (*MsgTypeQuery) OnlyIDX

func (mtq *MsgTypeQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*MsgTypeQuery) OnlyX

func (mtq *MsgTypeQuery) OnlyX(ctx context.Context) *MsgType

OnlyX is like Only, but panics if an error occurs.

func (*MsgTypeQuery) Order

func (mtq *MsgTypeQuery) Order(o ...msgtype.OrderOption) *MsgTypeQuery

Order specifies how the records should be ordered.

func (*MsgTypeQuery) Paginate

func (mt *MsgTypeQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...MsgTypePaginateOption,
) (*MsgTypeConnection, error)

Paginate executes the query and returns a relay based cursor connection to MsgType.

func (*MsgTypeQuery) QueryEvents

func (mtq *MsgTypeQuery) QueryEvents() *MsgEventQuery

QueryEvents chains the current query on the "events" edge.

func (*MsgTypeQuery) QuerySubscribers

func (mtq *MsgTypeQuery) QuerySubscribers() *MsgSubscriberQuery

QuerySubscribers chains the current query on the "subscribers" edge.

func (*MsgTypeQuery) Select

func (mtq *MsgTypeQuery) Select(fields ...string) *MsgTypeSelect

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 {
	CreatedBy int `json:"created_by,omitempty"`
}

client.MsgType.Query().
	Select(msgtype.FieldCreatedBy).
	Scan(ctx, &v)

func (*MsgTypeQuery) Unique

func (mtq *MsgTypeQuery) Unique(unique bool) *MsgTypeQuery

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 (*MsgTypeQuery) Where

func (mtq *MsgTypeQuery) Where(ps ...predicate.MsgType) *MsgTypeQuery

Where adds a new predicate for the MsgTypeQuery builder.

func (*MsgTypeQuery) WithEvents

func (mtq *MsgTypeQuery) WithEvents(opts ...func(*MsgEventQuery)) *MsgTypeQuery

WithEvents tells the query-builder to eager-load the nodes that are connected to the "events" edge. The optional arguments are used to configure the query builder of the edge.

func (*MsgTypeQuery) WithNamedEvents

func (mtq *MsgTypeQuery) WithNamedEvents(name string, opts ...func(*MsgEventQuery)) *MsgTypeQuery

WithNamedEvents tells the query-builder to eager-load the nodes that are connected to the "events" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*MsgTypeQuery) WithNamedSubscribers

func (mtq *MsgTypeQuery) WithNamedSubscribers(name string, opts ...func(*MsgSubscriberQuery)) *MsgTypeQuery

WithNamedSubscribers tells the query-builder to eager-load the nodes that are connected to the "subscribers" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*MsgTypeQuery) WithSubscribers

func (mtq *MsgTypeQuery) WithSubscribers(opts ...func(*MsgSubscriberQuery)) *MsgTypeQuery

WithSubscribers tells the query-builder to eager-load the nodes that are connected to the "subscribers" edge. The optional arguments are used to configure the query builder of the edge.

type MsgTypeSelect

type MsgTypeSelect struct {
	*MsgTypeQuery
	// contains filtered or unexported fields
}

MsgTypeSelect is the builder for selecting fields of MsgType entities.

func (*MsgTypeSelect) Aggregate

func (mts *MsgTypeSelect) Aggregate(fns ...AggregateFunc) *MsgTypeSelect

Aggregate adds the given aggregation functions to the selector query.

func (*MsgTypeSelect) Bool

func (s *MsgTypeSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*MsgTypeSelect) BoolX

func (s *MsgTypeSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*MsgTypeSelect) Bools

func (s *MsgTypeSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*MsgTypeSelect) BoolsX

func (s *MsgTypeSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*MsgTypeSelect) Float64

func (s *MsgTypeSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*MsgTypeSelect) Float64X

func (s *MsgTypeSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*MsgTypeSelect) Float64s

func (s *MsgTypeSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*MsgTypeSelect) Float64sX

func (s *MsgTypeSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*MsgTypeSelect) Int

func (s *MsgTypeSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*MsgTypeSelect) IntX

func (s *MsgTypeSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*MsgTypeSelect) Ints

func (s *MsgTypeSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*MsgTypeSelect) IntsX

func (s *MsgTypeSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*MsgTypeSelect) Scan

func (mts *MsgTypeSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*MsgTypeSelect) ScanX

func (s *MsgTypeSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*MsgTypeSelect) String

func (s *MsgTypeSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*MsgTypeSelect) StringX

func (s *MsgTypeSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*MsgTypeSelect) Strings

func (s *MsgTypeSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*MsgTypeSelect) StringsX

func (s *MsgTypeSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type MsgTypeUpdate

type MsgTypeUpdate struct {
	// contains filtered or unexported fields
}

MsgTypeUpdate is the builder for updating MsgType entities.

func (*MsgTypeUpdate) AddAppID

func (mtu *MsgTypeUpdate) AddAppID(i int) *MsgTypeUpdate

AddAppID adds i to the "app_id" field.

func (*MsgTypeUpdate) AddEventIDs

func (mtu *MsgTypeUpdate) AddEventIDs(ids ...int) *MsgTypeUpdate

AddEventIDs adds the "events" edge to the MsgEvent entity by IDs.

func (*MsgTypeUpdate) AddEvents

func (mtu *MsgTypeUpdate) AddEvents(m ...*MsgEvent) *MsgTypeUpdate

AddEvents adds the "events" edges to the MsgEvent entity.

func (*MsgTypeUpdate) AddSubscriberIDs

func (mtu *MsgTypeUpdate) AddSubscriberIDs(ids ...int) *MsgTypeUpdate

AddSubscriberIDs adds the "subscribers" edge to the MsgSubscriber entity by IDs.

func (*MsgTypeUpdate) AddSubscribers

func (mtu *MsgTypeUpdate) AddSubscribers(m ...*MsgSubscriber) *MsgTypeUpdate

AddSubscribers adds the "subscribers" edges to the MsgSubscriber entity.

func (*MsgTypeUpdate) AddUpdatedBy

func (mtu *MsgTypeUpdate) AddUpdatedBy(i int) *MsgTypeUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgTypeUpdate) ClearAppID

func (mtu *MsgTypeUpdate) ClearAppID() *MsgTypeUpdate

ClearAppID clears the value of the "app_id" field.

func (*MsgTypeUpdate) ClearCanCustom

func (mtu *MsgTypeUpdate) ClearCanCustom() *MsgTypeUpdate

ClearCanCustom clears the value of the "can_custom" field.

func (*MsgTypeUpdate) ClearCanSubs

func (mtu *MsgTypeUpdate) ClearCanSubs() *MsgTypeUpdate

ClearCanSubs clears the value of the "can_subs" field.

func (*MsgTypeUpdate) ClearComments

func (mtu *MsgTypeUpdate) ClearComments() *MsgTypeUpdate

ClearComments clears the value of the "comments" field.

func (*MsgTypeUpdate) ClearEvents

func (mtu *MsgTypeUpdate) ClearEvents() *MsgTypeUpdate

ClearEvents clears all "events" edges to the MsgEvent entity.

func (*MsgTypeUpdate) ClearStatus

func (mtu *MsgTypeUpdate) ClearStatus() *MsgTypeUpdate

ClearStatus clears the value of the "status" field.

func (*MsgTypeUpdate) ClearSubscribers

func (mtu *MsgTypeUpdate) ClearSubscribers() *MsgTypeUpdate

ClearSubscribers clears all "subscribers" edges to the MsgSubscriber entity.

func (*MsgTypeUpdate) ClearUpdatedAt

func (mtu *MsgTypeUpdate) ClearUpdatedAt() *MsgTypeUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgTypeUpdate) ClearUpdatedBy

func (mtu *MsgTypeUpdate) ClearUpdatedBy() *MsgTypeUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgTypeUpdate) Exec

func (mtu *MsgTypeUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgTypeUpdate) ExecX

func (mtu *MsgTypeUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTypeUpdate) Mutation

func (mtu *MsgTypeUpdate) Mutation() *MsgTypeMutation

Mutation returns the MsgTypeMutation object of the builder.

func (*MsgTypeUpdate) RemoveEventIDs

func (mtu *MsgTypeUpdate) RemoveEventIDs(ids ...int) *MsgTypeUpdate

RemoveEventIDs removes the "events" edge to MsgEvent entities by IDs.

func (*MsgTypeUpdate) RemoveEvents

func (mtu *MsgTypeUpdate) RemoveEvents(m ...*MsgEvent) *MsgTypeUpdate

RemoveEvents removes "events" edges to MsgEvent entities.

func (*MsgTypeUpdate) RemoveSubscriberIDs

func (mtu *MsgTypeUpdate) RemoveSubscriberIDs(ids ...int) *MsgTypeUpdate

RemoveSubscriberIDs removes the "subscribers" edge to MsgSubscriber entities by IDs.

func (*MsgTypeUpdate) RemoveSubscribers

func (mtu *MsgTypeUpdate) RemoveSubscribers(m ...*MsgSubscriber) *MsgTypeUpdate

RemoveSubscribers removes "subscribers" edges to MsgSubscriber entities.

func (*MsgTypeUpdate) Save

func (mtu *MsgTypeUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*MsgTypeUpdate) SaveX

func (mtu *MsgTypeUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*MsgTypeUpdate) SetAppID

func (mtu *MsgTypeUpdate) SetAppID(i int) *MsgTypeUpdate

SetAppID sets the "app_id" field.

func (*MsgTypeUpdate) SetCanCustom

func (mtu *MsgTypeUpdate) SetCanCustom(b bool) *MsgTypeUpdate

SetCanCustom sets the "can_custom" field.

func (*MsgTypeUpdate) SetCanSubs

func (mtu *MsgTypeUpdate) SetCanSubs(b bool) *MsgTypeUpdate

SetCanSubs sets the "can_subs" field.

func (*MsgTypeUpdate) SetCategory

func (mtu *MsgTypeUpdate) SetCategory(s string) *MsgTypeUpdate

SetCategory sets the "category" field.

func (*MsgTypeUpdate) SetComments

func (mtu *MsgTypeUpdate) SetComments(s string) *MsgTypeUpdate

SetComments sets the "comments" field.

func (*MsgTypeUpdate) SetInput

SetInput applies the change-set in the UpdateMsgTypeInput on the MsgTypeUpdate builder.

func (*MsgTypeUpdate) SetName

func (mtu *MsgTypeUpdate) SetName(s string) *MsgTypeUpdate

SetName sets the "name" field.

func (*MsgTypeUpdate) SetNillableAppID

func (mtu *MsgTypeUpdate) SetNillableAppID(i *int) *MsgTypeUpdate

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*MsgTypeUpdate) SetNillableCanCustom

func (mtu *MsgTypeUpdate) SetNillableCanCustom(b *bool) *MsgTypeUpdate

SetNillableCanCustom sets the "can_custom" field if the given value is not nil.

func (*MsgTypeUpdate) SetNillableCanSubs

func (mtu *MsgTypeUpdate) SetNillableCanSubs(b *bool) *MsgTypeUpdate

SetNillableCanSubs sets the "can_subs" field if the given value is not nil.

func (*MsgTypeUpdate) SetNillableComments

func (mtu *MsgTypeUpdate) SetNillableComments(s *string) *MsgTypeUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*MsgTypeUpdate) SetNillableStatus

func (mtu *MsgTypeUpdate) SetNillableStatus(ts *typex.SimpleStatus) *MsgTypeUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*MsgTypeUpdate) SetNillableUpdatedAt

func (mtu *MsgTypeUpdate) SetNillableUpdatedAt(t *time.Time) *MsgTypeUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MsgTypeUpdate) SetNillableUpdatedBy

func (mtu *MsgTypeUpdate) SetNillableUpdatedBy(i *int) *MsgTypeUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgTypeUpdate) SetStatus

func (mtu *MsgTypeUpdate) SetStatus(ts typex.SimpleStatus) *MsgTypeUpdate

SetStatus sets the "status" field.

func (*MsgTypeUpdate) SetUpdatedAt

func (mtu *MsgTypeUpdate) SetUpdatedAt(t time.Time) *MsgTypeUpdate

SetUpdatedAt sets the "updated_at" field.

func (*MsgTypeUpdate) SetUpdatedBy

func (mtu *MsgTypeUpdate) SetUpdatedBy(i int) *MsgTypeUpdate

SetUpdatedBy sets the "updated_by" field.

func (*MsgTypeUpdate) Where

func (mtu *MsgTypeUpdate) Where(ps ...predicate.MsgType) *MsgTypeUpdate

Where appends a list predicates to the MsgTypeUpdate builder.

type MsgTypeUpdateOne

type MsgTypeUpdateOne struct {
	// contains filtered or unexported fields
}

MsgTypeUpdateOne is the builder for updating a single MsgType entity.

func (*MsgTypeUpdateOne) AddAppID

func (mtuo *MsgTypeUpdateOne) AddAppID(i int) *MsgTypeUpdateOne

AddAppID adds i to the "app_id" field.

func (*MsgTypeUpdateOne) AddEventIDs

func (mtuo *MsgTypeUpdateOne) AddEventIDs(ids ...int) *MsgTypeUpdateOne

AddEventIDs adds the "events" edge to the MsgEvent entity by IDs.

func (*MsgTypeUpdateOne) AddEvents

func (mtuo *MsgTypeUpdateOne) AddEvents(m ...*MsgEvent) *MsgTypeUpdateOne

AddEvents adds the "events" edges to the MsgEvent entity.

func (*MsgTypeUpdateOne) AddSubscriberIDs

func (mtuo *MsgTypeUpdateOne) AddSubscriberIDs(ids ...int) *MsgTypeUpdateOne

AddSubscriberIDs adds the "subscribers" edge to the MsgSubscriber entity by IDs.

func (*MsgTypeUpdateOne) AddSubscribers

func (mtuo *MsgTypeUpdateOne) AddSubscribers(m ...*MsgSubscriber) *MsgTypeUpdateOne

AddSubscribers adds the "subscribers" edges to the MsgSubscriber entity.

func (*MsgTypeUpdateOne) AddUpdatedBy

func (mtuo *MsgTypeUpdateOne) AddUpdatedBy(i int) *MsgTypeUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*MsgTypeUpdateOne) ClearAppID

func (mtuo *MsgTypeUpdateOne) ClearAppID() *MsgTypeUpdateOne

ClearAppID clears the value of the "app_id" field.

func (*MsgTypeUpdateOne) ClearCanCustom

func (mtuo *MsgTypeUpdateOne) ClearCanCustom() *MsgTypeUpdateOne

ClearCanCustom clears the value of the "can_custom" field.

func (*MsgTypeUpdateOne) ClearCanSubs

func (mtuo *MsgTypeUpdateOne) ClearCanSubs() *MsgTypeUpdateOne

ClearCanSubs clears the value of the "can_subs" field.

func (*MsgTypeUpdateOne) ClearComments

func (mtuo *MsgTypeUpdateOne) ClearComments() *MsgTypeUpdateOne

ClearComments clears the value of the "comments" field.

func (*MsgTypeUpdateOne) ClearEvents

func (mtuo *MsgTypeUpdateOne) ClearEvents() *MsgTypeUpdateOne

ClearEvents clears all "events" edges to the MsgEvent entity.

func (*MsgTypeUpdateOne) ClearStatus

func (mtuo *MsgTypeUpdateOne) ClearStatus() *MsgTypeUpdateOne

ClearStatus clears the value of the "status" field.

func (*MsgTypeUpdateOne) ClearSubscribers

func (mtuo *MsgTypeUpdateOne) ClearSubscribers() *MsgTypeUpdateOne

ClearSubscribers clears all "subscribers" edges to the MsgSubscriber entity.

func (*MsgTypeUpdateOne) ClearUpdatedAt

func (mtuo *MsgTypeUpdateOne) ClearUpdatedAt() *MsgTypeUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgTypeUpdateOne) ClearUpdatedBy

func (mtuo *MsgTypeUpdateOne) ClearUpdatedBy() *MsgTypeUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgTypeUpdateOne) Exec

func (mtuo *MsgTypeUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*MsgTypeUpdateOne) ExecX

func (mtuo *MsgTypeUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTypeUpdateOne) Mutation

func (mtuo *MsgTypeUpdateOne) Mutation() *MsgTypeMutation

Mutation returns the MsgTypeMutation object of the builder.

func (*MsgTypeUpdateOne) RemoveEventIDs

func (mtuo *MsgTypeUpdateOne) RemoveEventIDs(ids ...int) *MsgTypeUpdateOne

RemoveEventIDs removes the "events" edge to MsgEvent entities by IDs.

func (*MsgTypeUpdateOne) RemoveEvents

func (mtuo *MsgTypeUpdateOne) RemoveEvents(m ...*MsgEvent) *MsgTypeUpdateOne

RemoveEvents removes "events" edges to MsgEvent entities.

func (*MsgTypeUpdateOne) RemoveSubscriberIDs

func (mtuo *MsgTypeUpdateOne) RemoveSubscriberIDs(ids ...int) *MsgTypeUpdateOne

RemoveSubscriberIDs removes the "subscribers" edge to MsgSubscriber entities by IDs.

func (*MsgTypeUpdateOne) RemoveSubscribers

func (mtuo *MsgTypeUpdateOne) RemoveSubscribers(m ...*MsgSubscriber) *MsgTypeUpdateOne

RemoveSubscribers removes "subscribers" edges to MsgSubscriber entities.

func (*MsgTypeUpdateOne) Save

func (mtuo *MsgTypeUpdateOne) Save(ctx context.Context) (*MsgType, error)

Save executes the query and returns the updated MsgType entity.

func (*MsgTypeUpdateOne) SaveX

func (mtuo *MsgTypeUpdateOne) SaveX(ctx context.Context) *MsgType

SaveX is like Save, but panics if an error occurs.

func (*MsgTypeUpdateOne) Select

func (mtuo *MsgTypeUpdateOne) Select(field string, fields ...string) *MsgTypeUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*MsgTypeUpdateOne) SetAppID

func (mtuo *MsgTypeUpdateOne) SetAppID(i int) *MsgTypeUpdateOne

SetAppID sets the "app_id" field.

func (*MsgTypeUpdateOne) SetCanCustom

func (mtuo *MsgTypeUpdateOne) SetCanCustom(b bool) *MsgTypeUpdateOne

SetCanCustom sets the "can_custom" field.

func (*MsgTypeUpdateOne) SetCanSubs

func (mtuo *MsgTypeUpdateOne) SetCanSubs(b bool) *MsgTypeUpdateOne

SetCanSubs sets the "can_subs" field.

func (*MsgTypeUpdateOne) SetCategory

func (mtuo *MsgTypeUpdateOne) SetCategory(s string) *MsgTypeUpdateOne

SetCategory sets the "category" field.

func (*MsgTypeUpdateOne) SetComments

func (mtuo *MsgTypeUpdateOne) SetComments(s string) *MsgTypeUpdateOne

SetComments sets the "comments" field.

func (*MsgTypeUpdateOne) SetInput

SetInput applies the change-set in the UpdateMsgTypeInput on the MsgTypeUpdateOne builder.

func (*MsgTypeUpdateOne) SetName

func (mtuo *MsgTypeUpdateOne) SetName(s string) *MsgTypeUpdateOne

SetName sets the "name" field.

func (*MsgTypeUpdateOne) SetNillableAppID

func (mtuo *MsgTypeUpdateOne) SetNillableAppID(i *int) *MsgTypeUpdateOne

SetNillableAppID sets the "app_id" field if the given value is not nil.

func (*MsgTypeUpdateOne) SetNillableCanCustom

func (mtuo *MsgTypeUpdateOne) SetNillableCanCustom(b *bool) *MsgTypeUpdateOne

SetNillableCanCustom sets the "can_custom" field if the given value is not nil.

func (*MsgTypeUpdateOne) SetNillableCanSubs

func (mtuo *MsgTypeUpdateOne) SetNillableCanSubs(b *bool) *MsgTypeUpdateOne

SetNillableCanSubs sets the "can_subs" field if the given value is not nil.

func (*MsgTypeUpdateOne) SetNillableComments

func (mtuo *MsgTypeUpdateOne) SetNillableComments(s *string) *MsgTypeUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*MsgTypeUpdateOne) SetNillableStatus

func (mtuo *MsgTypeUpdateOne) SetNillableStatus(ts *typex.SimpleStatus) *MsgTypeUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*MsgTypeUpdateOne) SetNillableUpdatedAt

func (mtuo *MsgTypeUpdateOne) SetNillableUpdatedAt(t *time.Time) *MsgTypeUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*MsgTypeUpdateOne) SetNillableUpdatedBy

func (mtuo *MsgTypeUpdateOne) SetNillableUpdatedBy(i *int) *MsgTypeUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*MsgTypeUpdateOne) SetStatus

func (mtuo *MsgTypeUpdateOne) SetStatus(ts typex.SimpleStatus) *MsgTypeUpdateOne

SetStatus sets the "status" field.

func (*MsgTypeUpdateOne) SetUpdatedAt

func (mtuo *MsgTypeUpdateOne) SetUpdatedAt(t time.Time) *MsgTypeUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*MsgTypeUpdateOne) SetUpdatedBy

func (mtuo *MsgTypeUpdateOne) SetUpdatedBy(i int) *MsgTypeUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*MsgTypeUpdateOne) Where

func (mtuo *MsgTypeUpdateOne) Where(ps ...predicate.MsgType) *MsgTypeUpdateOne

Where appends a list predicates to the MsgTypeUpdate builder.

type MsgTypeUpsert

type MsgTypeUpsert struct {
	*sql.UpdateSet
}

MsgTypeUpsert is the "OnConflict" setter.

func (*MsgTypeUpsert) AddAppID

func (u *MsgTypeUpsert) AddAppID(v int) *MsgTypeUpsert

AddAppID adds v to the "app_id" field.

func (*MsgTypeUpsert) AddUpdatedBy

func (u *MsgTypeUpsert) AddUpdatedBy(v int) *MsgTypeUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgTypeUpsert) ClearAppID

func (u *MsgTypeUpsert) ClearAppID() *MsgTypeUpsert

ClearAppID clears the value of the "app_id" field.

func (*MsgTypeUpsert) ClearCanCustom

func (u *MsgTypeUpsert) ClearCanCustom() *MsgTypeUpsert

ClearCanCustom clears the value of the "can_custom" field.

func (*MsgTypeUpsert) ClearCanSubs

func (u *MsgTypeUpsert) ClearCanSubs() *MsgTypeUpsert

ClearCanSubs clears the value of the "can_subs" field.

func (*MsgTypeUpsert) ClearComments

func (u *MsgTypeUpsert) ClearComments() *MsgTypeUpsert

ClearComments clears the value of the "comments" field.

func (*MsgTypeUpsert) ClearStatus

func (u *MsgTypeUpsert) ClearStatus() *MsgTypeUpsert

ClearStatus clears the value of the "status" field.

func (*MsgTypeUpsert) ClearUpdatedAt

func (u *MsgTypeUpsert) ClearUpdatedAt() *MsgTypeUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgTypeUpsert) ClearUpdatedBy

func (u *MsgTypeUpsert) ClearUpdatedBy() *MsgTypeUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgTypeUpsert) SetAppID

func (u *MsgTypeUpsert) SetAppID(v int) *MsgTypeUpsert

SetAppID sets the "app_id" field.

func (*MsgTypeUpsert) SetCanCustom

func (u *MsgTypeUpsert) SetCanCustom(v bool) *MsgTypeUpsert

SetCanCustom sets the "can_custom" field.

func (*MsgTypeUpsert) SetCanSubs

func (u *MsgTypeUpsert) SetCanSubs(v bool) *MsgTypeUpsert

SetCanSubs sets the "can_subs" field.

func (*MsgTypeUpsert) SetCategory

func (u *MsgTypeUpsert) SetCategory(v string) *MsgTypeUpsert

SetCategory sets the "category" field.

func (*MsgTypeUpsert) SetComments

func (u *MsgTypeUpsert) SetComments(v string) *MsgTypeUpsert

SetComments sets the "comments" field.

func (*MsgTypeUpsert) SetName

func (u *MsgTypeUpsert) SetName(v string) *MsgTypeUpsert

SetName sets the "name" field.

func (*MsgTypeUpsert) SetStatus

func (u *MsgTypeUpsert) SetStatus(v typex.SimpleStatus) *MsgTypeUpsert

SetStatus sets the "status" field.

func (*MsgTypeUpsert) SetUpdatedAt

func (u *MsgTypeUpsert) SetUpdatedAt(v time.Time) *MsgTypeUpsert

SetUpdatedAt sets the "updated_at" field.

func (*MsgTypeUpsert) SetUpdatedBy

func (u *MsgTypeUpsert) SetUpdatedBy(v int) *MsgTypeUpsert

SetUpdatedBy sets the "updated_by" field.

func (*MsgTypeUpsert) UpdateAppID

func (u *MsgTypeUpsert) UpdateAppID() *MsgTypeUpsert

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*MsgTypeUpsert) UpdateCanCustom

func (u *MsgTypeUpsert) UpdateCanCustom() *MsgTypeUpsert

UpdateCanCustom sets the "can_custom" field to the value that was provided on create.

func (*MsgTypeUpsert) UpdateCanSubs

func (u *MsgTypeUpsert) UpdateCanSubs() *MsgTypeUpsert

UpdateCanSubs sets the "can_subs" field to the value that was provided on create.

func (*MsgTypeUpsert) UpdateCategory

func (u *MsgTypeUpsert) UpdateCategory() *MsgTypeUpsert

UpdateCategory sets the "category" field to the value that was provided on create.

func (*MsgTypeUpsert) UpdateComments

func (u *MsgTypeUpsert) UpdateComments() *MsgTypeUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*MsgTypeUpsert) UpdateName

func (u *MsgTypeUpsert) UpdateName() *MsgTypeUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*MsgTypeUpsert) UpdateStatus

func (u *MsgTypeUpsert) UpdateStatus() *MsgTypeUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*MsgTypeUpsert) UpdateUpdatedAt

func (u *MsgTypeUpsert) UpdateUpdatedAt() *MsgTypeUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgTypeUpsert) UpdateUpdatedBy

func (u *MsgTypeUpsert) UpdateUpdatedBy() *MsgTypeUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgTypeUpsertBulk

type MsgTypeUpsertBulk struct {
	// contains filtered or unexported fields
}

MsgTypeUpsertBulk is the builder for "upsert"-ing a bulk of MsgType nodes.

func (*MsgTypeUpsertBulk) AddAppID

func (u *MsgTypeUpsertBulk) AddAppID(v int) *MsgTypeUpsertBulk

AddAppID adds v to the "app_id" field.

func (*MsgTypeUpsertBulk) AddUpdatedBy

func (u *MsgTypeUpsertBulk) AddUpdatedBy(v int) *MsgTypeUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgTypeUpsertBulk) ClearAppID

func (u *MsgTypeUpsertBulk) ClearAppID() *MsgTypeUpsertBulk

ClearAppID clears the value of the "app_id" field.

func (*MsgTypeUpsertBulk) ClearCanCustom

func (u *MsgTypeUpsertBulk) ClearCanCustom() *MsgTypeUpsertBulk

ClearCanCustom clears the value of the "can_custom" field.

func (*MsgTypeUpsertBulk) ClearCanSubs

func (u *MsgTypeUpsertBulk) ClearCanSubs() *MsgTypeUpsertBulk

ClearCanSubs clears the value of the "can_subs" field.

func (*MsgTypeUpsertBulk) ClearComments

func (u *MsgTypeUpsertBulk) ClearComments() *MsgTypeUpsertBulk

ClearComments clears the value of the "comments" field.

func (*MsgTypeUpsertBulk) ClearStatus

func (u *MsgTypeUpsertBulk) ClearStatus() *MsgTypeUpsertBulk

ClearStatus clears the value of the "status" field.

func (*MsgTypeUpsertBulk) ClearUpdatedAt

func (u *MsgTypeUpsertBulk) ClearUpdatedAt() *MsgTypeUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgTypeUpsertBulk) ClearUpdatedBy

func (u *MsgTypeUpsertBulk) ClearUpdatedBy() *MsgTypeUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgTypeUpsertBulk) DoNothing

func (u *MsgTypeUpsertBulk) DoNothing() *MsgTypeUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgTypeUpsertBulk) Exec

func (u *MsgTypeUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgTypeUpsertBulk) ExecX

func (u *MsgTypeUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTypeUpsertBulk) Ignore

func (u *MsgTypeUpsertBulk) Ignore() *MsgTypeUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgType.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*MsgTypeUpsertBulk) SetAppID

func (u *MsgTypeUpsertBulk) SetAppID(v int) *MsgTypeUpsertBulk

SetAppID sets the "app_id" field.

func (*MsgTypeUpsertBulk) SetCanCustom

func (u *MsgTypeUpsertBulk) SetCanCustom(v bool) *MsgTypeUpsertBulk

SetCanCustom sets the "can_custom" field.

func (*MsgTypeUpsertBulk) SetCanSubs

func (u *MsgTypeUpsertBulk) SetCanSubs(v bool) *MsgTypeUpsertBulk

SetCanSubs sets the "can_subs" field.

func (*MsgTypeUpsertBulk) SetCategory

func (u *MsgTypeUpsertBulk) SetCategory(v string) *MsgTypeUpsertBulk

SetCategory sets the "category" field.

func (*MsgTypeUpsertBulk) SetComments

func (u *MsgTypeUpsertBulk) SetComments(v string) *MsgTypeUpsertBulk

SetComments sets the "comments" field.

func (*MsgTypeUpsertBulk) SetName

SetName sets the "name" field.

func (*MsgTypeUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*MsgTypeUpsertBulk) SetUpdatedAt

func (u *MsgTypeUpsertBulk) SetUpdatedAt(v time.Time) *MsgTypeUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*MsgTypeUpsertBulk) SetUpdatedBy

func (u *MsgTypeUpsertBulk) SetUpdatedBy(v int) *MsgTypeUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*MsgTypeUpsertBulk) Update

func (u *MsgTypeUpsertBulk) Update(set func(*MsgTypeUpsert)) *MsgTypeUpsertBulk

Update allows overriding fields `UPDATE` values. See the MsgTypeCreateBulk.OnConflict documentation for more info.

func (*MsgTypeUpsertBulk) UpdateAppID

func (u *MsgTypeUpsertBulk) UpdateAppID() *MsgTypeUpsertBulk

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*MsgTypeUpsertBulk) UpdateCanCustom

func (u *MsgTypeUpsertBulk) UpdateCanCustom() *MsgTypeUpsertBulk

UpdateCanCustom sets the "can_custom" field to the value that was provided on create.

func (*MsgTypeUpsertBulk) UpdateCanSubs

func (u *MsgTypeUpsertBulk) UpdateCanSubs() *MsgTypeUpsertBulk

UpdateCanSubs sets the "can_subs" field to the value that was provided on create.

func (*MsgTypeUpsertBulk) UpdateCategory

func (u *MsgTypeUpsertBulk) UpdateCategory() *MsgTypeUpsertBulk

UpdateCategory sets the "category" field to the value that was provided on create.

func (*MsgTypeUpsertBulk) UpdateComments

func (u *MsgTypeUpsertBulk) UpdateComments() *MsgTypeUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*MsgTypeUpsertBulk) UpdateName

func (u *MsgTypeUpsertBulk) UpdateName() *MsgTypeUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*MsgTypeUpsertBulk) UpdateNewValues

func (u *MsgTypeUpsertBulk) UpdateNewValues() *MsgTypeUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.MsgType.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msgtype.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgTypeUpsertBulk) UpdateStatus

func (u *MsgTypeUpsertBulk) UpdateStatus() *MsgTypeUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*MsgTypeUpsertBulk) UpdateUpdatedAt

func (u *MsgTypeUpsertBulk) UpdateUpdatedAt() *MsgTypeUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgTypeUpsertBulk) UpdateUpdatedBy

func (u *MsgTypeUpsertBulk) UpdateUpdatedBy() *MsgTypeUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgTypeUpsertOne

type MsgTypeUpsertOne struct {
	// contains filtered or unexported fields
}

MsgTypeUpsertOne is the builder for "upsert"-ing

one MsgType node.

func (*MsgTypeUpsertOne) AddAppID

func (u *MsgTypeUpsertOne) AddAppID(v int) *MsgTypeUpsertOne

AddAppID adds v to the "app_id" field.

func (*MsgTypeUpsertOne) AddUpdatedBy

func (u *MsgTypeUpsertOne) AddUpdatedBy(v int) *MsgTypeUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*MsgTypeUpsertOne) ClearAppID

func (u *MsgTypeUpsertOne) ClearAppID() *MsgTypeUpsertOne

ClearAppID clears the value of the "app_id" field.

func (*MsgTypeUpsertOne) ClearCanCustom

func (u *MsgTypeUpsertOne) ClearCanCustom() *MsgTypeUpsertOne

ClearCanCustom clears the value of the "can_custom" field.

func (*MsgTypeUpsertOne) ClearCanSubs

func (u *MsgTypeUpsertOne) ClearCanSubs() *MsgTypeUpsertOne

ClearCanSubs clears the value of the "can_subs" field.

func (*MsgTypeUpsertOne) ClearComments

func (u *MsgTypeUpsertOne) ClearComments() *MsgTypeUpsertOne

ClearComments clears the value of the "comments" field.

func (*MsgTypeUpsertOne) ClearStatus

func (u *MsgTypeUpsertOne) ClearStatus() *MsgTypeUpsertOne

ClearStatus clears the value of the "status" field.

func (*MsgTypeUpsertOne) ClearUpdatedAt

func (u *MsgTypeUpsertOne) ClearUpdatedAt() *MsgTypeUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*MsgTypeUpsertOne) ClearUpdatedBy

func (u *MsgTypeUpsertOne) ClearUpdatedBy() *MsgTypeUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*MsgTypeUpsertOne) DoNothing

func (u *MsgTypeUpsertOne) DoNothing() *MsgTypeUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*MsgTypeUpsertOne) Exec

func (u *MsgTypeUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*MsgTypeUpsertOne) ExecX

func (u *MsgTypeUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*MsgTypeUpsertOne) ID

func (u *MsgTypeUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*MsgTypeUpsertOne) IDX

func (u *MsgTypeUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*MsgTypeUpsertOne) Ignore

func (u *MsgTypeUpsertOne) Ignore() *MsgTypeUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.MsgType.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*MsgTypeUpsertOne) SetAppID

func (u *MsgTypeUpsertOne) SetAppID(v int) *MsgTypeUpsertOne

SetAppID sets the "app_id" field.

func (*MsgTypeUpsertOne) SetCanCustom

func (u *MsgTypeUpsertOne) SetCanCustom(v bool) *MsgTypeUpsertOne

SetCanCustom sets the "can_custom" field.

func (*MsgTypeUpsertOne) SetCanSubs

func (u *MsgTypeUpsertOne) SetCanSubs(v bool) *MsgTypeUpsertOne

SetCanSubs sets the "can_subs" field.

func (*MsgTypeUpsertOne) SetCategory

func (u *MsgTypeUpsertOne) SetCategory(v string) *MsgTypeUpsertOne

SetCategory sets the "category" field.

func (*MsgTypeUpsertOne) SetComments

func (u *MsgTypeUpsertOne) SetComments(v string) *MsgTypeUpsertOne

SetComments sets the "comments" field.

func (*MsgTypeUpsertOne) SetName

func (u *MsgTypeUpsertOne) SetName(v string) *MsgTypeUpsertOne

SetName sets the "name" field.

func (*MsgTypeUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*MsgTypeUpsertOne) SetUpdatedAt

func (u *MsgTypeUpsertOne) SetUpdatedAt(v time.Time) *MsgTypeUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*MsgTypeUpsertOne) SetUpdatedBy

func (u *MsgTypeUpsertOne) SetUpdatedBy(v int) *MsgTypeUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*MsgTypeUpsertOne) Update

func (u *MsgTypeUpsertOne) Update(set func(*MsgTypeUpsert)) *MsgTypeUpsertOne

Update allows overriding fields `UPDATE` values. See the MsgTypeCreate.OnConflict documentation for more info.

func (*MsgTypeUpsertOne) UpdateAppID

func (u *MsgTypeUpsertOne) UpdateAppID() *MsgTypeUpsertOne

UpdateAppID sets the "app_id" field to the value that was provided on create.

func (*MsgTypeUpsertOne) UpdateCanCustom

func (u *MsgTypeUpsertOne) UpdateCanCustom() *MsgTypeUpsertOne

UpdateCanCustom sets the "can_custom" field to the value that was provided on create.

func (*MsgTypeUpsertOne) UpdateCanSubs

func (u *MsgTypeUpsertOne) UpdateCanSubs() *MsgTypeUpsertOne

UpdateCanSubs sets the "can_subs" field to the value that was provided on create.

func (*MsgTypeUpsertOne) UpdateCategory

func (u *MsgTypeUpsertOne) UpdateCategory() *MsgTypeUpsertOne

UpdateCategory sets the "category" field to the value that was provided on create.

func (*MsgTypeUpsertOne) UpdateComments

func (u *MsgTypeUpsertOne) UpdateComments() *MsgTypeUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*MsgTypeUpsertOne) UpdateName

func (u *MsgTypeUpsertOne) UpdateName() *MsgTypeUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*MsgTypeUpsertOne) UpdateNewValues

func (u *MsgTypeUpsertOne) UpdateNewValues() *MsgTypeUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.MsgType.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(msgtype.FieldID)
		}),
	).
	Exec(ctx)

func (*MsgTypeUpsertOne) UpdateStatus

func (u *MsgTypeUpsertOne) UpdateStatus() *MsgTypeUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*MsgTypeUpsertOne) UpdateUpdatedAt

func (u *MsgTypeUpsertOne) UpdateUpdatedAt() *MsgTypeUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*MsgTypeUpsertOne) UpdateUpdatedBy

func (u *MsgTypeUpsertOne) UpdateUpdatedBy() *MsgTypeUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type MsgTypeWhereInput

type MsgTypeWhereInput struct {
	Predicates []predicate.MsgType  `json:"-"`
	Not        *MsgTypeWhereInput   `json:"not,omitempty"`
	Or         []*MsgTypeWhereInput `json:"or,omitempty"`
	And        []*MsgTypeWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`
	CreatedByGT    *int  `json:"createdByGT,omitempty"`
	CreatedByGTE   *int  `json:"createdByGTE,omitempty"`
	CreatedByLT    *int  `json:"createdByLT,omitempty"`
	CreatedByLTE   *int  `json:"createdByLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "app_id" field predicates.
	AppID       *int  `json:"appID,omitempty"`
	AppIDNEQ    *int  `json:"appIDNEQ,omitempty"`
	AppIDIn     []int `json:"appIDIn,omitempty"`
	AppIDNotIn  []int `json:"appIDNotIn,omitempty"`
	AppIDGT     *int  `json:"appIDGT,omitempty"`
	AppIDGTE    *int  `json:"appIDGTE,omitempty"`
	AppIDLT     *int  `json:"appIDLT,omitempty"`
	AppIDLTE    *int  `json:"appIDLTE,omitempty"`
	AppIDIsNil  bool  `json:"appIDIsNil,omitempty"`
	AppIDNotNil bool  `json:"appIDNotNil,omitempty"`

	// "category" field predicates.
	Category             *string  `json:"category,omitempty"`
	CategoryNEQ          *string  `json:"categoryNEQ,omitempty"`
	CategoryIn           []string `json:"categoryIn,omitempty"`
	CategoryNotIn        []string `json:"categoryNotIn,omitempty"`
	CategoryGT           *string  `json:"categoryGT,omitempty"`
	CategoryGTE          *string  `json:"categoryGTE,omitempty"`
	CategoryLT           *string  `json:"categoryLT,omitempty"`
	CategoryLTE          *string  `json:"categoryLTE,omitempty"`
	CategoryContains     *string  `json:"categoryContains,omitempty"`
	CategoryHasPrefix    *string  `json:"categoryHasPrefix,omitempty"`
	CategoryHasSuffix    *string  `json:"categoryHasSuffix,omitempty"`
	CategoryEqualFold    *string  `json:"categoryEqualFold,omitempty"`
	CategoryContainsFold *string  `json:"categoryContainsFold,omitempty"`

	// "name" field predicates.
	Name             *string  `json:"name,omitempty"`
	NameNEQ          *string  `json:"nameNEQ,omitempty"`
	NameIn           []string `json:"nameIn,omitempty"`
	NameNotIn        []string `json:"nameNotIn,omitempty"`
	NameGT           *string  `json:"nameGT,omitempty"`
	NameGTE          *string  `json:"nameGTE,omitempty"`
	NameLT           *string  `json:"nameLT,omitempty"`
	NameLTE          *string  `json:"nameLTE,omitempty"`
	NameContains     *string  `json:"nameContains,omitempty"`
	NameHasPrefix    *string  `json:"nameHasPrefix,omitempty"`
	NameHasSuffix    *string  `json:"nameHasSuffix,omitempty"`
	NameEqualFold    *string  `json:"nameEqualFold,omitempty"`
	NameContainsFold *string  `json:"nameContainsFold,omitempty"`

	// "status" field predicates.
	Status       *typex.SimpleStatus  `json:"status,omitempty"`
	StatusNEQ    *typex.SimpleStatus  `json:"statusNEQ,omitempty"`
	StatusIn     []typex.SimpleStatus `json:"statusIn,omitempty"`
	StatusNotIn  []typex.SimpleStatus `json:"statusNotIn,omitempty"`
	StatusIsNil  bool                 `json:"statusIsNil,omitempty"`
	StatusNotNil bool                 `json:"statusNotNil,omitempty"`

	// "can_subs" field predicates.
	CanSubs       *bool `json:"canSubs,omitempty"`
	CanSubsNEQ    *bool `json:"canSubsNEQ,omitempty"`
	CanSubsIsNil  bool  `json:"canSubsIsNil,omitempty"`
	CanSubsNotNil bool  `json:"canSubsNotNil,omitempty"`

	// "can_custom" field predicates.
	CanCustom       *bool `json:"canCustom,omitempty"`
	CanCustomNEQ    *bool `json:"canCustomNEQ,omitempty"`
	CanCustomIsNil  bool  `json:"canCustomIsNil,omitempty"`
	CanCustomNotNil bool  `json:"canCustomNotNil,omitempty"`

	// "events" edge predicates.
	HasEvents     *bool                 `json:"hasEvents,omitempty"`
	HasEventsWith []*MsgEventWhereInput `json:"hasEventsWith,omitempty"`

	// "subscribers" edge predicates.
	HasSubscribers     *bool                      `json:"hasSubscribers,omitempty"`
	HasSubscribersWith []*MsgSubscriberWhereInput `json:"hasSubscribersWith,omitempty"`
}

MsgTypeWhereInput represents a where input for filtering MsgType queries.

func (*MsgTypeWhereInput) AddPredicates

func (i *MsgTypeWhereInput) AddPredicates(predicates ...predicate.MsgType)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*MsgTypeWhereInput) Filter

Filter applies the MsgTypeWhereInput filter on the MsgTypeQuery builder.

func (*MsgTypeWhereInput) P

P returns a predicate for filtering msgtypes. An error is returned if the input is empty or invalid.

type MsgTypes

type MsgTypes []*MsgType

MsgTypes is a parsable slice of MsgType.

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 Nlog

type Nlog struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID int `json:"tenant_id,omitempty"`
	// 分组键
	GroupKey string `json:"group_key,omitempty"`
	// 接收组名称
	Receiver string `json:"receiver,omitempty"`
	// 支持的消息模式:站内信,app推送,邮件,短信,微信等
	ReceiverType profile.ReceiverType `json:"receiver_type,omitempty"`
	// 通道的索引位置
	Idx int `json:"idx,omitempty"`
	// 发送时间
	SendAt time.Time `json:"send_at,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"`
	// 过期时间
	ExpiresAt time.Time `json:"expires_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the NlogQuery when eager-loading is set.
	Edges NlogEdges `json:"edges"`
	// contains filtered or unexported fields
}

Nlog is the model entity for the Nlog schema.

func (*Nlog) Alerts

func (n *Nlog) Alerts(ctx context.Context) (result []*MsgAlert, err error)

func (*Nlog) GlobalID

func (n *Nlog) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given Nlog node.

func (*Nlog) IsNode

func (*Nlog) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Nlog) NamedAlerts

func (n *Nlog) NamedAlerts(name string) ([]*MsgAlert, error)

NamedAlerts returns the Alerts named value or an error if the edge was not loaded in eager-loading with this name.

func (*Nlog) NamedNlogAlert

func (n *Nlog) NamedNlogAlert(name string) ([]*NlogAlert, error)

NamedNlogAlert returns the NlogAlert named value or an error if the edge was not loaded in eager-loading with this name.

func (*Nlog) NlogAlert

func (n *Nlog) NlogAlert(ctx context.Context) (result []*NlogAlert, err error)

func (*Nlog) QueryAlerts

func (n *Nlog) QueryAlerts() *MsgAlertQuery

QueryAlerts queries the "alerts" edge of the Nlog entity.

func (*Nlog) QueryNlogAlert

func (n *Nlog) QueryNlogAlert() *NlogAlertQuery

QueryNlogAlert queries the "nlog_alert" edge of the Nlog entity.

func (*Nlog) String

func (n *Nlog) String() string

String implements the fmt.Stringer.

func (*Nlog) ToEdge

func (n *Nlog) ToEdge(order *NlogOrder) *NlogEdge

ToEdge converts Nlog into NlogEdge.

func (*Nlog) Unwrap

func (n *Nlog) Unwrap() *Nlog

Unwrap unwraps the Nlog 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 (*Nlog) Update

func (n *Nlog) Update() *NlogUpdateOne

Update returns a builder for updating this Nlog. Note that you need to call Nlog.Unwrap() before calling this method if this Nlog was returned from a transaction, and the transaction was committed or rolled back.

func (*Nlog) Value

func (n *Nlog) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Nlog. This includes values selected through modifiers, order, etc.

type NlogAlert

type NlogAlert struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// nlog id
	NlogID int `json:"nlog_id,omitempty"`
	// alert id
	AlertID int `json:"alert_id,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the NlogAlertQuery when eager-loading is set.
	Edges NlogAlertEdges `json:"edges"`
	// contains filtered or unexported fields
}

NlogAlert is the model entity for the NlogAlert schema.

func (*NlogAlert) Alert

func (na *NlogAlert) Alert(ctx context.Context) (*MsgAlert, error)

func (*NlogAlert) GlobalID

func (na *NlogAlert) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given NlogAlert node.

func (*NlogAlert) IsNode

func (*NlogAlert) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*NlogAlert) Nlog

func (na *NlogAlert) Nlog(ctx context.Context) (*Nlog, error)

func (*NlogAlert) QueryAlert

func (na *NlogAlert) QueryAlert() *MsgAlertQuery

QueryAlert queries the "alert" edge of the NlogAlert entity.

func (*NlogAlert) QueryNlog

func (na *NlogAlert) QueryNlog() *NlogQuery

QueryNlog queries the "nlog" edge of the NlogAlert entity.

func (*NlogAlert) String

func (na *NlogAlert) String() string

String implements the fmt.Stringer.

func (*NlogAlert) ToEdge

func (na *NlogAlert) ToEdge(order *NlogAlertOrder) *NlogAlertEdge

ToEdge converts NlogAlert into NlogAlertEdge.

func (*NlogAlert) Unwrap

func (na *NlogAlert) Unwrap() *NlogAlert

Unwrap unwraps the NlogAlert 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 (*NlogAlert) Update

func (na *NlogAlert) Update() *NlogAlertUpdateOne

Update returns a builder for updating this NlogAlert. Note that you need to call NlogAlert.Unwrap() before calling this method if this NlogAlert was returned from a transaction, and the transaction was committed or rolled back.

func (*NlogAlert) Value

func (na *NlogAlert) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the NlogAlert. This includes values selected through modifiers, order, etc.

type NlogAlertClient

type NlogAlertClient struct {
	// contains filtered or unexported fields
}

NlogAlertClient is a client for the NlogAlert schema.

func NewNlogAlertClient

func NewNlogAlertClient(c config) *NlogAlertClient

NewNlogAlertClient returns a client for the NlogAlert from the given config.

func (*NlogAlertClient) Create

func (c *NlogAlertClient) Create() *NlogAlertCreate

Create returns a builder for creating a NlogAlert entity.

func (*NlogAlertClient) CreateBulk

func (c *NlogAlertClient) CreateBulk(builders ...*NlogAlertCreate) *NlogAlertCreateBulk

CreateBulk returns a builder for creating a bulk of NlogAlert entities.

func (*NlogAlertClient) Delete

func (c *NlogAlertClient) Delete() *NlogAlertDelete

Delete returns a delete builder for NlogAlert.

func (*NlogAlertClient) DeleteOne

func (c *NlogAlertClient) DeleteOne(na *NlogAlert) *NlogAlertDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*NlogAlertClient) DeleteOneID

func (c *NlogAlertClient) DeleteOneID(id int) *NlogAlertDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*NlogAlertClient) Get

func (c *NlogAlertClient) Get(ctx context.Context, id int) (*NlogAlert, error)

Get returns a NlogAlert entity by its id.

func (*NlogAlertClient) GetX

func (c *NlogAlertClient) GetX(ctx context.Context, id int) *NlogAlert

GetX is like Get, but panics if an error occurs.

func (*NlogAlertClient) Hooks

func (c *NlogAlertClient) Hooks() []Hook

Hooks returns the client hooks.

func (*NlogAlertClient) Intercept

func (c *NlogAlertClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `nlogalert.Intercept(f(g(h())))`.

func (*NlogAlertClient) Interceptors

func (c *NlogAlertClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*NlogAlertClient) MapCreateBulk

func (c *NlogAlertClient) MapCreateBulk(slice any, setFunc func(*NlogAlertCreate, int)) *NlogAlertCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*NlogAlertClient) Query

func (c *NlogAlertClient) Query() *NlogAlertQuery

Query returns a query builder for NlogAlert.

func (*NlogAlertClient) QueryAlert

func (c *NlogAlertClient) QueryAlert(na *NlogAlert) *MsgAlertQuery

QueryAlert queries the alert edge of a NlogAlert.

func (*NlogAlertClient) QueryNlog

func (c *NlogAlertClient) QueryNlog(na *NlogAlert) *NlogQuery

QueryNlog queries the nlog edge of a NlogAlert.

func (*NlogAlertClient) Update

func (c *NlogAlertClient) Update() *NlogAlertUpdate

Update returns an update builder for NlogAlert.

func (*NlogAlertClient) UpdateOne

func (c *NlogAlertClient) UpdateOne(na *NlogAlert) *NlogAlertUpdateOne

UpdateOne returns an update builder for the given entity.

func (*NlogAlertClient) UpdateOneID

func (c *NlogAlertClient) UpdateOneID(id int) *NlogAlertUpdateOne

UpdateOneID returns an update builder for the given id.

func (*NlogAlertClient) Use

func (c *NlogAlertClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `nlogalert.Hooks(f(g(h())))`.

type NlogAlertConnection

type NlogAlertConnection struct {
	Edges      []*NlogAlertEdge `json:"edges"`
	PageInfo   PageInfo         `json:"pageInfo"`
	TotalCount int              `json:"totalCount"`
}

NlogAlertConnection is the connection containing edges to NlogAlert.

type NlogAlertCreate

type NlogAlertCreate struct {
	// contains filtered or unexported fields
}

NlogAlertCreate is the builder for creating a NlogAlert entity.

func (*NlogAlertCreate) Exec

func (nac *NlogAlertCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*NlogAlertCreate) ExecX

func (nac *NlogAlertCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogAlertCreate) Mutation

func (nac *NlogAlertCreate) Mutation() *NlogAlertMutation

Mutation returns the NlogAlertMutation object of the builder.

func (*NlogAlertCreate) OnConflict

func (nac *NlogAlertCreate) OnConflict(opts ...sql.ConflictOption) *NlogAlertUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.NlogAlert.Create().
	SetNlogID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.NlogAlertUpsert) {
		SetNlogID(v+v).
	}).
	Exec(ctx)

func (*NlogAlertCreate) OnConflictColumns

func (nac *NlogAlertCreate) OnConflictColumns(columns ...string) *NlogAlertUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.NlogAlert.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NlogAlertCreate) Save

func (nac *NlogAlertCreate) Save(ctx context.Context) (*NlogAlert, error)

Save creates the NlogAlert in the database.

func (*NlogAlertCreate) SaveX

func (nac *NlogAlertCreate) SaveX(ctx context.Context) *NlogAlert

SaveX calls Save and panics if Save returns an error.

func (*NlogAlertCreate) SetAlert

func (nac *NlogAlertCreate) SetAlert(m *MsgAlert) *NlogAlertCreate

SetAlert sets the "alert" edge to the MsgAlert entity.

func (*NlogAlertCreate) SetAlertID

func (nac *NlogAlertCreate) SetAlertID(i int) *NlogAlertCreate

SetAlertID sets the "alert_id" field.

func (*NlogAlertCreate) SetCreatedAt

func (nac *NlogAlertCreate) SetCreatedAt(t time.Time) *NlogAlertCreate

SetCreatedAt sets the "created_at" field.

func (*NlogAlertCreate) SetNillableCreatedAt

func (nac *NlogAlertCreate) SetNillableCreatedAt(t *time.Time) *NlogAlertCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*NlogAlertCreate) SetNlog

func (nac *NlogAlertCreate) SetNlog(n *Nlog) *NlogAlertCreate

SetNlog sets the "nlog" edge to the Nlog entity.

func (*NlogAlertCreate) SetNlogID

func (nac *NlogAlertCreate) SetNlogID(i int) *NlogAlertCreate

SetNlogID sets the "nlog_id" field.

type NlogAlertCreateBulk

type NlogAlertCreateBulk struct {
	// contains filtered or unexported fields
}

NlogAlertCreateBulk is the builder for creating many NlogAlert entities in bulk.

func (*NlogAlertCreateBulk) Exec

func (nacb *NlogAlertCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*NlogAlertCreateBulk) ExecX

func (nacb *NlogAlertCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogAlertCreateBulk) OnConflict

func (nacb *NlogAlertCreateBulk) OnConflict(opts ...sql.ConflictOption) *NlogAlertUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.NlogAlert.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.NlogAlertUpsert) {
		SetNlogID(v+v).
	}).
	Exec(ctx)

func (*NlogAlertCreateBulk) OnConflictColumns

func (nacb *NlogAlertCreateBulk) OnConflictColumns(columns ...string) *NlogAlertUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.NlogAlert.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NlogAlertCreateBulk) Save

func (nacb *NlogAlertCreateBulk) Save(ctx context.Context) ([]*NlogAlert, error)

Save creates the NlogAlert entities in the database.

func (*NlogAlertCreateBulk) SaveX

func (nacb *NlogAlertCreateBulk) SaveX(ctx context.Context) []*NlogAlert

SaveX is like Save, but panics if an error occurs.

type NlogAlertDelete

type NlogAlertDelete struct {
	// contains filtered or unexported fields
}

NlogAlertDelete is the builder for deleting a NlogAlert entity.

func (*NlogAlertDelete) Exec

func (nad *NlogAlertDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*NlogAlertDelete) ExecX

func (nad *NlogAlertDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*NlogAlertDelete) Where

Where appends a list predicates to the NlogAlertDelete builder.

type NlogAlertDeleteOne

type NlogAlertDeleteOne struct {
	// contains filtered or unexported fields
}

NlogAlertDeleteOne is the builder for deleting a single NlogAlert entity.

func (*NlogAlertDeleteOne) Exec

func (nado *NlogAlertDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*NlogAlertDeleteOne) ExecX

func (nado *NlogAlertDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogAlertDeleteOne) Where

Where appends a list predicates to the NlogAlertDelete builder.

type NlogAlertEdge

type NlogAlertEdge struct {
	Node   *NlogAlert `json:"node"`
	Cursor Cursor     `json:"cursor"`
}

NlogAlertEdge is the edge representation of NlogAlert.

type NlogAlertEdges

type NlogAlertEdges struct {
	// Nlog holds the value of the nlog edge.
	Nlog *Nlog `json:"nlog,omitempty"`
	// Alert holds the value of the alert edge.
	Alert *MsgAlert `json:"alert,omitempty"`
	// contains filtered or unexported fields
}

NlogAlertEdges holds the relations/edges for other nodes in the graph.

func (NlogAlertEdges) AlertOrErr

func (e NlogAlertEdges) AlertOrErr() (*MsgAlert, error)

AlertOrErr returns the Alert value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (NlogAlertEdges) NlogOrErr

func (e NlogAlertEdges) NlogOrErr() (*Nlog, error)

NlogOrErr returns the Nlog value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type NlogAlertGroupBy

type NlogAlertGroupBy struct {
	// contains filtered or unexported fields
}

NlogAlertGroupBy is the group-by builder for NlogAlert entities.

func (*NlogAlertGroupBy) Aggregate

func (nagb *NlogAlertGroupBy) Aggregate(fns ...AggregateFunc) *NlogAlertGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*NlogAlertGroupBy) Bool

func (s *NlogAlertGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NlogAlertGroupBy) BoolX

func (s *NlogAlertGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NlogAlertGroupBy) Bools

func (s *NlogAlertGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NlogAlertGroupBy) BoolsX

func (s *NlogAlertGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NlogAlertGroupBy) Float64

func (s *NlogAlertGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NlogAlertGroupBy) Float64X

func (s *NlogAlertGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NlogAlertGroupBy) Float64s

func (s *NlogAlertGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NlogAlertGroupBy) Float64sX

func (s *NlogAlertGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NlogAlertGroupBy) Int

func (s *NlogAlertGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NlogAlertGroupBy) IntX

func (s *NlogAlertGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NlogAlertGroupBy) Ints

func (s *NlogAlertGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NlogAlertGroupBy) IntsX

func (s *NlogAlertGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NlogAlertGroupBy) Scan

func (nagb *NlogAlertGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NlogAlertGroupBy) ScanX

func (s *NlogAlertGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NlogAlertGroupBy) String

func (s *NlogAlertGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NlogAlertGroupBy) StringX

func (s *NlogAlertGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NlogAlertGroupBy) Strings

func (s *NlogAlertGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NlogAlertGroupBy) StringsX

func (s *NlogAlertGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NlogAlertMutation

type NlogAlertMutation struct {
	// contains filtered or unexported fields
}

NlogAlertMutation represents an operation that mutates the NlogAlert nodes in the graph.

func (*NlogAlertMutation) AddField

func (m *NlogAlertMutation) 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 (*NlogAlertMutation) AddedEdges

func (m *NlogAlertMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*NlogAlertMutation) AddedField

func (m *NlogAlertMutation) 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 (*NlogAlertMutation) AddedFields

func (m *NlogAlertMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*NlogAlertMutation) AddedIDs

func (m *NlogAlertMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*NlogAlertMutation) AlertCleared

func (m *NlogAlertMutation) AlertCleared() bool

AlertCleared reports if the "alert" edge to the MsgAlert entity was cleared.

func (*NlogAlertMutation) AlertID

func (m *NlogAlertMutation) AlertID() (r int, exists bool)

AlertID returns the value of the "alert_id" field in the mutation.

func (*NlogAlertMutation) AlertIDs

func (m *NlogAlertMutation) AlertIDs() (ids []int)

AlertIDs returns the "alert" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AlertID instead. It exists only for internal usage by the builders.

func (*NlogAlertMutation) ClearAlert

func (m *NlogAlertMutation) ClearAlert()

ClearAlert clears the "alert" edge to the MsgAlert entity.

func (*NlogAlertMutation) ClearEdge

func (m *NlogAlertMutation) 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 (*NlogAlertMutation) ClearField

func (m *NlogAlertMutation) 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 (*NlogAlertMutation) ClearNlog

func (m *NlogAlertMutation) ClearNlog()

ClearNlog clears the "nlog" edge to the Nlog entity.

func (*NlogAlertMutation) ClearedEdges

func (m *NlogAlertMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*NlogAlertMutation) ClearedFields

func (m *NlogAlertMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (NlogAlertMutation) Client

func (m NlogAlertMutation) 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 (*NlogAlertMutation) CreatedAt

func (m *NlogAlertMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*NlogAlertMutation) EdgeCleared

func (m *NlogAlertMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*NlogAlertMutation) Field

func (m *NlogAlertMutation) 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 (*NlogAlertMutation) FieldCleared

func (m *NlogAlertMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*NlogAlertMutation) Fields

func (m *NlogAlertMutation) 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 (*NlogAlertMutation) ID

func (m *NlogAlertMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*NlogAlertMutation) IDs

func (m *NlogAlertMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*NlogAlertMutation) NlogCleared

func (m *NlogAlertMutation) NlogCleared() bool

NlogCleared reports if the "nlog" edge to the Nlog entity was cleared.

func (*NlogAlertMutation) NlogID

func (m *NlogAlertMutation) NlogID() (r int, exists bool)

NlogID returns the value of the "nlog_id" field in the mutation.

func (*NlogAlertMutation) NlogIDs

func (m *NlogAlertMutation) NlogIDs() (ids []int)

NlogIDs returns the "nlog" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NlogID instead. It exists only for internal usage by the builders.

func (*NlogAlertMutation) OldAlertID

func (m *NlogAlertMutation) OldAlertID(ctx context.Context) (v int, err error)

OldAlertID returns the old "alert_id" field's value of the NlogAlert entity. If the NlogAlert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NlogAlertMutation) OldCreatedAt

func (m *NlogAlertMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the NlogAlert entity. If the NlogAlert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NlogAlertMutation) OldField

func (m *NlogAlertMutation) 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 (*NlogAlertMutation) OldNlogID

func (m *NlogAlertMutation) OldNlogID(ctx context.Context) (v int, err error)

OldNlogID returns the old "nlog_id" field's value of the NlogAlert entity. If the NlogAlert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NlogAlertMutation) Op

func (m *NlogAlertMutation) Op() Op

Op returns the operation name.

func (*NlogAlertMutation) RemovedEdges

func (m *NlogAlertMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*NlogAlertMutation) RemovedIDs

func (m *NlogAlertMutation) 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 (*NlogAlertMutation) ResetAlert

func (m *NlogAlertMutation) ResetAlert()

ResetAlert resets all changes to the "alert" edge.

func (*NlogAlertMutation) ResetAlertID

func (m *NlogAlertMutation) ResetAlertID()

ResetAlertID resets all changes to the "alert_id" field.

func (*NlogAlertMutation) ResetCreatedAt

func (m *NlogAlertMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*NlogAlertMutation) ResetEdge

func (m *NlogAlertMutation) 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 (*NlogAlertMutation) ResetField

func (m *NlogAlertMutation) 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 (*NlogAlertMutation) ResetNlog

func (m *NlogAlertMutation) ResetNlog()

ResetNlog resets all changes to the "nlog" edge.

func (*NlogAlertMutation) ResetNlogID

func (m *NlogAlertMutation) ResetNlogID()

ResetNlogID resets all changes to the "nlog_id" field.

func (*NlogAlertMutation) SetAlertID

func (m *NlogAlertMutation) SetAlertID(i int)

SetAlertID sets the "alert_id" field.

func (*NlogAlertMutation) SetCreatedAt

func (m *NlogAlertMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*NlogAlertMutation) SetField

func (m *NlogAlertMutation) 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 (*NlogAlertMutation) SetNlogID

func (m *NlogAlertMutation) SetNlogID(i int)

SetNlogID sets the "nlog_id" field.

func (*NlogAlertMutation) SetOp

func (m *NlogAlertMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (NlogAlertMutation) Tx

func (m NlogAlertMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*NlogAlertMutation) Type

func (m *NlogAlertMutation) Type() string

Type returns the node type of this mutation (NlogAlert).

func (*NlogAlertMutation) Where

func (m *NlogAlertMutation) Where(ps ...predicate.NlogAlert)

Where appends a list predicates to the NlogAlertMutation builder.

func (*NlogAlertMutation) WhereP

func (m *NlogAlertMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the NlogAlertMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type NlogAlertOrder

type NlogAlertOrder struct {
	Direction OrderDirection       `json:"direction"`
	Field     *NlogAlertOrderField `json:"field"`
}

NlogAlertOrder defines the ordering of NlogAlert.

type NlogAlertOrderField

type NlogAlertOrderField struct {
	// Value extracts the ordering value from the given NlogAlert.
	Value func(*NlogAlert) (ent.Value, error)
	// contains filtered or unexported fields
}

NlogAlertOrderField defines the ordering field of NlogAlert.

func (NlogAlertOrderField) MarshalGQL

func (f NlogAlertOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (NlogAlertOrderField) String

func (f NlogAlertOrderField) String() string

String implement fmt.Stringer interface.

func (*NlogAlertOrderField) UnmarshalGQL

func (f *NlogAlertOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type NlogAlertPaginateOption

type NlogAlertPaginateOption func(*nlogalertPager) error

NlogAlertPaginateOption enables pagination customization.

func WithNlogAlertFilter

func WithNlogAlertFilter(filter func(*NlogAlertQuery) (*NlogAlertQuery, error)) NlogAlertPaginateOption

WithNlogAlertFilter configures pagination filter.

func WithNlogAlertOrder

func WithNlogAlertOrder(order *NlogAlertOrder) NlogAlertPaginateOption

WithNlogAlertOrder configures pagination ordering.

type NlogAlertQuery

type NlogAlertQuery struct {
	// contains filtered or unexported fields
}

NlogAlertQuery is the builder for querying NlogAlert entities.

func (*NlogAlertQuery) Aggregate

func (naq *NlogAlertQuery) Aggregate(fns ...AggregateFunc) *NlogAlertSelect

Aggregate returns a NlogAlertSelect configured with the given aggregations.

func (*NlogAlertQuery) All

func (naq *NlogAlertQuery) All(ctx context.Context) ([]*NlogAlert, error)

All executes the query and returns a list of NlogAlerts.

func (*NlogAlertQuery) AllX

func (naq *NlogAlertQuery) AllX(ctx context.Context) []*NlogAlert

AllX is like All, but panics if an error occurs.

func (*NlogAlertQuery) Clone

func (naq *NlogAlertQuery) Clone() *NlogAlertQuery

Clone returns a duplicate of the NlogAlertQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*NlogAlertQuery) CollectFields

func (na *NlogAlertQuery) CollectFields(ctx context.Context, satisfies ...string) (*NlogAlertQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*NlogAlertQuery) Count

func (naq *NlogAlertQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NlogAlertQuery) CountX

func (naq *NlogAlertQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*NlogAlertQuery) Exist

func (naq *NlogAlertQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*NlogAlertQuery) ExistX

func (naq *NlogAlertQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*NlogAlertQuery) First

func (naq *NlogAlertQuery) First(ctx context.Context) (*NlogAlert, error)

First returns the first NlogAlert entity from the query. Returns a *NotFoundError when no NlogAlert was found.

func (*NlogAlertQuery) FirstID

func (naq *NlogAlertQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first NlogAlert ID from the query. Returns a *NotFoundError when no NlogAlert ID was found.

func (*NlogAlertQuery) FirstIDX

func (naq *NlogAlertQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*NlogAlertQuery) FirstX

func (naq *NlogAlertQuery) FirstX(ctx context.Context) *NlogAlert

FirstX is like First, but panics if an error occurs.

func (*NlogAlertQuery) GroupBy

func (naq *NlogAlertQuery) GroupBy(field string, fields ...string) *NlogAlertGroupBy

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 {
	NlogID int `json:"nlog_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.NlogAlert.Query().
	GroupBy(nlogalert.FieldNlogID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NlogAlertQuery) IDs

func (naq *NlogAlertQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of NlogAlert IDs.

func (*NlogAlertQuery) IDsX

func (naq *NlogAlertQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*NlogAlertQuery) Limit

func (naq *NlogAlertQuery) Limit(limit int) *NlogAlertQuery

Limit the number of records to be returned by this query.

func (*NlogAlertQuery) Offset

func (naq *NlogAlertQuery) Offset(offset int) *NlogAlertQuery

Offset to start from.

func (*NlogAlertQuery) Only

func (naq *NlogAlertQuery) Only(ctx context.Context) (*NlogAlert, error)

Only returns a single NlogAlert entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NlogAlert entity is found. Returns a *NotFoundError when no NlogAlert entities are found.

func (*NlogAlertQuery) OnlyID

func (naq *NlogAlertQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only NlogAlert ID in the query. Returns a *NotSingularError when more than one NlogAlert ID is found. Returns a *NotFoundError when no entities are found.

func (*NlogAlertQuery) OnlyIDX

func (naq *NlogAlertQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*NlogAlertQuery) OnlyX

func (naq *NlogAlertQuery) OnlyX(ctx context.Context) *NlogAlert

OnlyX is like Only, but panics if an error occurs.

func (*NlogAlertQuery) Order

Order specifies how the records should be ordered.

func (*NlogAlertQuery) Paginate

func (na *NlogAlertQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...NlogAlertPaginateOption,
) (*NlogAlertConnection, error)

Paginate executes the query and returns a relay based cursor connection to NlogAlert.

func (*NlogAlertQuery) QueryAlert

func (naq *NlogAlertQuery) QueryAlert() *MsgAlertQuery

QueryAlert chains the current query on the "alert" edge.

func (*NlogAlertQuery) QueryNlog

func (naq *NlogAlertQuery) QueryNlog() *NlogQuery

QueryNlog chains the current query on the "nlog" edge.

func (*NlogAlertQuery) Select

func (naq *NlogAlertQuery) Select(fields ...string) *NlogAlertSelect

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 {
	NlogID int `json:"nlog_id,omitempty"`
}

client.NlogAlert.Query().
	Select(nlogalert.FieldNlogID).
	Scan(ctx, &v)

func (*NlogAlertQuery) Unique

func (naq *NlogAlertQuery) Unique(unique bool) *NlogAlertQuery

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 (*NlogAlertQuery) Where

func (naq *NlogAlertQuery) Where(ps ...predicate.NlogAlert) *NlogAlertQuery

Where adds a new predicate for the NlogAlertQuery builder.

func (*NlogAlertQuery) WithAlert

func (naq *NlogAlertQuery) WithAlert(opts ...func(*MsgAlertQuery)) *NlogAlertQuery

WithAlert tells the query-builder to eager-load the nodes that are connected to the "alert" edge. The optional arguments are used to configure the query builder of the edge.

func (*NlogAlertQuery) WithNlog

func (naq *NlogAlertQuery) WithNlog(opts ...func(*NlogQuery)) *NlogAlertQuery

WithNlog tells the query-builder to eager-load the nodes that are connected to the "nlog" edge. The optional arguments are used to configure the query builder of the edge.

type NlogAlertSelect

type NlogAlertSelect struct {
	*NlogAlertQuery
	// contains filtered or unexported fields
}

NlogAlertSelect is the builder for selecting fields of NlogAlert entities.

func (*NlogAlertSelect) Aggregate

func (nas *NlogAlertSelect) Aggregate(fns ...AggregateFunc) *NlogAlertSelect

Aggregate adds the given aggregation functions to the selector query.

func (*NlogAlertSelect) Bool

func (s *NlogAlertSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NlogAlertSelect) BoolX

func (s *NlogAlertSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NlogAlertSelect) Bools

func (s *NlogAlertSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NlogAlertSelect) BoolsX

func (s *NlogAlertSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NlogAlertSelect) Float64

func (s *NlogAlertSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NlogAlertSelect) Float64X

func (s *NlogAlertSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NlogAlertSelect) Float64s

func (s *NlogAlertSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NlogAlertSelect) Float64sX

func (s *NlogAlertSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NlogAlertSelect) Int

func (s *NlogAlertSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NlogAlertSelect) IntX

func (s *NlogAlertSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NlogAlertSelect) Ints

func (s *NlogAlertSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NlogAlertSelect) IntsX

func (s *NlogAlertSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NlogAlertSelect) Scan

func (nas *NlogAlertSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NlogAlertSelect) ScanX

func (s *NlogAlertSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NlogAlertSelect) String

func (s *NlogAlertSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NlogAlertSelect) StringX

func (s *NlogAlertSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NlogAlertSelect) Strings

func (s *NlogAlertSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NlogAlertSelect) StringsX

func (s *NlogAlertSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NlogAlertUpdate

type NlogAlertUpdate struct {
	// contains filtered or unexported fields
}

NlogAlertUpdate is the builder for updating NlogAlert entities.

func (*NlogAlertUpdate) ClearAlert

func (nau *NlogAlertUpdate) ClearAlert() *NlogAlertUpdate

ClearAlert clears the "alert" edge to the MsgAlert entity.

func (*NlogAlertUpdate) ClearNlog

func (nau *NlogAlertUpdate) ClearNlog() *NlogAlertUpdate

ClearNlog clears the "nlog" edge to the Nlog entity.

func (*NlogAlertUpdate) Exec

func (nau *NlogAlertUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*NlogAlertUpdate) ExecX

func (nau *NlogAlertUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogAlertUpdate) Mutation

func (nau *NlogAlertUpdate) Mutation() *NlogAlertMutation

Mutation returns the NlogAlertMutation object of the builder.

func (*NlogAlertUpdate) Save

func (nau *NlogAlertUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*NlogAlertUpdate) SaveX

func (nau *NlogAlertUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*NlogAlertUpdate) SetAlert

func (nau *NlogAlertUpdate) SetAlert(m *MsgAlert) *NlogAlertUpdate

SetAlert sets the "alert" edge to the MsgAlert entity.

func (*NlogAlertUpdate) SetAlertID

func (nau *NlogAlertUpdate) SetAlertID(i int) *NlogAlertUpdate

SetAlertID sets the "alert_id" field.

func (*NlogAlertUpdate) SetNlog

func (nau *NlogAlertUpdate) SetNlog(n *Nlog) *NlogAlertUpdate

SetNlog sets the "nlog" edge to the Nlog entity.

func (*NlogAlertUpdate) SetNlogID

func (nau *NlogAlertUpdate) SetNlogID(i int) *NlogAlertUpdate

SetNlogID sets the "nlog_id" field.

func (*NlogAlertUpdate) Where

Where appends a list predicates to the NlogAlertUpdate builder.

type NlogAlertUpdateOne

type NlogAlertUpdateOne struct {
	// contains filtered or unexported fields
}

NlogAlertUpdateOne is the builder for updating a single NlogAlert entity.

func (*NlogAlertUpdateOne) ClearAlert

func (nauo *NlogAlertUpdateOne) ClearAlert() *NlogAlertUpdateOne

ClearAlert clears the "alert" edge to the MsgAlert entity.

func (*NlogAlertUpdateOne) ClearNlog

func (nauo *NlogAlertUpdateOne) ClearNlog() *NlogAlertUpdateOne

ClearNlog clears the "nlog" edge to the Nlog entity.

func (*NlogAlertUpdateOne) Exec

func (nauo *NlogAlertUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*NlogAlertUpdateOne) ExecX

func (nauo *NlogAlertUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogAlertUpdateOne) Mutation

func (nauo *NlogAlertUpdateOne) Mutation() *NlogAlertMutation

Mutation returns the NlogAlertMutation object of the builder.

func (*NlogAlertUpdateOne) Save

func (nauo *NlogAlertUpdateOne) Save(ctx context.Context) (*NlogAlert, error)

Save executes the query and returns the updated NlogAlert entity.

func (*NlogAlertUpdateOne) SaveX

func (nauo *NlogAlertUpdateOne) SaveX(ctx context.Context) *NlogAlert

SaveX is like Save, but panics if an error occurs.

func (*NlogAlertUpdateOne) Select

func (nauo *NlogAlertUpdateOne) Select(field string, fields ...string) *NlogAlertUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*NlogAlertUpdateOne) SetAlert

func (nauo *NlogAlertUpdateOne) SetAlert(m *MsgAlert) *NlogAlertUpdateOne

SetAlert sets the "alert" edge to the MsgAlert entity.

func (*NlogAlertUpdateOne) SetAlertID

func (nauo *NlogAlertUpdateOne) SetAlertID(i int) *NlogAlertUpdateOne

SetAlertID sets the "alert_id" field.

func (*NlogAlertUpdateOne) SetNlog

func (nauo *NlogAlertUpdateOne) SetNlog(n *Nlog) *NlogAlertUpdateOne

SetNlog sets the "nlog" edge to the Nlog entity.

func (*NlogAlertUpdateOne) SetNlogID

func (nauo *NlogAlertUpdateOne) SetNlogID(i int) *NlogAlertUpdateOne

SetNlogID sets the "nlog_id" field.

func (*NlogAlertUpdateOne) Where

Where appends a list predicates to the NlogAlertUpdate builder.

type NlogAlertUpsert

type NlogAlertUpsert struct {
	*sql.UpdateSet
}

NlogAlertUpsert is the "OnConflict" setter.

func (*NlogAlertUpsert) SetAlertID

func (u *NlogAlertUpsert) SetAlertID(v int) *NlogAlertUpsert

SetAlertID sets the "alert_id" field.

func (*NlogAlertUpsert) SetNlogID

func (u *NlogAlertUpsert) SetNlogID(v int) *NlogAlertUpsert

SetNlogID sets the "nlog_id" field.

func (*NlogAlertUpsert) UpdateAlertID

func (u *NlogAlertUpsert) UpdateAlertID() *NlogAlertUpsert

UpdateAlertID sets the "alert_id" field to the value that was provided on create.

func (*NlogAlertUpsert) UpdateNlogID

func (u *NlogAlertUpsert) UpdateNlogID() *NlogAlertUpsert

UpdateNlogID sets the "nlog_id" field to the value that was provided on create.

type NlogAlertUpsertBulk

type NlogAlertUpsertBulk struct {
	// contains filtered or unexported fields
}

NlogAlertUpsertBulk is the builder for "upsert"-ing a bulk of NlogAlert nodes.

func (*NlogAlertUpsertBulk) DoNothing

func (u *NlogAlertUpsertBulk) DoNothing() *NlogAlertUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NlogAlertUpsertBulk) Exec

Exec executes the query.

func (*NlogAlertUpsertBulk) ExecX

func (u *NlogAlertUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogAlertUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.NlogAlert.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*NlogAlertUpsertBulk) SetAlertID

func (u *NlogAlertUpsertBulk) SetAlertID(v int) *NlogAlertUpsertBulk

SetAlertID sets the "alert_id" field.

func (*NlogAlertUpsertBulk) SetNlogID

func (u *NlogAlertUpsertBulk) SetNlogID(v int) *NlogAlertUpsertBulk

SetNlogID sets the "nlog_id" field.

func (*NlogAlertUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the NlogAlertCreateBulk.OnConflict documentation for more info.

func (*NlogAlertUpsertBulk) UpdateAlertID

func (u *NlogAlertUpsertBulk) UpdateAlertID() *NlogAlertUpsertBulk

UpdateAlertID sets the "alert_id" field to the value that was provided on create.

func (*NlogAlertUpsertBulk) UpdateNewValues

func (u *NlogAlertUpsertBulk) UpdateNewValues() *NlogAlertUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.NlogAlert.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*NlogAlertUpsertBulk) UpdateNlogID

func (u *NlogAlertUpsertBulk) UpdateNlogID() *NlogAlertUpsertBulk

UpdateNlogID sets the "nlog_id" field to the value that was provided on create.

type NlogAlertUpsertOne

type NlogAlertUpsertOne struct {
	// contains filtered or unexported fields
}

NlogAlertUpsertOne is the builder for "upsert"-ing

one NlogAlert node.

func (*NlogAlertUpsertOne) DoNothing

func (u *NlogAlertUpsertOne) DoNothing() *NlogAlertUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NlogAlertUpsertOne) Exec

func (u *NlogAlertUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*NlogAlertUpsertOne) ExecX

func (u *NlogAlertUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogAlertUpsertOne) ID

func (u *NlogAlertUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*NlogAlertUpsertOne) IDX

func (u *NlogAlertUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*NlogAlertUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.NlogAlert.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*NlogAlertUpsertOne) SetAlertID

func (u *NlogAlertUpsertOne) SetAlertID(v int) *NlogAlertUpsertOne

SetAlertID sets the "alert_id" field.

func (*NlogAlertUpsertOne) SetNlogID

func (u *NlogAlertUpsertOne) SetNlogID(v int) *NlogAlertUpsertOne

SetNlogID sets the "nlog_id" field.

func (*NlogAlertUpsertOne) Update

func (u *NlogAlertUpsertOne) Update(set func(*NlogAlertUpsert)) *NlogAlertUpsertOne

Update allows overriding fields `UPDATE` values. See the NlogAlertCreate.OnConflict documentation for more info.

func (*NlogAlertUpsertOne) UpdateAlertID

func (u *NlogAlertUpsertOne) UpdateAlertID() *NlogAlertUpsertOne

UpdateAlertID sets the "alert_id" field to the value that was provided on create.

func (*NlogAlertUpsertOne) UpdateNewValues

func (u *NlogAlertUpsertOne) UpdateNewValues() *NlogAlertUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.NlogAlert.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*NlogAlertUpsertOne) UpdateNlogID

func (u *NlogAlertUpsertOne) UpdateNlogID() *NlogAlertUpsertOne

UpdateNlogID sets the "nlog_id" field to the value that was provided on create.

type NlogAlertWhereInput

type NlogAlertWhereInput struct {
	Predicates []predicate.NlogAlert  `json:"-"`
	Not        *NlogAlertWhereInput   `json:"not,omitempty"`
	Or         []*NlogAlertWhereInput `json:"or,omitempty"`
	And        []*NlogAlertWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "nlog_id" field predicates.
	NlogID      *int  `json:"nlogID,omitempty"`
	NlogIDNEQ   *int  `json:"nlogIDNEQ,omitempty"`
	NlogIDIn    []int `json:"nlogIDIn,omitempty"`
	NlogIDNotIn []int `json:"nlogIDNotIn,omitempty"`

	// "alert_id" field predicates.
	AlertID      *int  `json:"alertID,omitempty"`
	AlertIDNEQ   *int  `json:"alertIDNEQ,omitempty"`
	AlertIDIn    []int `json:"alertIDIn,omitempty"`
	AlertIDNotIn []int `json:"alertIDNotIn,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "nlog" edge predicates.
	HasNlog     *bool             `json:"hasNlog,omitempty"`
	HasNlogWith []*NlogWhereInput `json:"hasNlogWith,omitempty"`

	// "alert" edge predicates.
	HasAlert     *bool                 `json:"hasAlert,omitempty"`
	HasAlertWith []*MsgAlertWhereInput `json:"hasAlertWith,omitempty"`
}

NlogAlertWhereInput represents a where input for filtering NlogAlert queries.

func (*NlogAlertWhereInput) AddPredicates

func (i *NlogAlertWhereInput) AddPredicates(predicates ...predicate.NlogAlert)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*NlogAlertWhereInput) Filter

Filter applies the NlogAlertWhereInput filter on the NlogAlertQuery builder.

func (*NlogAlertWhereInput) P

P returns a predicate for filtering nlogalerts. An error is returned if the input is empty or invalid.

type NlogAlerts

type NlogAlerts []*NlogAlert

NlogAlerts is a parsable slice of NlogAlert.

type NlogClient

type NlogClient struct {
	// contains filtered or unexported fields
}

NlogClient is a client for the Nlog schema.

func NewNlogClient

func NewNlogClient(c config) *NlogClient

NewNlogClient returns a client for the Nlog from the given config.

func (*NlogClient) Create

func (c *NlogClient) Create() *NlogCreate

Create returns a builder for creating a Nlog entity.

func (*NlogClient) CreateBulk

func (c *NlogClient) CreateBulk(builders ...*NlogCreate) *NlogCreateBulk

CreateBulk returns a builder for creating a bulk of Nlog entities.

func (*NlogClient) Delete

func (c *NlogClient) Delete() *NlogDelete

Delete returns a delete builder for Nlog.

func (*NlogClient) DeleteOne

func (c *NlogClient) DeleteOne(n *Nlog) *NlogDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*NlogClient) DeleteOneID

func (c *NlogClient) DeleteOneID(id int) *NlogDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*NlogClient) Get

func (c *NlogClient) Get(ctx context.Context, id int) (*Nlog, error)

Get returns a Nlog entity by its id.

func (*NlogClient) GetX

func (c *NlogClient) GetX(ctx context.Context, id int) *Nlog

GetX is like Get, but panics if an error occurs.

func (*NlogClient) Hooks

func (c *NlogClient) Hooks() []Hook

Hooks returns the client hooks.

func (*NlogClient) Intercept

func (c *NlogClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `nlog.Intercept(f(g(h())))`.

func (*NlogClient) Interceptors

func (c *NlogClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*NlogClient) MapCreateBulk

func (c *NlogClient) MapCreateBulk(slice any, setFunc func(*NlogCreate, int)) *NlogCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*NlogClient) Query

func (c *NlogClient) Query() *NlogQuery

Query returns a query builder for Nlog.

func (*NlogClient) QueryAlerts

func (c *NlogClient) QueryAlerts(n *Nlog) *MsgAlertQuery

QueryAlerts queries the alerts edge of a Nlog.

func (*NlogClient) QueryNlogAlert

func (c *NlogClient) QueryNlogAlert(n *Nlog) *NlogAlertQuery

QueryNlogAlert queries the nlog_alert edge of a Nlog.

func (*NlogClient) Update

func (c *NlogClient) Update() *NlogUpdate

Update returns an update builder for Nlog.

func (*NlogClient) UpdateOne

func (c *NlogClient) UpdateOne(n *Nlog) *NlogUpdateOne

UpdateOne returns an update builder for the given entity.

func (*NlogClient) UpdateOneID

func (c *NlogClient) UpdateOneID(id int) *NlogUpdateOne

UpdateOneID returns an update builder for the given id.

func (*NlogClient) Use

func (c *NlogClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `nlog.Hooks(f(g(h())))`.

type NlogConnection

type NlogConnection struct {
	Edges      []*NlogEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

NlogConnection is the connection containing edges to Nlog.

type NlogCreate

type NlogCreate struct {
	// contains filtered or unexported fields
}

NlogCreate is the builder for creating a Nlog entity.

func (*NlogCreate) AddAlertIDs

func (nc *NlogCreate) AddAlertIDs(ids ...int) *NlogCreate

AddAlertIDs adds the "alerts" edge to the MsgAlert entity by IDs.

func (*NlogCreate) AddAlerts

func (nc *NlogCreate) AddAlerts(m ...*MsgAlert) *NlogCreate

AddAlerts adds the "alerts" edges to the MsgAlert entity.

func (*NlogCreate) AddNlogAlert

func (nc *NlogCreate) AddNlogAlert(n ...*NlogAlert) *NlogCreate

AddNlogAlert adds the "nlog_alert" edges to the NlogAlert entity.

func (*NlogCreate) AddNlogAlertIDs

func (nc *NlogCreate) AddNlogAlertIDs(ids ...int) *NlogCreate

AddNlogAlertIDs adds the "nlog_alert" edge to the NlogAlert entity by IDs.

func (*NlogCreate) Exec

func (nc *NlogCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*NlogCreate) ExecX

func (nc *NlogCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogCreate) Mutation

func (nc *NlogCreate) Mutation() *NlogMutation

Mutation returns the NlogMutation object of the builder.

func (*NlogCreate) OnConflict

func (nc *NlogCreate) OnConflict(opts ...sql.ConflictOption) *NlogUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Nlog.Create().
	SetTenantID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.NlogUpsert) {
		SetTenantID(v+v).
	}).
	Exec(ctx)

func (*NlogCreate) OnConflictColumns

func (nc *NlogCreate) OnConflictColumns(columns ...string) *NlogUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Nlog.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NlogCreate) Save

func (nc *NlogCreate) Save(ctx context.Context) (*Nlog, error)

Save creates the Nlog in the database.

func (*NlogCreate) SaveX

func (nc *NlogCreate) SaveX(ctx context.Context) *Nlog

SaveX calls Save and panics if Save returns an error.

func (*NlogCreate) SetCreatedAt

func (nc *NlogCreate) SetCreatedAt(t time.Time) *NlogCreate

SetCreatedAt sets the "created_at" field.

func (*NlogCreate) SetExpiresAt

func (nc *NlogCreate) SetExpiresAt(t time.Time) *NlogCreate

SetExpiresAt sets the "expires_at" field.

func (*NlogCreate) SetGroupKey

func (nc *NlogCreate) SetGroupKey(s string) *NlogCreate

SetGroupKey sets the "group_key" field.

func (*NlogCreate) SetID

func (nc *NlogCreate) SetID(i int) *NlogCreate

SetID sets the "id" field.

func (*NlogCreate) SetIdx

func (nc *NlogCreate) SetIdx(i int) *NlogCreate

SetIdx sets the "idx" field.

func (*NlogCreate) SetNillableCreatedAt

func (nc *NlogCreate) SetNillableCreatedAt(t *time.Time) *NlogCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*NlogCreate) SetNillableUpdatedAt

func (nc *NlogCreate) SetNillableUpdatedAt(t *time.Time) *NlogCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*NlogCreate) SetReceiver

func (nc *NlogCreate) SetReceiver(s string) *NlogCreate

SetReceiver sets the "receiver" field.

func (*NlogCreate) SetReceiverType

func (nc *NlogCreate) SetReceiverType(pt profile.ReceiverType) *NlogCreate

SetReceiverType sets the "receiver_type" field.

func (*NlogCreate) SetSendAt

func (nc *NlogCreate) SetSendAt(t time.Time) *NlogCreate

SetSendAt sets the "send_at" field.

func (*NlogCreate) SetTenantID

func (nc *NlogCreate) SetTenantID(i int) *NlogCreate

SetTenantID sets the "tenant_id" field.

func (*NlogCreate) SetUpdatedAt

func (nc *NlogCreate) SetUpdatedAt(t time.Time) *NlogCreate

SetUpdatedAt sets the "updated_at" field.

type NlogCreateBulk

type NlogCreateBulk struct {
	// contains filtered or unexported fields
}

NlogCreateBulk is the builder for creating many Nlog entities in bulk.

func (*NlogCreateBulk) Exec

func (ncb *NlogCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*NlogCreateBulk) ExecX

func (ncb *NlogCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogCreateBulk) OnConflict

func (ncb *NlogCreateBulk) OnConflict(opts ...sql.ConflictOption) *NlogUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Nlog.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.NlogUpsert) {
		SetTenantID(v+v).
	}).
	Exec(ctx)

func (*NlogCreateBulk) OnConflictColumns

func (ncb *NlogCreateBulk) OnConflictColumns(columns ...string) *NlogUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Nlog.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*NlogCreateBulk) Save

func (ncb *NlogCreateBulk) Save(ctx context.Context) ([]*Nlog, error)

Save creates the Nlog entities in the database.

func (*NlogCreateBulk) SaveX

func (ncb *NlogCreateBulk) SaveX(ctx context.Context) []*Nlog

SaveX is like Save, but panics if an error occurs.

type NlogDelete

type NlogDelete struct {
	// contains filtered or unexported fields
}

NlogDelete is the builder for deleting a Nlog entity.

func (*NlogDelete) Exec

func (nd *NlogDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*NlogDelete) ExecX

func (nd *NlogDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*NlogDelete) Where

func (nd *NlogDelete) Where(ps ...predicate.Nlog) *NlogDelete

Where appends a list predicates to the NlogDelete builder.

type NlogDeleteOne

type NlogDeleteOne struct {
	// contains filtered or unexported fields
}

NlogDeleteOne is the builder for deleting a single Nlog entity.

func (*NlogDeleteOne) Exec

func (ndo *NlogDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*NlogDeleteOne) ExecX

func (ndo *NlogDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogDeleteOne) Where

func (ndo *NlogDeleteOne) Where(ps ...predicate.Nlog) *NlogDeleteOne

Where appends a list predicates to the NlogDelete builder.

type NlogEdge

type NlogEdge struct {
	Node   *Nlog  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

NlogEdge is the edge representation of Nlog.

type NlogEdges

type NlogEdges struct {
	// Alerts holds the value of the alerts edge.
	Alerts []*MsgAlert `json:"alerts,omitempty"`
	// NlogAlert holds the value of the nlog_alert edge.
	NlogAlert []*NlogAlert `json:"nlog_alert,omitempty"`
	// contains filtered or unexported fields
}

NlogEdges holds the relations/edges for other nodes in the graph.

func (NlogEdges) AlertsOrErr

func (e NlogEdges) AlertsOrErr() ([]*MsgAlert, error)

AlertsOrErr returns the Alerts value or an error if the edge was not loaded in eager-loading.

func (NlogEdges) NlogAlertOrErr

func (e NlogEdges) NlogAlertOrErr() ([]*NlogAlert, error)

NlogAlertOrErr returns the NlogAlert value or an error if the edge was not loaded in eager-loading.

type NlogGroupBy

type NlogGroupBy struct {
	// contains filtered or unexported fields
}

NlogGroupBy is the group-by builder for Nlog entities.

func (*NlogGroupBy) Aggregate

func (ngb *NlogGroupBy) Aggregate(fns ...AggregateFunc) *NlogGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*NlogGroupBy) Bool

func (s *NlogGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NlogGroupBy) BoolX

func (s *NlogGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NlogGroupBy) Bools

func (s *NlogGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NlogGroupBy) BoolsX

func (s *NlogGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NlogGroupBy) Float64

func (s *NlogGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NlogGroupBy) Float64X

func (s *NlogGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NlogGroupBy) Float64s

func (s *NlogGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NlogGroupBy) Float64sX

func (s *NlogGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NlogGroupBy) Int

func (s *NlogGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NlogGroupBy) IntX

func (s *NlogGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NlogGroupBy) Ints

func (s *NlogGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NlogGroupBy) IntsX

func (s *NlogGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NlogGroupBy) Scan

func (ngb *NlogGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NlogGroupBy) ScanX

func (s *NlogGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NlogGroupBy) String

func (s *NlogGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NlogGroupBy) StringX

func (s *NlogGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NlogGroupBy) Strings

func (s *NlogGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NlogGroupBy) StringsX

func (s *NlogGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NlogMutation

type NlogMutation struct {
	// contains filtered or unexported fields
}

NlogMutation represents an operation that mutates the Nlog nodes in the graph.

func (*NlogMutation) AddAlertIDs

func (m *NlogMutation) AddAlertIDs(ids ...int)

AddAlertIDs adds the "alerts" edge to the MsgAlert entity by ids.

func (*NlogMutation) AddField

func (m *NlogMutation) 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 (*NlogMutation) AddIdx

func (m *NlogMutation) AddIdx(i int)

AddIdx adds i to the "idx" field.

func (*NlogMutation) AddNlogAlertIDs

func (m *NlogMutation) AddNlogAlertIDs(ids ...int)

AddNlogAlertIDs adds the "nlog_alert" edge to the NlogAlert entity by ids.

func (*NlogMutation) AddTenantID

func (m *NlogMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*NlogMutation) AddedEdges

func (m *NlogMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*NlogMutation) AddedField

func (m *NlogMutation) 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 (*NlogMutation) AddedFields

func (m *NlogMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*NlogMutation) AddedIDs

func (m *NlogMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*NlogMutation) AddedIdx

func (m *NlogMutation) AddedIdx() (r int, exists bool)

AddedIdx returns the value that was added to the "idx" field in this mutation.

func (*NlogMutation) AddedTenantID

func (m *NlogMutation) AddedTenantID() (r int, exists bool)

AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.

func (*NlogMutation) AlertsCleared

func (m *NlogMutation) AlertsCleared() bool

AlertsCleared reports if the "alerts" edge to the MsgAlert entity was cleared.

func (*NlogMutation) AlertsIDs

func (m *NlogMutation) AlertsIDs() (ids []int)

AlertsIDs returns the "alerts" edge IDs in the mutation.

func (*NlogMutation) ClearAlerts

func (m *NlogMutation) ClearAlerts()

ClearAlerts clears the "alerts" edge to the MsgAlert entity.

func (*NlogMutation) ClearEdge

func (m *NlogMutation) 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 (*NlogMutation) ClearField

func (m *NlogMutation) 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 (*NlogMutation) ClearNlogAlert

func (m *NlogMutation) ClearNlogAlert()

ClearNlogAlert clears the "nlog_alert" edge to the NlogAlert entity.

func (*NlogMutation) ClearUpdatedAt

func (m *NlogMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NlogMutation) ClearedEdges

func (m *NlogMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*NlogMutation) ClearedFields

func (m *NlogMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (NlogMutation) Client

func (m NlogMutation) 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 (*NlogMutation) CreatedAt

func (m *NlogMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*NlogMutation) EdgeCleared

func (m *NlogMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*NlogMutation) ExpiresAt

func (m *NlogMutation) ExpiresAt() (r time.Time, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*NlogMutation) Field

func (m *NlogMutation) 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 (*NlogMutation) FieldCleared

func (m *NlogMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*NlogMutation) Fields

func (m *NlogMutation) 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 (*NlogMutation) GroupKey

func (m *NlogMutation) GroupKey() (r string, exists bool)

GroupKey returns the value of the "group_key" field in the mutation.

func (*NlogMutation) ID

func (m *NlogMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*NlogMutation) IDs

func (m *NlogMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*NlogMutation) Idx

func (m *NlogMutation) Idx() (r int, exists bool)

Idx returns the value of the "idx" field in the mutation.

func (*NlogMutation) NlogAlertCleared

func (m *NlogMutation) NlogAlertCleared() bool

NlogAlertCleared reports if the "nlog_alert" edge to the NlogAlert entity was cleared.

func (*NlogMutation) NlogAlertIDs

func (m *NlogMutation) NlogAlertIDs() (ids []int)

NlogAlertIDs returns the "nlog_alert" edge IDs in the mutation.

func (*NlogMutation) OldCreatedAt

func (m *NlogMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Nlog entity. If the Nlog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NlogMutation) OldExpiresAt

func (m *NlogMutation) OldExpiresAt(ctx context.Context) (v time.Time, err error)

OldExpiresAt returns the old "expires_at" field's value of the Nlog entity. If the Nlog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NlogMutation) OldField

func (m *NlogMutation) 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 (*NlogMutation) OldGroupKey

func (m *NlogMutation) OldGroupKey(ctx context.Context) (v string, err error)

OldGroupKey returns the old "group_key" field's value of the Nlog entity. If the Nlog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NlogMutation) OldIdx

func (m *NlogMutation) OldIdx(ctx context.Context) (v int, err error)

OldIdx returns the old "idx" field's value of the Nlog entity. If the Nlog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NlogMutation) OldReceiver

func (m *NlogMutation) OldReceiver(ctx context.Context) (v string, err error)

OldReceiver returns the old "receiver" field's value of the Nlog entity. If the Nlog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NlogMutation) OldReceiverType

func (m *NlogMutation) OldReceiverType(ctx context.Context) (v profile.ReceiverType, err error)

OldReceiverType returns the old "receiver_type" field's value of the Nlog entity. If the Nlog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NlogMutation) OldSendAt

func (m *NlogMutation) OldSendAt(ctx context.Context) (v time.Time, err error)

OldSendAt returns the old "send_at" field's value of the Nlog entity. If the Nlog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NlogMutation) OldTenantID

func (m *NlogMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the Nlog entity. If the Nlog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NlogMutation) OldUpdatedAt

func (m *NlogMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Nlog entity. If the Nlog object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NlogMutation) Op

func (m *NlogMutation) Op() Op

Op returns the operation name.

func (*NlogMutation) Receiver

func (m *NlogMutation) Receiver() (r string, exists bool)

Receiver returns the value of the "receiver" field in the mutation.

func (*NlogMutation) ReceiverType

func (m *NlogMutation) ReceiverType() (r profile.ReceiverType, exists bool)

ReceiverType returns the value of the "receiver_type" field in the mutation.

func (*NlogMutation) RemoveAlertIDs

func (m *NlogMutation) RemoveAlertIDs(ids ...int)

RemoveAlertIDs removes the "alerts" edge to the MsgAlert entity by IDs.

func (*NlogMutation) RemoveNlogAlertIDs

func (m *NlogMutation) RemoveNlogAlertIDs(ids ...int)

RemoveNlogAlertIDs removes the "nlog_alert" edge to the NlogAlert entity by IDs.

func (*NlogMutation) RemovedAlertsIDs

func (m *NlogMutation) RemovedAlertsIDs() (ids []int)

RemovedAlerts returns the removed IDs of the "alerts" edge to the MsgAlert entity.

func (*NlogMutation) RemovedEdges

func (m *NlogMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*NlogMutation) RemovedIDs

func (m *NlogMutation) 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 (*NlogMutation) RemovedNlogAlertIDs

func (m *NlogMutation) RemovedNlogAlertIDs() (ids []int)

RemovedNlogAlert returns the removed IDs of the "nlog_alert" edge to the NlogAlert entity.

func (*NlogMutation) ResetAlerts

func (m *NlogMutation) ResetAlerts()

ResetAlerts resets all changes to the "alerts" edge.

func (*NlogMutation) ResetCreatedAt

func (m *NlogMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*NlogMutation) ResetEdge

func (m *NlogMutation) 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 (*NlogMutation) ResetExpiresAt

func (m *NlogMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*NlogMutation) ResetField

func (m *NlogMutation) 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 (*NlogMutation) ResetGroupKey

func (m *NlogMutation) ResetGroupKey()

ResetGroupKey resets all changes to the "group_key" field.

func (*NlogMutation) ResetIdx

func (m *NlogMutation) ResetIdx()

ResetIdx resets all changes to the "idx" field.

func (*NlogMutation) ResetNlogAlert

func (m *NlogMutation) ResetNlogAlert()

ResetNlogAlert resets all changes to the "nlog_alert" edge.

func (*NlogMutation) ResetReceiver

func (m *NlogMutation) ResetReceiver()

ResetReceiver resets all changes to the "receiver" field.

func (*NlogMutation) ResetReceiverType

func (m *NlogMutation) ResetReceiverType()

ResetReceiverType resets all changes to the "receiver_type" field.

func (*NlogMutation) ResetSendAt

func (m *NlogMutation) ResetSendAt()

ResetSendAt resets all changes to the "send_at" field.

func (*NlogMutation) ResetTenantID

func (m *NlogMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*NlogMutation) ResetUpdatedAt

func (m *NlogMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*NlogMutation) SendAt

func (m *NlogMutation) SendAt() (r time.Time, exists bool)

SendAt returns the value of the "send_at" field in the mutation.

func (*NlogMutation) SetCreatedAt

func (m *NlogMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*NlogMutation) SetExpiresAt

func (m *NlogMutation) SetExpiresAt(t time.Time)

SetExpiresAt sets the "expires_at" field.

func (*NlogMutation) SetField

func (m *NlogMutation) 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 (*NlogMutation) SetGroupKey

func (m *NlogMutation) SetGroupKey(s string)

SetGroupKey sets the "group_key" field.

func (*NlogMutation) SetID

func (m *NlogMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Nlog entities.

func (*NlogMutation) SetIdx

func (m *NlogMutation) SetIdx(i int)

SetIdx sets the "idx" field.

func (*NlogMutation) SetOp

func (m *NlogMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*NlogMutation) SetReceiver

func (m *NlogMutation) SetReceiver(s string)

SetReceiver sets the "receiver" field.

func (*NlogMutation) SetReceiverType

func (m *NlogMutation) SetReceiverType(pt profile.ReceiverType)

SetReceiverType sets the "receiver_type" field.

func (*NlogMutation) SetSendAt

func (m *NlogMutation) SetSendAt(t time.Time)

SetSendAt sets the "send_at" field.

func (*NlogMutation) SetTenantID

func (m *NlogMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*NlogMutation) SetUpdatedAt

func (m *NlogMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*NlogMutation) TenantID

func (m *NlogMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (NlogMutation) Tx

func (m NlogMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*NlogMutation) Type

func (m *NlogMutation) Type() string

Type returns the node type of this mutation (Nlog).

func (*NlogMutation) UpdatedAt

func (m *NlogMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*NlogMutation) UpdatedAtCleared

func (m *NlogMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*NlogMutation) Where

func (m *NlogMutation) Where(ps ...predicate.Nlog)

Where appends a list predicates to the NlogMutation builder.

func (*NlogMutation) WhereP

func (m *NlogMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the NlogMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type NlogOrder

type NlogOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *NlogOrderField `json:"field"`
}

NlogOrder defines the ordering of Nlog.

type NlogOrderField

type NlogOrderField struct {
	// Value extracts the ordering value from the given Nlog.
	Value func(*Nlog) (ent.Value, error)
	// contains filtered or unexported fields
}

NlogOrderField defines the ordering field of Nlog.

func (NlogOrderField) MarshalGQL

func (f NlogOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (NlogOrderField) String

func (f NlogOrderField) String() string

String implement fmt.Stringer interface.

func (*NlogOrderField) UnmarshalGQL

func (f *NlogOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type NlogPaginateOption

type NlogPaginateOption func(*nlogPager) error

NlogPaginateOption enables pagination customization.

func WithNlogFilter

func WithNlogFilter(filter func(*NlogQuery) (*NlogQuery, error)) NlogPaginateOption

WithNlogFilter configures pagination filter.

func WithNlogOrder

func WithNlogOrder(order *NlogOrder) NlogPaginateOption

WithNlogOrder configures pagination ordering.

type NlogQuery

type NlogQuery struct {
	// contains filtered or unexported fields
}

NlogQuery is the builder for querying Nlog entities.

func (*NlogQuery) Aggregate

func (nq *NlogQuery) Aggregate(fns ...AggregateFunc) *NlogSelect

Aggregate returns a NlogSelect configured with the given aggregations.

func (*NlogQuery) All

func (nq *NlogQuery) All(ctx context.Context) ([]*Nlog, error)

All executes the query and returns a list of Nlogs.

func (*NlogQuery) AllX

func (nq *NlogQuery) AllX(ctx context.Context) []*Nlog

AllX is like All, but panics if an error occurs.

func (*NlogQuery) Clone

func (nq *NlogQuery) Clone() *NlogQuery

Clone returns a duplicate of the NlogQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*NlogQuery) CollectFields

func (n *NlogQuery) CollectFields(ctx context.Context, satisfies ...string) (*NlogQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*NlogQuery) Count

func (nq *NlogQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NlogQuery) CountX

func (nq *NlogQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*NlogQuery) Exist

func (nq *NlogQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*NlogQuery) ExistX

func (nq *NlogQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*NlogQuery) First

func (nq *NlogQuery) First(ctx context.Context) (*Nlog, error)

First returns the first Nlog entity from the query. Returns a *NotFoundError when no Nlog was found.

func (*NlogQuery) FirstID

func (nq *NlogQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Nlog ID from the query. Returns a *NotFoundError when no Nlog ID was found.

func (*NlogQuery) FirstIDX

func (nq *NlogQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*NlogQuery) FirstX

func (nq *NlogQuery) FirstX(ctx context.Context) *Nlog

FirstX is like First, but panics if an error occurs.

func (*NlogQuery) GroupBy

func (nq *NlogQuery) GroupBy(field string, fields ...string) *NlogGroupBy

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 {
	TenantID int `json:"tenant_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Nlog.Query().
	GroupBy(nlog.FieldTenantID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NlogQuery) IDs

func (nq *NlogQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Nlog IDs.

func (*NlogQuery) IDsX

func (nq *NlogQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*NlogQuery) Limit

func (nq *NlogQuery) Limit(limit int) *NlogQuery

Limit the number of records to be returned by this query.

func (*NlogQuery) Offset

func (nq *NlogQuery) Offset(offset int) *NlogQuery

Offset to start from.

func (*NlogQuery) Only

func (nq *NlogQuery) Only(ctx context.Context) (*Nlog, error)

Only returns a single Nlog entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Nlog entity is found. Returns a *NotFoundError when no Nlog entities are found.

func (*NlogQuery) OnlyID

func (nq *NlogQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Nlog ID in the query. Returns a *NotSingularError when more than one Nlog ID is found. Returns a *NotFoundError when no entities are found.

func (*NlogQuery) OnlyIDX

func (nq *NlogQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*NlogQuery) OnlyX

func (nq *NlogQuery) OnlyX(ctx context.Context) *Nlog

OnlyX is like Only, but panics if an error occurs.

func (*NlogQuery) Order

func (nq *NlogQuery) Order(o ...nlog.OrderOption) *NlogQuery

Order specifies how the records should be ordered.

func (*NlogQuery) Paginate

func (n *NlogQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...NlogPaginateOption,
) (*NlogConnection, error)

Paginate executes the query and returns a relay based cursor connection to Nlog.

func (*NlogQuery) QueryAlerts

func (nq *NlogQuery) QueryAlerts() *MsgAlertQuery

QueryAlerts chains the current query on the "alerts" edge.

func (*NlogQuery) QueryNlogAlert

func (nq *NlogQuery) QueryNlogAlert() *NlogAlertQuery

QueryNlogAlert chains the current query on the "nlog_alert" edge.

func (*NlogQuery) Select

func (nq *NlogQuery) Select(fields ...string) *NlogSelect

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 {
	TenantID int `json:"tenant_id,omitempty"`
}

client.Nlog.Query().
	Select(nlog.FieldTenantID).
	Scan(ctx, &v)

func (*NlogQuery) Unique

func (nq *NlogQuery) Unique(unique bool) *NlogQuery

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 (*NlogQuery) Where

func (nq *NlogQuery) Where(ps ...predicate.Nlog) *NlogQuery

Where adds a new predicate for the NlogQuery builder.

func (*NlogQuery) WithAlerts

func (nq *NlogQuery) WithAlerts(opts ...func(*MsgAlertQuery)) *NlogQuery

WithAlerts tells the query-builder to eager-load the nodes that are connected to the "alerts" edge. The optional arguments are used to configure the query builder of the edge.

func (*NlogQuery) WithNamedAlerts

func (nq *NlogQuery) WithNamedAlerts(name string, opts ...func(*MsgAlertQuery)) *NlogQuery

WithNamedAlerts tells the query-builder to eager-load the nodes that are connected to the "alerts" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*NlogQuery) WithNamedNlogAlert

func (nq *NlogQuery) WithNamedNlogAlert(name string, opts ...func(*NlogAlertQuery)) *NlogQuery

WithNamedNlogAlert tells the query-builder to eager-load the nodes that are connected to the "nlog_alert" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*NlogQuery) WithNlogAlert

func (nq *NlogQuery) WithNlogAlert(opts ...func(*NlogAlertQuery)) *NlogQuery

WithNlogAlert tells the query-builder to eager-load the nodes that are connected to the "nlog_alert" edge. The optional arguments are used to configure the query builder of the edge.

type NlogSelect

type NlogSelect struct {
	*NlogQuery
	// contains filtered or unexported fields
}

NlogSelect is the builder for selecting fields of Nlog entities.

func (*NlogSelect) Aggregate

func (ns *NlogSelect) Aggregate(fns ...AggregateFunc) *NlogSelect

Aggregate adds the given aggregation functions to the selector query.

func (*NlogSelect) Bool

func (s *NlogSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NlogSelect) BoolX

func (s *NlogSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NlogSelect) Bools

func (s *NlogSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NlogSelect) BoolsX

func (s *NlogSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NlogSelect) Float64

func (s *NlogSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NlogSelect) Float64X

func (s *NlogSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NlogSelect) Float64s

func (s *NlogSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NlogSelect) Float64sX

func (s *NlogSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NlogSelect) Int

func (s *NlogSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NlogSelect) IntX

func (s *NlogSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NlogSelect) Ints

func (s *NlogSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NlogSelect) IntsX

func (s *NlogSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NlogSelect) Scan

func (ns *NlogSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*NlogSelect) ScanX

func (s *NlogSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*NlogSelect) String

func (s *NlogSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NlogSelect) StringX

func (s *NlogSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NlogSelect) Strings

func (s *NlogSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NlogSelect) StringsX

func (s *NlogSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NlogUpdate

type NlogUpdate struct {
	// contains filtered or unexported fields
}

NlogUpdate is the builder for updating Nlog entities.

func (*NlogUpdate) AddAlertIDs

func (nu *NlogUpdate) AddAlertIDs(ids ...int) *NlogUpdate

AddAlertIDs adds the "alerts" edge to the MsgAlert entity by IDs.

func (*NlogUpdate) AddAlerts

func (nu *NlogUpdate) AddAlerts(m ...*MsgAlert) *NlogUpdate

AddAlerts adds the "alerts" edges to the MsgAlert entity.

func (*NlogUpdate) AddIdx

func (nu *NlogUpdate) AddIdx(i int) *NlogUpdate

AddIdx adds i to the "idx" field.

func (*NlogUpdate) AddNlogAlert

func (nu *NlogUpdate) AddNlogAlert(n ...*NlogAlert) *NlogUpdate

AddNlogAlert adds the "nlog_alert" edges to the NlogAlert entity.

func (*NlogUpdate) AddNlogAlertIDs

func (nu *NlogUpdate) AddNlogAlertIDs(ids ...int) *NlogUpdate

AddNlogAlertIDs adds the "nlog_alert" edge to the NlogAlert entity by IDs.

func (*NlogUpdate) ClearAlerts

func (nu *NlogUpdate) ClearAlerts() *NlogUpdate

ClearAlerts clears all "alerts" edges to the MsgAlert entity.

func (*NlogUpdate) ClearNlogAlert

func (nu *NlogUpdate) ClearNlogAlert() *NlogUpdate

ClearNlogAlert clears all "nlog_alert" edges to the NlogAlert entity.

func (*NlogUpdate) ClearUpdatedAt

func (nu *NlogUpdate) ClearUpdatedAt() *NlogUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NlogUpdate) Exec

func (nu *NlogUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*NlogUpdate) ExecX

func (nu *NlogUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogUpdate) Mutation

func (nu *NlogUpdate) Mutation() *NlogMutation

Mutation returns the NlogMutation object of the builder.

func (*NlogUpdate) RemoveAlertIDs

func (nu *NlogUpdate) RemoveAlertIDs(ids ...int) *NlogUpdate

RemoveAlertIDs removes the "alerts" edge to MsgAlert entities by IDs.

func (*NlogUpdate) RemoveAlerts

func (nu *NlogUpdate) RemoveAlerts(m ...*MsgAlert) *NlogUpdate

RemoveAlerts removes "alerts" edges to MsgAlert entities.

func (*NlogUpdate) RemoveNlogAlert

func (nu *NlogUpdate) RemoveNlogAlert(n ...*NlogAlert) *NlogUpdate

RemoveNlogAlert removes "nlog_alert" edges to NlogAlert entities.

func (*NlogUpdate) RemoveNlogAlertIDs

func (nu *NlogUpdate) RemoveNlogAlertIDs(ids ...int) *NlogUpdate

RemoveNlogAlertIDs removes the "nlog_alert" edge to NlogAlert entities by IDs.

func (*NlogUpdate) Save

func (nu *NlogUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*NlogUpdate) SaveX

func (nu *NlogUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*NlogUpdate) SetExpiresAt

func (nu *NlogUpdate) SetExpiresAt(t time.Time) *NlogUpdate

SetExpiresAt sets the "expires_at" field.

func (*NlogUpdate) SetGroupKey

func (nu *NlogUpdate) SetGroupKey(s string) *NlogUpdate

SetGroupKey sets the "group_key" field.

func (*NlogUpdate) SetIdx

func (nu *NlogUpdate) SetIdx(i int) *NlogUpdate

SetIdx sets the "idx" field.

func (*NlogUpdate) SetNillableUpdatedAt

func (nu *NlogUpdate) SetNillableUpdatedAt(t *time.Time) *NlogUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*NlogUpdate) SetReceiver

func (nu *NlogUpdate) SetReceiver(s string) *NlogUpdate

SetReceiver sets the "receiver" field.

func (*NlogUpdate) SetReceiverType

func (nu *NlogUpdate) SetReceiverType(pt profile.ReceiverType) *NlogUpdate

SetReceiverType sets the "receiver_type" field.

func (*NlogUpdate) SetSendAt

func (nu *NlogUpdate) SetSendAt(t time.Time) *NlogUpdate

SetSendAt sets the "send_at" field.

func (*NlogUpdate) SetUpdatedAt

func (nu *NlogUpdate) SetUpdatedAt(t time.Time) *NlogUpdate

SetUpdatedAt sets the "updated_at" field.

func (*NlogUpdate) Where

func (nu *NlogUpdate) Where(ps ...predicate.Nlog) *NlogUpdate

Where appends a list predicates to the NlogUpdate builder.

type NlogUpdateOne

type NlogUpdateOne struct {
	// contains filtered or unexported fields
}

NlogUpdateOne is the builder for updating a single Nlog entity.

func (*NlogUpdateOne) AddAlertIDs

func (nuo *NlogUpdateOne) AddAlertIDs(ids ...int) *NlogUpdateOne

AddAlertIDs adds the "alerts" edge to the MsgAlert entity by IDs.

func (*NlogUpdateOne) AddAlerts

func (nuo *NlogUpdateOne) AddAlerts(m ...*MsgAlert) *NlogUpdateOne

AddAlerts adds the "alerts" edges to the MsgAlert entity.

func (*NlogUpdateOne) AddIdx

func (nuo *NlogUpdateOne) AddIdx(i int) *NlogUpdateOne

AddIdx adds i to the "idx" field.

func (*NlogUpdateOne) AddNlogAlert

func (nuo *NlogUpdateOne) AddNlogAlert(n ...*NlogAlert) *NlogUpdateOne

AddNlogAlert adds the "nlog_alert" edges to the NlogAlert entity.

func (*NlogUpdateOne) AddNlogAlertIDs

func (nuo *NlogUpdateOne) AddNlogAlertIDs(ids ...int) *NlogUpdateOne

AddNlogAlertIDs adds the "nlog_alert" edge to the NlogAlert entity by IDs.

func (*NlogUpdateOne) ClearAlerts

func (nuo *NlogUpdateOne) ClearAlerts() *NlogUpdateOne

ClearAlerts clears all "alerts" edges to the MsgAlert entity.

func (*NlogUpdateOne) ClearNlogAlert

func (nuo *NlogUpdateOne) ClearNlogAlert() *NlogUpdateOne

ClearNlogAlert clears all "nlog_alert" edges to the NlogAlert entity.

func (*NlogUpdateOne) ClearUpdatedAt

func (nuo *NlogUpdateOne) ClearUpdatedAt() *NlogUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NlogUpdateOne) Exec

func (nuo *NlogUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*NlogUpdateOne) ExecX

func (nuo *NlogUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogUpdateOne) Mutation

func (nuo *NlogUpdateOne) Mutation() *NlogMutation

Mutation returns the NlogMutation object of the builder.

func (*NlogUpdateOne) RemoveAlertIDs

func (nuo *NlogUpdateOne) RemoveAlertIDs(ids ...int) *NlogUpdateOne

RemoveAlertIDs removes the "alerts" edge to MsgAlert entities by IDs.

func (*NlogUpdateOne) RemoveAlerts

func (nuo *NlogUpdateOne) RemoveAlerts(m ...*MsgAlert) *NlogUpdateOne

RemoveAlerts removes "alerts" edges to MsgAlert entities.

func (*NlogUpdateOne) RemoveNlogAlert

func (nuo *NlogUpdateOne) RemoveNlogAlert(n ...*NlogAlert) *NlogUpdateOne

RemoveNlogAlert removes "nlog_alert" edges to NlogAlert entities.

func (*NlogUpdateOne) RemoveNlogAlertIDs

func (nuo *NlogUpdateOne) RemoveNlogAlertIDs(ids ...int) *NlogUpdateOne

RemoveNlogAlertIDs removes the "nlog_alert" edge to NlogAlert entities by IDs.

func (*NlogUpdateOne) Save

func (nuo *NlogUpdateOne) Save(ctx context.Context) (*Nlog, error)

Save executes the query and returns the updated Nlog entity.

func (*NlogUpdateOne) SaveX

func (nuo *NlogUpdateOne) SaveX(ctx context.Context) *Nlog

SaveX is like Save, but panics if an error occurs.

func (*NlogUpdateOne) Select

func (nuo *NlogUpdateOne) Select(field string, fields ...string) *NlogUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*NlogUpdateOne) SetExpiresAt

func (nuo *NlogUpdateOne) SetExpiresAt(t time.Time) *NlogUpdateOne

SetExpiresAt sets the "expires_at" field.

func (*NlogUpdateOne) SetGroupKey

func (nuo *NlogUpdateOne) SetGroupKey(s string) *NlogUpdateOne

SetGroupKey sets the "group_key" field.

func (*NlogUpdateOne) SetIdx

func (nuo *NlogUpdateOne) SetIdx(i int) *NlogUpdateOne

SetIdx sets the "idx" field.

func (*NlogUpdateOne) SetNillableUpdatedAt

func (nuo *NlogUpdateOne) SetNillableUpdatedAt(t *time.Time) *NlogUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*NlogUpdateOne) SetReceiver

func (nuo *NlogUpdateOne) SetReceiver(s string) *NlogUpdateOne

SetReceiver sets the "receiver" field.

func (*NlogUpdateOne) SetReceiverType

func (nuo *NlogUpdateOne) SetReceiverType(pt profile.ReceiverType) *NlogUpdateOne

SetReceiverType sets the "receiver_type" field.

func (*NlogUpdateOne) SetSendAt

func (nuo *NlogUpdateOne) SetSendAt(t time.Time) *NlogUpdateOne

SetSendAt sets the "send_at" field.

func (*NlogUpdateOne) SetUpdatedAt

func (nuo *NlogUpdateOne) SetUpdatedAt(t time.Time) *NlogUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*NlogUpdateOne) Where

func (nuo *NlogUpdateOne) Where(ps ...predicate.Nlog) *NlogUpdateOne

Where appends a list predicates to the NlogUpdate builder.

type NlogUpsert

type NlogUpsert struct {
	*sql.UpdateSet
}

NlogUpsert is the "OnConflict" setter.

func (*NlogUpsert) AddIdx

func (u *NlogUpsert) AddIdx(v int) *NlogUpsert

AddIdx adds v to the "idx" field.

func (*NlogUpsert) ClearUpdatedAt

func (u *NlogUpsert) ClearUpdatedAt() *NlogUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NlogUpsert) SetExpiresAt

func (u *NlogUpsert) SetExpiresAt(v time.Time) *NlogUpsert

SetExpiresAt sets the "expires_at" field.

func (*NlogUpsert) SetGroupKey

func (u *NlogUpsert) SetGroupKey(v string) *NlogUpsert

SetGroupKey sets the "group_key" field.

func (*NlogUpsert) SetIdx

func (u *NlogUpsert) SetIdx(v int) *NlogUpsert

SetIdx sets the "idx" field.

func (*NlogUpsert) SetReceiver

func (u *NlogUpsert) SetReceiver(v string) *NlogUpsert

SetReceiver sets the "receiver" field.

func (*NlogUpsert) SetReceiverType

func (u *NlogUpsert) SetReceiverType(v profile.ReceiverType) *NlogUpsert

SetReceiverType sets the "receiver_type" field.

func (*NlogUpsert) SetSendAt

func (u *NlogUpsert) SetSendAt(v time.Time) *NlogUpsert

SetSendAt sets the "send_at" field.

func (*NlogUpsert) SetUpdatedAt

func (u *NlogUpsert) SetUpdatedAt(v time.Time) *NlogUpsert

SetUpdatedAt sets the "updated_at" field.

func (*NlogUpsert) UpdateExpiresAt

func (u *NlogUpsert) UpdateExpiresAt() *NlogUpsert

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*NlogUpsert) UpdateGroupKey

func (u *NlogUpsert) UpdateGroupKey() *NlogUpsert

UpdateGroupKey sets the "group_key" field to the value that was provided on create.

func (*NlogUpsert) UpdateIdx

func (u *NlogUpsert) UpdateIdx() *NlogUpsert

UpdateIdx sets the "idx" field to the value that was provided on create.

func (*NlogUpsert) UpdateReceiver

func (u *NlogUpsert) UpdateReceiver() *NlogUpsert

UpdateReceiver sets the "receiver" field to the value that was provided on create.

func (*NlogUpsert) UpdateReceiverType

func (u *NlogUpsert) UpdateReceiverType() *NlogUpsert

UpdateReceiverType sets the "receiver_type" field to the value that was provided on create.

func (*NlogUpsert) UpdateSendAt

func (u *NlogUpsert) UpdateSendAt() *NlogUpsert

UpdateSendAt sets the "send_at" field to the value that was provided on create.

func (*NlogUpsert) UpdateUpdatedAt

func (u *NlogUpsert) UpdateUpdatedAt() *NlogUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type NlogUpsertBulk

type NlogUpsertBulk struct {
	// contains filtered or unexported fields
}

NlogUpsertBulk is the builder for "upsert"-ing a bulk of Nlog nodes.

func (*NlogUpsertBulk) AddIdx

func (u *NlogUpsertBulk) AddIdx(v int) *NlogUpsertBulk

AddIdx adds v to the "idx" field.

func (*NlogUpsertBulk) ClearUpdatedAt

func (u *NlogUpsertBulk) ClearUpdatedAt() *NlogUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NlogUpsertBulk) DoNothing

func (u *NlogUpsertBulk) DoNothing() *NlogUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NlogUpsertBulk) Exec

func (u *NlogUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*NlogUpsertBulk) ExecX

func (u *NlogUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogUpsertBulk) Ignore

func (u *NlogUpsertBulk) Ignore() *NlogUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Nlog.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*NlogUpsertBulk) SetExpiresAt

func (u *NlogUpsertBulk) SetExpiresAt(v time.Time) *NlogUpsertBulk

SetExpiresAt sets the "expires_at" field.

func (*NlogUpsertBulk) SetGroupKey

func (u *NlogUpsertBulk) SetGroupKey(v string) *NlogUpsertBulk

SetGroupKey sets the "group_key" field.

func (*NlogUpsertBulk) SetIdx

func (u *NlogUpsertBulk) SetIdx(v int) *NlogUpsertBulk

SetIdx sets the "idx" field.

func (*NlogUpsertBulk) SetReceiver

func (u *NlogUpsertBulk) SetReceiver(v string) *NlogUpsertBulk

SetReceiver sets the "receiver" field.

func (*NlogUpsertBulk) SetReceiverType

func (u *NlogUpsertBulk) SetReceiverType(v profile.ReceiverType) *NlogUpsertBulk

SetReceiverType sets the "receiver_type" field.

func (*NlogUpsertBulk) SetSendAt

func (u *NlogUpsertBulk) SetSendAt(v time.Time) *NlogUpsertBulk

SetSendAt sets the "send_at" field.

func (*NlogUpsertBulk) SetUpdatedAt

func (u *NlogUpsertBulk) SetUpdatedAt(v time.Time) *NlogUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*NlogUpsertBulk) Update

func (u *NlogUpsertBulk) Update(set func(*NlogUpsert)) *NlogUpsertBulk

Update allows overriding fields `UPDATE` values. See the NlogCreateBulk.OnConflict documentation for more info.

func (*NlogUpsertBulk) UpdateExpiresAt

func (u *NlogUpsertBulk) UpdateExpiresAt() *NlogUpsertBulk

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*NlogUpsertBulk) UpdateGroupKey

func (u *NlogUpsertBulk) UpdateGroupKey() *NlogUpsertBulk

UpdateGroupKey sets the "group_key" field to the value that was provided on create.

func (*NlogUpsertBulk) UpdateIdx

func (u *NlogUpsertBulk) UpdateIdx() *NlogUpsertBulk

UpdateIdx sets the "idx" field to the value that was provided on create.

func (*NlogUpsertBulk) UpdateNewValues

func (u *NlogUpsertBulk) UpdateNewValues() *NlogUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Nlog.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(nlog.FieldID)
		}),
	).
	Exec(ctx)

func (*NlogUpsertBulk) UpdateReceiver

func (u *NlogUpsertBulk) UpdateReceiver() *NlogUpsertBulk

UpdateReceiver sets the "receiver" field to the value that was provided on create.

func (*NlogUpsertBulk) UpdateReceiverType

func (u *NlogUpsertBulk) UpdateReceiverType() *NlogUpsertBulk

UpdateReceiverType sets the "receiver_type" field to the value that was provided on create.

func (*NlogUpsertBulk) UpdateSendAt

func (u *NlogUpsertBulk) UpdateSendAt() *NlogUpsertBulk

UpdateSendAt sets the "send_at" field to the value that was provided on create.

func (*NlogUpsertBulk) UpdateUpdatedAt

func (u *NlogUpsertBulk) UpdateUpdatedAt() *NlogUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type NlogUpsertOne

type NlogUpsertOne struct {
	// contains filtered or unexported fields
}

NlogUpsertOne is the builder for "upsert"-ing

one Nlog node.

func (*NlogUpsertOne) AddIdx

func (u *NlogUpsertOne) AddIdx(v int) *NlogUpsertOne

AddIdx adds v to the "idx" field.

func (*NlogUpsertOne) ClearUpdatedAt

func (u *NlogUpsertOne) ClearUpdatedAt() *NlogUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*NlogUpsertOne) DoNothing

func (u *NlogUpsertOne) DoNothing() *NlogUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*NlogUpsertOne) Exec

func (u *NlogUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*NlogUpsertOne) ExecX

func (u *NlogUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NlogUpsertOne) ID

func (u *NlogUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*NlogUpsertOne) IDX

func (u *NlogUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*NlogUpsertOne) Ignore

func (u *NlogUpsertOne) Ignore() *NlogUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Nlog.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*NlogUpsertOne) SetExpiresAt

func (u *NlogUpsertOne) SetExpiresAt(v time.Time) *NlogUpsertOne

SetExpiresAt sets the "expires_at" field.

func (*NlogUpsertOne) SetGroupKey

func (u *NlogUpsertOne) SetGroupKey(v string) *NlogUpsertOne

SetGroupKey sets the "group_key" field.

func (*NlogUpsertOne) SetIdx

func (u *NlogUpsertOne) SetIdx(v int) *NlogUpsertOne

SetIdx sets the "idx" field.

func (*NlogUpsertOne) SetReceiver

func (u *NlogUpsertOne) SetReceiver(v string) *NlogUpsertOne

SetReceiver sets the "receiver" field.

func (*NlogUpsertOne) SetReceiverType

func (u *NlogUpsertOne) SetReceiverType(v profile.ReceiverType) *NlogUpsertOne

SetReceiverType sets the "receiver_type" field.

func (*NlogUpsertOne) SetSendAt

func (u *NlogUpsertOne) SetSendAt(v time.Time) *NlogUpsertOne

SetSendAt sets the "send_at" field.

func (*NlogUpsertOne) SetUpdatedAt

func (u *NlogUpsertOne) SetUpdatedAt(v time.Time) *NlogUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*NlogUpsertOne) Update

func (u *NlogUpsertOne) Update(set func(*NlogUpsert)) *NlogUpsertOne

Update allows overriding fields `UPDATE` values. See the NlogCreate.OnConflict documentation for more info.

func (*NlogUpsertOne) UpdateExpiresAt

func (u *NlogUpsertOne) UpdateExpiresAt() *NlogUpsertOne

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*NlogUpsertOne) UpdateGroupKey

func (u *NlogUpsertOne) UpdateGroupKey() *NlogUpsertOne

UpdateGroupKey sets the "group_key" field to the value that was provided on create.

func (*NlogUpsertOne) UpdateIdx

func (u *NlogUpsertOne) UpdateIdx() *NlogUpsertOne

UpdateIdx sets the "idx" field to the value that was provided on create.

func (*NlogUpsertOne) UpdateNewValues

func (u *NlogUpsertOne) UpdateNewValues() *NlogUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Nlog.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(nlog.FieldID)
		}),
	).
	Exec(ctx)

func (*NlogUpsertOne) UpdateReceiver

func (u *NlogUpsertOne) UpdateReceiver() *NlogUpsertOne

UpdateReceiver sets the "receiver" field to the value that was provided on create.

func (*NlogUpsertOne) UpdateReceiverType

func (u *NlogUpsertOne) UpdateReceiverType() *NlogUpsertOne

UpdateReceiverType sets the "receiver_type" field to the value that was provided on create.

func (*NlogUpsertOne) UpdateSendAt

func (u *NlogUpsertOne) UpdateSendAt() *NlogUpsertOne

UpdateSendAt sets the "send_at" field to the value that was provided on create.

func (*NlogUpsertOne) UpdateUpdatedAt

func (u *NlogUpsertOne) UpdateUpdatedAt() *NlogUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

type NlogWhereInput

type NlogWhereInput struct {
	Predicates []predicate.Nlog  `json:"-"`
	Not        *NlogWhereInput   `json:"not,omitempty"`
	Or         []*NlogWhereInput `json:"or,omitempty"`
	And        []*NlogWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "group_key" field predicates.
	GroupKey             *string  `json:"groupKey,omitempty"`
	GroupKeyNEQ          *string  `json:"groupKeyNEQ,omitempty"`
	GroupKeyIn           []string `json:"groupKeyIn,omitempty"`
	GroupKeyNotIn        []string `json:"groupKeyNotIn,omitempty"`
	GroupKeyGT           *string  `json:"groupKeyGT,omitempty"`
	GroupKeyGTE          *string  `json:"groupKeyGTE,omitempty"`
	GroupKeyLT           *string  `json:"groupKeyLT,omitempty"`
	GroupKeyLTE          *string  `json:"groupKeyLTE,omitempty"`
	GroupKeyContains     *string  `json:"groupKeyContains,omitempty"`
	GroupKeyHasPrefix    *string  `json:"groupKeyHasPrefix,omitempty"`
	GroupKeyHasSuffix    *string  `json:"groupKeyHasSuffix,omitempty"`
	GroupKeyEqualFold    *string  `json:"groupKeyEqualFold,omitempty"`
	GroupKeyContainsFold *string  `json:"groupKeyContainsFold,omitempty"`

	// "receiver" field predicates.
	Receiver             *string  `json:"receiver,omitempty"`
	ReceiverNEQ          *string  `json:"receiverNEQ,omitempty"`
	ReceiverIn           []string `json:"receiverIn,omitempty"`
	ReceiverNotIn        []string `json:"receiverNotIn,omitempty"`
	ReceiverGT           *string  `json:"receiverGT,omitempty"`
	ReceiverGTE          *string  `json:"receiverGTE,omitempty"`
	ReceiverLT           *string  `json:"receiverLT,omitempty"`
	ReceiverLTE          *string  `json:"receiverLTE,omitempty"`
	ReceiverContains     *string  `json:"receiverContains,omitempty"`
	ReceiverHasPrefix    *string  `json:"receiverHasPrefix,omitempty"`
	ReceiverHasSuffix    *string  `json:"receiverHasSuffix,omitempty"`
	ReceiverEqualFold    *string  `json:"receiverEqualFold,omitempty"`
	ReceiverContainsFold *string  `json:"receiverContainsFold,omitempty"`

	// "receiver_type" field predicates.
	ReceiverType      *profile.ReceiverType  `json:"receiverType,omitempty"`
	ReceiverTypeNEQ   *profile.ReceiverType  `json:"receiverTypeNEQ,omitempty"`
	ReceiverTypeIn    []profile.ReceiverType `json:"receiverTypeIn,omitempty"`
	ReceiverTypeNotIn []profile.ReceiverType `json:"receiverTypeNotIn,omitempty"`

	// "idx" field predicates.
	Idx      *int  `json:"idx,omitempty"`
	IdxNEQ   *int  `json:"idxNEQ,omitempty"`
	IdxIn    []int `json:"idxIn,omitempty"`
	IdxNotIn []int `json:"idxNotIn,omitempty"`
	IdxGT    *int  `json:"idxGT,omitempty"`
	IdxGTE   *int  `json:"idxGTE,omitempty"`
	IdxLT    *int  `json:"idxLT,omitempty"`
	IdxLTE   *int  `json:"idxLTE,omitempty"`

	// "send_at" field predicates.
	SendAt      *time.Time  `json:"sendAt,omitempty"`
	SendAtNEQ   *time.Time  `json:"sendAtNEQ,omitempty"`
	SendAtIn    []time.Time `json:"sendAtIn,omitempty"`
	SendAtNotIn []time.Time `json:"sendAtNotIn,omitempty"`
	SendAtGT    *time.Time  `json:"sendAtGT,omitempty"`
	SendAtGTE   *time.Time  `json:"sendAtGTE,omitempty"`
	SendAtLT    *time.Time  `json:"sendAtLT,omitempty"`
	SendAtLTE   *time.Time  `json:"sendAtLTE,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "expires_at" field predicates.
	ExpiresAt      *time.Time  `json:"expiresAt,omitempty"`
	ExpiresAtNEQ   *time.Time  `json:"expiresAtNEQ,omitempty"`
	ExpiresAtIn    []time.Time `json:"expiresAtIn,omitempty"`
	ExpiresAtNotIn []time.Time `json:"expiresAtNotIn,omitempty"`
	ExpiresAtGT    *time.Time  `json:"expiresAtGT,omitempty"`
	ExpiresAtGTE   *time.Time  `json:"expiresAtGTE,omitempty"`
	ExpiresAtLT    *time.Time  `json:"expiresAtLT,omitempty"`
	ExpiresAtLTE   *time.Time  `json:"expiresAtLTE,omitempty"`

	// "alerts" edge predicates.
	HasAlerts     *bool                 `json:"hasAlerts,omitempty"`
	HasAlertsWith []*MsgAlertWhereInput `json:"hasAlertsWith,omitempty"`

	// "nlog_alert" edge predicates.
	HasNlogAlert     *bool                  `json:"hasNlogAlert,omitempty"`
	HasNlogAlertWith []*NlogAlertWhereInput `json:"hasNlogAlertWith,omitempty"`
}

NlogWhereInput represents a where input for filtering Nlog queries.

func (*NlogWhereInput) AddPredicates

func (i *NlogWhereInput) AddPredicates(predicates ...predicate.Nlog)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*NlogWhereInput) Filter

func (i *NlogWhereInput) Filter(q *NlogQuery) (*NlogQuery, error)

Filter applies the NlogWhereInput filter on the NlogQuery builder.

func (*NlogWhereInput) P

func (i *NlogWhereInput) P() (predicate.Nlog, error)

P returns a predicate for filtering nlogs. An error is returned if the input is empty or invalid.

type Nlogs

type Nlogs []*Nlog

Nlogs is a parsable slice of Nlog.

type NodeOption

type NodeOption func(*nodeOptions)

NodeOption allows configuring the Noder execution using functional options.

func WithFixedNodeType

func WithFixedNodeType(t string) NodeOption

WithFixedNodeType sets the Type of the node to a fixed value.

func WithNodeType

func WithNodeType(f func(context.Context, int) (string, error)) NodeOption

WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.

type Noder

type Noder interface {
	IsNode()
}

Noder wraps the basic Node method.

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 AlternateSchema

func AlternateSchema(schemaConfig SchemaConfig) Option

AlternateSchemas allows alternate schema names to be passed into ent operations.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...any)) Option

Log sets the logging function for debug mode.

type OrderDirection

type OrderDirection = entgql.OrderDirection

Common entgql types.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.

type OrgRoleUser

type OrgRoleUser struct {

	// ID of the ent.
	// ID
	ID int `json:"id,omitempty"`
	// 组织角色ID
	OrgRoleID int `json:"org_role_id,omitempty"`
	// 组织用户ID
	OrgUserID int `json:"org_user_id,omitempty"`
	// 组织ID
	OrgID int `json:"org_id,omitempty"`
	// 用户ID
	UserID int `json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

OrgRoleUser is the model entity for the OrgRoleUser schema.

func (*OrgRoleUser) String

func (oru *OrgRoleUser) String() string

String implements the fmt.Stringer.

func (*OrgRoleUser) Unwrap

func (oru *OrgRoleUser) Unwrap() *OrgRoleUser

Unwrap unwraps the OrgRoleUser 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 (*OrgRoleUser) Update

func (oru *OrgRoleUser) Update() *OrgRoleUserUpdateOne

Update returns a builder for updating this OrgRoleUser. Note that you need to call OrgRoleUser.Unwrap() before calling this method if this OrgRoleUser was returned from a transaction, and the transaction was committed or rolled back.

func (*OrgRoleUser) Value

func (oru *OrgRoleUser) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the OrgRoleUser. This includes values selected through modifiers, order, etc.

type OrgRoleUserClient

type OrgRoleUserClient struct {
	// contains filtered or unexported fields
}

OrgRoleUserClient is a client for the OrgRoleUser schema.

func NewOrgRoleUserClient

func NewOrgRoleUserClient(c config) *OrgRoleUserClient

NewOrgRoleUserClient returns a client for the OrgRoleUser from the given config.

func (*OrgRoleUserClient) Create

func (c *OrgRoleUserClient) Create() *OrgRoleUserCreate

Create returns a builder for creating a OrgRoleUser entity.

func (*OrgRoleUserClient) CreateBulk

func (c *OrgRoleUserClient) CreateBulk(builders ...*OrgRoleUserCreate) *OrgRoleUserCreateBulk

CreateBulk returns a builder for creating a bulk of OrgRoleUser entities.

func (*OrgRoleUserClient) Delete

func (c *OrgRoleUserClient) Delete() *OrgRoleUserDelete

Delete returns a delete builder for OrgRoleUser.

func (*OrgRoleUserClient) DeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*OrgRoleUserClient) DeleteOneID

func (c *OrgRoleUserClient) DeleteOneID(id int) *OrgRoleUserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*OrgRoleUserClient) Get

func (c *OrgRoleUserClient) Get(ctx context.Context, id int) (*OrgRoleUser, error)

Get returns a OrgRoleUser entity by its id.

func (*OrgRoleUserClient) GetX

func (c *OrgRoleUserClient) GetX(ctx context.Context, id int) *OrgRoleUser

GetX is like Get, but panics if an error occurs.

func (*OrgRoleUserClient) Hooks

func (c *OrgRoleUserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*OrgRoleUserClient) Intercept

func (c *OrgRoleUserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `orgroleuser.Intercept(f(g(h())))`.

func (*OrgRoleUserClient) Interceptors

func (c *OrgRoleUserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*OrgRoleUserClient) MapCreateBulk

func (c *OrgRoleUserClient) MapCreateBulk(slice any, setFunc func(*OrgRoleUserCreate, int)) *OrgRoleUserCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*OrgRoleUserClient) Query

func (c *OrgRoleUserClient) Query() *OrgRoleUserQuery

Query returns a query builder for OrgRoleUser.

func (*OrgRoleUserClient) Update

func (c *OrgRoleUserClient) Update() *OrgRoleUserUpdate

Update returns an update builder for OrgRoleUser.

func (*OrgRoleUserClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*OrgRoleUserClient) UpdateOneID

func (c *OrgRoleUserClient) UpdateOneID(id int) *OrgRoleUserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*OrgRoleUserClient) Use

func (c *OrgRoleUserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `orgroleuser.Hooks(f(g(h())))`.

type OrgRoleUserCreate

type OrgRoleUserCreate struct {
	// contains filtered or unexported fields
}

OrgRoleUserCreate is the builder for creating a OrgRoleUser entity.

func (*OrgRoleUserCreate) Exec

func (oruc *OrgRoleUserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUserCreate) ExecX

func (oruc *OrgRoleUserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserCreate) Mutation

func (oruc *OrgRoleUserCreate) Mutation() *OrgRoleUserMutation

Mutation returns the OrgRoleUserMutation object of the builder.

func (*OrgRoleUserCreate) OnConflict

func (oruc *OrgRoleUserCreate) OnConflict(opts ...sql.ConflictOption) *OrgRoleUserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgRoleUser.Create().
	SetOrgRoleID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgRoleUserUpsert) {
		SetOrgRoleID(v+v).
	}).
	Exec(ctx)

func (*OrgRoleUserCreate) OnConflictColumns

func (oruc *OrgRoleUserCreate) OnConflictColumns(columns ...string) *OrgRoleUserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgRoleUserCreate) Save

func (oruc *OrgRoleUserCreate) Save(ctx context.Context) (*OrgRoleUser, error)

Save creates the OrgRoleUser in the database.

func (*OrgRoleUserCreate) SaveX

func (oruc *OrgRoleUserCreate) SaveX(ctx context.Context) *OrgRoleUser

SaveX calls Save and panics if Save returns an error.

func (*OrgRoleUserCreate) SetID

func (oruc *OrgRoleUserCreate) SetID(i int) *OrgRoleUserCreate

SetID sets the "id" field.

func (*OrgRoleUserCreate) SetOrgID

func (oruc *OrgRoleUserCreate) SetOrgID(i int) *OrgRoleUserCreate

SetOrgID sets the "org_id" field.

func (*OrgRoleUserCreate) SetOrgRoleID

func (oruc *OrgRoleUserCreate) SetOrgRoleID(i int) *OrgRoleUserCreate

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserCreate) SetOrgUserID

func (oruc *OrgRoleUserCreate) SetOrgUserID(i int) *OrgRoleUserCreate

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserCreate) SetUserID

func (oruc *OrgRoleUserCreate) SetUserID(i int) *OrgRoleUserCreate

SetUserID sets the "user_id" field.

type OrgRoleUserCreateBulk

type OrgRoleUserCreateBulk struct {
	// contains filtered or unexported fields
}

OrgRoleUserCreateBulk is the builder for creating many OrgRoleUser entities in bulk.

func (*OrgRoleUserCreateBulk) Exec

func (orucb *OrgRoleUserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUserCreateBulk) ExecX

func (orucb *OrgRoleUserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserCreateBulk) OnConflict

func (orucb *OrgRoleUserCreateBulk) OnConflict(opts ...sql.ConflictOption) *OrgRoleUserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.OrgRoleUser.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.OrgRoleUserUpsert) {
		SetOrgRoleID(v+v).
	}).
	Exec(ctx)

func (*OrgRoleUserCreateBulk) OnConflictColumns

func (orucb *OrgRoleUserCreateBulk) OnConflictColumns(columns ...string) *OrgRoleUserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*OrgRoleUserCreateBulk) Save

func (orucb *OrgRoleUserCreateBulk) Save(ctx context.Context) ([]*OrgRoleUser, error)

Save creates the OrgRoleUser entities in the database.

func (*OrgRoleUserCreateBulk) SaveX

func (orucb *OrgRoleUserCreateBulk) SaveX(ctx context.Context) []*OrgRoleUser

SaveX is like Save, but panics if an error occurs.

type OrgRoleUserDelete

type OrgRoleUserDelete struct {
	// contains filtered or unexported fields
}

OrgRoleUserDelete is the builder for deleting a OrgRoleUser entity.

func (*OrgRoleUserDelete) Exec

func (orud *OrgRoleUserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*OrgRoleUserDelete) ExecX

func (orud *OrgRoleUserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserDelete) Where

Where appends a list predicates to the OrgRoleUserDelete builder.

type OrgRoleUserDeleteOne

type OrgRoleUserDeleteOne struct {
	// contains filtered or unexported fields
}

OrgRoleUserDeleteOne is the builder for deleting a single OrgRoleUser entity.

func (*OrgRoleUserDeleteOne) Exec

func (orudo *OrgRoleUserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*OrgRoleUserDeleteOne) ExecX

func (orudo *OrgRoleUserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserDeleteOne) Where

Where appends a list predicates to the OrgRoleUserDelete builder.

type OrgRoleUserGroupBy

type OrgRoleUserGroupBy struct {
	// contains filtered or unexported fields
}

OrgRoleUserGroupBy is the group-by builder for OrgRoleUser entities.

func (*OrgRoleUserGroupBy) Aggregate

func (orugb *OrgRoleUserGroupBy) Aggregate(fns ...AggregateFunc) *OrgRoleUserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*OrgRoleUserGroupBy) Bool

func (s *OrgRoleUserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) BoolX

func (s *OrgRoleUserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Bools

func (s *OrgRoleUserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) BoolsX

func (s *OrgRoleUserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Float64

func (s *OrgRoleUserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) Float64X

func (s *OrgRoleUserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Float64s

func (s *OrgRoleUserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) Float64sX

func (s *OrgRoleUserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Int

func (s *OrgRoleUserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) IntX

func (s *OrgRoleUserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Ints

func (s *OrgRoleUserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) IntsX

func (s *OrgRoleUserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Scan

func (orugb *OrgRoleUserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgRoleUserGroupBy) ScanX

func (s *OrgRoleUserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgRoleUserGroupBy) String

func (s *OrgRoleUserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) StringX

func (s *OrgRoleUserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgRoleUserGroupBy) Strings

func (s *OrgRoleUserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserGroupBy) StringsX

func (s *OrgRoleUserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgRoleUserMutation

type OrgRoleUserMutation struct {
	// contains filtered or unexported fields
}

OrgRoleUserMutation represents an operation that mutates the OrgRoleUser nodes in the graph.

func (*OrgRoleUserMutation) AddField

func (m *OrgRoleUserMutation) 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 (*OrgRoleUserMutation) AddOrgID

func (m *OrgRoleUserMutation) AddOrgID(i int)

AddOrgID adds i to the "org_id" field.

func (*OrgRoleUserMutation) AddOrgRoleID

func (m *OrgRoleUserMutation) AddOrgRoleID(i int)

AddOrgRoleID adds i to the "org_role_id" field.

func (*OrgRoleUserMutation) AddOrgUserID

func (m *OrgRoleUserMutation) AddOrgUserID(i int)

AddOrgUserID adds i to the "org_user_id" field.

func (*OrgRoleUserMutation) AddUserID

func (m *OrgRoleUserMutation) AddUserID(i int)

AddUserID adds i to the "user_id" field.

func (*OrgRoleUserMutation) AddedEdges

func (m *OrgRoleUserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*OrgRoleUserMutation) AddedField

func (m *OrgRoleUserMutation) 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 (*OrgRoleUserMutation) AddedFields

func (m *OrgRoleUserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*OrgRoleUserMutation) AddedIDs

func (m *OrgRoleUserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*OrgRoleUserMutation) AddedOrgID

func (m *OrgRoleUserMutation) AddedOrgID() (r int, exists bool)

AddedOrgID returns the value that was added to the "org_id" field in this mutation.

func (*OrgRoleUserMutation) AddedOrgRoleID

func (m *OrgRoleUserMutation) AddedOrgRoleID() (r int, exists bool)

AddedOrgRoleID returns the value that was added to the "org_role_id" field in this mutation.

func (*OrgRoleUserMutation) AddedOrgUserID

func (m *OrgRoleUserMutation) AddedOrgUserID() (r int, exists bool)

AddedOrgUserID returns the value that was added to the "org_user_id" field in this mutation.

func (*OrgRoleUserMutation) AddedUserID

func (m *OrgRoleUserMutation) AddedUserID() (r int, exists bool)

AddedUserID returns the value that was added to the "user_id" field in this mutation.

func (*OrgRoleUserMutation) ClearEdge

func (m *OrgRoleUserMutation) 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 (*OrgRoleUserMutation) ClearField

func (m *OrgRoleUserMutation) 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 (*OrgRoleUserMutation) ClearedEdges

func (m *OrgRoleUserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*OrgRoleUserMutation) ClearedFields

func (m *OrgRoleUserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (OrgRoleUserMutation) Client

func (m OrgRoleUserMutation) 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 (*OrgRoleUserMutation) EdgeCleared

func (m *OrgRoleUserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*OrgRoleUserMutation) Field

func (m *OrgRoleUserMutation) 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 (*OrgRoleUserMutation) FieldCleared

func (m *OrgRoleUserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*OrgRoleUserMutation) Fields

func (m *OrgRoleUserMutation) 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 (*OrgRoleUserMutation) ID

func (m *OrgRoleUserMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*OrgRoleUserMutation) IDs

func (m *OrgRoleUserMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*OrgRoleUserMutation) OldField

func (m *OrgRoleUserMutation) 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 (*OrgRoleUserMutation) OldOrgID

func (m *OrgRoleUserMutation) OldOrgID(ctx context.Context) (v int, err error)

OldOrgID returns the old "org_id" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) OldOrgRoleID

func (m *OrgRoleUserMutation) OldOrgRoleID(ctx context.Context) (v int, err error)

OldOrgRoleID returns the old "org_role_id" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) OldOrgUserID

func (m *OrgRoleUserMutation) OldOrgUserID(ctx context.Context) (v int, err error)

OldOrgUserID returns the old "org_user_id" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) OldUserID

func (m *OrgRoleUserMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the OrgRoleUser entity. If the OrgRoleUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*OrgRoleUserMutation) Op

func (m *OrgRoleUserMutation) Op() Op

Op returns the operation name.

func (*OrgRoleUserMutation) OrgID

func (m *OrgRoleUserMutation) OrgID() (r int, exists bool)

OrgID returns the value of the "org_id" field in the mutation.

func (*OrgRoleUserMutation) OrgRoleID

func (m *OrgRoleUserMutation) OrgRoleID() (r int, exists bool)

OrgRoleID returns the value of the "org_role_id" field in the mutation.

func (*OrgRoleUserMutation) OrgUserID

func (m *OrgRoleUserMutation) OrgUserID() (r int, exists bool)

OrgUserID returns the value of the "org_user_id" field in the mutation.

func (*OrgRoleUserMutation) RemovedEdges

func (m *OrgRoleUserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*OrgRoleUserMutation) RemovedIDs

func (m *OrgRoleUserMutation) 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 (*OrgRoleUserMutation) ResetEdge

func (m *OrgRoleUserMutation) 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 (*OrgRoleUserMutation) ResetField

func (m *OrgRoleUserMutation) 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 (*OrgRoleUserMutation) ResetOrgID

func (m *OrgRoleUserMutation) ResetOrgID()

ResetOrgID resets all changes to the "org_id" field.

func (*OrgRoleUserMutation) ResetOrgRoleID

func (m *OrgRoleUserMutation) ResetOrgRoleID()

ResetOrgRoleID resets all changes to the "org_role_id" field.

func (*OrgRoleUserMutation) ResetOrgUserID

func (m *OrgRoleUserMutation) ResetOrgUserID()

ResetOrgUserID resets all changes to the "org_user_id" field.

func (*OrgRoleUserMutation) ResetUserID

func (m *OrgRoleUserMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*OrgRoleUserMutation) SetField

func (m *OrgRoleUserMutation) 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 (*OrgRoleUserMutation) SetID

func (m *OrgRoleUserMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of OrgRoleUser entities.

func (*OrgRoleUserMutation) SetOp

func (m *OrgRoleUserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*OrgRoleUserMutation) SetOrgID

func (m *OrgRoleUserMutation) SetOrgID(i int)

SetOrgID sets the "org_id" field.

func (*OrgRoleUserMutation) SetOrgRoleID

func (m *OrgRoleUserMutation) SetOrgRoleID(i int)

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserMutation) SetOrgUserID

func (m *OrgRoleUserMutation) SetOrgUserID(i int)

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserMutation) SetUserID

func (m *OrgRoleUserMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (OrgRoleUserMutation) Tx

func (m OrgRoleUserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*OrgRoleUserMutation) Type

func (m *OrgRoleUserMutation) Type() string

Type returns the node type of this mutation (OrgRoleUser).

func (*OrgRoleUserMutation) UserID

func (m *OrgRoleUserMutation) UserID() (r int, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*OrgRoleUserMutation) Where

func (m *OrgRoleUserMutation) Where(ps ...predicate.OrgRoleUser)

Where appends a list predicates to the OrgRoleUserMutation builder.

func (*OrgRoleUserMutation) WhereP

func (m *OrgRoleUserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the OrgRoleUserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type OrgRoleUserQuery

type OrgRoleUserQuery struct {
	// contains filtered or unexported fields
}

OrgRoleUserQuery is the builder for querying OrgRoleUser entities.

func (*OrgRoleUserQuery) Aggregate

func (oruq *OrgRoleUserQuery) Aggregate(fns ...AggregateFunc) *OrgRoleUserSelect

Aggregate returns a OrgRoleUserSelect configured with the given aggregations.

func (*OrgRoleUserQuery) All

func (oruq *OrgRoleUserQuery) All(ctx context.Context) ([]*OrgRoleUser, error)

All executes the query and returns a list of OrgRoleUsers.

func (*OrgRoleUserQuery) AllX

func (oruq *OrgRoleUserQuery) AllX(ctx context.Context) []*OrgRoleUser

AllX is like All, but panics if an error occurs.

func (*OrgRoleUserQuery) Clone

func (oruq *OrgRoleUserQuery) Clone() *OrgRoleUserQuery

Clone returns a duplicate of the OrgRoleUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*OrgRoleUserQuery) Count

func (oruq *OrgRoleUserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*OrgRoleUserQuery) CountX

func (oruq *OrgRoleUserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*OrgRoleUserQuery) Exist

func (oruq *OrgRoleUserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*OrgRoleUserQuery) ExistX

func (oruq *OrgRoleUserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*OrgRoleUserQuery) First

func (oruq *OrgRoleUserQuery) First(ctx context.Context) (*OrgRoleUser, error)

First returns the first OrgRoleUser entity from the query. Returns a *NotFoundError when no OrgRoleUser was found.

func (*OrgRoleUserQuery) FirstID

func (oruq *OrgRoleUserQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first OrgRoleUser ID from the query. Returns a *NotFoundError when no OrgRoleUser ID was found.

func (*OrgRoleUserQuery) FirstIDX

func (oruq *OrgRoleUserQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*OrgRoleUserQuery) FirstX

func (oruq *OrgRoleUserQuery) FirstX(ctx context.Context) *OrgRoleUser

FirstX is like First, but panics if an error occurs.

func (*OrgRoleUserQuery) GroupBy

func (oruq *OrgRoleUserQuery) GroupBy(field string, fields ...string) *OrgRoleUserGroupBy

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 {
	OrgRoleID int `json:"org_role_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.OrgRoleUser.Query().
	GroupBy(orgroleuser.FieldOrgRoleID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*OrgRoleUserQuery) IDs

func (oruq *OrgRoleUserQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of OrgRoleUser IDs.

func (*OrgRoleUserQuery) IDsX

func (oruq *OrgRoleUserQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*OrgRoleUserQuery) Limit

func (oruq *OrgRoleUserQuery) Limit(limit int) *OrgRoleUserQuery

Limit the number of records to be returned by this query.

func (*OrgRoleUserQuery) Offset

func (oruq *OrgRoleUserQuery) Offset(offset int) *OrgRoleUserQuery

Offset to start from.

func (*OrgRoleUserQuery) Only

func (oruq *OrgRoleUserQuery) Only(ctx context.Context) (*OrgRoleUser, error)

Only returns a single OrgRoleUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OrgRoleUser entity is found. Returns a *NotFoundError when no OrgRoleUser entities are found.

func (*OrgRoleUserQuery) OnlyID

func (oruq *OrgRoleUserQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only OrgRoleUser ID in the query. Returns a *NotSingularError when more than one OrgRoleUser ID is found. Returns a *NotFoundError when no entities are found.

func (*OrgRoleUserQuery) OnlyIDX

func (oruq *OrgRoleUserQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*OrgRoleUserQuery) OnlyX

func (oruq *OrgRoleUserQuery) OnlyX(ctx context.Context) *OrgRoleUser

OnlyX is like Only, but panics if an error occurs.

func (*OrgRoleUserQuery) Order

Order specifies how the records should be ordered.

func (*OrgRoleUserQuery) Select

func (oruq *OrgRoleUserQuery) Select(fields ...string) *OrgRoleUserSelect

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 {
	OrgRoleID int `json:"org_role_id,omitempty"`
}

client.OrgRoleUser.Query().
	Select(orgroleuser.FieldOrgRoleID).
	Scan(ctx, &v)

func (*OrgRoleUserQuery) Unique

func (oruq *OrgRoleUserQuery) Unique(unique bool) *OrgRoleUserQuery

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 (*OrgRoleUserQuery) Where

Where adds a new predicate for the OrgRoleUserQuery builder.

type OrgRoleUserSelect

type OrgRoleUserSelect struct {
	*OrgRoleUserQuery
	// contains filtered or unexported fields
}

OrgRoleUserSelect is the builder for selecting fields of OrgRoleUser entities.

func (*OrgRoleUserSelect) Aggregate

func (orus *OrgRoleUserSelect) Aggregate(fns ...AggregateFunc) *OrgRoleUserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*OrgRoleUserSelect) Bool

func (s *OrgRoleUserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) BoolX

func (s *OrgRoleUserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*OrgRoleUserSelect) Bools

func (s *OrgRoleUserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) BoolsX

func (s *OrgRoleUserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*OrgRoleUserSelect) Float64

func (s *OrgRoleUserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) Float64X

func (s *OrgRoleUserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*OrgRoleUserSelect) Float64s

func (s *OrgRoleUserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) Float64sX

func (s *OrgRoleUserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*OrgRoleUserSelect) Int

func (s *OrgRoleUserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) IntX

func (s *OrgRoleUserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*OrgRoleUserSelect) Ints

func (s *OrgRoleUserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) IntsX

func (s *OrgRoleUserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*OrgRoleUserSelect) Scan

func (orus *OrgRoleUserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*OrgRoleUserSelect) ScanX

func (s *OrgRoleUserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*OrgRoleUserSelect) String

func (s *OrgRoleUserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) StringX

func (s *OrgRoleUserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*OrgRoleUserSelect) Strings

func (s *OrgRoleUserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*OrgRoleUserSelect) StringsX

func (s *OrgRoleUserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type OrgRoleUserUpdate

type OrgRoleUserUpdate struct {
	// contains filtered or unexported fields
}

OrgRoleUserUpdate is the builder for updating OrgRoleUser entities.

func (*OrgRoleUserUpdate) AddOrgID

func (oruu *OrgRoleUserUpdate) AddOrgID(i int) *OrgRoleUserUpdate

AddOrgID adds i to the "org_id" field.

func (*OrgRoleUserUpdate) AddOrgRoleID

func (oruu *OrgRoleUserUpdate) AddOrgRoleID(i int) *OrgRoleUserUpdate

AddOrgRoleID adds i to the "org_role_id" field.

func (*OrgRoleUserUpdate) AddOrgUserID

func (oruu *OrgRoleUserUpdate) AddOrgUserID(i int) *OrgRoleUserUpdate

AddOrgUserID adds i to the "org_user_id" field.

func (*OrgRoleUserUpdate) AddUserID

func (oruu *OrgRoleUserUpdate) AddUserID(i int) *OrgRoleUserUpdate

AddUserID adds i to the "user_id" field.

func (*OrgRoleUserUpdate) Exec

func (oruu *OrgRoleUserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*OrgRoleUserUpdate) ExecX

func (oruu *OrgRoleUserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserUpdate) Mutation

func (oruu *OrgRoleUserUpdate) Mutation() *OrgRoleUserMutation

Mutation returns the OrgRoleUserMutation object of the builder.

func (*OrgRoleUserUpdate) Save

func (oruu *OrgRoleUserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*OrgRoleUserUpdate) SaveX

func (oruu *OrgRoleUserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*OrgRoleUserUpdate) SetOrgID

func (oruu *OrgRoleUserUpdate) SetOrgID(i int) *OrgRoleUserUpdate

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpdate) SetOrgRoleID

func (oruu *OrgRoleUserUpdate) SetOrgRoleID(i int) *OrgRoleUserUpdate

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpdate) SetOrgUserID

func (oruu *OrgRoleUserUpdate) SetOrgUserID(i int) *OrgRoleUserUpdate

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpdate) SetUserID

func (oruu *OrgRoleUserUpdate) SetUserID(i int) *OrgRoleUserUpdate

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpdate) Where

Where appends a list predicates to the OrgRoleUserUpdate builder.

type OrgRoleUserUpdateOne

type OrgRoleUserUpdateOne struct {
	// contains filtered or unexported fields
}

OrgRoleUserUpdateOne is the builder for updating a single OrgRoleUser entity.

func (*OrgRoleUserUpdateOne) AddOrgID

func (oruuo *OrgRoleUserUpdateOne) AddOrgID(i int) *OrgRoleUserUpdateOne

AddOrgID adds i to the "org_id" field.

func (*OrgRoleUserUpdateOne) AddOrgRoleID

func (oruuo *OrgRoleUserUpdateOne) AddOrgRoleID(i int) *OrgRoleUserUpdateOne

AddOrgRoleID adds i to the "org_role_id" field.

func (*OrgRoleUserUpdateOne) AddOrgUserID

func (oruuo *OrgRoleUserUpdateOne) AddOrgUserID(i int) *OrgRoleUserUpdateOne

AddOrgUserID adds i to the "org_user_id" field.

func (*OrgRoleUserUpdateOne) AddUserID

func (oruuo *OrgRoleUserUpdateOne) AddUserID(i int) *OrgRoleUserUpdateOne

AddUserID adds i to the "user_id" field.

func (*OrgRoleUserUpdateOne) Exec

func (oruuo *OrgRoleUserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*OrgRoleUserUpdateOne) ExecX

func (oruuo *OrgRoleUserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserUpdateOne) Mutation

func (oruuo *OrgRoleUserUpdateOne) Mutation() *OrgRoleUserMutation

Mutation returns the OrgRoleUserMutation object of the builder.

func (*OrgRoleUserUpdateOne) Save

func (oruuo *OrgRoleUserUpdateOne) Save(ctx context.Context) (*OrgRoleUser, error)

Save executes the query and returns the updated OrgRoleUser entity.

func (*OrgRoleUserUpdateOne) SaveX

func (oruuo *OrgRoleUserUpdateOne) SaveX(ctx context.Context) *OrgRoleUser

SaveX is like Save, but panics if an error occurs.

func (*OrgRoleUserUpdateOne) Select

func (oruuo *OrgRoleUserUpdateOne) Select(field string, fields ...string) *OrgRoleUserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*OrgRoleUserUpdateOne) SetOrgID

func (oruuo *OrgRoleUserUpdateOne) SetOrgID(i int) *OrgRoleUserUpdateOne

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpdateOne) SetOrgRoleID

func (oruuo *OrgRoleUserUpdateOne) SetOrgRoleID(i int) *OrgRoleUserUpdateOne

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpdateOne) SetOrgUserID

func (oruuo *OrgRoleUserUpdateOne) SetOrgUserID(i int) *OrgRoleUserUpdateOne

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpdateOne) SetUserID

func (oruuo *OrgRoleUserUpdateOne) SetUserID(i int) *OrgRoleUserUpdateOne

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpdateOne) Where

Where appends a list predicates to the OrgRoleUserUpdate builder.

type OrgRoleUserUpsert

type OrgRoleUserUpsert struct {
	*sql.UpdateSet
}

OrgRoleUserUpsert is the "OnConflict" setter.

func (*OrgRoleUserUpsert) AddOrgID

func (u *OrgRoleUserUpsert) AddOrgID(v int) *OrgRoleUserUpsert

AddOrgID adds v to the "org_id" field.

func (*OrgRoleUserUpsert) AddOrgRoleID

func (u *OrgRoleUserUpsert) AddOrgRoleID(v int) *OrgRoleUserUpsert

AddOrgRoleID adds v to the "org_role_id" field.

func (*OrgRoleUserUpsert) AddOrgUserID

func (u *OrgRoleUserUpsert) AddOrgUserID(v int) *OrgRoleUserUpsert

AddOrgUserID adds v to the "org_user_id" field.

func (*OrgRoleUserUpsert) AddUserID

func (u *OrgRoleUserUpsert) AddUserID(v int) *OrgRoleUserUpsert

AddUserID adds v to the "user_id" field.

func (*OrgRoleUserUpsert) SetOrgID

func (u *OrgRoleUserUpsert) SetOrgID(v int) *OrgRoleUserUpsert

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpsert) SetOrgRoleID

func (u *OrgRoleUserUpsert) SetOrgRoleID(v int) *OrgRoleUserUpsert

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpsert) SetOrgUserID

func (u *OrgRoleUserUpsert) SetOrgUserID(v int) *OrgRoleUserUpsert

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpsert) SetUserID

func (u *OrgRoleUserUpsert) SetUserID(v int) *OrgRoleUserUpsert

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpsert) UpdateOrgID

func (u *OrgRoleUserUpsert) UpdateOrgID() *OrgRoleUserUpsert

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgRoleUserUpsert) UpdateOrgRoleID

func (u *OrgRoleUserUpsert) UpdateOrgRoleID() *OrgRoleUserUpsert

UpdateOrgRoleID sets the "org_role_id" field to the value that was provided on create.

func (*OrgRoleUserUpsert) UpdateOrgUserID

func (u *OrgRoleUserUpsert) UpdateOrgUserID() *OrgRoleUserUpsert

UpdateOrgUserID sets the "org_user_id" field to the value that was provided on create.

func (*OrgRoleUserUpsert) UpdateUserID

func (u *OrgRoleUserUpsert) UpdateUserID() *OrgRoleUserUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgRoleUserUpsertBulk

type OrgRoleUserUpsertBulk struct {
	// contains filtered or unexported fields
}

OrgRoleUserUpsertBulk is the builder for "upsert"-ing a bulk of OrgRoleUser nodes.

func (*OrgRoleUserUpsertBulk) AddOrgID

AddOrgID adds v to the "org_id" field.

func (*OrgRoleUserUpsertBulk) AddOrgRoleID

func (u *OrgRoleUserUpsertBulk) AddOrgRoleID(v int) *OrgRoleUserUpsertBulk

AddOrgRoleID adds v to the "org_role_id" field.

func (*OrgRoleUserUpsertBulk) AddOrgUserID

func (u *OrgRoleUserUpsertBulk) AddOrgUserID(v int) *OrgRoleUserUpsertBulk

AddOrgUserID adds v to the "org_user_id" field.

func (*OrgRoleUserUpsertBulk) AddUserID

AddUserID adds v to the "user_id" field.

func (*OrgRoleUserUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgRoleUserUpsertBulk) Exec

Exec executes the query.

func (*OrgRoleUserUpsertBulk) ExecX

func (u *OrgRoleUserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*OrgRoleUserUpsertBulk) SetOrgID

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpsertBulk) SetOrgRoleID

func (u *OrgRoleUserUpsertBulk) SetOrgRoleID(v int) *OrgRoleUserUpsertBulk

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpsertBulk) SetOrgUserID

func (u *OrgRoleUserUpsertBulk) SetOrgUserID(v int) *OrgRoleUserUpsertBulk

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpsertBulk) SetUserID

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the OrgRoleUserCreateBulk.OnConflict documentation for more info.

func (*OrgRoleUserUpsertBulk) UpdateNewValues

func (u *OrgRoleUserUpsertBulk) UpdateNewValues() *OrgRoleUserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgroleuser.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgRoleUserUpsertBulk) UpdateOrgID

func (u *OrgRoleUserUpsertBulk) UpdateOrgID() *OrgRoleUserUpsertBulk

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertBulk) UpdateOrgRoleID

func (u *OrgRoleUserUpsertBulk) UpdateOrgRoleID() *OrgRoleUserUpsertBulk

UpdateOrgRoleID sets the "org_role_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertBulk) UpdateOrgUserID

func (u *OrgRoleUserUpsertBulk) UpdateOrgUserID() *OrgRoleUserUpsertBulk

UpdateOrgUserID sets the "org_user_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertBulk) UpdateUserID

func (u *OrgRoleUserUpsertBulk) UpdateUserID() *OrgRoleUserUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgRoleUserUpsertOne

type OrgRoleUserUpsertOne struct {
	// contains filtered or unexported fields
}

OrgRoleUserUpsertOne is the builder for "upsert"-ing

one OrgRoleUser node.

func (*OrgRoleUserUpsertOne) AddOrgID

AddOrgID adds v to the "org_id" field.

func (*OrgRoleUserUpsertOne) AddOrgRoleID

func (u *OrgRoleUserUpsertOne) AddOrgRoleID(v int) *OrgRoleUserUpsertOne

AddOrgRoleID adds v to the "org_role_id" field.

func (*OrgRoleUserUpsertOne) AddOrgUserID

func (u *OrgRoleUserUpsertOne) AddOrgUserID(v int) *OrgRoleUserUpsertOne

AddOrgUserID adds v to the "org_user_id" field.

func (*OrgRoleUserUpsertOne) AddUserID

AddUserID adds v to the "user_id" field.

func (*OrgRoleUserUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*OrgRoleUserUpsertOne) Exec

Exec executes the query.

func (*OrgRoleUserUpsertOne) ExecX

func (u *OrgRoleUserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*OrgRoleUserUpsertOne) ID

func (u *OrgRoleUserUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*OrgRoleUserUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*OrgRoleUserUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.OrgRoleUser.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*OrgRoleUserUpsertOne) SetOrgID

SetOrgID sets the "org_id" field.

func (*OrgRoleUserUpsertOne) SetOrgRoleID

func (u *OrgRoleUserUpsertOne) SetOrgRoleID(v int) *OrgRoleUserUpsertOne

SetOrgRoleID sets the "org_role_id" field.

func (*OrgRoleUserUpsertOne) SetOrgUserID

func (u *OrgRoleUserUpsertOne) SetOrgUserID(v int) *OrgRoleUserUpsertOne

SetOrgUserID sets the "org_user_id" field.

func (*OrgRoleUserUpsertOne) SetUserID

SetUserID sets the "user_id" field.

func (*OrgRoleUserUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the OrgRoleUserCreate.OnConflict documentation for more info.

func (*OrgRoleUserUpsertOne) UpdateNewValues

func (u *OrgRoleUserUpsertOne) UpdateNewValues() *OrgRoleUserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.OrgRoleUser.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(orgroleuser.FieldID)
		}),
	).
	Exec(ctx)

func (*OrgRoleUserUpsertOne) UpdateOrgID

func (u *OrgRoleUserUpsertOne) UpdateOrgID() *OrgRoleUserUpsertOne

UpdateOrgID sets the "org_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertOne) UpdateOrgRoleID

func (u *OrgRoleUserUpsertOne) UpdateOrgRoleID() *OrgRoleUserUpsertOne

UpdateOrgRoleID sets the "org_role_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertOne) UpdateOrgUserID

func (u *OrgRoleUserUpsertOne) UpdateOrgUserID() *OrgRoleUserUpsertOne

UpdateOrgUserID sets the "org_user_id" field to the value that was provided on create.

func (*OrgRoleUserUpsertOne) UpdateUserID

func (u *OrgRoleUserUpsertOne) UpdateUserID() *OrgRoleUserUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type OrgRoleUsers

type OrgRoleUsers []*OrgRoleUser

OrgRoleUsers is a parsable slice of OrgRoleUser.

type PageInfo

type PageInfo = entgql.PageInfo[int]

Common entgql types.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Querier

type Querier = ent.Querier

ent aliases to avoid import conflicts in user's code.

type QuerierFunc

type QuerierFunc = ent.QuerierFunc

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type QueryContext

type QueryContext = ent.QueryContext

ent aliases to avoid import conflicts in user's code.

type ResolvedGlobal

type ResolvedGlobal struct{ Type, ID string }

func FromGlobalID

func FromGlobalID(s string) (*ResolvedGlobal, error)

func (*ResolvedGlobal) Int

func (r *ResolvedGlobal) Int() (int, error)

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type SchemaConfig

type SchemaConfig = internal.SchemaConfig

SchemaConfig represents alternative schema names for all tables that can be passed at runtime.

type Silence

type Silence struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// CreatedBy holds the value of the "created_by" field.
	CreatedBy int `json:"created_by,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at,omitempty"`
	// UpdatedBy holds the value of the "updated_by" field.
	UpdatedBy int `json:"updated_by,omitempty"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at,omitempty"`
	// TenantID holds the value of the "tenant_id" field.
	TenantID int `json:"tenant_id,omitempty"`
	// 应用ID
	Matchers []*label.Matcher `json:"matchers,omitempty"`
	// 开始时间
	StartsAt time.Time `json:"starts_at,omitempty"`
	// 结束时间
	EndsAt time.Time `json:"ends_at,omitempty"`
	// 备注
	Comments string `json:"comments,omitempty"`
	// 状态
	State alert.SilenceState `json:"state,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SilenceQuery when eager-loading is set.
	Edges SilenceEdges `json:"edges"`
	// contains filtered or unexported fields
}

Silence is the model entity for the Silence schema.

func (*Silence) GlobalID

func (s *Silence) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given Silence node.

func (*Silence) IsNode

func (*Silence) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*Silence) QueryUser

func (s *Silence) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Silence entity.

func (*Silence) String

func (s *Silence) String() string

String implements the fmt.Stringer.

func (*Silence) ToEdge

func (s *Silence) ToEdge(order *SilenceOrder) *SilenceEdge

ToEdge converts Silence into SilenceEdge.

func (*Silence) Unwrap

func (s *Silence) Unwrap() *Silence

Unwrap unwraps the Silence 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 (*Silence) Update

func (s *Silence) Update() *SilenceUpdateOne

Update returns a builder for updating this Silence. Note that you need to call Silence.Unwrap() before calling this method if this Silence was returned from a transaction, and the transaction was committed or rolled back.

func (*Silence) User

func (s *Silence) User(ctx context.Context) (*User, error)

func (*Silence) Value

func (s *Silence) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the Silence. This includes values selected through modifiers, order, etc.

type SilenceClient

type SilenceClient struct {
	// contains filtered or unexported fields
}

SilenceClient is a client for the Silence schema.

func NewSilenceClient

func NewSilenceClient(c config) *SilenceClient

NewSilenceClient returns a client for the Silence from the given config.

func (*SilenceClient) Create

func (c *SilenceClient) Create() *SilenceCreate

Create returns a builder for creating a Silence entity.

func (*SilenceClient) CreateBulk

func (c *SilenceClient) CreateBulk(builders ...*SilenceCreate) *SilenceCreateBulk

CreateBulk returns a builder for creating a bulk of Silence entities.

func (*SilenceClient) Delete

func (c *SilenceClient) Delete() *SilenceDelete

Delete returns a delete builder for Silence.

func (*SilenceClient) DeleteOne

func (c *SilenceClient) DeleteOne(s *Silence) *SilenceDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*SilenceClient) DeleteOneID

func (c *SilenceClient) DeleteOneID(id int) *SilenceDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*SilenceClient) Get

func (c *SilenceClient) Get(ctx context.Context, id int) (*Silence, error)

Get returns a Silence entity by its id.

func (*SilenceClient) GetX

func (c *SilenceClient) GetX(ctx context.Context, id int) *Silence

GetX is like Get, but panics if an error occurs.

func (*SilenceClient) Hooks

func (c *SilenceClient) Hooks() []Hook

Hooks returns the client hooks.

func (*SilenceClient) Intercept

func (c *SilenceClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `silence.Intercept(f(g(h())))`.

func (*SilenceClient) Interceptors

func (c *SilenceClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*SilenceClient) MapCreateBulk

func (c *SilenceClient) MapCreateBulk(slice any, setFunc func(*SilenceCreate, int)) *SilenceCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*SilenceClient) Query

func (c *SilenceClient) Query() *SilenceQuery

Query returns a query builder for Silence.

func (*SilenceClient) QueryUser

func (c *SilenceClient) QueryUser(s *Silence) *UserQuery

QueryUser queries the user edge of a Silence.

func (*SilenceClient) Update

func (c *SilenceClient) Update() *SilenceUpdate

Update returns an update builder for Silence.

func (*SilenceClient) UpdateOne

func (c *SilenceClient) UpdateOne(s *Silence) *SilenceUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SilenceClient) UpdateOneID

func (c *SilenceClient) UpdateOneID(id int) *SilenceUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SilenceClient) Use

func (c *SilenceClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `silence.Hooks(f(g(h())))`.

type SilenceConnection

type SilenceConnection struct {
	Edges      []*SilenceEdge `json:"edges"`
	PageInfo   PageInfo       `json:"pageInfo"`
	TotalCount int            `json:"totalCount"`
}

SilenceConnection is the connection containing edges to Silence.

type SilenceCreate

type SilenceCreate struct {
	// contains filtered or unexported fields
}

SilenceCreate is the builder for creating a Silence entity.

func (*SilenceCreate) Exec

func (sc *SilenceCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SilenceCreate) ExecX

func (sc *SilenceCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SilenceCreate) Mutation

func (sc *SilenceCreate) Mutation() *SilenceMutation

Mutation returns the SilenceMutation object of the builder.

func (*SilenceCreate) OnConflict

func (sc *SilenceCreate) OnConflict(opts ...sql.ConflictOption) *SilenceUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Silence.Create().
	SetCreatedBy(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SilenceUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*SilenceCreate) OnConflictColumns

func (sc *SilenceCreate) OnConflictColumns(columns ...string) *SilenceUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Silence.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SilenceCreate) Save

func (sc *SilenceCreate) Save(ctx context.Context) (*Silence, error)

Save creates the Silence in the database.

func (*SilenceCreate) SaveX

func (sc *SilenceCreate) SaveX(ctx context.Context) *Silence

SaveX calls Save and panics if Save returns an error.

func (*SilenceCreate) SetComments

func (sc *SilenceCreate) SetComments(s string) *SilenceCreate

SetComments sets the "comments" field.

func (*SilenceCreate) SetCreatedAt

func (sc *SilenceCreate) SetCreatedAt(t time.Time) *SilenceCreate

SetCreatedAt sets the "created_at" field.

func (*SilenceCreate) SetCreatedBy

func (sc *SilenceCreate) SetCreatedBy(i int) *SilenceCreate

SetCreatedBy sets the "created_by" field.

func (*SilenceCreate) SetEndsAt

func (sc *SilenceCreate) SetEndsAt(t time.Time) *SilenceCreate

SetEndsAt sets the "ends_at" field.

func (*SilenceCreate) SetID

func (sc *SilenceCreate) SetID(i int) *SilenceCreate

SetID sets the "id" field.

func (*SilenceCreate) SetInput

SetInput applies the change-set in the CreateSilenceInput on the SilenceCreate builder.

func (*SilenceCreate) SetMatchers

func (sc *SilenceCreate) SetMatchers(l []*label.Matcher) *SilenceCreate

SetMatchers sets the "matchers" field.

func (*SilenceCreate) SetNillableComments

func (sc *SilenceCreate) SetNillableComments(s *string) *SilenceCreate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*SilenceCreate) SetNillableCreatedAt

func (sc *SilenceCreate) SetNillableCreatedAt(t *time.Time) *SilenceCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*SilenceCreate) SetNillableID

func (sc *SilenceCreate) SetNillableID(i *int) *SilenceCreate

SetNillableID sets the "id" field if the given value is not nil.

func (*SilenceCreate) SetNillableState

func (sc *SilenceCreate) SetNillableState(as *alert.SilenceState) *SilenceCreate

SetNillableState sets the "state" field if the given value is not nil.

func (*SilenceCreate) SetNillableUpdatedAt

func (sc *SilenceCreate) SetNillableUpdatedAt(t *time.Time) *SilenceCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SilenceCreate) SetNillableUpdatedBy

func (sc *SilenceCreate) SetNillableUpdatedBy(i *int) *SilenceCreate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*SilenceCreate) SetStartsAt

func (sc *SilenceCreate) SetStartsAt(t time.Time) *SilenceCreate

SetStartsAt sets the "starts_at" field.

func (*SilenceCreate) SetState

func (sc *SilenceCreate) SetState(as alert.SilenceState) *SilenceCreate

SetState sets the "state" field.

func (*SilenceCreate) SetTenantID

func (sc *SilenceCreate) SetTenantID(i int) *SilenceCreate

SetTenantID sets the "tenant_id" field.

func (*SilenceCreate) SetUpdatedAt

func (sc *SilenceCreate) SetUpdatedAt(t time.Time) *SilenceCreate

SetUpdatedAt sets the "updated_at" field.

func (*SilenceCreate) SetUpdatedBy

func (sc *SilenceCreate) SetUpdatedBy(i int) *SilenceCreate

SetUpdatedBy sets the "updated_by" field.

func (*SilenceCreate) SetUser

func (sc *SilenceCreate) SetUser(u *User) *SilenceCreate

SetUser sets the "user" edge to the User entity.

func (*SilenceCreate) SetUserID

func (sc *SilenceCreate) SetUserID(id int) *SilenceCreate

SetUserID sets the "user" edge to the User entity by ID.

type SilenceCreateBulk

type SilenceCreateBulk struct {
	// contains filtered or unexported fields
}

SilenceCreateBulk is the builder for creating many Silence entities in bulk.

func (*SilenceCreateBulk) Exec

func (scb *SilenceCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SilenceCreateBulk) ExecX

func (scb *SilenceCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SilenceCreateBulk) OnConflict

func (scb *SilenceCreateBulk) OnConflict(opts ...sql.ConflictOption) *SilenceUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Silence.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SilenceUpsert) {
		SetCreatedBy(v+v).
	}).
	Exec(ctx)

func (*SilenceCreateBulk) OnConflictColumns

func (scb *SilenceCreateBulk) OnConflictColumns(columns ...string) *SilenceUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Silence.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*SilenceCreateBulk) Save

func (scb *SilenceCreateBulk) Save(ctx context.Context) ([]*Silence, error)

Save creates the Silence entities in the database.

func (*SilenceCreateBulk) SaveX

func (scb *SilenceCreateBulk) SaveX(ctx context.Context) []*Silence

SaveX is like Save, but panics if an error occurs.

type SilenceDelete

type SilenceDelete struct {
	// contains filtered or unexported fields
}

SilenceDelete is the builder for deleting a Silence entity.

func (*SilenceDelete) Exec

func (sd *SilenceDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*SilenceDelete) ExecX

func (sd *SilenceDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*SilenceDelete) Where

func (sd *SilenceDelete) Where(ps ...predicate.Silence) *SilenceDelete

Where appends a list predicates to the SilenceDelete builder.

type SilenceDeleteOne

type SilenceDeleteOne struct {
	// contains filtered or unexported fields
}

SilenceDeleteOne is the builder for deleting a single Silence entity.

func (*SilenceDeleteOne) Exec

func (sdo *SilenceDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SilenceDeleteOne) ExecX

func (sdo *SilenceDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SilenceDeleteOne) Where

Where appends a list predicates to the SilenceDelete builder.

type SilenceEdge

type SilenceEdge struct {
	Node   *Silence `json:"node"`
	Cursor Cursor   `json:"cursor"`
}

SilenceEdge is the edge representation of Silence.

type SilenceEdges

type SilenceEdges struct {
	// 创建人
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

SilenceEdges holds the relations/edges for other nodes in the graph.

func (SilenceEdges) UserOrErr

func (e SilenceEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type SilenceGroupBy

type SilenceGroupBy struct {
	// contains filtered or unexported fields
}

SilenceGroupBy is the group-by builder for Silence entities.

func (*SilenceGroupBy) Aggregate

func (sgb *SilenceGroupBy) Aggregate(fns ...AggregateFunc) *SilenceGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*SilenceGroupBy) Bool

func (s *SilenceGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SilenceGroupBy) BoolX

func (s *SilenceGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SilenceGroupBy) Bools

func (s *SilenceGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SilenceGroupBy) BoolsX

func (s *SilenceGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SilenceGroupBy) Float64

func (s *SilenceGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SilenceGroupBy) Float64X

func (s *SilenceGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SilenceGroupBy) Float64s

func (s *SilenceGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SilenceGroupBy) Float64sX

func (s *SilenceGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SilenceGroupBy) Int

func (s *SilenceGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SilenceGroupBy) IntX

func (s *SilenceGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SilenceGroupBy) Ints

func (s *SilenceGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SilenceGroupBy) IntsX

func (s *SilenceGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SilenceGroupBy) Scan

func (sgb *SilenceGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SilenceGroupBy) ScanX

func (s *SilenceGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SilenceGroupBy) String

func (s *SilenceGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SilenceGroupBy) StringX

func (s *SilenceGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SilenceGroupBy) Strings

func (s *SilenceGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SilenceGroupBy) StringsX

func (s *SilenceGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SilenceMutation

type SilenceMutation struct {
	// contains filtered or unexported fields
}

SilenceMutation represents an operation that mutates the Silence nodes in the graph.

func (*SilenceMutation) AddField

func (m *SilenceMutation) 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 (*SilenceMutation) AddTenantID

func (m *SilenceMutation) AddTenantID(i int)

AddTenantID adds i to the "tenant_id" field.

func (*SilenceMutation) AddUpdatedBy

func (m *SilenceMutation) AddUpdatedBy(i int)

AddUpdatedBy adds i to the "updated_by" field.

func (*SilenceMutation) AddedEdges

func (m *SilenceMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*SilenceMutation) AddedField

func (m *SilenceMutation) 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 (*SilenceMutation) AddedFields

func (m *SilenceMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*SilenceMutation) AddedIDs

func (m *SilenceMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*SilenceMutation) AddedTenantID

func (m *SilenceMutation) AddedTenantID() (r int, exists bool)

AddedTenantID returns the value that was added to the "tenant_id" field in this mutation.

func (*SilenceMutation) AddedUpdatedBy

func (m *SilenceMutation) AddedUpdatedBy() (r int, exists bool)

AddedUpdatedBy returns the value that was added to the "updated_by" field in this mutation.

func (*SilenceMutation) AppendMatchers

func (m *SilenceMutation) AppendMatchers(l []*label.Matcher)

AppendMatchers adds l to the "matchers" field.

func (*SilenceMutation) AppendedMatchers

func (m *SilenceMutation) AppendedMatchers() ([]*label.Matcher, bool)

AppendedMatchers returns the list of values that were appended to the "matchers" field in this mutation.

func (*SilenceMutation) ClearComments

func (m *SilenceMutation) ClearComments()

ClearComments clears the value of the "comments" field.

func (*SilenceMutation) ClearEdge

func (m *SilenceMutation) 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 (*SilenceMutation) ClearField

func (m *SilenceMutation) 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 (*SilenceMutation) ClearMatchers

func (m *SilenceMutation) ClearMatchers()

ClearMatchers clears the value of the "matchers" field.

func (*SilenceMutation) ClearUpdatedAt

func (m *SilenceMutation) ClearUpdatedAt()

ClearUpdatedAt clears the value of the "updated_at" field.

func (*SilenceMutation) ClearUpdatedBy

func (m *SilenceMutation) ClearUpdatedBy()

ClearUpdatedBy clears the value of the "updated_by" field.

func (*SilenceMutation) ClearUser

func (m *SilenceMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*SilenceMutation) ClearedEdges

func (m *SilenceMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*SilenceMutation) ClearedFields

func (m *SilenceMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (SilenceMutation) Client

func (m SilenceMutation) 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 (*SilenceMutation) Comments

func (m *SilenceMutation) Comments() (r string, exists bool)

Comments returns the value of the "comments" field in the mutation.

func (*SilenceMutation) CommentsCleared

func (m *SilenceMutation) CommentsCleared() bool

CommentsCleared returns if the "comments" field was cleared in this mutation.

func (*SilenceMutation) CreatedAt

func (m *SilenceMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*SilenceMutation) CreatedBy

func (m *SilenceMutation) CreatedBy() (r int, exists bool)

CreatedBy returns the value of the "created_by" field in the mutation.

func (*SilenceMutation) EdgeCleared

func (m *SilenceMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*SilenceMutation) EndsAt

func (m *SilenceMutation) EndsAt() (r time.Time, exists bool)

EndsAt returns the value of the "ends_at" field in the mutation.

func (*SilenceMutation) Field

func (m *SilenceMutation) 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 (*SilenceMutation) FieldCleared

func (m *SilenceMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*SilenceMutation) Fields

func (m *SilenceMutation) 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 (*SilenceMutation) ID

func (m *SilenceMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*SilenceMutation) IDs

func (m *SilenceMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*SilenceMutation) Matchers

func (m *SilenceMutation) Matchers() (r []*label.Matcher, exists bool)

Matchers returns the value of the "matchers" field in the mutation.

func (*SilenceMutation) MatchersCleared

func (m *SilenceMutation) MatchersCleared() bool

MatchersCleared returns if the "matchers" field was cleared in this mutation.

func (*SilenceMutation) OldComments

func (m *SilenceMutation) OldComments(ctx context.Context) (v string, err error)

OldComments returns the old "comments" field's value of the Silence entity. If the Silence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SilenceMutation) OldCreatedAt

func (m *SilenceMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Silence entity. If the Silence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SilenceMutation) OldCreatedBy

func (m *SilenceMutation) OldCreatedBy(ctx context.Context) (v int, err error)

OldCreatedBy returns the old "created_by" field's value of the Silence entity. If the Silence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SilenceMutation) OldEndsAt

func (m *SilenceMutation) OldEndsAt(ctx context.Context) (v time.Time, err error)

OldEndsAt returns the old "ends_at" field's value of the Silence entity. If the Silence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SilenceMutation) OldField

func (m *SilenceMutation) 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 (*SilenceMutation) OldMatchers

func (m *SilenceMutation) OldMatchers(ctx context.Context) (v []*label.Matcher, err error)

OldMatchers returns the old "matchers" field's value of the Silence entity. If the Silence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SilenceMutation) OldStartsAt

func (m *SilenceMutation) OldStartsAt(ctx context.Context) (v time.Time, err error)

OldStartsAt returns the old "starts_at" field's value of the Silence entity. If the Silence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SilenceMutation) OldState

func (m *SilenceMutation) OldState(ctx context.Context) (v alert.SilenceState, err error)

OldState returns the old "state" field's value of the Silence entity. If the Silence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SilenceMutation) OldTenantID

func (m *SilenceMutation) OldTenantID(ctx context.Context) (v int, err error)

OldTenantID returns the old "tenant_id" field's value of the Silence entity. If the Silence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SilenceMutation) OldUpdatedAt

func (m *SilenceMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Silence entity. If the Silence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SilenceMutation) OldUpdatedBy

func (m *SilenceMutation) OldUpdatedBy(ctx context.Context) (v int, err error)

OldUpdatedBy returns the old "updated_by" field's value of the Silence entity. If the Silence object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*SilenceMutation) Op

func (m *SilenceMutation) Op() Op

Op returns the operation name.

func (*SilenceMutation) RemovedEdges

func (m *SilenceMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*SilenceMutation) RemovedIDs

func (m *SilenceMutation) 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 (*SilenceMutation) ResetComments

func (m *SilenceMutation) ResetComments()

ResetComments resets all changes to the "comments" field.

func (*SilenceMutation) ResetCreatedAt

func (m *SilenceMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SilenceMutation) ResetCreatedBy

func (m *SilenceMutation) ResetCreatedBy()

ResetCreatedBy resets all changes to the "created_by" field.

func (*SilenceMutation) ResetEdge

func (m *SilenceMutation) 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 (*SilenceMutation) ResetEndsAt

func (m *SilenceMutation) ResetEndsAt()

ResetEndsAt resets all changes to the "ends_at" field.

func (*SilenceMutation) ResetField

func (m *SilenceMutation) 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 (*SilenceMutation) ResetMatchers

func (m *SilenceMutation) ResetMatchers()

ResetMatchers resets all changes to the "matchers" field.

func (*SilenceMutation) ResetStartsAt

func (m *SilenceMutation) ResetStartsAt()

ResetStartsAt resets all changes to the "starts_at" field.

func (*SilenceMutation) ResetState

func (m *SilenceMutation) ResetState()

ResetState resets all changes to the "state" field.

func (*SilenceMutation) ResetTenantID

func (m *SilenceMutation) ResetTenantID()

ResetTenantID resets all changes to the "tenant_id" field.

func (*SilenceMutation) ResetUpdatedAt

func (m *SilenceMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*SilenceMutation) ResetUpdatedBy

func (m *SilenceMutation) ResetUpdatedBy()

ResetUpdatedBy resets all changes to the "updated_by" field.

func (*SilenceMutation) ResetUser

func (m *SilenceMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*SilenceMutation) SetComments

func (m *SilenceMutation) SetComments(s string)

SetComments sets the "comments" field.

func (*SilenceMutation) SetCreatedAt

func (m *SilenceMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*SilenceMutation) SetCreatedBy

func (m *SilenceMutation) SetCreatedBy(i int)

SetCreatedBy sets the "created_by" field.

func (*SilenceMutation) SetEndsAt

func (m *SilenceMutation) SetEndsAt(t time.Time)

SetEndsAt sets the "ends_at" field.

func (*SilenceMutation) SetField

func (m *SilenceMutation) 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 (*SilenceMutation) SetID

func (m *SilenceMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Silence entities.

func (*SilenceMutation) SetMatchers

func (m *SilenceMutation) SetMatchers(l []*label.Matcher)

SetMatchers sets the "matchers" field.

func (*SilenceMutation) SetOp

func (m *SilenceMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*SilenceMutation) SetStartsAt

func (m *SilenceMutation) SetStartsAt(t time.Time)

SetStartsAt sets the "starts_at" field.

func (*SilenceMutation) SetState

func (m *SilenceMutation) SetState(as alert.SilenceState)

SetState sets the "state" field.

func (*SilenceMutation) SetTenantID

func (m *SilenceMutation) SetTenantID(i int)

SetTenantID sets the "tenant_id" field.

func (*SilenceMutation) SetUpdatedAt

func (m *SilenceMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*SilenceMutation) SetUpdatedBy

func (m *SilenceMutation) SetUpdatedBy(i int)

SetUpdatedBy sets the "updated_by" field.

func (*SilenceMutation) SetUserID

func (m *SilenceMutation) SetUserID(id int)

SetUserID sets the "user" edge to the User entity by id.

func (*SilenceMutation) StartsAt

func (m *SilenceMutation) StartsAt() (r time.Time, exists bool)

StartsAt returns the value of the "starts_at" field in the mutation.

func (*SilenceMutation) State

func (m *SilenceMutation) State() (r alert.SilenceState, exists bool)

State returns the value of the "state" field in the mutation.

func (*SilenceMutation) TenantID

func (m *SilenceMutation) TenantID() (r int, exists bool)

TenantID returns the value of the "tenant_id" field in the mutation.

func (SilenceMutation) Tx

func (m SilenceMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*SilenceMutation) Type

func (m *SilenceMutation) Type() string

Type returns the node type of this mutation (Silence).

func (*SilenceMutation) UpdatedAt

func (m *SilenceMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*SilenceMutation) UpdatedAtCleared

func (m *SilenceMutation) UpdatedAtCleared() bool

UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.

func (*SilenceMutation) UpdatedBy

func (m *SilenceMutation) UpdatedBy() (r int, exists bool)

UpdatedBy returns the value of the "updated_by" field in the mutation.

func (*SilenceMutation) UpdatedByCleared

func (m *SilenceMutation) UpdatedByCleared() bool

UpdatedByCleared returns if the "updated_by" field was cleared in this mutation.

func (*SilenceMutation) UserCleared

func (m *SilenceMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*SilenceMutation) UserID

func (m *SilenceMutation) UserID() (id int, exists bool)

UserID returns the "user" edge ID in the mutation.

func (*SilenceMutation) UserIDs

func (m *SilenceMutation) UserIDs() (ids []int)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*SilenceMutation) Where

func (m *SilenceMutation) Where(ps ...predicate.Silence)

Where appends a list predicates to the SilenceMutation builder.

func (*SilenceMutation) WhereP

func (m *SilenceMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the SilenceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type SilenceOrder

type SilenceOrder struct {
	Direction OrderDirection     `json:"direction"`
	Field     *SilenceOrderField `json:"field"`
}

SilenceOrder defines the ordering of Silence.

type SilenceOrderField

type SilenceOrderField struct {
	// Value extracts the ordering value from the given Silence.
	Value func(*Silence) (ent.Value, error)
	// contains filtered or unexported fields
}

SilenceOrderField defines the ordering field of Silence.

func (SilenceOrderField) MarshalGQL

func (f SilenceOrderField) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (SilenceOrderField) String

func (f SilenceOrderField) String() string

String implement fmt.Stringer interface.

func (*SilenceOrderField) UnmarshalGQL

func (f *SilenceOrderField) UnmarshalGQL(v interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

type SilencePaginateOption

type SilencePaginateOption func(*silencePager) error

SilencePaginateOption enables pagination customization.

func WithSilenceFilter

func WithSilenceFilter(filter func(*SilenceQuery) (*SilenceQuery, error)) SilencePaginateOption

WithSilenceFilter configures pagination filter.

func WithSilenceOrder

func WithSilenceOrder(order *SilenceOrder) SilencePaginateOption

WithSilenceOrder configures pagination ordering.

type SilenceQuery

type SilenceQuery struct {
	// contains filtered or unexported fields
}

SilenceQuery is the builder for querying Silence entities.

func (*SilenceQuery) Aggregate

func (sq *SilenceQuery) Aggregate(fns ...AggregateFunc) *SilenceSelect

Aggregate returns a SilenceSelect configured with the given aggregations.

func (*SilenceQuery) All

func (sq *SilenceQuery) All(ctx context.Context) ([]*Silence, error)

All executes the query and returns a list of Silences.

func (*SilenceQuery) AllX

func (sq *SilenceQuery) AllX(ctx context.Context) []*Silence

AllX is like All, but panics if an error occurs.

func (*SilenceQuery) Clone

func (sq *SilenceQuery) Clone() *SilenceQuery

Clone returns a duplicate of the SilenceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*SilenceQuery) CollectFields

func (s *SilenceQuery) CollectFields(ctx context.Context, satisfies ...string) (*SilenceQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*SilenceQuery) Count

func (sq *SilenceQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SilenceQuery) CountX

func (sq *SilenceQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*SilenceQuery) Exist

func (sq *SilenceQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*SilenceQuery) ExistX

func (sq *SilenceQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*SilenceQuery) First

func (sq *SilenceQuery) First(ctx context.Context) (*Silence, error)

First returns the first Silence entity from the query. Returns a *NotFoundError when no Silence was found.

func (*SilenceQuery) FirstID

func (sq *SilenceQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Silence ID from the query. Returns a *NotFoundError when no Silence ID was found.

func (*SilenceQuery) FirstIDX

func (sq *SilenceQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*SilenceQuery) FirstX

func (sq *SilenceQuery) FirstX(ctx context.Context) *Silence

FirstX is like First, but panics if an error occurs.

func (*SilenceQuery) GroupBy

func (sq *SilenceQuery) GroupBy(field string, fields ...string) *SilenceGroupBy

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 {
	CreatedBy int `json:"created_by,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Silence.Query().
	GroupBy(silence.FieldCreatedBy).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SilenceQuery) IDs

func (sq *SilenceQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of Silence IDs.

func (*SilenceQuery) IDsX

func (sq *SilenceQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*SilenceQuery) Limit

func (sq *SilenceQuery) Limit(limit int) *SilenceQuery

Limit the number of records to be returned by this query.

func (*SilenceQuery) Offset

func (sq *SilenceQuery) Offset(offset int) *SilenceQuery

Offset to start from.

func (*SilenceQuery) Only

func (sq *SilenceQuery) Only(ctx context.Context) (*Silence, error)

Only returns a single Silence entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Silence entity is found. Returns a *NotFoundError when no Silence entities are found.

func (*SilenceQuery) OnlyID

func (sq *SilenceQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Silence ID in the query. Returns a *NotSingularError when more than one Silence ID is found. Returns a *NotFoundError when no entities are found.

func (*SilenceQuery) OnlyIDX

func (sq *SilenceQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*SilenceQuery) OnlyX

func (sq *SilenceQuery) OnlyX(ctx context.Context) *Silence

OnlyX is like Only, but panics if an error occurs.

func (*SilenceQuery) Order

func (sq *SilenceQuery) Order(o ...silence.OrderOption) *SilenceQuery

Order specifies how the records should be ordered.

func (*SilenceQuery) Paginate

func (s *SilenceQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...SilencePaginateOption,
) (*SilenceConnection, error)

Paginate executes the query and returns a relay based cursor connection to Silence.

func (*SilenceQuery) QueryUser

func (sq *SilenceQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*SilenceQuery) Select

func (sq *SilenceQuery) Select(fields ...string) *SilenceSelect

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 {
	CreatedBy int `json:"created_by,omitempty"`
}

client.Silence.Query().
	Select(silence.FieldCreatedBy).
	Scan(ctx, &v)

func (*SilenceQuery) Unique

func (sq *SilenceQuery) Unique(unique bool) *SilenceQuery

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 (*SilenceQuery) Where

func (sq *SilenceQuery) Where(ps ...predicate.Silence) *SilenceQuery

Where adds a new predicate for the SilenceQuery builder.

func (*SilenceQuery) WithUser

func (sq *SilenceQuery) WithUser(opts ...func(*UserQuery)) *SilenceQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type SilenceSelect

type SilenceSelect struct {
	*SilenceQuery
	// contains filtered or unexported fields
}

SilenceSelect is the builder for selecting fields of Silence entities.

func (*SilenceSelect) Aggregate

func (ss *SilenceSelect) Aggregate(fns ...AggregateFunc) *SilenceSelect

Aggregate adds the given aggregation functions to the selector query.

func (*SilenceSelect) Bool

func (s *SilenceSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*SilenceSelect) BoolX

func (s *SilenceSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*SilenceSelect) Bools

func (s *SilenceSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*SilenceSelect) BoolsX

func (s *SilenceSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*SilenceSelect) Float64

func (s *SilenceSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*SilenceSelect) Float64X

func (s *SilenceSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*SilenceSelect) Float64s

func (s *SilenceSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*SilenceSelect) Float64sX

func (s *SilenceSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*SilenceSelect) Int

func (s *SilenceSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*SilenceSelect) IntX

func (s *SilenceSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*SilenceSelect) Ints

func (s *SilenceSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*SilenceSelect) IntsX

func (s *SilenceSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*SilenceSelect) Scan

func (ss *SilenceSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*SilenceSelect) ScanX

func (s *SilenceSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*SilenceSelect) String

func (s *SilenceSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*SilenceSelect) StringX

func (s *SilenceSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*SilenceSelect) Strings

func (s *SilenceSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*SilenceSelect) StringsX

func (s *SilenceSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type SilenceUpdate

type SilenceUpdate struct {
	// contains filtered or unexported fields
}

SilenceUpdate is the builder for updating Silence entities.

func (*SilenceUpdate) AddUpdatedBy

func (su *SilenceUpdate) AddUpdatedBy(i int) *SilenceUpdate

AddUpdatedBy adds i to the "updated_by" field.

func (*SilenceUpdate) AppendMatchers

func (su *SilenceUpdate) AppendMatchers(l []*label.Matcher) *SilenceUpdate

AppendMatchers appends l to the "matchers" field.

func (*SilenceUpdate) ClearComments

func (su *SilenceUpdate) ClearComments() *SilenceUpdate

ClearComments clears the value of the "comments" field.

func (*SilenceUpdate) ClearMatchers

func (su *SilenceUpdate) ClearMatchers() *SilenceUpdate

ClearMatchers clears the value of the "matchers" field.

func (*SilenceUpdate) ClearUpdatedAt

func (su *SilenceUpdate) ClearUpdatedAt() *SilenceUpdate

ClearUpdatedAt clears the value of the "updated_at" field.

func (*SilenceUpdate) ClearUpdatedBy

func (su *SilenceUpdate) ClearUpdatedBy() *SilenceUpdate

ClearUpdatedBy clears the value of the "updated_by" field.

func (*SilenceUpdate) Exec

func (su *SilenceUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SilenceUpdate) ExecX

func (su *SilenceUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SilenceUpdate) Mutation

func (su *SilenceUpdate) Mutation() *SilenceMutation

Mutation returns the SilenceMutation object of the builder.

func (*SilenceUpdate) Save

func (su *SilenceUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*SilenceUpdate) SaveX

func (su *SilenceUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*SilenceUpdate) SetComments

func (su *SilenceUpdate) SetComments(s string) *SilenceUpdate

SetComments sets the "comments" field.

func (*SilenceUpdate) SetEndsAt

func (su *SilenceUpdate) SetEndsAt(t time.Time) *SilenceUpdate

SetEndsAt sets the "ends_at" field.

func (*SilenceUpdate) SetInput

SetInput applies the change-set in the UpdateSilenceInput on the SilenceUpdate builder.

func (*SilenceUpdate) SetMatchers

func (su *SilenceUpdate) SetMatchers(l []*label.Matcher) *SilenceUpdate

SetMatchers sets the "matchers" field.

func (*SilenceUpdate) SetNillableComments

func (su *SilenceUpdate) SetNillableComments(s *string) *SilenceUpdate

SetNillableComments sets the "comments" field if the given value is not nil.

func (*SilenceUpdate) SetNillableState

func (su *SilenceUpdate) SetNillableState(as *alert.SilenceState) *SilenceUpdate

SetNillableState sets the "state" field if the given value is not nil.

func (*SilenceUpdate) SetNillableUpdatedAt

func (su *SilenceUpdate) SetNillableUpdatedAt(t *time.Time) *SilenceUpdate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SilenceUpdate) SetNillableUpdatedBy

func (su *SilenceUpdate) SetNillableUpdatedBy(i *int) *SilenceUpdate

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*SilenceUpdate) SetStartsAt

func (su *SilenceUpdate) SetStartsAt(t time.Time) *SilenceUpdate

SetStartsAt sets the "starts_at" field.

func (*SilenceUpdate) SetState

func (su *SilenceUpdate) SetState(as alert.SilenceState) *SilenceUpdate

SetState sets the "state" field.

func (*SilenceUpdate) SetUpdatedAt

func (su *SilenceUpdate) SetUpdatedAt(t time.Time) *SilenceUpdate

SetUpdatedAt sets the "updated_at" field.

func (*SilenceUpdate) SetUpdatedBy

func (su *SilenceUpdate) SetUpdatedBy(i int) *SilenceUpdate

SetUpdatedBy sets the "updated_by" field.

func (*SilenceUpdate) Where

func (su *SilenceUpdate) Where(ps ...predicate.Silence) *SilenceUpdate

Where appends a list predicates to the SilenceUpdate builder.

type SilenceUpdateOne

type SilenceUpdateOne struct {
	// contains filtered or unexported fields
}

SilenceUpdateOne is the builder for updating a single Silence entity.

func (*SilenceUpdateOne) AddUpdatedBy

func (suo *SilenceUpdateOne) AddUpdatedBy(i int) *SilenceUpdateOne

AddUpdatedBy adds i to the "updated_by" field.

func (*SilenceUpdateOne) AppendMatchers

func (suo *SilenceUpdateOne) AppendMatchers(l []*label.Matcher) *SilenceUpdateOne

AppendMatchers appends l to the "matchers" field.

func (*SilenceUpdateOne) ClearComments

func (suo *SilenceUpdateOne) ClearComments() *SilenceUpdateOne

ClearComments clears the value of the "comments" field.

func (*SilenceUpdateOne) ClearMatchers

func (suo *SilenceUpdateOne) ClearMatchers() *SilenceUpdateOne

ClearMatchers clears the value of the "matchers" field.

func (*SilenceUpdateOne) ClearUpdatedAt

func (suo *SilenceUpdateOne) ClearUpdatedAt() *SilenceUpdateOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*SilenceUpdateOne) ClearUpdatedBy

func (suo *SilenceUpdateOne) ClearUpdatedBy() *SilenceUpdateOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*SilenceUpdateOne) Exec

func (suo *SilenceUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SilenceUpdateOne) ExecX

func (suo *SilenceUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SilenceUpdateOne) Mutation

func (suo *SilenceUpdateOne) Mutation() *SilenceMutation

Mutation returns the SilenceMutation object of the builder.

func (*SilenceUpdateOne) Save

func (suo *SilenceUpdateOne) Save(ctx context.Context) (*Silence, error)

Save executes the query and returns the updated Silence entity.

func (*SilenceUpdateOne) SaveX

func (suo *SilenceUpdateOne) SaveX(ctx context.Context) *Silence

SaveX is like Save, but panics if an error occurs.

func (*SilenceUpdateOne) Select

func (suo *SilenceUpdateOne) Select(field string, fields ...string) *SilenceUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*SilenceUpdateOne) SetComments

func (suo *SilenceUpdateOne) SetComments(s string) *SilenceUpdateOne

SetComments sets the "comments" field.

func (*SilenceUpdateOne) SetEndsAt

func (suo *SilenceUpdateOne) SetEndsAt(t time.Time) *SilenceUpdateOne

SetEndsAt sets the "ends_at" field.

func (*SilenceUpdateOne) SetInput

SetInput applies the change-set in the UpdateSilenceInput on the SilenceUpdateOne builder.

func (*SilenceUpdateOne) SetMatchers

func (suo *SilenceUpdateOne) SetMatchers(l []*label.Matcher) *SilenceUpdateOne

SetMatchers sets the "matchers" field.

func (*SilenceUpdateOne) SetNillableComments

func (suo *SilenceUpdateOne) SetNillableComments(s *string) *SilenceUpdateOne

SetNillableComments sets the "comments" field if the given value is not nil.

func (*SilenceUpdateOne) SetNillableState

func (suo *SilenceUpdateOne) SetNillableState(as *alert.SilenceState) *SilenceUpdateOne

SetNillableState sets the "state" field if the given value is not nil.

func (*SilenceUpdateOne) SetNillableUpdatedAt

func (suo *SilenceUpdateOne) SetNillableUpdatedAt(t *time.Time) *SilenceUpdateOne

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*SilenceUpdateOne) SetNillableUpdatedBy

func (suo *SilenceUpdateOne) SetNillableUpdatedBy(i *int) *SilenceUpdateOne

SetNillableUpdatedBy sets the "updated_by" field if the given value is not nil.

func (*SilenceUpdateOne) SetStartsAt

func (suo *SilenceUpdateOne) SetStartsAt(t time.Time) *SilenceUpdateOne

SetStartsAt sets the "starts_at" field.

func (*SilenceUpdateOne) SetState

SetState sets the "state" field.

func (*SilenceUpdateOne) SetUpdatedAt

func (suo *SilenceUpdateOne) SetUpdatedAt(t time.Time) *SilenceUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*SilenceUpdateOne) SetUpdatedBy

func (suo *SilenceUpdateOne) SetUpdatedBy(i int) *SilenceUpdateOne

SetUpdatedBy sets the "updated_by" field.

func (*SilenceUpdateOne) Where

Where appends a list predicates to the SilenceUpdate builder.

type SilenceUpsert

type SilenceUpsert struct {
	*sql.UpdateSet
}

SilenceUpsert is the "OnConflict" setter.

func (*SilenceUpsert) AddUpdatedBy

func (u *SilenceUpsert) AddUpdatedBy(v int) *SilenceUpsert

AddUpdatedBy adds v to the "updated_by" field.

func (*SilenceUpsert) ClearComments

func (u *SilenceUpsert) ClearComments() *SilenceUpsert

ClearComments clears the value of the "comments" field.

func (*SilenceUpsert) ClearMatchers

func (u *SilenceUpsert) ClearMatchers() *SilenceUpsert

ClearMatchers clears the value of the "matchers" field.

func (*SilenceUpsert) ClearUpdatedAt

func (u *SilenceUpsert) ClearUpdatedAt() *SilenceUpsert

ClearUpdatedAt clears the value of the "updated_at" field.

func (*SilenceUpsert) ClearUpdatedBy

func (u *SilenceUpsert) ClearUpdatedBy() *SilenceUpsert

ClearUpdatedBy clears the value of the "updated_by" field.

func (*SilenceUpsert) SetComments

func (u *SilenceUpsert) SetComments(v string) *SilenceUpsert

SetComments sets the "comments" field.

func (*SilenceUpsert) SetEndsAt

func (u *SilenceUpsert) SetEndsAt(v time.Time) *SilenceUpsert

SetEndsAt sets the "ends_at" field.

func (*SilenceUpsert) SetMatchers

func (u *SilenceUpsert) SetMatchers(v []*label.Matcher) *SilenceUpsert

SetMatchers sets the "matchers" field.

func (*SilenceUpsert) SetStartsAt

func (u *SilenceUpsert) SetStartsAt(v time.Time) *SilenceUpsert

SetStartsAt sets the "starts_at" field.

func (*SilenceUpsert) SetState

SetState sets the "state" field.

func (*SilenceUpsert) SetUpdatedAt

func (u *SilenceUpsert) SetUpdatedAt(v time.Time) *SilenceUpsert

SetUpdatedAt sets the "updated_at" field.

func (*SilenceUpsert) SetUpdatedBy

func (u *SilenceUpsert) SetUpdatedBy(v int) *SilenceUpsert

SetUpdatedBy sets the "updated_by" field.

func (*SilenceUpsert) UpdateComments

func (u *SilenceUpsert) UpdateComments() *SilenceUpsert

UpdateComments sets the "comments" field to the value that was provided on create.

func (*SilenceUpsert) UpdateEndsAt

func (u *SilenceUpsert) UpdateEndsAt() *SilenceUpsert

UpdateEndsAt sets the "ends_at" field to the value that was provided on create.

func (*SilenceUpsert) UpdateMatchers

func (u *SilenceUpsert) UpdateMatchers() *SilenceUpsert

UpdateMatchers sets the "matchers" field to the value that was provided on create.

func (*SilenceUpsert) UpdateStartsAt

func (u *SilenceUpsert) UpdateStartsAt() *SilenceUpsert

UpdateStartsAt sets the "starts_at" field to the value that was provided on create.

func (*SilenceUpsert) UpdateState

func (u *SilenceUpsert) UpdateState() *SilenceUpsert

UpdateState sets the "state" field to the value that was provided on create.

func (*SilenceUpsert) UpdateUpdatedAt

func (u *SilenceUpsert) UpdateUpdatedAt() *SilenceUpsert

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*SilenceUpsert) UpdateUpdatedBy

func (u *SilenceUpsert) UpdateUpdatedBy() *SilenceUpsert

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type SilenceUpsertBulk

type SilenceUpsertBulk struct {
	// contains filtered or unexported fields
}

SilenceUpsertBulk is the builder for "upsert"-ing a bulk of Silence nodes.

func (*SilenceUpsertBulk) AddUpdatedBy

func (u *SilenceUpsertBulk) AddUpdatedBy(v int) *SilenceUpsertBulk

AddUpdatedBy adds v to the "updated_by" field.

func (*SilenceUpsertBulk) ClearComments

func (u *SilenceUpsertBulk) ClearComments() *SilenceUpsertBulk

ClearComments clears the value of the "comments" field.

func (*SilenceUpsertBulk) ClearMatchers

func (u *SilenceUpsertBulk) ClearMatchers() *SilenceUpsertBulk

ClearMatchers clears the value of the "matchers" field.

func (*SilenceUpsertBulk) ClearUpdatedAt

func (u *SilenceUpsertBulk) ClearUpdatedAt() *SilenceUpsertBulk

ClearUpdatedAt clears the value of the "updated_at" field.

func (*SilenceUpsertBulk) ClearUpdatedBy

func (u *SilenceUpsertBulk) ClearUpdatedBy() *SilenceUpsertBulk

ClearUpdatedBy clears the value of the "updated_by" field.

func (*SilenceUpsertBulk) DoNothing

func (u *SilenceUpsertBulk) DoNothing() *SilenceUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SilenceUpsertBulk) Exec

func (u *SilenceUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SilenceUpsertBulk) ExecX

func (u *SilenceUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SilenceUpsertBulk) Ignore

func (u *SilenceUpsertBulk) Ignore() *SilenceUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Silence.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*SilenceUpsertBulk) SetComments

func (u *SilenceUpsertBulk) SetComments(v string) *SilenceUpsertBulk

SetComments sets the "comments" field.

func (*SilenceUpsertBulk) SetEndsAt

func (u *SilenceUpsertBulk) SetEndsAt(v time.Time) *SilenceUpsertBulk

SetEndsAt sets the "ends_at" field.

func (*SilenceUpsertBulk) SetMatchers

func (u *SilenceUpsertBulk) SetMatchers(v []*label.Matcher) *SilenceUpsertBulk

SetMatchers sets the "matchers" field.

func (*SilenceUpsertBulk) SetStartsAt

func (u *SilenceUpsertBulk) SetStartsAt(v time.Time) *SilenceUpsertBulk

SetStartsAt sets the "starts_at" field.

func (*SilenceUpsertBulk) SetState

SetState sets the "state" field.

func (*SilenceUpsertBulk) SetUpdatedAt

func (u *SilenceUpsertBulk) SetUpdatedAt(v time.Time) *SilenceUpsertBulk

SetUpdatedAt sets the "updated_at" field.

func (*SilenceUpsertBulk) SetUpdatedBy

func (u *SilenceUpsertBulk) SetUpdatedBy(v int) *SilenceUpsertBulk

SetUpdatedBy sets the "updated_by" field.

func (*SilenceUpsertBulk) Update

func (u *SilenceUpsertBulk) Update(set func(*SilenceUpsert)) *SilenceUpsertBulk

Update allows overriding fields `UPDATE` values. See the SilenceCreateBulk.OnConflict documentation for more info.

func (*SilenceUpsertBulk) UpdateComments

func (u *SilenceUpsertBulk) UpdateComments() *SilenceUpsertBulk

UpdateComments sets the "comments" field to the value that was provided on create.

func (*SilenceUpsertBulk) UpdateEndsAt

func (u *SilenceUpsertBulk) UpdateEndsAt() *SilenceUpsertBulk

UpdateEndsAt sets the "ends_at" field to the value that was provided on create.

func (*SilenceUpsertBulk) UpdateMatchers

func (u *SilenceUpsertBulk) UpdateMatchers() *SilenceUpsertBulk

UpdateMatchers sets the "matchers" field to the value that was provided on create.

func (*SilenceUpsertBulk) UpdateNewValues

func (u *SilenceUpsertBulk) UpdateNewValues() *SilenceUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.Silence.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(silence.FieldID)
		}),
	).
	Exec(ctx)

func (*SilenceUpsertBulk) UpdateStartsAt

func (u *SilenceUpsertBulk) UpdateStartsAt() *SilenceUpsertBulk

UpdateStartsAt sets the "starts_at" field to the value that was provided on create.

func (*SilenceUpsertBulk) UpdateState

func (u *SilenceUpsertBulk) UpdateState() *SilenceUpsertBulk

UpdateState sets the "state" field to the value that was provided on create.

func (*SilenceUpsertBulk) UpdateUpdatedAt

func (u *SilenceUpsertBulk) UpdateUpdatedAt() *SilenceUpsertBulk

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*SilenceUpsertBulk) UpdateUpdatedBy

func (u *SilenceUpsertBulk) UpdateUpdatedBy() *SilenceUpsertBulk

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type SilenceUpsertOne

type SilenceUpsertOne struct {
	// contains filtered or unexported fields
}

SilenceUpsertOne is the builder for "upsert"-ing

one Silence node.

func (*SilenceUpsertOne) AddUpdatedBy

func (u *SilenceUpsertOne) AddUpdatedBy(v int) *SilenceUpsertOne

AddUpdatedBy adds v to the "updated_by" field.

func (*SilenceUpsertOne) ClearComments

func (u *SilenceUpsertOne) ClearComments() *SilenceUpsertOne

ClearComments clears the value of the "comments" field.

func (*SilenceUpsertOne) ClearMatchers

func (u *SilenceUpsertOne) ClearMatchers() *SilenceUpsertOne

ClearMatchers clears the value of the "matchers" field.

func (*SilenceUpsertOne) ClearUpdatedAt

func (u *SilenceUpsertOne) ClearUpdatedAt() *SilenceUpsertOne

ClearUpdatedAt clears the value of the "updated_at" field.

func (*SilenceUpsertOne) ClearUpdatedBy

func (u *SilenceUpsertOne) ClearUpdatedBy() *SilenceUpsertOne

ClearUpdatedBy clears the value of the "updated_by" field.

func (*SilenceUpsertOne) DoNothing

func (u *SilenceUpsertOne) DoNothing() *SilenceUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SilenceUpsertOne) Exec

func (u *SilenceUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SilenceUpsertOne) ExecX

func (u *SilenceUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*SilenceUpsertOne) ID

func (u *SilenceUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SilenceUpsertOne) IDX

func (u *SilenceUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*SilenceUpsertOne) Ignore

func (u *SilenceUpsertOne) Ignore() *SilenceUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Silence.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SilenceUpsertOne) SetComments

func (u *SilenceUpsertOne) SetComments(v string) *SilenceUpsertOne

SetComments sets the "comments" field.

func (*SilenceUpsertOne) SetEndsAt

func (u *SilenceUpsertOne) SetEndsAt(v time.Time) *SilenceUpsertOne

SetEndsAt sets the "ends_at" field.

func (*SilenceUpsertOne) SetMatchers

func (u *SilenceUpsertOne) SetMatchers(v []*label.Matcher) *SilenceUpsertOne

SetMatchers sets the "matchers" field.

func (*SilenceUpsertOne) SetStartsAt

func (u *SilenceUpsertOne) SetStartsAt(v time.Time) *SilenceUpsertOne

SetStartsAt sets the "starts_at" field.

func (*SilenceUpsertOne) SetState

SetState sets the "state" field.

func (*SilenceUpsertOne) SetUpdatedAt

func (u *SilenceUpsertOne) SetUpdatedAt(v time.Time) *SilenceUpsertOne

SetUpdatedAt sets the "updated_at" field.

func (*SilenceUpsertOne) SetUpdatedBy

func (u *SilenceUpsertOne) SetUpdatedBy(v int) *SilenceUpsertOne

SetUpdatedBy sets the "updated_by" field.

func (*SilenceUpsertOne) Update

func (u *SilenceUpsertOne) Update(set func(*SilenceUpsert)) *SilenceUpsertOne

Update allows overriding fields `UPDATE` values. See the SilenceCreate.OnConflict documentation for more info.

func (*SilenceUpsertOne) UpdateComments

func (u *SilenceUpsertOne) UpdateComments() *SilenceUpsertOne

UpdateComments sets the "comments" field to the value that was provided on create.

func (*SilenceUpsertOne) UpdateEndsAt

func (u *SilenceUpsertOne) UpdateEndsAt() *SilenceUpsertOne

UpdateEndsAt sets the "ends_at" field to the value that was provided on create.

func (*SilenceUpsertOne) UpdateMatchers

func (u *SilenceUpsertOne) UpdateMatchers() *SilenceUpsertOne

UpdateMatchers sets the "matchers" field to the value that was provided on create.

func (*SilenceUpsertOne) UpdateNewValues

func (u *SilenceUpsertOne) UpdateNewValues() *SilenceUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.Silence.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(silence.FieldID)
		}),
	).
	Exec(ctx)

func (*SilenceUpsertOne) UpdateStartsAt

func (u *SilenceUpsertOne) UpdateStartsAt() *SilenceUpsertOne

UpdateStartsAt sets the "starts_at" field to the value that was provided on create.

func (*SilenceUpsertOne) UpdateState

func (u *SilenceUpsertOne) UpdateState() *SilenceUpsertOne

UpdateState sets the "state" field to the value that was provided on create.

func (*SilenceUpsertOne) UpdateUpdatedAt

func (u *SilenceUpsertOne) UpdateUpdatedAt() *SilenceUpsertOne

UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.

func (*SilenceUpsertOne) UpdateUpdatedBy

func (u *SilenceUpsertOne) UpdateUpdatedBy() *SilenceUpsertOne

UpdateUpdatedBy sets the "updated_by" field to the value that was provided on create.

type SilenceWhereInput

type SilenceWhereInput struct {
	Predicates []predicate.Silence  `json:"-"`
	Not        *SilenceWhereInput   `json:"not,omitempty"`
	Or         []*SilenceWhereInput `json:"or,omitempty"`
	And        []*SilenceWhereInput `json:"and,omitempty"`

	// "id" field predicates.
	ID      *int  `json:"id,omitempty"`
	IDNEQ   *int  `json:"idNEQ,omitempty"`
	IDIn    []int `json:"idIn,omitempty"`
	IDNotIn []int `json:"idNotIn,omitempty"`
	IDGT    *int  `json:"idGT,omitempty"`
	IDGTE   *int  `json:"idGTE,omitempty"`
	IDLT    *int  `json:"idLT,omitempty"`
	IDLTE   *int  `json:"idLTE,omitempty"`

	// "created_by" field predicates.
	CreatedBy      *int  `json:"createdBy,omitempty"`
	CreatedByNEQ   *int  `json:"createdByNEQ,omitempty"`
	CreatedByIn    []int `json:"createdByIn,omitempty"`
	CreatedByNotIn []int `json:"createdByNotIn,omitempty"`

	// "created_at" field predicates.
	CreatedAt      *time.Time  `json:"createdAt,omitempty"`
	CreatedAtNEQ   *time.Time  `json:"createdAtNEQ,omitempty"`
	CreatedAtIn    []time.Time `json:"createdAtIn,omitempty"`
	CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
	CreatedAtGT    *time.Time  `json:"createdAtGT,omitempty"`
	CreatedAtGTE   *time.Time  `json:"createdAtGTE,omitempty"`
	CreatedAtLT    *time.Time  `json:"createdAtLT,omitempty"`
	CreatedAtLTE   *time.Time  `json:"createdAtLTE,omitempty"`

	// "updated_by" field predicates.
	UpdatedBy       *int  `json:"updatedBy,omitempty"`
	UpdatedByNEQ    *int  `json:"updatedByNEQ,omitempty"`
	UpdatedByIn     []int `json:"updatedByIn,omitempty"`
	UpdatedByNotIn  []int `json:"updatedByNotIn,omitempty"`
	UpdatedByGT     *int  `json:"updatedByGT,omitempty"`
	UpdatedByGTE    *int  `json:"updatedByGTE,omitempty"`
	UpdatedByLT     *int  `json:"updatedByLT,omitempty"`
	UpdatedByLTE    *int  `json:"updatedByLTE,omitempty"`
	UpdatedByIsNil  bool  `json:"updatedByIsNil,omitempty"`
	UpdatedByNotNil bool  `json:"updatedByNotNil,omitempty"`

	// "updated_at" field predicates.
	UpdatedAt       *time.Time  `json:"updatedAt,omitempty"`
	UpdatedAtNEQ    *time.Time  `json:"updatedAtNEQ,omitempty"`
	UpdatedAtIn     []time.Time `json:"updatedAtIn,omitempty"`
	UpdatedAtNotIn  []time.Time `json:"updatedAtNotIn,omitempty"`
	UpdatedAtGT     *time.Time  `json:"updatedAtGT,omitempty"`
	UpdatedAtGTE    *time.Time  `json:"updatedAtGTE,omitempty"`
	UpdatedAtLT     *time.Time  `json:"updatedAtLT,omitempty"`
	UpdatedAtLTE    *time.Time  `json:"updatedAtLTE,omitempty"`
	UpdatedAtIsNil  bool        `json:"updatedAtIsNil,omitempty"`
	UpdatedAtNotNil bool        `json:"updatedAtNotNil,omitempty"`

	// "tenant_id" field predicates.
	TenantID      *int  `json:"tenantID,omitempty"`
	TenantIDNEQ   *int  `json:"tenantIDNEQ,omitempty"`
	TenantIDIn    []int `json:"tenantIDIn,omitempty"`
	TenantIDNotIn []int `json:"tenantIDNotIn,omitempty"`
	TenantIDGT    *int  `json:"tenantIDGT,omitempty"`
	TenantIDGTE   *int  `json:"tenantIDGTE,omitempty"`
	TenantIDLT    *int  `json:"tenantIDLT,omitempty"`
	TenantIDLTE   *int  `json:"tenantIDLTE,omitempty"`

	// "starts_at" field predicates.
	StartsAt      *time.Time  `json:"startsAt,omitempty"`
	StartsAtNEQ   *time.Time  `json:"startsAtNEQ,omitempty"`
	StartsAtIn    []time.Time `json:"startsAtIn,omitempty"`
	StartsAtNotIn []time.Time `json:"startsAtNotIn,omitempty"`
	StartsAtGT    *time.Time  `json:"startsAtGT,omitempty"`
	StartsAtGTE   *time.Time  `json:"startsAtGTE,omitempty"`
	StartsAtLT    *time.Time  `json:"startsAtLT,omitempty"`
	StartsAtLTE   *time.Time  `json:"startsAtLTE,omitempty"`

	// "ends_at" field predicates.
	EndsAt      *time.Time  `json:"endsAt,omitempty"`
	EndsAtNEQ   *time.Time  `json:"endsAtNEQ,omitempty"`
	EndsAtIn    []time.Time `json:"endsAtIn,omitempty"`
	EndsAtNotIn []time.Time `json:"endsAtNotIn,omitempty"`
	EndsAtGT    *time.Time  `json:"endsAtGT,omitempty"`
	EndsAtGTE   *time.Time  `json:"endsAtGTE,omitempty"`
	EndsAtLT    *time.Time  `json:"endsAtLT,omitempty"`
	EndsAtLTE   *time.Time  `json:"endsAtLTE,omitempty"`

	// "state" field predicates.
	State      *alert.SilenceState  `json:"state,omitempty"`
	StateNEQ   *alert.SilenceState  `json:"stateNEQ,omitempty"`
	StateIn    []alert.SilenceState `json:"stateIn,omitempty"`
	StateNotIn []alert.SilenceState `json:"stateNotIn,omitempty"`
}

SilenceWhereInput represents a where input for filtering Silence queries.

func (*SilenceWhereInput) AddPredicates

func (i *SilenceWhereInput) AddPredicates(predicates ...predicate.Silence)

AddPredicates adds custom predicates to the where input to be used during the filtering phase.

func (*SilenceWhereInput) Filter

Filter applies the SilenceWhereInput filter on the SilenceQuery builder.

func (*SilenceWhereInput) P

P returns a predicate for filtering silences. An error is returned if the input is empty or invalid.

type Silences

type Silences []*Silence

Silences is a parsable slice of Silence.

type TraverseFunc

type TraverseFunc = ent.TraverseFunc

ent aliases to avoid import conflicts in user's code.

type Traverser

type Traverser = ent.Traverser

ent aliases to avoid import conflicts in user's code.

type Tx

type Tx struct {

	// MsgAlert is the client for interacting with the MsgAlert builders.
	MsgAlert *MsgAlertClient
	// MsgChannel is the client for interacting with the MsgChannel builders.
	MsgChannel *MsgChannelClient
	// MsgEvent is the client for interacting with the MsgEvent builders.
	MsgEvent *MsgEventClient
	// MsgInternal is the client for interacting with the MsgInternal builders.
	MsgInternal *MsgInternalClient
	// MsgInternalTo is the client for interacting with the MsgInternalTo builders.
	MsgInternalTo *MsgInternalToClient
	// MsgSubscriber is the client for interacting with the MsgSubscriber builders.
	MsgSubscriber *MsgSubscriberClient
	// MsgTemplate is the client for interacting with the MsgTemplate builders.
	MsgTemplate *MsgTemplateClient
	// MsgType is the client for interacting with the MsgType builders.
	MsgType *MsgTypeClient
	// Nlog is the client for interacting with the Nlog builders.
	Nlog *NlogClient
	// NlogAlert is the client for interacting with the NlogAlert builders.
	NlogAlert *NlogAlertClient
	// OrgRoleUser is the client for interacting with the OrgRoleUser builders.
	OrgRoleUser *OrgRoleUserClient
	// Silence is the client for interacting with the Silence builders.
	Silence *SilenceClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// 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 UpdateMsgChannelInput

type UpdateMsgChannelInput struct {
	Name          *string
	TenantID      *int
	ReceiverType  *profile.ReceiverType
	ClearReceiver bool
	Receiver      *profile.Receiver
	ClearComments bool
	Comments      *string
}

UpdateMsgChannelInput represents a mutation input for updating msgchannels.

func (*UpdateMsgChannelInput) Mutate

Mutate applies the UpdateMsgChannelInput on the MsgChannelMutation builder.

type UpdateMsgEventInput

type UpdateMsgEventInput struct {
	Name          *string
	ClearComments bool
	Comments      *string
	ClearRoute    bool
	Route         *profile.Route
	Modes         *string
	MsgTypeID     *int
}

UpdateMsgEventInput represents a mutation input for updating msgevents.

func (*UpdateMsgEventInput) Mutate

func (i *UpdateMsgEventInput) Mutate(m *MsgEventMutation)

Mutate applies the UpdateMsgEventInput on the MsgEventMutation builder.

type UpdateMsgSubscriberInput

type UpdateMsgSubscriberInput struct {
	TenantID       *int
	ClearOrgRoleID bool
	OrgRoleID      *int
	ClearExclude   bool
	Exclude        *bool
	MsgTypeID      *int
	ClearUser      bool
	UserID         *int
}

UpdateMsgSubscriberInput represents a mutation input for updating msgsubscribers.

func (*UpdateMsgSubscriberInput) Mutate

Mutate applies the UpdateMsgSubscriberInput on the MsgSubscriberMutation builder.

type UpdateMsgTemplateInput

type UpdateMsgTemplateInput struct {
	MsgTypeID                *int
	TenantID                 *int
	Name                     *string
	ReceiverType             *profile.ReceiverType
	Format                   *msgtemplate.Format
	ClearSubject             bool
	Subject                  *string
	ClearFrom                bool
	From                     *string
	ClearTo                  bool
	To                       *string
	ClearCc                  bool
	Cc                       *string
	ClearBcc                 bool
	Bcc                      *string
	ClearBody                bool
	Body                     *string
	ClearTpl                 bool
	Tpl                      *string
	ClearTplFileID           bool
	TplFileID                *int
	ClearAttachments         bool
	Attachments              []string
	AppendAttachments        []string
	ClearAttachmentsFileIds  bool
	AttachmentsFileIds       []int
	AppendAttachmentsFileIds []int
	ClearComments            bool
	Comments                 *string
	EventID                  *int
}

UpdateMsgTemplateInput represents a mutation input for updating msgtemplates.

func (*UpdateMsgTemplateInput) Mutate

Mutate applies the UpdateMsgTemplateInput on the MsgTemplateMutation builder.

type UpdateMsgTypeInput

type UpdateMsgTypeInput struct {
	ClearAppID     bool
	AppID          *int
	Category       *string
	Name           *string
	ClearStatus    bool
	Status         *typex.SimpleStatus
	ClearComments  bool
	Comments       *string
	ClearCanSubs   bool
	CanSubs        *bool
	ClearCanCustom bool
	CanCustom      *bool
}

UpdateMsgTypeInput represents a mutation input for updating msgtypes.

func (*UpdateMsgTypeInput) Mutate

func (i *UpdateMsgTypeInput) Mutate(m *MsgTypeMutation)

Mutate applies the UpdateMsgTypeInput on the MsgTypeMutation builder.

type UpdateSilenceInput

type UpdateSilenceInput struct {
	ClearMatchers  bool
	Matchers       []*label.Matcher
	AppendMatchers []*label.Matcher
	StartsAt       *time.Time
	EndsAt         *time.Time
	ClearComments  bool
	Comments       *string
	State          *alert.SilenceState
}

UpdateSilenceInput represents a mutation input for updating silences.

func (*UpdateSilenceInput) Mutate

func (i *UpdateSilenceInput) Mutate(m *SilenceMutation)

Mutate applies the UpdateSilenceInput on the SilenceMutation builder.

type User

type User struct {

	// ID of the ent.
	// ID
	ID int `json:"id,omitempty"`
	// 登陆名称
	PrincipalName string `json:"principal_name,omitempty"`
	// 显示名
	DisplayName string `json:"display_name,omitempty"`
	// 邮箱
	Email string `json:"email,omitempty"`
	// 手机
	Mobile string `json:"mobile,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserQuery when eager-loading is set.
	Edges UserEdges `json:"edges"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) GlobalID

func (u *User) GlobalID(context.Context) (string, error)

GlobalID returns the global identifier for the given User node.

func (*User) IsNode

func (*User) IsNode()

IsNode implements the Node interface check for GQLGen.

func (*User) NamedSilences

func (u *User) NamedSilences(name string) ([]*Silence, error)

NamedSilences returns the Silences named value or an error if the edge was not loaded in eager-loading with this name.

func (*User) QuerySilences

func (u *User) QuerySilences() *SilenceQuery

QuerySilences queries the "silences" edge of the User entity.

func (*User) Silences

func (u *User) Silences(ctx context.Context) (result []*Silence, err error)

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) ToEdge

func (u *User) ToEdge(order *UserOrder) *UserEdge

ToEdge converts User into UserEdge.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*User) Update

func (u *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

func (*User) Value

func (u *User) Value(name string) (ent.Value, error)

Value returns the ent.Value that was dynamically selected and assigned to the User. This includes values selected through modifiers, order, etc.

type UserClient

type UserClient struct {
	// contains filtered or unexported fields
}

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a builder for creating a User entity.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a builder for deleting the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id int) *UserDeleteOne

DeleteOneID returns a builder for deleting the given entity by its id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id int) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id int) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Intercept

func (c *UserClient) Intercept(interceptors ...Interceptor)

Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.

func (*UserClient) Interceptors

func (c *UserClient) Interceptors() []Interceptor

Interceptors returns the client interceptors.

func (*UserClient) MapCreateBulk

func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk

MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QuerySilences

func (c *UserClient) QuerySilences(u *User) *SilenceQuery

QuerySilences queries the silences edge of a User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id int) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserConnection

type UserConnection struct {
	Edges      []*UserEdge `json:"edges"`
	PageInfo   PageInfo    `json:"pageInfo"`
	TotalCount int         `json:"totalCount"`
}

UserConnection is the connection containing edges to User.

type UserCreate

type UserCreate struct {
	// contains filtered or unexported fields
}

UserCreate is the builder for creating a User entity.

func (*UserCreate) AddSilenceIDs

func (uc *UserCreate) AddSilenceIDs(ids ...int) *UserCreate

AddSilenceIDs adds the "silences" edge to the Silence entity by IDs.

func (*UserCreate) AddSilences

func (uc *UserCreate) AddSilences(s ...*Silence) *UserCreate

AddSilences adds the "silences" edges to the Silence entity.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) OnConflict

func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.Create().
	SetPrincipalName(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetPrincipalName(v+v).
	}).
	Exec(ctx)

func (*UserCreate) OnConflictColumns

func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetDisplayName

func (uc *UserCreate) SetDisplayName(s string) *UserCreate

SetDisplayName sets the "display_name" field.

func (*UserCreate) SetEmail

func (uc *UserCreate) SetEmail(s string) *UserCreate

SetEmail sets the "email" field.

func (*UserCreate) SetID

func (uc *UserCreate) SetID(i int) *UserCreate

SetID sets the "id" field.

func (*UserCreate) SetMobile

func (uc *UserCreate) SetMobile(s string) *UserCreate

SetMobile sets the "mobile" field.

func (*UserCreate) SetNillableEmail

func (uc *UserCreate) SetNillableEmail(s *string) *UserCreate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserCreate) SetNillableMobile

func (uc *UserCreate) SetNillableMobile(s *string) *UserCreate

SetNillableMobile sets the "mobile" field if the given value is not nil.

func (*UserCreate) SetPrincipalName

func (uc *UserCreate) SetPrincipalName(s string) *UserCreate

SetPrincipalName sets the "principal_name" field.

type UserCreateBulk

type UserCreateBulk struct {
	// contains filtered or unexported fields
}

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) OnConflict

func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetPrincipalName(v+v).
	}).
	Exec(ctx)

func (*UserCreateBulk) OnConflictColumns

func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ConflictColumns(columns...)).
	Exec(ctx)

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

type UserDelete struct {
	// contains filtered or unexported fields
}

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

type UserDeleteOne struct {
	// contains filtered or unexported fields
}

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserDeleteOne) Where

func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne

Where appends a list predicates to the UserDelete builder.

type UserEdge

type UserEdge struct {
	Node   *User  `json:"node"`
	Cursor Cursor `json:"cursor"`
}

UserEdge is the edge representation of User.

type UserEdges

type UserEdges struct {
	// 静默
	Silences []*Silence `json:"silences,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) SilencesOrErr

func (e UserEdges) SilencesOrErr() ([]*Silence, error)

SilencesOrErr returns the Silences value or an error if the edge was not loaded in eager-loading.

type UserGroupBy

type UserGroupBy struct {
	// contains filtered or unexported fields
}

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolX

func (s *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) BoolsX

func (s *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64X

func (s *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) Float64sX

func (s *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntX

func (s *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) IntsX

func (s *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (s *UserGroupBy) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringX

func (s *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserGroupBy) StringsX

func (s *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserMutation

type UserMutation struct {
	// contains filtered or unexported fields
}

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) AddField

func (m *UserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) AddSilenceIDs

func (m *UserMutation) AddSilenceIDs(ids ...int)

AddSilenceIDs adds the "silences" edge to the Silence entity by ids.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) ClearEdge

func (m *UserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserMutation) ClearEmail

func (m *UserMutation) ClearEmail()

ClearEmail clears the value of the "email" field.

func (*UserMutation) ClearField

func (m *UserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ClearMobile

func (m *UserMutation) ClearMobile()

ClearMobile clears the value of the "mobile" field.

func (*UserMutation) ClearSilences

func (m *UserMutation) ClearSilences()

ClearSilences clears the "silences" edge to the Silence entity.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) DisplayName

func (m *UserMutation) DisplayName() (r string, exists bool)

DisplayName returns the value of the "display_name" field in the mutation.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Email

func (m *UserMutation) Email() (r string, exists bool)

Email returns the value of the "email" field in the mutation.

func (*UserMutation) EmailCleared

func (m *UserMutation) EmailCleared() bool

EmailCleared returns if the "email" field was cleared in this mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) ID

func (m *UserMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserMutation) IDs

func (m *UserMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserMutation) Mobile

func (m *UserMutation) Mobile() (r string, exists bool)

Mobile returns the value of the "mobile" field in the mutation.

func (*UserMutation) MobileCleared

func (m *UserMutation) MobileCleared() bool

MobileCleared returns if the "mobile" field was cleared in this mutation.

func (*UserMutation) OldDisplayName

func (m *UserMutation) OldDisplayName(ctx context.Context) (v string, err error)

OldDisplayName returns the old "display_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldEmail

func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)

OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldField

func (m *UserMutation) 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 (*UserMutation) OldMobile

func (m *UserMutation) OldMobile(ctx context.Context) (v string, err error)

OldMobile returns the old "mobile" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldPrincipalName

func (m *UserMutation) OldPrincipalName(ctx context.Context) (v string, err error)

OldPrincipalName returns the old "principal_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) PrincipalName

func (m *UserMutation) PrincipalName() (r string, exists bool)

PrincipalName returns the value of the "principal_name" field in the mutation.

func (*UserMutation) RemoveSilenceIDs

func (m *UserMutation) RemoveSilenceIDs(ids ...int)

RemoveSilenceIDs removes the "silences" edge to the Silence entity by IDs.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserMutation) RemovedSilencesIDs

func (m *UserMutation) RemovedSilencesIDs() (ids []int)

RemovedSilences returns the removed IDs of the "silences" edge to the Silence entity.

func (*UserMutation) ResetDisplayName

func (m *UserMutation) ResetDisplayName()

ResetDisplayName resets all changes to the "display_name" field.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetEmail

func (m *UserMutation) ResetEmail()

ResetEmail resets all changes to the "email" field.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetMobile

func (m *UserMutation) ResetMobile()

ResetMobile resets all changes to the "mobile" field.

func (*UserMutation) ResetPrincipalName

func (m *UserMutation) ResetPrincipalName()

ResetPrincipalName resets all changes to the "principal_name" field.

func (*UserMutation) ResetSilences

func (m *UserMutation) ResetSilences()

ResetSilences resets all changes to the "silences" edge.

func (*UserMutation) SetDisplayName

func (m *UserMutation) SetDisplayName(s string)

SetDisplayName sets the "display_name" field.

func (*UserMutation) SetEmail

func (m *UserMutation) SetEmail(s string)

SetEmail sets the "email" field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) SetID

func (m *UserMutation) SetID(id int)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetMobile

func (m *UserMutation) SetMobile(s string)

SetMobile sets the "mobile" field.

func (*UserMutation) SetOp

func (m *UserMutation) SetOp(op Op)

SetOp allows setting the mutation operation.

func (*UserMutation) SetPrincipalName

func (m *UserMutation) SetPrincipalName(s string)

SetPrincipalName sets the "principal_name" field.

func (*UserMutation) SilencesCleared

func (m *UserMutation) SilencesCleared() bool

SilencesCleared reports if the "silences" edge to the Silence entity was cleared.

func (*UserMutation) SilencesIDs

func (m *UserMutation) SilencesIDs() (ids []int)

SilencesIDs returns the "silences" edge IDs in the mutation.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

func (*UserMutation) WhereP

func (m *UserMutation) WhereP(ps ...func(*sql.Selector))

WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.

type UserOrder

type UserOrder struct {
	Direction OrderDirection  `json:"direction"`
	Field     *UserOrderField `json:"field"`
}

UserOrder defines the ordering of User.

type UserOrderField

type UserOrderField struct {
	// Value extracts the ordering value from the given User.
	Value func(*User) (ent.Value, error)
	// contains filtered or unexported fields
}

UserOrderField defines the ordering field of User.

type UserPaginateOption

type UserPaginateOption func(*userPager) error

UserPaginateOption enables pagination customization.

func WithUserFilter

func WithUserFilter(filter func(*UserQuery) (*UserQuery, error)) UserPaginateOption

WithUserFilter configures pagination filter.

func WithUserOrder

func WithUserOrder(order *UserOrder) UserPaginateOption

WithUserOrder configures pagination ordering.

type UserQuery

type UserQuery struct {
	// contains filtered or unexported fields
}

UserQuery is the builder for querying User entities.

func (*UserQuery) Aggregate

func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate returns a UserSelect configured with the given aggregations.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQuery) CollectFields

func (u *UserQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserQuery, error)

CollectFields tells the query-builder to eagerly load connected nodes by resolver context.

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	PrincipalName string `json:"principal_name,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldPrincipalName).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

Limit the number of records to be returned by this query.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset to start from.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery

Order specifies how the records should be ordered.

func (*UserQuery) Paginate

func (u *UserQuery) Paginate(
	ctx context.Context, after *Cursor, first *int,
	before *Cursor, last *int, opts ...UserPaginateOption,
) (*UserConnection, error)

Paginate executes the query and returns a relay based cursor connection to User.

func (*UserQuery) QuerySilences

func (uq *UserQuery) QuerySilences() *SilenceQuery

QuerySilences chains the current query on the "silences" edge.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	PrincipalName string `json:"principal_name,omitempty"`
}

client.User.Query().
	Select(user.FieldPrincipalName).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

func (*UserQuery) WithNamedSilences

func (uq *UserQuery) WithNamedSilences(name string, opts ...func(*SilenceQuery)) *UserQuery

WithNamedSilences tells the query-builder to eager-load the nodes that are connected to the "silences" edge with the given name. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithSilences

func (uq *UserQuery) WithSilences(opts ...func(*SilenceQuery)) *UserQuery

WithSilences tells the query-builder to eager-load the nodes that are connected to the "silences" edge. The optional arguments are used to configure the query builder of the edge.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Aggregate

func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect

Aggregate adds the given aggregation functions to the selector query.

func (*UserSelect) Bool

func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (s *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (s *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (s *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (s *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (s *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (s *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (s *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (s *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v any) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (s *UserSelect) ScanX(ctx context.Context, v any)

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (s *UserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringX

func (s *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (s *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (s *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserUpdate

type UserUpdate struct {
	// contains filtered or unexported fields
}

UserUpdate is the builder for updating User entities.

func (*UserUpdate) AddSilenceIDs

func (uu *UserUpdate) AddSilenceIDs(ids ...int) *UserUpdate

AddSilenceIDs adds the "silences" edge to the Silence entity by IDs.

func (*UserUpdate) AddSilences

func (uu *UserUpdate) AddSilences(s ...*Silence) *UserUpdate

AddSilences adds the "silences" edges to the Silence entity.

func (*UserUpdate) ClearEmail

func (uu *UserUpdate) ClearEmail() *UserUpdate

ClearEmail clears the value of the "email" field.

func (*UserUpdate) ClearMobile

func (uu *UserUpdate) ClearMobile() *UserUpdate

ClearMobile clears the value of the "mobile" field.

func (*UserUpdate) ClearSilences

func (uu *UserUpdate) ClearSilences() *UserUpdate

ClearSilences clears all "silences" edges to the Silence entity.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) RemoveSilenceIDs

func (uu *UserUpdate) RemoveSilenceIDs(ids ...int) *UserUpdate

RemoveSilenceIDs removes the "silences" edge to Silence entities by IDs.

func (*UserUpdate) RemoveSilences

func (uu *UserUpdate) RemoveSilences(s ...*Silence) *UserUpdate

RemoveSilences removes "silences" edges to Silence entities.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetDisplayName

func (uu *UserUpdate) SetDisplayName(s string) *UserUpdate

SetDisplayName sets the "display_name" field.

func (*UserUpdate) SetEmail

func (uu *UserUpdate) SetEmail(s string) *UserUpdate

SetEmail sets the "email" field.

func (*UserUpdate) SetMobile

func (uu *UserUpdate) SetMobile(s string) *UserUpdate

SetMobile sets the "mobile" field.

func (*UserUpdate) SetNillableEmail

func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserUpdate) SetNillableMobile

func (uu *UserUpdate) SetNillableMobile(s *string) *UserUpdate

SetNillableMobile sets the "mobile" field if the given value is not nil.

func (*UserUpdate) SetPrincipalName

func (uu *UserUpdate) SetPrincipalName(s string) *UserUpdate

SetPrincipalName sets the "principal_name" field.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

type UserUpdateOne struct {
	// contains filtered or unexported fields
}

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) AddSilenceIDs

func (uuo *UserUpdateOne) AddSilenceIDs(ids ...int) *UserUpdateOne

AddSilenceIDs adds the "silences" edge to the Silence entity by IDs.

func (*UserUpdateOne) AddSilences

func (uuo *UserUpdateOne) AddSilences(s ...*Silence) *UserUpdateOne

AddSilences adds the "silences" edges to the Silence entity.

func (*UserUpdateOne) ClearEmail

func (uuo *UserUpdateOne) ClearEmail() *UserUpdateOne

ClearEmail clears the value of the "email" field.

func (*UserUpdateOne) ClearMobile

func (uuo *UserUpdateOne) ClearMobile() *UserUpdateOne

ClearMobile clears the value of the "mobile" field.

func (*UserUpdateOne) ClearSilences

func (uuo *UserUpdateOne) ClearSilences() *UserUpdateOne

ClearSilences clears all "silences" edges to the Silence entity.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) RemoveSilenceIDs

func (uuo *UserUpdateOne) RemoveSilenceIDs(ids ...int) *UserUpdateOne

RemoveSilenceIDs removes the "silences" edge to Silence entities by IDs.

func (*UserUpdateOne) RemoveSilences

func (uuo *UserUpdateOne) RemoveSilences(s ...*Silence) *UserUpdateOne

RemoveSilences removes "silences" edges to Silence entities.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetDisplayName

func (uuo *UserUpdateOne) SetDisplayName(s string) *UserUpdateOne

SetDisplayName sets the "display_name" field.

func (*UserUpdateOne) SetEmail

func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne

SetEmail sets the "email" field.

func (*UserUpdateOne) SetMobile

func (uuo *UserUpdateOne) SetMobile(s string) *UserUpdateOne

SetMobile sets the "mobile" field.

func (*UserUpdateOne) SetNillableEmail

func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne

SetNillableEmail sets the "email" field if the given value is not nil.

func (*UserUpdateOne) SetNillableMobile

func (uuo *UserUpdateOne) SetNillableMobile(s *string) *UserUpdateOne

SetNillableMobile sets the "mobile" field if the given value is not nil.

func (*UserUpdateOne) SetPrincipalName

func (uuo *UserUpdateOne) SetPrincipalName(s string) *UserUpdateOne

SetPrincipalName sets the "principal_name" field.

func (*UserUpdateOne) Where

func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne

Where appends a list predicates to the UserUpdate builder.

type UserUpsert

type UserUpsert struct {
	*sql.UpdateSet
}

UserUpsert is the "OnConflict" setter.

func (*UserUpsert) ClearEmail

func (u *UserUpsert) ClearEmail() *UserUpsert

ClearEmail clears the value of the "email" field.

func (*UserUpsert) ClearMobile

func (u *UserUpsert) ClearMobile() *UserUpsert

ClearMobile clears the value of the "mobile" field.

func (*UserUpsert) SetDisplayName

func (u *UserUpsert) SetDisplayName(v string) *UserUpsert

SetDisplayName sets the "display_name" field.

func (*UserUpsert) SetEmail

func (u *UserUpsert) SetEmail(v string) *UserUpsert

SetEmail sets the "email" field.

func (*UserUpsert) SetMobile

func (u *UserUpsert) SetMobile(v string) *UserUpsert

SetMobile sets the "mobile" field.

func (*UserUpsert) SetPrincipalName

func (u *UserUpsert) SetPrincipalName(v string) *UserUpsert

SetPrincipalName sets the "principal_name" field.

func (*UserUpsert) UpdateDisplayName

func (u *UserUpsert) UpdateDisplayName() *UserUpsert

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*UserUpsert) UpdateEmail

func (u *UserUpsert) UpdateEmail() *UserUpsert

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsert) UpdateMobile

func (u *UserUpsert) UpdateMobile() *UserUpsert

UpdateMobile sets the "mobile" field to the value that was provided on create.

func (*UserUpsert) UpdatePrincipalName

func (u *UserUpsert) UpdatePrincipalName() *UserUpsert

UpdatePrincipalName sets the "principal_name" field to the value that was provided on create.

type UserUpsertBulk

type UserUpsertBulk struct {
	// contains filtered or unexported fields
}

UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.

func (*UserUpsertBulk) ClearEmail

func (u *UserUpsertBulk) ClearEmail() *UserUpsertBulk

ClearEmail clears the value of the "email" field.

func (*UserUpsertBulk) ClearMobile

func (u *UserUpsertBulk) ClearMobile() *UserUpsertBulk

ClearMobile clears the value of the "mobile" field.

func (*UserUpsertBulk) DoNothing

func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertBulk) Exec

func (u *UserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertBulk) ExecX

func (u *UserUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertBulk) Ignore

func (u *UserUpsertBulk) Ignore() *UserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
	OnConflict(sql.ResolveWithIgnore()).
	Exec(ctx)

func (*UserUpsertBulk) SetDisplayName

func (u *UserUpsertBulk) SetDisplayName(v string) *UserUpsertBulk

SetDisplayName sets the "display_name" field.

func (*UserUpsertBulk) SetEmail

func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk

SetEmail sets the "email" field.

func (*UserUpsertBulk) SetMobile

func (u *UserUpsertBulk) SetMobile(v string) *UserUpsertBulk

SetMobile sets the "mobile" field.

func (*UserUpsertBulk) SetPrincipalName

func (u *UserUpsertBulk) SetPrincipalName(v string) *UserUpsertBulk

SetPrincipalName sets the "principal_name" field.

func (*UserUpsertBulk) Update

func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.

func (*UserUpsertBulk) UpdateDisplayName

func (u *UserUpsertBulk) UpdateDisplayName() *UserUpsertBulk

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateEmail

func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateMobile

func (u *UserUpsertBulk) UpdateMobile() *UserUpsertBulk

UpdateMobile sets the "mobile" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateNewValues

func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk

UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertBulk) UpdatePrincipalName

func (u *UserUpsertBulk) UpdatePrincipalName() *UserUpsertBulk

UpdatePrincipalName sets the "principal_name" field to the value that was provided on create.

type UserUpsertOne

type UserUpsertOne struct {
	// contains filtered or unexported fields
}

UserUpsertOne is the builder for "upsert"-ing

one User node.

func (*UserUpsertOne) ClearEmail

func (u *UserUpsertOne) ClearEmail() *UserUpsertOne

ClearEmail clears the value of the "email" field.

func (*UserUpsertOne) ClearMobile

func (u *UserUpsertOne) ClearMobile() *UserUpsertOne

ClearMobile clears the value of the "mobile" field.

func (*UserUpsertOne) DoNothing

func (u *UserUpsertOne) DoNothing() *UserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertOne) Exec

func (u *UserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertOne) ExecX

func (u *UserUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpsertOne) ID

func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserUpsertOne) IDX

func (u *UserUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*UserUpsertOne) Ignore

func (u *UserUpsertOne) Ignore() *UserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserUpsertOne) SetDisplayName

func (u *UserUpsertOne) SetDisplayName(v string) *UserUpsertOne

SetDisplayName sets the "display_name" field.

func (*UserUpsertOne) SetEmail

func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne

SetEmail sets the "email" field.

func (*UserUpsertOne) SetMobile

func (u *UserUpsertOne) SetMobile(v string) *UserUpsertOne

SetMobile sets the "mobile" field.

func (*UserUpsertOne) SetPrincipalName

func (u *UserUpsertOne) SetPrincipalName(v string) *UserUpsertOne

SetPrincipalName sets the "principal_name" field.

func (*UserUpsertOne) Update

func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne

Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.

func (*UserUpsertOne) UpdateDisplayName

func (u *UserUpsertOne) UpdateDisplayName() *UserUpsertOne

UpdateDisplayName sets the "display_name" field to the value that was provided on create.

func (*UserUpsertOne) UpdateEmail

func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne

UpdateEmail sets the "email" field to the value that was provided on create.

func (*UserUpsertOne) UpdateMobile

func (u *UserUpsertOne) UpdateMobile() *UserUpsertOne

UpdateMobile sets the "mobile" field to the value that was provided on create.

func (*UserUpsertOne) UpdateNewValues

func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne

UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:

client.User.Create().
	OnConflict(
		sql.ResolveWithNewValues(),
		sql.ResolveWith(func(u *sql.UpdateSet) {
			u.SetIgnore(user.FieldID)
		}),
	).
	Exec(ctx)

func (*UserUpsertOne) UpdatePrincipalName

func (u *UserUpsertOne) UpdatePrincipalName() *UserUpsertOne

UpdatePrincipalName sets the "principal_name" field to the value that was provided on create.

type Users

type Users []*User

Users is a parsable slice of User.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL