// Code generated by ent, DO NOT EDIT.

package file

import (
	"time"

	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"github.com/cloudreve/Cloudreve/v4/ent/predicate"
)

// ID filters vertices based on their ID field.
func ID(id int) predicate.File {
	return predicate.File(sql.FieldEQ(FieldID, id))
}

// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.File {
	return predicate.File(sql.FieldEQ(FieldID, id))
}

// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldID, id))
}

// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.File {
	return predicate.File(sql.FieldIn(FieldID, ids...))
}

// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldID, ids...))
}

// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.File {
	return predicate.File(sql.FieldGT(FieldID, id))
}

// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.File {
	return predicate.File(sql.FieldGTE(FieldID, id))
}

// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.File {
	return predicate.File(sql.FieldLT(FieldID, id))
}

// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.File {
	return predicate.File(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.File {
	return predicate.File(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.File {
	return predicate.File(sql.FieldEQ(FieldUpdatedAt, v))
}

// Type applies equality check predicate on the "type" field. It's identical to TypeEQ.
func Type(v int) predicate.File {
	return predicate.File(sql.FieldEQ(FieldType, v))
}

// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
func Name(v string) predicate.File {
	return predicate.File(sql.FieldEQ(FieldName, v))
}

// OwnerID applies equality check predicate on the "owner_id" field. It's identical to OwnerIDEQ.
func OwnerID(v int) predicate.File {
	return predicate.File(sql.FieldEQ(FieldOwnerID, v))
}

// Size applies equality check predicate on the "size" field. It's identical to SizeEQ.
func Size(v int64) predicate.File {
	return predicate.File(sql.FieldEQ(FieldSize, v))
}

// PrimaryEntity applies equality check predicate on the "primary_entity" field. It's identical to PrimaryEntityEQ.
func PrimaryEntity(v int) predicate.File {
	return predicate.File(sql.FieldEQ(FieldPrimaryEntity, v))
}

// FileChildren applies equality check predicate on the "file_children" field. It's identical to FileChildrenEQ.
func FileChildren(v int) predicate.File {
	return predicate.File(sql.FieldEQ(FieldFileChildren, v))
}

// IsSymbolic applies equality check predicate on the "is_symbolic" field. It's identical to IsSymbolicEQ.
func IsSymbolic(v bool) predicate.File {
	return predicate.File(sql.FieldEQ(FieldIsSymbolic, v))
}

// StoragePolicyFiles applies equality check predicate on the "storage_policy_files" field. It's identical to StoragePolicyFilesEQ.
func StoragePolicyFiles(v int) predicate.File {
	return predicate.File(sql.FieldEQ(FieldStoragePolicyFiles, v))
}

// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.File {
	return predicate.File(sql.FieldEQ(FieldCreatedAt, v))
}

// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldCreatedAt, v))
}

// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.File {
	return predicate.File(sql.FieldIn(FieldCreatedAt, vs...))
}

// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldCreatedAt, vs...))
}

// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.File {
	return predicate.File(sql.FieldGT(FieldCreatedAt, v))
}

// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.File {
	return predicate.File(sql.FieldGTE(FieldCreatedAt, v))
}

// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.File {
	return predicate.File(sql.FieldLT(FieldCreatedAt, v))
}

// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.File {
	return predicate.File(sql.FieldLTE(FieldCreatedAt, v))
}

// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtEQ(v time.Time) predicate.File {
	return predicate.File(sql.FieldEQ(FieldUpdatedAt, v))
}

// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNEQ(v time.Time) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldUpdatedAt, v))
}

// UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIn(vs ...time.Time) predicate.File {
	return predicate.File(sql.FieldIn(FieldUpdatedAt, vs...))
}

// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotIn(vs ...time.Time) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldUpdatedAt, vs...))
}

// UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGT(v time.Time) predicate.File {
	return predicate.File(sql.FieldGT(FieldUpdatedAt, v))
}

// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtGTE(v time.Time) predicate.File {
	return predicate.File(sql.FieldGTE(FieldUpdatedAt, v))
}

// UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLT(v time.Time) predicate.File {
	return predicate.File(sql.FieldLT(FieldUpdatedAt, v))
}

// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtLTE(v time.Time) predicate.File {
	return predicate.File(sql.FieldLTE(FieldUpdatedAt, v))
}

// TypeEQ applies the EQ predicate on the "type" field.
func TypeEQ(v int) predicate.File {
	return predicate.File(sql.FieldEQ(FieldType, v))
}

