// Code generated by ent, DO NOT EDIT.

package directlink

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.DirectLink {
	return predicate.DirectLink(sql.FieldEQ(FieldID, id))
}

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

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

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

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

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

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

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

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

// FileID applies equality check predicate on the "file_id" field. It's identical to FileIDEQ.
func FileID(v uint) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldEQ(FieldFileID, v))
}

// FileName applies equality check predicate on the "file_name" field. It's identical to FileNameEQ.
func FileName(v string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldEQ(FieldFileName, v))
}

// SpeedLimit applies equality check predicate on the "speed_limit" field. It's identical to SpeedLimitEQ.
func SpeedLimit(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldEQ(FieldSpeedLimit, v))
}

// Downloads applies equality check predicate on the "downloads" field. It's identical to DownloadsEQ.
func Downloads(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldEQ(FieldDownloads, v))
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// FileIDEQ applies the EQ predicate on the "file_id" field.
func FileIDEQ(v uint) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldEQ(FieldFileID, v))
}

// FileIDNEQ applies the NEQ predicate on the "file_id" field.
func FileIDNEQ(v uint) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldNEQ(FieldFileID, v))
}

// FileIDIn applies the In predicate on the "file_id" field.
func FileIDIn(vs ...uint) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldIn(FieldFileID, vs...))
}

// FileIDNotIn applies the NotIn predicate on the "file_id" field.
func FileIDNotIn(vs ...uint) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldNotIn(FieldFileID, vs...))
}

// FileNameEQ applies the EQ predicate on the "file_name" field.
func FileNameEQ(v string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldEQ(FieldFileName, v))
}

// FileNameNEQ applies the NEQ predicate on the "file_name" field.
func FileNameNEQ(v string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldNEQ(FieldFileName, v))
}

// FileNameIn applies the In predicate on the "file_name" field.
func FileNameIn(vs ...string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldIn(FieldFileName, vs...))
}

// FileNameNotIn applies the NotIn predicate on the "file_name" field.
func FileNameNotIn(vs ...string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldNotIn(FieldFileName, vs...))
}

// FileNameGT applies the GT predicate on the "file_name" field.
func FileNameGT(v string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldGT(FieldFileName, v))
}

// FileNameGTE applies the GTE predicate on the "file_name" field.
func FileNameGTE(v string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldGTE(FieldFileName, v))
}

// FileNameLT applies the LT predicate on the "file_name" field.
func FileNameLT(v string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldLT(FieldFileName, v))
}

// FileNameLTE applies the LTE predicate on the "file_name" field.
func FileNameLTE(v string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldLTE(FieldFileName, v))
}

// FileNameContains applies the Contains predicate on the "file_name" field.
func FileNameContains(v string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldContains(FieldFileName, v))
}

// FileNameHasPrefix applies the HasPrefix predicate on the "file_name" field.
func FileNameHasPrefix(v string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldHasPrefix(FieldFileName, v))
}

// FileNameHasSuffix applies the HasSuffix predicate on the "file_name" field.
func FileNameHasSuffix(v string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldHasSuffix(FieldFileName, v))
}

// FileNameEqualFold applies the EqualFold predicate on the "file_name" field.
func FileNameEqualFold(v string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldEqualFold(FieldFileName, v))
}

// FileNameContainsFold applies the ContainsFold predicate on the "file_name" field.
func FileNameContainsFold(v string) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldContainsFold(FieldFileName, v))
}

// SpeedLimitEQ applies the EQ predicate on the "speed_limit" field.
func SpeedLimitEQ(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldEQ(FieldSpeedLimit, v))
}

// SpeedLimitNEQ applies the NEQ predicate on the "speed_limit" field.
func SpeedLimitNEQ(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldNEQ(FieldSpeedLimit, v))
}

// SpeedLimitIn applies the In predicate on the "speed_limit" field.
func SpeedLimitIn(vs ...int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldIn(FieldSpeedLimit, vs...))
}

// SpeedLimitNotIn applies the NotIn predicate on the "speed_limit" field.
func SpeedLimitNotIn(vs ...int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldNotIn(FieldSpeedLimit, vs...))
}

// SpeedLimitGT applies the GT predicate on the "speed_limit" field.
func SpeedLimitGT(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldGT(FieldSpeedLimit, v))
}

// SpeedLimitGTE applies the GTE predicate on the "speed_limit" field.
func SpeedLimitGTE(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldGTE(FieldSpeedLimit, v))
}

// SpeedLimitLT applies the LT predicate on the "speed_limit" field.
func SpeedLimitLT(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldLT(FieldSpeedLimit, v))
}

// SpeedLimitLTE applies the LTE predicate on the "speed_limit" field.
func SpeedLimitLTE(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldLTE(FieldSpeedLimit, v))
}

// DownloadsEQ applies the EQ predicate on the "downloads" field.
func DownloadsEQ(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldEQ(FieldDownloads, v))
}

// DownloadsNEQ applies the NEQ predicate on the "downloads" field.
func DownloadsNEQ(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldNEQ(FieldDownloads, v))
}

// DownloadsIn applies the In predicate on the "downloads" field.
func DownloadsIn(vs ...int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldIn(FieldDownloads, vs...))
}

// DownloadsNotIn applies the NotIn predicate on the "downloads" field.
func DownloadsNotIn(vs ...int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldNotIn(FieldDownloads, vs...))
}

// DownloadsGT applies the GT predicate on the "downloads" field.
func DownloadsGT(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldGT(FieldDownloads, v))
}

// DownloadsGTE applies the GTE predicate on the "downloads" field.
func DownloadsGTE(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldGTE(FieldDownloads, v))
}

// DownloadsLT applies the LT predicate on the "downloads" field.
func DownloadsLT(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldLT(FieldDownloads, v))
}

// DownloadsLTE applies the LTE predicate on the "downloads" field.
func DownloadsLTE(v int64) predicate.DirectLink {
	return predicate.DirectLink(sql.FieldLTE(FieldDownloads, v))
}

// HasFile applies the HasEdge predicate on the "file" edge.
func HasFile() predicate.DirectLink {
	return predicate.DirectLink(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.O2O, true, FileTable, FileColumn),
		)
		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.DirectLink {
	return predicate.DirectLink(func(s *sql.Selector) {
		step := newFileStep()
		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.DirectLink) predicate.DirectLink {
	return predicate.DirectLink(sql.AndPredicates(predicates...))
}

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

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