ent

package
v0.0.0-...-0fbf3a3 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

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

	// Node types.
	TypeApplication                  = "Application"
	TypeApplicationAssignmentHistory = "ApplicationAssignmentHistory"
	TypeApplicationStatusHistory     = "ApplicationStatusHistory"
	TypeAttachment                   = "Attachment"
	TypeReviewer                     = "Reviewer"
	TypeTicket                       = "Ticket"
)

Variables

This section is empty.

Functions

func IsConstraintError

func IsConstraintError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

func IsNotLoaded

func IsNotLoaded(err error) bool

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

func IsNotSingular

func IsNotSingular(err error) bool

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

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a 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 ServeEntviz

func ServeEntviz() http.Handler

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 Application

type Application struct {

	// ID of the ent.
	ID uuid.UUID `json:"id,omitempty"`
	// BasicID holds the value of the "basic_id" field.
	BasicID string `json:"basic_id,omitempty"`
	// PremiumID holds the value of the "premium_id" field.
	PremiumID string `json:"premium_id,omitempty"`
	// BotDisplayName holds the value of the "bot_display_name" field.
	BotDisplayName string `json:"bot_display_name,omitempty"`
	// BotMid holds the value of the "bot_mid" field.
	BotMid string `json:"bot_mid,omitempty"`
	// BotActiveStatus holds the value of the "bot_active_status" field.
	BotActiveStatus application.BotActiveStatus `json:"bot_active_status,omitempty"`
	// BotSuspendReason holds the value of the "bot_suspend_reason" field.
	BotSuspendReason application.BotSuspendReason `json:"bot_suspend_reason,omitempty"`
	// ApplicantName holds the value of the "applicant_name" field.
	ApplicantName string `json:"applicant_name,omitempty"`
	// ApplicantBizID holds the value of the "applicant_biz_id" field.
	ApplicantBizID string `json:"applicant_biz_id,omitempty"`
	// ApplicantMid holds the value of the "applicant_mid" field.
	ApplicantMid string `json:"-"`
	// ApplicantEmail holds the value of the "applicant_email" field.
	ApplicantEmail string `json:"applicant_email,omitempty"`
	// Remark holds the value of the "remark" field.
	Remark string `json:"remark,omitempty"`
	// StoreType holds the value of the "store_type" field.
	StoreType application.StoreType `json:"store_type,omitempty"`
	// WebsiteURL holds the value of the "website_url" field.
	WebsiteURL string `json:"website_url,omitempty"`
	// ApplicationStatus holds the value of the "application_status" field.
	ApplicationStatus application.ApplicationStatus `json:"application_status,omitempty"`
	// ReviewComment holds the value of the "review_comment" field.
	ReviewComment string `json:"review_comment,omitempty"`
	// Assigner holds the value of the "assigner" field.
	Assigner string `json:"assigner,omitempty"`
	// Assignee holds the value of the "assignee" field.
	Assignee string `json:"assignee,omitempty"`
	// CreatedDtime holds the value of the "created_dtime" field.
	CreatedDtime time.Time `json:"created_dtime,omitempty"`
	// UpdatedDtime holds the value of the "updated_dtime" field.
	UpdatedDtime time.Time `json:"updated_dtime,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ApplicationQuery when eager-loading is set.
	Edges ApplicationEdges `json:"edges"`
	// contains filtered or unexported fields
}

Application is the model entity for the Application schema.

func (*Application) QueryAssignmentHistories

func (a *Application) QueryAssignmentHistories() *ApplicationAssignmentHistoryQuery

QueryAssignmentHistories queries the "assignment_histories" edge of the Application entity.

func (*Application) QueryAttachments

func (a *Application) QueryAttachments() *AttachmentQuery

QueryAttachments queries the "attachments" edge of the Application entity.

func (*Application) QueryStatusHistories

func (a *Application) QueryStatusHistories() *ApplicationStatusHistoryQuery

QueryStatusHistories queries the "status_histories" edge of the Application entity.

func (*Application) QueryTickets

func (a *Application) QueryTickets() *TicketQuery

QueryTickets queries the "tickets" edge of the Application entity.

func (*Application) String

func (a *Application) String() string

String implements the fmt.Stringer.

func (*Application) Unwrap

func (a *Application) Unwrap() *Application

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

func (a *Application) Update() *ApplicationUpdateOne

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

type ApplicationAssignmentHistories

type ApplicationAssignmentHistories []*ApplicationAssignmentHistory

ApplicationAssignmentHistories is a parsable slice of ApplicationAssignmentHistory.

type ApplicationAssignmentHistory

type ApplicationAssignmentHistory struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// ApplicationID holds the value of the "application_id" field.
	ApplicationID uuid.UUID `json:"application_id,omitempty"`
	// Assigner holds the value of the "assigner" field.
	Assigner string `json:"assigner,omitempty"`
	// Assignee holds the value of the "assignee" field.
	Assignee string `json:"assignee,omitempty"`
	// CreatedTime holds the value of the "created_time" field.
	CreatedTime time.Time `json:"created_time,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ApplicationAssignmentHistoryQuery when eager-loading is set.
	Edges ApplicationAssignmentHistoryEdges `json:"edges"`
	// contains filtered or unexported fields
}

ApplicationAssignmentHistory is the model entity for the ApplicationAssignmentHistory schema.

func (*ApplicationAssignmentHistory) QueryApplications

func (aah *ApplicationAssignmentHistory) QueryApplications() *ApplicationQuery

QueryApplications queries the "applications" edge of the ApplicationAssignmentHistory entity.

func (*ApplicationAssignmentHistory) String

func (aah *ApplicationAssignmentHistory) String() string

String implements the fmt.Stringer.

func (*ApplicationAssignmentHistory) Unwrap

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

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

type ApplicationAssignmentHistoryClient

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

ApplicationAssignmentHistoryClient is a client for the ApplicationAssignmentHistory schema.

func NewApplicationAssignmentHistoryClient

func NewApplicationAssignmentHistoryClient(c config) *ApplicationAssignmentHistoryClient

NewApplicationAssignmentHistoryClient returns a client for the ApplicationAssignmentHistory from the given config.

func (*ApplicationAssignmentHistoryClient) Create

Create returns a create builder for ApplicationAssignmentHistory.

func (*ApplicationAssignmentHistoryClient) CreateBulk

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

func (*ApplicationAssignmentHistoryClient) Delete

Delete returns a delete builder for ApplicationAssignmentHistory.

func (*ApplicationAssignmentHistoryClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ApplicationAssignmentHistoryClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*ApplicationAssignmentHistoryClient) Get

Get returns a ApplicationAssignmentHistory entity by its id.

func (*ApplicationAssignmentHistoryClient) GetX

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

func (*ApplicationAssignmentHistoryClient) Hooks

Hooks returns the client hooks.

func (*ApplicationAssignmentHistoryClient) Query

Query returns a query builder for ApplicationAssignmentHistory.

func (*ApplicationAssignmentHistoryClient) QueryApplications

QueryApplications queries the applications edge of a ApplicationAssignmentHistory.

func (*ApplicationAssignmentHistoryClient) Update

Update returns an update builder for ApplicationAssignmentHistory.

func (*ApplicationAssignmentHistoryClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ApplicationAssignmentHistoryClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ApplicationAssignmentHistoryClient) Use

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

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

type ApplicationAssignmentHistoryCreate

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

ApplicationAssignmentHistoryCreate is the builder for creating a ApplicationAssignmentHistory entity.

func (*ApplicationAssignmentHistoryCreate) Exec

Exec executes the query.

func (*ApplicationAssignmentHistoryCreate) ExecX

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

func (*ApplicationAssignmentHistoryCreate) Mutation

Mutation returns the ApplicationAssignmentHistoryMutation object of the builder.

func (*ApplicationAssignmentHistoryCreate) Save

Save creates the ApplicationAssignmentHistory in the database.

func (*ApplicationAssignmentHistoryCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ApplicationAssignmentHistoryCreate) SetApplicationID

SetApplicationID sets the "application_id" field.

func (*ApplicationAssignmentHistoryCreate) SetApplications

SetApplications sets the "applications" edge to the Application entity.

func (*ApplicationAssignmentHistoryCreate) SetApplicationsID

SetApplicationsID sets the "applications" edge to the Application entity by ID.

func (*ApplicationAssignmentHistoryCreate) SetAssignee

SetAssignee sets the "assignee" field.

func (*ApplicationAssignmentHistoryCreate) SetAssigner

SetAssigner sets the "assigner" field.

func (*ApplicationAssignmentHistoryCreate) SetCreatedTime

SetCreatedTime sets the "created_time" field.

func (*ApplicationAssignmentHistoryCreate) SetNillableCreatedTime

SetNillableCreatedTime sets the "created_time" field if the given value is not nil.

type ApplicationAssignmentHistoryCreateBulk

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

ApplicationAssignmentHistoryCreateBulk is the builder for creating many ApplicationAssignmentHistory entities in bulk.

func (*ApplicationAssignmentHistoryCreateBulk) Exec

Exec executes the query.

func (*ApplicationAssignmentHistoryCreateBulk) ExecX

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

func (*ApplicationAssignmentHistoryCreateBulk) Save

Save creates the ApplicationAssignmentHistory entities in the database.

func (*ApplicationAssignmentHistoryCreateBulk) SaveX

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

type ApplicationAssignmentHistoryDelete

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

ApplicationAssignmentHistoryDelete is the builder for deleting a ApplicationAssignmentHistory entity.

func (*ApplicationAssignmentHistoryDelete) Exec

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

func (*ApplicationAssignmentHistoryDelete) ExecX

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

func (*ApplicationAssignmentHistoryDelete) Where

Where appends a list predicates to the ApplicationAssignmentHistoryDelete builder.

type ApplicationAssignmentHistoryDeleteOne

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

ApplicationAssignmentHistoryDeleteOne is the builder for deleting a single ApplicationAssignmentHistory entity.

func (*ApplicationAssignmentHistoryDeleteOne) Exec

Exec executes the deletion query.

func (*ApplicationAssignmentHistoryDeleteOne) ExecX

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

type ApplicationAssignmentHistoryEdges

type ApplicationAssignmentHistoryEdges struct {
	// Applications holds the value of the applications edge.
	Applications *Application `json:"applications,omitempty"`
	// contains filtered or unexported fields
}

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

func (ApplicationAssignmentHistoryEdges) ApplicationsOrErr

func (e ApplicationAssignmentHistoryEdges) ApplicationsOrErr() (*Application, error)

ApplicationsOrErr returns the Applications value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ApplicationAssignmentHistoryGroupBy

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

ApplicationAssignmentHistoryGroupBy is the group-by builder for ApplicationAssignmentHistory entities.

func (*ApplicationAssignmentHistoryGroupBy) Aggregate

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

func (*ApplicationAssignmentHistoryGroupBy) Bool

func (aahgb *ApplicationAssignmentHistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*ApplicationAssignmentHistoryGroupBy) BoolX

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

func (*ApplicationAssignmentHistoryGroupBy) Bools

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

func (*ApplicationAssignmentHistoryGroupBy) BoolsX

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

func (*ApplicationAssignmentHistoryGroupBy) Float64

func (aahgb *ApplicationAssignmentHistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*ApplicationAssignmentHistoryGroupBy) Float64X

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

func (*ApplicationAssignmentHistoryGroupBy) Float64s

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

func (*ApplicationAssignmentHistoryGroupBy) Float64sX

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

func (*ApplicationAssignmentHistoryGroupBy) Int

func (aahgb *ApplicationAssignmentHistoryGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*ApplicationAssignmentHistoryGroupBy) IntX

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

func (*ApplicationAssignmentHistoryGroupBy) Ints

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

func (*ApplicationAssignmentHistoryGroupBy) IntsX

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

func (*ApplicationAssignmentHistoryGroupBy) Scan

func (aahgb *ApplicationAssignmentHistoryGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*ApplicationAssignmentHistoryGroupBy) ScanX

func (aahgb *ApplicationAssignmentHistoryGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ApplicationAssignmentHistoryGroupBy) String

func (aahgb *ApplicationAssignmentHistoryGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*ApplicationAssignmentHistoryGroupBy) StringX

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

func (*ApplicationAssignmentHistoryGroupBy) Strings

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

func (*ApplicationAssignmentHistoryGroupBy) StringsX

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

type ApplicationAssignmentHistoryMutation

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

ApplicationAssignmentHistoryMutation represents an operation that mutates the ApplicationAssignmentHistory nodes in the graph.

func (*ApplicationAssignmentHistoryMutation) AddField

func (m *ApplicationAssignmentHistoryMutation) 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 (*ApplicationAssignmentHistoryMutation) AddedEdges

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

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

func (*ApplicationAssignmentHistoryMutation) AddedField

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

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

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

func (*ApplicationAssignmentHistoryMutation) AddedIDs

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

func (*ApplicationAssignmentHistoryMutation) ApplicationID

func (m *ApplicationAssignmentHistoryMutation) ApplicationID() (r uuid.UUID, exists bool)

ApplicationID returns the value of the "application_id" field in the mutation.

func (*ApplicationAssignmentHistoryMutation) ApplicationsCleared

func (m *ApplicationAssignmentHistoryMutation) ApplicationsCleared() bool

ApplicationsCleared reports if the "applications" edge to the Application entity was cleared.

func (*ApplicationAssignmentHistoryMutation) ApplicationsID

func (m *ApplicationAssignmentHistoryMutation) ApplicationsID() (id uuid.UUID, exists bool)

ApplicationsID returns the "applications" edge ID in the mutation.

func (*ApplicationAssignmentHistoryMutation) ApplicationsIDs

func (m *ApplicationAssignmentHistoryMutation) ApplicationsIDs() (ids []uuid.UUID)

ApplicationsIDs returns the "applications" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ApplicationsID instead. It exists only for internal usage by the builders.

func (*ApplicationAssignmentHistoryMutation) Assignee

func (m *ApplicationAssignmentHistoryMutation) Assignee() (r string, exists bool)

Assignee returns the value of the "assignee" field in the mutation.

func (*ApplicationAssignmentHistoryMutation) Assigner

func (m *ApplicationAssignmentHistoryMutation) Assigner() (r string, exists bool)

Assigner returns the value of the "assigner" field in the mutation.

func (*ApplicationAssignmentHistoryMutation) ClearApplications

func (m *ApplicationAssignmentHistoryMutation) ClearApplications()

ClearApplications clears the "applications" edge to the Application entity.

func (*ApplicationAssignmentHistoryMutation) ClearEdge

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 (*ApplicationAssignmentHistoryMutation) ClearField

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 (*ApplicationAssignmentHistoryMutation) ClearedEdges

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

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

func (*ApplicationAssignmentHistoryMutation) ClearedFields

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

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

func (ApplicationAssignmentHistoryMutation) 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 (*ApplicationAssignmentHistoryMutation) CreatedTime

func (m *ApplicationAssignmentHistoryMutation) CreatedTime() (r time.Time, exists bool)

CreatedTime returns the value of the "created_time" field in the mutation.

func (*ApplicationAssignmentHistoryMutation) EdgeCleared

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

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

func (*ApplicationAssignmentHistoryMutation) Field

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ApplicationAssignmentHistoryMutation) FieldCleared

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

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

func (*ApplicationAssignmentHistoryMutation) Fields

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 (*ApplicationAssignmentHistoryMutation) ID

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

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

func (*ApplicationAssignmentHistoryMutation) OldApplicationID

func (m *ApplicationAssignmentHistoryMutation) OldApplicationID(ctx context.Context) (v uuid.UUID, err error)

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

func (*ApplicationAssignmentHistoryMutation) OldAssignee

func (m *ApplicationAssignmentHistoryMutation) OldAssignee(ctx context.Context) (v string, err error)

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

func (*ApplicationAssignmentHistoryMutation) OldAssigner

func (m *ApplicationAssignmentHistoryMutation) OldAssigner(ctx context.Context) (v string, err error)

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

func (*ApplicationAssignmentHistoryMutation) OldCreatedTime

func (m *ApplicationAssignmentHistoryMutation) OldCreatedTime(ctx context.Context) (v time.Time, err error)

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

func (*ApplicationAssignmentHistoryMutation) OldField

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ApplicationAssignmentHistoryMutation) Op

Op returns the operation name.

func (*ApplicationAssignmentHistoryMutation) RemovedEdges

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

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

func (*ApplicationAssignmentHistoryMutation) RemovedIDs

func (m *ApplicationAssignmentHistoryMutation) 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 (*ApplicationAssignmentHistoryMutation) ResetApplicationID

func (m *ApplicationAssignmentHistoryMutation) ResetApplicationID()

ResetApplicationID resets all changes to the "application_id" field.

func (*ApplicationAssignmentHistoryMutation) ResetApplications

func (m *ApplicationAssignmentHistoryMutation) ResetApplications()

ResetApplications resets all changes to the "applications" edge.

func (*ApplicationAssignmentHistoryMutation) ResetAssignee

func (m *ApplicationAssignmentHistoryMutation) ResetAssignee()

ResetAssignee resets all changes to the "assignee" field.

func (*ApplicationAssignmentHistoryMutation) ResetAssigner

func (m *ApplicationAssignmentHistoryMutation) ResetAssigner()

ResetAssigner resets all changes to the "assigner" field.

func (*ApplicationAssignmentHistoryMutation) ResetCreatedTime

func (m *ApplicationAssignmentHistoryMutation) ResetCreatedTime()

ResetCreatedTime resets all changes to the "created_time" field.

func (*ApplicationAssignmentHistoryMutation) ResetEdge

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 (*ApplicationAssignmentHistoryMutation) ResetField

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 (*ApplicationAssignmentHistoryMutation) SetApplicationID

func (m *ApplicationAssignmentHistoryMutation) SetApplicationID(u uuid.UUID)

SetApplicationID sets the "application_id" field.

func (*ApplicationAssignmentHistoryMutation) SetApplicationsID

func (m *ApplicationAssignmentHistoryMutation) SetApplicationsID(id uuid.UUID)

SetApplicationsID sets the "applications" edge to the Application entity by id.

func (*ApplicationAssignmentHistoryMutation) SetAssignee

func (m *ApplicationAssignmentHistoryMutation) SetAssignee(s string)

SetAssignee sets the "assignee" field.

func (*ApplicationAssignmentHistoryMutation) SetAssigner

func (m *ApplicationAssignmentHistoryMutation) SetAssigner(s string)

SetAssigner sets the "assigner" field.

func (*ApplicationAssignmentHistoryMutation) SetCreatedTime

func (m *ApplicationAssignmentHistoryMutation) SetCreatedTime(t time.Time)

SetCreatedTime sets the "created_time" field.

func (*ApplicationAssignmentHistoryMutation) SetField

func (m *ApplicationAssignmentHistoryMutation) 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 (ApplicationAssignmentHistoryMutation) Tx

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

func (*ApplicationAssignmentHistoryMutation) Type

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

func (*ApplicationAssignmentHistoryMutation) Where

Where appends a list predicates to the ApplicationAssignmentHistoryMutation builder.

type ApplicationAssignmentHistoryQuery

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

ApplicationAssignmentHistoryQuery is the builder for querying ApplicationAssignmentHistory entities.

func (*ApplicationAssignmentHistoryQuery) All

All executes the query and returns a list of ApplicationAssignmentHistories.

func (*ApplicationAssignmentHistoryQuery) AllX

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

func (*ApplicationAssignmentHistoryQuery) Clone

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

func (*ApplicationAssignmentHistoryQuery) Count

Count returns the count of the given query.

func (*ApplicationAssignmentHistoryQuery) CountX

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

func (*ApplicationAssignmentHistoryQuery) Exist

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

func (*ApplicationAssignmentHistoryQuery) ExistX

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

func (*ApplicationAssignmentHistoryQuery) First

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

func (*ApplicationAssignmentHistoryQuery) FirstID

func (aahq *ApplicationAssignmentHistoryQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ApplicationAssignmentHistoryQuery) FirstIDX

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

func (*ApplicationAssignmentHistoryQuery) FirstX

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