// TypeNEQ applies the NEQ predicate on the "type" field.
func TypeNEQ(v int) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldType, v))
}

// TypeIn applies the In predicate on the "type" field.
func TypeIn(vs ...int) predicate.File {
	return predicate.File(sql.FieldIn(FieldType, vs...))
}

// TypeNotIn applies the NotIn predicate on the "type" field.
func TypeNotIn(vs ...int) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldType, vs...))
}

// TypeGT applies the GT predicate on the "type" field.
func TypeGT(v int) predicate.File {
	return predicate.File(sql.FieldGT(FieldType, v))
}

// TypeGTE applies the GTE predicate on the "type" field.
func TypeGTE(v int) predicate.File {
	return predicate.File(sql.FieldGTE(FieldType, v))
}

// TypeLT applies the LT predicate on the "type" field.
func TypeLT(v int) predicate.File {
	return predicate.File(sql.FieldLT(FieldType, v))
}

// TypeLTE applies the LTE predicate on the "type" field.
func TypeLTE(v int) predicate.File {
	return predicate.File(sql.FieldLTE(FieldType, v))
}

// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.File {
	return predicate.File(sql.FieldEQ(FieldName, v))
}

// NameNEQ applies the NEQ predicate on the "name" field.
func NameNEQ(v string) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldName, v))
}

// NameIn applies the In predicate on the "name" field.
func NameIn(vs ...string) predicate.File {
	return predicate.File(sql.FieldIn(FieldName, vs...))
}

// NameNotIn applies the NotIn predicate on the "name" field.
func NameNotIn(vs ...string) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldName, vs...))
}

// NameGT applies the GT predicate on the "name" field.
func NameGT(v string) predicate.File {
	return predicate.File(sql.FieldGT(FieldName, v))
}

// NameGTE applies the GTE predicate on the "name" field.
func NameGTE(v string) predicate.File {
	return predicate.File(sql.FieldGTE(FieldName, v))
}

// NameLT applies the LT predicate on the "name" field.
func NameLT(v string) predicate.File {
	return predicate.File(sql.FieldLT(FieldName, v))
}

// NameLTE applies the LTE predicate on the "name" field.
func NameLTE(v string) predicate.File {
	return predicate.File(sql.FieldLTE(FieldName, v))
}

// NameContains applies the Contains predicate on the "name" field.
func NameContains(v string) predicate.File {
	return predicate.File(sql.FieldContains(FieldName, v))
}

// NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasPrefix(v string) predicate.File {
	return predicate.File(sql.FieldHasPrefix(FieldName, v))
}

// NameHasSuffix applies the HasSuffix predicate on the "name" field.
func NameHasSuffix(v string) predicate.File {
	return predicate.File(sql.FieldHasSuffix(FieldName, v))
}

// NameEqualFold applies the EqualFold predicate on the "name" field.
func NameEqualFold(v string) predicate.File {
	return predicate.File(sql.FieldEqualFold(FieldName, v))
}

// NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameContainsFold(v string) predicate.File {
	return predicate.File(sql.FieldContainsFold(FieldName, v))
}

// OwnerIDEQ applies the EQ predicate on the "owner_id" field.
func OwnerIDEQ(v int) predicate.File {
	return predicate.File(sql.FieldEQ(FieldOwnerID, v))
}

// OwnerIDNEQ applies the NEQ predicate on the "owner_id" field.
func OwnerIDNEQ(v int) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldOwnerID, v))
}

// OwnerIDIn applies the In predicate on the "owner_id" field.
func OwnerIDIn(vs ...int) predicate.File {
	return predicate.File(sql.FieldIn(FieldOwnerID, vs...))
}

// OwnerIDNotIn applies the NotIn predicate on the "owner_id" field.
func OwnerIDNotIn(vs ...int) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldOwnerID, vs...))
}

// SizeEQ applies the EQ predicate on the "size" field.
func SizeEQ(v int64) predicate.File {
	return predicate.File(sql.FieldEQ(FieldSize, v))
}

// SizeNEQ applies the NEQ predicate on the "size" field.
func SizeNEQ(v int64) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldSize, v))
}

// SizeIn applies the In predicate on the "size" field.
func SizeIn(vs ...int64) predicate.File {
	return predicate.File(sql.FieldIn(FieldSize, vs...))
}

// SizeNotIn applies the NotIn predicate on the "size" field.
func SizeNotIn(vs ...int64) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldSize, vs...))
}

