215 lines
7.4 KiB
Go
215 lines
7.4 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package postcontributor
|
|
|
|
import (
|
|
"time"
|
|
"tss-rocks-be/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.PostContributor {
|
|
return predicate.PostContributor(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id int) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id int) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldNEQ(FieldID, id))
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...int) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...int) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldNotIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id int) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldGT(FieldID, id))
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id int) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldGTE(FieldID, id))
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id int) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldLT(FieldID, id))
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id int) predicate.PostContributor {
|
|
return predicate.PostContributor(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.PostContributor {
|
|
return predicate.PostContributor(sql.FieldEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// LanguageCodeEQ applies the EQ predicate on the "language_code" field.
|
|
func LanguageCodeEQ(v LanguageCode) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldEQ(FieldLanguageCode, v))
|
|
}
|
|
|
|
// LanguageCodeNEQ applies the NEQ predicate on the "language_code" field.
|
|
func LanguageCodeNEQ(v LanguageCode) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldNEQ(FieldLanguageCode, v))
|
|
}
|
|
|
|
// LanguageCodeIn applies the In predicate on the "language_code" field.
|
|
func LanguageCodeIn(vs ...LanguageCode) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldIn(FieldLanguageCode, vs...))
|
|
}
|
|
|
|
// LanguageCodeNotIn applies the NotIn predicate on the "language_code" field.
|
|
func LanguageCodeNotIn(vs ...LanguageCode) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldNotIn(FieldLanguageCode, vs...))
|
|
}
|
|
|
|
// LanguageCodeIsNil applies the IsNil predicate on the "language_code" field.
|
|
func LanguageCodeIsNil() predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldIsNull(FieldLanguageCode))
|
|
}
|
|
|
|
// LanguageCodeNotNil applies the NotNil predicate on the "language_code" field.
|
|
func LanguageCodeNotNil() predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldNotNull(FieldLanguageCode))
|
|
}
|
|
|
|
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
|
func CreatedAtEQ(v time.Time) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
|
func CreatedAtNEQ(v time.Time) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldNEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtIn applies the In predicate on the "created_at" field.
|
|
func CreatedAtIn(vs ...time.Time) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
|
func CreatedAtNotIn(vs ...time.Time) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldNotIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
|
func CreatedAtGT(v time.Time) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldGT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
|
func CreatedAtGTE(v time.Time) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldGTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
|
func CreatedAtLT(v time.Time) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldLT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
|
func CreatedAtLTE(v time.Time) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.FieldLTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// HasPost applies the HasEdge predicate on the "post" edge.
|
|
func HasPost() predicate.PostContributor {
|
|
return predicate.PostContributor(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, true, PostTable, PostColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasPostWith applies the HasEdge predicate on the "post" edge with a given conditions (other predicates).
|
|
func HasPostWith(preds ...predicate.Post) predicate.PostContributor {
|
|
return predicate.PostContributor(func(s *sql.Selector) {
|
|
step := newPostStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasContributor applies the HasEdge predicate on the "contributor" edge.
|
|
func HasContributor() predicate.PostContributor {
|
|
return predicate.PostContributor(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, true, ContributorTable, ContributorColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasContributorWith applies the HasEdge predicate on the "contributor" edge with a given conditions (other predicates).
|
|
func HasContributorWith(preds ...predicate.Contributor) predicate.PostContributor {
|
|
return predicate.PostContributor(func(s *sql.Selector) {
|
|
step := newContributorStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasRole applies the HasEdge predicate on the "role" edge.
|
|
func HasRole() predicate.PostContributor {
|
|
return predicate.PostContributor(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, true, RoleTable, RoleColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasRoleWith applies the HasEdge predicate on the "role" edge with a given conditions (other predicates).
|
|
func HasRoleWith(preds ...predicate.ContributorRole) predicate.PostContributor {
|
|
return predicate.PostContributor(func(s *sql.Selector) {
|
|
step := newRoleStep()
|
|
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.PostContributor) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.AndPredicates(predicates...))
|
|
}
|
|
|
|
// Or groups predicates with the OR operator between them.
|
|
func Or(predicates ...predicate.PostContributor) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.OrPredicates(predicates...))
|
|
}
|
|
|
|
// Not applies the not operator on the given predicate.
|
|
func Not(p predicate.PostContributor) predicate.PostContributor {
|
|
return predicate.PostContributor(sql.NotPredicates(p))
|
|
}
|