where.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. // Code generated by ent, DO NOT EDIT.
  2. package labelrelationship
  3. import (
  4. "time"
  5. "wechat-api/ent/predicate"
  6. "entgo.io/ent/dialect/sql"
  7. "entgo.io/ent/dialect/sql/sqlgraph"
  8. )
  9. // ID filters vertices based on their ID field.
  10. func ID(id uint64) predicate.LabelRelationship {
  11. return predicate.LabelRelationship(sql.FieldEQ(FieldID, id))
  12. }
  13. // IDEQ applies the EQ predicate on the ID field.
  14. func IDEQ(id uint64) predicate.LabelRelationship {
  15. return predicate.LabelRelationship(sql.FieldEQ(FieldID, id))
  16. }
  17. // IDNEQ applies the NEQ predicate on the ID field.
  18. func IDNEQ(id uint64) predicate.LabelRelationship {
  19. return predicate.LabelRelationship(sql.FieldNEQ(FieldID, id))
  20. }
  21. // IDIn applies the In predicate on the ID field.
  22. func IDIn(ids ...uint64) predicate.LabelRelationship {
  23. return predicate.LabelRelationship(sql.FieldIn(FieldID, ids...))
  24. }
  25. // IDNotIn applies the NotIn predicate on the ID field.
  26. func IDNotIn(ids ...uint64) predicate.LabelRelationship {
  27. return predicate.LabelRelationship(sql.FieldNotIn(FieldID, ids...))
  28. }
  29. // IDGT applies the GT predicate on the ID field.
  30. func IDGT(id uint64) predicate.LabelRelationship {
  31. return predicate.LabelRelationship(sql.FieldGT(FieldID, id))
  32. }
  33. // IDGTE applies the GTE predicate on the ID field.
  34. func IDGTE(id uint64) predicate.LabelRelationship {
  35. return predicate.LabelRelationship(sql.FieldGTE(FieldID, id))
  36. }
  37. // IDLT applies the LT predicate on the ID field.
  38. func IDLT(id uint64) predicate.LabelRelationship {
  39. return predicate.LabelRelationship(sql.FieldLT(FieldID, id))
  40. }
  41. // IDLTE applies the LTE predicate on the ID field.
  42. func IDLTE(id uint64) predicate.LabelRelationship {
  43. return predicate.LabelRelationship(sql.FieldLTE(FieldID, id))
  44. }
  45. // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
  46. func CreatedAt(v time.Time) predicate.LabelRelationship {
  47. return predicate.LabelRelationship(sql.FieldEQ(FieldCreatedAt, v))
  48. }
  49. // UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
  50. func UpdatedAt(v time.Time) predicate.LabelRelationship {
  51. return predicate.LabelRelationship(sql.FieldEQ(FieldUpdatedAt, v))
  52. }
  53. // Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
  54. func Status(v uint8) predicate.LabelRelationship {
  55. return predicate.LabelRelationship(sql.FieldEQ(FieldStatus, v))
  56. }
  57. // LabelID applies equality check predicate on the "label_id" field. It's identical to LabelIDEQ.
  58. func LabelID(v uint64) predicate.LabelRelationship {
  59. return predicate.LabelRelationship(sql.FieldEQ(FieldLabelID, v))
  60. }
  61. // ContactID applies equality check predicate on the "contact_id" field. It's identical to ContactIDEQ.
  62. func ContactID(v uint64) predicate.LabelRelationship {
  63. return predicate.LabelRelationship(sql.FieldEQ(FieldContactID, v))
  64. }
  65. // OrganizationID applies equality check predicate on the "organization_id" field. It's identical to OrganizationIDEQ.
  66. func OrganizationID(v uint64) predicate.LabelRelationship {
  67. return predicate.LabelRelationship(sql.FieldEQ(FieldOrganizationID, v))
  68. }
  69. // CreatedAtEQ applies the EQ predicate on the "created_at" field.
  70. func CreatedAtEQ(v time.Time) predicate.LabelRelationship {
  71. return predicate.LabelRelationship(sql.FieldEQ(FieldCreatedAt, v))
  72. }
  73. // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
  74. func CreatedAtNEQ(v time.Time) predicate.LabelRelationship {
  75. return predicate.LabelRelationship(sql.FieldNEQ(FieldCreatedAt, v))
  76. }
  77. // CreatedAtIn applies the In predicate on the "created_at" field.
  78. func CreatedAtIn(vs ...time.Time) predicate.LabelRelationship {
  79. return predicate.LabelRelationship(sql.FieldIn(FieldCreatedAt, vs...))
  80. }
  81. // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
  82. func CreatedAtNotIn(vs ...time.Time) predicate.LabelRelationship {
  83. return predicate.LabelRelationship(sql.FieldNotIn(FieldCreatedAt, vs...))
  84. }
  85. // CreatedAtGT applies the GT predicate on the "created_at" field.
  86. func CreatedAtGT(v time.Time) predicate.LabelRelationship {
  87. return predicate.LabelRelationship(sql.FieldGT(FieldCreatedAt, v))
  88. }
  89. // CreatedAtGTE applies the GTE predicate on the "created_at" field.
  90. func CreatedAtGTE(v time.Time) predicate.LabelRelationship {
  91. return predicate.LabelRelationship(sql.FieldGTE(FieldCreatedAt, v))
  92. }
  93. // CreatedAtLT applies the LT predicate on the "created_at" field.
  94. func CreatedAtLT(v time.Time) predicate.LabelRelationship {
  95. return predicate.LabelRelationship(sql.FieldLT(FieldCreatedAt, v))
  96. }
  97. // CreatedAtLTE applies the LTE predicate on the "created_at" field.
  98. func CreatedAtLTE(v time.Time) predicate.LabelRelationship {
  99. return predicate.LabelRelationship(sql.FieldLTE(FieldCreatedAt, v))
  100. }
  101. // UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
  102. func UpdatedAtEQ(v time.Time) predicate.LabelRelationship {
  103. return predicate.LabelRelationship(sql.FieldEQ(FieldUpdatedAt, v))
  104. }
  105. // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
  106. func UpdatedAtNEQ(v time.Time) predicate.LabelRelationship {
  107. return predicate.LabelRelationship(sql.FieldNEQ(FieldUpdatedAt, v))
  108. }
  109. // UpdatedAtIn applies the In predicate on the "updated_at" field.
  110. func UpdatedAtIn(vs ...time.Time) predicate.LabelRelationship {
  111. return predicate.LabelRelationship(sql.FieldIn(FieldUpdatedAt, vs...))
  112. }
  113. // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
  114. func UpdatedAtNotIn(vs ...time.Time) predicate.LabelRelationship {
  115. return predicate.LabelRelationship(sql.FieldNotIn(FieldUpdatedAt, vs...))
  116. }
  117. // UpdatedAtGT applies the GT predicate on the "updated_at" field.
  118. func UpdatedAtGT(v time.Time) predicate.LabelRelationship {
  119. return predicate.LabelRelationship(sql.FieldGT(FieldUpdatedAt, v))
  120. }
  121. // UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
  122. func UpdatedAtGTE(v time.Time) predicate.LabelRelationship {
  123. return predicate.LabelRelationship(sql.FieldGTE(FieldUpdatedAt, v))
  124. }
  125. // UpdatedAtLT applies the LT predicate on the "updated_at" field.
  126. func UpdatedAtLT(v time.Time) predicate.LabelRelationship {
  127. return predicate.LabelRelationship(sql.FieldLT(FieldUpdatedAt, v))
  128. }
  129. // UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
  130. func UpdatedAtLTE(v time.Time) predicate.LabelRelationship {
  131. return predicate.LabelRelationship(sql.FieldLTE(FieldUpdatedAt, v))
  132. }
  133. // StatusEQ applies the EQ predicate on the "status" field.
  134. func StatusEQ(v uint8) predicate.LabelRelationship {
  135. return predicate.LabelRelationship(sql.FieldEQ(FieldStatus, v))
  136. }
  137. // StatusNEQ applies the NEQ predicate on the "status" field.
  138. func StatusNEQ(v uint8) predicate.LabelRelationship {
  139. return predicate.LabelRelationship(sql.FieldNEQ(FieldStatus, v))
  140. }
  141. // StatusIn applies the In predicate on the "status" field.
  142. func StatusIn(vs ...uint8) predicate.LabelRelationship {
  143. return predicate.LabelRelationship(sql.FieldIn(FieldStatus, vs...))
  144. }
  145. // StatusNotIn applies the NotIn predicate on the "status" field.
  146. func StatusNotIn(vs ...uint8) predicate.LabelRelationship {
  147. return predicate.LabelRelationship(sql.FieldNotIn(FieldStatus, vs...))
  148. }
  149. // StatusGT applies the GT predicate on the "status" field.
  150. func StatusGT(v uint8) predicate.LabelRelationship {
  151. return predicate.LabelRelationship(sql.FieldGT(FieldStatus, v))
  152. }
  153. // StatusGTE applies the GTE predicate on the "status" field.
  154. func StatusGTE(v uint8) predicate.LabelRelationship {
  155. return predicate.LabelRelationship(sql.FieldGTE(FieldStatus, v))
  156. }
  157. // StatusLT applies the LT predicate on the "status" field.
  158. func StatusLT(v uint8) predicate.LabelRelationship {
  159. return predicate.LabelRelationship(sql.FieldLT(FieldStatus, v))
  160. }
  161. // StatusLTE applies the LTE predicate on the "status" field.
  162. func StatusLTE(v uint8) predicate.LabelRelationship {
  163. return predicate.LabelRelationship(sql.FieldLTE(FieldStatus, v))
  164. }
  165. // StatusIsNil applies the IsNil predicate on the "status" field.
  166. func StatusIsNil() predicate.LabelRelationship {
  167. return predicate.LabelRelationship(sql.FieldIsNull(FieldStatus))
  168. }
  169. // StatusNotNil applies the NotNil predicate on the "status" field.
  170. func StatusNotNil() predicate.LabelRelationship {
  171. return predicate.LabelRelationship(sql.FieldNotNull(FieldStatus))
  172. }
  173. // LabelIDEQ applies the EQ predicate on the "label_id" field.
  174. func LabelIDEQ(v uint64) predicate.LabelRelationship {
  175. return predicate.LabelRelationship(sql.FieldEQ(FieldLabelID, v))
  176. }
  177. // LabelIDNEQ applies the NEQ predicate on the "label_id" field.
  178. func LabelIDNEQ(v uint64) predicate.LabelRelationship {
  179. return predicate.LabelRelationship(sql.FieldNEQ(FieldLabelID, v))
  180. }
  181. // LabelIDIn applies the In predicate on the "label_id" field.
  182. func LabelIDIn(vs ...uint64) predicate.LabelRelationship {
  183. return predicate.LabelRelationship(sql.FieldIn(FieldLabelID, vs...))
  184. }
  185. // LabelIDNotIn applies the NotIn predicate on the "label_id" field.
  186. func LabelIDNotIn(vs ...uint64) predicate.LabelRelationship {
  187. return predicate.LabelRelationship(sql.FieldNotIn(FieldLabelID, vs...))
  188. }
  189. // ContactIDEQ applies the EQ predicate on the "contact_id" field.
  190. func ContactIDEQ(v uint64) predicate.LabelRelationship {
  191. return predicate.LabelRelationship(sql.FieldEQ(FieldContactID, v))
  192. }
  193. // ContactIDNEQ applies the NEQ predicate on the "contact_id" field.
  194. func ContactIDNEQ(v uint64) predicate.LabelRelationship {
  195. return predicate.LabelRelationship(sql.FieldNEQ(FieldContactID, v))
  196. }
  197. // ContactIDIn applies the In predicate on the "contact_id" field.
  198. func ContactIDIn(vs ...uint64) predicate.LabelRelationship {
  199. return predicate.LabelRelationship(sql.FieldIn(FieldContactID, vs...))
  200. }
  201. // ContactIDNotIn applies the NotIn predicate on the "contact_id" field.
  202. func ContactIDNotIn(vs ...uint64) predicate.LabelRelationship {
  203. return predicate.LabelRelationship(sql.FieldNotIn(FieldContactID, vs...))
  204. }
  205. // OrganizationIDEQ applies the EQ predicate on the "organization_id" field.
  206. func OrganizationIDEQ(v uint64) predicate.LabelRelationship {
  207. return predicate.LabelRelationship(sql.FieldEQ(FieldOrganizationID, v))
  208. }
  209. // OrganizationIDNEQ applies the NEQ predicate on the "organization_id" field.
  210. func OrganizationIDNEQ(v uint64) predicate.LabelRelationship {
  211. return predicate.LabelRelationship(sql.FieldNEQ(FieldOrganizationID, v))
  212. }
  213. // OrganizationIDIn applies the In predicate on the "organization_id" field.
  214. func OrganizationIDIn(vs ...uint64) predicate.LabelRelationship {
  215. return predicate.LabelRelationship(sql.FieldIn(FieldOrganizationID, vs...))
  216. }
  217. // OrganizationIDNotIn applies the NotIn predicate on the "organization_id" field.
  218. func OrganizationIDNotIn(vs ...uint64) predicate.LabelRelationship {
  219. return predicate.LabelRelationship(sql.FieldNotIn(FieldOrganizationID, vs...))
  220. }
  221. // OrganizationIDGT applies the GT predicate on the "organization_id" field.
  222. func OrganizationIDGT(v uint64) predicate.LabelRelationship {
  223. return predicate.LabelRelationship(sql.FieldGT(FieldOrganizationID, v))
  224. }
  225. // OrganizationIDGTE applies the GTE predicate on the "organization_id" field.
  226. func OrganizationIDGTE(v uint64) predicate.LabelRelationship {
  227. return predicate.LabelRelationship(sql.FieldGTE(FieldOrganizationID, v))
  228. }
  229. // OrganizationIDLT applies the LT predicate on the "organization_id" field.
  230. func OrganizationIDLT(v uint64) predicate.LabelRelationship {
  231. return predicate.LabelRelationship(sql.FieldLT(FieldOrganizationID, v))
  232. }
  233. // OrganizationIDLTE applies the LTE predicate on the "organization_id" field.
  234. func OrganizationIDLTE(v uint64) predicate.LabelRelationship {
  235. return predicate.LabelRelationship(sql.FieldLTE(FieldOrganizationID, v))
  236. }
  237. // OrganizationIDIsNil applies the IsNil predicate on the "organization_id" field.
  238. func OrganizationIDIsNil() predicate.LabelRelationship {
  239. return predicate.LabelRelationship(sql.FieldIsNull(FieldOrganizationID))
  240. }
  241. // OrganizationIDNotNil applies the NotNil predicate on the "organization_id" field.
  242. func OrganizationIDNotNil() predicate.LabelRelationship {
  243. return predicate.LabelRelationship(sql.FieldNotNull(FieldOrganizationID))
  244. }
  245. // HasContacts applies the HasEdge predicate on the "contacts" edge.
  246. func HasContacts() predicate.LabelRelationship {
  247. return predicate.LabelRelationship(func(s *sql.Selector) {
  248. step := sqlgraph.NewStep(
  249. sqlgraph.From(Table, FieldID),
  250. sqlgraph.Edge(sqlgraph.M2O, true, ContactsTable, ContactsColumn),
  251. )
  252. sqlgraph.HasNeighbors(s, step)
  253. })
  254. }
  255. // HasContactsWith applies the HasEdge predicate on the "contacts" edge with a given conditions (other predicates).
  256. func HasContactsWith(preds ...predicate.Contact) predicate.LabelRelationship {
  257. return predicate.LabelRelationship(func(s *sql.Selector) {
  258. step := newContactsStep()
  259. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  260. for _, p := range preds {
  261. p(s)
  262. }
  263. })
  264. })
  265. }
  266. // HasLabels applies the HasEdge predicate on the "labels" edge.
  267. func HasLabels() predicate.LabelRelationship {
  268. return predicate.LabelRelationship(func(s *sql.Selector) {
  269. step := sqlgraph.NewStep(
  270. sqlgraph.From(Table, FieldID),
  271. sqlgraph.Edge(sqlgraph.M2O, true, LabelsTable, LabelsColumn),
  272. )
  273. sqlgraph.HasNeighbors(s, step)
  274. })
  275. }
  276. // HasLabelsWith applies the HasEdge predicate on the "labels" edge with a given conditions (other predicates).
  277. func HasLabelsWith(preds ...predicate.Label) predicate.LabelRelationship {
  278. return predicate.LabelRelationship(func(s *sql.Selector) {
  279. step := newLabelsStep()
  280. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  281. for _, p := range preds {
  282. p(s)
  283. }
  284. })
  285. })
  286. }
  287. // And groups predicates with the AND operator between them.
  288. func And(predicates ...predicate.LabelRelationship) predicate.LabelRelationship {
  289. return predicate.LabelRelationship(sql.AndPredicates(predicates...))
  290. }
  291. // Or groups predicates with the OR operator between them.
  292. func Or(predicates ...predicate.LabelRelationship) predicate.LabelRelationship {
  293. return predicate.LabelRelationship(sql.OrPredicates(predicates...))
  294. }
  295. // Not applies the not operator on the given predicate.
  296. func Not(p predicate.LabelRelationship) predicate.LabelRelationship {
  297. return predicate.LabelRelationship(sql.NotPredicates(p))
  298. }