func (*ApplicationAssignmentHistoryQuery) GroupBy

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 {
	ApplicationID uuid.UUID `json:"application_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ApplicationAssignmentHistory.Query().
	GroupBy(applicationassignmenthistory.FieldApplicationID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ApplicationAssignmentHistoryQuery) IDs

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

func (*ApplicationAssignmentHistoryQuery) IDsX

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

func (*ApplicationAssignmentHistoryQuery) Limit

Limit adds a limit step to the query.

func (*ApplicationAssignmentHistoryQuery) Offset

Offset adds an offset step to the query.

func (*ApplicationAssignmentHistoryQuery) Only

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

func (*ApplicationAssignmentHistoryQuery) OnlyID

func (aahq *ApplicationAssignmentHistoryQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ApplicationAssignmentHistoryQuery) OnlyIDX

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

func (*ApplicationAssignmentHistoryQuery) OnlyX

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

func (*ApplicationAssignmentHistoryQuery) Order

Order adds an order step to the query.

func (*ApplicationAssignmentHistoryQuery) QueryApplications

func (aahq *ApplicationAssignmentHistoryQuery) QueryApplications() *ApplicationQuery

QueryApplications chains the current query on the "applications" edge.

func (*ApplicationAssignmentHistoryQuery) Select

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 {
	ApplicationID uuid.UUID `json:"application_id,omitempty"`
}

client.ApplicationAssignmentHistory.Query().
	Select(applicationassignmenthistory.FieldApplicationID).
	Scan(ctx, &v)

func (*ApplicationAssignmentHistoryQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ApplicationAssignmentHistoryQuery) Where

Where adds a new predicate for the ApplicationAssignmentHistoryQuery builder.

func (*ApplicationAssignmentHistoryQuery) WithApplications

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

type ApplicationAssignmentHistorySelect

type ApplicationAssignmentHistorySelect struct {
	*ApplicationAssignmentHistoryQuery
	// contains filtered or unexported fields
}

ApplicationAssignmentHistorySelect is the builder for selecting fields of ApplicationAssignmentHistory entities.

func (*ApplicationAssignmentHistorySelect) Bool

func (aahs *ApplicationAssignmentHistorySelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*ApplicationAssignmentHistorySelect) BoolX

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

func (*ApplicationAssignmentHistorySelect) Bools

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

func (*ApplicationAssignmentHistorySelect) BoolsX

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

func (*ApplicationAssignmentHistorySelect) Float64

func (aahs *ApplicationAssignmentHistorySelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*ApplicationAssignmentHistorySelect) Float64X

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

func (*ApplicationAssignmentHistorySelect) Float64s

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

func (*ApplicationAssignmentHistorySelect) Float64sX

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

func (*ApplicationAssignmentHistorySelect) Int

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

func (*ApplicationAssignmentHistorySelect) IntX

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

func (*ApplicationAssignmentHistorySelect) Ints

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

func (*ApplicationAssignmentHistorySelect) IntsX

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

func (*ApplicationAssignmentHistorySelect) Scan

func (aahs *ApplicationAssignmentHistorySelect) Scan(ctx context.Context, v interface{}) error

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

func (*ApplicationAssignmentHistorySelect) ScanX

func (aahs *ApplicationAssignmentHistorySelect) ScanX(ctx context.Context, v interface{})

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

func (*ApplicationAssignmentHistorySelect) String

func (aahs *ApplicationAssignmentHistorySelect) String(ctx context.Context) (_ string, err error)

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

func (*ApplicationAssignmentHistorySelect) StringX

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

func (*ApplicationAssignmentHistorySelect) Strings

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

func (*ApplicationAssignmentHistorySelect) StringsX

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

type ApplicationAssignmentHistoryUpdate

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

ApplicationAssignmentHistoryUpdate is the builder for updating ApplicationAssignmentHistory entities.

func (*ApplicationAssignmentHistoryUpdate) ClearApplications

ClearApplications clears the "applications" edge to the Application entity.

func (*ApplicationAssignmentHistoryUpdate) Exec

Exec executes the query.

func (*ApplicationAssignmentHistoryUpdate) ExecX

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

func (*ApplicationAssignmentHistoryUpdate) Mutation

Mutation returns the ApplicationAssignmentHistoryMutation object of the builder.

func (*ApplicationAssignmentHistoryUpdate) Save

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

func (*ApplicationAssignmentHistoryUpdate) SaveX

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

func (*ApplicationAssignmentHistoryUpdate) SetApplicationID

SetApplicationID sets the "application_id" field.

func (*ApplicationAssignmentHistoryUpdate) SetApplications

SetApplications sets the "applications" edge to the Application entity.

func (*ApplicationAssignmentHistoryUpdate) SetApplicationsID

SetApplicationsID sets the "applications" edge to the Application entity by ID.

func (*ApplicationAssignmentHistoryUpdate) SetAssignee

SetAssignee sets the "assignee" field.

func (*ApplicationAssignmentHistoryUpdate) SetAssigner

SetAssigner sets the "assigner" field.

func (*ApplicationAssignmentHistoryUpdate) Where

Where appends a list predicates to the ApplicationAssignmentHistoryUpdate builder.

type ApplicationAssignmentHistoryUpdateOne

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

ApplicationAssignmentHistoryUpdateOne is the builder for updating a single ApplicationAssignmentHistory entity.

func (*ApplicationAssignmentHistoryUpdateOne) ClearApplications

ClearApplications clears the "applications" edge to the Application entity.

func (*ApplicationAssignmentHistoryUpdateOne) Exec

Exec executes the query on the entity.

func (*ApplicationAssignmentHistoryUpdateOne) ExecX

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

func (*ApplicationAssignmentHistoryUpdateOne) Mutation

Mutation returns the ApplicationAssignmentHistoryMutation object of the builder.

func (*ApplicationAssignmentHistoryUpdateOne) Save

Save executes the query and returns the updated ApplicationAssignmentHistory entity.

func (*ApplicationAssignmentHistoryUpdateOne) SaveX

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

func (*ApplicationAssignmentHistoryUpdateOne) Select

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

func (*ApplicationAssignmentHistoryUpdateOne) SetApplicationID

SetApplicationID sets the "application_id" field.

func (*ApplicationAssignmentHistoryUpdateOne) SetApplications

SetApplications sets the "applications" edge to the Application entity.

func (*ApplicationAssignmentHistoryUpdateOne) SetApplicationsID

SetApplicationsID sets the "applications" edge to the Application entity by ID.

func (*ApplicationAssignmentHistoryUpdateOne) SetAssignee

SetAssignee sets the "assignee" field.

func (*ApplicationAssignmentHistoryUpdateOne) SetAssigner

SetAssigner sets the "assigner" field.

type ApplicationClient

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

ApplicationClient is a client for the Application schema.

func NewApplicationClient

func NewApplicationClient(c config) *ApplicationClient

NewApplicationClient returns a client for the Application from the given config.

func (*ApplicationClient) Create

func (c *ApplicationClient) Create() *ApplicationCreate

Create returns a create builder for Application.

func (*ApplicationClient) CreateBulk

func (c *ApplicationClient) CreateBulk(builders ...*ApplicationCreate) *ApplicationCreateBulk

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

func (*ApplicationClient) Delete

func (c *ApplicationClient) Delete() *ApplicationDelete

Delete returns a delete builder for Application.

func (*ApplicationClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ApplicationClient) DeleteOneID

func (c *ApplicationClient) DeleteOneID(id uuid.UUID) *ApplicationDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*ApplicationClient) Get

Get returns a Application entity by its id.

func (*ApplicationClient) GetX

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

func (*ApplicationClient) Hooks

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

Hooks returns the client hooks.

func (*ApplicationClient) Query

func (c *ApplicationClient) Query() *ApplicationQuery

Query returns a query builder for Application.

func (*ApplicationClient) QueryAssignmentHistories

func (c *ApplicationClient) QueryAssignmentHistories(a *Application) *ApplicationAssignmentHistoryQuery

QueryAssignmentHistories queries the assignment_histories edge of a Application.

func (*ApplicationClient) QueryAttachments

func (c *ApplicationClient) QueryAttachments(a *Application) *AttachmentQuery

QueryAttachments queries the attachments edge of a Application.

func (*ApplicationClient) QueryStatusHistories

func (c *ApplicationClient) QueryStatusHistories(a *Application) *ApplicationStatusHistoryQuery

QueryStatusHistories queries the status_histories edge of a Application.

func (*ApplicationClient) QueryTickets

func (c *ApplicationClient) QueryTickets(a *Application) *TicketQuery

QueryTickets queries the tickets edge of a Application.

func (*ApplicationClient) Update

func (c *ApplicationClient) Update() *ApplicationUpdate

Update returns an update builder for Application.

func (*ApplicationClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ApplicationClient) UpdateOneID

func (c *ApplicationClient) UpdateOneID(id uuid.UUID) *ApplicationUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ApplicationClient) Use

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

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

type ApplicationCreate

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

ApplicationCreate is the builder for creating a Application entity.

func (*ApplicationCreate) AddAssignmentHistories

func (ac *ApplicationCreate) AddAssignmentHistories(a ...*ApplicationAssignmentHistory) *ApplicationCreate

AddAssignmentHistories adds the "assignment_histories" edges to the ApplicationAssignmentHistory entity.

func (*ApplicationCreate) AddAssignmentHistoryIDs

func (ac *ApplicationCreate) AddAssignmentHistoryIDs(ids ...int) *ApplicationCreate

AddAssignmentHistoryIDs adds the "assignment_histories" edge to the ApplicationAssignmentHistory entity by IDs.

func (*ApplicationCreate) AddAttachmentIDs

func (ac *ApplicationCreate) AddAttachmentIDs(ids ...int) *ApplicationCreate

AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.

func (*ApplicationCreate) AddAttachments

func (ac *ApplicationCreate) AddAttachments(a ...*Attachment) *ApplicationCreate

AddAttachments adds the "attachments" edges to the Attachment entity.

func (*ApplicationCreate) AddStatusHistories

func (ac *ApplicationCreate) AddStatusHistories(a ...*ApplicationStatusHistory) *ApplicationCreate

AddStatusHistories adds the "status_histories" edges to the ApplicationStatusHistory entity.

func (*ApplicationCreate) AddStatusHistoryIDs

func (ac *ApplicationCreate) AddStatusHistoryIDs(ids ...int) *ApplicationCreate

AddStatusHistoryIDs adds the "status_histories" edge to the ApplicationStatusHistory entity by IDs.

func (*ApplicationCreate) AddTicketIDs

func (ac *ApplicationCreate) AddTicketIDs(ids ...int) *ApplicationCreate

AddTicketIDs adds the "tickets" edge to the Ticket entity by IDs.

func (*ApplicationCreate) AddTickets

func (ac *ApplicationCreate) AddTickets(t ...*Ticket) *ApplicationCreate

AddTickets adds the "tickets" edges to the Ticket entity.

func (*ApplicationCreate) Exec

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

Exec executes the query.

func (*ApplicationCreate) ExecX

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

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

func (*ApplicationCreate) Mutation

func (ac *ApplicationCreate) Mutation() *ApplicationMutation

Mutation returns the ApplicationMutation object of the builder.

func (*ApplicationCreate) Save

Save creates the Application in the database.

func (*ApplicationCreate) SaveX

func (ac *ApplicationCreate) SaveX(ctx context.Context) *Application

SaveX calls Save and panics if Save returns an error.

func (*ApplicationCreate) SetApplicantBizID

func (ac *ApplicationCreate) SetApplicantBizID(s string) *ApplicationCreate

SetApplicantBizID sets the "applicant_biz_id" field.

func (*ApplicationCreate) SetApplicantEmail

func (ac *ApplicationCreate) SetApplicantEmail(s string) *ApplicationCreate

SetApplicantEmail sets the "applicant_email" field.

func (*ApplicationCreate) SetApplicantMid

func (ac *ApplicationCreate) SetApplicantMid(s string) *ApplicationCreate

SetApplicantMid sets the "applicant_mid" field.

func (*ApplicationCreate) SetApplicantName

func (ac *ApplicationCreate) SetApplicantName(s string) *ApplicationCreate

SetApplicantName sets the "applicant_name" field.

func (*ApplicationCreate) SetApplicationStatus

func (ac *ApplicationCreate) SetApplicationStatus(as application.ApplicationStatus) *ApplicationCreate

SetApplicationStatus sets the "application_status" field.

func (*ApplicationCreate) SetAssignee

func (ac *ApplicationCreate) SetAssignee(s string) *ApplicationCreate

SetAssignee sets the "assignee" field.

func (*ApplicationCreate) SetAssigner

func (ac *ApplicationCreate) SetAssigner(s string) *ApplicationCreate

SetAssigner sets the "assigner" field.

func (*ApplicationCreate) SetBasicID

func (ac *ApplicationCreate) SetBasicID(s string) *ApplicationCreate

SetBasicID sets the "basic_id" field.

func (*ApplicationCreate) SetBotActiveStatus

func (ac *ApplicationCreate) SetBotActiveStatus(aas application.BotActiveStatus) *ApplicationCreate

SetBotActiveStatus sets the "bot_active_status" field.

func (*ApplicationCreate) SetBotDisplayName

func (ac *ApplicationCreate) SetBotDisplayName(s string) *ApplicationCreate

SetBotDisplayName sets the "bot_display_name" field.

func (*ApplicationCreate) SetBotMid

func (ac *ApplicationCreate) SetBotMid(s string) *ApplicationCreate

SetBotMid sets the "bot_mid" field.

func (*ApplicationCreate) SetBotSuspendReason

func (ac *ApplicationCreate) SetBotSuspendReason(asr application.BotSuspendReason) *ApplicationCreate

SetBotSuspendReason sets the "bot_suspend_reason" field.

func (*ApplicationCreate) SetCreatedDtime

func (ac *ApplicationCreate) SetCreatedDtime(t time.Time) *ApplicationCreate

SetCreatedDtime sets the "created_dtime" field.

func (*ApplicationCreate) SetID

SetID sets the "id" field.

func (*ApplicationCreate) SetNillableCreatedDtime

func (ac *ApplicationCreate) SetNillableCreatedDtime(t *time.Time) *ApplicationCreate

SetNillableCreatedDtime sets the "created_dtime" field if the given value is not nil.

func (*ApplicationCreate) SetNillableID

func (ac *ApplicationCreate) SetNillableID(u *uuid.UUID) *ApplicationCreate

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

func (*ApplicationCreate) SetPremiumID

func (ac *ApplicationCreate) SetPremiumID(s string) *ApplicationCreate

SetPremiumID sets the "premium_id" field.

func (*ApplicationCreate) SetRemark

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

SetRemark sets the "remark" field.

func (*ApplicationCreate) SetReviewComment

func (ac *ApplicationCreate) SetReviewComment(s string) *ApplicationCreate

SetReviewComment sets the "review_comment" field.

func (*ApplicationCreate) SetStoreType

SetStoreType sets the "store_type" field.

func (*ApplicationCreate) SetUpdatedDtime

func (ac *ApplicationCreate) SetUpdatedDtime(t time.Time) *ApplicationCreate

SetUpdatedDtime sets the "updated_dtime" field.

func (*ApplicationCreate) SetWebsiteURL

func (ac *ApplicationCreate) SetWebsiteURL(s string) *ApplicationCreate

SetWebsiteURL sets the "website_url" field.

type ApplicationCreateBulk

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

ApplicationCreateBulk is the builder for creating many Application entities in bulk.

func (*ApplicationCreateBulk) Exec

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

Exec executes the query.

func (*ApplicationCreateBulk) ExecX

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

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

func (*ApplicationCreateBulk) Save

func (acb *ApplicationCreateBulk) Save(ctx context.Context) ([]*Application, error)

Save creates the Application entities in the database.

func (*ApplicationCreateBulk) SaveX

func (acb *ApplicationCreateBulk) SaveX(ctx context.Context) []*Application

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

type ApplicationDelete

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

ApplicationDelete is the builder for deleting a Application entity.

func (*ApplicationDelete) Exec

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

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

func (*ApplicationDelete) ExecX

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

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

func (*ApplicationDelete) Where

Where appends a list predicates to the ApplicationDelete builder.

type ApplicationDeleteOne

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

ApplicationDeleteOne is the builder for deleting a single Application entity.

func (*ApplicationDeleteOne) Exec

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

Exec executes the deletion query.

func (*ApplicationDeleteOne) ExecX

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

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

type ApplicationEdges

type ApplicationEdges struct {
	// Tickets holds the value of the tickets edge.
	Tickets []*Ticket `json:"tickets,omitempty"`
	// AssignmentHistories holds the value of the assignment_histories edge.
	AssignmentHistories []*ApplicationAssignmentHistory `json:"assignment_histories,omitempty"`
	// StatusHistories holds the value of the status_histories edge.
	StatusHistories []*ApplicationStatusHistory `json:"status_histories,omitempty"`
	// Attachments holds the value of the attachments edge.
	Attachments []*Attachment `json:"attachments,omitempty"`
	// contains filtered or unexported fields
}

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

func (ApplicationEdges) AssignmentHistoriesOrErr

func (e ApplicationEdges) AssignmentHistoriesOrErr() ([]*ApplicationAssignmentHistory, error)

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

func (ApplicationEdges) AttachmentsOrErr

func (e ApplicationEdges) AttachmentsOrErr() ([]*Attachment, error)

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

func (ApplicationEdges) StatusHistoriesOrErr

func (e ApplicationEdges) StatusHistoriesOrErr() ([]*ApplicationStatusHistory, error)

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

func (ApplicationEdges) TicketsOrErr

func (e ApplicationEdges) TicketsOrErr() ([]*Ticket, error)

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

type ApplicationGroupBy

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

ApplicationGroupBy is the group-by builder for Application entities.

func (*ApplicationGroupBy) Aggregate

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

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

func (*ApplicationGroupBy) Bool

func (agb *ApplicationGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*ApplicationGroupBy) BoolX

func (agb *ApplicationGroupBy) BoolX(ctx context.Context) bool

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

func (*ApplicationGroupBy) Bools

func (agb *ApplicationGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*ApplicationGroupBy) BoolsX

func (agb *ApplicationGroupBy) BoolsX(ctx context.Context) []bool

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

func (*ApplicationGroupBy) Float64

func (agb *ApplicationGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*ApplicationGroupBy) Float64X

func (agb *ApplicationGroupBy) Float64X(ctx context.Context) float64

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

func (*ApplicationGroupBy) Float64s

func (agb *ApplicationGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*ApplicationGroupBy) Float64sX

func (agb *ApplicationGroupBy) Float64sX(ctx context.Context) []float64

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

func (*ApplicationGroupBy) Int

func (agb *ApplicationGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*ApplicationGroupBy) IntX

func (agb *ApplicationGroupBy) IntX(ctx context.Context) int

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

func (*ApplicationGroupBy) Ints

func (agb *ApplicationGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*ApplicationGroupBy) IntsX

func (agb *ApplicationGroupBy) IntsX(ctx context.Context) []int

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

func (*ApplicationGroupBy) Scan

func (agb *ApplicationGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*ApplicationGroupBy) ScanX

func (agb *ApplicationGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ApplicationGroupBy) String

func (agb *ApplicationGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*ApplicationGroupBy) StringX

func (agb *ApplicationGroupBy) StringX(ctx context.Context) string

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

func (*ApplicationGroupBy) Strings

func (agb *ApplicationGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*ApplicationGroupBy) StringsX

func (agb *ApplicationGroupBy) StringsX(ctx context.Context) []string

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

type ApplicationMutation

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

ApplicationMutation represents an operation that mutates the Application nodes in the graph.

func (*ApplicationMutation) AddAssignmentHistoryIDs

func (m *ApplicationMutation) AddAssignmentHistoryIDs(ids ...int)

AddAssignmentHistoryIDs adds the "assignment_histories" edge to the ApplicationAssignmentHistory entity by ids.

func (*ApplicationMutation) AddAttachmentIDs

func (m *ApplicationMutation) AddAttachmentIDs(ids ...int)

AddAttachmentIDs adds the "attachments" edge to the Attachment entity by ids.

func (*ApplicationMutation) AddField

func (m *ApplicationMutation) 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 (*ApplicationMutation) AddStatusHistoryIDs

func (m *ApplicationMutation) AddStatusHistoryIDs(ids ...int)

AddStatusHistoryIDs adds the "status_histories" edge to the ApplicationStatusHistory entity by ids.

func (*ApplicationMutation) AddTicketIDs

func (m *ApplicationMutation) AddTicketIDs(ids ...int)

AddTicketIDs adds the "tickets" edge to the Ticket entity by ids.

func (*ApplicationMutation) AddedEdges

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

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

func (*ApplicationMutation) AddedField

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

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

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

func (*ApplicationMutation) AddedIDs

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

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

func (*ApplicationMutation) ApplicantBizID

func (m *ApplicationMutation) ApplicantBizID() (r string, exists bool)

ApplicantBizID returns the value of the "applicant_biz_id" field in the mutation.

func (*ApplicationMutation) ApplicantEmail

func (m *ApplicationMutation) ApplicantEmail() (r string, exists bool)

ApplicantEmail returns the value of the "applicant_email" field in the mutation.

func (*ApplicationMutation) ApplicantMid

func (m *ApplicationMutation) ApplicantMid() (r string, exists bool)

ApplicantMid returns the value of the "applicant_mid" field in the mutation.

func (*ApplicationMutation) ApplicantName

func (m *ApplicationMutation) ApplicantName() (r string, exists bool)

ApplicantName returns the value of the "applicant_name" field in the mutation.

func (*ApplicationMutation) ApplicationStatus

func (m *ApplicationMutation) ApplicationStatus() (r application.ApplicationStatus, exists bool)

ApplicationStatus returns the value of the "application_status" field in the mutation.

func (*ApplicationMutation) Assignee

func (m *ApplicationMutation) Assignee() (r string, exists bool)

Assignee returns the value of the "assignee" field in the mutation.

func (*ApplicationMutation) Assigner

func (m *ApplicationMutation) Assigner() (r string, exists bool)

Assigner returns the value of the "assigner" field in the mutation.

func (*ApplicationMutation) AssignmentHistoriesCleared

func (m *ApplicationMutation) AssignmentHistoriesCleared() bool

AssignmentHistoriesCleared reports if the "assignment_histories" edge to the ApplicationAssignmentHistory entity was cleared.

func (*ApplicationMutation) AssignmentHistoriesIDs

func (m *ApplicationMutation) AssignmentHistoriesIDs() (ids []int)

AssignmentHistoriesIDs returns the "assignment_histories" edge IDs in the mutation.

func (*ApplicationMutation) AttachmentsCleared

func (m *ApplicationMutation) AttachmentsCleared() bool

AttachmentsCleared reports if the "attachments" edge to the Attachment entity was cleared.

func (*ApplicationMutation) AttachmentsIDs

func (m *ApplicationMutation) AttachmentsIDs() (ids []int)

AttachmentsIDs returns the "attachments" edge IDs in the mutation.

func (*ApplicationMutation) BasicID

func (m *ApplicationMutation) BasicID() (r string, exists bool)

BasicID returns the value of the "basic_id" field in the mutation.

func (*ApplicationMutation) BotActiveStatus

func (m *ApplicationMutation) BotActiveStatus() (r application.BotActiveStatus, exists bool)

BotActiveStatus returns the value of the "bot_active_status" field in the mutation.

func (*ApplicationMutation) BotDisplayName

func (m *ApplicationMutation) BotDisplayName() (r string, exists bool)

BotDisplayName returns the value of the "bot_display_name" field in the mutation.

func (*ApplicationMutation) BotMid

func (m *ApplicationMutation) BotMid() (r string, exists bool)

BotMid returns the value of the "bot_mid" field in the mutation.

func (*ApplicationMutation) BotSuspendReason

func (m *ApplicationMutation) BotSuspendReason() (r application.BotSuspendReason, exists bool)

BotSuspendReason returns the value of the "bot_suspend_reason" field in the mutation.

func (*ApplicationMutation) ClearAssignmentHistories

func (m *ApplicationMutation) ClearAssignmentHistories()

ClearAssignmentHistories clears the "assignment_histories" edge to the ApplicationAssignmentHistory entity.

func (*ApplicationMutation) ClearAttachments

func (m *ApplicationMutation) ClearAttachments()

ClearAttachments clears the "attachments" edge to the Attachment entity.

func (*ApplicationMutation) ClearEdge

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

func (m *ApplicationMutation) 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 (*ApplicationMutation) ClearStatusHistories

func (m *ApplicationMutation) ClearStatusHistories()

ClearStatusHistories clears the "status_histories" edge to the ApplicationStatusHistory entity.

func (*ApplicationMutation) ClearTickets

func (m *ApplicationMutation) ClearTickets()

ClearTickets clears the "tickets" edge to the Ticket entity.

func (*ApplicationMutation) ClearedEdges

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

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

func (*ApplicationMutation) ClearedFields

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

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

func (ApplicationMutation) Client

func (m ApplicationMutation) 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 (*ApplicationMutation) CreatedDtime

func (m *ApplicationMutation) CreatedDtime() (r time.Time, exists bool)

CreatedDtime returns the value of the "created_dtime" field in the mutation.

func (*ApplicationMutation) EdgeCleared

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

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

func (*ApplicationMutation) Field

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

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

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

func (*ApplicationMutation) Fields

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

func (m *ApplicationMutation) ID() (id uuid.UUID, 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 (*ApplicationMutation) IDs

func (m *ApplicationMutation) IDs(ctx context.Context) ([]uuid.UUID, 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 (*ApplicationMutation) OldApplicantBizID

func (m *ApplicationMutation) OldApplicantBizID(ctx context.Context) (v string, err error)

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

func (*ApplicationMutation) OldApplicantEmail

func (m *ApplicationMutation) OldApplicantEmail(ctx context.Context) (v string, err error)

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

func (*ApplicationMutation) OldApplicantMid

func (m *ApplicationMutation) OldApplicantMid(ctx context.Context) (v string, err error)

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

func (*ApplicationMutation) OldApplicantName

func (m *ApplicationMutation) OldApplicantName(ctx context.Context) (v string, err error)

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

func (*ApplicationMutation) OldApplicationStatus

func (m *ApplicationMutation) OldApplicationStatus(ctx context.Context) (v application.ApplicationStatus, err error)

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

func (*ApplicationMutation) OldAssignee

func (m *ApplicationMutation) OldAssignee(ctx context.Context) (v string, err error)

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

func (*ApplicationMutation) OldAssigner

func (m *ApplicationMutation) OldAssigner(ctx context.Context) (v string, err error)

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

func (*ApplicationMutation) OldBasicID

func (m *ApplicationMutation) OldBasicID(ctx context.Context) (v string, err error)

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

func (*ApplicationMutation) OldBotActiveStatus

func (m *ApplicationMutation) OldBotActiveStatus(ctx context.Context) (v application.BotActiveStatus, err error)

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

func (*ApplicationMutation) OldBotDisplayName

func (m *ApplicationMutation) OldBotDisplayName(ctx context.Context) (v string, err error)

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

func (*ApplicationMutation) OldBotMid

func (m *ApplicationMutation) OldBotMid(ctx context.Context) (v string, err error)

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

func (*ApplicationMutation) OldBotSuspendReason

func (m *ApplicationMutation) OldBotSuspendReason(ctx context.Context) (v application.BotSuspendReason, err error)

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

func (*ApplicationMutation) OldCreatedDtime

func (m *ApplicationMutation) OldCreatedDtime(ctx context.Context) (v time.Time, err error)

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

func (*ApplicationMutation) OldField

func (m *ApplicationMutation) 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 (*ApplicationMutation) OldPremiumID

func (m *ApplicationMutation) OldPremiumID(ctx context.Context) (v string, err error)

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

func (*ApplicationMutation) OldRemark

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

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

func (*ApplicationMutation) OldReviewComment

func (m *ApplicationMutation) OldReviewComment(ctx context.Context) (v string, err error)

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

func (*ApplicationMutation) OldStoreType

func (m *ApplicationMutation) OldStoreType(ctx context.Context) (v application.StoreType, err error)

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

func (*ApplicationMutation) OldUpdatedDtime

func (m *ApplicationMutation) OldUpdatedDtime(ctx context.Context) (v time.Time, err error)

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

func (*ApplicationMutation) OldWebsiteURL

func (m *ApplicationMutation) OldWebsiteURL(ctx context.Context) (v string, err error)

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

func (*ApplicationMutation) Op

func (m *ApplicationMutation) Op() Op

Op returns the operation name.

func (*ApplicationMutation) PremiumID

func (m *ApplicationMutation) PremiumID() (r string, exists bool)

PremiumID returns the value of the "premium_id" field in the mutation.

func (*ApplicationMutation) Remark

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

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

func (*ApplicationMutation) RemoveAssignmentHistoryIDs

func (m *ApplicationMutation) RemoveAssignmentHistoryIDs(ids ...int)

RemoveAssignmentHistoryIDs removes the "assignment_histories" edge to the ApplicationAssignmentHistory entity by IDs.

func (*ApplicationMutation) RemoveAttachmentIDs

func (m *ApplicationMutation) RemoveAttachmentIDs(ids ...int)

RemoveAttachmentIDs removes the "attachments" edge to the Attachment entity by IDs.

func (*ApplicationMutation) RemoveStatusHistoryIDs

func (m *ApplicationMutation) RemoveStatusHistoryIDs(ids ...int)

RemoveStatusHistoryIDs removes the "status_histories" edge to the ApplicationStatusHistory entity by IDs.

func (*ApplicationMutation) RemoveTicketIDs

func (m *ApplicationMutation) RemoveTicketIDs(ids ...int)

RemoveTicketIDs removes the "tickets" edge to the Ticket entity by IDs.

func (*ApplicationMutation) RemovedAssignmentHistoriesIDs

func (m *ApplicationMutation) RemovedAssignmentHistoriesIDs() (ids []int)

RemovedAssignmentHistories returns the removed IDs of the "assignment_histories" edge to the ApplicationAssignmentHistory entity.

func (*ApplicationMutation) RemovedAttachmentsIDs

func (m *ApplicationMutation) RemovedAttachmentsIDs() (ids []int)

RemovedAttachments returns the removed IDs of the "attachments" edge to the Attachment entity.

func (*ApplicationMutation) RemovedEdges

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

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

func (*ApplicationMutation) RemovedIDs

func (m *ApplicationMutation) 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 (*ApplicationMutation) RemovedStatusHistoriesIDs

func (m *ApplicationMutation) RemovedStatusHistoriesIDs() (ids []int)

RemovedStatusHistories returns the removed IDs of the "status_histories" edge to the ApplicationStatusHistory entity.

func (*ApplicationMutation) RemovedTicketsIDs

func (m *ApplicationMutation) RemovedTicketsIDs() (ids []int)

RemovedTickets returns the removed IDs of the "tickets" edge to the Ticket entity.

func (*ApplicationMutation) ResetApplicantBizID

func (m *ApplicationMutation) ResetApplicantBizID()

ResetApplicantBizID resets all changes to the "applicant_biz_id" field.

func (*ApplicationMutation) ResetApplicantEmail

func (m *ApplicationMutation) ResetApplicantEmail()

ResetApplicantEmail resets all changes to the "applicant_email" field.

func (*ApplicationMutation) ResetApplicantMid

func (m *ApplicationMutation) ResetApplicantMid()

ResetApplicantMid resets all changes to the "applicant_mid" field.

func (*ApplicationMutation) ResetApplicantName

func (m *ApplicationMutation) ResetApplicantName()

ResetApplicantName resets all changes to the "applicant_name" field.

func (*ApplicationMutation) ResetApplicationStatus

func (m *ApplicationMutation) ResetApplicationStatus()

ResetApplicationStatus resets all changes to the "application_status" field.

func (*ApplicationMutation) ResetAssignee

func (m *ApplicationMutation) ResetAssignee()

ResetAssignee resets all changes to the "assignee" field.

func (*ApplicationMutation) ResetAssigner

func (m *ApplicationMutation) ResetAssigner()

ResetAssigner resets all changes to the "assigner" field.

func (*ApplicationMutation) ResetAssignmentHistories

func (m *ApplicationMutation) ResetAssignmentHistories()

ResetAssignmentHistories resets all changes to the "assignment_histories" edge.

func (*ApplicationMutation) ResetAttachments

func (m *ApplicationMutation) ResetAttachments()

ResetAttachments resets all changes to the "attachments" edge.

func (*ApplicationMutation) ResetBasicID

func (m *ApplicationMutation) ResetBasicID()

ResetBasicID resets all changes to the "basic_id" field.

func (*ApplicationMutation) ResetBotActiveStatus

func (m *ApplicationMutation) ResetBotActiveStatus()

ResetBotActiveStatus resets all changes to the "bot_active_status" field.

func (*ApplicationMutation) ResetBotDisplayName

func (m *ApplicationMutation) ResetBotDisplayName()

ResetBotDisplayName resets all changes to the "bot_display_name" field.

func (*ApplicationMutation) ResetBotMid

func (m *ApplicationMutation) ResetBotMid()

ResetBotMid resets all changes to the "bot_mid" field.

func (*ApplicationMutation) ResetBotSuspendReason

func (m *ApplicationMutation) ResetBotSuspendReason()

ResetBotSuspendReason resets all changes to the "bot_suspend_reason" field.

func (*ApplicationMutation) ResetCreatedDtime

func (m *ApplicationMutation) ResetCreatedDtime()

ResetCreatedDtime resets all changes to the "created_dtime" field.

func (*ApplicationMutation) ResetEdge

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

func (m *ApplicationMutation) 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 (*ApplicationMutation) ResetPremiumID

func (m *ApplicationMutation) ResetPremiumID()

ResetPremiumID resets all changes to the "premium_id" field.

func (*ApplicationMutation) ResetRemark

func (m *ApplicationMutation) ResetRemark()

ResetRemark resets all changes to the "remark" field.

func (*ApplicationMutation) ResetReviewComment

func (m *ApplicationMutation) ResetReviewComment()

ResetReviewComment resets all changes to the "review_comment" field.

func (*ApplicationMutation) ResetStatusHistories

func (m *ApplicationMutation) ResetStatusHistories()

ResetStatusHistories resets all changes to the "status_histories" edge.

func (*ApplicationMutation) ResetStoreType

func (m *ApplicationMutation) ResetStoreType()

ResetStoreType resets all changes to the "store_type" field.

func (*ApplicationMutation) ResetTickets

func (m *ApplicationMutation) ResetTickets()

ResetTickets resets all changes to the "tickets" edge.

func (*ApplicationMutation) ResetUpdatedDtime

func (m *ApplicationMutation) ResetUpdatedDtime()

ResetUpdatedDtime resets all changes to the "updated_dtime" field.

func (*ApplicationMutation) ResetWebsiteURL

func (m *ApplicationMutation) ResetWebsiteURL()

ResetWebsiteURL resets all changes to the "website_url" field.

func (*ApplicationMutation) ReviewComment

func (m *ApplicationMutation) ReviewComment() (r string, exists bool)

ReviewComment returns the value of the "review_comment" field in the mutation.

func (*ApplicationMutation) SetApplicantBizID

func (m *ApplicationMutation) SetApplicantBizID(s string)

SetApplicantBizID sets the "applicant_biz_id" field.

func (*ApplicationMutation) SetApplicantEmail

func (m *ApplicationMutation) SetApplicantEmail(s string)

SetApplicantEmail sets the "applicant_email" field.

func (*ApplicationMutation) SetApplicantMid

func (m *ApplicationMutation) SetApplicantMid(s string)

SetApplicantMid sets the "applicant_mid" field.

func (*ApplicationMutation) SetApplicantName

func (m *ApplicationMutation) SetApplicantName(s string)

SetApplicantName sets the "applicant_name" field.

func (*ApplicationMutation) SetApplicationStatus

func (m *ApplicationMutation) SetApplicationStatus(as application.ApplicationStatus)

SetApplicationStatus sets the "application_status" field.

func (*ApplicationMutation) SetAssignee

func (m *ApplicationMutation) SetAssignee(s string)

SetAssignee sets the "assignee" field.

func (*ApplicationMutation) SetAssigner

func (m *ApplicationMutation) SetAssigner(s string)

SetAssigner sets the "assigner" field.

func (*ApplicationMutation) SetBasicID

func (m *ApplicationMutation) SetBasicID(s string)

SetBasicID sets the "basic_id" field.

func (*ApplicationMutation) SetBotActiveStatus

func (m *ApplicationMutation) SetBotActiveStatus(aas application.BotActiveStatus)

SetBotActiveStatus sets the "bot_active_status" field.

func (*ApplicationMutation) SetBotDisplayName

func (m *ApplicationMutation) SetBotDisplayName(s string)

SetBotDisplayName sets the "bot_display_name" field.

func (*ApplicationMutation) SetBotMid

func (m *ApplicationMutation) SetBotMid(s string)

SetBotMid sets the "bot_mid" field.

func (*ApplicationMutation) SetBotSuspendReason

func (m *ApplicationMutation) SetBotSuspendReason(asr application.BotSuspendReason)

SetBotSuspendReason sets the "bot_suspend_reason" field.

func (*ApplicationMutation) SetCreatedDtime

func (m *ApplicationMutation) SetCreatedDtime(t time.Time)

SetCreatedDtime sets the "created_dtime" field.

func (*ApplicationMutation) SetField

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

func (m *ApplicationMutation) SetID(id uuid.UUID)

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

func (*ApplicationMutation) SetPremiumID

func (m *ApplicationMutation) SetPremiumID(s string)

SetPremiumID sets the "premium_id" field.

func (*ApplicationMutation) SetRemark

func (m *ApplicationMutation) SetRemark(s string)

SetRemark sets the "remark" field.

func (*ApplicationMutation) SetReviewComment

func (m *ApplicationMutation) SetReviewComment(s string)

SetReviewComment sets the "review_comment" field.

func (*ApplicationMutation) SetStoreType

func (m *ApplicationMutation) SetStoreType(at application.StoreType)

SetStoreType sets the "store_type" field.

func (*ApplicationMutation) SetUpdatedDtime

func (m *ApplicationMutation) SetUpdatedDtime(t time.Time)

SetUpdatedDtime sets the "updated_dtime" field.

func (*ApplicationMutation) SetWebsiteURL

func (m *ApplicationMutation) SetWebsiteURL(s string)

SetWebsiteURL sets the "website_url" field.

func (*ApplicationMutation) StatusHistoriesCleared

func (m *ApplicationMutation) StatusHistoriesCleared() bool

StatusHistoriesCleared reports if the "status_histories" edge to the ApplicationStatusHistory entity was cleared.

func (*ApplicationMutation) StatusHistoriesIDs

func (m *ApplicationMutation) StatusHistoriesIDs() (ids []int)

StatusHistoriesIDs returns the "status_histories" edge IDs in the mutation.

func (*ApplicationMutation) StoreType

func (m *ApplicationMutation) StoreType() (r application.StoreType, exists bool)

StoreType returns the value of the "store_type" field in the mutation.

func (*ApplicationMutation) TicketsCleared

func (m *ApplicationMutation) TicketsCleared() bool

TicketsCleared reports if the "tickets" edge to the Ticket entity was cleared.

func (*ApplicationMutation) TicketsIDs

func (m *ApplicationMutation) TicketsIDs() (ids []int)

TicketsIDs returns the "tickets" edge IDs in the mutation.

func (ApplicationMutation) Tx

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

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

func (*ApplicationMutation) Type

func (m *ApplicationMutation) Type() string

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

func (*ApplicationMutation) UpdatedDtime

func (m *ApplicationMutation) UpdatedDtime() (r time.Time, exists bool)

UpdatedDtime returns the value of the "updated_dtime" field in the mutation.

func (*ApplicationMutation) WebsiteURL

func (m *ApplicationMutation) WebsiteURL() (r string, exists bool)

WebsiteURL returns the value of the "website_url" field in the mutation.

func (*ApplicationMutation) Where

func (m *ApplicationMutation) Where(ps ...predicate.Application)

Where appends a list predicates to the ApplicationMutation builder.

type ApplicationQuery

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

ApplicationQuery is the builder for querying Application entities.

func (*ApplicationQuery) All

func (aq *ApplicationQuery) All(ctx context.Context) ([]*Application, error)

All executes the query and returns a list of Applications.

func (*ApplicationQuery) AllX

func (aq *ApplicationQuery) AllX(ctx context.Context) []*Application

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

func (*ApplicationQuery) Clone

func (aq *ApplicationQuery) Clone() *ApplicationQuery

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

func (*ApplicationQuery) Count

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

Count returns the count of the given query.

func (*ApplicationQuery) CountX

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

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

func (*ApplicationQuery) Exist

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

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

func (*ApplicationQuery) ExistX

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

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

func (*ApplicationQuery) First

func (aq *ApplicationQuery) First(ctx context.Context) (*Application, error)

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

func (*ApplicationQuery) FirstID

func (aq *ApplicationQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)

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

func (*ApplicationQuery) FirstIDX

func (aq *ApplicationQuery) FirstIDX(ctx context.Context) uuid.UUID

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

func (*ApplicationQuery) FirstX

func (aq *ApplicationQuery) FirstX(ctx context.Context) *Application

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

func (*ApplicationQuery) GroupBy

func (aq *ApplicationQuery) GroupBy(field string, fields ...string) *ApplicationGroupBy

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 {
	BasicID string `json:"basic_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Application.Query().
	GroupBy(application.FieldBasicID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ApplicationQuery) IDs

func (aq *ApplicationQuery) IDs(ctx context.Context) ([]uuid.UUID, error)

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

func (*ApplicationQuery) IDsX

func (aq *ApplicationQuery) IDsX(ctx context.Context) []uuid.UUID

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

func (*ApplicationQuery) Limit

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

Limit adds a limit step to the query.

func (*ApplicationQuery) Offset

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

Offset adds an offset step to the query.

func (*ApplicationQuery) Only

func (aq *ApplicationQuery) Only(ctx context.Context) (*Application, error)

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

func (*ApplicationQuery) OnlyID

func (aq *ApplicationQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)

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

func (*ApplicationQuery) OnlyIDX

func (aq *ApplicationQuery) OnlyIDX(ctx context.Context) uuid.UUID

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

func (*ApplicationQuery) OnlyX

func (aq *ApplicationQuery) OnlyX(ctx context.Context) *Application

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

func (*ApplicationQuery) Order

func (aq *ApplicationQuery) Order(o ...OrderFunc) *ApplicationQuery

Order adds an order step to the query.

func (*ApplicationQuery) QueryAssignmentHistories

func (aq *ApplicationQuery) QueryAssignmentHistories() *ApplicationAssignmentHistoryQuery

QueryAssignmentHistories chains the current query on the "assignment_histories" edge.

func (*ApplicationQuery) QueryAttachments

func (aq *ApplicationQuery) QueryAttachments() *AttachmentQuery

QueryAttachments chains the current query on the "attachments" edge.

func (*ApplicationQuery) QueryStatusHistories

func (aq *ApplicationQuery) QueryStatusHistories() *ApplicationStatusHistoryQuery

QueryStatusHistories chains the current query on the "status_histories" edge.

func (*ApplicationQuery) QueryTickets

func (aq *ApplicationQuery) QueryTickets() *TicketQuery

QueryTickets chains the current query on the "tickets" edge.

func (*ApplicationQuery) Select

func (aq *ApplicationQuery) Select(fields ...string) *ApplicationSelect

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 {
	BasicID string `json:"basic_id,omitempty"`
}

client.Application.Query().
	Select(application.FieldBasicID).
	Scan(ctx, &v)

func (*ApplicationQuery) Unique

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

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

Where adds a new predicate for the ApplicationQuery builder.

func (*ApplicationQuery) WithAssignmentHistories

func (aq *ApplicationQuery) WithAssignmentHistories(opts ...func(*ApplicationAssignmentHistoryQuery)) *ApplicationQuery

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

func (*ApplicationQuery) WithAttachments

func (aq *ApplicationQuery) WithAttachments(opts ...func(*AttachmentQuery)) *ApplicationQuery

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

func (*ApplicationQuery) WithStatusHistories

func (aq *ApplicationQuery) WithStatusHistories(opts ...func(*ApplicationStatusHistoryQuery)) *ApplicationQuery

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

func (*ApplicationQuery) WithTickets

func (aq *ApplicationQuery) WithTickets(opts ...func(*TicketQuery)) *ApplicationQuery

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

type ApplicationSelect

type ApplicationSelect struct {
	*ApplicationQuery
	// contains filtered or unexported fields
}

ApplicationSelect is the builder for selecting fields of Application entities.

func (*ApplicationSelect) Bool

func (as *ApplicationSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*ApplicationSelect) BoolX

func (as *ApplicationSelect) BoolX(ctx context.Context) bool

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

func (*ApplicationSelect) Bools

func (as *ApplicationSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*ApplicationSelect) BoolsX

func (as *ApplicationSelect) BoolsX(ctx context.Context) []bool

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

func (*ApplicationSelect) Float64

func (as *ApplicationSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*ApplicationSelect) Float64X

func (as *ApplicationSelect) Float64X(ctx context.Context) float64

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

func (*ApplicationSelect) Float64s

func (as *ApplicationSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*ApplicationSelect) Float64sX

func (as *ApplicationSelect) Float64sX(ctx context.Context) []float64

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

func (*ApplicationSelect) Int

func (as *ApplicationSelect) Int(ctx context.Context) (_ int, err error)

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

func (*ApplicationSelect) IntX

func (as *ApplicationSelect) IntX(ctx context.Context) int

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

func (*ApplicationSelect) Ints

func (as *ApplicationSelect) Ints(ctx context.Context) ([]int, error)

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

func (*ApplicationSelect) IntsX

func (as *ApplicationSelect) IntsX(ctx context.Context) []int

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

func (*ApplicationSelect) Scan

func (as *ApplicationSelect) Scan(ctx context.Context, v interface{}) error

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

func (*ApplicationSelect) ScanX

func (as *ApplicationSelect) ScanX(ctx context.Context, v interface{})

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

func (*ApplicationSelect) String

func (as *ApplicationSelect) String(ctx context.Context) (_ string, err error)

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

func (*ApplicationSelect) StringX

func (as *ApplicationSelect) StringX(ctx context.Context) string

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

func (*ApplicationSelect) Strings

func (as *ApplicationSelect) Strings(ctx context.Context) ([]string, error)

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

func (*ApplicationSelect) StringsX

func (as *ApplicationSelect) StringsX(ctx context.Context) []string

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

type ApplicationStatusHistories

type ApplicationStatusHistories []*ApplicationStatusHistory

ApplicationStatusHistories is a parsable slice of ApplicationStatusHistory.

type ApplicationStatusHistory

type ApplicationStatusHistory struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// ApplicationID holds the value of the "application_id" field.
	ApplicationID uuid.UUID `json:"application_id,omitempty"`
	// Status holds the value of the "status" field.
	Status applicationstatushistory.Status `json:"status,omitempty"`
	// CreatedTime holds the value of the "created_time" field.
	CreatedTime time.Time `json:"created_time,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ApplicationStatusHistoryQuery when eager-loading is set.
	Edges ApplicationStatusHistoryEdges `json:"edges"`
	// contains filtered or unexported fields
}

ApplicationStatusHistory is the model entity for the ApplicationStatusHistory schema.

func (*ApplicationStatusHistory) QueryApplications

func (ash *ApplicationStatusHistory) QueryApplications() *ApplicationQuery

QueryApplications queries the "applications" edge of the ApplicationStatusHistory entity.

func (*ApplicationStatusHistory) String

func (ash *ApplicationStatusHistory) String() string

String implements the fmt.Stringer.

func (*ApplicationStatusHistory) Unwrap

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

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

type ApplicationStatusHistoryClient

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

ApplicationStatusHistoryClient is a client for the ApplicationStatusHistory schema.

func NewApplicationStatusHistoryClient

func NewApplicationStatusHistoryClient(c config) *ApplicationStatusHistoryClient

NewApplicationStatusHistoryClient returns a client for the ApplicationStatusHistory from the given config.

func (*ApplicationStatusHistoryClient) Create

Create returns a create builder for ApplicationStatusHistory.

func (*ApplicationStatusHistoryClient) CreateBulk

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

func (*ApplicationStatusHistoryClient) Delete

Delete returns a delete builder for ApplicationStatusHistory.

func (*ApplicationStatusHistoryClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ApplicationStatusHistoryClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*ApplicationStatusHistoryClient) Get

Get returns a ApplicationStatusHistory entity by its id.

func (*ApplicationStatusHistoryClient) GetX

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

func (*ApplicationStatusHistoryClient) Hooks

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

Hooks returns the client hooks.

func (*ApplicationStatusHistoryClient) Query

Query returns a query builder for ApplicationStatusHistory.

func (*ApplicationStatusHistoryClient) QueryApplications

QueryApplications queries the applications edge of a ApplicationStatusHistory.

func (*ApplicationStatusHistoryClient) Update

Update returns an update builder for ApplicationStatusHistory.

func (*ApplicationStatusHistoryClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*ApplicationStatusHistoryClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*ApplicationStatusHistoryClient) Use

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

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

type ApplicationStatusHistoryCreate

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

ApplicationStatusHistoryCreate is the builder for creating a ApplicationStatusHistory entity.

func (*ApplicationStatusHistoryCreate) Exec

Exec executes the query.

func (*ApplicationStatusHistoryCreate) ExecX

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

func (*ApplicationStatusHistoryCreate) Mutation

Mutation returns the ApplicationStatusHistoryMutation object of the builder.

func (*ApplicationStatusHistoryCreate) Save

Save creates the ApplicationStatusHistory in the database.

func (*ApplicationStatusHistoryCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*ApplicationStatusHistoryCreate) SetApplicationID

SetApplicationID sets the "application_id" field.

func (*ApplicationStatusHistoryCreate) SetApplications

SetApplications sets the "applications" edge to the Application entity.

func (*ApplicationStatusHistoryCreate) SetApplicationsID

SetApplicationsID sets the "applications" edge to the Application entity by ID.

func (*ApplicationStatusHistoryCreate) SetCreatedTime

SetCreatedTime sets the "created_time" field.

func (*ApplicationStatusHistoryCreate) SetNillableCreatedTime

func (ashc *ApplicationStatusHistoryCreate) SetNillableCreatedTime(t *time.Time) *ApplicationStatusHistoryCreate

SetNillableCreatedTime sets the "created_time" field if the given value is not nil.

func (*ApplicationStatusHistoryCreate) SetStatus

SetStatus sets the "status" field.

type ApplicationStatusHistoryCreateBulk

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

ApplicationStatusHistoryCreateBulk is the builder for creating many ApplicationStatusHistory entities in bulk.

func (*ApplicationStatusHistoryCreateBulk) Exec

Exec executes the query.

func (*ApplicationStatusHistoryCreateBulk) ExecX

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

func (*ApplicationStatusHistoryCreateBulk) Save

Save creates the ApplicationStatusHistory entities in the database.

func (*ApplicationStatusHistoryCreateBulk) SaveX

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

type ApplicationStatusHistoryDelete

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

ApplicationStatusHistoryDelete is the builder for deleting a ApplicationStatusHistory entity.

func (*ApplicationStatusHistoryDelete) Exec

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

func (*ApplicationStatusHistoryDelete) ExecX

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

func (*ApplicationStatusHistoryDelete) Where

Where appends a list predicates to the ApplicationStatusHistoryDelete builder.

type ApplicationStatusHistoryDeleteOne

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

ApplicationStatusHistoryDeleteOne is the builder for deleting a single ApplicationStatusHistory entity.

func (*ApplicationStatusHistoryDeleteOne) Exec

Exec executes the deletion query.

func (*ApplicationStatusHistoryDeleteOne) ExecX

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

type ApplicationStatusHistoryEdges

type ApplicationStatusHistoryEdges struct {
	// Applications holds the value of the applications edge.
	Applications *Application `json:"applications,omitempty"`
	// contains filtered or unexported fields
}

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

func (ApplicationStatusHistoryEdges) ApplicationsOrErr

func (e ApplicationStatusHistoryEdges) ApplicationsOrErr() (*Application, error)

ApplicationsOrErr returns the Applications value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ApplicationStatusHistoryGroupBy

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

ApplicationStatusHistoryGroupBy is the group-by builder for ApplicationStatusHistory entities.

func (*ApplicationStatusHistoryGroupBy) Aggregate

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

func (*ApplicationStatusHistoryGroupBy) Bool

func (ashgb *ApplicationStatusHistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*ApplicationStatusHistoryGroupBy) BoolX

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

func (*ApplicationStatusHistoryGroupBy) Bools

func (ashgb *ApplicationStatusHistoryGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*ApplicationStatusHistoryGroupBy) BoolsX

func (ashgb *ApplicationStatusHistoryGroupBy) BoolsX(ctx context.Context) []bool

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

func (*ApplicationStatusHistoryGroupBy) Float64

func (ashgb *ApplicationStatusHistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*ApplicationStatusHistoryGroupBy) Float64X

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

func (*ApplicationStatusHistoryGroupBy) Float64s

func (ashgb *ApplicationStatusHistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*ApplicationStatusHistoryGroupBy) Float64sX

func (ashgb *ApplicationStatusHistoryGroupBy) Float64sX(ctx context.Context) []float64

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

func (*ApplicationStatusHistoryGroupBy) Int

func (ashgb *ApplicationStatusHistoryGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*ApplicationStatusHistoryGroupBy) IntX

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

func (*ApplicationStatusHistoryGroupBy) Ints

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

func (*ApplicationStatusHistoryGroupBy) IntsX

func (ashgb *ApplicationStatusHistoryGroupBy) IntsX(ctx context.Context) []int

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

func (*ApplicationStatusHistoryGroupBy) Scan

func (ashgb *ApplicationStatusHistoryGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*ApplicationStatusHistoryGroupBy) ScanX

func (ashgb *ApplicationStatusHistoryGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ApplicationStatusHistoryGroupBy) String

func (ashgb *ApplicationStatusHistoryGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*ApplicationStatusHistoryGroupBy) StringX

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

func (*ApplicationStatusHistoryGroupBy) Strings

func (ashgb *ApplicationStatusHistoryGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*ApplicationStatusHistoryGroupBy) StringsX

func (ashgb *ApplicationStatusHistoryGroupBy) StringsX(ctx context.Context) []string

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

type ApplicationStatusHistoryMutation

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

ApplicationStatusHistoryMutation represents an operation that mutates the ApplicationStatusHistory nodes in the graph.

func (*ApplicationStatusHistoryMutation) AddField

func (m *ApplicationStatusHistoryMutation) 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 (*ApplicationStatusHistoryMutation) AddedEdges

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

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

func (*ApplicationStatusHistoryMutation) AddedField

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

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

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

func (*ApplicationStatusHistoryMutation) AddedIDs

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

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

func (*ApplicationStatusHistoryMutation) ApplicationID

func (m *ApplicationStatusHistoryMutation) ApplicationID() (r uuid.UUID, exists bool)

ApplicationID returns the value of the "application_id" field in the mutation.

func (*ApplicationStatusHistoryMutation) ApplicationsCleared

func (m *ApplicationStatusHistoryMutation) ApplicationsCleared() bool

ApplicationsCleared reports if the "applications" edge to the Application entity was cleared.

func (*ApplicationStatusHistoryMutation) ApplicationsID

func (m *ApplicationStatusHistoryMutation) ApplicationsID() (id uuid.UUID, exists bool)

ApplicationsID returns the "applications" edge ID in the mutation.

func (*ApplicationStatusHistoryMutation) ApplicationsIDs

func (m *ApplicationStatusHistoryMutation) ApplicationsIDs() (ids []uuid.UUID)

ApplicationsIDs returns the "applications" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ApplicationsID instead. It exists only for internal usage by the builders.

func (*ApplicationStatusHistoryMutation) ClearApplications

func (m *ApplicationStatusHistoryMutation) ClearApplications()

ClearApplications clears the "applications" edge to the Application entity.

func (*ApplicationStatusHistoryMutation) ClearEdge

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

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

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

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

func (*ApplicationStatusHistoryMutation) ClearedFields

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

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

func (ApplicationStatusHistoryMutation) 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 (*ApplicationStatusHistoryMutation) CreatedTime

func (m *ApplicationStatusHistoryMutation) CreatedTime() (r time.Time, exists bool)

CreatedTime returns the value of the "created_time" field in the mutation.

func (*ApplicationStatusHistoryMutation) EdgeCleared

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

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

func (*ApplicationStatusHistoryMutation) Field

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ApplicationStatusHistoryMutation) FieldCleared

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

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

func (*ApplicationStatusHistoryMutation) Fields

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 (*ApplicationStatusHistoryMutation) ID

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

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

func (*ApplicationStatusHistoryMutation) OldApplicationID

func (m *ApplicationStatusHistoryMutation) OldApplicationID(ctx context.Context) (v uuid.UUID, err error)

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

func (*ApplicationStatusHistoryMutation) OldCreatedTime

func (m *ApplicationStatusHistoryMutation) OldCreatedTime(ctx context.Context) (v time.Time, err error)

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

func (*ApplicationStatusHistoryMutation) OldField

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ApplicationStatusHistoryMutation) OldStatus

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

func (*ApplicationStatusHistoryMutation) Op

Op returns the operation name.

func (*ApplicationStatusHistoryMutation) RemovedEdges

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

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

func (*ApplicationStatusHistoryMutation) RemovedIDs

func (m *ApplicationStatusHistoryMutation) 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 (*ApplicationStatusHistoryMutation) ResetApplicationID

func (m *ApplicationStatusHistoryMutation) ResetApplicationID()

ResetApplicationID resets all changes to the "application_id" field.

func (*ApplicationStatusHistoryMutation) ResetApplications

func (m *ApplicationStatusHistoryMutation) ResetApplications()

ResetApplications resets all changes to the "applications" edge.

func (*ApplicationStatusHistoryMutation) ResetCreatedTime

func (m *ApplicationStatusHistoryMutation) ResetCreatedTime()

ResetCreatedTime resets all changes to the "created_time" field.

func (*ApplicationStatusHistoryMutation) ResetEdge

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

func (m *ApplicationStatusHistoryMutation) 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 (*ApplicationStatusHistoryMutation) ResetStatus

func (m *ApplicationStatusHistoryMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*ApplicationStatusHistoryMutation) SetApplicationID

func (m *ApplicationStatusHistoryMutation) SetApplicationID(u uuid.UUID)

SetApplicationID sets the "application_id" field.

func (*ApplicationStatusHistoryMutation) SetApplicationsID

func (m *ApplicationStatusHistoryMutation) SetApplicationsID(id uuid.UUID)

SetApplicationsID sets the "applications" edge to the Application entity by id.

func (*ApplicationStatusHistoryMutation) SetCreatedTime

func (m *ApplicationStatusHistoryMutation) SetCreatedTime(t time.Time)

SetCreatedTime sets the "created_time" field.

func (*ApplicationStatusHistoryMutation) SetField

func (m *ApplicationStatusHistoryMutation) 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 (*ApplicationStatusHistoryMutation) SetStatus

SetStatus sets the "status" field.

func (*ApplicationStatusHistoryMutation) Status

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

func (ApplicationStatusHistoryMutation) Tx

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

func (*ApplicationStatusHistoryMutation) Type

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

func (*ApplicationStatusHistoryMutation) Where

Where appends a list predicates to the ApplicationStatusHistoryMutation builder.

type ApplicationStatusHistoryQuery

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

ApplicationStatusHistoryQuery is the builder for querying ApplicationStatusHistory entities.

func (*ApplicationStatusHistoryQuery) All

All executes the query and returns a list of ApplicationStatusHistories.

func (*ApplicationStatusHistoryQuery) AllX

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

func (*ApplicationStatusHistoryQuery) Clone

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

func (*ApplicationStatusHistoryQuery) Count

Count returns the count of the given query.

func (*ApplicationStatusHistoryQuery) CountX

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

func (*ApplicationStatusHistoryQuery) Exist

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

func (*ApplicationStatusHistoryQuery) ExistX

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

func (*ApplicationStatusHistoryQuery) First

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

func (*ApplicationStatusHistoryQuery) FirstID

func (ashq *ApplicationStatusHistoryQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ApplicationStatusHistoryQuery) FirstIDX

func (ashq *ApplicationStatusHistoryQuery) FirstIDX(ctx context.Context) int

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

func (*ApplicationStatusHistoryQuery) FirstX

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

func (*ApplicationStatusHistoryQuery) GroupBy

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 {
	ApplicationID uuid.UUID `json:"application_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.ApplicationStatusHistory.Query().
	GroupBy(applicationstatushistory.FieldApplicationID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ApplicationStatusHistoryQuery) IDs

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

func (*ApplicationStatusHistoryQuery) IDsX

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

func (*ApplicationStatusHistoryQuery) Limit

Limit adds a limit step to the query.

func (*ApplicationStatusHistoryQuery) Offset

Offset adds an offset step to the query.

func (*ApplicationStatusHistoryQuery) Only

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

func (*ApplicationStatusHistoryQuery) OnlyID

func (ashq *ApplicationStatusHistoryQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ApplicationStatusHistoryQuery) OnlyIDX

func (ashq *ApplicationStatusHistoryQuery) OnlyIDX(ctx context.Context) int

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

func (*ApplicationStatusHistoryQuery) OnlyX

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

func (*ApplicationStatusHistoryQuery) Order

Order adds an order step to the query.

func (*ApplicationStatusHistoryQuery) QueryApplications

func (ashq *ApplicationStatusHistoryQuery) QueryApplications() *ApplicationQuery

QueryApplications chains the current query on the "applications" edge.

func (*ApplicationStatusHistoryQuery) Select

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 {
	ApplicationID uuid.UUID `json:"application_id,omitempty"`
}

client.ApplicationStatusHistory.Query().
	Select(applicationstatushistory.FieldApplicationID).
	Scan(ctx, &v)

func (*ApplicationStatusHistoryQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ApplicationStatusHistoryQuery) Where

Where adds a new predicate for the ApplicationStatusHistoryQuery builder.

func (*ApplicationStatusHistoryQuery) WithApplications

func (ashq *ApplicationStatusHistoryQuery) WithApplications(opts ...func(*ApplicationQuery)) *ApplicationStatusHistoryQuery

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

type ApplicationStatusHistorySelect

type ApplicationStatusHistorySelect struct {
	*ApplicationStatusHistoryQuery
	// contains filtered or unexported fields
}

ApplicationStatusHistorySelect is the builder for selecting fields of ApplicationStatusHistory entities.

func (*ApplicationStatusHistorySelect) Bool

func (ashs *ApplicationStatusHistorySelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*ApplicationStatusHistorySelect) BoolX

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

func (*ApplicationStatusHistorySelect) Bools

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

func (*ApplicationStatusHistorySelect) BoolsX

func (ashs *ApplicationStatusHistorySelect) BoolsX(ctx context.Context) []bool

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

func (*ApplicationStatusHistorySelect) Float64

func (ashs *ApplicationStatusHistorySelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*ApplicationStatusHistorySelect) Float64X

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

func (*ApplicationStatusHistorySelect) Float64s

func (ashs *ApplicationStatusHistorySelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*ApplicationStatusHistorySelect) Float64sX

func (ashs *ApplicationStatusHistorySelect) Float64sX(ctx context.Context) []float64

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

func (*ApplicationStatusHistorySelect) Int

func (ashs *ApplicationStatusHistorySelect) Int(ctx context.Context) (_ int, err error)

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

func (*ApplicationStatusHistorySelect) IntX

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

func (*ApplicationStatusHistorySelect) Ints

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

func (*ApplicationStatusHistorySelect) IntsX

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

func (*ApplicationStatusHistorySelect) Scan

func (ashs *ApplicationStatusHistorySelect) Scan(ctx context.Context, v interface{}) error

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

func (*ApplicationStatusHistorySelect) ScanX

func (ashs *ApplicationStatusHistorySelect) ScanX(ctx context.Context, v interface{})

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

func (*ApplicationStatusHistorySelect) String

func (ashs *ApplicationStatusHistorySelect) String(ctx context.Context) (_ string, err error)

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

func (*ApplicationStatusHistorySelect) StringX

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

func (*ApplicationStatusHistorySelect) Strings

func (ashs *ApplicationStatusHistorySelect) Strings(ctx context.Context) ([]string, error)

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

func (*ApplicationStatusHistorySelect) StringsX

func (ashs *ApplicationStatusHistorySelect) StringsX(ctx context.Context) []string

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

type ApplicationStatusHistoryUpdate

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

ApplicationStatusHistoryUpdate is the builder for updating ApplicationStatusHistory entities.

func (*ApplicationStatusHistoryUpdate) ClearApplications

ClearApplications clears the "applications" edge to the Application entity.

func (*ApplicationStatusHistoryUpdate) Exec

Exec executes the query.

func (*ApplicationStatusHistoryUpdate) ExecX

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

func (*ApplicationStatusHistoryUpdate) Mutation

Mutation returns the ApplicationStatusHistoryMutation object of the builder.

func (*ApplicationStatusHistoryUpdate) Save

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

func (*ApplicationStatusHistoryUpdate) SaveX

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

func (*ApplicationStatusHistoryUpdate) SetApplicationID

SetApplicationID sets the "application_id" field.

func (*ApplicationStatusHistoryUpdate) SetApplications

SetApplications sets the "applications" edge to the Application entity.

func (*ApplicationStatusHistoryUpdate) SetApplicationsID

SetApplicationsID sets the "applications" edge to the Application entity by ID.

func (*ApplicationStatusHistoryUpdate) SetStatus

SetStatus sets the "status" field.

func (*ApplicationStatusHistoryUpdate) Where

Where appends a list predicates to the ApplicationStatusHistoryUpdate builder.

type ApplicationStatusHistoryUpdateOne

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

ApplicationStatusHistoryUpdateOne is the builder for updating a single ApplicationStatusHistory entity.

func (*ApplicationStatusHistoryUpdateOne) ClearApplications

ClearApplications clears the "applications" edge to the Application entity.

func (*ApplicationStatusHistoryUpdateOne) Exec

Exec executes the query on the entity.

func (*ApplicationStatusHistoryUpdateOne) ExecX

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

func (*ApplicationStatusHistoryUpdateOne) Mutation

Mutation returns the ApplicationStatusHistoryMutation object of the builder.

func (*ApplicationStatusHistoryUpdateOne) Save

Save executes the query and returns the updated ApplicationStatusHistory entity.

func (*ApplicationStatusHistoryUpdateOne) SaveX

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

func (*ApplicationStatusHistoryUpdateOne) Select

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

func (*ApplicationStatusHistoryUpdateOne) SetApplicationID

SetApplicationID sets the "application_id" field.

func (*ApplicationStatusHistoryUpdateOne) SetApplications

SetApplications sets the "applications" edge to the Application entity.

func (*ApplicationStatusHistoryUpdateOne) SetApplicationsID

SetApplicationsID sets the "applications" edge to the Application entity by ID.

func (*ApplicationStatusHistoryUpdateOne) SetStatus

SetStatus sets the "status" field.

type ApplicationUpdate

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

ApplicationUpdate is the builder for updating Application entities.

func (*ApplicationUpdate) AddAssignmentHistories

func (au *ApplicationUpdate) AddAssignmentHistories(a ...*ApplicationAssignmentHistory) *ApplicationUpdate

AddAssignmentHistories adds the "assignment_histories" edges to the ApplicationAssignmentHistory entity.

func (*ApplicationUpdate) AddAssignmentHistoryIDs

func (au *ApplicationUpdate) AddAssignmentHistoryIDs(ids ...int) *ApplicationUpdate

AddAssignmentHistoryIDs adds the "assignment_histories" edge to the ApplicationAssignmentHistory entity by IDs.

func (*ApplicationUpdate) AddAttachmentIDs

func (au *ApplicationUpdate) AddAttachmentIDs(ids ...int) *ApplicationUpdate

AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.

func (*ApplicationUpdate) AddAttachments

func (au *ApplicationUpdate) AddAttachments(a ...*Attachment) *ApplicationUpdate

AddAttachments adds the "attachments" edges to the Attachment entity.

func (*ApplicationUpdate) AddStatusHistories

func (au *ApplicationUpdate) AddStatusHistories(a ...*ApplicationStatusHistory) *ApplicationUpdate

AddStatusHistories adds the "status_histories" edges to the ApplicationStatusHistory entity.

func (*ApplicationUpdate) AddStatusHistoryIDs

func (au *ApplicationUpdate) AddStatusHistoryIDs(ids ...int) *ApplicationUpdate

AddStatusHistoryIDs adds the "status_histories" edge to the ApplicationStatusHistory entity by IDs.

func (*ApplicationUpdate) AddTicketIDs

func (au *ApplicationUpdate) AddTicketIDs(ids ...int) *ApplicationUpdate

AddTicketIDs adds the "tickets" edge to the Ticket entity by IDs.

func (*ApplicationUpdate) AddTickets

func (au *ApplicationUpdate) AddTickets(t ...*Ticket) *ApplicationUpdate

AddTickets adds the "tickets" edges to the Ticket entity.

func (*ApplicationUpdate) ClearAssignmentHistories

func (au *ApplicationUpdate) ClearAssignmentHistories() *ApplicationUpdate

ClearAssignmentHistories clears all "assignment_histories" edges to the ApplicationAssignmentHistory entity.

func (*ApplicationUpdate) ClearAttachments

func (au *ApplicationUpdate) ClearAttachments() *ApplicationUpdate

ClearAttachments clears all "attachments" edges to the Attachment entity.

func (*ApplicationUpdate) ClearStatusHistories

func (au *ApplicationUpdate) ClearStatusHistories() *ApplicationUpdate

ClearStatusHistories clears all "status_histories" edges to the ApplicationStatusHistory entity.

func (*ApplicationUpdate) ClearTickets

func (au *ApplicationUpdate) ClearTickets() *ApplicationUpdate

ClearTickets clears all "tickets" edges to the Ticket entity.

func (*ApplicationUpdate) Exec

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

Exec executes the query.

func (*ApplicationUpdate) ExecX

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

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

func (*ApplicationUpdate) Mutation

func (au *ApplicationUpdate) Mutation() *ApplicationMutation

Mutation returns the ApplicationMutation object of the builder.

func (*ApplicationUpdate) RemoveAssignmentHistories

func (au *ApplicationUpdate) RemoveAssignmentHistories(a ...*ApplicationAssignmentHistory) *ApplicationUpdate

RemoveAssignmentHistories removes "assignment_histories" edges to ApplicationAssignmentHistory entities.

func (*ApplicationUpdate) RemoveAssignmentHistoryIDs

func (au *ApplicationUpdate) RemoveAssignmentHistoryIDs(ids ...int) *ApplicationUpdate

RemoveAssignmentHistoryIDs removes the "assignment_histories" edge to ApplicationAssignmentHistory entities by IDs.

func (*ApplicationUpdate) RemoveAttachmentIDs

func (au *ApplicationUpdate) RemoveAttachmentIDs(ids ...int) *ApplicationUpdate

RemoveAttachmentIDs removes the "attachments" edge to Attachment entities by IDs.

func (*ApplicationUpdate) RemoveAttachments

func (au *ApplicationUpdate) RemoveAttachments(a ...*Attachment) *ApplicationUpdate

RemoveAttachments removes "attachments" edges to Attachment entities.

func (*ApplicationUpdate) RemoveStatusHistories

func (au *ApplicationUpdate) RemoveStatusHistories(a ...*ApplicationStatusHistory) *ApplicationUpdate

RemoveStatusHistories removes "status_histories" edges to ApplicationStatusHistory entities.

func (*ApplicationUpdate) RemoveStatusHistoryIDs

func (au *ApplicationUpdate) RemoveStatusHistoryIDs(ids ...int) *ApplicationUpdate

RemoveStatusHistoryIDs removes the "status_histories" edge to ApplicationStatusHistory entities by IDs.

func (*ApplicationUpdate) RemoveTicketIDs

func (au *ApplicationUpdate) RemoveTicketIDs(ids ...int) *ApplicationUpdate

RemoveTicketIDs removes the "tickets" edge to Ticket entities by IDs.

func (*ApplicationUpdate) RemoveTickets

func (au *ApplicationUpdate) RemoveTickets(t ...*Ticket) *ApplicationUpdate

RemoveTickets removes "tickets" edges to Ticket entities.

func (*ApplicationUpdate) Save

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

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

func (*ApplicationUpdate) SaveX

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

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

func (*ApplicationUpdate) SetApplicantBizID

func (au *ApplicationUpdate) SetApplicantBizID(s string) *ApplicationUpdate

SetApplicantBizID sets the "applicant_biz_id" field.

func (*ApplicationUpdate) SetApplicantEmail

func (au *ApplicationUpdate) SetApplicantEmail(s string) *ApplicationUpdate

SetApplicantEmail sets the "applicant_email" field.

func (*ApplicationUpdate) SetApplicantMid

func (au *ApplicationUpdate) SetApplicantMid(s string) *ApplicationUpdate

SetApplicantMid sets the "applicant_mid" field.

func (*ApplicationUpdate) SetApplicantName

func (au *ApplicationUpdate) SetApplicantName(s string) *ApplicationUpdate

SetApplicantName sets the "applicant_name" field.

func (*ApplicationUpdate) SetApplicationStatus

func (au *ApplicationUpdate) SetApplicationStatus(as application.ApplicationStatus) *ApplicationUpdate

SetApplicationStatus sets the "application_status" field.

func (*ApplicationUpdate) SetAssignee

func (au *ApplicationUpdate) SetAssignee(s string) *ApplicationUpdate

SetAssignee sets the "assignee" field.

func (*ApplicationUpdate) SetAssigner

func (au *ApplicationUpdate) SetAssigner(s string) *ApplicationUpdate

SetAssigner sets the "assigner" field.

func (*ApplicationUpdate) SetBasicID

func (au *ApplicationUpdate) SetBasicID(s string) *ApplicationUpdate

SetBasicID sets the "basic_id" field.

func (*ApplicationUpdate) SetBotActiveStatus

func (au *ApplicationUpdate) SetBotActiveStatus(aas application.BotActiveStatus) *ApplicationUpdate

SetBotActiveStatus sets the "bot_active_status" field.

func (*ApplicationUpdate) SetBotDisplayName

func (au *ApplicationUpdate) SetBotDisplayName(s string) *ApplicationUpdate

SetBotDisplayName sets the "bot_display_name" field.

func (*ApplicationUpdate) SetBotMid

func (au *ApplicationUpdate) SetBotMid(s string) *ApplicationUpdate

SetBotMid sets the "bot_mid" field.

func (*ApplicationUpdate) SetBotSuspendReason

func (au *ApplicationUpdate) SetBotSuspendReason(asr application.BotSuspendReason) *ApplicationUpdate

SetBotSuspendReason sets the "bot_suspend_reason" field.

func (*ApplicationUpdate) SetPremiumID

func (au *ApplicationUpdate) SetPremiumID(s string) *ApplicationUpdate

SetPremiumID sets the "premium_id" field.

func (*ApplicationUpdate) SetRemark

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

SetRemark sets the "remark" field.

func (*ApplicationUpdate) SetReviewComment

func (au *ApplicationUpdate) SetReviewComment(s string) *ApplicationUpdate

SetReviewComment sets the "review_comment" field.

func (*ApplicationUpdate) SetStoreType

SetStoreType sets the "store_type" field.

func (*ApplicationUpdate) SetUpdatedDtime

func (au *ApplicationUpdate) SetUpdatedDtime(t time.Time) *ApplicationUpdate

SetUpdatedDtime sets the "updated_dtime" field.

func (*ApplicationUpdate) SetWebsiteURL

func (au *ApplicationUpdate) SetWebsiteURL(s string) *ApplicationUpdate

SetWebsiteURL sets the "website_url" field.

func (*ApplicationUpdate) Where

Where appends a list predicates to the ApplicationUpdate builder.

type ApplicationUpdateOne

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

ApplicationUpdateOne is the builder for updating a single Application entity.

func (*ApplicationUpdateOne) AddAssignmentHistories

func (auo *ApplicationUpdateOne) AddAssignmentHistories(a ...*ApplicationAssignmentHistory) *ApplicationUpdateOne

AddAssignmentHistories adds the "assignment_histories" edges to the ApplicationAssignmentHistory entity.

func (*ApplicationUpdateOne) AddAssignmentHistoryIDs

func (auo *ApplicationUpdateOne) AddAssignmentHistoryIDs(ids ...int) *ApplicationUpdateOne

AddAssignmentHistoryIDs adds the "assignment_histories" edge to the ApplicationAssignmentHistory entity by IDs.

func (*ApplicationUpdateOne) AddAttachmentIDs

func (auo *ApplicationUpdateOne) AddAttachmentIDs(ids ...int) *ApplicationUpdateOne

AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.

func (*ApplicationUpdateOne) AddAttachments

func (auo *ApplicationUpdateOne) AddAttachments(a ...*Attachment) *ApplicationUpdateOne

AddAttachments adds the "attachments" edges to the Attachment entity.

func (*ApplicationUpdateOne) AddStatusHistories

func (auo *ApplicationUpdateOne) AddStatusHistories(a ...*ApplicationStatusHistory) *ApplicationUpdateOne

AddStatusHistories adds the "status_histories" edges to the ApplicationStatusHistory entity.

func (*ApplicationUpdateOne) AddStatusHistoryIDs

func (auo *ApplicationUpdateOne) AddStatusHistoryIDs(ids ...int) *ApplicationUpdateOne

AddStatusHistoryIDs adds the "status_histories" edge to the ApplicationStatusHistory entity by IDs.

func (*ApplicationUpdateOne) AddTicketIDs

func (auo *ApplicationUpdateOne) AddTicketIDs(ids ...int) *ApplicationUpdateOne

AddTicketIDs adds the "tickets" edge to the Ticket entity by IDs.

func (*ApplicationUpdateOne) AddTickets

func (auo *ApplicationUpdateOne) AddTickets(t ...*Ticket) *ApplicationUpdateOne

AddTickets adds the "tickets" edges to the Ticket entity.

func (*ApplicationUpdateOne) ClearAssignmentHistories

func (auo *ApplicationUpdateOne) ClearAssignmentHistories() *ApplicationUpdateOne

ClearAssignmentHistories clears all "assignment_histories" edges to the ApplicationAssignmentHistory entity.

func (*ApplicationUpdateOne) ClearAttachments

func (auo *ApplicationUpdateOne) ClearAttachments() *ApplicationUpdateOne

ClearAttachments clears all "attachments" edges to the Attachment entity.

func (*ApplicationUpdateOne) ClearStatusHistories

func (auo *ApplicationUpdateOne) ClearStatusHistories() *ApplicationUpdateOne

ClearStatusHistories clears all "status_histories" edges to the ApplicationStatusHistory entity.

func (*ApplicationUpdateOne) ClearTickets

func (auo *ApplicationUpdateOne) ClearTickets() *ApplicationUpdateOne

ClearTickets clears all "tickets" edges to the Ticket entity.

func (*ApplicationUpdateOne) Exec

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

Exec executes the query on the entity.

func (*ApplicationUpdateOne) ExecX

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

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

func (*ApplicationUpdateOne) Mutation

func (auo *ApplicationUpdateOne) Mutation() *ApplicationMutation

Mutation returns the ApplicationMutation object of the builder.

func (*ApplicationUpdateOne) RemoveAssignmentHistories

func (auo *ApplicationUpdateOne) RemoveAssignmentHistories(a ...*ApplicationAssignmentHistory) *ApplicationUpdateOne

RemoveAssignmentHistories removes "assignment_histories" edges to ApplicationAssignmentHistory entities.

func (*ApplicationUpdateOne) RemoveAssignmentHistoryIDs

func (auo *ApplicationUpdateOne) RemoveAssignmentHistoryIDs(ids ...int) *ApplicationUpdateOne

RemoveAssignmentHistoryIDs removes the "assignment_histories" edge to ApplicationAssignmentHistory entities by IDs.

func (*ApplicationUpdateOne) RemoveAttachmentIDs

func (auo *ApplicationUpdateOne) RemoveAttachmentIDs(ids ...int) *ApplicationUpdateOne

RemoveAttachmentIDs removes the "attachments" edge to Attachment entities by IDs.

func (*ApplicationUpdateOne) RemoveAttachments

func (auo *ApplicationUpdateOne) RemoveAttachments(a ...*Attachment) *ApplicationUpdateOne

RemoveAttachments removes "attachments" edges to Attachment entities.

func (*ApplicationUpdateOne) RemoveStatusHistories

func (auo *ApplicationUpdateOne) RemoveStatusHistories(a ...*ApplicationStatusHistory) *ApplicationUpdateOne

RemoveStatusHistories removes "status_histories" edges to ApplicationStatusHistory entities.

func (*ApplicationUpdateOne) RemoveStatusHistoryIDs

func (auo *ApplicationUpdateOne) RemoveStatusHistoryIDs(ids ...int) *ApplicationUpdateOne

RemoveStatusHistoryIDs removes the "status_histories" edge to ApplicationStatusHistory entities by IDs.

func (*ApplicationUpdateOne) RemoveTicketIDs

func (auo *ApplicationUpdateOne) RemoveTicketIDs(ids ...int) *ApplicationUpdateOne

RemoveTicketIDs removes the "tickets" edge to Ticket entities by IDs.

func (*ApplicationUpdateOne) RemoveTickets

func (auo *ApplicationUpdateOne) RemoveTickets(t ...*Ticket) *ApplicationUpdateOne

RemoveTickets removes "tickets" edges to Ticket entities.

func (*ApplicationUpdateOne) Save

Save executes the query and returns the updated Application entity.

func (*ApplicationUpdateOne) SaveX

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

func (*ApplicationUpdateOne) Select

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

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

func (*ApplicationUpdateOne) SetApplicantBizID

func (auo *ApplicationUpdateOne) SetApplicantBizID(s string) *ApplicationUpdateOne

SetApplicantBizID sets the "applicant_biz_id" field.

func (*ApplicationUpdateOne) SetApplicantEmail

func (auo *ApplicationUpdateOne) SetApplicantEmail(s string) *ApplicationUpdateOne

SetApplicantEmail sets the "applicant_email" field.

func (*ApplicationUpdateOne) SetApplicantMid

func (auo *ApplicationUpdateOne) SetApplicantMid(s string) *ApplicationUpdateOne

SetApplicantMid sets the "applicant_mid" field.

func (*ApplicationUpdateOne) SetApplicantName

func (auo *ApplicationUpdateOne) SetApplicantName(s string) *ApplicationUpdateOne

SetApplicantName sets the "applicant_name" field.

func (*ApplicationUpdateOne) SetApplicationStatus

SetApplicationStatus sets the "application_status" field.

func (*ApplicationUpdateOne) SetAssignee

func (auo *ApplicationUpdateOne) SetAssignee(s string) *ApplicationUpdateOne

SetAssignee sets the "assignee" field.

func (*ApplicationUpdateOne) SetAssigner

func (auo *ApplicationUpdateOne) SetAssigner(s string) *ApplicationUpdateOne

SetAssigner sets the "assigner" field.

func (*ApplicationUpdateOne) SetBasicID

func (auo *ApplicationUpdateOne) SetBasicID(s string) *ApplicationUpdateOne

SetBasicID sets the "basic_id" field.

func (*ApplicationUpdateOne) SetBotActiveStatus

SetBotActiveStatus sets the "bot_active_status" field.

func (*ApplicationUpdateOne) SetBotDisplayName

func (auo *ApplicationUpdateOne) SetBotDisplayName(s string) *ApplicationUpdateOne

SetBotDisplayName sets the "bot_display_name" field.

func (*ApplicationUpdateOne) SetBotMid

SetBotMid sets the "bot_mid" field.

func (*ApplicationUpdateOne) SetBotSuspendReason

SetBotSuspendReason sets the "bot_suspend_reason" field.

func (*ApplicationUpdateOne) SetPremiumID

func (auo *ApplicationUpdateOne) SetPremiumID(s string) *ApplicationUpdateOne

SetPremiumID sets the "premium_id" field.

func (*ApplicationUpdateOne) SetRemark

SetRemark sets the "remark" field.

func (*ApplicationUpdateOne) SetReviewComment

func (auo *ApplicationUpdateOne) SetReviewComment(s string) *ApplicationUpdateOne

SetReviewComment sets the "review_comment" field.

func (*ApplicationUpdateOne) SetStoreType

SetStoreType sets the "store_type" field.

func (*ApplicationUpdateOne) SetUpdatedDtime

func (auo *ApplicationUpdateOne) SetUpdatedDtime(t time.Time) *ApplicationUpdateOne

SetUpdatedDtime sets the "updated_dtime" field.

func (*ApplicationUpdateOne) SetWebsiteURL

func (auo *ApplicationUpdateOne) SetWebsiteURL(s string) *ApplicationUpdateOne

SetWebsiteURL sets the "website_url" field.

type Applications

type Applications []*Application

Applications is a parsable slice of Application.

type Attachment

type Attachment struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// ApplicationID holds the value of the "application_id" field.
	ApplicationID uuid.UUID `json:"application_id,omitempty"`
	// TicketID holds the value of the "ticket_id" field.
	TicketID *int `json:"ticket_id,omitempty"`
	// AttachmentType holds the value of the "attachment_type" field.
	AttachmentType attachment.AttachmentType `json:"attachment_type,omitempty"`
	// ObsOid holds the value of the "obs_oid" field.
	ObsOid string `json:"obs_oid,omitempty"`
	// ObsHash holds the value of the "obs_hash" field.
	ObsHash string `json:"obs_hash,omitempty"`
	// CreatedDtime holds the value of the "created_dtime" field.
	CreatedDtime time.Time `json:"created_dtime,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the AttachmentQuery when eager-loading is set.
	Edges AttachmentEdges `json:"edges"`
	// contains filtered or unexported fields
}

Attachment is the model entity for the Attachment schema.

func (*Attachment) QueryApplications

func (a *Attachment) QueryApplications() *ApplicationQuery

QueryApplications queries the "applications" edge of the Attachment entity.

func (*Attachment) QueryTickets

func (a *Attachment) QueryTickets() *TicketQuery

QueryTickets queries the "tickets" edge of the Attachment entity.

func (*Attachment) String

func (a *Attachment) String() string

String implements the fmt.Stringer.

func (*Attachment) Unwrap

func (a *Attachment) Unwrap() *Attachment

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

func (a *Attachment) Update() *AttachmentUpdateOne

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

type AttachmentClient

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

AttachmentClient is a client for the Attachment schema.

func NewAttachmentClient

func NewAttachmentClient(c config) *AttachmentClient

NewAttachmentClient returns a client for the Attachment from the given config.

func (*AttachmentClient) Create

func (c *AttachmentClient) Create() *AttachmentCreate

Create returns a create builder for Attachment.

func (*AttachmentClient) CreateBulk

func (c *AttachmentClient) CreateBulk(builders ...*AttachmentCreate) *AttachmentCreateBulk

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

func (*AttachmentClient) Delete

func (c *AttachmentClient) Delete() *AttachmentDelete

Delete returns a delete builder for Attachment.

func (*AttachmentClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*AttachmentClient) DeleteOneID

func (c *AttachmentClient) DeleteOneID(id int) *AttachmentDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*AttachmentClient) Get

func (c *AttachmentClient) Get(ctx context.Context, id int) (*Attachment, error)

Get returns a Attachment entity by its id.

func (*AttachmentClient) GetX

func (c *AttachmentClient) GetX(ctx context.Context, id int) *Attachment

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

func (*AttachmentClient) Hooks

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

Hooks returns the client hooks.

func (*AttachmentClient) Query

func (c *AttachmentClient) Query() *AttachmentQuery

Query returns a query builder for Attachment.

func (*AttachmentClient) QueryApplications

func (c *AttachmentClient) QueryApplications(a *Attachment) *ApplicationQuery

QueryApplications queries the applications edge of a Attachment.

func (*AttachmentClient) QueryTickets

func (c *AttachmentClient) QueryTickets(a *Attachment) *TicketQuery

QueryTickets queries the tickets edge of a Attachment.

func (*AttachmentClient) Update

func (c *AttachmentClient) Update() *AttachmentUpdate

Update returns an update builder for Attachment.

func (*AttachmentClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AttachmentClient) UpdateOneID

func (c *AttachmentClient) UpdateOneID(id int) *AttachmentUpdateOne

UpdateOneID returns an update builder for the given id.

func (*AttachmentClient) Use

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

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

type AttachmentCreate

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

AttachmentCreate is the builder for creating a Attachment entity.

func (*AttachmentCreate) Exec

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

Exec executes the query.

func (*AttachmentCreate) ExecX

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

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

func (*AttachmentCreate) Mutation

func (ac *AttachmentCreate) Mutation() *AttachmentMutation

Mutation returns the AttachmentMutation object of the builder.

func (*AttachmentCreate) Save

func (ac *AttachmentCreate) Save(ctx context.Context) (*Attachment, error)

Save creates the Attachment in the database.

func (*AttachmentCreate) SaveX

func (ac *AttachmentCreate) SaveX(ctx context.Context) *Attachment

SaveX calls Save and panics if Save returns an error.

func (*AttachmentCreate) SetApplicationID

func (ac *AttachmentCreate) SetApplicationID(u uuid.UUID) *AttachmentCreate

SetApplicationID sets the "application_id" field.

func (*AttachmentCreate) SetApplications

func (ac *AttachmentCreate) SetApplications(a *Application) *AttachmentCreate

SetApplications sets the "applications" edge to the Application entity.

func (*AttachmentCreate) SetApplicationsID

func (ac *AttachmentCreate) SetApplicationsID(id uuid.UUID) *AttachmentCreate

SetApplicationsID sets the "applications" edge to the Application entity by ID.

func (*AttachmentCreate) SetAttachmentType

func (ac *AttachmentCreate) SetAttachmentType(at attachment.AttachmentType) *AttachmentCreate

SetAttachmentType sets the "attachment_type" field.

func (*AttachmentCreate) SetCreatedDtime

func (ac *AttachmentCreate) SetCreatedDtime(t time.Time) *AttachmentCreate

SetCreatedDtime sets the "created_dtime" field.

func (*AttachmentCreate) SetNillableCreatedDtime

func (ac *AttachmentCreate) SetNillableCreatedDtime(t *time.Time) *AttachmentCreate

SetNillableCreatedDtime sets the "created_dtime" field if the given value is not nil.

func (*AttachmentCreate) SetNillableTicketID

func (ac *AttachmentCreate) SetNillableTicketID(i *int) *AttachmentCreate

SetNillableTicketID sets the "ticket_id" field if the given value is not nil.

func (*AttachmentCreate) SetNillableTicketsID

func (ac *AttachmentCreate) SetNillableTicketsID(id *int) *AttachmentCreate

SetNillableTicketsID sets the "tickets" edge to the Ticket entity by ID if the given value is not nil.

func (*AttachmentCreate) SetObsHash

func (ac *AttachmentCreate) SetObsHash(s string) *AttachmentCreate

SetObsHash sets the "obs_hash" field.

func (*AttachmentCreate) SetObsOid

func (ac *AttachmentCreate) SetObsOid(s string) *AttachmentCreate

SetObsOid sets the "obs_oid" field.

func (*AttachmentCreate) SetTicketID

func (ac *AttachmentCreate) SetTicketID(i int) *AttachmentCreate

SetTicketID sets the "ticket_id" field.

func (*AttachmentCreate) SetTickets

func (ac *AttachmentCreate) SetTickets(t *Ticket) *AttachmentCreate

SetTickets sets the "tickets" edge to the Ticket entity.

func (*AttachmentCreate) SetTicketsID

func (ac *AttachmentCreate) SetTicketsID(id int) *AttachmentCreate

SetTicketsID sets the "tickets" edge to the Ticket entity by ID.

type AttachmentCreateBulk

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

AttachmentCreateBulk is the builder for creating many Attachment entities in bulk.

func (*AttachmentCreateBulk) Exec

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

Exec executes the query.

func (*AttachmentCreateBulk) ExecX

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

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

func (*AttachmentCreateBulk) Save

func (acb *AttachmentCreateBulk) Save(ctx context.Context) ([]*Attachment, error)

Save creates the Attachment entities in the database.

func (*AttachmentCreateBulk) SaveX

func (acb *AttachmentCreateBulk) SaveX(ctx context.Context) []*Attachment

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

type AttachmentDelete

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

AttachmentDelete is the builder for deleting a Attachment entity.

func (*AttachmentDelete) Exec

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

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

func (*AttachmentDelete) ExecX

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

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

func (*AttachmentDelete) Where

Where appends a list predicates to the AttachmentDelete builder.

type AttachmentDeleteOne

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

AttachmentDeleteOne is the builder for deleting a single Attachment entity.

func (*AttachmentDeleteOne) Exec

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

Exec executes the deletion query.

func (*AttachmentDeleteOne) ExecX

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

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

type AttachmentEdges

type AttachmentEdges struct {
	// Applications holds the value of the applications edge.
	Applications *Application `json:"applications,omitempty"`
	// Tickets holds the value of the tickets edge.
	Tickets *Ticket `json:"tickets,omitempty"`
	// contains filtered or unexported fields
}

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

func (AttachmentEdges) ApplicationsOrErr

func (e AttachmentEdges) ApplicationsOrErr() (*Application, error)

ApplicationsOrErr returns the Applications value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (AttachmentEdges) TicketsOrErr

func (e AttachmentEdges) TicketsOrErr() (*Ticket, error)

TicketsOrErr returns the Tickets value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type AttachmentGroupBy

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

AttachmentGroupBy is the group-by builder for Attachment entities.

func (*AttachmentGroupBy) Aggregate

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

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

func (*AttachmentGroupBy) Bool

func (agb *AttachmentGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*AttachmentGroupBy) BoolX

func (agb *AttachmentGroupBy) BoolX(ctx context.Context) bool

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

func (*AttachmentGroupBy) Bools

func (agb *AttachmentGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*AttachmentGroupBy) BoolsX

func (agb *AttachmentGroupBy) BoolsX(ctx context.Context) []bool

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

func (*AttachmentGroupBy) Float64

func (agb *AttachmentGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*AttachmentGroupBy) Float64X

func (agb *AttachmentGroupBy) Float64X(ctx context.Context) float64

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

func (*AttachmentGroupBy) Float64s

func (agb *AttachmentGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*AttachmentGroupBy) Float64sX

func (agb *AttachmentGroupBy) Float64sX(ctx context.Context) []float64

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

func (*AttachmentGroupBy) Int

func (agb *AttachmentGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*AttachmentGroupBy) IntX

func (agb *AttachmentGroupBy) IntX(ctx context.Context) int

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

func (*AttachmentGroupBy) Ints

func (agb *AttachmentGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*AttachmentGroupBy) IntsX

func (agb *AttachmentGroupBy) IntsX(ctx context.Context) []int

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

func (*AttachmentGroupBy) Scan

func (agb *AttachmentGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*AttachmentGroupBy) ScanX

func (agb *AttachmentGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*AttachmentGroupBy) String

func (agb *AttachmentGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*AttachmentGroupBy) StringX

func (agb *AttachmentGroupBy) StringX(ctx context.Context) string

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

func (*AttachmentGroupBy) Strings

func (agb *AttachmentGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*AttachmentGroupBy) StringsX

func (agb *AttachmentGroupBy) StringsX(ctx context.Context) []string

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

type AttachmentMutation

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

AttachmentMutation represents an operation that mutates the Attachment nodes in the graph.

func (*AttachmentMutation) AddField

func (m *AttachmentMutation) 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 (*AttachmentMutation) AddedEdges

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

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

func (*AttachmentMutation) AddedField

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

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

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

func (*AttachmentMutation) AddedIDs

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

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

func (*AttachmentMutation) ApplicationID

func (m *AttachmentMutation) ApplicationID() (r uuid.UUID, exists bool)

ApplicationID returns the value of the "application_id" field in the mutation.

func (*AttachmentMutation) ApplicationsCleared

func (m *AttachmentMutation) ApplicationsCleared() bool

ApplicationsCleared reports if the "applications" edge to the Application entity was cleared.

func (*AttachmentMutation) ApplicationsID

func (m *AttachmentMutation) ApplicationsID() (id uuid.UUID, exists bool)

ApplicationsID returns the "applications" edge ID in the mutation.

func (*AttachmentMutation) ApplicationsIDs

func (m *AttachmentMutation) ApplicationsIDs() (ids []uuid.UUID)

ApplicationsIDs returns the "applications" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ApplicationsID instead. It exists only for internal usage by the builders.

func (*AttachmentMutation) AttachmentType

func (m *AttachmentMutation) AttachmentType() (r attachment.AttachmentType, exists bool)

AttachmentType returns the value of the "attachment_type" field in the mutation.

func (*AttachmentMutation) ClearApplications

func (m *AttachmentMutation) ClearApplications()

ClearApplications clears the "applications" edge to the Application entity.

func (*AttachmentMutation) ClearEdge

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

func (m *AttachmentMutation) 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 (*AttachmentMutation) ClearTicketID

func (m *AttachmentMutation) ClearTicketID()

ClearTicketID clears the value of the "ticket_id" field.

func (*AttachmentMutation) ClearTickets

func (m *AttachmentMutation) ClearTickets()

ClearTickets clears the "tickets" edge to the Ticket entity.

func (*AttachmentMutation) ClearedEdges

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

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

func (*AttachmentMutation) ClearedFields

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

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

func (AttachmentMutation) Client

func (m AttachmentMutation) 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 (*AttachmentMutation) CreatedDtime

func (m *AttachmentMutation) CreatedDtime() (r time.Time, exists bool)

CreatedDtime returns the value of the "created_dtime" field in the mutation.

func (*AttachmentMutation) EdgeCleared

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

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

func (*AttachmentMutation) Field

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

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

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

func (*AttachmentMutation) Fields

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

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

func (m *AttachmentMutation) 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 (*AttachmentMutation) ObsHash

func (m *AttachmentMutation) ObsHash() (r string, exists bool)

ObsHash returns the value of the "obs_hash" field in the mutation.

func (*AttachmentMutation) ObsOid

func (m *AttachmentMutation) ObsOid() (r string, exists bool)

ObsOid returns the value of the "obs_oid" field in the mutation.

func (*AttachmentMutation) OldApplicationID

func (m *AttachmentMutation) OldApplicationID(ctx context.Context) (v uuid.UUID, err error)

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

func (*AttachmentMutation) OldAttachmentType

func (m *AttachmentMutation) OldAttachmentType(ctx context.Context) (v attachment.AttachmentType, err error)

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

func (*AttachmentMutation) OldCreatedDtime

func (m *AttachmentMutation) OldCreatedDtime(ctx context.Context) (v time.Time, err error)

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

func (*AttachmentMutation) OldField

func (m *AttachmentMutation) 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 (*AttachmentMutation) OldObsHash

func (m *AttachmentMutation) OldObsHash(ctx context.Context) (v string, err error)

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

func (*AttachmentMutation) OldObsOid

func (m *AttachmentMutation) OldObsOid(ctx context.Context) (v string, err error)

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

func (*AttachmentMutation) OldTicketID

func (m *AttachmentMutation) OldTicketID(ctx context.Context) (v *int, err error)

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

func (*AttachmentMutation) Op

func (m *AttachmentMutation) Op() Op

Op returns the operation name.

func (*AttachmentMutation) RemovedEdges

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

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

func (*AttachmentMutation) RemovedIDs

func (m *AttachmentMutation) 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 (*AttachmentMutation) ResetApplicationID

func (m *AttachmentMutation) ResetApplicationID()

ResetApplicationID resets all changes to the "application_id" field.

func (*AttachmentMutation) ResetApplications

func (m *AttachmentMutation) ResetApplications()

ResetApplications resets all changes to the "applications" edge.

func (*AttachmentMutation) ResetAttachmentType

func (m *AttachmentMutation) ResetAttachmentType()

ResetAttachmentType resets all changes to the "attachment_type" field.

func (*AttachmentMutation) ResetCreatedDtime

func (m *AttachmentMutation) ResetCreatedDtime()

ResetCreatedDtime resets all changes to the "created_dtime" field.

func (*AttachmentMutation) ResetEdge

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

func (m *AttachmentMutation) 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 (*AttachmentMutation) ResetObsHash

func (m *AttachmentMutation) ResetObsHash()

ResetObsHash resets all changes to the "obs_hash" field.

func (*AttachmentMutation) ResetObsOid

func (m *AttachmentMutation) ResetObsOid()

ResetObsOid resets all changes to the "obs_oid" field.

func (*AttachmentMutation) ResetTicketID

func (m *AttachmentMutation) ResetTicketID()

ResetTicketID resets all changes to the "ticket_id" field.

func (*AttachmentMutation) ResetTickets

func (m *AttachmentMutation) ResetTickets()

ResetTickets resets all changes to the "tickets" edge.

func (*AttachmentMutation) SetApplicationID

func (m *AttachmentMutation) SetApplicationID(u uuid.UUID)

SetApplicationID sets the "application_id" field.

func (*AttachmentMutation) SetApplicationsID

func (m *AttachmentMutation) SetApplicationsID(id uuid.UUID)

SetApplicationsID sets the "applications" edge to the Application entity by id.

func (*AttachmentMutation) SetAttachmentType

func (m *AttachmentMutation) SetAttachmentType(at attachment.AttachmentType)

SetAttachmentType sets the "attachment_type" field.

func (*AttachmentMutation) SetCreatedDtime

func (m *AttachmentMutation) SetCreatedDtime(t time.Time)

SetCreatedDtime sets the "created_dtime" field.

func (*AttachmentMutation) SetField

func (m *AttachmentMutation) 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 (*AttachmentMutation) SetObsHash

func (m *AttachmentMutation) SetObsHash(s string)

SetObsHash sets the "obs_hash" field.

func (*AttachmentMutation) SetObsOid

func (m *AttachmentMutation) SetObsOid(s string)

SetObsOid sets the "obs_oid" field.

func (*AttachmentMutation) SetTicketID

func (m *AttachmentMutation) SetTicketID(i int)

SetTicketID sets the "ticket_id" field.

func (*AttachmentMutation) SetTicketsID

func (m *AttachmentMutation) SetTicketsID(id int)

SetTicketsID sets the "tickets" edge to the Ticket entity by id.

func (*AttachmentMutation) TicketID

func (m *AttachmentMutation) TicketID() (r int, exists bool)

TicketID returns the value of the "ticket_id" field in the mutation.

func (*AttachmentMutation) TicketIDCleared

func (m *AttachmentMutation) TicketIDCleared() bool

TicketIDCleared returns if the "ticket_id" field was cleared in this mutation.

func (*AttachmentMutation) TicketsCleared

func (m *AttachmentMutation) TicketsCleared() bool

TicketsCleared reports if the "tickets" edge to the Ticket entity was cleared.

func (*AttachmentMutation) TicketsID

func (m *AttachmentMutation) TicketsID() (id int, exists bool)

TicketsID returns the "tickets" edge ID in the mutation.

func (*AttachmentMutation) TicketsIDs

func (m *AttachmentMutation) TicketsIDs() (ids []int)

TicketsIDs returns the "tickets" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TicketsID instead. It exists only for internal usage by the builders.

func (AttachmentMutation) Tx

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

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

func (*AttachmentMutation) Type

func (m *AttachmentMutation) Type() string

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

func (*AttachmentMutation) Where

func (m *AttachmentMutation) Where(ps ...predicate.Attachment)

Where appends a list predicates to the AttachmentMutation builder.

type AttachmentQuery

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

AttachmentQuery is the builder for querying Attachment entities.

func (*AttachmentQuery) All

func (aq *AttachmentQuery) All(ctx context.Context) ([]*Attachment, error)

All executes the query and returns a list of Attachments.

func (*AttachmentQuery) AllX

func (aq *AttachmentQuery) AllX(ctx context.Context) []*Attachment

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

func (*AttachmentQuery) Clone

func (aq *AttachmentQuery) Clone() *AttachmentQuery

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

func (*AttachmentQuery) Count

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

Count returns the count of the given query.

func (*AttachmentQuery) CountX

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

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

func (*AttachmentQuery) Exist

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

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

func (*AttachmentQuery) ExistX

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

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

func (*AttachmentQuery) First

func (aq *AttachmentQuery) First(ctx context.Context) (*Attachment, error)

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

func (*AttachmentQuery) FirstID

func (aq *AttachmentQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*AttachmentQuery) FirstIDX

func (aq *AttachmentQuery) FirstIDX(ctx context.Context) int

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

func (*AttachmentQuery) FirstX

func (aq *AttachmentQuery) FirstX(ctx context.Context) *Attachment

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

func (*AttachmentQuery) GroupBy

func (aq *AttachmentQuery) GroupBy(field string, fields ...string) *AttachmentGroupBy

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 {
	ApplicationID uuid.UUID `json:"application_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Attachment.Query().
	GroupBy(attachment.FieldApplicationID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AttachmentQuery) IDs

func (aq *AttachmentQuery) IDs(ctx context.Context) ([]int, error)

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

func (*AttachmentQuery) IDsX

func (aq *AttachmentQuery) IDsX(ctx context.Context) []int

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

func (*AttachmentQuery) Limit

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

Limit adds a limit step to the query.

func (*AttachmentQuery) Offset

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

Offset adds an offset step to the query.

func (*AttachmentQuery) Only

func (aq *AttachmentQuery) Only(ctx context.Context) (*Attachment, error)

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

func (*AttachmentQuery) OnlyID

func (aq *AttachmentQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*AttachmentQuery) OnlyIDX

func (aq *AttachmentQuery) OnlyIDX(ctx context.Context) int

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

func (*AttachmentQuery) OnlyX

func (aq *AttachmentQuery) OnlyX(ctx context.Context) *Attachment

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

func (*AttachmentQuery) Order

func (aq *AttachmentQuery) Order(o ...OrderFunc) *AttachmentQuery

Order adds an order step to the query.

func (*AttachmentQuery) QueryApplications

func (aq *AttachmentQuery) QueryApplications() *ApplicationQuery

QueryApplications chains the current query on the "applications" edge.

func (*AttachmentQuery) QueryTickets

func (aq *AttachmentQuery) QueryTickets() *TicketQuery

QueryTickets chains the current query on the "tickets" edge.

func (*AttachmentQuery) Select

func (aq *AttachmentQuery) Select(fields ...string) *AttachmentSelect

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 {
	ApplicationID uuid.UUID `json:"application_id,omitempty"`
}

client.Attachment.Query().
	Select(attachment.FieldApplicationID).
	Scan(ctx, &v)

func (*AttachmentQuery) Unique

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

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

Where adds a new predicate for the AttachmentQuery builder.

func (*AttachmentQuery) WithApplications

func (aq *AttachmentQuery) WithApplications(opts ...func(*ApplicationQuery)) *AttachmentQuery

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

func (*AttachmentQuery) WithTickets

func (aq *AttachmentQuery) WithTickets(opts ...func(*TicketQuery)) *AttachmentQuery

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

type AttachmentSelect

type AttachmentSelect struct {
	*AttachmentQuery
	// contains filtered or unexported fields
}

AttachmentSelect is the builder for selecting fields of Attachment entities.

func (*AttachmentSelect) Bool

func (as *AttachmentSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*AttachmentSelect) BoolX

func (as *AttachmentSelect) BoolX(ctx context.Context) bool

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

func (*AttachmentSelect) Bools

func (as *AttachmentSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*AttachmentSelect) BoolsX

func (as *AttachmentSelect) BoolsX(ctx context.Context) []bool

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

func (*AttachmentSelect) Float64

func (as *AttachmentSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*AttachmentSelect) Float64X

func (as *AttachmentSelect) Float64X(ctx context.Context) float64

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

func (*AttachmentSelect) Float64s

func (as *AttachmentSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*AttachmentSelect) Float64sX

func (as *AttachmentSelect) Float64sX(ctx context.Context) []float64

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

func (*AttachmentSelect) Int

func (as *AttachmentSelect) Int(ctx context.Context) (_ int, err error)

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

func (*AttachmentSelect) IntX

func (as *AttachmentSelect) IntX(ctx context.Context) int

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

func (*AttachmentSelect) Ints

func (as *AttachmentSelect) Ints(ctx context.Context) ([]int, error)

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

func (*AttachmentSelect) IntsX

func (as *AttachmentSelect) IntsX(ctx context.Context) []int

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

func (*AttachmentSelect) Scan

func (as *AttachmentSelect) Scan(ctx context.Context, v interface{}) error

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

func (*AttachmentSelect) ScanX

func (as *AttachmentSelect) ScanX(ctx context.Context, v interface{})

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

func (*AttachmentSelect) String

func (as *AttachmentSelect) String(ctx context.Context) (_ string, err error)

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

func (*AttachmentSelect) StringX

func (as *AttachmentSelect) StringX(ctx context.Context) string

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

func (*AttachmentSelect) Strings

func (as *AttachmentSelect) Strings(ctx context.Context) ([]string, error)

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

func (*AttachmentSelect) StringsX

func (as *AttachmentSelect) StringsX(ctx context.Context) []string

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

type AttachmentUpdate

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

AttachmentUpdate is the builder for updating Attachment entities.

func (*AttachmentUpdate) ClearApplications

func (au *AttachmentUpdate) ClearApplications() *AttachmentUpdate

ClearApplications clears the "applications" edge to the Application entity.

func (*AttachmentUpdate) ClearTicketID

func (au *AttachmentUpdate) ClearTicketID() *AttachmentUpdate

ClearTicketID clears the value of the "ticket_id" field.

func (*AttachmentUpdate) ClearTickets

func (au *AttachmentUpdate) ClearTickets() *AttachmentUpdate

ClearTickets clears the "tickets" edge to the Ticket entity.

func (*AttachmentUpdate) Exec

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

Exec executes the query.

func (*AttachmentUpdate) ExecX

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

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

func (*AttachmentUpdate) Mutation

func (au *AttachmentUpdate) Mutation() *AttachmentMutation

Mutation returns the AttachmentMutation object of the builder.

func (*AttachmentUpdate) Save

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

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

func (*AttachmentUpdate) SaveX

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

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

func (*AttachmentUpdate) SetApplicationID

func (au *AttachmentUpdate) SetApplicationID(u uuid.UUID) *AttachmentUpdate

SetApplicationID sets the "application_id" field.

func (*AttachmentUpdate) SetApplications

func (au *AttachmentUpdate) SetApplications(a *Application) *AttachmentUpdate

SetApplications sets the "applications" edge to the Application entity.

func (*AttachmentUpdate) SetApplicationsID

func (au *AttachmentUpdate) SetApplicationsID(id uuid.UUID) *AttachmentUpdate

SetApplicationsID sets the "applications" edge to the Application entity by ID.

func (*AttachmentUpdate) SetAttachmentType

func (au *AttachmentUpdate) SetAttachmentType(at attachment.AttachmentType) *AttachmentUpdate

SetAttachmentType sets the "attachment_type" field.

func (*AttachmentUpdate) SetNillableTicketID

func (au *AttachmentUpdate) SetNillableTicketID(i *int) *AttachmentUpdate

SetNillableTicketID sets the "ticket_id" field if the given value is not nil.

func (*AttachmentUpdate) SetNillableTicketsID

func (au *AttachmentUpdate) SetNillableTicketsID(id *int) *AttachmentUpdate

SetNillableTicketsID sets the "tickets" edge to the Ticket entity by ID if the given value is not nil.

func (*AttachmentUpdate) SetObsHash

func (au *AttachmentUpdate) SetObsHash(s string) *AttachmentUpdate

SetObsHash sets the "obs_hash" field.

func (*AttachmentUpdate) SetObsOid

func (au *AttachmentUpdate) SetObsOid(s string) *AttachmentUpdate

SetObsOid sets the "obs_oid" field.

func (*AttachmentUpdate) SetTicketID

func (au *AttachmentUpdate) SetTicketID(i int) *AttachmentUpdate

SetTicketID sets the "ticket_id" field.

func (*AttachmentUpdate) SetTickets

func (au *AttachmentUpdate) SetTickets(t *Ticket) *AttachmentUpdate

SetTickets sets the "tickets" edge to the Ticket entity.

func (*AttachmentUpdate) SetTicketsID

func (au *AttachmentUpdate) SetTicketsID(id int) *AttachmentUpdate

SetTicketsID sets the "tickets" edge to the Ticket entity by ID.

func (*AttachmentUpdate) Where

Where appends a list predicates to the AttachmentUpdate builder.

type AttachmentUpdateOne

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

AttachmentUpdateOne is the builder for updating a single Attachment entity.

func (*AttachmentUpdateOne) ClearApplications

func (auo *AttachmentUpdateOne) ClearApplications() *AttachmentUpdateOne

ClearApplications clears the "applications" edge to the Application entity.

func (*AttachmentUpdateOne) ClearTicketID

func (auo *AttachmentUpdateOne) ClearTicketID() *AttachmentUpdateOne

ClearTicketID clears the value of the "ticket_id" field.

func (*AttachmentUpdateOne) ClearTickets

func (auo *AttachmentUpdateOne) ClearTickets() *AttachmentUpdateOne

ClearTickets clears the "tickets" edge to the Ticket entity.

func (*AttachmentUpdateOne) Exec

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

Exec executes the query on the entity.

func (*AttachmentUpdateOne) ExecX

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

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

func (*AttachmentUpdateOne) Mutation

func (auo *AttachmentUpdateOne) Mutation() *AttachmentMutation

Mutation returns the AttachmentMutation object of the builder.

func (*AttachmentUpdateOne) Save

func (auo *AttachmentUpdateOne) Save(ctx context.Context) (*Attachment, error)

Save executes the query and returns the updated Attachment entity.

func (*AttachmentUpdateOne) SaveX

func (auo *AttachmentUpdateOne) SaveX(ctx context.Context) *Attachment

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

func (*AttachmentUpdateOne) Select

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

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

func (*AttachmentUpdateOne) SetApplicationID

func (auo *AttachmentUpdateOne) SetApplicationID(u uuid.UUID) *AttachmentUpdateOne

SetApplicationID sets the "application_id" field.

func (*AttachmentUpdateOne) SetApplications

func (auo *AttachmentUpdateOne) SetApplications(a *Application) *AttachmentUpdateOne

SetApplications sets the "applications" edge to the Application entity.

func (*AttachmentUpdateOne) SetApplicationsID

func (auo *AttachmentUpdateOne) SetApplicationsID(id uuid.UUID) *AttachmentUpdateOne

SetApplicationsID sets the "applications" edge to the Application entity by ID.

func (*AttachmentUpdateOne) SetAttachmentType

SetAttachmentType sets the "attachment_type" field.

func (*AttachmentUpdateOne) SetNillableTicketID

func (auo *AttachmentUpdateOne) SetNillableTicketID(i *int) *AttachmentUpdateOne

SetNillableTicketID sets the "ticket_id" field if the given value is not nil.

func (*AttachmentUpdateOne) SetNillableTicketsID

func (auo *AttachmentUpdateOne) SetNillableTicketsID(id *int) *AttachmentUpdateOne

SetNillableTicketsID sets the "tickets" edge to the Ticket entity by ID if the given value is not nil.

func (*AttachmentUpdateOne) SetObsHash

func (auo *AttachmentUpdateOne) SetObsHash(s string) *AttachmentUpdateOne

SetObsHash sets the "obs_hash" field.

func (*AttachmentUpdateOne) SetObsOid

func (auo *AttachmentUpdateOne) SetObsOid(s string) *AttachmentUpdateOne

SetObsOid sets the "obs_oid" field.

func (*AttachmentUpdateOne) SetTicketID

func (auo *AttachmentUpdateOne) SetTicketID(i int) *AttachmentUpdateOne

SetTicketID sets the "ticket_id" field.

func (*AttachmentUpdateOne) SetTickets

func (auo *AttachmentUpdateOne) SetTickets(t *Ticket) *AttachmentUpdateOne

SetTickets sets the "tickets" edge to the Ticket entity.

func (*AttachmentUpdateOne) SetTicketsID

func (auo *AttachmentUpdateOne) SetTicketsID(id int) *AttachmentUpdateOne

SetTicketsID sets the "tickets" edge to the Ticket entity by ID.

type Attachments

type Attachments []*Attachment

Attachments is a parsable slice of Attachment.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// Application is the client for interacting with the Application builders.
	Application *ApplicationClient
	// ApplicationAssignmentHistory is the client for interacting with the ApplicationAssignmentHistory builders.
	ApplicationAssignmentHistory *ApplicationAssignmentHistoryClient
	// ApplicationStatusHistory is the client for interacting with the ApplicationStatusHistory builders.
	ApplicationStatusHistory *ApplicationStatusHistoryClient
	// Attachment is the client for interacting with the Attachment builders.
	Attachment *AttachmentClient
	// Reviewer is the client for interacting with the Reviewer builders.
	Reviewer *ReviewerClient
	// Ticket is the client for interacting with the Ticket builders.
	Ticket *TicketClient
	// 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().
	Application.
	Query().
	Count(ctx)

func (*Client) Tx

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

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

func (*Client) Use

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

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

type CommitFunc

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

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

func (CommitFunc) Commit

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

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

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

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(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 Hook

type Hook = ent.Hook

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

type MutateFunc

type MutateFunc = ent.MutateFunc

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

type Mutation

type Mutation = ent.Mutation

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

type Mutator

type Mutator = ent.Mutator

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

type NotFoundError

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

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type Op

type Op = ent.Op

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

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...interface{})) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type Policy

