where.go 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. // Code generated by ent, DO NOT EDIT.
  2. package accountgroup
  3. import (
  4. "time"
  5. "entgo.io/ent/dialect/sql"
  6. "entgo.io/ent/dialect/sql/sqlgraph"
  7. "github.com/Wei-Shaw/sub2api/ent/predicate"
  8. )
  9. // AccountID applies equality check predicate on the "account_id" field. It's identical to AccountIDEQ.
  10. func AccountID(v int64) predicate.AccountGroup {
  11. return predicate.AccountGroup(sql.FieldEQ(FieldAccountID, v))
  12. }
  13. // GroupID applies equality check predicate on the "group_id" field. It's identical to GroupIDEQ.
  14. func GroupID(v int64) predicate.AccountGroup {
  15. return predicate.AccountGroup(sql.FieldEQ(FieldGroupID, v))
  16. }
  17. // Priority applies equality check predicate on the "priority" field. It's identical to PriorityEQ.
  18. func Priority(v int) predicate.AccountGroup {
  19. return predicate.AccountGroup(sql.FieldEQ(FieldPriority, v))
  20. }
  21. // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
  22. func CreatedAt(v time.Time) predicate.AccountGroup {
  23. return predicate.AccountGroup(sql.FieldEQ(FieldCreatedAt, v))
  24. }
  25. // AccountIDEQ applies the EQ predicate on the "account_id" field.
  26. func AccountIDEQ(v int64) predicate.AccountGroup {
  27. return predicate.AccountGroup(sql.FieldEQ(FieldAccountID, v))
  28. }
  29. // AccountIDNEQ applies the NEQ predicate on the "account_id" field.
  30. func AccountIDNEQ(v int64) predicate.AccountGroup {
  31. return predicate.AccountGroup(sql.FieldNEQ(FieldAccountID, v))
  32. }
  33. // AccountIDIn applies the In predicate on the "account_id" field.
  34. func AccountIDIn(vs ...int64) predicate.AccountGroup {
  35. return predicate.AccountGroup(sql.FieldIn(FieldAccountID, vs...))
  36. }
  37. // AccountIDNotIn applies the NotIn predicate on the "account_id" field.
  38. func AccountIDNotIn(vs ...int64) predicate.AccountGroup {
  39. return predicate.AccountGroup(sql.FieldNotIn(FieldAccountID, vs...))
  40. }
  41. // GroupIDEQ applies the EQ predicate on the "group_id" field.
  42. func GroupIDEQ(v int64) predicate.AccountGroup {
  43. return predicate.AccountGroup(sql.FieldEQ(FieldGroupID, v))
  44. }
  45. // GroupIDNEQ applies the NEQ predicate on the "group_id" field.
  46. func GroupIDNEQ(v int64) predicate.AccountGroup {
  47. return predicate.AccountGroup(sql.FieldNEQ(FieldGroupID, v))
  48. }
  49. // GroupIDIn applies the In predicate on the "group_id" field.
  50. func GroupIDIn(vs ...int64) predicate.AccountGroup {
  51. return predicate.AccountGroup(sql.FieldIn(FieldGroupID, vs...))
  52. }
  53. // GroupIDNotIn applies the NotIn predicate on the "group_id" field.
  54. func GroupIDNotIn(vs ...int64) predicate.AccountGroup {
  55. return predicate.AccountGroup(sql.FieldNotIn(FieldGroupID, vs...))
  56. }
  57. // PriorityEQ applies the EQ predicate on the "priority" field.
  58. func PriorityEQ(v int) predicate.AccountGroup {
  59. return predicate.AccountGroup(sql.FieldEQ(FieldPriority, v))
  60. }
  61. // PriorityNEQ applies the NEQ predicate on the "priority" field.
  62. func PriorityNEQ(v int) predicate.AccountGroup {
  63. return predicate.AccountGroup(sql.FieldNEQ(FieldPriority, v))
  64. }
  65. // PriorityIn applies the In predicate on the "priority" field.
  66. func PriorityIn(vs ...int) predicate.AccountGroup {
  67. return predicate.AccountGroup(sql.FieldIn(FieldPriority, vs...))
  68. }
  69. // PriorityNotIn applies the NotIn predicate on the "priority" field.
  70. func PriorityNotIn(vs ...int) predicate.AccountGroup {
  71. return predicate.AccountGroup(sql.FieldNotIn(FieldPriority, vs...))
  72. }
  73. // PriorityGT applies the GT predicate on the "priority" field.
  74. func PriorityGT(v int) predicate.AccountGroup {
  75. return predicate.AccountGroup(sql.FieldGT(FieldPriority, v))
  76. }
  77. // PriorityGTE applies the GTE predicate on the "priority" field.
  78. func PriorityGTE(v int) predicate.AccountGroup {
  79. return predicate.AccountGroup(sql.FieldGTE(FieldPriority, v))
  80. }
  81. // PriorityLT applies the LT predicate on the "priority" field.
  82. func PriorityLT(v int) predicate.AccountGroup {
  83. return predicate.AccountGroup(sql.FieldLT(FieldPriority, v))
  84. }
  85. // PriorityLTE applies the LTE predicate on the "priority" field.
  86. func PriorityLTE(v int) predicate.AccountGroup {
  87. return predicate.AccountGroup(sql.FieldLTE(FieldPriority, v))
  88. }
  89. // CreatedAtEQ applies the EQ predicate on the "created_at" field.
  90. func CreatedAtEQ(v time.Time) predicate.AccountGroup {
  91. return predicate.AccountGroup(sql.FieldEQ(FieldCreatedAt, v))
  92. }
  93. // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
  94. func CreatedAtNEQ(v time.Time) predicate.AccountGroup {
  95. return predicate.AccountGroup(sql.FieldNEQ(FieldCreatedAt, v))
  96. }
  97. // CreatedAtIn applies the In predicate on the "created_at" field.
  98. func CreatedAtIn(vs ...time.Time) predicate.AccountGroup {
  99. return predicate.AccountGroup(sql.FieldIn(FieldCreatedAt, vs...))
  100. }
  101. // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
  102. func CreatedAtNotIn(vs ...time.Time) predicate.AccountGroup {
  103. return predicate.AccountGroup(sql.FieldNotIn(FieldCreatedAt, vs...))
  104. }
  105. // CreatedAtGT applies the GT predicate on the "created_at" field.
  106. func CreatedAtGT(v time.Time) predicate.AccountGroup {
  107. return predicate.AccountGroup(sql.FieldGT(FieldCreatedAt, v))
  108. }
  109. // CreatedAtGTE applies the GTE predicate on the "created_at" field.
  110. func CreatedAtGTE(v time.Time) predicate.AccountGroup {
  111. return predicate.AccountGroup(sql.FieldGTE(FieldCreatedAt, v))
  112. }
  113. // CreatedAtLT applies the LT predicate on the "created_at" field.
  114. func CreatedAtLT(v time.Time) predicate.AccountGroup {
  115. return predicate.AccountGroup(sql.FieldLT(FieldCreatedAt, v))
  116. }
  117. // CreatedAtLTE applies the LTE predicate on the "created_at" field.
  118. func CreatedAtLTE(v time.Time) predicate.AccountGroup {
  119. return predicate.AccountGroup(sql.FieldLTE(FieldCreatedAt, v))
  120. }
  121. // HasAccount applies the HasEdge predicate on the "account" edge.
  122. func HasAccount() predicate.AccountGroup {
  123. return predicate.AccountGroup(func(s *sql.Selector) {
  124. step := sqlgraph.NewStep(
  125. sqlgraph.From(Table, AccountColumn),
  126. sqlgraph.Edge(sqlgraph.M2O, false, AccountTable, AccountColumn),
  127. )
  128. sqlgraph.HasNeighbors(s, step)
  129. })
  130. }
  131. // HasAccountWith applies the HasEdge predicate on the "account" edge with a given conditions (other predicates).
  132. func HasAccountWith(preds ...predicate.Account) predicate.AccountGroup {
  133. return predicate.AccountGroup(func(s *sql.Selector) {
  134. step := newAccountStep()
  135. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  136. for _, p := range preds {
  137. p(s)
  138. }
  139. })
  140. })
  141. }
  142. // HasGroup applies the HasEdge predicate on the "group" edge.
  143. func HasGroup() predicate.AccountGroup {
  144. return predicate.AccountGroup(func(s *sql.Selector) {
  145. step := sqlgraph.NewStep(
  146. sqlgraph.From(Table, GroupColumn),
  147. sqlgraph.Edge(sqlgraph.M2O, false, GroupTable, GroupColumn),
  148. )
  149. sqlgraph.HasNeighbors(s, step)
  150. })
  151. }
  152. // HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).
  153. func HasGroupWith(preds ...predicate.Group) predicate.AccountGroup {
  154. return predicate.AccountGroup(func(s *sql.Selector) {
  155. step := newGroupStep()
  156. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  157. for _, p := range preds {
  158. p(s)
  159. }
  160. })
  161. })
  162. }
  163. // And groups predicates with the AND operator between them.
  164. func And(predicates ...predicate.AccountGroup) predicate.AccountGroup {
  165. return predicate.AccountGroup(sql.AndPredicates(predicates...))
  166. }
  167. // Or groups predicates with the OR operator between them.
  168. func Or(predicates ...predicate.AccountGroup) predicate.AccountGroup {
  169. return predicate.AccountGroup(sql.OrPredicates(predicates...))
  170. }
  171. // Not applies the not operator on the given predicate.
  172. func Not(p predicate.AccountGroup) predicate.AccountGroup {
  173. return predicate.AccountGroup(sql.NotPredicates(p))
  174. }