// SizeGT applies the GT predicate on the "size" field.
func SizeGT(v int64) predicate.File {
	return predicate.File(sql.FieldGT(FieldSize, v))
}

// SizeGTE applies the GTE predicate on the "size" field.
func SizeGTE(v int64) predicate.File {
	return predicate.File(sql.FieldGTE(FieldSize, v))
}

// SizeLT applies the LT predicate on the "size" field.
func SizeLT(v int64) predicate.File {
	return predicate.File(sql.FieldLT(FieldSize, v))
}

// SizeLTE applies the LTE predicate on the "size" field.
func SizeLTE(v int64) predicate.File {
	return predicate.File(sql.FieldLTE(FieldSize, v))
}

// PrimaryEntityEQ applies the EQ predicate on the "primary_entity" field.
func PrimaryEntityEQ(v int) predicate.File {
	return predicate.File(sql.FieldEQ(FieldPrimaryEntity, v))
}

// PrimaryEntityNEQ applies the NEQ predicate on the "primary_entity" field.
func PrimaryEntityNEQ(v int) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldPrimaryEntity, v))
}

// PrimaryEntityIn applies the In predicate on the "primary_entity" field.
func PrimaryEntityIn(vs ...int) predicate.File {
	return predicate.File(sql.FieldIn(FieldPrimaryEntity, vs...))
}

// PrimaryEntityNotIn applies the NotIn predicate on the "primary_entity" field.
func PrimaryEntityNotIn(vs ...int) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldPrimaryEntity, vs...))
}

// PrimaryEntityGT applies the GT predicate on the "primary_entity" field.
func PrimaryEntityGT(v int) predicate.File {
	return predicate.File(sql.FieldGT(FieldPrimaryEntity, v))
}

// PrimaryEntityGTE applies the GTE predicate on the "primary_entity" field.
func PrimaryEntityGTE(v int) predicate.File {
	return predicate.File(sql.FieldGTE(FieldPrimaryEntity, v))
}

// PrimaryEntityLT applies the LT predicate on the "primary_entity" field.
func PrimaryEntityLT(v int) predicate.File {
	return predicate.File(sql.FieldLT(FieldPrimaryEntity, v))
}

// PrimaryEntityLTE applies the LTE predicate on the "primary_entity" field.
func PrimaryEntityLTE(v int) predicate.File {
	return predicate.File(sql.FieldLTE(FieldPrimaryEntity, v))
}

// PrimaryEntityIsNil applies the IsNil predicate on the "primary_entity" field.
func PrimaryEntityIsNil() predicate.File {
	return predicate.File(sql.FieldIsNull(FieldPrimaryEntity))
}

// PrimaryEntityNotNil applies the NotNil predicate on the "primary_entity" field.
func PrimaryEntityNotNil() predicate.File {
	return predicate.File(sql.FieldNotNull(FieldPrimaryEntity))
}

// FileChildrenEQ applies the EQ predicate on the "file_children" field.
func FileChildrenEQ(v int) predicate.File {
	return predicate.File(sql.FieldEQ(FieldFileChildren, v))
}

// FileChildrenNEQ applies the NEQ predicate on the "file_children" field.
func FileChildrenNEQ(v int) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldFileChildren, v))
}

// FileChildrenIn applies the In predicate on the "file_children" field.
func FileChildrenIn(vs ...int) predicate.File {
	return predicate.File(sql.FieldIn(FieldFileChildren, vs...))
}

// FileChildrenNotIn applies the NotIn predicate on the "file_children" field.
func FileChildrenNotIn(vs ...int) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldFileChildren, vs...))
}

// FileChildrenIsNil applies the IsNil predicate on the "file_children" field.
func FileChildrenIsNil() predicate.File {
	return predicate.File(sql.FieldIsNull(FieldFileChildren))
}

// FileChildrenNotNil applies the NotNil predicate on the "file_children" field.
func FileChildrenNotNil() predicate.File {
	return predicate.File(sql.FieldNotNull(FieldFileChildren))
}

// IsSymbolicEQ applies the EQ predicate on the "is_symbolic" field.
func IsSymbolicEQ(v bool) predicate.File {
	return predicate.File(sql.FieldEQ(FieldIsSymbolic, v))
}

// IsSymbolicNEQ applies the NEQ predicate on the "is_symbolic" field.
func IsSymbolicNEQ(v bool) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldIsSymbolic, v))
}

// PropsIsNil applies the IsNil predicate on the "props" field.
func PropsIsNil() predicate.File {
	return predicate.File(sql.FieldIsNull(FieldProps))
}