type Policy = ent.Policy

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

type Query

type Query = ent.Query

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

type Reviewer

type Reviewer struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// ReviewerID holds the value of the "reviewer_id" field.
	ReviewerID string `json:"reviewer_id,omitempty"`
	// ReviewerName holds the value of the "reviewer_name" field.
	ReviewerName string `json:"reviewer_name,omitempty"`
	// IimsRole holds the value of the "iims_role" field.
	IimsRole reviewer.IimsRole `json:"iims_role,omitempty"`
	// CreatedDtime holds the value of the "created_dtime" field.
	CreatedDtime time.Time `json:"created_dtime,omitempty"`
	// contains filtered or unexported fields
}

Reviewer is the model entity for the Reviewer schema.

func (*Reviewer) String

func (r *Reviewer) String() string

String implements the fmt.Stringer.

func (*Reviewer) Unwrap

func (r *Reviewer) Unwrap() *Reviewer

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

func (r *Reviewer) Update() *ReviewerUpdateOne

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

type ReviewerClient

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

ReviewerClient is a client for the Reviewer schema.

func NewReviewerClient

func NewReviewerClient(c config) *ReviewerClient

NewReviewerClient returns a client for the Reviewer from the given config.

func (*ReviewerClient) Create

func (c *ReviewerClient) Create() *ReviewerCreate

