where.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. // Code generated by ent, DO NOT EDIT.
  2. package tutorial
  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.Tutorial {
  11. return predicate.Tutorial(sql.FieldEQ(FieldID, id))
  12. }
  13. // IDEQ applies the EQ predicate on the ID field.
  14. func IDEQ(id uint64) predicate.Tutorial {
  15. return predicate.Tutorial(sql.FieldEQ(FieldID, id))
  16. }
  17. // IDNEQ applies the NEQ predicate on the ID field.
  18. func IDNEQ(id uint64) predicate.Tutorial {
  19. return predicate.Tutorial(sql.FieldNEQ(FieldID, id))
  20. }
  21. // IDIn applies the In predicate on the ID field.
  22. func IDIn(ids ...uint64) predicate.Tutorial {
  23. return predicate.Tutorial(sql.FieldIn(FieldID, ids...))
  24. }
  25. // IDNotIn applies the NotIn predicate on the ID field.
  26. func IDNotIn(ids ...uint64) predicate.Tutorial {
  27. return predicate.Tutorial(sql.FieldNotIn(FieldID, ids...))
  28. }
  29. // IDGT applies the GT predicate on the ID field.
  30. func IDGT(id uint64) predicate.Tutorial {
  31. return predicate.Tutorial(sql.FieldGT(FieldID, id))
  32. }
  33. // IDGTE applies the GTE predicate on the ID field.
  34. func IDGTE(id uint64) predicate.Tutorial {
  35. return predicate.Tutorial(sql.FieldGTE(FieldID, id))
  36. }
  37. // IDLT applies the LT predicate on the ID field.
  38. func IDLT(id uint64) predicate.Tutorial {
  39. return predicate.Tutorial(sql.FieldLT(FieldID, id))
  40. }
  41. // IDLTE applies the LTE predicate on the ID field.
  42. func IDLTE(id uint64) predicate.Tutorial {
  43. return predicate.Tutorial(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.Tutorial {
  47. return predicate.Tutorial(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.Tutorial {
  51. return predicate.Tutorial(sql.FieldEQ(FieldUpdatedAt, v))
  52. }
  53. // DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
  54. func DeletedAt(v time.Time) predicate.Tutorial {
  55. return predicate.Tutorial(sql.FieldEQ(FieldDeletedAt, v))
  56. }
  57. // EmployeeID applies equality check predicate on the "employee_id" field. It's identical to EmployeeIDEQ.
  58. func EmployeeID(v uint64) predicate.Tutorial {
  59. return predicate.Tutorial(sql.FieldEQ(FieldEmployeeID, v))
  60. }
  61. // Index applies equality check predicate on the "index" field. It's identical to IndexEQ.
  62. func Index(v int) predicate.Tutorial {
  63. return predicate.Tutorial(sql.FieldEQ(FieldIndex, v))
  64. }
  65. // Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
  66. func Title(v string) predicate.Tutorial {
  67. return predicate.Tutorial(sql.FieldEQ(FieldTitle, v))
  68. }
  69. // Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
  70. func Content(v string) predicate.Tutorial {
  71. return predicate.Tutorial(sql.FieldEQ(FieldContent, v))
  72. }
  73. // OrganizationID applies equality check predicate on the "organization_id" field. It's identical to OrganizationIDEQ.
  74. func OrganizationID(v uint64) predicate.Tutorial {
  75. return predicate.Tutorial(sql.FieldEQ(FieldOrganizationID, v))
  76. }
  77. // CreatedAtEQ applies the EQ predicate on the "created_at" field.
  78. func CreatedAtEQ(v time.Time) predicate.Tutorial {
  79. return predicate.Tutorial(sql.FieldEQ(FieldCreatedAt, v))
  80. }
  81. // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
  82. func CreatedAtNEQ(v time.Time) predicate.Tutorial {
  83. return predicate.Tutorial(sql.FieldNEQ(FieldCreatedAt, v))
  84. }
  85. // CreatedAtIn applies the In predicate on the "created_at" field.
  86. func CreatedAtIn(vs ...time.Time) predicate.Tutorial {
  87. return predicate.Tutorial(sql.FieldIn(FieldCreatedAt, vs...))
  88. }
  89. // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
  90. func CreatedAtNotIn(vs ...time.Time) predicate.Tutorial {
  91. return predicate.Tutorial(sql.FieldNotIn(FieldCreatedAt, vs...))
  92. }
  93. // CreatedAtGT applies the GT predicate on the "created_at" field.
  94. func CreatedAtGT(v time.Time) predicate.Tutorial {
  95. return predicate.Tutorial(sql.FieldGT(FieldCreatedAt, v))
  96. }
  97. // CreatedAtGTE applies the GTE predicate on the "created_at" field.
  98. func CreatedAtGTE(v time.Time) predicate.Tutorial {
  99. return predicate.Tutorial(sql.FieldGTE(FieldCreatedAt, v))
  100. }
  101. // CreatedAtLT applies the LT predicate on the "created_at" field.
  102. func CreatedAtLT(v time.Time) predicate.Tutorial {
  103. return predicate.Tutorial(sql.FieldLT(FieldCreatedAt, v))
  104. }
  105. // CreatedAtLTE applies the LTE predicate on the "created_at" field.
  106. func CreatedAtLTE(v time.Time) predicate.Tutorial {
  107. return predicate.Tutorial(sql.FieldLTE(FieldCreatedAt, v))
  108. }
  109. // UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
  110. func UpdatedAtEQ(v time.Time) predicate.Tutorial {
  111. return predicate.Tutorial(sql.FieldEQ(FieldUpdatedAt, v))
  112. }
  113. // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
  114. func UpdatedAtNEQ(v time.Time) predicate.Tutorial {
  115. return predicate.Tutorial(sql.FieldNEQ(FieldUpdatedAt, v))
  116. }
  117. // UpdatedAtIn applies the In predicate on the "updated_at" field.
  118. func UpdatedAtIn(vs ...time.Time) predicate.Tutorial {
  119. return predicate.Tutorial(sql.FieldIn(FieldUpdatedAt, vs...))
  120. }
  121. // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
  122. func UpdatedAtNotIn(vs ...time.Time) predicate.Tutorial {
  123. return predicate.Tutorial(sql.FieldNotIn(FieldUpdatedAt, vs...))
  124. }
  125. // UpdatedAtGT applies the GT predicate on the "updated_at" field.
  126. func UpdatedAtGT(v time.Time) predicate.Tutorial {
  127. return predicate.Tutorial(sql.FieldGT(FieldUpdatedAt, v))
  128. }
  129. // UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
  130. func UpdatedAtGTE(v time.Time) predicate.Tutorial {
  131. return predicate.Tutorial(sql.FieldGTE(FieldUpdatedAt, v))
  132. }
  133. // UpdatedAtLT applies the LT predicate on the "updated_at" field.
  134. func UpdatedAtLT(v time.Time) predicate.Tutorial {
  135. return predicate.Tutorial(sql.FieldLT(FieldUpdatedAt, v))
  136. }
  137. // UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
  138. func UpdatedAtLTE(v time.Time) predicate.Tutorial {
  139. return predicate.Tutorial(sql.FieldLTE(FieldUpdatedAt, v))
  140. }
  141. // DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
  142. func DeletedAtEQ(v time.Time) predicate.Tutorial {
  143. return predicate.Tutorial(sql.FieldEQ(FieldDeletedAt, v))
  144. }
  145. // DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
  146. func DeletedAtNEQ(v time.Time) predicate.Tutorial {
  147. return predicate.Tutorial(sql.FieldNEQ(FieldDeletedAt, v))
  148. }
  149. // DeletedAtIn applies the In predicate on the "deleted_at" field.
  150. func DeletedAtIn(vs ...time.Time) predicate.Tutorial {
  151. return predicate.Tutorial(sql.FieldIn(FieldDeletedAt, vs...))
  152. }
  153. // DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
  154. func DeletedAtNotIn(vs ...time.Time) predicate.Tutorial {
  155. return predicate.Tutorial(sql.FieldNotIn(FieldDeletedAt, vs...))
  156. }
  157. // DeletedAtGT applies the GT predicate on the "deleted_at" field.
  158. func DeletedAtGT(v time.Time) predicate.Tutorial {
  159. return predicate.Tutorial(sql.FieldGT(FieldDeletedAt, v))
  160. }
  161. // DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
  162. func DeletedAtGTE(v time.Time) predicate.Tutorial {
  163. return predicate.Tutorial(sql.FieldGTE(FieldDeletedAt, v))
  164. }
  165. // DeletedAtLT applies the LT predicate on the "deleted_at" field.
  166. func DeletedAtLT(v time.Time) predicate.Tutorial {
  167. return predicate.Tutorial(sql.FieldLT(FieldDeletedAt, v))
  168. }
  169. // DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
  170. func DeletedAtLTE(v time.Time) predicate.Tutorial {
  171. return predicate.Tutorial(sql.FieldLTE(FieldDeletedAt, v))
  172. }
  173. // DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
  174. func DeletedAtIsNil() predicate.Tutorial {
  175. return predicate.Tutorial(sql.FieldIsNull(FieldDeletedAt))
  176. }
  177. // DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
  178. func DeletedAtNotNil() predicate.Tutorial {
  179. return predicate.Tutorial(sql.FieldNotNull(FieldDeletedAt))
  180. }
  181. // EmployeeIDEQ applies the EQ predicate on the "employee_id" field.
  182. func EmployeeIDEQ(v uint64) predicate.Tutorial {
  183. return predicate.Tutorial(sql.FieldEQ(FieldEmployeeID, v))
  184. }
  185. // EmployeeIDNEQ applies the NEQ predicate on the "employee_id" field.
  186. func EmployeeIDNEQ(v uint64) predicate.Tutorial {
  187. return predicate.Tutorial(sql.FieldNEQ(FieldEmployeeID, v))
  188. }
  189. // EmployeeIDIn applies the In predicate on the "employee_id" field.
  190. func EmployeeIDIn(vs ...uint64) predicate.Tutorial {
  191. return predicate.Tutorial(sql.FieldIn(FieldEmployeeID, vs...))
  192. }
  193. // EmployeeIDNotIn applies the NotIn predicate on the "employee_id" field.
  194. func EmployeeIDNotIn(vs ...uint64) predicate.Tutorial {
  195. return predicate.Tutorial(sql.FieldNotIn(FieldEmployeeID, vs...))
  196. }
  197. // IndexEQ applies the EQ predicate on the "index" field.
  198. func IndexEQ(v int) predicate.Tutorial {
  199. return predicate.Tutorial(sql.FieldEQ(FieldIndex, v))
  200. }
  201. // IndexNEQ applies the NEQ predicate on the "index" field.
  202. func IndexNEQ(v int) predicate.Tutorial {
  203. return predicate.Tutorial(sql.FieldNEQ(FieldIndex, v))
  204. }
  205. // IndexIn applies the In predicate on the "index" field.
  206. func IndexIn(vs ...int) predicate.Tutorial {
  207. return predicate.Tutorial(sql.FieldIn(FieldIndex, vs...))
  208. }
  209. // IndexNotIn applies the NotIn predicate on the "index" field.
  210. func IndexNotIn(vs ...int) predicate.Tutorial {
  211. return predicate.Tutorial(sql.FieldNotIn(FieldIndex, vs...))
  212. }
  213. // IndexGT applies the GT predicate on the "index" field.
  214. func IndexGT(v int) predicate.Tutorial {
  215. return predicate.Tutorial(sql.FieldGT(FieldIndex, v))
  216. }
  217. // IndexGTE applies the GTE predicate on the "index" field.
  218. func IndexGTE(v int) predicate.Tutorial {
  219. return predicate.Tutorial(sql.FieldGTE(FieldIndex, v))
  220. }
  221. // IndexLT applies the LT predicate on the "index" field.
  222. func IndexLT(v int) predicate.Tutorial {
  223. return predicate.Tutorial(sql.FieldLT(FieldIndex, v))
  224. }
  225. // IndexLTE applies the LTE predicate on the "index" field.
  226. func IndexLTE(v int) predicate.Tutorial {
  227. return predicate.Tutorial(sql.FieldLTE(FieldIndex, v))
  228. }
  229. // TitleEQ applies the EQ predicate on the "title" field.
  230. func TitleEQ(v string) predicate.Tutorial {
  231. return predicate.Tutorial(sql.FieldEQ(FieldTitle, v))
  232. }
  233. // TitleNEQ applies the NEQ predicate on the "title" field.
  234. func TitleNEQ(v string) predicate.Tutorial {
  235. return predicate.Tutorial(sql.FieldNEQ(FieldTitle, v))
  236. }
  237. // TitleIn applies the In predicate on the "title" field.
  238. func TitleIn(vs ...string) predicate.Tutorial {
  239. return predicate.Tutorial(sql.FieldIn(FieldTitle, vs...))
  240. }
  241. // TitleNotIn applies the NotIn predicate on the "title" field.
  242. func TitleNotIn(vs ...string) predicate.Tutorial {
  243. return predicate.Tutorial(sql.FieldNotIn(FieldTitle, vs...))
  244. }
  245. // TitleGT applies the GT predicate on the "title" field.
  246. func TitleGT(v string) predicate.Tutorial {
  247. return predicate.Tutorial(sql.FieldGT(FieldTitle, v))
  248. }
  249. // TitleGTE applies the GTE predicate on the "title" field.
  250. func TitleGTE(v string) predicate.Tutorial {
  251. return predicate.Tutorial(sql.FieldGTE(FieldTitle, v))
  252. }
  253. // TitleLT applies the LT predicate on the "title" field.
  254. func TitleLT(v string) predicate.Tutorial {
  255. return predicate.Tutorial(sql.FieldLT(FieldTitle, v))
  256. }
  257. // TitleLTE applies the LTE predicate on the "title" field.
  258. func TitleLTE(v string) predicate.Tutorial {
  259. return predicate.Tutorial(sql.FieldLTE(FieldTitle, v))
  260. }
  261. // TitleContains applies the Contains predicate on the "title" field.
  262. func TitleContains(v string) predicate.Tutorial {
  263. return predicate.Tutorial(sql.FieldContains(FieldTitle, v))
  264. }
  265. // TitleHasPrefix applies the HasPrefix predicate on the "title" field.
  266. func TitleHasPrefix(v string) predicate.Tutorial {
  267. return predicate.Tutorial(sql.FieldHasPrefix(FieldTitle, v))
  268. }
  269. // TitleHasSuffix applies the HasSuffix predicate on the "title" field.
  270. func TitleHasSuffix(v string) predicate.Tutorial {
  271. return predicate.Tutorial(sql.FieldHasSuffix(FieldTitle, v))
  272. }
  273. // TitleEqualFold applies the EqualFold predicate on the "title" field.
  274. func TitleEqualFold(v string) predicate.Tutorial {
  275. return predicate.Tutorial(sql.FieldEqualFold(FieldTitle, v))
  276. }
  277. // TitleContainsFold applies the ContainsFold predicate on the "title" field.
  278. func TitleContainsFold(v string) predicate.Tutorial {
  279. return predicate.Tutorial(sql.FieldContainsFold(FieldTitle, v))
  280. }
  281. // ContentEQ applies the EQ predicate on the "content" field.
  282. func ContentEQ(v string) predicate.Tutorial {
  283. return predicate.Tutorial(sql.FieldEQ(FieldContent, v))
  284. }
  285. // ContentNEQ applies the NEQ predicate on the "content" field.
  286. func ContentNEQ(v string) predicate.Tutorial {
  287. return predicate.Tutorial(sql.FieldNEQ(FieldContent, v))
  288. }
  289. // ContentIn applies the In predicate on the "content" field.
  290. func ContentIn(vs ...string) predicate.Tutorial {
  291. return predicate.Tutorial(sql.FieldIn(FieldContent, vs...))
  292. }
  293. // ContentNotIn applies the NotIn predicate on the "content" field.
  294. func ContentNotIn(vs ...string) predicate.Tutorial {
  295. return predicate.Tutorial(sql.FieldNotIn(FieldContent, vs...))
  296. }
  297. // ContentGT applies the GT predicate on the "content" field.
  298. func ContentGT(v string) predicate.Tutorial {
  299. return predicate.Tutorial(sql.FieldGT(FieldContent, v))
  300. }
  301. // ContentGTE applies the GTE predicate on the "content" field.
  302. func ContentGTE(v string) predicate.Tutorial {
  303. return predicate.Tutorial(sql.FieldGTE(FieldContent, v))
  304. }
  305. // ContentLT applies the LT predicate on the "content" field.
  306. func ContentLT(v string) predicate.Tutorial {
  307. return predicate.Tutorial(sql.FieldLT(FieldContent, v))
  308. }
  309. // ContentLTE applies the LTE predicate on the "content" field.
  310. func ContentLTE(v string) predicate.Tutorial {
  311. return predicate.Tutorial(sql.FieldLTE(FieldContent, v))
  312. }
  313. // ContentContains applies the Contains predicate on the "content" field.
  314. func ContentContains(v string) predicate.Tutorial {
  315. return predicate.Tutorial(sql.FieldContains(FieldContent, v))
  316. }
  317. // ContentHasPrefix applies the HasPrefix predicate on the "content" field.
  318. func ContentHasPrefix(v string) predicate.Tutorial {
  319. return predicate.Tutorial(sql.FieldHasPrefix(FieldContent, v))
  320. }
  321. // ContentHasSuffix applies the HasSuffix predicate on the "content" field.
  322. func ContentHasSuffix(v string) predicate.Tutorial {
  323. return predicate.Tutorial(sql.FieldHasSuffix(FieldContent, v))
  324. }
  325. // ContentEqualFold applies the EqualFold predicate on the "content" field.
  326. func ContentEqualFold(v string) predicate.Tutorial {
  327. return predicate.Tutorial(sql.FieldEqualFold(FieldContent, v))
  328. }
  329. // ContentContainsFold applies the ContainsFold predicate on the "content" field.
  330. func ContentContainsFold(v string) predicate.Tutorial {
  331. return predicate.Tutorial(sql.FieldContainsFold(FieldContent, v))
  332. }
  333. // OrganizationIDEQ applies the EQ predicate on the "organization_id" field.
  334. func OrganizationIDEQ(v uint64) predicate.Tutorial {
  335. return predicate.Tutorial(sql.FieldEQ(FieldOrganizationID, v))
  336. }
  337. // OrganizationIDNEQ applies the NEQ predicate on the "organization_id" field.
  338. func OrganizationIDNEQ(v uint64) predicate.Tutorial {
  339. return predicate.Tutorial(sql.FieldNEQ(FieldOrganizationID, v))
  340. }
  341. // OrganizationIDIn applies the In predicate on the "organization_id" field.
  342. func OrganizationIDIn(vs ...uint64) predicate.Tutorial {
  343. return predicate.Tutorial(sql.FieldIn(FieldOrganizationID, vs...))
  344. }
  345. // OrganizationIDNotIn applies the NotIn predicate on the "organization_id" field.
  346. func OrganizationIDNotIn(vs ...uint64) predicate.Tutorial {
  347. return predicate.Tutorial(sql.FieldNotIn(FieldOrganizationID, vs...))
  348. }
  349. // OrganizationIDGT applies the GT predicate on the "organization_id" field.
  350. func OrganizationIDGT(v uint64) predicate.Tutorial {
  351. return predicate.Tutorial(sql.FieldGT(FieldOrganizationID, v))
  352. }
  353. // OrganizationIDGTE applies the GTE predicate on the "organization_id" field.
  354. func OrganizationIDGTE(v uint64) predicate.Tutorial {
  355. return predicate.Tutorial(sql.FieldGTE(FieldOrganizationID, v))
  356. }
  357. // OrganizationIDLT applies the LT predicate on the "organization_id" field.
  358. func OrganizationIDLT(v uint64) predicate.Tutorial {
  359. return predicate.Tutorial(sql.FieldLT(FieldOrganizationID, v))
  360. }
  361. // OrganizationIDLTE applies the LTE predicate on the "organization_id" field.
  362. func OrganizationIDLTE(v uint64) predicate.Tutorial {
  363. return predicate.Tutorial(sql.FieldLTE(FieldOrganizationID, v))
  364. }
  365. // HasEmployee applies the HasEdge predicate on the "employee" edge.
  366. func HasEmployee() predicate.Tutorial {
  367. return predicate.Tutorial(func(s *sql.Selector) {
  368. step := sqlgraph.NewStep(
  369. sqlgraph.From(Table, FieldID),
  370. sqlgraph.Edge(sqlgraph.M2O, true, EmployeeTable, EmployeeColumn),
  371. )
  372. sqlgraph.HasNeighbors(s, step)
  373. })
  374. }
  375. // HasEmployeeWith applies the HasEdge predicate on the "employee" edge with a given conditions (other predicates).
  376. func HasEmployeeWith(preds ...predicate.Employee) predicate.Tutorial {
  377. return predicate.Tutorial(func(s *sql.Selector) {
  378. step := newEmployeeStep()
  379. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  380. for _, p := range preds {
  381. p(s)
  382. }
  383. })
  384. })
  385. }
  386. // And groups predicates with the AND operator between them.
  387. func And(predicates ...predicate.Tutorial) predicate.Tutorial {
  388. return predicate.Tutorial(sql.AndPredicates(predicates...))
  389. }
  390. // Or groups predicates with the OR operator between them.
  391. func Or(predicates ...predicate.Tutorial) predicate.Tutorial {
  392. return predicate.Tutorial(sql.OrPredicates(predicates...))
  393. }
  394. // Not applies the not operator on the given predicate.
  395. func Not(p predicate.Tutorial) predicate.Tutorial {
  396. return predicate.Tutorial(sql.NotPredicates(p))
  397. }