where.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. // Code generated by ent, DO NOT EDIT.
  2. package token
  3. import (
  4. "time"
  5. "wechat-api/ent/predicate"
  6. "entgo.io/ent/dialect/sql"
  7. )
  8. // ID filters vertices based on their ID field.
  9. func ID(id uint64) predicate.Token {
  10. return predicate.Token(sql.FieldEQ(FieldID, id))
  11. }
  12. // IDEQ applies the EQ predicate on the ID field.
  13. func IDEQ(id uint64) predicate.Token {
  14. return predicate.Token(sql.FieldEQ(FieldID, id))
  15. }
  16. // IDNEQ applies the NEQ predicate on the ID field.
  17. func IDNEQ(id uint64) predicate.Token {
  18. return predicate.Token(sql.FieldNEQ(FieldID, id))
  19. }
  20. // IDIn applies the In predicate on the ID field.
  21. func IDIn(ids ...uint64) predicate.Token {
  22. return predicate.Token(sql.FieldIn(FieldID, ids...))
  23. }
  24. // IDNotIn applies the NotIn predicate on the ID field.
  25. func IDNotIn(ids ...uint64) predicate.Token {
  26. return predicate.Token(sql.FieldNotIn(FieldID, ids...))
  27. }
  28. // IDGT applies the GT predicate on the ID field.
  29. func IDGT(id uint64) predicate.Token {
  30. return predicate.Token(sql.FieldGT(FieldID, id))
  31. }
  32. // IDGTE applies the GTE predicate on the ID field.
  33. func IDGTE(id uint64) predicate.Token {
  34. return predicate.Token(sql.FieldGTE(FieldID, id))
  35. }
  36. // IDLT applies the LT predicate on the ID field.
  37. func IDLT(id uint64) predicate.Token {
  38. return predicate.Token(sql.FieldLT(FieldID, id))
  39. }
  40. // IDLTE applies the LTE predicate on the ID field.
  41. func IDLTE(id uint64) predicate.Token {
  42. return predicate.Token(sql.FieldLTE(FieldID, id))
  43. }
  44. // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
  45. func CreatedAt(v time.Time) predicate.Token {
  46. return predicate.Token(sql.FieldEQ(FieldCreatedAt, v))
  47. }
  48. // UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
  49. func UpdatedAt(v time.Time) predicate.Token {
  50. return predicate.Token(sql.FieldEQ(FieldUpdatedAt, v))
  51. }
  52. // DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
  53. func DeletedAt(v time.Time) predicate.Token {
  54. return predicate.Token(sql.FieldEQ(FieldDeletedAt, v))
  55. }
  56. // ExpireAt applies equality check predicate on the "expire_at" field. It's identical to ExpireAtEQ.
  57. func ExpireAt(v time.Time) predicate.Token {
  58. return predicate.Token(sql.FieldEQ(FieldExpireAt, v))
  59. }
  60. // Token applies equality check predicate on the "token" field. It's identical to TokenEQ.
  61. func Token(v string) predicate.Token {
  62. return predicate.Token(sql.FieldEQ(FieldToken, v))
  63. }
  64. // MAC applies equality check predicate on the "mac" field. It's identical to MACEQ.
  65. func MAC(v string) predicate.Token {
  66. return predicate.Token(sql.FieldEQ(FieldMAC, v))
  67. }
  68. // CreatedAtEQ applies the EQ predicate on the "created_at" field.
  69. func CreatedAtEQ(v time.Time) predicate.Token {
  70. return predicate.Token(sql.FieldEQ(FieldCreatedAt, v))
  71. }
  72. // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
  73. func CreatedAtNEQ(v time.Time) predicate.Token {
  74. return predicate.Token(sql.FieldNEQ(FieldCreatedAt, v))
  75. }
  76. // CreatedAtIn applies the In predicate on the "created_at" field.
  77. func CreatedAtIn(vs ...time.Time) predicate.Token {
  78. return predicate.Token(sql.FieldIn(FieldCreatedAt, vs...))
  79. }
  80. // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
  81. func CreatedAtNotIn(vs ...time.Time) predicate.Token {
  82. return predicate.Token(sql.FieldNotIn(FieldCreatedAt, vs...))
  83. }
  84. // CreatedAtGT applies the GT predicate on the "created_at" field.
  85. func CreatedAtGT(v time.Time) predicate.Token {
  86. return predicate.Token(sql.FieldGT(FieldCreatedAt, v))
  87. }
  88. // CreatedAtGTE applies the GTE predicate on the "created_at" field.
  89. func CreatedAtGTE(v time.Time) predicate.Token {
  90. return predicate.Token(sql.FieldGTE(FieldCreatedAt, v))
  91. }
  92. // CreatedAtLT applies the LT predicate on the "created_at" field.
  93. func CreatedAtLT(v time.Time) predicate.Token {
  94. return predicate.Token(sql.FieldLT(FieldCreatedAt, v))
  95. }
  96. // CreatedAtLTE applies the LTE predicate on the "created_at" field.
  97. func CreatedAtLTE(v time.Time) predicate.Token {
  98. return predicate.Token(sql.FieldLTE(FieldCreatedAt, v))
  99. }
  100. // UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
  101. func UpdatedAtEQ(v time.Time) predicate.Token {
  102. return predicate.Token(sql.FieldEQ(FieldUpdatedAt, v))
  103. }
  104. // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
  105. func UpdatedAtNEQ(v time.Time) predicate.Token {
  106. return predicate.Token(sql.FieldNEQ(FieldUpdatedAt, v))
  107. }
  108. // UpdatedAtIn applies the In predicate on the "updated_at" field.
  109. func UpdatedAtIn(vs ...time.Time) predicate.Token {
  110. return predicate.Token(sql.FieldIn(FieldUpdatedAt, vs...))
  111. }
  112. // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
  113. func UpdatedAtNotIn(vs ...time.Time) predicate.Token {
  114. return predicate.Token(sql.FieldNotIn(FieldUpdatedAt, vs...))
  115. }
  116. // UpdatedAtGT applies the GT predicate on the "updated_at" field.
  117. func UpdatedAtGT(v time.Time) predicate.Token {
  118. return predicate.Token(sql.FieldGT(FieldUpdatedAt, v))
  119. }
  120. // UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
  121. func UpdatedAtGTE(v time.Time) predicate.Token {
  122. return predicate.Token(sql.FieldGTE(FieldUpdatedAt, v))
  123. }
  124. // UpdatedAtLT applies the LT predicate on the "updated_at" field.
  125. func UpdatedAtLT(v time.Time) predicate.Token {
  126. return predicate.Token(sql.FieldLT(FieldUpdatedAt, v))
  127. }
  128. // UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
  129. func UpdatedAtLTE(v time.Time) predicate.Token {
  130. return predicate.Token(sql.FieldLTE(FieldUpdatedAt, v))
  131. }
  132. // DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
  133. func DeletedAtEQ(v time.Time) predicate.Token {
  134. return predicate.Token(sql.FieldEQ(FieldDeletedAt, v))
  135. }
  136. // DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
  137. func DeletedAtNEQ(v time.Time) predicate.Token {
  138. return predicate.Token(sql.FieldNEQ(FieldDeletedAt, v))
  139. }
  140. // DeletedAtIn applies the In predicate on the "deleted_at" field.
  141. func DeletedAtIn(vs ...time.Time) predicate.Token {
  142. return predicate.Token(sql.FieldIn(FieldDeletedAt, vs...))
  143. }
  144. // DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
  145. func DeletedAtNotIn(vs ...time.Time) predicate.Token {
  146. return predicate.Token(sql.FieldNotIn(FieldDeletedAt, vs...))
  147. }
  148. // DeletedAtGT applies the GT predicate on the "deleted_at" field.
  149. func DeletedAtGT(v time.Time) predicate.Token {
  150. return predicate.Token(sql.FieldGT(FieldDeletedAt, v))
  151. }
  152. // DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
  153. func DeletedAtGTE(v time.Time) predicate.Token {
  154. return predicate.Token(sql.FieldGTE(FieldDeletedAt, v))
  155. }
  156. // DeletedAtLT applies the LT predicate on the "deleted_at" field.
  157. func DeletedAtLT(v time.Time) predicate.Token {
  158. return predicate.Token(sql.FieldLT(FieldDeletedAt, v))
  159. }
  160. // DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
  161. func DeletedAtLTE(v time.Time) predicate.Token {
  162. return predicate.Token(sql.FieldLTE(FieldDeletedAt, v))
  163. }
  164. // DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
  165. func DeletedAtIsNil() predicate.Token {
  166. return predicate.Token(sql.FieldIsNull(FieldDeletedAt))
  167. }
  168. // DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
  169. func DeletedAtNotNil() predicate.Token {
  170. return predicate.Token(sql.FieldNotNull(FieldDeletedAt))
  171. }
  172. // ExpireAtEQ applies the EQ predicate on the "expire_at" field.
  173. func ExpireAtEQ(v time.Time) predicate.Token {
  174. return predicate.Token(sql.FieldEQ(FieldExpireAt, v))
  175. }
  176. // ExpireAtNEQ applies the NEQ predicate on the "expire_at" field.
  177. func ExpireAtNEQ(v time.Time) predicate.Token {
  178. return predicate.Token(sql.FieldNEQ(FieldExpireAt, v))
  179. }
  180. // ExpireAtIn applies the In predicate on the "expire_at" field.
  181. func ExpireAtIn(vs ...time.Time) predicate.Token {
  182. return predicate.Token(sql.FieldIn(FieldExpireAt, vs...))
  183. }
  184. // ExpireAtNotIn applies the NotIn predicate on the "expire_at" field.
  185. func ExpireAtNotIn(vs ...time.Time) predicate.Token {
  186. return predicate.Token(sql.FieldNotIn(FieldExpireAt, vs...))
  187. }
  188. // ExpireAtGT applies the GT predicate on the "expire_at" field.
  189. func ExpireAtGT(v time.Time) predicate.Token {
  190. return predicate.Token(sql.FieldGT(FieldExpireAt, v))
  191. }
  192. // ExpireAtGTE applies the GTE predicate on the "expire_at" field.
  193. func ExpireAtGTE(v time.Time) predicate.Token {
  194. return predicate.Token(sql.FieldGTE(FieldExpireAt, v))
  195. }
  196. // ExpireAtLT applies the LT predicate on the "expire_at" field.
  197. func ExpireAtLT(v time.Time) predicate.Token {
  198. return predicate.Token(sql.FieldLT(FieldExpireAt, v))
  199. }
  200. // ExpireAtLTE applies the LTE predicate on the "expire_at" field.
  201. func ExpireAtLTE(v time.Time) predicate.Token {
  202. return predicate.Token(sql.FieldLTE(FieldExpireAt, v))
  203. }
  204. // ExpireAtIsNil applies the IsNil predicate on the "expire_at" field.
  205. func ExpireAtIsNil() predicate.Token {
  206. return predicate.Token(sql.FieldIsNull(FieldExpireAt))
  207. }
  208. // ExpireAtNotNil applies the NotNil predicate on the "expire_at" field.
  209. func ExpireAtNotNil() predicate.Token {
  210. return predicate.Token(sql.FieldNotNull(FieldExpireAt))
  211. }
  212. // TokenEQ applies the EQ predicate on the "token" field.
  213. func TokenEQ(v string) predicate.Token {
  214. return predicate.Token(sql.FieldEQ(FieldToken, v))
  215. }
  216. // TokenNEQ applies the NEQ predicate on the "token" field.
  217. func TokenNEQ(v string) predicate.Token {
  218. return predicate.Token(sql.FieldNEQ(FieldToken, v))
  219. }
  220. // TokenIn applies the In predicate on the "token" field.
  221. func TokenIn(vs ...string) predicate.Token {
  222. return predicate.Token(sql.FieldIn(FieldToken, vs...))
  223. }
  224. // TokenNotIn applies the NotIn predicate on the "token" field.
  225. func TokenNotIn(vs ...string) predicate.Token {
  226. return predicate.Token(sql.FieldNotIn(FieldToken, vs...))
  227. }
  228. // TokenGT applies the GT predicate on the "token" field.
  229. func TokenGT(v string) predicate.Token {
  230. return predicate.Token(sql.FieldGT(FieldToken, v))
  231. }
  232. // TokenGTE applies the GTE predicate on the "token" field.
  233. func TokenGTE(v string) predicate.Token {
  234. return predicate.Token(sql.FieldGTE(FieldToken, v))
  235. }
  236. // TokenLT applies the LT predicate on the "token" field.
  237. func TokenLT(v string) predicate.Token {
  238. return predicate.Token(sql.FieldLT(FieldToken, v))
  239. }
  240. // TokenLTE applies the LTE predicate on the "token" field.
  241. func TokenLTE(v string) predicate.Token {
  242. return predicate.Token(sql.FieldLTE(FieldToken, v))
  243. }
  244. // TokenContains applies the Contains predicate on the "token" field.
  245. func TokenContains(v string) predicate.Token {
  246. return predicate.Token(sql.FieldContains(FieldToken, v))
  247. }
  248. // TokenHasPrefix applies the HasPrefix predicate on the "token" field.
  249. func TokenHasPrefix(v string) predicate.Token {
  250. return predicate.Token(sql.FieldHasPrefix(FieldToken, v))
  251. }
  252. // TokenHasSuffix applies the HasSuffix predicate on the "token" field.
  253. func TokenHasSuffix(v string) predicate.Token {
  254. return predicate.Token(sql.FieldHasSuffix(FieldToken, v))
  255. }
  256. // TokenIsNil applies the IsNil predicate on the "token" field.
  257. func TokenIsNil() predicate.Token {
  258. return predicate.Token(sql.FieldIsNull(FieldToken))
  259. }
  260. // TokenNotNil applies the NotNil predicate on the "token" field.
  261. func TokenNotNil() predicate.Token {
  262. return predicate.Token(sql.FieldNotNull(FieldToken))
  263. }
  264. // TokenEqualFold applies the EqualFold predicate on the "token" field.
  265. func TokenEqualFold(v string) predicate.Token {
  266. return predicate.Token(sql.FieldEqualFold(FieldToken, v))
  267. }
  268. // TokenContainsFold applies the ContainsFold predicate on the "token" field.
  269. func TokenContainsFold(v string) predicate.Token {
  270. return predicate.Token(sql.FieldContainsFold(FieldToken, v))
  271. }
  272. // MACEQ applies the EQ predicate on the "mac" field.
  273. func MACEQ(v string) predicate.Token {
  274. return predicate.Token(sql.FieldEQ(FieldMAC, v))
  275. }
  276. // MACNEQ applies the NEQ predicate on the "mac" field.
  277. func MACNEQ(v string) predicate.Token {
  278. return predicate.Token(sql.FieldNEQ(FieldMAC, v))
  279. }
  280. // MACIn applies the In predicate on the "mac" field.
  281. func MACIn(vs ...string) predicate.Token {
  282. return predicate.Token(sql.FieldIn(FieldMAC, vs...))
  283. }
  284. // MACNotIn applies the NotIn predicate on the "mac" field.
  285. func MACNotIn(vs ...string) predicate.Token {
  286. return predicate.Token(sql.FieldNotIn(FieldMAC, vs...))
  287. }
  288. // MACGT applies the GT predicate on the "mac" field.
  289. func MACGT(v string) predicate.Token {
  290. return predicate.Token(sql.FieldGT(FieldMAC, v))
  291. }
  292. // MACGTE applies the GTE predicate on the "mac" field.
  293. func MACGTE(v string) predicate.Token {
  294. return predicate.Token(sql.FieldGTE(FieldMAC, v))
  295. }
  296. // MACLT applies the LT predicate on the "mac" field.
  297. func MACLT(v string) predicate.Token {
  298. return predicate.Token(sql.FieldLT(FieldMAC, v))
  299. }
  300. // MACLTE applies the LTE predicate on the "mac" field.
  301. func MACLTE(v string) predicate.Token {
  302. return predicate.Token(sql.FieldLTE(FieldMAC, v))
  303. }
  304. // MACContains applies the Contains predicate on the "mac" field.
  305. func MACContains(v string) predicate.Token {
  306. return predicate.Token(sql.FieldContains(FieldMAC, v))
  307. }
  308. // MACHasPrefix applies the HasPrefix predicate on the "mac" field.
  309. func MACHasPrefix(v string) predicate.Token {
  310. return predicate.Token(sql.FieldHasPrefix(FieldMAC, v))
  311. }
  312. // MACHasSuffix applies the HasSuffix predicate on the "mac" field.
  313. func MACHasSuffix(v string) predicate.Token {
  314. return predicate.Token(sql.FieldHasSuffix(FieldMAC, v))
  315. }
  316. // MACEqualFold applies the EqualFold predicate on the "mac" field.
  317. func MACEqualFold(v string) predicate.Token {
  318. return predicate.Token(sql.FieldEqualFold(FieldMAC, v))
  319. }
  320. // MACContainsFold applies the ContainsFold predicate on the "mac" field.
  321. func MACContainsFold(v string) predicate.Token {
  322. return predicate.Token(sql.FieldContainsFold(FieldMAC, v))
  323. }
  324. // And groups predicates with the AND operator between them.
  325. func And(predicates ...predicate.Token) predicate.Token {
  326. return predicate.Token(sql.AndPredicates(predicates...))
  327. }
  328. // Or groups predicates with the OR operator between them.
  329. func Or(predicates ...predicate.Token) predicate.Token {
  330. return predicate.Token(sql.OrPredicates(predicates...))
  331. }
  332. // Not applies the not operator on the given predicate.
  333. func Not(p predicate.Token) predicate.Token {
  334. return predicate.Token(sql.NotPredicates(p))
  335. }