Create returns a create builder for Reviewer.

func (*ReviewerClient) CreateBulk

func (c *ReviewerClient) CreateBulk(builders ...*ReviewerCreate) *ReviewerCreateBulk

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

func (*ReviewerClient) Delete

func (c *ReviewerClient) Delete() *ReviewerDelete

Delete returns a delete builder for Reviewer.

func (*ReviewerClient) DeleteOne

func (c *ReviewerClient) DeleteOne(r *Reviewer) *ReviewerDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ReviewerClient) DeleteOneID

func (c *ReviewerClient) DeleteOneID(id int) *ReviewerDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*ReviewerClient) Get

func (c *ReviewerClient) Get(ctx context.Context, id int) (*Reviewer, error)

Get returns a Reviewer entity by its id.

func (*ReviewerClient) GetX

func (c *ReviewerClient) GetX(ctx context.Context, id int) *Reviewer

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

func (*ReviewerClient) Hooks

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

Hooks returns the client hooks.

func (*ReviewerClient) Query

func (c *ReviewerClient) Query() *ReviewerQuery

Query returns a query builder for Reviewer.

func (*ReviewerClient) Update

func (c *ReviewerClient) Update() *ReviewerUpdate

Update returns an update builder for Reviewer.

func (*ReviewerClient) UpdateOne

