| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- // Code generated by ent, DO NOT EDIT.
- package announcementread
- import (
- "time"
- "entgo.io/ent/dialect/sql"
- "entgo.io/ent/dialect/sql/sqlgraph"
- "github.com/Wei-Shaw/sub2api/ent/predicate"
- )
- // ID filters vertices based on their ID field.
- func ID(id int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldEQ(FieldID, id))
- }
- // IDEQ applies the EQ predicate on the ID field.
- func IDEQ(id int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldEQ(FieldID, id))
- }
- // IDNEQ applies the NEQ predicate on the ID field.
- func IDNEQ(id int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldNEQ(FieldID, id))
- }
- // IDIn applies the In predicate on the ID field.
- func IDIn(ids ...int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldIn(FieldID, ids...))
- }
- // IDNotIn applies the NotIn predicate on the ID field.
- func IDNotIn(ids ...int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldNotIn(FieldID, ids...))
- }
- // IDGT applies the GT predicate on the ID field.
- func IDGT(id int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldGT(FieldID, id))
- }
- // IDGTE applies the GTE predicate on the ID field.
- func IDGTE(id int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldGTE(FieldID, id))
- }
- // IDLT applies the LT predicate on the ID field.
- func IDLT(id int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldLT(FieldID, id))
- }
- // IDLTE applies the LTE predicate on the ID field.
- func IDLTE(id int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldLTE(FieldID, id))
- }
- // AnnouncementID applies equality check predicate on the "announcement_id" field. It's identical to AnnouncementIDEQ.
- func AnnouncementID(v int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldEQ(FieldAnnouncementID, v))
- }
- // UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
- func UserID(v int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldEQ(FieldUserID, v))
- }
- // ReadAt applies equality check predicate on the "read_at" field. It's identical to ReadAtEQ.
- func ReadAt(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldEQ(FieldReadAt, v))
- }
- // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
- func CreatedAt(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldEQ(FieldCreatedAt, v))
- }
- // AnnouncementIDEQ applies the EQ predicate on the "announcement_id" field.
- func AnnouncementIDEQ(v int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldEQ(FieldAnnouncementID, v))
- }
- // AnnouncementIDNEQ applies the NEQ predicate on the "announcement_id" field.
- func AnnouncementIDNEQ(v int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldNEQ(FieldAnnouncementID, v))
- }
- // AnnouncementIDIn applies the In predicate on the "announcement_id" field.
- func AnnouncementIDIn(vs ...int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldIn(FieldAnnouncementID, vs...))
- }
- // AnnouncementIDNotIn applies the NotIn predicate on the "announcement_id" field.
- func AnnouncementIDNotIn(vs ...int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldNotIn(FieldAnnouncementID, vs...))
- }
- // UserIDEQ applies the EQ predicate on the "user_id" field.
- func UserIDEQ(v int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldEQ(FieldUserID, v))
- }
- // UserIDNEQ applies the NEQ predicate on the "user_id" field.
- func UserIDNEQ(v int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldNEQ(FieldUserID, v))
- }
- // UserIDIn applies the In predicate on the "user_id" field.
- func UserIDIn(vs ...int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldIn(FieldUserID, vs...))
- }
- // UserIDNotIn applies the NotIn predicate on the "user_id" field.
- func UserIDNotIn(vs ...int64) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldNotIn(FieldUserID, vs...))
- }
- // ReadAtEQ applies the EQ predicate on the "read_at" field.
- func ReadAtEQ(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldEQ(FieldReadAt, v))
- }
- // ReadAtNEQ applies the NEQ predicate on the "read_at" field.
- func ReadAtNEQ(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldNEQ(FieldReadAt, v))
- }
- // ReadAtIn applies the In predicate on the "read_at" field.
- func ReadAtIn(vs ...time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldIn(FieldReadAt, vs...))
- }
- // ReadAtNotIn applies the NotIn predicate on the "read_at" field.
- func ReadAtNotIn(vs ...time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldNotIn(FieldReadAt, vs...))
- }
- // ReadAtGT applies the GT predicate on the "read_at" field.
- func ReadAtGT(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldGT(FieldReadAt, v))
- }
- // ReadAtGTE applies the GTE predicate on the "read_at" field.
- func ReadAtGTE(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldGTE(FieldReadAt, v))
- }
- // ReadAtLT applies the LT predicate on the "read_at" field.
- func ReadAtLT(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldLT(FieldReadAt, v))
- }
- // ReadAtLTE applies the LTE predicate on the "read_at" field.
- func ReadAtLTE(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldLTE(FieldReadAt, v))
- }
- // CreatedAtEQ applies the EQ predicate on the "created_at" field.
- func CreatedAtEQ(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldEQ(FieldCreatedAt, v))
- }
- // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
- func CreatedAtNEQ(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldNEQ(FieldCreatedAt, v))
- }
- // CreatedAtIn applies the In predicate on the "created_at" field.
- func CreatedAtIn(vs ...time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldIn(FieldCreatedAt, vs...))
- }
- // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
- func CreatedAtNotIn(vs ...time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldNotIn(FieldCreatedAt, vs...))
- }
- // CreatedAtGT applies the GT predicate on the "created_at" field.
- func CreatedAtGT(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldGT(FieldCreatedAt, v))
- }
- // CreatedAtGTE applies the GTE predicate on the "created_at" field.
- func CreatedAtGTE(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldGTE(FieldCreatedAt, v))
- }
- // CreatedAtLT applies the LT predicate on the "created_at" field.
- func CreatedAtLT(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldLT(FieldCreatedAt, v))
- }
- // CreatedAtLTE applies the LTE predicate on the "created_at" field.
- func CreatedAtLTE(v time.Time) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.FieldLTE(FieldCreatedAt, v))
- }
- // HasAnnouncement applies the HasEdge predicate on the "announcement" edge.
- func HasAnnouncement() predicate.AnnouncementRead {
- return predicate.AnnouncementRead(func(s *sql.Selector) {
- step := sqlgraph.NewStep(
- sqlgraph.From(Table, FieldID),
- sqlgraph.Edge(sqlgraph.M2O, true, AnnouncementTable, AnnouncementColumn),
- )
- sqlgraph.HasNeighbors(s, step)
- })
- }
- // HasAnnouncementWith applies the HasEdge predicate on the "announcement" edge with a given conditions (other predicates).
- func HasAnnouncementWith(preds ...predicate.Announcement) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(func(s *sql.Selector) {
- step := newAnnouncementStep()
- sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
- for _, p := range preds {
- p(s)
- }
- })
- })
- }
- // HasUser applies the HasEdge predicate on the "user" edge.
- func HasUser() predicate.AnnouncementRead {
- return predicate.AnnouncementRead(func(s *sql.Selector) {
- step := sqlgraph.NewStep(
- sqlgraph.From(Table, FieldID),
- sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
- )
- sqlgraph.HasNeighbors(s, step)
- })
- }
- // HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
- func HasUserWith(preds ...predicate.User) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(func(s *sql.Selector) {
- step := newUserStep()
- 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.AnnouncementRead) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.AndPredicates(predicates...))
- }
- // Or groups predicates with the OR operator between them.
- func Or(predicates ...predicate.AnnouncementRead) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.OrPredicates(predicates...))
- }
- // Not applies the not operator on the given predicate.
- func Not(p predicate.AnnouncementRead) predicate.AnnouncementRead {
- return predicate.AnnouncementRead(sql.NotPredicates(p))
- }
|