// Code generated by ent, DO NOT EDIT.

package enrollment

import (
	"demo/ent/predicate"

	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
)

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

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

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

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

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

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

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

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

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

// Semester applies equality check predicate on the "semester" field. It's identical to SemesterEQ.
func Semester(v string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldEQ(FieldSemester, v))
}

// Year applies equality check predicate on the "year" field. It's identical to YearEQ.
func Year(v int) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldEQ(FieldYear, v))
}

// SemesterEQ applies the EQ predicate on the "semester" field.
func SemesterEQ(v string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldEQ(FieldSemester, v))
}

// SemesterNEQ applies the NEQ predicate on the "semester" field.
func SemesterNEQ(v string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldNEQ(FieldSemester, v))
}

// SemesterIn applies the In predicate on the "semester" field.
func SemesterIn(vs ...string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldIn(FieldSemester, vs...))
}

// SemesterNotIn applies the NotIn predicate on the "semester" field.
func SemesterNotIn(vs ...string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldNotIn(FieldSemester, vs...))
}

// SemesterGT applies the GT predicate on the "semester" field.
func SemesterGT(v string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldGT(FieldSemester, v))
}

// SemesterGTE applies the GTE predicate on the "semester" field.
func SemesterGTE(v string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldGTE(FieldSemester, v))
}

// SemesterLT applies the LT predicate on the "semester" field.
func SemesterLT(v string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldLT(FieldSemester, v))
}

// SemesterLTE applies the LTE predicate on the "semester" field.
func SemesterLTE(v string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldLTE(FieldSemester, v))
}

// SemesterContains applies the Contains predicate on the "semester" field.
func SemesterContains(v string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldContains(FieldSemester, v))
}

// SemesterHasPrefix applies the HasPrefix predicate on the "semester" field.
func SemesterHasPrefix(v string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldHasPrefix(FieldSemester, v))
}

// SemesterHasSuffix applies the HasSuffix predicate on the "semester" field.
func SemesterHasSuffix(v string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldHasSuffix(FieldSemester, v))
}

// SemesterEqualFold applies the EqualFold predicate on the "semester" field.
func SemesterEqualFold(v string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldEqualFold(FieldSemester, v))
}

// SemesterContainsFold applies the ContainsFold predicate on the "semester" field.
func SemesterContainsFold(v string) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldContainsFold(FieldSemester, v))
}

// YearEQ applies the EQ predicate on the "year" field.
func YearEQ(v int) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldEQ(FieldYear, v))
}

// YearNEQ applies the NEQ predicate on the "year" field.
func YearNEQ(v int) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldNEQ(FieldYear, v))
}

// YearIn applies the In predicate on the "year" field.
func YearIn(vs ...int) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldIn(FieldYear, vs...))
}

// YearNotIn applies the NotIn predicate on the "year" field.
func YearNotIn(vs ...int) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldNotIn(FieldYear, vs...))
}

// YearGT applies the GT predicate on the "year" field.
func YearGT(v int) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldGT(FieldYear, v))
}

// YearGTE applies the GTE predicate on the "year" field.
func YearGTE(v int) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldGTE(FieldYear, v))
}

// YearLT applies the LT predicate on the "year" field.
func YearLT(v int) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldLT(FieldYear, v))
}

// YearLTE applies the LTE predicate on the "year" field.
func YearLTE(v int) predicate.Enrollment {
	return predicate.Enrollment(sql.FieldLTE(FieldYear, v))
}

// HasStudent applies the HasEdge predicate on the "student" edge.
func HasStudent() predicate.Enrollment {
	return predicate.Enrollment(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, true, StudentTable, StudentColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

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

// HasCourse applies the HasEdge predicate on the "course" edge.
func HasCourse() predicate.Enrollment {
	return predicate.Enrollment(func(s *sql.Selector) {
		step := sqlgraph.NewStep(
			sqlgraph.From(Table, FieldID),
			sqlgraph.Edge(sqlgraph.M2O, true, CourseTable, CourseColumn),
		)
		sqlgraph.HasNeighbors(s, step)
	})
}

// HasCourseWith applies the HasEdge predicate on the "course" edge with a given conditions (other predicates).
func HasCourseWith(preds ...predicate.Course) predicate.Enrollment {
	return predicate.Enrollment(func(s *sql.Selector) {
		step := newCourseStep()
		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.Enrollment) predicate.Enrollment {
	return predicate.Enrollment(sql.AndPredicates(predicates...))
}

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

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