where.go 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. // Code generated by ent, DO NOT EDIT.
  2. package announcement
  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. // ID filters vertices based on their ID field.
  10. func ID(id int64) predicate.Announcement {
  11. return predicate.Announcement(sql.FieldEQ(FieldID, id))
  12. }
  13. // IDEQ applies the EQ predicate on the ID field.
  14. func IDEQ(id int64) predicate.Announcement {
  15. return predicate.Announcement(sql.FieldEQ(FieldID, id))
  16. }
  17. // IDNEQ applies the NEQ predicate on the ID field.
  18. func IDNEQ(id int64) predicate.Announcement {
  19. return predicate.Announcement(sql.FieldNEQ(FieldID, id))
  20. }
  21. // IDIn applies the In predicate on the ID field.
  22. func IDIn(ids ...int64) predicate.Announcement {
  23. return predicate.Announcement(sql.FieldIn(FieldID, ids...))
  24. }
  25. // IDNotIn applies the NotIn predicate on the ID field.
  26. func IDNotIn(ids ...int64) predicate.Announcement {
  27. return predicate.Announcement(sql.FieldNotIn(FieldID, ids...))
  28. }
  29. // IDGT applies the GT predicate on the ID field.
  30. func IDGT(id int64) predicate.Announcement {
  31. return predicate.Announcement(sql.FieldGT(FieldID, id))
  32. }
  33. // IDGTE applies the GTE predicate on the ID field.
  34. func IDGTE(id int64) predicate.Announcement {
  35. return predicate.Announcement(sql.FieldGTE(FieldID, id))
  36. }
  37. // IDLT applies the LT predicate on the ID field.
  38. func IDLT(id int64) predicate.Announcement {
  39. return predicate.Announcement(sql.FieldLT(FieldID, id))
  40. }
  41. // IDLTE applies the LTE predicate on the ID field.
  42. func IDLTE(id int64) predicate.Announcement {
  43. return predicate.Announcement(sql.FieldLTE(FieldID, id))
  44. }
  45. // Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
  46. func Title(v string) predicate.Announcement {
  47. return predicate.Announcement(sql.FieldEQ(FieldTitle, v))
  48. }
  49. // Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
  50. func Content(v string) predicate.Announcement {
  51. return predicate.Announcement(sql.FieldEQ(FieldContent, v))
  52. }
  53. // Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
  54. func Status(v string) predicate.Announcement {
  55. return predicate.Announcement(sql.FieldEQ(FieldStatus, v))
  56. }
  57. // NotifyMode applies equality check predicate on the "notify_mode" field. It's identical to NotifyModeEQ.
  58. func NotifyMode(v string) predicate.Announcement {
  59. return predicate.Announcement(sql.FieldEQ(FieldNotifyMode, v))
  60. }
  61. // StartsAt applies equality check predicate on the "starts_at" field. It's identical to StartsAtEQ.
  62. func StartsAt(v time.Time) predicate.Announcement {
  63. return predicate.Announcement(sql.FieldEQ(FieldStartsAt, v))
  64. }
  65. // EndsAt applies equality check predicate on the "ends_at" field. It's identical to EndsAtEQ.
  66. func EndsAt(v time.Time) predicate.Announcement {
  67. return predicate.Announcement(sql.FieldEQ(FieldEndsAt, v))
  68. }
  69. // CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.
  70. func CreatedBy(v int64) predicate.Announcement {
  71. return predicate.Announcement(sql.FieldEQ(FieldCreatedBy, v))
  72. }
  73. // UpdatedBy applies equality check predicate on the "updated_by" field. It's identical to UpdatedByEQ.
  74. func UpdatedBy(v int64) predicate.Announcement {
  75. return predicate.Announcement(sql.FieldEQ(FieldUpdatedBy, v))
  76. }
  77. // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
  78. func CreatedAt(v time.Time) predicate.Announcement {
  79. return predicate.Announcement(sql.FieldEQ(FieldCreatedAt, v))
  80. }
  81. // UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
  82. func UpdatedAt(v time.Time) predicate.Announcement {
  83. return predicate.Announcement(sql.FieldEQ(FieldUpdatedAt, v))
  84. }
  85. // TitleEQ applies the EQ predicate on the "title" field.
  86. func TitleEQ(v string) predicate.Announcement {
  87. return predicate.Announcement(sql.FieldEQ(FieldTitle, v))
  88. }
  89. // TitleNEQ applies the NEQ predicate on the "title" field.
  90. func TitleNEQ(v string) predicate.Announcement {
  91. return predicate.Announcement(sql.FieldNEQ(FieldTitle, v))
  92. }
  93. // TitleIn applies the In predicate on the "title" field.
  94. func TitleIn(vs ...string) predicate.Announcement {
  95. return predicate.Announcement(sql.FieldIn(FieldTitle, vs...))
  96. }
  97. // TitleNotIn applies the NotIn predicate on the "title" field.
  98. func TitleNotIn(vs ...string) predicate.Announcement {
  99. return predicate.Announcement(sql.FieldNotIn(FieldTitle, vs...))
  100. }
  101. // TitleGT applies the GT predicate on the "title" field.
  102. func TitleGT(v string) predicate.Announcement {
  103. return predicate.Announcement(sql.FieldGT(FieldTitle, v))
  104. }
  105. // TitleGTE applies the GTE predicate on the "title" field.
  106. func TitleGTE(v string) predicate.Announcement {
  107. return predicate.Announcement(sql.FieldGTE(FieldTitle, v))
  108. }
  109. // TitleLT applies the LT predicate on the "title" field.
  110. func TitleLT(v string) predicate.Announcement {
  111. return predicate.Announcement(sql.FieldLT(FieldTitle, v))
  112. }
  113. // TitleLTE applies the LTE predicate on the "title" field.
  114. func TitleLTE(v string) predicate.Announcement {
  115. return predicate.Announcement(sql.FieldLTE(FieldTitle, v))
  116. }
  117. // TitleContains applies the Contains predicate on the "title" field.
  118. func TitleContains(v string) predicate.Announcement {
  119. return predicate.Announcement(sql.FieldContains(FieldTitle, v))
  120. }
  121. // TitleHasPrefix applies the HasPrefix predicate on the "title" field.
  122. func TitleHasPrefix(v string) predicate.Announcement {
  123. return predicate.Announcement(sql.FieldHasPrefix(FieldTitle, v))
  124. }
  125. // TitleHasSuffix applies the HasSuffix predicate on the "title" field.
  126. func TitleHasSuffix(v string) predicate.Announcement {
  127. return predicate.Announcement(sql.FieldHasSuffix(FieldTitle, v))
  128. }
  129. // TitleEqualFold applies the EqualFold predicate on the "title" field.
  130. func TitleEqualFold(v string) predicate.Announcement {
  131. return predicate.Announcement(sql.FieldEqualFold(FieldTitle, v))
  132. }
  133. // TitleContainsFold applies the ContainsFold predicate on the "title" field.
  134. func TitleContainsFold(v string) predicate.Announcement {
  135. return predicate.Announcement(sql.FieldContainsFold(FieldTitle, v))
  136. }
  137. // ContentEQ applies the EQ predicate on the "content" field.
  138. func ContentEQ(v string) predicate.Announcement {
  139. return predicate.Announcement(sql.FieldEQ(FieldContent, v))
  140. }
  141. // ContentNEQ applies the NEQ predicate on the "content" field.
  142. func ContentNEQ(v string) predicate.Announcement {
  143. return predicate.Announcement(sql.FieldNEQ(FieldContent, v))
  144. }
  145. // ContentIn applies the In predicate on the "content" field.
  146. func ContentIn(vs ...string) predicate.Announcement {
  147. return predicate.Announcement(sql.FieldIn(FieldContent, vs...))
  148. }
  149. // ContentNotIn applies the NotIn predicate on the "content" field.
  150. func ContentNotIn(vs ...string) predicate.Announcement {
  151. return predicate.Announcement(sql.FieldNotIn(FieldContent, vs...))
  152. }
  153. // ContentGT applies the GT predicate on the "content" field.
  154. func ContentGT(v string) predicate.Announcement {
  155. return predicate.Announcement(sql.FieldGT(FieldContent, v))
  156. }
  157. // ContentGTE applies the GTE predicate on the "content" field.
  158. func ContentGTE(v string) predicate.Announcement {
  159. return predicate.Announcement(sql.FieldGTE(FieldContent, v))
  160. }
  161. // ContentLT applies the LT predicate on the "content" field.
  162. func ContentLT(v string) predicate.Announcement {
  163. return predicate.Announcement(sql.FieldLT(FieldContent, v))
  164. }
  165. // ContentLTE applies the LTE predicate on the "content" field.
  166. func ContentLTE(v string) predicate.Announcement {
  167. return predicate.Announcement(sql.FieldLTE(FieldContent, v))
  168. }
  169. // ContentContains applies the Contains predicate on the "content" field.
  170. func ContentContains(v string) predicate.Announcement {
  171. return predicate.Announcement(sql.FieldContains(FieldContent, v))
  172. }
  173. // ContentHasPrefix applies the HasPrefix predicate on the "content" field.
  174. func ContentHasPrefix(v string) predicate.Announcement {
  175. return predicate.Announcement(sql.FieldHasPrefix(FieldContent, v))
  176. }
  177. // ContentHasSuffix applies the HasSuffix predicate on the "content" field.
  178. func ContentHasSuffix(v string) predicate.Announcement {
  179. return predicate.Announcement(sql.FieldHasSuffix(FieldContent, v))
  180. }
  181. // ContentEqualFold applies the EqualFold predicate on the "content" field.
  182. func ContentEqualFold(v string) predicate.Announcement {
  183. return predicate.Announcement(sql.FieldEqualFold(FieldContent, v))
  184. }
  185. // ContentContainsFold applies the ContainsFold predicate on the "content" field.
  186. func ContentContainsFold(v string) predicate.Announcement {
  187. return predicate.Announcement(sql.FieldContainsFold(FieldContent, v))
  188. }
  189. // StatusEQ applies the EQ predicate on the "status" field.
  190. func StatusEQ(v string) predicate.Announcement {
  191. return predicate.Announcement(sql.FieldEQ(FieldStatus, v))
  192. }
  193. // StatusNEQ applies the NEQ predicate on the "status" field.
  194. func StatusNEQ(v string) predicate.Announcement {
  195. return predicate.Announcement(sql.FieldNEQ(FieldStatus, v))
  196. }
  197. // StatusIn applies the In predicate on the "status" field.
  198. func StatusIn(vs ...string) predicate.Announcement {
  199. return predicate.Announcement(sql.FieldIn(FieldStatus, vs...))
  200. }
  201. // StatusNotIn applies the NotIn predicate on the "status" field.
  202. func StatusNotIn(vs ...string) predicate.Announcement {
  203. return predicate.Announcement(sql.FieldNotIn(FieldStatus, vs...))
  204. }
  205. // StatusGT applies the GT predicate on the "status" field.
  206. func StatusGT(v string) predicate.Announcement {
  207. return predicate.Announcement(sql.FieldGT(FieldStatus, v))
  208. }
  209. // StatusGTE applies the GTE predicate on the "status" field.
  210. func StatusGTE(v string) predicate.Announcement {
  211. return predicate.Announcement(sql.FieldGTE(FieldStatus, v))
  212. }
  213. // StatusLT applies the LT predicate on the "status" field.
  214. func StatusLT(v string) predicate.Announcement {
  215. return predicate.Announcement(sql.FieldLT(FieldStatus, v))
  216. }
  217. // StatusLTE applies the LTE predicate on the "status" field.
  218. func StatusLTE(v string) predicate.Announcement {
  219. return predicate.Announcement(sql.FieldLTE(FieldStatus, v))
  220. }
  221. // StatusContains applies the Contains predicate on the "status" field.
  222. func StatusContains(v string) predicate.Announcement {
  223. return predicate.Announcement(sql.FieldContains(FieldStatus, v))
  224. }
  225. // StatusHasPrefix applies the HasPrefix predicate on the "status" field.
  226. func StatusHasPrefix(v string) predicate.Announcement {
  227. return predicate.Announcement(sql.FieldHasPrefix(FieldStatus, v))
  228. }
  229. // StatusHasSuffix applies the HasSuffix predicate on the "status" field.
  230. func StatusHasSuffix(v string) predicate.Announcement {
  231. return predicate.Announcement(sql.FieldHasSuffix(FieldStatus, v))
  232. }
  233. // StatusEqualFold applies the EqualFold predicate on the "status" field.
  234. func StatusEqualFold(v string) predicate.Announcement {
  235. return predicate.Announcement(sql.FieldEqualFold(FieldStatus, v))
  236. }
  237. // StatusContainsFold applies the ContainsFold predicate on the "status" field.
  238. func StatusContainsFold(v string) predicate.Announcement {
  239. return predicate.Announcement(sql.FieldContainsFold(FieldStatus, v))
  240. }
  241. // NotifyModeEQ applies the EQ predicate on the "notify_mode" field.
  242. func NotifyModeEQ(v string) predicate.Announcement {
  243. return predicate.Announcement(sql.FieldEQ(FieldNotifyMode, v))
  244. }
  245. // NotifyModeNEQ applies the NEQ predicate on the "notify_mode" field.
  246. func NotifyModeNEQ(v string) predicate.Announcement {
  247. return predicate.Announcement(sql.FieldNEQ(FieldNotifyMode, v))
  248. }
  249. // NotifyModeIn applies the In predicate on the "notify_mode" field.
  250. func NotifyModeIn(vs ...string) predicate.Announcement {
  251. return predicate.Announcement(sql.FieldIn(FieldNotifyMode, vs...))
  252. }
  253. // NotifyModeNotIn applies the NotIn predicate on the "notify_mode" field.
  254. func NotifyModeNotIn(vs ...string) predicate.Announcement {
  255. return predicate.Announcement(sql.FieldNotIn(FieldNotifyMode, vs...))
  256. }
  257. // NotifyModeGT applies the GT predicate on the "notify_mode" field.
  258. func NotifyModeGT(v string) predicate.Announcement {
  259. return predicate.Announcement(sql.FieldGT(FieldNotifyMode, v))
  260. }
  261. // NotifyModeGTE applies the GTE predicate on the "notify_mode" field.
  262. func NotifyModeGTE(v string) predicate.Announcement {
  263. return predicate.Announcement(sql.FieldGTE(FieldNotifyMode, v))
  264. }
  265. // NotifyModeLT applies the LT predicate on the "notify_mode" field.
  266. func NotifyModeLT(v string) predicate.Announcement {
  267. return predicate.Announcement(sql.FieldLT(FieldNotifyMode, v))
  268. }
  269. // NotifyModeLTE applies the LTE predicate on the "notify_mode" field.
  270. func NotifyModeLTE(v string) predicate.Announcement {
  271. return predicate.Announcement(sql.FieldLTE(FieldNotifyMode, v))
  272. }
  273. // NotifyModeContains applies the Contains predicate on the "notify_mode" field.
  274. func NotifyModeContains(v string) predicate.Announcement {
  275. return predicate.Announcement(sql.FieldContains(FieldNotifyMode, v))
  276. }
  277. // NotifyModeHasPrefix applies the HasPrefix predicate on the "notify_mode" field.
  278. func NotifyModeHasPrefix(v string) predicate.Announcement {
  279. return predicate.Announcement(sql.FieldHasPrefix(FieldNotifyMode, v))
  280. }
  281. // NotifyModeHasSuffix applies the HasSuffix predicate on the "notify_mode" field.
  282. func NotifyModeHasSuffix(v string) predicate.Announcement {
  283. return predicate.Announcement(sql.FieldHasSuffix(FieldNotifyMode, v))
  284. }
  285. // NotifyModeEqualFold applies the EqualFold predicate on the "notify_mode" field.
  286. func NotifyModeEqualFold(v string) predicate.Announcement {
  287. return predicate.Announcement(sql.FieldEqualFold(FieldNotifyMode, v))
  288. }
  289. // NotifyModeContainsFold applies the ContainsFold predicate on the "notify_mode" field.
  290. func NotifyModeContainsFold(v string) predicate.Announcement {
  291. return predicate.Announcement(sql.FieldContainsFold(FieldNotifyMode, v))
  292. }
  293. // TargetingIsNil applies the IsNil predicate on the "targeting" field.
  294. func TargetingIsNil() predicate.Announcement {
  295. return predicate.Announcement(sql.FieldIsNull(FieldTargeting))
  296. }
  297. // TargetingNotNil applies the NotNil predicate on the "targeting" field.
  298. func TargetingNotNil() predicate.Announcement {
  299. return predicate.Announcement(sql.FieldNotNull(FieldTargeting))
  300. }
  301. // StartsAtEQ applies the EQ predicate on the "starts_at" field.
  302. func StartsAtEQ(v time.Time) predicate.Announcement {
  303. return predicate.Announcement(sql.FieldEQ(FieldStartsAt, v))
  304. }
  305. // StartsAtNEQ applies the NEQ predicate on the "starts_at" field.
  306. func StartsAtNEQ(v time.Time) predicate.Announcement {
  307. return predicate.Announcement(sql.FieldNEQ(FieldStartsAt, v))
  308. }
  309. // StartsAtIn applies the In predicate on the "starts_at" field.
  310. func StartsAtIn(vs ...time.Time) predicate.Announcement {
  311. return predicate.Announcement(sql.FieldIn(FieldStartsAt, vs...))
  312. }
  313. // StartsAtNotIn applies the NotIn predicate on the "starts_at" field.
  314. func StartsAtNotIn(vs ...time.Time) predicate.Announcement {
  315. return predicate.Announcement(sql.FieldNotIn(FieldStartsAt, vs...))
  316. }
  317. // StartsAtGT applies the GT predicate on the "starts_at" field.
  318. func StartsAtGT(v time.Time) predicate.Announcement {
  319. return predicate.Announcement(sql.FieldGT(FieldStartsAt, v))
  320. }
  321. // StartsAtGTE applies the GTE predicate on the "starts_at" field.
  322. func StartsAtGTE(v time.Time) predicate.Announcement {
  323. return predicate.Announcement(sql.FieldGTE(FieldStartsAt, v))
  324. }
  325. // StartsAtLT applies the LT predicate on the "starts_at" field.
  326. func StartsAtLT(v time.Time) predicate.Announcement {
  327. return predicate.Announcement(sql.FieldLT(FieldStartsAt, v))
  328. }
  329. // StartsAtLTE applies the LTE predicate on the "starts_at" field.
  330. func StartsAtLTE(v time.Time) predicate.Announcement {
  331. return predicate.Announcement(sql.FieldLTE(FieldStartsAt, v))
  332. }
  333. // StartsAtIsNil applies the IsNil predicate on the "starts_at" field.
  334. func StartsAtIsNil() predicate.Announcement {
  335. return predicate.Announcement(sql.FieldIsNull(FieldStartsAt))
  336. }
  337. // StartsAtNotNil applies the NotNil predicate on the "starts_at" field.
  338. func StartsAtNotNil() predicate.Announcement {
  339. return predicate.Announcement(sql.FieldNotNull(FieldStartsAt))
  340. }
  341. // EndsAtEQ applies the EQ predicate on the "ends_at" field.
  342. func EndsAtEQ(v time.Time) predicate.Announcement {
  343. return predicate.Announcement(sql.FieldEQ(FieldEndsAt, v))
  344. }
  345. // EndsAtNEQ applies the NEQ predicate on the "ends_at" field.
  346. func EndsAtNEQ(v time.Time) predicate.Announcement {
  347. return predicate.Announcement(sql.FieldNEQ(FieldEndsAt, v))
  348. }
  349. // EndsAtIn applies the In predicate on the "ends_at" field.
  350. func EndsAtIn(vs ...time.Time) predicate.Announcement {
  351. return predicate.Announcement(sql.FieldIn(FieldEndsAt, vs...))
  352. }
  353. // EndsAtNotIn applies the NotIn predicate on the "ends_at" field.
  354. func EndsAtNotIn(vs ...time.Time) predicate.Announcement {
  355. return predicate.Announcement(sql.FieldNotIn(FieldEndsAt, vs...))
  356. }
  357. // EndsAtGT applies the GT predicate on the "ends_at" field.
  358. func EndsAtGT(v time.Time) predicate.Announcement {
  359. return predicate.Announcement(sql.FieldGT(FieldEndsAt, v))
  360. }
  361. // EndsAtGTE applies the GTE predicate on the "ends_at" field.
  362. func EndsAtGTE(v time.Time) predicate.Announcement {
  363. return predicate.Announcement(sql.FieldGTE(FieldEndsAt, v))
  364. }
  365. // EndsAtLT applies the LT predicate on the "ends_at" field.
  366. func EndsAtLT(v time.Time) predicate.Announcement {
  367. return predicate.Announcement(sql.FieldLT(FieldEndsAt, v))
  368. }
  369. // EndsAtLTE applies the LTE predicate on the "ends_at" field.
  370. func EndsAtLTE(v time.Time) predicate.Announcement {
  371. return predicate.Announcement(sql.FieldLTE(FieldEndsAt, v))
  372. }
  373. // EndsAtIsNil applies the IsNil predicate on the "ends_at" field.
  374. func EndsAtIsNil() predicate.Announcement {
  375. return predicate.Announcement(sql.FieldIsNull(FieldEndsAt))
  376. }
  377. // EndsAtNotNil applies the NotNil predicate on the "ends_at" field.
  378. func EndsAtNotNil() predicate.Announcement {
  379. return predicate.Announcement(sql.FieldNotNull(FieldEndsAt))
  380. }
  381. // CreatedByEQ applies the EQ predicate on the "created_by" field.
  382. func CreatedByEQ(v int64) predicate.Announcement {
  383. return predicate.Announcement(sql.FieldEQ(FieldCreatedBy, v))
  384. }
  385. // CreatedByNEQ applies the NEQ predicate on the "created_by" field.
  386. func CreatedByNEQ(v int64) predicate.Announcement {
  387. return predicate.Announcement(sql.FieldNEQ(FieldCreatedBy, v))
  388. }
  389. // CreatedByIn applies the In predicate on the "created_by" field.
  390. func CreatedByIn(vs ...int64) predicate.Announcement {
  391. return predicate.Announcement(sql.FieldIn(FieldCreatedBy, vs...))
  392. }
  393. // CreatedByNotIn applies the NotIn predicate on the "created_by" field.
  394. func CreatedByNotIn(vs ...int64) predicate.Announcement {
  395. return predicate.Announcement(sql.FieldNotIn(FieldCreatedBy, vs...))
  396. }
  397. // CreatedByGT applies the GT predicate on the "created_by" field.
  398. func CreatedByGT(v int64) predicate.Announcement {
  399. return predicate.Announcement(sql.FieldGT(FieldCreatedBy, v))
  400. }
  401. // CreatedByGTE applies the GTE predicate on the "created_by" field.
  402. func CreatedByGTE(v int64) predicate.Announcement {
  403. return predicate.Announcement(sql.FieldGTE(FieldCreatedBy, v))
  404. }
  405. // CreatedByLT applies the LT predicate on the "created_by" field.
  406. func CreatedByLT(v int64) predicate.Announcement {
  407. return predicate.Announcement(sql.FieldLT(FieldCreatedBy, v))
  408. }
  409. // CreatedByLTE applies the LTE predicate on the "created_by" field.
  410. func CreatedByLTE(v int64) predicate.Announcement {
  411. return predicate.Announcement(sql.FieldLTE(FieldCreatedBy, v))
  412. }
  413. // CreatedByIsNil applies the IsNil predicate on the "created_by" field.
  414. func CreatedByIsNil() predicate.Announcement {
  415. return predicate.Announcement(sql.FieldIsNull(FieldCreatedBy))
  416. }
  417. // CreatedByNotNil applies the NotNil predicate on the "created_by" field.
  418. func CreatedByNotNil() predicate.Announcement {
  419. return predicate.Announcement(sql.FieldNotNull(FieldCreatedBy))
  420. }
  421. // UpdatedByEQ applies the EQ predicate on the "updated_by" field.
  422. func UpdatedByEQ(v int64) predicate.Announcement {
  423. return predicate.Announcement(sql.FieldEQ(FieldUpdatedBy, v))
  424. }
  425. // UpdatedByNEQ applies the NEQ predicate on the "updated_by" field.
  426. func UpdatedByNEQ(v int64) predicate.Announcement {
  427. return predicate.Announcement(sql.FieldNEQ(FieldUpdatedBy, v))
  428. }
  429. // UpdatedByIn applies the In predicate on the "updated_by" field.
  430. func UpdatedByIn(vs ...int64) predicate.Announcement {
  431. return predicate.Announcement(sql.FieldIn(FieldUpdatedBy, vs...))
  432. }
  433. // UpdatedByNotIn applies the NotIn predicate on the "updated_by" field.
  434. func UpdatedByNotIn(vs ...int64) predicate.Announcement {
  435. return predicate.Announcement(sql.FieldNotIn(FieldUpdatedBy, vs...))
  436. }
  437. // UpdatedByGT applies the GT predicate on the "updated_by" field.
  438. func UpdatedByGT(v int64) predicate.Announcement {
  439. return predicate.Announcement(sql.FieldGT(FieldUpdatedBy, v))
  440. }
  441. // UpdatedByGTE applies the GTE predicate on the "updated_by" field.
  442. func UpdatedByGTE(v int64) predicate.Announcement {
  443. return predicate.Announcement(sql.FieldGTE(FieldUpdatedBy, v))
  444. }
  445. // UpdatedByLT applies the LT predicate on the "updated_by" field.
  446. func UpdatedByLT(v int64) predicate.Announcement {
  447. return predicate.Announcement(sql.FieldLT(FieldUpdatedBy, v))
  448. }
  449. // UpdatedByLTE applies the LTE predicate on the "updated_by" field.
  450. func UpdatedByLTE(v int64) predicate.Announcement {
  451. return predicate.Announcement(sql.FieldLTE(FieldUpdatedBy, v))
  452. }
  453. // UpdatedByIsNil applies the IsNil predicate on the "updated_by" field.
  454. func UpdatedByIsNil() predicate.Announcement {
  455. return predicate.Announcement(sql.FieldIsNull(FieldUpdatedBy))
  456. }
  457. // UpdatedByNotNil applies the NotNil predicate on the "updated_by" field.
  458. func UpdatedByNotNil() predicate.Announcement {
  459. return predicate.Announcement(sql.FieldNotNull(FieldUpdatedBy))
  460. }
  461. // CreatedAtEQ applies the EQ predicate on the "created_at" field.
  462. func CreatedAtEQ(v time.Time) predicate.Announcement {
  463. return predicate.Announcement(sql.FieldEQ(FieldCreatedAt, v))
  464. }
  465. // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
  466. func CreatedAtNEQ(v time.Time) predicate.Announcement {
  467. return predicate.Announcement(sql.FieldNEQ(FieldCreatedAt, v))
  468. }
  469. // CreatedAtIn applies the In predicate on the "created_at" field.
  470. func CreatedAtIn(vs ...time.Time) predicate.Announcement {
  471. return predicate.Announcement(sql.FieldIn(FieldCreatedAt, vs...))
  472. }
  473. // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
  474. func CreatedAtNotIn(vs ...time.Time) predicate.Announcement {
  475. return predicate.Announcement(sql.FieldNotIn(FieldCreatedAt, vs...))
  476. }
  477. // CreatedAtGT applies the GT predicate on the "created_at" field.
  478. func CreatedAtGT(v time.Time) predicate.Announcement {
  479. return predicate.Announcement(sql.FieldGT(FieldCreatedAt, v))
  480. }
  481. // CreatedAtGTE applies the GTE predicate on the "created_at" field.
  482. func CreatedAtGTE(v time.Time) predicate.Announcement {
  483. return predicate.Announcement(sql.FieldGTE(FieldCreatedAt, v))
  484. }
  485. // CreatedAtLT applies the LT predicate on the "created_at" field.
  486. func CreatedAtLT(v time.Time) predicate.Announcement {
  487. return predicate.Announcement(sql.FieldLT(FieldCreatedAt, v))
  488. }
  489. // CreatedAtLTE applies the LTE predicate on the "created_at" field.
  490. func CreatedAtLTE(v time.Time) predicate.Announcement {
  491. return predicate.Announcement(sql.FieldLTE(FieldCreatedAt, v))
  492. }
  493. // UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
  494. func UpdatedAtEQ(v time.Time) predicate.Announcement {
  495. return predicate.Announcement(sql.FieldEQ(FieldUpdatedAt, v))
  496. }
  497. // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
  498. func UpdatedAtNEQ(v time.Time) predicate.Announcement {
  499. return predicate.Announcement(sql.FieldNEQ(FieldUpdatedAt, v))
  500. }
  501. // UpdatedAtIn applies the In predicate on the "updated_at" field.
  502. func UpdatedAtIn(vs ...time.Time) predicate.Announcement {
  503. return predicate.Announcement(sql.FieldIn(FieldUpdatedAt, vs...))
  504. }
  505. // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
  506. func UpdatedAtNotIn(vs ...time.Time) predicate.Announcement {
  507. return predicate.Announcement(sql.FieldNotIn(FieldUpdatedAt, vs...))
  508. }
  509. // UpdatedAtGT applies the GT predicate on the "updated_at" field.
  510. func UpdatedAtGT(v time.Time) predicate.Announcement {
  511. return predicate.Announcement(sql.FieldGT(FieldUpdatedAt, v))
  512. }
  513. // UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
  514. func UpdatedAtGTE(v time.Time) predicate.Announcement {
  515. return predicate.Announcement(sql.FieldGTE(FieldUpdatedAt, v))
  516. }
  517. // UpdatedAtLT applies the LT predicate on the "updated_at" field.
  518. func UpdatedAtLT(v time.Time) predicate.Announcement {
  519. return predicate.Announcement(sql.FieldLT(FieldUpdatedAt, v))
  520. }
  521. // UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
  522. func UpdatedAtLTE(v time.Time) predicate.Announcement {
  523. return predicate.Announcement(sql.FieldLTE(FieldUpdatedAt, v))
  524. }
  525. // HasReads applies the HasEdge predicate on the "reads" edge.
  526. func HasReads() predicate.Announcement {
  527. return predicate.Announcement(func(s *sql.Selector) {
  528. step := sqlgraph.NewStep(
  529. sqlgraph.From(Table, FieldID),
  530. sqlgraph.Edge(sqlgraph.O2M, false, ReadsTable, ReadsColumn),
  531. )
  532. sqlgraph.HasNeighbors(s, step)
  533. })
  534. }
  535. // HasReadsWith applies the HasEdge predicate on the "reads" edge with a given conditions (other predicates).
  536. func HasReadsWith(preds ...predicate.AnnouncementRead) predicate.Announcement {
  537. return predicate.Announcement(func(s *sql.Selector) {
  538. step := newReadsStep()
  539. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  540. for _, p := range preds {
  541. p(s)
  542. }
  543. })
  544. })
  545. }
  546. // And groups predicates with the AND operator between them.
  547. func And(predicates ...predicate.Announcement) predicate.Announcement {
  548. return predicate.Announcement(sql.AndPredicates(predicates...))
  549. }
  550. // Or groups predicates with the OR operator between them.
  551. func Or(predicates ...predicate.Announcement) predicate.Announcement {
  552. return predicate.Announcement(sql.OrPredicates(predicates...))
  553. }
  554. // Not applies the not operator on the given predicate.
  555. func Not(p predicate.Announcement) predicate.Announcement {
  556. return predicate.Announcement(sql.NotPredicates(p))
  557. }