// Code generated by ent, DO NOT EDIT.

package file

import (
	"time"

	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"github.com/anzhiyu-c/anheyu-app/ent/predicate"
)

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

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

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

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

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

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

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

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

// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id uint) predicate.File {
	return predicate.File(sql.FieldLTE(FieldID, id))
}

// DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAt(v time.Time) predicate.File {
	return predicate.File(sql.FieldEQ(FieldDeletedAt, v))
}

// 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))
}

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

// ParentID applies equality check predicate on the "parent_id" field. It's identical to ParentIDEQ.
func ParentID(v uint) predicate.File {
	return predicate.File(sql.FieldEQ(FieldParentID, 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))
}

// 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))
}

// PrimaryEntityID applies equality check predicate on the "primary_entity_id" field. It's identical to PrimaryEntityIDEQ.
func PrimaryEntityID(v uint) predicate.File {
	return predicate.File(sql.FieldEQ(FieldPrimaryEntityID, v))
}

// ChildrenCount applies equality check predicate on the "children_count" field. It's identical to ChildrenCountEQ.
func ChildrenCount(v int64) predicate.File {
	return predicate.File(sql.FieldEQ(FieldChildrenCount, v))
}

// ViewConfig applies equality check predicate on the "view_config" field. It's identical to ViewConfigEQ.
func ViewConfig(v string) predicate.File {
	return predicate.File(sql.FieldEQ(FieldViewConfig, v))
}

// DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtEQ(v time.Time) predicate.File {
	return predicate.File(sql.FieldEQ(FieldDeletedAt, v))
}

// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNEQ(v time.Time) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldDeletedAt, v))
}

// DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIn(vs ...time.Time) predicate.File {
	return predicate.File(sql.FieldIn(FieldDeletedAt, vs...))
}

// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotIn(vs ...time.Time) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldDeletedAt, vs...))
}

// DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGT(v time.Time) predicate.File {
	return predicate.File(sql.FieldGT(FieldDeletedAt, v))
}

// DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtGTE(v time.Time) predicate.File {
	return predicate.File(sql.FieldGTE(FieldDeletedAt, v))
}

// DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLT(v time.Time) predicate.File {
	return predicate.File(sql.FieldLT(FieldDeletedAt, v))
}

// DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtLTE(v time.Time) predicate.File {
	return predicate.File(sql.FieldLTE(FieldDeletedAt, v))
}

// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtIsNil() predicate.File {
	return predicate.File(sql.FieldIsNull(FieldDeletedAt))
}

// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func DeletedAtNotNil() predicate.File {
	return predicate.File(sql.FieldNotNull(FieldDeletedAt))
}

// 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))
}

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

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

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

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

// ParentIDEQ applies the EQ predicate on the "parent_id" field.
func ParentIDEQ(v uint) predicate.File {
	return predicate.File(sql.FieldEQ(FieldParentID, v))
}

// ParentIDNEQ applies the NEQ predicate on the "parent_id" field.
func ParentIDNEQ(v uint) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldParentID, v))
}

// ParentIDIn applies the In predicate on the "parent_id" field.
func ParentIDIn(vs ...uint) predicate.File {
	return predicate.File(sql.FieldIn(FieldParentID, vs...))
}

// ParentIDNotIn applies the NotIn predicate on the "parent_id" field.
func ParentIDNotIn(vs ...uint) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldParentID, vs...))
}

// ParentIDIsNil applies the IsNil predicate on the "parent_id" field.
func ParentIDIsNil() predicate.File {
	return predicate.File(sql.FieldIsNull(FieldParentID))
}

// ParentIDNotNil applies the NotNil predicate on the "parent_id" field.
func ParentIDNotNil() predicate.File {
	return predicate.File(sql.FieldNotNull(FieldParentID))
}

// 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))
}

// 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))
}

// PrimaryEntityIDEQ applies the EQ predicate on the "primary_entity_id" field.
func PrimaryEntityIDEQ(v uint) predicate.File {
	return predicate.File(sql.FieldEQ(FieldPrimaryEntityID, v))
}

// PrimaryEntityIDNEQ applies the NEQ predicate on the "primary_entity_id" field.
func PrimaryEntityIDNEQ(v uint) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldPrimaryEntityID, v))
}

// PrimaryEntityIDIn applies the In predicate on the "primary_entity_id" field.
func PrimaryEntityIDIn(vs ...uint) predicate.File {
	return predicate.File(sql.FieldIn(FieldPrimaryEntityID, vs...))
}

// PrimaryEntityIDNotIn applies the NotIn predicate on the "primary_entity_id" field.
func PrimaryEntityIDNotIn(vs ...uint) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldPrimaryEntityID, vs...))
}

// PrimaryEntityIDIsNil applies the IsNil predicate on the "primary_entity_id" field.
func PrimaryEntityIDIsNil() predicate.File {
	return predicate.File(sql.FieldIsNull(FieldPrimaryEntityID))
}

// PrimaryEntityIDNotNil applies the NotNil predicate on the "primary_entity_id" field.
func PrimaryEntityIDNotNil() predicate.File {
	return predicate.File(sql.FieldNotNull(FieldPrimaryEntityID))
}