func (c *ReviewerClient) UpdateOne(r *Reviewer) *ReviewerUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ReviewerClient) UpdateOneID

func (c *ReviewerClient) UpdateOneID(id int) *ReviewerUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ReviewerClient) Use

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

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

type ReviewerCreate

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

ReviewerCreate is the builder for creating a Reviewer entity.

func (*ReviewerCreate) Exec

func (rc *ReviewerCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ReviewerCreate) ExecX

func (rc *ReviewerCreate) ExecX(ctx context.Context)

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

func (*ReviewerCreate) Mutation

func (rc *ReviewerCreate) Mutation() *ReviewerMutation

Mutation returns the ReviewerMutation object of the builder.

func (*ReviewerCreate) Save

func (rc *ReviewerCreate) Save(ctx context.Context) (*Reviewer, error)

Save creates the Reviewer in the database.

func (*ReviewerCreate) SaveX

func (rc *ReviewerCreate) SaveX(ctx context.Context) *Reviewer

SaveX calls Save and panics if Save returns an error.

func (*ReviewerCreate) SetCreatedDtime

func (rc *ReviewerCreate) SetCreatedDtime(t time.Time) *ReviewerCreate

SetCreatedDtime sets the "created_dtime" field.

func (*ReviewerCreate) SetIimsRole

