where.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. // Code generated by ent, DO NOT EDIT.
  2. package chatsession
  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.ChatSession {
  10. return predicate.ChatSession(sql.FieldEQ(FieldID, id))
  11. }
  12. // IDEQ applies the EQ predicate on the ID field.
  13. func IDEQ(id uint64) predicate.ChatSession {
  14. return predicate.ChatSession(sql.FieldEQ(FieldID, id))
  15. }
  16. // IDNEQ applies the NEQ predicate on the ID field.
  17. func IDNEQ(id uint64) predicate.ChatSession {
  18. return predicate.ChatSession(sql.FieldNEQ(FieldID, id))
  19. }
  20. // IDIn applies the In predicate on the ID field.
  21. func IDIn(ids ...uint64) predicate.ChatSession {
  22. return predicate.ChatSession(sql.FieldIn(FieldID, ids...))
  23. }
  24. // IDNotIn applies the NotIn predicate on the ID field.
  25. func IDNotIn(ids ...uint64) predicate.ChatSession {
  26. return predicate.ChatSession(sql.FieldNotIn(FieldID, ids...))
  27. }
  28. // IDGT applies the GT predicate on the ID field.
  29. func IDGT(id uint64) predicate.ChatSession {
  30. return predicate.ChatSession(sql.FieldGT(FieldID, id))
  31. }
  32. // IDGTE applies the GTE predicate on the ID field.
  33. func IDGTE(id uint64) predicate.ChatSession {
  34. return predicate.ChatSession(sql.FieldGTE(FieldID, id))
  35. }
  36. // IDLT applies the LT predicate on the ID field.
  37. func IDLT(id uint64) predicate.ChatSession {
  38. return predicate.ChatSession(sql.FieldLT(FieldID, id))
  39. }
  40. // IDLTE applies the LTE predicate on the ID field.
  41. func IDLTE(id uint64) predicate.ChatSession {
  42. return predicate.ChatSession(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.ChatSession {
  46. return predicate.ChatSession(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.ChatSession {
  50. return predicate.ChatSession(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.ChatSession {
  54. return predicate.ChatSession(sql.FieldEQ(FieldDeletedAt, v))
  55. }
  56. // Name applies equality check predicate on the "name" field. It's identical to NameEQ.
  57. func Name(v string) predicate.ChatSession {
  58. return predicate.ChatSession(sql.FieldEQ(FieldName, v))
  59. }
  60. // UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
  61. func UserID(v uint64) predicate.ChatSession {
  62. return predicate.ChatSession(sql.FieldEQ(FieldUserID, v))
  63. }
  64. // BotID applies equality check predicate on the "bot_id" field. It's identical to BotIDEQ.
  65. func BotID(v uint64) predicate.ChatSession {
  66. return predicate.ChatSession(sql.FieldEQ(FieldBotID, v))
  67. }
  68. // BotType applies equality check predicate on the "bot_type" field. It's identical to BotTypeEQ.
  69. func BotType(v uint8) predicate.ChatSession {
  70. return predicate.ChatSession(sql.FieldEQ(FieldBotType, v))
  71. }
  72. // CreatedAtEQ applies the EQ predicate on the "created_at" field.
  73. func CreatedAtEQ(v time.Time) predicate.ChatSession {
  74. return predicate.ChatSession(sql.FieldEQ(FieldCreatedAt, v))
  75. }
  76. // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
  77. func CreatedAtNEQ(v time.Time) predicate.ChatSession {
  78. return predicate.ChatSession(sql.FieldNEQ(FieldCreatedAt, v))
  79. }
  80. // CreatedAtIn applies the In predicate on the "created_at" field.
  81. func CreatedAtIn(vs ...time.Time) predicate.ChatSession {
  82. return predicate.ChatSession(sql.FieldIn(FieldCreatedAt, vs...))
  83. }
  84. // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
  85. func CreatedAtNotIn(vs ...time.Time) predicate.ChatSession {
  86. return predicate.ChatSession(sql.FieldNotIn(FieldCreatedAt, vs...))
  87. }
  88. // CreatedAtGT applies the GT predicate on the "created_at" field.
  89. func CreatedAtGT(v time.Time) predicate.ChatSession {
  90. return predicate.ChatSession(sql.FieldGT(FieldCreatedAt, v))
  91. }
  92. // CreatedAtGTE applies the GTE predicate on the "created_at" field.
  93. func CreatedAtGTE(v time.Time) predicate.ChatSession {
  94. return predicate.ChatSession(sql.FieldGTE(FieldCreatedAt, v))
  95. }
  96. // CreatedAtLT applies the LT predicate on the "created_at" field.
  97. func CreatedAtLT(v time.Time) predicate.ChatSession {
  98. return predicate.ChatSession(sql.FieldLT(FieldCreatedAt, v))
  99. }
  100. // CreatedAtLTE applies the LTE predicate on the "created_at" field.
  101. func CreatedAtLTE(v time.Time) predicate.ChatSession {
  102. return predicate.ChatSession(sql.FieldLTE(FieldCreatedAt, v))
  103. }
  104. // UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
  105. func UpdatedAtEQ(v time.Time) predicate.ChatSession {
  106. return predicate.ChatSession(sql.FieldEQ(FieldUpdatedAt, v))
  107. }
  108. // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
  109. func UpdatedAtNEQ(v time.Time) predicate.ChatSession {
  110. return predicate.ChatSession(sql.FieldNEQ(FieldUpdatedAt, v))
  111. }
  112. // UpdatedAtIn applies the In predicate on the "updated_at" field.
  113. func UpdatedAtIn(vs ...time.Time) predicate.ChatSession {
  114. return predicate.ChatSession(sql.FieldIn(FieldUpdatedAt, vs...))
  115. }
  116. // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
  117. func UpdatedAtNotIn(vs ...time.Time) predicate.ChatSession {
  118. return predicate.ChatSession(sql.FieldNotIn(FieldUpdatedAt, vs...))
  119. }
  120. // UpdatedAtGT applies the GT predicate on the "updated_at" field.
  121. func UpdatedAtGT(v time.Time) predicate.ChatSession {
  122. return predicate.ChatSession(sql.FieldGT(FieldUpdatedAt, v))
  123. }
  124. // UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
  125. func UpdatedAtGTE(v time.Time) predicate.ChatSession {
  126. return predicate.ChatSession(sql.FieldGTE(FieldUpdatedAt, v))
  127. }
  128. // UpdatedAtLT applies the LT predicate on the "updated_at" field.
  129. func UpdatedAtLT(v time.Time) predicate.ChatSession {
  130. return predicate.ChatSession(sql.FieldLT(FieldUpdatedAt, v))
  131. }
  132. // UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
  133. func UpdatedAtLTE(v time.Time) predicate.ChatSession {
  134. return predicate.ChatSession(sql.FieldLTE(FieldUpdatedAt, v))
  135. }
  136. // DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
  137. func DeletedAtEQ(v time.Time) predicate.ChatSession {
  138. return predicate.ChatSession(sql.FieldEQ(FieldDeletedAt, v))
  139. }
  140. // DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
  141. func DeletedAtNEQ(v time.Time) predicate.ChatSession {
  142. return predicate.ChatSession(sql.FieldNEQ(FieldDeletedAt, v))
  143. }
  144. // DeletedAtIn applies the In predicate on the "deleted_at" field.
  145. func DeletedAtIn(vs ...time.Time) predicate.ChatSession {
  146. return predicate.ChatSession(sql.FieldIn(FieldDeletedAt, vs...))
  147. }
  148. // DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
  149. func DeletedAtNotIn(vs ...time.Time) predicate.ChatSession {
  150. return predicate.ChatSession(sql.FieldNotIn(FieldDeletedAt, vs...))
  151. }
  152. // DeletedAtGT applies the GT predicate on the "deleted_at" field.
  153. func DeletedAtGT(v time.Time) predicate.ChatSession {
  154. return predicate.ChatSession(sql.FieldGT(FieldDeletedAt, v))
  155. }
  156. // DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
  157. func DeletedAtGTE(v time.Time) predicate.ChatSession {
  158. return predicate.ChatSession(sql.FieldGTE(FieldDeletedAt, v))
  159. }
  160. // DeletedAtLT applies the LT predicate on the "deleted_at" field.
  161. func DeletedAtLT(v time.Time) predicate.ChatSession {
  162. return predicate.ChatSession(sql.FieldLT(FieldDeletedAt, v))
  163. }
  164. // DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
  165. func DeletedAtLTE(v time.Time) predicate.ChatSession {
  166. return predicate.ChatSession(sql.FieldLTE(FieldDeletedAt, v))
  167. }
  168. // DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
  169. func DeletedAtIsNil() predicate.ChatSession {
  170. return predicate.ChatSession(sql.FieldIsNull(FieldDeletedAt))
  171. }
  172. // DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
  173. func DeletedAtNotNil() predicate.ChatSession {
  174. return predicate.ChatSession(sql.FieldNotNull(FieldDeletedAt))
  175. }
  176. // NameEQ applies the EQ predicate on the "name" field.
  177. func NameEQ(v string) predicate.ChatSession {
  178. return predicate.ChatSession(sql.FieldEQ(FieldName, v))
  179. }
  180. // NameNEQ applies the NEQ predicate on the "name" field.
  181. func NameNEQ(v string) predicate.ChatSession {
  182. return predicate.ChatSession(sql.FieldNEQ(FieldName, v))
  183. }
  184. // NameIn applies the In predicate on the "name" field.
  185. func NameIn(vs ...string) predicate.ChatSession {
  186. return predicate.ChatSession(sql.FieldIn(FieldName, vs...))
  187. }
  188. // NameNotIn applies the NotIn predicate on the "name" field.
  189. func NameNotIn(vs ...string) predicate.ChatSession {
  190. return predicate.ChatSession(sql.FieldNotIn(FieldName, vs...))
  191. }
  192. // NameGT applies the GT predicate on the "name" field.
  193. func NameGT(v string) predicate.ChatSession {
  194. return predicate.ChatSession(sql.FieldGT(FieldName, v))
  195. }
  196. // NameGTE applies the GTE predicate on the "name" field.
  197. func NameGTE(v string) predicate.ChatSession {
  198. return predicate.ChatSession(sql.FieldGTE(FieldName, v))
  199. }
  200. // NameLT applies the LT predicate on the "name" field.
  201. func NameLT(v string) predicate.ChatSession {
  202. return predicate.ChatSession(sql.FieldLT(FieldName, v))
  203. }
  204. // NameLTE applies the LTE predicate on the "name" field.
  205. func NameLTE(v string) predicate.ChatSession {
  206. return predicate.ChatSession(sql.FieldLTE(FieldName, v))
  207. }
  208. // NameContains applies the Contains predicate on the "name" field.
  209. func NameContains(v string) predicate.ChatSession {
  210. return predicate.ChatSession(sql.FieldContains(FieldName, v))
  211. }
  212. // NameHasPrefix applies the HasPrefix predicate on the "name" field.
  213. func NameHasPrefix(v string) predicate.ChatSession {
  214. return predicate.ChatSession(sql.FieldHasPrefix(FieldName, v))
  215. }
  216. // NameHasSuffix applies the HasSuffix predicate on the "name" field.
  217. func NameHasSuffix(v string) predicate.ChatSession {
  218. return predicate.ChatSession(sql.FieldHasSuffix(FieldName, v))
  219. }
  220. // NameEqualFold applies the EqualFold predicate on the "name" field.
  221. func NameEqualFold(v string) predicate.ChatSession {
  222. return predicate.ChatSession(sql.FieldEqualFold(FieldName, v))
  223. }
  224. // NameContainsFold applies the ContainsFold predicate on the "name" field.
  225. func NameContainsFold(v string) predicate.ChatSession {
  226. return predicate.ChatSession(sql.FieldContainsFold(FieldName, v))
  227. }
  228. // UserIDEQ applies the EQ predicate on the "user_id" field.
  229. func UserIDEQ(v uint64) predicate.ChatSession {
  230. return predicate.ChatSession(sql.FieldEQ(FieldUserID, v))
  231. }
  232. // UserIDNEQ applies the NEQ predicate on the "user_id" field.
  233. func UserIDNEQ(v uint64) predicate.ChatSession {
  234. return predicate.ChatSession(sql.FieldNEQ(FieldUserID, v))
  235. }
  236. // UserIDIn applies the In predicate on the "user_id" field.
  237. func UserIDIn(vs ...uint64) predicate.ChatSession {
  238. return predicate.ChatSession(sql.FieldIn(FieldUserID, vs...))
  239. }
  240. // UserIDNotIn applies the NotIn predicate on the "user_id" field.
  241. func UserIDNotIn(vs ...uint64) predicate.ChatSession {
  242. return predicate.ChatSession(sql.FieldNotIn(FieldUserID, vs...))
  243. }
  244. // UserIDGT applies the GT predicate on the "user_id" field.
  245. func UserIDGT(v uint64) predicate.ChatSession {
  246. return predicate.ChatSession(sql.FieldGT(FieldUserID, v))
  247. }
  248. // UserIDGTE applies the GTE predicate on the "user_id" field.
  249. func UserIDGTE(v uint64) predicate.ChatSession {
  250. return predicate.ChatSession(sql.FieldGTE(FieldUserID, v))
  251. }
  252. // UserIDLT applies the LT predicate on the "user_id" field.
  253. func UserIDLT(v uint64) predicate.ChatSession {
  254. return predicate.ChatSession(sql.FieldLT(FieldUserID, v))
  255. }
  256. // UserIDLTE applies the LTE predicate on the "user_id" field.
  257. func UserIDLTE(v uint64) predicate.ChatSession {
  258. return predicate.ChatSession(sql.FieldLTE(FieldUserID, v))
  259. }
  260. // BotIDEQ applies the EQ predicate on the "bot_id" field.
  261. func BotIDEQ(v uint64) predicate.ChatSession {
  262. return predicate.ChatSession(sql.FieldEQ(FieldBotID, v))
  263. }
  264. // BotIDNEQ applies the NEQ predicate on the "bot_id" field.
  265. func BotIDNEQ(v uint64) predicate.ChatSession {
  266. return predicate.ChatSession(sql.FieldNEQ(FieldBotID, v))
  267. }
  268. // BotIDIn applies the In predicate on the "bot_id" field.
  269. func BotIDIn(vs ...uint64) predicate.ChatSession {
  270. return predicate.ChatSession(sql.FieldIn(FieldBotID, vs...))
  271. }
  272. // BotIDNotIn applies the NotIn predicate on the "bot_id" field.
  273. func BotIDNotIn(vs ...uint64) predicate.ChatSession {
  274. return predicate.ChatSession(sql.FieldNotIn(FieldBotID, vs...))
  275. }
  276. // BotIDGT applies the GT predicate on the "bot_id" field.
  277. func BotIDGT(v uint64) predicate.ChatSession {
  278. return predicate.ChatSession(sql.FieldGT(FieldBotID, v))
  279. }
  280. // BotIDGTE applies the GTE predicate on the "bot_id" field.
  281. func BotIDGTE(v uint64) predicate.ChatSession {
  282. return predicate.ChatSession(sql.FieldGTE(FieldBotID, v))
  283. }
  284. // BotIDLT applies the LT predicate on the "bot_id" field.
  285. func BotIDLT(v uint64) predicate.ChatSession {
  286. return predicate.ChatSession(sql.FieldLT(FieldBotID, v))
  287. }
  288. // BotIDLTE applies the LTE predicate on the "bot_id" field.
  289. func BotIDLTE(v uint64) predicate.ChatSession {
  290. return predicate.ChatSession(sql.FieldLTE(FieldBotID, v))
  291. }
  292. // BotTypeEQ applies the EQ predicate on the "bot_type" field.
  293. func BotTypeEQ(v uint8) predicate.ChatSession {
  294. return predicate.ChatSession(sql.FieldEQ(FieldBotType, v))
  295. }
  296. // BotTypeNEQ applies the NEQ predicate on the "bot_type" field.
  297. func BotTypeNEQ(v uint8) predicate.ChatSession {
  298. return predicate.ChatSession(sql.FieldNEQ(FieldBotType, v))
  299. }
  300. // BotTypeIn applies the In predicate on the "bot_type" field.
  301. func BotTypeIn(vs ...uint8) predicate.ChatSession {
  302. return predicate.ChatSession(sql.FieldIn(FieldBotType, vs...))
  303. }
  304. // BotTypeNotIn applies the NotIn predicate on the "bot_type" field.
  305. func BotTypeNotIn(vs ...uint8) predicate.ChatSession {
  306. return predicate.ChatSession(sql.FieldNotIn(FieldBotType, vs...))
  307. }
  308. // BotTypeGT applies the GT predicate on the "bot_type" field.
  309. func BotTypeGT(v uint8) predicate.ChatSession {
  310. return predicate.ChatSession(sql.FieldGT(FieldBotType, v))
  311. }
  312. // BotTypeGTE applies the GTE predicate on the "bot_type" field.
  313. func BotTypeGTE(v uint8) predicate.ChatSession {
  314. return predicate.ChatSession(sql.FieldGTE(FieldBotType, v))
  315. }
  316. // BotTypeLT applies the LT predicate on the "bot_type" field.
  317. func BotTypeLT(v uint8) predicate.ChatSession {
  318. return predicate.ChatSession(sql.FieldLT(FieldBotType, v))
  319. }
  320. // BotTypeLTE applies the LTE predicate on the "bot_type" field.
  321. func BotTypeLTE(v uint8) predicate.ChatSession {
  322. return predicate.ChatSession(sql.FieldLTE(FieldBotType, v))
  323. }
  324. // And groups predicates with the AND operator between them.
  325. func And(predicates ...predicate.ChatSession) predicate.ChatSession {
  326. return predicate.ChatSession(sql.AndPredicates(predicates...))
  327. }
  328. // Or groups predicates with the OR operator between them.
  329. func Or(predicates ...predicate.ChatSession) predicate.ChatSession {
  330. return predicate.ChatSession(sql.OrPredicates(predicates...))
  331. }
  332. // Not applies the not operator on the given predicate.
  333. func Not(p predicate.ChatSession) predicate.ChatSession {
  334. return predicate.ChatSession(sql.NotPredicates(p))
  335. }