// ChildrenCountEQ applies the EQ predicate on the "children_count" field.
func ChildrenCountEQ(v int64) predicate.File {
	return predicate.File(sql.FieldEQ(FieldChildrenCount, v))
}

// ChildrenCountNEQ applies the NEQ predicate on the "children_count" field.
func ChildrenCountNEQ(v int64) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldChildrenCount, v))
}

// ChildrenCountIn applies the In predicate on the "children_count" field.
func ChildrenCountIn(vs ...int64) predicate.File {
	return predicate.File(sql.FieldIn(FieldChildrenCount, vs...))
}

// ChildrenCountNotIn applies the NotIn predicate on the "children_count" field.
func ChildrenCountNotIn(vs ...int64) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldChildrenCount, vs...))
}

// ChildrenCountGT applies the GT predicate on the "children_count" field.
func ChildrenCountGT(v int64) predicate.File {
	return predicate.File(sql.FieldGT(FieldChildrenCount, v))
}

// ChildrenCountGTE applies the GTE predicate on the "children_count" field.
func ChildrenCountGTE(v int64) predicate.File {
	return predicate.File(sql.FieldGTE(FieldChildrenCount, v))
}

// ChildrenCountLT applies the LT predicate on the "children_count" field.
func ChildrenCountLT(v int64) predicate.File {
	return predicate.File(sql.FieldLT(FieldChildrenCount, v))
}

// ChildrenCountLTE applies the LTE predicate on the "children_count" field.
func ChildrenCountLTE(v int64) predicate.File {
	return predicate.File(sql.FieldLTE(FieldChildrenCount, v))
}

// ViewConfigEQ applies the EQ predicate on the "view_config" field.
func ViewConfigEQ(v string) predicate.File {
	return predicate.File(sql.FieldEQ(FieldViewConfig, v))
}

// ViewConfigNEQ applies the NEQ predicate on the "view_config" field.
func ViewConfigNEQ(v string) predicate.File {
	return predicate.File(sql.FieldNEQ(FieldViewConfig, v))
}

// ViewConfigIn applies the In predicate on the "view_config" field.
func ViewConfigIn(vs ...string) predicate.File {
	return predicate.File(sql.FieldIn(FieldViewConfig, vs...))
}

// ViewConfigNotIn applies the NotIn predicate on the "view_config" field.
func ViewConfigNotIn(vs ...string) predicate.File {
	return predicate.File(sql.FieldNotIn(FieldViewConfig, vs...))
}

// ViewConfigGT applies the GT predicate on the "view_config" field.
func ViewConfigGT(v string) predicate.File {
	return predicate.File(sql.FieldGT(FieldViewConfig, v))
}

// ViewConfigGTE applies the GTE predicate on the "view_config" field.
func ViewConfigGTE(v string) predicate.File {
	return predicate.File(sql.FieldGTE(FieldViewConfig, v))
}

// ViewConfigLT applies the LT predicate on the "view_config" field.
func ViewConfigLT(v string) predicate.File {
	return predicate.File(sql.FieldLT(FieldViewConfig, v))
}

// ViewConfigLTE applies the LTE predicate on the "view_config" field.
func ViewConfigLTE(v string) predicate.File {
	return predicate.File(sql.FieldLTE(FieldViewConfig, v))
}

// ViewConfigContains applies the Contains predicate on the "view_config" field.
func ViewConfigContains(v string) predicate.File {
	return predicate.File(sql.FieldContains(FieldViewConfig, v))
}

// ViewConfigHasPrefix applies the HasPrefix predicate on the "view_config" field.
func ViewConfigHasPrefix(v string) predicate.File {
	return predicate.File(sql.FieldHasPrefix(FieldViewConfig, v))
}

// ViewConfigHasSuffix applies the HasSuffix predicate on the "view_config" field.
func ViewConfigHasSuffix(v string) predicate.File {
	return predicate.File(sql.FieldHasSuffix(FieldViewConfig, v))
}

// ViewConfigIsNil applies the IsNil predicate on the "view_config" field.
func ViewConfigIsNil() predicate.File {
	return predicate.File(sql.FieldIsNull(FieldViewConfig))
}

// ViewConfigNotNil applies the NotNil predicate on the "view_config" field.
func ViewConfigNotNil() predicate.File {
	return predicate.File(sql.FieldNotNull(FieldViewConfig))
}

// ViewConfigEqualFold applies the EqualFold predicate on the "view_config" field.
func ViewConfigEqualFold(v string) predicate.File {
	return predicate.File(sql.FieldEqualFold(FieldViewConfig, v))
}

// ViewConfigContainsFold applies the ContainsFold predicate on the "view_config" field.
func ViewConfigContainsFold(v string) predicate.File {
	return predicate.File(sql.FieldContainsFold(FieldViewConfig, v))
}

// 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)
			}
		})
	})
}

// 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, false, 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, true, 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)
			}
		})
	})
}

// HasPrimaryEntity applies the HasEdge predicate on the "primary_entity" edge.
func HasPrimaryEntity() predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, false, PrimaryEntityTable, PrimaryEntityColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

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

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

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

// HasDirectLink applies the HasEdge predicate on the "direct_link" edge.
func HasDirectLink() predicate.File {
	return predicate.File(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, false, DirectLinkTable, DirectLinkColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

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

// 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))
}