func (rc *ReviewerCreate) SetIimsRole(rr reviewer.IimsRole) *ReviewerCreate

SetIimsRole sets the "iims_role" field.

func (*ReviewerCreate) SetNillableCreatedDtime

func (rc *ReviewerCreate) SetNillableCreatedDtime(t *time.Time) *ReviewerCreate

SetNillableCreatedDtime sets the "created_dtime" field if the given value is not nil.

func (*ReviewerCreate) SetReviewerID

func (rc *ReviewerCreate) SetReviewerID(s string) *ReviewerCreate

SetReviewerID sets the "reviewer_id" field.

func (*ReviewerCreate) SetReviewerName

func (rc *ReviewerCreate) SetReviewerName(s string) *ReviewerCreate

SetReviewerName sets the "reviewer_name" field.

type ReviewerCreateBulk

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

ReviewerCreateBulk is the builder for creating many Reviewer entities in bulk.

func (*ReviewerCreateBulk) Exec

func (rcb *ReviewerCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ReviewerCreateBulk) ExecX

func (rcb *ReviewerCreateBulk) ExecX(ctx context.Context)

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

func (*ReviewerCreateBulk) Save

func (rcb *ReviewerCreateBulk) Save(ctx context.Context) ([]*Reviewer, error)

Save creates the Reviewer entities in the database.

func (*ReviewerCreateBulk) SaveX

func (rcb *ReviewerCreateBulk) SaveX(ctx context.Context) []*Reviewer

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

type ReviewerDelete

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

ReviewerDelete is the builder for deleting a Reviewer entity.

func (*ReviewerDelete) Exec

func (rd *ReviewerDelete) Exec(ctx context.Context) (int, error)

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

func (*ReviewerDelete) ExecX

func (rd *ReviewerDelete) ExecX(ctx context.Context) int

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

func (*ReviewerDelete) Where

func (rd *ReviewerDelete) Where(ps ...predicate.Reviewer) *ReviewerDelete

Where appends a list predicates to the ReviewerDelete builder.

type ReviewerDeleteOne

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

ReviewerDeleteOne is the builder for deleting a single Reviewer entity.

func (*ReviewerDeleteOne) Exec

func (rdo *ReviewerDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ReviewerDeleteOne) ExecX

func (rdo *ReviewerDeleteOne) ExecX(ctx context.Context)

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

type ReviewerGroupBy

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

ReviewerGroupBy is the group-by builder for Reviewer entities.

func (*ReviewerGroupBy) Aggregate

func (rgb *ReviewerGroupBy) Aggregate(fns ...AggregateFunc) *ReviewerGroupBy

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

func (*ReviewerGroupBy) Bool

func (rgb *ReviewerGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*ReviewerGroupBy) BoolX

func (rgb *ReviewerGroupBy) BoolX(ctx context.Context) bool

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

func (*ReviewerGroupBy) Bools

func (rgb *ReviewerGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*ReviewerGroupBy) BoolsX

func (rgb *ReviewerGroupBy) BoolsX(ctx context.Context) []bool

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

func (*ReviewerGroupBy) Float64

func (rgb *ReviewerGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*ReviewerGroupBy) Float64X

func (rgb *ReviewerGroupBy) Float64X(ctx context.Context) float64

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

func (*ReviewerGroupBy) Float64s

func (rgb *ReviewerGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*ReviewerGroupBy) Float64sX

func (rgb *ReviewerGroupBy) Float64sX(ctx context.Context) []float64

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

func (*ReviewerGroupBy) Int

func (rgb *ReviewerGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*ReviewerGroupBy) IntX

func (rgb *ReviewerGroupBy) IntX(ctx context.Context) int

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

func (*ReviewerGroupBy) Ints

func (rgb *ReviewerGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*ReviewerGroupBy) IntsX

func (rgb *ReviewerGroupBy) IntsX(ctx context.Context) []int

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

func (*ReviewerGroupBy) Scan

func (rgb *ReviewerGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*ReviewerGroupBy) ScanX

func (rgb *ReviewerGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ReviewerGroupBy) String

func (rgb *ReviewerGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*ReviewerGroupBy) StringX

func (rgb *ReviewerGroupBy) StringX(ctx context.Context) string

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

func (*ReviewerGroupBy) Strings

func (rgb *ReviewerGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*ReviewerGroupBy) StringsX

func (rgb *ReviewerGroupBy) StringsX(ctx context.Context) []string

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

type ReviewerMutation

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

ReviewerMutation represents an operation that mutates the Reviewer nodes in the graph.

func (*ReviewerMutation) AddField

func (m *ReviewerMutation) 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 (*ReviewerMutation) AddedEdges

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

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

func (*ReviewerMutation) AddedField

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

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

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

func (*ReviewerMutation) AddedIDs

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

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

func (*ReviewerMutation) ClearEdge

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

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

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

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

func (*ReviewerMutation) ClearedFields

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

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

func (ReviewerMutation) Client

func (m ReviewerMutation) 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 (*ReviewerMutation) CreatedDtime

func (m *ReviewerMutation) CreatedDtime() (r time.Time, exists bool)

CreatedDtime returns the value of the "created_dtime" field in the mutation.

func (*ReviewerMutation) EdgeCleared

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

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

func (*ReviewerMutation) Field

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

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

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

func (*ReviewerMutation) Fields

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

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

func (m *ReviewerMutation) 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 (*ReviewerMutation) IimsRole

func (m *ReviewerMutation) IimsRole() (r reviewer.IimsRole, exists bool)

IimsRole returns the value of the "iims_role" field in the mutation.

func (*ReviewerMutation) OldCreatedDtime

func (m *ReviewerMutation) OldCreatedDtime(ctx context.Context) (v time.Time, err error)

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

func (*ReviewerMutation) OldField

func (m *ReviewerMutation) 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 (*ReviewerMutation) OldIimsRole

func (m *ReviewerMutation) OldIimsRole(ctx context.Context) (v reviewer.IimsRole, err error)

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

func (*ReviewerMutation) OldReviewerID

func (m *ReviewerMutation) OldReviewerID(ctx context.Context) (v string, err error)

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

func (*ReviewerMutation) OldReviewerName

func (m *ReviewerMutation) OldReviewerName(ctx context.Context) (v string, err error)

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

func (*ReviewerMutation) Op

func (m *ReviewerMutation) Op() Op

Op returns the operation name.

func (*ReviewerMutation) RemovedEdges

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

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

func (*ReviewerMutation) RemovedIDs

func (m *ReviewerMutation) 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 (*ReviewerMutation) ResetCreatedDtime

func (m *ReviewerMutation) ResetCreatedDtime()

ResetCreatedDtime resets all changes to the "created_dtime" field.

func (*ReviewerMutation) ResetEdge

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

func (m *ReviewerMutation) 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 (*ReviewerMutation) ResetIimsRole

