Init V4 community edition (#2265)
* Init V4 community edition * Init V4 community edition
This commit is contained in:
224
ent/entity/entity.go
Normal file
224
ent/entity/entity.go
Normal file
@@ -0,0 +1,224 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package entity
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the entity type in the database.
|
||||
Label = "entity"
|
||||
// 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"
|
||||
// FieldSource holds the string denoting the source field in the database.
|
||||
FieldSource = "source"
|
||||
// FieldSize holds the string denoting the size field in the database.
|
||||
FieldSize = "size"
|
||||
// FieldReferenceCount holds the string denoting the reference_count field in the database.
|
||||
FieldReferenceCount = "reference_count"
|
||||
// FieldStoragePolicyEntities holds the string denoting the storage_policy_entities field in the database.
|
||||
FieldStoragePolicyEntities = "storage_policy_entities"
|
||||
// FieldCreatedBy holds the string denoting the created_by field in the database.
|
||||
FieldCreatedBy = "created_by"
|
||||
// FieldUploadSessionID holds the string denoting the upload_session_id field in the database.
|
||||
FieldUploadSessionID = "upload_session_id"
|
||||
// FieldRecycleOptions holds the string denoting the recycle_options field in the database.
|
||||
FieldRecycleOptions = "recycle_options"
|
||||
// EdgeFile holds the string denoting the file edge name in mutations.
|
||||
EdgeFile = "file"
|
||||
// EdgeUser holds the string denoting the user edge name in mutations.
|
||||
EdgeUser = "user"
|
||||
// EdgeStoragePolicy holds the string denoting the storage_policy edge name in mutations.
|
||||
EdgeStoragePolicy = "storage_policy"
|
||||
// Table holds the table name of the entity in the database.
|
||||
Table = "entities"
|
||||
// FileTable is the table that holds the file relation/edge. The primary key declared below.
|
||||
FileTable = "file_entities"
|
||||
// FileInverseTable is the table name for the File entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "file" package.
|
||||
FileInverseTable = "files"
|
||||
// UserTable is the table that holds the user relation/edge.
|
||||
UserTable = "entities"
|
||||
// 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 = "created_by"
|
||||
// StoragePolicyTable is the table that holds the storage_policy relation/edge.
|
||||
StoragePolicyTable = "entities"
|
||||
// StoragePolicyInverseTable is the table name for the StoragePolicy entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "storagepolicy" package.
|
||||
StoragePolicyInverseTable = "storage_policies"
|
||||
// StoragePolicyColumn is the table column denoting the storage_policy relation/edge.
|
||||
StoragePolicyColumn = "storage_policy_entities"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for entity fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldDeletedAt,
|
||||
FieldType,
|
||||
FieldSource,
|
||||
FieldSize,
|
||||
FieldReferenceCount,
|
||||
FieldStoragePolicyEntities,
|
||||
FieldCreatedBy,
|
||||
FieldUploadSessionID,
|
||||
FieldRecycleOptions,
|
||||
}
|
||||
|
||||
var (
|
||||
// FilePrimaryKey and FileColumn2 are the table columns denoting the
|
||||
// primary key for the file relation (M2M).
|
||||
FilePrimaryKey = []string{"file_id", "entity_id"}
|
||||
)
|
||||
|
||||
// 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
|
||||
// DefaultReferenceCount holds the default value on creation for the "reference_count" field.
|
||||
DefaultReferenceCount int
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Entity 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()
|
||||
}
|
||||
|
||||
// BySource orders the results by the source field.
|
||||
func BySource(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSource, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySize orders the results by the size field.
|
||||
func BySize(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSize, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByReferenceCount orders the results by the reference_count field.
|
||||
func ByReferenceCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldReferenceCount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStoragePolicyEntities orders the results by the storage_policy_entities field.
|
||||
func ByStoragePolicyEntities(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStoragePolicyEntities, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedBy orders the results by the created_by field.
|
||||
func ByCreatedBy(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedBy, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUploadSessionID orders the results by the upload_session_id field.
|
||||
func ByUploadSessionID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUploadSessionID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFileCount orders the results by file count.
|
||||
func ByFileCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newFileStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByFile orders the results by file terms.
|
||||
func ByFile(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newFileStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// 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...))
|
||||
}
|
||||
}
|
||||
|
||||
// ByStoragePolicyField orders the results by storage_policy field.
|
||||
func ByStoragePolicyField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newStoragePolicyStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
func newFileStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(FileInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, true, FileTable, FilePrimaryKey...),
|
||||
)
|
||||
}
|
||||
func newUserStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(UserInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
|
||||
)
|
||||
}
|
||||
func newStoragePolicyStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(StoragePolicyInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, StoragePolicyTable, StoragePolicyColumn),
|
||||
)
|
||||
}
|
||||
616
ent/entity/where.go
Normal file
616
ent/entity/where.go
Normal file
@@ -0,0 +1,616 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package entity
|
||||
|
||||
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.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.Entity {
|
||||
return predicate.Entity(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.Entity {
|
||||
return predicate.Entity(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.Entity {
|
||||
return predicate.Entity(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.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// Type applies equality check predicate on the "type" field. It's identical to TypeEQ.
|
||||
func Type(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldType, v))
|
||||
}
|
||||
|
||||
// Source applies equality check predicate on the "source" field. It's identical to SourceEQ.
|
||||
func Source(v string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldSource, v))
|
||||
}
|
||||
|
||||
// Size applies equality check predicate on the "size" field. It's identical to SizeEQ.
|
||||
func Size(v int64) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldSize, v))
|
||||
}
|
||||
|
||||
// ReferenceCount applies equality check predicate on the "reference_count" field. It's identical to ReferenceCountEQ.
|
||||
func ReferenceCount(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldReferenceCount, v))
|
||||
}
|
||||
|
||||
// StoragePolicyEntities applies equality check predicate on the "storage_policy_entities" field. It's identical to StoragePolicyEntitiesEQ.
|
||||
func StoragePolicyEntities(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldStoragePolicyEntities, v))
|
||||
}
|
||||
|
||||
// CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.
|
||||
func CreatedBy(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// UploadSessionID applies equality check predicate on the "upload_session_id" field. It's identical to UploadSessionIDEQ.
|
||||
func UploadSessionID(v uuid.UUID) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldUploadSessionID, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
|
||||
func DeletedAtEQ(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
|
||||
func DeletedAtNEQ(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIn applies the In predicate on the "deleted_at" field.
|
||||
func DeletedAtIn(vs ...time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
|
||||
func DeletedAtNotIn(vs ...time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtGT applies the GT predicate on the "deleted_at" field.
|
||||
func DeletedAtGT(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
|
||||
func DeletedAtGTE(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLT applies the LT predicate on the "deleted_at" field.
|
||||
func DeletedAtLT(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
|
||||
func DeletedAtLTE(v time.Time) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
|
||||
func DeletedAtIsNil() predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIsNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
|
||||
func DeletedAtNotNil() predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// TypeEQ applies the EQ predicate on the "type" field.
|
||||
func TypeEQ(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeNEQ applies the NEQ predicate on the "type" field.
|
||||
func TypeNEQ(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNEQ(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeIn applies the In predicate on the "type" field.
|
||||
func TypeIn(vs ...int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIn(FieldType, vs...))
|
||||
}
|
||||
|
||||
// TypeNotIn applies the NotIn predicate on the "type" field.
|
||||
func TypeNotIn(vs ...int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotIn(FieldType, vs...))
|
||||
}
|
||||
|
||||
// TypeGT applies the GT predicate on the "type" field.
|
||||
func TypeGT(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGT(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeGTE applies the GTE predicate on the "type" field.
|
||||
func TypeGTE(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGTE(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeLT applies the LT predicate on the "type" field.
|
||||
func TypeLT(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLT(FieldType, v))
|
||||
}
|
||||
|
||||
// TypeLTE applies the LTE predicate on the "type" field.
|
||||
func TypeLTE(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLTE(FieldType, v))
|
||||
}
|
||||
|
||||
// SourceEQ applies the EQ predicate on the "source" field.
|
||||
func SourceEQ(v string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldSource, v))
|
||||
}
|
||||
|
||||
// SourceNEQ applies the NEQ predicate on the "source" field.
|
||||
func SourceNEQ(v string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNEQ(FieldSource, v))
|
||||
}
|
||||
|
||||
// SourceIn applies the In predicate on the "source" field.
|
||||
func SourceIn(vs ...string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIn(FieldSource, vs...))
|
||||
}
|
||||
|
||||
// SourceNotIn applies the NotIn predicate on the "source" field.
|
||||
func SourceNotIn(vs ...string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotIn(FieldSource, vs...))
|
||||
}
|
||||
|
||||
// SourceGT applies the GT predicate on the "source" field.
|
||||
func SourceGT(v string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGT(FieldSource, v))
|
||||
}
|
||||
|
||||
// SourceGTE applies the GTE predicate on the "source" field.
|
||||
func SourceGTE(v string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGTE(FieldSource, v))
|
||||
}
|
||||
|
||||
// SourceLT applies the LT predicate on the "source" field.
|
||||
func SourceLT(v string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLT(FieldSource, v))
|
||||
}
|
||||
|
||||
// SourceLTE applies the LTE predicate on the "source" field.
|
||||
func SourceLTE(v string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLTE(FieldSource, v))
|
||||
}
|
||||
|
||||
// SourceContains applies the Contains predicate on the "source" field.
|
||||
func SourceContains(v string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldContains(FieldSource, v))
|
||||
}
|
||||
|
||||
// SourceHasPrefix applies the HasPrefix predicate on the "source" field.
|
||||
func SourceHasPrefix(v string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldHasPrefix(FieldSource, v))
|
||||
}
|
||||
|
||||
// SourceHasSuffix applies the HasSuffix predicate on the "source" field.
|
||||
func SourceHasSuffix(v string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldHasSuffix(FieldSource, v))
|
||||
}
|
||||
|
||||
// SourceEqualFold applies the EqualFold predicate on the "source" field.
|
||||
func SourceEqualFold(v string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEqualFold(FieldSource, v))
|
||||
}
|
||||
|
||||
// SourceContainsFold applies the ContainsFold predicate on the "source" field.
|
||||
func SourceContainsFold(v string) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldContainsFold(FieldSource, v))
|
||||
}
|
||||
|
||||
// SizeEQ applies the EQ predicate on the "size" field.
|
||||
func SizeEQ(v int64) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeNEQ applies the NEQ predicate on the "size" field.
|
||||
func SizeNEQ(v int64) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNEQ(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeIn applies the In predicate on the "size" field.
|
||||
func SizeIn(vs ...int64) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIn(FieldSize, vs...))
|
||||
}
|
||||
|
||||
// SizeNotIn applies the NotIn predicate on the "size" field.
|
||||
func SizeNotIn(vs ...int64) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotIn(FieldSize, vs...))
|
||||
}
|
||||
|
||||
// SizeGT applies the GT predicate on the "size" field.
|
||||
func SizeGT(v int64) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGT(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeGTE applies the GTE predicate on the "size" field.
|
||||
func SizeGTE(v int64) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGTE(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeLT applies the LT predicate on the "size" field.
|
||||
func SizeLT(v int64) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLT(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeLTE applies the LTE predicate on the "size" field.
|
||||
func SizeLTE(v int64) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLTE(FieldSize, v))
|
||||
}
|
||||
|
||||
// ReferenceCountEQ applies the EQ predicate on the "reference_count" field.
|
||||
func ReferenceCountEQ(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldReferenceCount, v))
|
||||
}
|
||||
|
||||
// ReferenceCountNEQ applies the NEQ predicate on the "reference_count" field.
|
||||
func ReferenceCountNEQ(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNEQ(FieldReferenceCount, v))
|
||||
}
|
||||
|
||||
// ReferenceCountIn applies the In predicate on the "reference_count" field.
|
||||
func ReferenceCountIn(vs ...int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIn(FieldReferenceCount, vs...))
|
||||
}
|
||||
|
||||
// ReferenceCountNotIn applies the NotIn predicate on the "reference_count" field.
|
||||
func ReferenceCountNotIn(vs ...int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotIn(FieldReferenceCount, vs...))
|
||||
}
|
||||
|
||||
// ReferenceCountGT applies the GT predicate on the "reference_count" field.
|
||||
func ReferenceCountGT(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGT(FieldReferenceCount, v))
|
||||
}
|
||||
|
||||
// ReferenceCountGTE applies the GTE predicate on the "reference_count" field.
|
||||
func ReferenceCountGTE(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGTE(FieldReferenceCount, v))
|
||||
}
|
||||
|
||||
// ReferenceCountLT applies the LT predicate on the "reference_count" field.
|
||||
func ReferenceCountLT(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLT(FieldReferenceCount, v))
|
||||
}
|
||||
|
||||
// ReferenceCountLTE applies the LTE predicate on the "reference_count" field.
|
||||
func ReferenceCountLTE(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLTE(FieldReferenceCount, v))
|
||||
}
|
||||
|
||||
// StoragePolicyEntitiesEQ applies the EQ predicate on the "storage_policy_entities" field.
|
||||
func StoragePolicyEntitiesEQ(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldStoragePolicyEntities, v))
|
||||
}
|
||||
|
||||
// StoragePolicyEntitiesNEQ applies the NEQ predicate on the "storage_policy_entities" field.
|
||||
func StoragePolicyEntitiesNEQ(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNEQ(FieldStoragePolicyEntities, v))
|
||||
}
|
||||
|
||||
// StoragePolicyEntitiesIn applies the In predicate on the "storage_policy_entities" field.
|
||||
func StoragePolicyEntitiesIn(vs ...int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIn(FieldStoragePolicyEntities, vs...))
|
||||
}
|
||||
|
||||
// StoragePolicyEntitiesNotIn applies the NotIn predicate on the "storage_policy_entities" field.
|
||||
func StoragePolicyEntitiesNotIn(vs ...int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotIn(FieldStoragePolicyEntities, vs...))
|
||||
}
|
||||
|
||||
// CreatedByEQ applies the EQ predicate on the "created_by" field.
|
||||
func CreatedByEQ(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// CreatedByNEQ applies the NEQ predicate on the "created_by" field.
|
||||
func CreatedByNEQ(v int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNEQ(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// CreatedByIn applies the In predicate on the "created_by" field.
|
||||
func CreatedByIn(vs ...int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIn(FieldCreatedBy, vs...))
|
||||
}
|
||||
|
||||
// CreatedByNotIn applies the NotIn predicate on the "created_by" field.
|
||||
func CreatedByNotIn(vs ...int) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotIn(FieldCreatedBy, vs...))
|
||||
}
|
||||
|
||||
// CreatedByIsNil applies the IsNil predicate on the "created_by" field.
|
||||
func CreatedByIsNil() predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIsNull(FieldCreatedBy))
|
||||
}
|
||||
|
||||
// CreatedByNotNil applies the NotNil predicate on the "created_by" field.
|
||||
func CreatedByNotNil() predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotNull(FieldCreatedBy))
|
||||
}
|
||||
|
||||
// UploadSessionIDEQ applies the EQ predicate on the "upload_session_id" field.
|
||||
func UploadSessionIDEQ(v uuid.UUID) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldEQ(FieldUploadSessionID, v))
|
||||
}
|
||||
|
||||
// UploadSessionIDNEQ applies the NEQ predicate on the "upload_session_id" field.
|
||||
func UploadSessionIDNEQ(v uuid.UUID) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNEQ(FieldUploadSessionID, v))
|
||||
}
|
||||
|
||||
// UploadSessionIDIn applies the In predicate on the "upload_session_id" field.
|
||||
func UploadSessionIDIn(vs ...uuid.UUID) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIn(FieldUploadSessionID, vs...))
|
||||
}
|
||||
|
||||
// UploadSessionIDNotIn applies the NotIn predicate on the "upload_session_id" field.
|
||||
func UploadSessionIDNotIn(vs ...uuid.UUID) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotIn(FieldUploadSessionID, vs...))
|
||||
}
|
||||
|
||||
// UploadSessionIDGT applies the GT predicate on the "upload_session_id" field.
|
||||
func UploadSessionIDGT(v uuid.UUID) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGT(FieldUploadSessionID, v))
|
||||
}
|
||||
|
||||
// UploadSessionIDGTE applies the GTE predicate on the "upload_session_id" field.
|
||||
func UploadSessionIDGTE(v uuid.UUID) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldGTE(FieldUploadSessionID, v))
|
||||
}
|
||||
|
||||
// UploadSessionIDLT applies the LT predicate on the "upload_session_id" field.
|
||||
func UploadSessionIDLT(v uuid.UUID) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLT(FieldUploadSessionID, v))
|
||||
}
|
||||
|
||||
// UploadSessionIDLTE applies the LTE predicate on the "upload_session_id" field.
|
||||
func UploadSessionIDLTE(v uuid.UUID) predicate.Entity {
|
||||
return predicate.Entity(sql.FieldLTE(FieldUploadSessionID, v))
|
||||
}
|
||||
|
||||
// UploadSessionIDIsNil applies the IsNil predicate on the "upload_session_id" field.
|
||||
func UploadSessionIDIsNil() predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIsNull(FieldUploadSessionID))
|
||||
}
|
||||
|
||||
// UploadSessionIDNotNil applies the NotNil predicate on the "upload_session_id" field.
|
||||
func UploadSessionIDNotNil() predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotNull(FieldUploadSessionID))
|
||||
}
|
||||
|
||||
// RecycleOptionsIsNil applies the IsNil predicate on the "recycle_options" field.
|
||||
func RecycleOptionsIsNil() predicate.Entity {
|
||||
return predicate.Entity(sql.FieldIsNull(FieldRecycleOptions))
|
||||
}
|
||||
|
||||
// RecycleOptionsNotNil applies the NotNil predicate on the "recycle_options" field.
|
||||
func RecycleOptionsNotNil() predicate.Entity {
|
||||
return predicate.Entity(sql.FieldNotNull(FieldRecycleOptions))
|
||||
}
|
||||
|
||||
// HasFile applies the HasEdge predicate on the "file" edge.
|
||||
func HasFile() predicate.Entity {
|
||||
return predicate.Entity(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, true, FileTable, FilePrimaryKey...),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasFileWith applies the HasEdge predicate on the "file" edge with a given conditions (other predicates).
|
||||
func HasFileWith(preds ...predicate.File) predicate.Entity {
|
||||
return predicate.Entity(func(s *sql.Selector) {
|
||||
step := newFileStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasUser applies the HasEdge predicate on the "user" edge.
|
||||
func HasUser() predicate.Entity {
|
||||
return predicate.Entity(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.Entity {
|
||||
return predicate.Entity(func(s *sql.Selector) {
|
||||
step := newUserStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasStoragePolicy applies the HasEdge predicate on the "storage_policy" edge.
|
||||
func HasStoragePolicy() predicate.Entity {
|
||||
return predicate.Entity(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, StoragePolicyTable, StoragePolicyColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasStoragePolicyWith applies the HasEdge predicate on the "storage_policy" edge with a given conditions (other predicates).
|
||||
func HasStoragePolicyWith(preds ...predicate.StoragePolicy) predicate.Entity {
|
||||
return predicate.Entity(func(s *sql.Selector) {
|
||||
step := newStoragePolicyStep()
|
||||
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.Entity) predicate.Entity {
|
||||
return predicate.Entity(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Entity) predicate.Entity {
|
||||
return predicate.Entity(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Entity) predicate.Entity {
|
||||
return predicate.Entity(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user