// PropsNotNil applies the NotNil predicate on the "props" field.
func PropsNotNil() predicate.File {
	return predicate.File(sql.FieldNotNull(FieldProps))
}

// StoragePolicyFilesEQ applies the EQ predicate on the "storage_policy_files" field.
func StoragePolicyFilesEQ(v int) predicate.File {
	return predicate.File(sql.FieldEQ(FieldStoragePolicyFiles, v))
}

// StoragePolicyFilesNEQ applies the NEQ predicate on the "storage_policy_files" field.
func StoragePolicyFilesNEQ(v int) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldStoragePolicyFiles, v))
}

// StoragePolicyFilesIn applies the In predicate on the "storage_policy_files" field.
func StoragePolicyFilesIn(vs ...int) predicate.File {
	return predicate.File(sql.FieldIn(FieldStoragePolicyFiles, vs...))
}

// StoragePolicyFilesNotIn applies the NotIn predicate on the "storage_policy_files" field.
func StoragePolicyFilesNotIn(vs ...int) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldStoragePolicyFiles, vs...))
}

// StoragePolicyFilesIsNil applies the IsNil predicate on the "storage_policy_files" field.
func StoragePolicyFilesIsNil() predicate.File {
	return predicate.File(sql.FieldIsNull(FieldStoragePolicyFiles))
}

// StoragePolicyFilesNotNil applies the NotNil predicate on the "storage_policy_files" field.
func StoragePolicyFilesNotNil() predicate.File {
	return predicate.File(sql.FieldNotNull(FieldStoragePolicyFiles))
}

// HasOwner applies the HasEdge predicate on the "owner" edge.
func HasOwner() predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasOwnerWith applies the HasEdge predicate on the "owner" edge with a given conditions (other predicates).
func HasOwnerWith(preds ...predicate.User) predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := newOwnerStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasStoragePolicies applies the HasEdge predicate on the "storage_policies" edge.
func HasStoragePolicies() predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, true, StoragePoliciesTable, StoragePoliciesColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasStoragePoliciesWith applies the HasEdge predicate on the "storage_policies" edge with a given conditions (other predicates).
func HasStoragePoliciesWith(preds ...predicate.StoragePolicy) predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := newStoragePoliciesStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasParent applies the HasEdge predicate on the "parent" edge.
func HasParent() predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasParentWith applies the HasEdge predicate on the "parent" edge with a given conditions (other predicates).
func HasParentWith(preds ...predicate.File) predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := newParentStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasChildren applies the HasEdge predicate on the "children" edge.
func HasChildren() predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates).
func HasChildrenWith(preds ...predicate.File) predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := newChildrenStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasMetadata applies the HasEdge predicate on the "metadata" edge.
func HasMetadata() predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, MetadataTable, MetadataColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasMetadataWith applies the HasEdge predicate on the "metadata" edge with a given conditions (other predicates).
func HasMetadataWith(preds ...predicate.Metadata) predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := newMetadataStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasEntities applies the HasEdge predicate on the "entities" edge.
func HasEntities() predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2M, false, EntitiesTable, EntitiesPrimaryKey...),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasEntitiesWith applies the HasEdge predicate on the "entities" edge with a given conditions (other predicates).
func HasEntitiesWith(preds ...predicate.Entity) predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := newEntitiesStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasShares applies the HasEdge predicate on the "shares" edge.
func HasShares() predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, SharesTable, SharesColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasSharesWith applies the HasEdge predicate on the "shares" edge with a given conditions (other predicates).
func HasSharesWith(preds ...predicate.Share) predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := newSharesStep()
		sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
			for _, p := range preds {
				p(s)
			}
		})
	})
}

// HasDirectLinks applies the HasEdge predicate on the "direct_links" edge.
func HasDirectLinks() predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2M, false, DirectLinksTable, DirectLinksColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasDirectLinksWith applies the HasEdge predicate on the "direct_links" edge with a given conditions (other predicates).
func HasDirectLinksWith(preds ...predicate.DirectLink) predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := newDirectLinksStep()
		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.File) predicate.File {
	return predicate.File(sql.AndPredicates(predicates...))
}

// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.File) predicate.File {
	return predicate.File(sql.OrPredicates(predicates...))
}

// Not applies the not operator on the given predicate.
func Not(p predicate.File) predicate.File {
	return predicate.File(sql.NotPredicates(p))
}