func (m *ReviewerMutation) ResetIimsRole()

ResetIimsRole resets all changes to the "iims_role" field.

func (*ReviewerMutation) ResetReviewerID

func (m *ReviewerMutation) ResetReviewerID()

ResetReviewerID resets all changes to the "reviewer_id" field.

func (*ReviewerMutation) ResetReviewerName

func (m *ReviewerMutation) ResetReviewerName()

ResetReviewerName resets all changes to the "reviewer_name" field.

func (*ReviewerMutation) ReviewerID

func (m *ReviewerMutation) ReviewerID() (r string, exists bool)

ReviewerID returns the value of the "reviewer_id" field in the mutation.

func (*ReviewerMutation) ReviewerName

func (m *ReviewerMutation) ReviewerName() (r string, exists bool)

ReviewerName returns the value of the "reviewer_name" field in the mutation.

func (*ReviewerMutation) SetCreatedDtime

func (m *ReviewerMutation) SetCreatedDtime(t time.Time)

SetCreatedDtime sets the "created_dtime" field.

func (*ReviewerMutation) SetField

func (m *ReviewerMutation) 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 (*ReviewerMutation) SetIimsRole

func (m *ReviewerMutation) SetIimsRole(rr reviewer.IimsRole)

SetIimsRole sets the "iims_role" field.

func (*ReviewerMutation) SetReviewerID

func (m *ReviewerMutation) SetReviewerID(s string)

SetReviewerID sets the "reviewer_id" field.

func (*ReviewerMutation) SetReviewerName

func (m *ReviewerMutation) SetReviewerName(s string)

SetReviewerName sets the "reviewer_name" field.

func (ReviewerMutation) Tx

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

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

func (*ReviewerMutation) Type

func (m *ReviewerMutation) Type() string

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

func (*ReviewerMutation) Where

func (m *ReviewerMutation) Where(ps ...predicate.Reviewer)

Where appends a list predicates to the ReviewerMutation builder.

type ReviewerQuery

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

ReviewerQuery is the builder for querying Reviewer entities.

func (*ReviewerQuery) All

func (rq *ReviewerQuery) All(ctx context.Context) ([]*Reviewer, error)

All executes the query and returns a list of Reviewers.

func (*ReviewerQuery) AllX

func (rq *ReviewerQuery) AllX(ctx context.Context) []*Reviewer

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

func (*ReviewerQuery) Clone

func (rq *ReviewerQuery) Clone() *ReviewerQuery

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

func (*ReviewerQuery) Count

func (rq *ReviewerQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ReviewerQuery) CountX

func (rq *ReviewerQuery) CountX(ctx context.Context) int

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

func (*ReviewerQuery) Exist

func (rq *ReviewerQuery) Exist(ctx context.Context) (bool, error)

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

func (*ReviewerQuery) ExistX

func (rq *ReviewerQuery) ExistX(ctx context.Context) bool

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

func (*ReviewerQuery) First

func (rq *ReviewerQuery) First(ctx context.Context) (*Reviewer, error)

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

func (*ReviewerQuery) FirstID

func (rq *ReviewerQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*ReviewerQuery) FirstIDX

func (rq *ReviewerQuery) FirstIDX(ctx context.Context) int

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

func (*ReviewerQuery) FirstX

func (rq *ReviewerQuery) FirstX(ctx context.Context) *Reviewer

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

func (*ReviewerQuery) GroupBy

func (rq *ReviewerQuery) GroupBy(field string, fields ...string) *ReviewerGroupBy

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 {
	ReviewerID string `json:"reviewer_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Reviewer.Query().
	GroupBy(reviewer.FieldReviewerID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ReviewerQuery) IDs

func (rq *ReviewerQuery) IDs(ctx context.Context) ([]int, error)

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

func (*ReviewerQuery) IDsX

func (rq *ReviewerQuery) IDsX(ctx context.Context) []int

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

func (*ReviewerQuery) Limit

func (rq *ReviewerQuery) Limit(limit int) *ReviewerQuery

Limit adds a limit step to the query.

func (*ReviewerQuery) Offset

func (rq *ReviewerQuery) Offset(offset int) *ReviewerQuery

Offset adds an offset step to the query.

func (*ReviewerQuery) Only

func (rq *ReviewerQuery) Only(ctx context.Context) (*Reviewer, error)

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

func (*ReviewerQuery) OnlyID

func (rq *ReviewerQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*ReviewerQuery) OnlyIDX

func (rq *ReviewerQuery) OnlyIDX(ctx context.Context) int

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

func (*ReviewerQuery) OnlyX

func (rq *ReviewerQuery) OnlyX(ctx context.Context) *Reviewer

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

func (*ReviewerQuery) Order

func (rq *ReviewerQuery) Order(o ...OrderFunc) *ReviewerQuery

Order adds an order step to the query.

func (*ReviewerQuery) Select

func (rq *ReviewerQuery) Select(fields ...string) *ReviewerSelect

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 {
	ReviewerID string `json:"reviewer_id,omitempty"`
}

client.Reviewer.Query().
	Select(reviewer.FieldReviewerID).
	Scan(ctx, &v)

func (*ReviewerQuery) Unique

func (rq *ReviewerQuery) Unique(unique bool) *ReviewerQuery

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

func (rq *ReviewerQuery) Where(ps ...predicate.Reviewer) *ReviewerQuery

Where adds a new predicate for the ReviewerQuery builder.

type ReviewerSelect

type ReviewerSelect struct {
	*ReviewerQuery
	// contains filtered or unexported fields
}

ReviewerSelect is the builder for selecting fields of Reviewer entities.

func (*ReviewerSelect) Bool

func (rs *ReviewerSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*ReviewerSelect) BoolX

func (rs *ReviewerSelect) BoolX(ctx context.Context) bool

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

func (*ReviewerSelect) Bools

func (rs *ReviewerSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*ReviewerSelect) BoolsX

func (rs *ReviewerSelect) BoolsX(ctx context.Context) []bool

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

func (*ReviewerSelect) Float64

func (rs *ReviewerSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*ReviewerSelect) Float64X

func (rs *ReviewerSelect) Float64X(ctx context.Context) float64

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

func (*ReviewerSelect) Float64s

func (rs *ReviewerSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*ReviewerSelect) Float64sX

func (rs *ReviewerSelect) Float64sX(ctx context.Context) []float64

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

func (*ReviewerSelect) Int

func (rs *ReviewerSelect) Int(ctx context.Context) (_ int, err error)

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

func (*ReviewerSelect) IntX

func (rs *ReviewerSelect) IntX(ctx context.Context) int

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

func (*ReviewerSelect) Ints

func (rs *ReviewerSelect) Ints(ctx context.Context) ([]int, error)

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

func (*ReviewerSelect) IntsX

func (rs *ReviewerSelect) IntsX(ctx context.Context) []int

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

func (*ReviewerSelect) Scan

func (rs *ReviewerSelect) Scan(ctx context.Context, v interface{}) error

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

func (*ReviewerSelect) ScanX

func (rs *ReviewerSelect) ScanX(ctx context.Context, v interface{})

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

func (*ReviewerSelect) String

func (rs *ReviewerSelect) String(ctx context.Context) (_ string, err error)

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

func (*ReviewerSelect) StringX

func (rs *ReviewerSelect) StringX(ctx context.Context) string

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

func (*ReviewerSelect) Strings

func (rs *ReviewerSelect) Strings(ctx context.Context) ([]string, error)

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

func (*ReviewerSelect) StringsX

func (rs *ReviewerSelect) StringsX(ctx context.Context) []string

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

type ReviewerUpdate

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

ReviewerUpdate is the builder for updating Reviewer entities.

func (*ReviewerUpdate) Exec

func (ru *ReviewerUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ReviewerUpdate) ExecX

func (ru *ReviewerUpdate) ExecX(ctx context.Context)

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

func (*ReviewerUpdate) Mutation

func (ru *ReviewerUpdate) Mutation() *ReviewerMutation

Mutation returns the ReviewerMutation object of the builder.

func (*ReviewerUpdate) Save

func (ru *ReviewerUpdate) Save(ctx context.Context) (int, error)

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

func (*ReviewerUpdate) SaveX

func (ru *ReviewerUpdate) SaveX(ctx context.Context) int

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

func (*ReviewerUpdate) SetIimsRole

func (ru *ReviewerUpdate) SetIimsRole(rr reviewer.IimsRole) *ReviewerUpdate

SetIimsRole sets the "iims_role" field.

func (*ReviewerUpdate) SetReviewerID

func (ru *ReviewerUpdate) SetReviewerID(s string) *ReviewerUpdate

SetReviewerID sets the "reviewer_id" field.

func (*ReviewerUpdate) SetReviewerName

func (ru *ReviewerUpdate) SetReviewerName(s string) *ReviewerUpdate

SetReviewerName sets the "reviewer_name" field.

func (*ReviewerUpdate) Where

func (ru *ReviewerUpdate) Where(ps ...predicate.Reviewer) *ReviewerUpdate

Where appends a list predicates to the ReviewerUpdate builder.

type ReviewerUpdateOne

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

ReviewerUpdateOne is the builder for updating a single Reviewer entity.

func (*ReviewerUpdateOne) Exec

func (ruo *ReviewerUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ReviewerUpdateOne) ExecX

func (ruo *ReviewerUpdateOne) ExecX(ctx context.Context)

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

func (*ReviewerUpdateOne) Mutation

func (ruo *ReviewerUpdateOne) Mutation() *ReviewerMutation

Mutation returns the ReviewerMutation object of the builder.

func (*ReviewerUpdateOne) Save

func (ruo *ReviewerUpdateOne) Save(ctx context.Context) (*Reviewer, error)

Save executes the query and returns the updated Reviewer entity.

func (*ReviewerUpdateOne) SaveX

func (ruo *ReviewerUpdateOne) SaveX(ctx context.Context) *Reviewer

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

func (*ReviewerUpdateOne) Select

func (ruo *ReviewerUpdateOne) Select(field string, fields ...string) *ReviewerUpdateOne

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

func (*ReviewerUpdateOne) SetIimsRole

func (ruo *ReviewerUpdateOne) SetIimsRole(rr reviewer.IimsRole) *ReviewerUpdateOne

SetIimsRole sets the "iims_role" field.

func (*ReviewerUpdateOne) SetReviewerID

func (ruo *ReviewerUpdateOne) SetReviewerID(s string) *ReviewerUpdateOne

SetReviewerID sets the "reviewer_id" field.

func (*ReviewerUpdateOne) SetReviewerName

func (ruo *ReviewerUpdateOne) SetReviewerName(s string) *ReviewerUpdateOne

SetReviewerName sets the "reviewer_name" field.

type Reviewers

type Reviewers []*Reviewer

Reviewers is a parsable slice of Reviewer.

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 Ticket

type Ticket struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// ApplicationID holds the value of the "application_id" field.
	ApplicationID uuid.UUID `json:"application_id,omitempty"`
	// Status holds the value of the "status" field.
	Status ticket.Status `json:"status,omitempty"`
	// Creator holds the value of the "creator" field.
	Creator string `json:"creator,omitempty"`
	// Content holds the value of the "content" field.
	Content string `json:"content,omitempty"`
	// Reply holds the value of the "reply" field.
	Reply string `json:"reply,omitempty"`
	// Replier holds the value of the "replier" field.
	Replier string `json:"replier,omitempty"`
	// Reviewer holds the value of the "reviewer" field.
	Reviewer string `json:"reviewer,omitempty"`
	// ReviewRemark holds the value of the "review_remark" field.
	ReviewRemark string `json:"review_remark,omitempty"`
	// RepliedDtime holds the value of the "replied_dtime" field.
	RepliedDtime time.Time `json:"replied_dtime,omitempty"`
	// ReviewedDtime holds the value of the "reviewed_dtime" field.
	ReviewedDtime time.Time `json:"reviewed_dtime,omitempty"`
	// CreatedDtime holds the value of the "created_dtime" field.
	CreatedDtime time.Time `json:"created_dtime,omitempty"`
	// UpdatedDtime holds the value of the "updated_dtime" field.
	UpdatedDtime time.Time `json:"updated_dtime,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the TicketQuery when eager-loading is set.
	Edges TicketEdges `json:"edges"`
	// contains filtered or unexported fields
}

Ticket is the model entity for the Ticket schema.

func (*Ticket) QueryApplications

func (t *Ticket) QueryApplications() *ApplicationQuery

QueryApplications queries the "applications" edge of the Ticket entity.

func (*Ticket) QueryAttachments

func (t *Ticket) QueryAttachments() *AttachmentQuery

QueryAttachments queries the "attachments" edge of the Ticket entity.

func (*Ticket) String

func (t *Ticket) String() string

String implements the fmt.Stringer.

func (*Ticket) Unwrap

func (t *Ticket) Unwrap() *Ticket

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

func (t *Ticket) Update() *TicketUpdateOne

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

type TicketClient

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

TicketClient is a client for the Ticket schema.

func NewTicketClient

func NewTicketClient(c config) *TicketClient

NewTicketClient returns a client for the Ticket from the given config.

func (*TicketClient) Create

func (c *TicketClient) Create() *TicketCreate

Create returns a create builder for Ticket.

func (*TicketClient) CreateBulk

func (c *TicketClient) CreateBulk(builders ...*TicketCreate) *TicketCreateBulk

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

func (*TicketClient) Delete

func (c *TicketClient) Delete() *TicketDelete

Delete returns a delete builder for Ticket.

func (*TicketClient) DeleteOne

func (c *TicketClient) DeleteOne(t *Ticket) *TicketDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*TicketClient) DeleteOneID

func (c *TicketClient) DeleteOneID(id int) *TicketDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*TicketClient) Get

func (c *TicketClient) Get(ctx context.Context, id int) (*Ticket, error)

Get returns a Ticket entity by its id.

func (*TicketClient) GetX

func (c *TicketClient) GetX(ctx context.Context, id int) *Ticket

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

func (*TicketClient) Hooks

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

Hooks returns the client hooks.

func (*TicketClient) Query

func (c *TicketClient) Query() *TicketQuery

Query returns a query builder for Ticket.

func (*TicketClient) QueryApplications

func (c *TicketClient) QueryApplications(t *Ticket) *ApplicationQuery

QueryApplications queries the applications edge of a Ticket.

func (*TicketClient) QueryAttachments

func (c *TicketClient) QueryAttachments(t *Ticket) *AttachmentQuery

QueryAttachments queries the attachments edge of a Ticket.

func (*TicketClient) Update

func (c *TicketClient) Update() *TicketUpdate

Update returns an update builder for Ticket.

func (*TicketClient) UpdateOne

func (c *TicketClient) UpdateOne(t *Ticket) *TicketUpdateOne

UpdateOne returns an update builder for the given entity.

func (*TicketClient) UpdateOneID

func (c *TicketClient) UpdateOneID(id int) *TicketUpdateOne

UpdateOneID returns an update builder for the given id.

func (*TicketClient) Use

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

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

type TicketCreate

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

TicketCreate is the builder for creating a Ticket entity.

func (*TicketCreate) AddAttachmentIDs

func (tc *TicketCreate) AddAttachmentIDs(ids ...int) *TicketCreate

AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.

func (*TicketCreate) AddAttachments

func (tc *TicketCreate) AddAttachments(a ...*Attachment) *TicketCreate

AddAttachments adds the "attachments" edges to the Attachment entity.

func (*TicketCreate) Exec

func (tc *TicketCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*TicketCreate) ExecX

func (tc *TicketCreate) ExecX(ctx context.Context)

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

func (*TicketCreate) Mutation

func (tc *TicketCreate) Mutation() *TicketMutation

Mutation returns the TicketMutation object of the builder.

func (*TicketCreate) Save

func (tc *TicketCreate) Save(ctx context.Context) (*Ticket, error)

Save creates the Ticket in the database.

func (*TicketCreate) SaveX

func (tc *TicketCreate) SaveX(ctx context.Context) *Ticket

SaveX calls Save and panics if Save returns an error.

func (*TicketCreate) SetApplicationID

func (tc *TicketCreate) SetApplicationID(u uuid.UUID) *TicketCreate

SetApplicationID sets the "application_id" field.

func (*TicketCreate) SetApplications

func (tc *TicketCreate) SetApplications(a *Application) *TicketCreate

SetApplications sets the "applications" edge to the Application entity.

func (*TicketCreate) SetApplicationsID

func (tc *TicketCreate) SetApplicationsID(id uuid.UUID) *TicketCreate

SetApplicationsID sets the "applications" edge to the Application entity by ID.

func (*TicketCreate) SetContent

func (tc *TicketCreate) SetContent(s string) *TicketCreate

SetContent sets the "content" field.

func (*TicketCreate) SetCreatedDtime

func (tc *TicketCreate) SetCreatedDtime(t time.Time) *TicketCreate

SetCreatedDtime sets the "created_dtime" field.

func (*TicketCreate) SetCreator

func (tc *TicketCreate) SetCreator(s string) *TicketCreate

SetCreator sets the "creator" field.

func (*TicketCreate) SetID

func (tc *TicketCreate) SetID(i int) *TicketCreate

SetID sets the "id" field.

func (*TicketCreate) SetNillableCreatedDtime

func (tc *TicketCreate) SetNillableCreatedDtime(t *time.Time) *TicketCreate

SetNillableCreatedDtime sets the "created_dtime" field if the given value is not nil.

func (*TicketCreate) SetRepliedDtime

func (tc *TicketCreate) SetRepliedDtime(t time.Time) *TicketCreate

SetRepliedDtime sets the "replied_dtime" field.

func (*TicketCreate) SetReplier

func (tc *TicketCreate) SetReplier(s string) *TicketCreate

SetReplier sets the "replier" field.

func (*TicketCreate) SetReply

func (tc *TicketCreate) SetReply(s string) *TicketCreate

SetReply sets the "reply" field.

func (*TicketCreate) SetReviewRemark

func (tc *TicketCreate) SetReviewRemark(s string) *TicketCreate

SetReviewRemark sets the "review_remark" field.

func (*TicketCreate) SetReviewedDtime

func (tc *TicketCreate) SetReviewedDtime(t time.Time) *TicketCreate

SetReviewedDtime sets the "reviewed_dtime" field.

func (*TicketCreate) SetReviewer

func (tc *TicketCreate) SetReviewer(s string) *TicketCreate

SetReviewer sets the "reviewer" field.

func (*TicketCreate) SetStatus

func (tc *TicketCreate) SetStatus(t ticket.Status) *TicketCreate

SetStatus sets the "status" field.

func (*TicketCreate) SetUpdatedDtime

func (tc *TicketCreate) SetUpdatedDtime(t time.Time) *TicketCreate

SetUpdatedDtime sets the "updated_dtime" field.

type TicketCreateBulk

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

TicketCreateBulk is the builder for creating many Ticket entities in bulk.

func (*TicketCreateBulk) Exec

func (tcb *TicketCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*TicketCreateBulk) ExecX

func (tcb *TicketCreateBulk) ExecX(ctx context.Context)

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

func (*TicketCreateBulk) Save

func (tcb *TicketCreateBulk) Save(ctx context.Context) ([]*Ticket, error)

Save creates the Ticket entities in the database.

func (*TicketCreateBulk) SaveX

func (tcb *TicketCreateBulk) SaveX(ctx context.Context) []*Ticket

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

type TicketDelete

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

TicketDelete is the builder for deleting a Ticket entity.

func (*TicketDelete) Exec

func (td *TicketDelete) Exec(ctx context.Context) (int, error)

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

func (*TicketDelete) ExecX

func (td *TicketDelete) ExecX(ctx context.Context) int

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

func (*TicketDelete) Where

func (td *TicketDelete) Where(ps ...predicate.Ticket) *TicketDelete

Where appends a list predicates to the TicketDelete builder.

type TicketDeleteOne

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

TicketDeleteOne is the builder for deleting a single Ticket entity.

func (*TicketDeleteOne) Exec

func (tdo *TicketDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*TicketDeleteOne) ExecX

func (tdo *TicketDeleteOne) ExecX(ctx context.Context)

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

type TicketEdges

type TicketEdges struct {
	// Applications holds the value of the applications edge.
	Applications *Application `json:"applications,omitempty"`
	// Attachments holds the value of the attachments edge.
	Attachments []*Attachment `json:"attachments,omitempty"`
	// contains filtered or unexported fields
}

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

func (TicketEdges) ApplicationsOrErr

func (e TicketEdges) ApplicationsOrErr() (*Application, error)

ApplicationsOrErr returns the Applications value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (TicketEdges) AttachmentsOrErr

func (e TicketEdges) AttachmentsOrErr() ([]*Attachment, error)

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

type TicketGroupBy

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

TicketGroupBy is the group-by builder for Ticket entities.

func (*TicketGroupBy) Aggregate

func (tgb *TicketGroupBy) Aggregate(fns ...AggregateFunc) *TicketGroupBy

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

func (*TicketGroupBy) Bool

func (tgb *TicketGroupBy) Bool(ctx context.Context) (_ bool, err error)

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

func (*TicketGroupBy) BoolX

func (tgb *TicketGroupBy) BoolX(ctx context.Context) bool

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

func (*TicketGroupBy) Bools

func (tgb *TicketGroupBy) Bools(ctx context.Context) ([]bool, error)

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

func (*TicketGroupBy) BoolsX

func (tgb *TicketGroupBy) BoolsX(ctx context.Context) []bool

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

func (*TicketGroupBy) Float64

func (tgb *TicketGroupBy) Float64(ctx context.Context) (_ float64, err error)

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

func (*TicketGroupBy) Float64X

func (tgb *TicketGroupBy) Float64X(ctx context.Context) float64

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

func (*TicketGroupBy) Float64s

func (tgb *TicketGroupBy) Float64s(ctx context.Context) ([]float64, error)

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

func (*TicketGroupBy) Float64sX

func (tgb *TicketGroupBy) Float64sX(ctx context.Context) []float64

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

func (*TicketGroupBy) Int

func (tgb *TicketGroupBy) Int(ctx context.Context) (_ int, err error)

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

func (*TicketGroupBy) IntX

func (tgb *TicketGroupBy) IntX(ctx context.Context) int

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

func (*TicketGroupBy) Ints

func (tgb *TicketGroupBy) Ints(ctx context.Context) ([]int, error)

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

func (*TicketGroupBy) IntsX

func (tgb *TicketGroupBy) IntsX(ctx context.Context) []int

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

func (*TicketGroupBy) Scan

func (tgb *TicketGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*TicketGroupBy) ScanX

func (tgb *TicketGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*TicketGroupBy) String

func (tgb *TicketGroupBy) String(ctx context.Context) (_ string, err error)

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

func (*TicketGroupBy) StringX

func (tgb *TicketGroupBy) StringX(ctx context.Context) string

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

func (*TicketGroupBy) Strings

func (tgb *TicketGroupBy) Strings(ctx context.Context) ([]string, error)

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

func (*TicketGroupBy) StringsX

func (tgb *TicketGroupBy) StringsX(ctx context.Context) []string

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

type TicketMutation

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

TicketMutation represents an operation that mutates the Ticket nodes in the graph.

func (*TicketMutation) AddAttachmentIDs

func (m *TicketMutation) AddAttachmentIDs(ids ...int)

AddAttachmentIDs adds the "attachments" edge to the Attachment entity by ids.

func (*TicketMutation) AddField

func (m *TicketMutation) 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 (*TicketMutation) AddedEdges

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

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

func (*TicketMutation) AddedField

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

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

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

func (*TicketMutation) AddedIDs

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

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

func (*TicketMutation) ApplicationID

func (m *TicketMutation) ApplicationID() (r uuid.UUID, exists bool)

ApplicationID returns the value of the "application_id" field in the mutation.

func (*TicketMutation) ApplicationsCleared

func (m *TicketMutation) ApplicationsCleared() bool

ApplicationsCleared reports if the "applications" edge to the Application entity was cleared.

func (*TicketMutation) ApplicationsID

func (m *TicketMutation) ApplicationsID() (id uuid.UUID, exists bool)

ApplicationsID returns the "applications" edge ID in the mutation.

func (*TicketMutation) ApplicationsIDs

func (m *TicketMutation) ApplicationsIDs() (ids []uuid.UUID)

ApplicationsIDs returns the "applications" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ApplicationsID instead. It exists only for internal usage by the builders.

func (*TicketMutation) AttachmentsCleared

func (m *TicketMutation) AttachmentsCleared() bool

AttachmentsCleared reports if the "attachments" edge to the Attachment entity was cleared.

func (*TicketMutation) AttachmentsIDs

func (m *TicketMutation) AttachmentsIDs() (ids []int)

AttachmentsIDs returns the "attachments" edge IDs in the mutation.

func (*TicketMutation) ClearApplications

func (m *TicketMutation) ClearApplications()

ClearApplications clears the "applications" edge to the Application entity.

