320 lines
10 KiB
Go
320 lines
10 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package post
|
|
|
|
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.Post {
|
|
return predicate.Post(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDEQ applies the EQ predicate on the ID field.
|
|
func IDEQ(id int) predicate.Post {
|
|
return predicate.Post(sql.FieldEQ(FieldID, id))
|
|
}
|
|
|
|
// IDNEQ applies the NEQ predicate on the ID field.
|
|
func IDNEQ(id int) predicate.Post {
|
|
return predicate.Post(sql.FieldNEQ(FieldID, id))
|
|
}
|
|
|
|
// IDIn applies the In predicate on the ID field.
|
|
func IDIn(ids ...int) predicate.Post {
|
|
return predicate.Post(sql.FieldIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDNotIn applies the NotIn predicate on the ID field.
|
|
func IDNotIn(ids ...int) predicate.Post {
|
|
return predicate.Post(sql.FieldNotIn(FieldID, ids...))
|
|
}
|
|
|
|
// IDGT applies the GT predicate on the ID field.
|
|
func IDGT(id int) predicate.Post {
|
|
return predicate.Post(sql.FieldGT(FieldID, id))
|
|
}
|
|
|
|
// IDGTE applies the GTE predicate on the ID field.
|
|
func IDGTE(id int) predicate.Post {
|
|
return predicate.Post(sql.FieldGTE(FieldID, id))
|
|
}
|
|
|
|
// IDLT applies the LT predicate on the ID field.
|
|
func IDLT(id int) predicate.Post {
|
|
return predicate.Post(sql.FieldLT(FieldID, id))
|
|
}
|
|
|
|
// IDLTE applies the LTE predicate on the ID field.
|
|
func IDLTE(id int) predicate.Post {
|
|
return predicate.Post(sql.FieldLTE(FieldID, id))
|
|
}
|
|
|
|
// Slug applies equality check predicate on the "slug" field. It's identical to SlugEQ.
|
|
func Slug(v string) predicate.Post {
|
|
return predicate.Post(sql.FieldEQ(FieldSlug, v))
|
|
}
|
|
|
|
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
|
func CreatedAt(v time.Time) predicate.Post {
|
|
return predicate.Post(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.Post {
|
|
return predicate.Post(sql.FieldEQ(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// StatusEQ applies the EQ predicate on the "status" field.
|
|
func StatusEQ(v Status) predicate.Post {
|
|
return predicate.Post(sql.FieldEQ(FieldStatus, v))
|
|
}
|
|
|
|
// StatusNEQ applies the NEQ predicate on the "status" field.
|
|
func StatusNEQ(v Status) predicate.Post {
|
|
return predicate.Post(sql.FieldNEQ(FieldStatus, v))
|
|
}
|
|
|
|
// StatusIn applies the In predicate on the "status" field.
|
|
func StatusIn(vs ...Status) predicate.Post {
|
|
return predicate.Post(sql.FieldIn(FieldStatus, vs...))
|
|
}
|
|
|
|
// StatusNotIn applies the NotIn predicate on the "status" field.
|
|
func StatusNotIn(vs ...Status) predicate.Post {
|
|
return predicate.Post(sql.FieldNotIn(FieldStatus, vs...))
|
|
}
|
|
|
|
// SlugEQ applies the EQ predicate on the "slug" field.
|
|
func SlugEQ(v string) predicate.Post {
|
|
return predicate.Post(sql.FieldEQ(FieldSlug, v))
|
|
}
|
|
|
|
// SlugNEQ applies the NEQ predicate on the "slug" field.
|
|
func SlugNEQ(v string) predicate.Post {
|
|
return predicate.Post(sql.FieldNEQ(FieldSlug, v))
|
|
}
|
|
|
|
// SlugIn applies the In predicate on the "slug" field.
|
|
func SlugIn(vs ...string) predicate.Post {
|
|
return predicate.Post(sql.FieldIn(FieldSlug, vs...))
|
|
}
|
|
|
|
// SlugNotIn applies the NotIn predicate on the "slug" field.
|
|
func SlugNotIn(vs ...string) predicate.Post {
|
|
return predicate.Post(sql.FieldNotIn(FieldSlug, vs...))
|
|
}
|
|
|
|
// SlugGT applies the GT predicate on the "slug" field.
|
|
func SlugGT(v string) predicate.Post {
|
|
return predicate.Post(sql.FieldGT(FieldSlug, v))
|
|
}
|
|
|
|
// SlugGTE applies the GTE predicate on the "slug" field.
|
|
func SlugGTE(v string) predicate.Post {
|
|
return predicate.Post(sql.FieldGTE(FieldSlug, v))
|
|
}
|
|
|
|
// SlugLT applies the LT predicate on the "slug" field.
|
|
func SlugLT(v string) predicate.Post {
|
|
return predicate.Post(sql.FieldLT(FieldSlug, v))
|
|
}
|
|
|
|
// SlugLTE applies the LTE predicate on the "slug" field.
|
|
func SlugLTE(v string) predicate.Post {
|
|
return predicate.Post(sql.FieldLTE(FieldSlug, v))
|
|
}
|
|
|
|
// SlugContains applies the Contains predicate on the "slug" field.
|
|
func SlugContains(v string) predicate.Post {
|
|
return predicate.Post(sql.FieldContains(FieldSlug, v))
|
|
}
|
|
|
|
// SlugHasPrefix applies the HasPrefix predicate on the "slug" field.
|
|
func SlugHasPrefix(v string) predicate.Post {
|
|
return predicate.Post(sql.FieldHasPrefix(FieldSlug, v))
|
|
}
|
|
|
|
// SlugHasSuffix applies the HasSuffix predicate on the "slug" field.
|
|
func SlugHasSuffix(v string) predicate.Post {
|
|
return predicate.Post(sql.FieldHasSuffix(FieldSlug, v))
|
|
}
|
|
|
|
// SlugEqualFold applies the EqualFold predicate on the "slug" field.
|
|
func SlugEqualFold(v string) predicate.Post {
|
|
return predicate.Post(sql.FieldEqualFold(FieldSlug, v))
|
|
}
|
|
|
|
// SlugContainsFold applies the ContainsFold predicate on the "slug" field.
|
|
func SlugContainsFold(v string) predicate.Post {
|
|
return predicate.Post(sql.FieldContainsFold(FieldSlug, v))
|
|
}
|
|
|
|
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
|
func CreatedAtEQ(v time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
|
func CreatedAtNEQ(v time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldNEQ(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtIn applies the In predicate on the "created_at" field.
|
|
func CreatedAtIn(vs ...time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
|
func CreatedAtNotIn(vs ...time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldNotIn(FieldCreatedAt, vs...))
|
|
}
|
|
|
|
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
|
func CreatedAtGT(v time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldGT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
|
func CreatedAtGTE(v time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldGTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
|
func CreatedAtLT(v time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldLT(FieldCreatedAt, v))
|
|
}
|
|
|
|
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
|
func CreatedAtLTE(v time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldLTE(FieldCreatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
|
func UpdatedAtEQ(v time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldEQ(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
|
func UpdatedAtNEQ(v time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldNEQ(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
|
func UpdatedAtIn(vs ...time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldIn(FieldUpdatedAt, vs...))
|
|
}
|
|
|
|
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
|
func UpdatedAtNotIn(vs ...time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
|
}
|
|
|
|
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
|
func UpdatedAtGT(v time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldGT(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
|
func UpdatedAtGTE(v time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldGTE(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
|
func UpdatedAtLT(v time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldLT(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
|
func UpdatedAtLTE(v time.Time) predicate.Post {
|
|
return predicate.Post(sql.FieldLTE(FieldUpdatedAt, v))
|
|
}
|
|
|
|
// HasContents applies the HasEdge predicate on the "contents" edge.
|
|
func HasContents() predicate.Post {
|
|
return predicate.Post(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, ContentsTable, ContentsColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasContentsWith applies the HasEdge predicate on the "contents" edge with a given conditions (other predicates).
|
|
func HasContentsWith(preds ...predicate.PostContent) predicate.Post {
|
|
return predicate.Post(func(s *sql.Selector) {
|
|
step := newContentsStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasContributors applies the HasEdge predicate on the "contributors" edge.
|
|
func HasContributors() predicate.Post {
|
|
return predicate.Post(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, ContributorsTable, ContributorsColumn),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasContributorsWith applies the HasEdge predicate on the "contributors" edge with a given conditions (other predicates).
|
|
func HasContributorsWith(preds ...predicate.PostContributor) predicate.Post {
|
|
return predicate.Post(func(s *sql.Selector) {
|
|
step := newContributorsStep()
|
|
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})
|
|
})
|
|
}
|
|
|
|
// HasCategories applies the HasEdge predicate on the "categories" edge.
|
|
func HasCategories() predicate.Post {
|
|
return predicate.Post(func(s *sql.Selector) {
|
|
step := sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2M, true, CategoriesTable, CategoriesPrimaryKey...),
|
|
)
|
|
sqlgraph.HasNeighbors(s, step)
|
|
})
|
|
}
|
|
|
|
// HasCategoriesWith applies the HasEdge predicate on the "categories" edge with a given conditions (other predicates).
|
|
func HasCategoriesWith(preds ...predicate.Category) predicate.Post {
|
|
return predicate.Post(func(s *sql.Selector) {
|
|
step := newCategoriesStep()
|
|
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.Post) predicate.Post {
|
|
return predicate.Post(sql.AndPredicates(predicates...))
|
|
}
|
|
|
|
// Or groups predicates with the OR operator between them.
|
|
func Or(predicates ...predicate.Post) predicate.Post {
|
|
return predicate.Post(sql.OrPredicates(predicates...))
|
|
}
|
|
|
|
// Not applies the not operator on the given predicate.
|
|
func Not(p predicate.Post) predicate.Post {
|
|
return predicate.Post(sql.NotPredicates(p))
|
|
}
|