Init V4 community edition (#2265)
* Init V4 community edition * Init V4 community edition
This commit is contained in:
180
ent/task/task.go
Normal file
180
ent/task/task.go
Normal file
@@ -0,0 +1,180 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package task
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the task type in the database.
|
||||
Label = "task"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
||||
FieldUpdatedAt = "updated_at"
|
||||
// FieldDeletedAt holds the string denoting the deleted_at field in the database.
|
||||
FieldDeletedAt = "deleted_at"
|
||||
// FieldType holds the string denoting the type field in the database.
|
||||
FieldType = "type"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldPublicState holds the string denoting the public_state field in the database.
|
||||
FieldPublicState = "public_state"
|
||||
// FieldPrivateState holds the string denoting the private_state field in the database.
|
||||
FieldPrivateState = "private_state"
|
||||
// FieldCorrelationID holds the string denoting the correlation_id field in the database.
|
||||
FieldCorrelationID = "correlation_id"
|
||||
// FieldUserTasks holds the string denoting the user_tasks field in the database.
|
||||
FieldUserTasks = "user_tasks"
|
||||
// EdgeUser holds the string denoting the user edge name in mutations.
|
||||
EdgeUser = "user"
|
||||
// Table holds the table name of the task in the database.
|
||||
Table = "tasks"
|
||||
// UserTable is the table that holds the user relation/edge.
|
||||
UserTable = "tasks"
|
||||
// UserInverseTable is the table name for the User entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "user" package.
|
||||
UserInverseTable = "users"
|
||||
// UserColumn is the table column denoting the user relation/edge.
|
||||
UserColumn = "user_tasks"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for task fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldDeletedAt,
|
||||
FieldType,
|
||||
FieldStatus,
|
||||
FieldPublicState,
|
||||
FieldPrivateState,
|
||||
FieldCorrelationID,
|
||||
FieldUserTasks,
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
func ValidColumn(column string) bool {
|
||||
for i := range Columns {
|
||||
if column == Columns[i] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Note that the variables below are initialized by the runtime
|
||||
// package on the initialization of the application. Therefore,
|
||||
// it should be imported in the main as follows:
|
||||
//
|
||||
// import _ "github.com/cloudreve/Cloudreve/v4/ent/runtime"
|
||||
var (
|
||||
Hooks [1]ent.Hook
|
||||
Interceptors [1]ent.Interceptor
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() time.Time
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
DefaultUpdatedAt func() time.Time
|
||||
// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
|
||||
UpdateDefaultUpdatedAt func() time.Time
|
||||
)
|
||||
|
||||
// Status defines the type for the "status" enum field.
|
||||
type Status string
|
||||
|
||||
// StatusQueued is the default value of the Status enum.
|
||||
const DefaultStatus = StatusQueued
|
||||
|
||||
// Status values.
|
||||
const (
|
||||
StatusQueued Status = "queued"
|
||||
StatusProcessing Status = "processing"
|
||||
StatusSuspending Status = "suspending"
|
||||
StatusError Status = "error"
|
||||
StatusCanceled Status = "canceled"
|
||||
StatusCompleted Status = "completed"
|
||||
)
|
||||
|
||||
func (s Status) String() string {
|
||||
return string(s)
|
||||
}
|
||||
|
||||
// StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
|
||||
func StatusValidator(s Status) error {
|
||||
switch s {
|
||||
case StatusQueued, StatusProcessing, StatusSuspending, StatusError, StatusCanceled, StatusCompleted:
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("task: invalid enum value for status field: %q", s)
|
||||
}
|
||||
}
|
||||
|
||||
// OrderOption defines the ordering options for the Task queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDeletedAt orders the results by the deleted_at field.
|
||||
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByType orders the results by the type field.
|
||||
func ByType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPrivateState orders the results by the private_state field.
|
||||
func ByPrivateState(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPrivateState, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCorrelationID orders the results by the correlation_id field.
|
||||
func ByCorrelationID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCorrelationID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUserTasks orders the results by the user_tasks field.
|
||||
func ByUserTasks(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUserTasks, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUserField orders the results by user field.
|
||||
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newUserStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
func newUserStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(UserInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
|
||||
)
|
||||
}
|
||||
500
ent/task/where.go
Normal file
500
ent/task/where.go
Normal file
@@ -0,0 +1,500 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package task
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/cloudreve/Cloudreve/v4/ent/predicate"
|
||||
"github.com/gofrs/uuid"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.Task {
|
||||
return predicate.Task(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Task {
|
||||
return predicate.Task(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Task {
|
||||
return predicate.Task(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.Task {
|
||||
return predicate.Task(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.Task {
|
||||
return predicate.Task(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.Task {
|
||||
return predicate.Task(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.Task {
|
||||
return predicate.Task(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
|
||||
func DeletedAt(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// Type applies equality check predicate on the "type" field. It's identical to TypeEQ.
|
||||
func Type(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldType, v))
|
||||
}
|
||||
|
||||
// PrivateState applies equality check predicate on the "private_state" field. It's identical to PrivateStateEQ.
|
||||
func PrivateState(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldPrivateState, v))
|
||||
}
|
||||
|
||||
// CorrelationID applies equality check predicate on the "correlation_id" field. It's identical to CorrelationIDEQ.
|
||||
func CorrelationID(v uuid.UUID) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldCorrelationID, v))
|
||||
}
|
||||
|
||||
// UserTasks applies equality check predicate on the "user_tasks" field. It's identical to UserTasksEQ.
|
||||
func UserTasks(v int) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldUserTasks, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
|
||||
func DeletedAtEQ(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
|
||||
func DeletedAtNEQ(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldNEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIn applies the In predicate on the "deleted_at" field.
|
||||
func DeletedAtIn(vs ...time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
|
||||
func DeletedAtNotIn(vs ...time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldNotIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtGT applies the GT predicate on the "deleted_at" field.
|
||||
func DeletedAtGT(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldGT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
|
||||
func DeletedAtGTE(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldGTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLT applies the LT predicate on the "deleted_at" field.
|
||||
func DeletedAtLT(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldLT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
|
||||
func DeletedAtLTE(v time.Time) predicate.Task {
|
||||
return predicate.Task(sql.FieldLTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
|
||||
func DeletedAtIsNil() predicate.Task {
|
||||
return predicate.Task(sql.FieldIsNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
|
||||
func DeletedAtNotNil() predicate.Task {
|
||||
return predicate.Task(sql.FieldNotNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// TypeEQ applies the EQ predicate on the "type" field.
|
||||
func TypeEQ(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeNEQ applies the NEQ predicate on the "type" field.
|
||||
func TypeNEQ(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldNEQ(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeIn applies the In predicate on the "type" field.
|
||||
func TypeIn(vs ...string) predicate.Task {
|
||||
return predicate.Task(sql.FieldIn(FieldType, vs...))
|
||||
}
|
||||
|
||||
// TypeNotIn applies the NotIn predicate on the "type" field.
|
||||
func TypeNotIn(vs ...string) predicate.Task {
|
||||
return predicate.Task(sql.FieldNotIn(FieldType, vs...))
|
||||
}
|
||||
|
||||
// TypeGT applies the GT predicate on the "type" field.
|
||||
func TypeGT(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldGT(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeGTE applies the GTE predicate on the "type" field.
|
||||
func TypeGTE(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldGTE(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeLT applies the LT predicate on the "type" field.
|
||||
func TypeLT(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldLT(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeLTE applies the LTE predicate on the "type" field.
|
||||
func TypeLTE(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldLTE(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeContains applies the Contains predicate on the "type" field.
|
||||
func TypeContains(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldContains(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeHasPrefix applies the HasPrefix predicate on the "type" field.
|
||||
func TypeHasPrefix(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldHasPrefix(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeHasSuffix applies the HasSuffix predicate on the "type" field.
|
||||
func TypeHasSuffix(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldHasSuffix(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeEqualFold applies the EqualFold predicate on the "type" field.
|
||||
func TypeEqualFold(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldEqualFold(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeContainsFold applies the ContainsFold predicate on the "type" field.
|
||||
func TypeContainsFold(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldContainsFold(FieldType, v))
|
||||
}
|
||||
|
||||
// StatusEQ applies the EQ predicate on the "status" field.
|
||||
func StatusEQ(v Status) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusNEQ applies the NEQ predicate on the "status" field.
|
||||
func StatusNEQ(v Status) predicate.Task {
|
||||
return predicate.Task(sql.FieldNEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// StatusIn applies the In predicate on the "status" field.
|
||||
func StatusIn(vs ...Status) predicate.Task {
|
||||
return predicate.Task(sql.FieldIn(FieldStatus, vs...))
|
||||
}
|
||||
|
||||
// StatusNotIn applies the NotIn predicate on the "status" field.
|
||||
func StatusNotIn(vs ...Status) predicate.Task {
|
||||
return predicate.Task(sql.FieldNotIn(FieldStatus, vs...))
|
||||
}
|
||||
|
||||
// PrivateStateEQ applies the EQ predicate on the "private_state" field.
|
||||
func PrivateStateEQ(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldPrivateState, v))
|
||||
}
|
||||
|
||||
// PrivateStateNEQ applies the NEQ predicate on the "private_state" field.
|
||||
func PrivateStateNEQ(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldNEQ(FieldPrivateState, v))
|
||||
}
|
||||
|
||||
// PrivateStateIn applies the In predicate on the "private_state" field.
|
||||
func PrivateStateIn(vs ...string) predicate.Task {
|
||||
return predicate.Task(sql.FieldIn(FieldPrivateState, vs...))
|
||||
}
|
||||
|
||||
// PrivateStateNotIn applies the NotIn predicate on the "private_state" field.
|
||||
func PrivateStateNotIn(vs ...string) predicate.Task {
|
||||
return predicate.Task(sql.FieldNotIn(FieldPrivateState, vs...))
|
||||
}
|
||||
|
||||
// PrivateStateGT applies the GT predicate on the "private_state" field.
|
||||
func PrivateStateGT(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldGT(FieldPrivateState, v))
|
||||
}
|
||||
|
||||
// PrivateStateGTE applies the GTE predicate on the "private_state" field.
|
||||
func PrivateStateGTE(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldGTE(FieldPrivateState, v))
|
||||
}
|
||||
|
||||
// PrivateStateLT applies the LT predicate on the "private_state" field.
|
||||
func PrivateStateLT(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldLT(FieldPrivateState, v))
|
||||
}
|
||||
|
||||
// PrivateStateLTE applies the LTE predicate on the "private_state" field.
|
||||
func PrivateStateLTE(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldLTE(FieldPrivateState, v))
|
||||
}
|
||||
|
||||
// PrivateStateContains applies the Contains predicate on the "private_state" field.
|
||||
func PrivateStateContains(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldContains(FieldPrivateState, v))
|
||||
}
|
||||
|
||||
// PrivateStateHasPrefix applies the HasPrefix predicate on the "private_state" field.
|
||||
func PrivateStateHasPrefix(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldHasPrefix(FieldPrivateState, v))
|
||||
}
|
||||
|
||||
// PrivateStateHasSuffix applies the HasSuffix predicate on the "private_state" field.
|
||||
func PrivateStateHasSuffix(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldHasSuffix(FieldPrivateState, v))
|
||||
}
|
||||
|
||||
// PrivateStateIsNil applies the IsNil predicate on the "private_state" field.
|
||||
func PrivateStateIsNil() predicate.Task {
|
||||
return predicate.Task(sql.FieldIsNull(FieldPrivateState))
|
||||
}
|
||||
|
||||
// PrivateStateNotNil applies the NotNil predicate on the "private_state" field.
|
||||
func PrivateStateNotNil() predicate.Task {
|
||||
return predicate.Task(sql.FieldNotNull(FieldPrivateState))
|
||||
}
|
||||
|
||||
// PrivateStateEqualFold applies the EqualFold predicate on the "private_state" field.
|
||||
func PrivateStateEqualFold(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldEqualFold(FieldPrivateState, v))
|
||||
}
|
||||
|
||||
// PrivateStateContainsFold applies the ContainsFold predicate on the "private_state" field.
|
||||
func PrivateStateContainsFold(v string) predicate.Task {
|
||||
return predicate.Task(sql.FieldContainsFold(FieldPrivateState, v))
|
||||
}
|
||||
|
||||
// CorrelationIDEQ applies the EQ predicate on the "correlation_id" field.
|
||||
func CorrelationIDEQ(v uuid.UUID) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldCorrelationID, v))
|
||||
}
|
||||
|
||||
// CorrelationIDNEQ applies the NEQ predicate on the "correlation_id" field.
|
||||
func CorrelationIDNEQ(v uuid.UUID) predicate.Task {
|
||||
return predicate.Task(sql.FieldNEQ(FieldCorrelationID, v))
|
||||
}
|
||||
|
||||
// CorrelationIDIn applies the In predicate on the "correlation_id" field.
|
||||
func CorrelationIDIn(vs ...uuid.UUID) predicate.Task {
|
||||
return predicate.Task(sql.FieldIn(FieldCorrelationID, vs...))
|
||||
}
|
||||
|
||||
// CorrelationIDNotIn applies the NotIn predicate on the "correlation_id" field.
|
||||
func CorrelationIDNotIn(vs ...uuid.UUID) predicate.Task {
|
||||
return predicate.Task(sql.FieldNotIn(FieldCorrelationID, vs...))
|
||||
}
|
||||
|
||||
// CorrelationIDGT applies the GT predicate on the "correlation_id" field.
|
||||
func CorrelationIDGT(v uuid.UUID) predicate.Task {
|
||||
return predicate.Task(sql.FieldGT(FieldCorrelationID, v))
|
||||
}
|
||||
|
||||
// CorrelationIDGTE applies the GTE predicate on the "correlation_id" field.
|
||||
func CorrelationIDGTE(v uuid.UUID) predicate.Task {
|
||||
return predicate.Task(sql.FieldGTE(FieldCorrelationID, v))
|
||||
}
|
||||
|
||||
// CorrelationIDLT applies the LT predicate on the "correlation_id" field.
|
||||
func CorrelationIDLT(v uuid.UUID) predicate.Task {
|
||||
return predicate.Task(sql.FieldLT(FieldCorrelationID, v))
|
||||
}
|
||||
|
||||
// CorrelationIDLTE applies the LTE predicate on the "correlation_id" field.
|
||||
func CorrelationIDLTE(v uuid.UUID) predicate.Task {
|
||||
return predicate.Task(sql.FieldLTE(FieldCorrelationID, v))
|
||||
}
|
||||
|
||||
// CorrelationIDIsNil applies the IsNil predicate on the "correlation_id" field.
|
||||
func CorrelationIDIsNil() predicate.Task {
|
||||
return predicate.Task(sql.FieldIsNull(FieldCorrelationID))
|
||||
}
|
||||
|
||||
// CorrelationIDNotNil applies the NotNil predicate on the "correlation_id" field.
|
||||
func CorrelationIDNotNil() predicate.Task {
|
||||
return predicate.Task(sql.FieldNotNull(FieldCorrelationID))
|
||||
}
|
||||
|
||||
// UserTasksEQ applies the EQ predicate on the "user_tasks" field.
|
||||
func UserTasksEQ(v int) predicate.Task {
|
||||
return predicate.Task(sql.FieldEQ(FieldUserTasks, v))
|
||||
}
|
||||
|
||||
// UserTasksNEQ applies the NEQ predicate on the "user_tasks" field.
|
||||
func UserTasksNEQ(v int) predicate.Task {
|
||||
return predicate.Task(sql.FieldNEQ(FieldUserTasks, v))
|
||||
}
|
||||
|
||||
// UserTasksIn applies the In predicate on the "user_tasks" field.
|
||||
func UserTasksIn(vs ...int) predicate.Task {
|
||||
return predicate.Task(sql.FieldIn(FieldUserTasks, vs...))
|
||||
}
|
||||
|
||||
// UserTasksNotIn applies the NotIn predicate on the "user_tasks" field.
|
||||
func UserTasksNotIn(vs ...int) predicate.Task {
|
||||
return predicate.Task(sql.FieldNotIn(FieldUserTasks, vs...))
|
||||
}
|
||||
|
||||
// UserTasksIsNil applies the IsNil predicate on the "user_tasks" field.
|
||||
func UserTasksIsNil() predicate.Task {
|
||||
return predicate.Task(sql.FieldIsNull(FieldUserTasks))
|
||||
}
|
||||
|
||||
// UserTasksNotNil applies the NotNil predicate on the "user_tasks" field.
|
||||
func UserTasksNotNil() predicate.Task {
|
||||
return predicate.Task(sql.FieldNotNull(FieldUserTasks))
|
||||
}
|
||||
|
||||
// HasUser applies the HasEdge predicate on the "user" edge.
|
||||
func HasUser() predicate.Task {
|
||||
return predicate.Task(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
|
||||
func HasUserWith(preds ...predicate.User) predicate.Task {
|
||||
return predicate.Task(func(s *sql.Selector) {
|
||||
step := newUserStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.Task) predicate.Task {
|
||||
return predicate.Task(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Task) predicate.Task {
|
||||
return predicate.Task(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Task) predicate.Task {
|
||||
return predicate.Task(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user