func (*TicketMutation) ClearAttachments

func (m *TicketMutation) ClearAttachments()

ClearAttachments clears the "attachments" edge to the Attachment entity.

func (*TicketMutation) ClearEdge

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

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

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

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

func (*TicketMutation) ClearedFields

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

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

func (TicketMutation) Client

func (m TicketMutation) 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 (*TicketMutation) Content

func (m *TicketMutation) Content() (r string, exists bool)

Content returns the value of the "content" field in the mutation.

func (*TicketMutation) CreatedDtime

func (m *TicketMutation) CreatedDtime() (r time.Time, exists bool)

CreatedDtime returns the value of the "created_dtime" field in the mutation.

func (*TicketMutation) Creator

func (m *TicketMutation) Creator() (r string, exists bool)

Creator returns the value of the "creator" field in the mutation.

func (*TicketMutation) EdgeCleared

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

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

func (*TicketMutation) Field

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

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

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

func (*TicketMutation) Fields

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

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

func (m *TicketMutation) 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 (*TicketMutation) OldApplicationID

func (m *TicketMutation) OldApplicationID(ctx context.Context) (v uuid.UUID, err error)

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

func (*TicketMutation) OldContent

func (m *TicketMutation) OldContent(ctx context.Context) (v string, err error)

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

func (*TicketMutation) OldCreatedDtime

func (m *TicketMutation) OldCreatedDtime(ctx context.Context) (v time.Time, err error)

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

func (*TicketMutation) OldCreator

func (m *TicketMutation) OldCreator(ctx context.Context) (v string, err error)

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

func (*TicketMutation) OldField

func (m *TicketMutation) 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 (*TicketMutation) OldRepliedDtime

func (m *TicketMutation) OldRepliedDtime(ctx context.Context) (v time.Time, err error)

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

func (*TicketMutation) OldReplier

func (m *TicketMutation) OldReplier(ctx context.Context) (v string, err error)

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

func (*TicketMutation) OldReply

func (m *TicketMutation) OldReply(ctx context.Context) (v string, err error)

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

func (*TicketMutation) OldReviewRemark

func (m *TicketMutation) OldReviewRemark(ctx context.Context) (v string, err error)

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

func (*TicketMutation) OldReviewedDtime

func (m *TicketMutation) OldReviewedDtime(ctx context.Context) (v time.Time, err error)

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

func (*TicketMutation) OldReviewer

func (m *TicketMutation) OldReviewer(ctx context.Context) (v string, err error)

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

func (*TicketMutation) OldStatus

func (m *TicketMutation) OldStatus(ctx context.Context) (v ticket.Status, err error)

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

func (*TicketMutation) OldUpdatedDtime

func (m *TicketMutation) OldUpdatedDtime(ctx context.Context) (v time.Time, err error)

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

func (*TicketMutation) Op

func (m *TicketMutation) Op() Op

Op returns the operation name.

func (*TicketMutation) RemoveAttachmentIDs

func (m *TicketMutation) RemoveAttachmentIDs(ids ...int)

RemoveAttachmentIDs removes the "attachments" edge to the Attachment entity by IDs.

func (*TicketMutation) RemovedAttachmentsIDs

func (m *TicketMutation) RemovedAttachmentsIDs() (ids []int)

RemovedAttachments returns the removed IDs of the "attachments" edge to the Attachment entity.

func (*TicketMutation) RemovedEdges

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

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

func (*TicketMutation) RemovedIDs

func (m *TicketMutation) 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 (*TicketMutation) RepliedDtime

func (m *TicketMutation) RepliedDtime() (r time.Time, exists bool)

RepliedDtime returns the value of the "replied_dtime" field in the mutation.

func (*TicketMutation) Replier

func (m *TicketMutation) Replier() (r string, exists bool)

Replier returns the value of the "replier" field in the mutation.

func (*TicketMutation) Reply

func (m *TicketMutation) Reply() (r string, exists bool)

Reply returns the value of the "reply" field in the mutation.

func (*TicketMutation) ResetApplicationID

func (m *TicketMutation) ResetApplicationID()

ResetApplicationID resets all changes to the "application_id" field.

func (*TicketMutation) ResetApplications

func (m *TicketMutation) ResetApplications()

ResetApplications resets all changes to the "applications" edge.

func (*TicketMutation) ResetAttachments

func (m *TicketMutation) ResetAttachments()

ResetAttachments resets all changes to the "attachments" edge.

func (*TicketMutation) ResetContent

func (m *TicketMutation) ResetContent()

ResetContent resets all changes to the "content" field.

func (*TicketMutation) ResetCreatedDtime

func (m *TicketMutation) ResetCreatedDtime()

ResetCreatedDtime resets all changes to the "created_dtime" field.

func (*TicketMutation) ResetCreator

func (m *TicketMutation) ResetCreator()

ResetCreator resets all changes to the "creator" field.

func (*TicketMutation) ResetEdge

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

func (m *TicketMutation) 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 (*TicketMutation) ResetRepliedDtime

func (m *TicketMutation) ResetRepliedDtime()

ResetRepliedDtime resets all changes to the "replied_dtime" field.

func (*TicketMutation) ResetReplier

func (m *TicketMutation) ResetReplier()

ResetReplier resets all changes to the "replier" field.

func (*TicketMutation) ResetReply

func (m *TicketMutation) ResetReply()

ResetReply resets all changes to the "reply" field.

func (*TicketMutation) ResetReviewRemark

func (m *TicketMutation) ResetReviewRemark()

ResetReviewRemark resets all changes to the "review_remark" field.

func (*TicketMutation) ResetReviewedDtime

func (m *TicketMutation) ResetReviewedDtime()

ResetReviewedDtime resets all changes to the "reviewed_dtime" field.

func (*TicketMutation) ResetReviewer

func (m *TicketMutation) ResetReviewer()

ResetReviewer resets all changes to the "reviewer" field.

func (*TicketMutation) ResetStatus

func (m *TicketMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*TicketMutation) ResetUpdatedDtime

func (m *TicketMutation) ResetUpdatedDtime()

ResetUpdatedDtime resets all changes to the "updated_dtime" field.

func (*TicketMutation) ReviewRemark

func (m *TicketMutation) ReviewRemark() (r string, exists bool)

ReviewRemark returns the value of the "review_remark" field in the mutation.

func (*TicketMutation) ReviewedDtime

func (m *TicketMutation) ReviewedDtime() (r time.Time, exists bool)

ReviewedDtime returns the value of the "reviewed_dtime" field in the mutation.

func (*TicketMutation) Reviewer

func (m *TicketMutation) Reviewer() (r string, exists bool)

Reviewer returns the value of the "reviewer" field in the mutation.

func (*TicketMutation) SetApplicationID

func (m *TicketMutation) SetApplicationID(u uuid.UUID)

SetApplicationID sets the "application_id" field.

func (*TicketMutation) SetApplicationsID

func (m *TicketMutation) SetApplicationsID(id uuid.UUID)

SetApplicationsID sets the "applications" edge to the Application entity by id.

func (*TicketMutation) SetContent

func (m *TicketMutation) SetContent(s string)

SetContent sets the "content" field.

func (*TicketMutation) SetCreatedDtime

func (m *TicketMutation) SetCreatedDtime(t time.Time)

SetCreatedDtime sets the "created_dtime" field.

func (*TicketMutation) SetCreator

func (m *TicketMutation) SetCreator(s string)

SetCreator sets the "creator" field.

func (*TicketMutation) SetField

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

func (m *TicketMutation) SetID(id int)

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

func (*TicketMutation) SetRepliedDtime

func (m *TicketMutation) SetRepliedDtime(t time.Time)

SetRepliedDtime sets the "replied_dtime" field.

func (*TicketMutation) SetReplier

func (m *TicketMutation) SetReplier(s string)

SetReplier sets the "replier" field.

func (*TicketMutation) SetReply

func (m *TicketMutation) SetReply(s string)

SetReply sets the "reply" field.

func (*TicketMutation) SetReviewRemark

func (m *TicketMutation) SetReviewRemark(s string)

SetReviewRemark sets the "review_remark" field.

func (*TicketMutation) SetReviewedDtime

func (m *TicketMutation) SetReviewedDtime(t time.Time)

SetReviewedDtime sets the "reviewed_dtime" field.

func (*TicketMutation) SetReviewer

func (m *TicketMutation) SetReviewer(s string)

SetReviewer sets the "reviewer" field.

func (*TicketMutation) SetStatus

func (m *TicketMutation) SetStatus(t ticket.Status)

SetStatus sets the "status" field.

func (*TicketMutation) SetUpdatedDtime

func (m *TicketMutation) SetUpdatedDtime(t time.Time)

SetUpdatedDtime sets the "updated_dtime" field.

func (*TicketMutation) Status

func (m *TicketMutation) Status() (r ticket.Status, exists bool)

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

func (TicketMutation) Tx

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

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

func (*TicketMutation) Type

func (m *TicketMutation) Type() string

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

func (*TicketMutation) UpdatedDtime

func (m *TicketMutation) UpdatedDtime() (r time.Time, exists bool)

UpdatedDtime returns the value of the "updated_dtime" field in the mutation.

func (*TicketMutation) Where

func (m *TicketMutation) Where(ps ...predicate.Ticket)

Where appends a list predicates to the TicketMutation builder.

type TicketQuery

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

TicketQuery is the builder for querying Ticket entities.

func (*TicketQuery) All

func (tq *TicketQuery) All(ctx context.Context) ([]*Ticket, error)

All executes the query and returns a list of Tickets.

func (*TicketQuery) AllX

func (tq *TicketQuery) AllX(ctx context.Context) []*Ticket

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

func (*TicketQuery) Clone

func (tq *TicketQuery) Clone() *TicketQuery

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

func (*TicketQuery) Count

func (tq *TicketQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*TicketQuery) CountX

func (tq *TicketQuery) CountX(ctx context.Context) int

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

func (*TicketQuery) Exist

func (tq *TicketQuery) Exist(ctx context.Context) (bool, error)

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

func (*TicketQuery) ExistX

func (tq *TicketQuery) ExistX(ctx context.Context) bool

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

func (*TicketQuery) First

func (tq *TicketQuery) First(ctx context.Context) (*Ticket, error)

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

func (*TicketQuery) FirstID

func (tq *TicketQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*TicketQuery) FirstIDX

func (tq *TicketQuery) FirstIDX(ctx context.Context) int

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

func (*TicketQuery) FirstX

func (tq *TicketQuery) FirstX(ctx context.Context) *Ticket

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

func (*TicketQuery) GroupBy

func (tq *TicketQuery) GroupBy(field string, fields ...string) *TicketGroupBy

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 {
	ApplicationID uuid.UUID `json:"application_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Ticket.Query().
	GroupBy(ticket.FieldApplicationID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*TicketQuery) IDs

func (tq *TicketQuery) IDs(ctx context.Context) ([]int, error)

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

func (*TicketQuery) IDsX

func (tq *TicketQuery) IDsX(ctx context.Context) []int

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

func (*TicketQuery) Limit

func (tq *TicketQuery) Limit(limit int) *TicketQuery

Limit adds a limit step to the query.

func (*TicketQuery) Offset

func (tq *TicketQuery) Offset(offset int) *TicketQuery

Offset adds an offset step to the query.

func (*TicketQuery) Only

func (tq *TicketQuery) Only(ctx context.Context) (*Ticket, error)

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

func (*TicketQuery) OnlyID

func (tq *TicketQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*TicketQuery) OnlyIDX

func (tq *TicketQuery) OnlyIDX(ctx context.Context) int

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

func (*TicketQuery) OnlyX

func (tq *TicketQuery) OnlyX(ctx context.Context) *Ticket

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

func (*TicketQuery) Order

func (tq *TicketQuery) Order(o ...OrderFunc) *TicketQuery

Order adds an order step to the query.

func (*TicketQuery) QueryApplications

func (tq *TicketQuery) QueryApplications() *ApplicationQuery

QueryApplications chains the current query on the "applications" edge.

func (*TicketQuery) QueryAttachments

func (tq *TicketQuery) QueryAttachments() *AttachmentQuery

QueryAttachments chains the current query on the "attachments" edge.

func (*TicketQuery) Select

func (tq *TicketQuery) Select(fields ...string) *TicketSelect

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 {
	ApplicationID uuid.UUID `json:"application_id,omitempty"`
}

client.Ticket.Query().
	Select(ticket.FieldApplicationID).
	Scan(ctx, &v)

func (*TicketQuery) Unique

func (tq *TicketQuery) Unique(unique bool) *TicketQuery

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

func (tq *TicketQuery) Where(ps ...predicate.Ticket) *TicketQuery

Where adds a new predicate for the TicketQuery builder.

func (*TicketQuery) WithApplications

func (tq *TicketQuery) WithApplications(opts ...func(*ApplicationQuery)) *TicketQuery

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

func (*TicketQuery) WithAttachments

func (tq *TicketQuery) WithAttachments(opts ...func(*AttachmentQuery)) *TicketQuery

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

type TicketSelect

type TicketSelect struct {
	*TicketQuery
	// contains filtered or unexported fields
}

TicketSelect is the builder for selecting fields of Ticket entities.

func (*TicketSelect) Bool

func (ts *TicketSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*TicketSelect) BoolX

func (ts *TicketSelect) BoolX(ctx context.Context) bool

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

func (*TicketSelect) Bools

func (ts *TicketSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*TicketSelect) BoolsX

func (ts *TicketSelect) BoolsX(ctx context.Context) []bool

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

func (*TicketSelect) Float64

func (ts *TicketSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*TicketSelect) Float64X

func (ts *TicketSelect) Float64X(ctx context.Context) float64

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

func (*TicketSelect) Float64s

func (ts *TicketSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*TicketSelect) Float64sX

func (ts *TicketSelect) Float64sX(ctx context.Context) []float64

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

func (*TicketSelect) Int

func (ts *TicketSelect) Int(ctx context.Context) (_ int, err error)

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

func (*TicketSelect) IntX

func (ts *TicketSelect) IntX(ctx context.Context) int

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

func (*TicketSelect) Ints

func (ts *TicketSelect) Ints(ctx context.Context) ([]int, error)

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

func (*TicketSelect) IntsX

func (ts *TicketSelect) IntsX(ctx context.Context) []int

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

func (*TicketSelect) Scan

func (ts *TicketSelect) Scan(ctx context.Context, v interface{}) error

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

func (*TicketSelect) ScanX

func (ts *TicketSelect) ScanX(ctx context.Context, v interface{})

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

func (*TicketSelect) String

func (ts *TicketSelect) String(ctx context.Context) (_ string, err error)

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

func (*TicketSelect) StringX

func (ts *TicketSelect) StringX(ctx context.Context) string

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

func (*TicketSelect) Strings

func (ts *TicketSelect) Strings(ctx context.Context) ([]string, error)

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

func (*TicketSelect) StringsX

func (ts *TicketSelect) StringsX(ctx context.Context) []string

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

type TicketUpdate

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

TicketUpdate is the builder for updating Ticket entities.

func (*TicketUpdate) AddAttachmentIDs

func (tu *TicketUpdate) AddAttachmentIDs(ids ...int) *TicketUpdate

AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.

func (*TicketUpdate) AddAttachments

func (tu *TicketUpdate) AddAttachments(a ...*Attachment) *TicketUpdate

AddAttachments adds the "attachments" edges to the Attachment entity.

func (*TicketUpdate) ClearApplications

func (tu *TicketUpdate) ClearApplications() *TicketUpdate

ClearApplications clears the "applications" edge to the Application entity.

func (*TicketUpdate) ClearAttachments

func (tu *TicketUpdate) ClearAttachments() *TicketUpdate

ClearAttachments clears all "attachments" edges to the Attachment entity.

func (*TicketUpdate) Exec

func (tu *TicketUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*TicketUpdate) ExecX

func (tu *TicketUpdate) ExecX(ctx context.Context)

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

func (*TicketUpdate) Mutation

func (tu *TicketUpdate) Mutation() *TicketMutation

Mutation returns the TicketMutation object of the builder.

func (*TicketUpdate) RemoveAttachmentIDs

func (tu *TicketUpdate) RemoveAttachmentIDs(ids ...int) *TicketUpdate

RemoveAttachmentIDs removes the "attachments" edge to Attachment entities by IDs.

func (*TicketUpdate) RemoveAttachments

func (tu *TicketUpdate) RemoveAttachments(a ...*Attachment) *TicketUpdate

RemoveAttachments removes "attachments" edges to Attachment entities.

func (*TicketUpdate) Save

func (tu *TicketUpdate) Save(ctx context.Context) (int, error)

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

func (*TicketUpdate) SaveX

func (tu *TicketUpdate) SaveX(ctx context.Context) int

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

func (*TicketUpdate) SetApplicationID

func (tu *TicketUpdate) SetApplicationID(u uuid.UUID) *TicketUpdate

SetApplicationID sets the "application_id" field.

func (*TicketUpdate) SetApplications

func (tu *TicketUpdate) SetApplications(a *Application) *TicketUpdate

SetApplications sets the "applications" edge to the Application entity.

func (*TicketUpdate) SetApplicationsID

func (tu *TicketUpdate) SetApplicationsID(id uuid.UUID) *TicketUpdate

SetApplicationsID sets the "applications" edge to the Application entity by ID.

func (*TicketUpdate) SetContent

func (tu *TicketUpdate) SetContent(s string) *TicketUpdate

SetContent sets the "content" field.

func (*TicketUpdate) SetCreator

func (tu *TicketUpdate) SetCreator(s string) *TicketUpdate

SetCreator sets the "creator" field.

func (*TicketUpdate) SetRepliedDtime

func (tu *TicketUpdate) SetRepliedDtime(t time.Time) *TicketUpdate

SetRepliedDtime sets the "replied_dtime" field.

func (*TicketUpdate) SetReplier

func (tu *TicketUpdate) SetReplier(s string) *TicketUpdate

SetReplier sets the "replier" field.

func (*TicketUpdate) SetReply

func (tu *TicketUpdate) SetReply(s string) *TicketUpdate

SetReply sets the "reply" field.

func (*TicketUpdate) SetReviewRemark

func (tu *TicketUpdate) SetReviewRemark(s string) *TicketUpdate

SetReviewRemark sets the "review_remark" field.

func (*TicketUpdate) SetReviewedDtime

func (tu *TicketUpdate) SetReviewedDtime(t time.Time) *TicketUpdate

SetReviewedDtime sets the "reviewed_dtime" field.

func (*TicketUpdate) SetReviewer

func (tu *TicketUpdate) SetReviewer(s string) *TicketUpdate

SetReviewer sets the "reviewer" field.

func (*TicketUpdate) SetStatus

func (tu *TicketUpdate) SetStatus(t ticket.Status) *TicketUpdate

SetStatus sets the "status" field.

func (*TicketUpdate) SetUpdatedDtime

func (tu *TicketUpdate) SetUpdatedDtime(t time.Time) *TicketUpdate

SetUpdatedDtime sets the "updated_dtime" field.

func (*TicketUpdate) Where

func (tu *TicketUpdate) Where(ps ...predicate.Ticket) *TicketUpdate

Where appends a list predicates to the TicketUpdate builder.

type TicketUpdateOne

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

TicketUpdateOne is the builder for updating a single Ticket entity.

func (*TicketUpdateOne) AddAttachmentIDs

func (tuo *TicketUpdateOne) AddAttachmentIDs(ids ...int) *TicketUpdateOne

AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.

func (*TicketUpdateOne) AddAttachments

func (tuo *TicketUpdateOne) AddAttachments(a ...*Attachment) *TicketUpdateOne

AddAttachments adds the "attachments" edges to the Attachment entity.

func (*TicketUpdateOne) ClearApplications

func (tuo *TicketUpdateOne) ClearApplications() *TicketUpdateOne

ClearApplications clears the "applications" edge to the Application entity.

func (*TicketUpdateOne) ClearAttachments

func (tuo *TicketUpdateOne) ClearAttachments() *TicketUpdateOne

ClearAttachments clears all "attachments" edges to the Attachment entity.

func (*TicketUpdateOne) Exec

func (tuo *TicketUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*TicketUpdateOne) ExecX

func (tuo *TicketUpdateOne) ExecX(ctx context.Context)

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

func (*TicketUpdateOne) Mutation

func (tuo *TicketUpdateOne) Mutation() *TicketMutation

Mutation returns the TicketMutation object of the builder.

func (*TicketUpdateOne) RemoveAttachmentIDs

func (tuo *TicketUpdateOne) RemoveAttachmentIDs(ids ...int) *TicketUpdateOne

RemoveAttachmentIDs removes the "attachments" edge to Attachment entities by IDs.

func (*TicketUpdateOne) RemoveAttachments

func (tuo *TicketUpdateOne) RemoveAttachments(a ...*Attachment) *TicketUpdateOne

RemoveAttachments removes "attachments" edges to Attachment entities.

func (*TicketUpdateOne) Save

func (tuo *TicketUpdateOne) Save(ctx context.Context) (*Ticket, error)

Save executes the query and returns the updated Ticket entity.

func (*TicketUpdateOne) SaveX

func (tuo *TicketUpdateOne) SaveX(ctx context.Context) *Ticket

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

func (*TicketUpdateOne) Select

func (tuo *TicketUpdateOne) Select(field string, fields ...string) *TicketUpdateOne

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

func (*TicketUpdateOne) SetApplicationID

func (tuo *TicketUpdateOne) SetApplicationID(u uuid.UUID) *TicketUpdateOne

SetApplicationID sets the "application_id" field.

func (*TicketUpdateOne) SetApplications

func (tuo *TicketUpdateOne) SetApplications(a *Application) *TicketUpdateOne

SetApplications sets the "applications" edge to the Application entity.

func (*TicketUpdateOne) SetApplicationsID

func (tuo *TicketUpdateOne) SetApplicationsID(id uuid.UUID) *TicketUpdateOne

SetApplicationsID sets the "applications" edge to the Application entity by ID.

func (*TicketUpdateOne) SetContent

func (tuo *TicketUpdateOne) SetContent(s string) *TicketUpdateOne

SetContent sets the "content" field.

func (*TicketUpdateOne) SetCreator

func (tuo *TicketUpdateOne) SetCreator(s string) *TicketUpdateOne

SetCreator sets the "creator" field.

func (*TicketUpdateOne) SetRepliedDtime

func (tuo *TicketUpdateOne) SetRepliedDtime(t time.Time) *TicketUpdateOne

SetRepliedDtime sets the "replied_dtime" field.

func (*TicketUpdateOne) SetReplier

func (tuo *TicketUpdateOne) SetReplier(s string) *TicketUpdateOne

SetReplier sets the "replier" field.

func (*TicketUpdateOne) SetReply

func (tuo *TicketUpdateOne) SetReply(s string) *TicketUpdateOne

SetReply sets the "reply" field.

func (*TicketUpdateOne) SetReviewRemark

func (tuo *TicketUpdateOne) SetReviewRemark(s string) *TicketUpdateOne

SetReviewRemark sets the "review_remark" field.

func (*TicketUpdateOne) SetReviewedDtime

func (tuo *TicketUpdateOne) SetReviewedDtime(t time.Time) *TicketUpdateOne

SetReviewedDtime sets the "reviewed_dtime" field.

func (*TicketUpdateOne) SetReviewer

func (tuo *TicketUpdateOne) SetReviewer(s string) *TicketUpdateOne

SetReviewer sets the "reviewer" field.

func (*TicketUpdateOne) SetStatus

func (tuo *TicketUpdateOne) SetStatus(t ticket.Status) *TicketUpdateOne

SetStatus sets the "status" field.

func (*TicketUpdateOne) SetUpdatedDtime

func (tuo *TicketUpdateOne) SetUpdatedDtime(t time.Time) *TicketUpdateOne

SetUpdatedDtime sets the "updated_dtime" field.

type Tickets

type Tickets []*Ticket

Tickets is a parsable slice of Ticket.

type Tx

type Tx struct {

	// Application is the client for interacting with the Application builders.
	Application *ApplicationClient
	// ApplicationAssignmentHistory is the client for interacting with the ApplicationAssignmentHistory builders.
	ApplicationAssignmentHistory *ApplicationAssignmentHistoryClient
	// ApplicationStatusHistory is the client for interacting with the ApplicationStatusHistory builders.
	ApplicationStatusHistory *ApplicationStatusHistoryClient
	// Attachment is the client for interacting with the Attachment builders.
	Attachment *AttachmentClient
	// Reviewer is the client for interacting with the Reviewer builders.
	Reviewer *ReviewerClient
	// Ticket is the client for interacting with the Ticket builders.
	Ticket *TicketClient
	// 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 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.

Directories

Path Synopsis
proto
entpb
Code generated by protoc-gen-entgrpc.
Code generated by protoc-gen-entgrpc.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL