where.go 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978
  1. // Code generated by ent, DO NOT EDIT.
  2. package usersubscription
  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.UserSubscription {
  11. return predicate.UserSubscription(sql.FieldEQ(FieldID, id))
  12. }
  13. // IDEQ applies the EQ predicate on the ID field.
  14. func IDEQ(id int64) predicate.UserSubscription {
  15. return predicate.UserSubscription(sql.FieldEQ(FieldID, id))
  16. }
  17. // IDNEQ applies the NEQ predicate on the ID field.
  18. func IDNEQ(id int64) predicate.UserSubscription {
  19. return predicate.UserSubscription(sql.FieldNEQ(FieldID, id))
  20. }
  21. // IDIn applies the In predicate on the ID field.
  22. func IDIn(ids ...int64) predicate.UserSubscription {
  23. return predicate.UserSubscription(sql.FieldIn(FieldID, ids...))
  24. }
  25. // IDNotIn applies the NotIn predicate on the ID field.
  26. func IDNotIn(ids ...int64) predicate.UserSubscription {
  27. return predicate.UserSubscription(sql.FieldNotIn(FieldID, ids...))
  28. }
  29. // IDGT applies the GT predicate on the ID field.
  30. func IDGT(id int64) predicate.UserSubscription {
  31. return predicate.UserSubscription(sql.FieldGT(FieldID, id))
  32. }
  33. // IDGTE applies the GTE predicate on the ID field.
  34. func IDGTE(id int64) predicate.UserSubscription {
  35. return predicate.UserSubscription(sql.FieldGTE(FieldID, id))
  36. }
  37. // IDLT applies the LT predicate on the ID field.
  38. func IDLT(id int64) predicate.UserSubscription {
  39. return predicate.UserSubscription(sql.FieldLT(FieldID, id))
  40. }
  41. // IDLTE applies the LTE predicate on the ID field.
  42. func IDLTE(id int64) predicate.UserSubscription {
  43. return predicate.UserSubscription(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.UserSubscription {
  47. return predicate.UserSubscription(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.UserSubscription {
  51. return predicate.UserSubscription(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.UserSubscription {
  55. return predicate.UserSubscription(sql.FieldEQ(FieldDeletedAt, v))
  56. }
  57. // UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
  58. func UserID(v int64) predicate.UserSubscription {
  59. return predicate.UserSubscription(sql.FieldEQ(FieldUserID, v))
  60. }
  61. // GroupID applies equality check predicate on the "group_id" field. It's identical to GroupIDEQ.
  62. func GroupID(v int64) predicate.UserSubscription {
  63. return predicate.UserSubscription(sql.FieldEQ(FieldGroupID, v))
  64. }
  65. // StartsAt applies equality check predicate on the "starts_at" field. It's identical to StartsAtEQ.
  66. func StartsAt(v time.Time) predicate.UserSubscription {
  67. return predicate.UserSubscription(sql.FieldEQ(FieldStartsAt, v))
  68. }
  69. // ExpiresAt applies equality check predicate on the "expires_at" field. It's identical to ExpiresAtEQ.
  70. func ExpiresAt(v time.Time) predicate.UserSubscription {
  71. return predicate.UserSubscription(sql.FieldEQ(FieldExpiresAt, v))
  72. }
  73. // Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
  74. func Status(v string) predicate.UserSubscription {
  75. return predicate.UserSubscription(sql.FieldEQ(FieldStatus, v))
  76. }
  77. // DailyWindowStart applies equality check predicate on the "daily_window_start" field. It's identical to DailyWindowStartEQ.
  78. func DailyWindowStart(v time.Time) predicate.UserSubscription {
  79. return predicate.UserSubscription(sql.FieldEQ(FieldDailyWindowStart, v))
  80. }
  81. // WeeklyWindowStart applies equality check predicate on the "weekly_window_start" field. It's identical to WeeklyWindowStartEQ.
  82. func WeeklyWindowStart(v time.Time) predicate.UserSubscription {
  83. return predicate.UserSubscription(sql.FieldEQ(FieldWeeklyWindowStart, v))
  84. }
  85. // MonthlyWindowStart applies equality check predicate on the "monthly_window_start" field. It's identical to MonthlyWindowStartEQ.
  86. func MonthlyWindowStart(v time.Time) predicate.UserSubscription {
  87. return predicate.UserSubscription(sql.FieldEQ(FieldMonthlyWindowStart, v))
  88. }
  89. // DailyUsageUsd applies equality check predicate on the "daily_usage_usd" field. It's identical to DailyUsageUsdEQ.
  90. func DailyUsageUsd(v float64) predicate.UserSubscription {
  91. return predicate.UserSubscription(sql.FieldEQ(FieldDailyUsageUsd, v))
  92. }
  93. // WeeklyUsageUsd applies equality check predicate on the "weekly_usage_usd" field. It's identical to WeeklyUsageUsdEQ.
  94. func WeeklyUsageUsd(v float64) predicate.UserSubscription {
  95. return predicate.UserSubscription(sql.FieldEQ(FieldWeeklyUsageUsd, v))
  96. }
  97. // MonthlyUsageUsd applies equality check predicate on the "monthly_usage_usd" field. It's identical to MonthlyUsageUsdEQ.
  98. func MonthlyUsageUsd(v float64) predicate.UserSubscription {
  99. return predicate.UserSubscription(sql.FieldEQ(FieldMonthlyUsageUsd, v))
  100. }
  101. // AssignedBy applies equality check predicate on the "assigned_by" field. It's identical to AssignedByEQ.
  102. func AssignedBy(v int64) predicate.UserSubscription {
  103. return predicate.UserSubscription(sql.FieldEQ(FieldAssignedBy, v))
  104. }
  105. // AssignedAt applies equality check predicate on the "assigned_at" field. It's identical to AssignedAtEQ.
  106. func AssignedAt(v time.Time) predicate.UserSubscription {
  107. return predicate.UserSubscription(sql.FieldEQ(FieldAssignedAt, v))
  108. }
  109. // Notes applies equality check predicate on the "notes" field. It's identical to NotesEQ.
  110. func Notes(v string) predicate.UserSubscription {
  111. return predicate.UserSubscription(sql.FieldEQ(FieldNotes, v))
  112. }
  113. // CreatedAtEQ applies the EQ predicate on the "created_at" field.
  114. func CreatedAtEQ(v time.Time) predicate.UserSubscription {
  115. return predicate.UserSubscription(sql.FieldEQ(FieldCreatedAt, v))
  116. }
  117. // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
  118. func CreatedAtNEQ(v time.Time) predicate.UserSubscription {
  119. return predicate.UserSubscription(sql.FieldNEQ(FieldCreatedAt, v))
  120. }
  121. // CreatedAtIn applies the In predicate on the "created_at" field.
  122. func CreatedAtIn(vs ...time.Time) predicate.UserSubscription {
  123. return predicate.UserSubscription(sql.FieldIn(FieldCreatedAt, vs...))
  124. }
  125. // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
  126. func CreatedAtNotIn(vs ...time.Time) predicate.UserSubscription {
  127. return predicate.UserSubscription(sql.FieldNotIn(FieldCreatedAt, vs...))
  128. }
  129. // CreatedAtGT applies the GT predicate on the "created_at" field.
  130. func CreatedAtGT(v time.Time) predicate.UserSubscription {
  131. return predicate.UserSubscription(sql.FieldGT(FieldCreatedAt, v))
  132. }
  133. // CreatedAtGTE applies the GTE predicate on the "created_at" field.
  134. func CreatedAtGTE(v time.Time) predicate.UserSubscription {
  135. return predicate.UserSubscription(sql.FieldGTE(FieldCreatedAt, v))
  136. }
  137. // CreatedAtLT applies the LT predicate on the "created_at" field.
  138. func CreatedAtLT(v time.Time) predicate.UserSubscription {
  139. return predicate.UserSubscription(sql.FieldLT(FieldCreatedAt, v))
  140. }
  141. // CreatedAtLTE applies the LTE predicate on the "created_at" field.
  142. func CreatedAtLTE(v time.Time) predicate.UserSubscription {
  143. return predicate.UserSubscription(sql.FieldLTE(FieldCreatedAt, v))
  144. }
  145. // UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
  146. func UpdatedAtEQ(v time.Time) predicate.UserSubscription {
  147. return predicate.UserSubscription(sql.FieldEQ(FieldUpdatedAt, v))
  148. }
  149. // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
  150. func UpdatedAtNEQ(v time.Time) predicate.UserSubscription {
  151. return predicate.UserSubscription(sql.FieldNEQ(FieldUpdatedAt, v))
  152. }
  153. // UpdatedAtIn applies the In predicate on the "updated_at" field.
  154. func UpdatedAtIn(vs ...time.Time) predicate.UserSubscription {
  155. return predicate.UserSubscription(sql.FieldIn(FieldUpdatedAt, vs...))
  156. }
  157. // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
  158. func UpdatedAtNotIn(vs ...time.Time) predicate.UserSubscription {
  159. return predicate.UserSubscription(sql.FieldNotIn(FieldUpdatedAt, vs...))
  160. }
  161. // UpdatedAtGT applies the GT predicate on the "updated_at" field.
  162. func UpdatedAtGT(v time.Time) predicate.UserSubscription {
  163. return predicate.UserSubscription(sql.FieldGT(FieldUpdatedAt, v))
  164. }
  165. // UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
  166. func UpdatedAtGTE(v time.Time) predicate.UserSubscription {
  167. return predicate.UserSubscription(sql.FieldGTE(FieldUpdatedAt, v))
  168. }
  169. // UpdatedAtLT applies the LT predicate on the "updated_at" field.
  170. func UpdatedAtLT(v time.Time) predicate.UserSubscription {
  171. return predicate.UserSubscription(sql.FieldLT(FieldUpdatedAt, v))
  172. }
  173. // UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
  174. func UpdatedAtLTE(v time.Time) predicate.UserSubscription {
  175. return predicate.UserSubscription(sql.FieldLTE(FieldUpdatedAt, v))
  176. }
  177. // DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
  178. func DeletedAtEQ(v time.Time) predicate.UserSubscription {
  179. return predicate.UserSubscription(sql.FieldEQ(FieldDeletedAt, v))
  180. }
  181. // DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
  182. func DeletedAtNEQ(v time.Time) predicate.UserSubscription {
  183. return predicate.UserSubscription(sql.FieldNEQ(FieldDeletedAt, v))
  184. }
  185. // DeletedAtIn applies the In predicate on the "deleted_at" field.
  186. func DeletedAtIn(vs ...time.Time) predicate.UserSubscription {
  187. return predicate.UserSubscription(sql.FieldIn(FieldDeletedAt, vs...))
  188. }
  189. // DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
  190. func DeletedAtNotIn(vs ...time.Time) predicate.UserSubscription {
  191. return predicate.UserSubscription(sql.FieldNotIn(FieldDeletedAt, vs...))
  192. }
  193. // DeletedAtGT applies the GT predicate on the "deleted_at" field.
  194. func DeletedAtGT(v time.Time) predicate.UserSubscription {
  195. return predicate.UserSubscription(sql.FieldGT(FieldDeletedAt, v))
  196. }
  197. // DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
  198. func DeletedAtGTE(v time.Time) predicate.UserSubscription {
  199. return predicate.UserSubscription(sql.FieldGTE(FieldDeletedAt, v))
  200. }
  201. // DeletedAtLT applies the LT predicate on the "deleted_at" field.
  202. func DeletedAtLT(v time.Time) predicate.UserSubscription {
  203. return predicate.UserSubscription(sql.FieldLT(FieldDeletedAt, v))
  204. }
  205. // DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
  206. func DeletedAtLTE(v time.Time) predicate.UserSubscription {
  207. return predicate.UserSubscription(sql.FieldLTE(FieldDeletedAt, v))
  208. }
  209. // DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
  210. func DeletedAtIsNil() predicate.UserSubscription {
  211. return predicate.UserSubscription(sql.FieldIsNull(FieldDeletedAt))
  212. }
  213. // DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
  214. func DeletedAtNotNil() predicate.UserSubscription {
  215. return predicate.UserSubscription(sql.FieldNotNull(FieldDeletedAt))
  216. }
  217. // UserIDEQ applies the EQ predicate on the "user_id" field.
  218. func UserIDEQ(v int64) predicate.UserSubscription {
  219. return predicate.UserSubscription(sql.FieldEQ(FieldUserID, v))
  220. }
  221. // UserIDNEQ applies the NEQ predicate on the "user_id" field.
  222. func UserIDNEQ(v int64) predicate.UserSubscription {
  223. return predicate.UserSubscription(sql.FieldNEQ(FieldUserID, v))
  224. }
  225. // UserIDIn applies the In predicate on the "user_id" field.
  226. func UserIDIn(vs ...int64) predicate.UserSubscription {
  227. return predicate.UserSubscription(sql.FieldIn(FieldUserID, vs...))
  228. }
  229. // UserIDNotIn applies the NotIn predicate on the "user_id" field.
  230. func UserIDNotIn(vs ...int64) predicate.UserSubscription {
  231. return predicate.UserSubscription(sql.FieldNotIn(FieldUserID, vs...))
  232. }
  233. // GroupIDEQ applies the EQ predicate on the "group_id" field.
  234. func GroupIDEQ(v int64) predicate.UserSubscription {
  235. return predicate.UserSubscription(sql.FieldEQ(FieldGroupID, v))
  236. }
  237. // GroupIDNEQ applies the NEQ predicate on the "group_id" field.
  238. func GroupIDNEQ(v int64) predicate.UserSubscription {
  239. return predicate.UserSubscription(sql.FieldNEQ(FieldGroupID, v))
  240. }
  241. // GroupIDIn applies the In predicate on the "group_id" field.
  242. func GroupIDIn(vs ...int64) predicate.UserSubscription {
  243. return predicate.UserSubscription(sql.FieldIn(FieldGroupID, vs...))
  244. }
  245. // GroupIDNotIn applies the NotIn predicate on the "group_id" field.
  246. func GroupIDNotIn(vs ...int64) predicate.UserSubscription {
  247. return predicate.UserSubscription(sql.FieldNotIn(FieldGroupID, vs...))
  248. }
  249. // StartsAtEQ applies the EQ predicate on the "starts_at" field.
  250. func StartsAtEQ(v time.Time) predicate.UserSubscription {
  251. return predicate.UserSubscription(sql.FieldEQ(FieldStartsAt, v))
  252. }
  253. // StartsAtNEQ applies the NEQ predicate on the "starts_at" field.
  254. func StartsAtNEQ(v time.Time) predicate.UserSubscription {
  255. return predicate.UserSubscription(sql.FieldNEQ(FieldStartsAt, v))
  256. }
  257. // StartsAtIn applies the In predicate on the "starts_at" field.
  258. func StartsAtIn(vs ...time.Time) predicate.UserSubscription {
  259. return predicate.UserSubscription(sql.FieldIn(FieldStartsAt, vs...))
  260. }
  261. // StartsAtNotIn applies the NotIn predicate on the "starts_at" field.
  262. func StartsAtNotIn(vs ...time.Time) predicate.UserSubscription {
  263. return predicate.UserSubscription(sql.FieldNotIn(FieldStartsAt, vs...))
  264. }
  265. // StartsAtGT applies the GT predicate on the "starts_at" field.
  266. func StartsAtGT(v time.Time) predicate.UserSubscription {
  267. return predicate.UserSubscription(sql.FieldGT(FieldStartsAt, v))
  268. }
  269. // StartsAtGTE applies the GTE predicate on the "starts_at" field.
  270. func StartsAtGTE(v time.Time) predicate.UserSubscription {
  271. return predicate.UserSubscription(sql.FieldGTE(FieldStartsAt, v))
  272. }
  273. // StartsAtLT applies the LT predicate on the "starts_at" field.
  274. func StartsAtLT(v time.Time) predicate.UserSubscription {
  275. return predicate.UserSubscription(sql.FieldLT(FieldStartsAt, v))
  276. }
  277. // StartsAtLTE applies the LTE predicate on the "starts_at" field.
  278. func StartsAtLTE(v time.Time) predicate.UserSubscription {
  279. return predicate.UserSubscription(sql.FieldLTE(FieldStartsAt, v))
  280. }
  281. // ExpiresAtEQ applies the EQ predicate on the "expires_at" field.
  282. func ExpiresAtEQ(v time.Time) predicate.UserSubscription {
  283. return predicate.UserSubscription(sql.FieldEQ(FieldExpiresAt, v))
  284. }
  285. // ExpiresAtNEQ applies the NEQ predicate on the "expires_at" field.
  286. func ExpiresAtNEQ(v time.Time) predicate.UserSubscription {
  287. return predicate.UserSubscription(sql.FieldNEQ(FieldExpiresAt, v))
  288. }
  289. // ExpiresAtIn applies the In predicate on the "expires_at" field.
  290. func ExpiresAtIn(vs ...time.Time) predicate.UserSubscription {
  291. return predicate.UserSubscription(sql.FieldIn(FieldExpiresAt, vs...))
  292. }
  293. // ExpiresAtNotIn applies the NotIn predicate on the "expires_at" field.
  294. func ExpiresAtNotIn(vs ...time.Time) predicate.UserSubscription {
  295. return predicate.UserSubscription(sql.FieldNotIn(FieldExpiresAt, vs...))
  296. }
  297. // ExpiresAtGT applies the GT predicate on the "expires_at" field.
  298. func ExpiresAtGT(v time.Time) predicate.UserSubscription {
  299. return predicate.UserSubscription(sql.FieldGT(FieldExpiresAt, v))
  300. }
  301. // ExpiresAtGTE applies the GTE predicate on the "expires_at" field.
  302. func ExpiresAtGTE(v time.Time) predicate.UserSubscription {
  303. return predicate.UserSubscription(sql.FieldGTE(FieldExpiresAt, v))
  304. }
  305. // ExpiresAtLT applies the LT predicate on the "expires_at" field.
  306. func ExpiresAtLT(v time.Time) predicate.UserSubscription {
  307. return predicate.UserSubscription(sql.FieldLT(FieldExpiresAt, v))
  308. }
  309. // ExpiresAtLTE applies the LTE predicate on the "expires_at" field.
  310. func ExpiresAtLTE(v time.Time) predicate.UserSubscription {
  311. return predicate.UserSubscription(sql.FieldLTE(FieldExpiresAt, v))
  312. }
  313. // StatusEQ applies the EQ predicate on the "status" field.
  314. func StatusEQ(v string) predicate.UserSubscription {
  315. return predicate.UserSubscription(sql.FieldEQ(FieldStatus, v))
  316. }
  317. // StatusNEQ applies the NEQ predicate on the "status" field.
  318. func StatusNEQ(v string) predicate.UserSubscription {
  319. return predicate.UserSubscription(sql.FieldNEQ(FieldStatus, v))
  320. }
  321. // StatusIn applies the In predicate on the "status" field.
  322. func StatusIn(vs ...string) predicate.UserSubscription {
  323. return predicate.UserSubscription(sql.FieldIn(FieldStatus, vs...))
  324. }
  325. // StatusNotIn applies the NotIn predicate on the "status" field.
  326. func StatusNotIn(vs ...string) predicate.UserSubscription {
  327. return predicate.UserSubscription(sql.FieldNotIn(FieldStatus, vs...))
  328. }
  329. // StatusGT applies the GT predicate on the "status" field.
  330. func StatusGT(v string) predicate.UserSubscription {
  331. return predicate.UserSubscription(sql.FieldGT(FieldStatus, v))
  332. }
  333. // StatusGTE applies the GTE predicate on the "status" field.
  334. func StatusGTE(v string) predicate.UserSubscription {
  335. return predicate.UserSubscription(sql.FieldGTE(FieldStatus, v))
  336. }
  337. // StatusLT applies the LT predicate on the "status" field.
  338. func StatusLT(v string) predicate.UserSubscription {
  339. return predicate.UserSubscription(sql.FieldLT(FieldStatus, v))
  340. }
  341. // StatusLTE applies the LTE predicate on the "status" field.
  342. func StatusLTE(v string) predicate.UserSubscription {
  343. return predicate.UserSubscription(sql.FieldLTE(FieldStatus, v))
  344. }
  345. // StatusContains applies the Contains predicate on the "status" field.
  346. func StatusContains(v string) predicate.UserSubscription {
  347. return predicate.UserSubscription(sql.FieldContains(FieldStatus, v))
  348. }
  349. // StatusHasPrefix applies the HasPrefix predicate on the "status" field.
  350. func StatusHasPrefix(v string) predicate.UserSubscription {
  351. return predicate.UserSubscription(sql.FieldHasPrefix(FieldStatus, v))
  352. }
  353. // StatusHasSuffix applies the HasSuffix predicate on the "status" field.
  354. func StatusHasSuffix(v string) predicate.UserSubscription {
  355. return predicate.UserSubscription(sql.FieldHasSuffix(FieldStatus, v))
  356. }
  357. // StatusEqualFold applies the EqualFold predicate on the "status" field.
  358. func StatusEqualFold(v string) predicate.UserSubscription {
  359. return predicate.UserSubscription(sql.FieldEqualFold(FieldStatus, v))
  360. }
  361. // StatusContainsFold applies the ContainsFold predicate on the "status" field.
  362. func StatusContainsFold(v string) predicate.UserSubscription {
  363. return predicate.UserSubscription(sql.FieldContainsFold(FieldStatus, v))
  364. }
  365. // DailyWindowStartEQ applies the EQ predicate on the "daily_window_start" field.
  366. func DailyWindowStartEQ(v time.Time) predicate.UserSubscription {
  367. return predicate.UserSubscription(sql.FieldEQ(FieldDailyWindowStart, v))
  368. }
  369. // DailyWindowStartNEQ applies the NEQ predicate on the "daily_window_start" field.
  370. func DailyWindowStartNEQ(v time.Time) predicate.UserSubscription {
  371. return predicate.UserSubscription(sql.FieldNEQ(FieldDailyWindowStart, v))
  372. }
  373. // DailyWindowStartIn applies the In predicate on the "daily_window_start" field.
  374. func DailyWindowStartIn(vs ...time.Time) predicate.UserSubscription {
  375. return predicate.UserSubscription(sql.FieldIn(FieldDailyWindowStart, vs...))
  376. }
  377. // DailyWindowStartNotIn applies the NotIn predicate on the "daily_window_start" field.
  378. func DailyWindowStartNotIn(vs ...time.Time) predicate.UserSubscription {
  379. return predicate.UserSubscription(sql.FieldNotIn(FieldDailyWindowStart, vs...))
  380. }
  381. // DailyWindowStartGT applies the GT predicate on the "daily_window_start" field.
  382. func DailyWindowStartGT(v time.Time) predicate.UserSubscription {
  383. return predicate.UserSubscription(sql.FieldGT(FieldDailyWindowStart, v))
  384. }
  385. // DailyWindowStartGTE applies the GTE predicate on the "daily_window_start" field.
  386. func DailyWindowStartGTE(v time.Time) predicate.UserSubscription {
  387. return predicate.UserSubscription(sql.FieldGTE(FieldDailyWindowStart, v))
  388. }
  389. // DailyWindowStartLT applies the LT predicate on the "daily_window_start" field.
  390. func DailyWindowStartLT(v time.Time) predicate.UserSubscription {
  391. return predicate.UserSubscription(sql.FieldLT(FieldDailyWindowStart, v))
  392. }
  393. // DailyWindowStartLTE applies the LTE predicate on the "daily_window_start" field.
  394. func DailyWindowStartLTE(v time.Time) predicate.UserSubscription {
  395. return predicate.UserSubscription(sql.FieldLTE(FieldDailyWindowStart, v))
  396. }
  397. // DailyWindowStartIsNil applies the IsNil predicate on the "daily_window_start" field.
  398. func DailyWindowStartIsNil() predicate.UserSubscription {
  399. return predicate.UserSubscription(sql.FieldIsNull(FieldDailyWindowStart))
  400. }
  401. // DailyWindowStartNotNil applies the NotNil predicate on the "daily_window_start" field.
  402. func DailyWindowStartNotNil() predicate.UserSubscription {
  403. return predicate.UserSubscription(sql.FieldNotNull(FieldDailyWindowStart))
  404. }
  405. // WeeklyWindowStartEQ applies the EQ predicate on the "weekly_window_start" field.
  406. func WeeklyWindowStartEQ(v time.Time) predicate.UserSubscription {
  407. return predicate.UserSubscription(sql.FieldEQ(FieldWeeklyWindowStart, v))
  408. }
  409. // WeeklyWindowStartNEQ applies the NEQ predicate on the "weekly_window_start" field.
  410. func WeeklyWindowStartNEQ(v time.Time) predicate.UserSubscription {
  411. return predicate.UserSubscription(sql.FieldNEQ(FieldWeeklyWindowStart, v))
  412. }
  413. // WeeklyWindowStartIn applies the In predicate on the "weekly_window_start" field.
  414. func WeeklyWindowStartIn(vs ...time.Time) predicate.UserSubscription {
  415. return predicate.UserSubscription(sql.FieldIn(FieldWeeklyWindowStart, vs...))
  416. }
  417. // WeeklyWindowStartNotIn applies the NotIn predicate on the "weekly_window_start" field.
  418. func WeeklyWindowStartNotIn(vs ...time.Time) predicate.UserSubscription {
  419. return predicate.UserSubscription(sql.FieldNotIn(FieldWeeklyWindowStart, vs...))
  420. }
  421. // WeeklyWindowStartGT applies the GT predicate on the "weekly_window_start" field.
  422. func WeeklyWindowStartGT(v time.Time) predicate.UserSubscription {
  423. return predicate.UserSubscription(sql.FieldGT(FieldWeeklyWindowStart, v))
  424. }
  425. // WeeklyWindowStartGTE applies the GTE predicate on the "weekly_window_start" field.
  426. func WeeklyWindowStartGTE(v time.Time) predicate.UserSubscription {
  427. return predicate.UserSubscription(sql.FieldGTE(FieldWeeklyWindowStart, v))
  428. }
  429. // WeeklyWindowStartLT applies the LT predicate on the "weekly_window_start" field.
  430. func WeeklyWindowStartLT(v time.Time) predicate.UserSubscription {
  431. return predicate.UserSubscription(sql.FieldLT(FieldWeeklyWindowStart, v))
  432. }
  433. // WeeklyWindowStartLTE applies the LTE predicate on the "weekly_window_start" field.
  434. func WeeklyWindowStartLTE(v time.Time) predicate.UserSubscription {
  435. return predicate.UserSubscription(sql.FieldLTE(FieldWeeklyWindowStart, v))
  436. }
  437. // WeeklyWindowStartIsNil applies the IsNil predicate on the "weekly_window_start" field.
  438. func WeeklyWindowStartIsNil() predicate.UserSubscription {
  439. return predicate.UserSubscription(sql.FieldIsNull(FieldWeeklyWindowStart))
  440. }
  441. // WeeklyWindowStartNotNil applies the NotNil predicate on the "weekly_window_start" field.
  442. func WeeklyWindowStartNotNil() predicate.UserSubscription {
  443. return predicate.UserSubscription(sql.FieldNotNull(FieldWeeklyWindowStart))
  444. }
  445. // MonthlyWindowStartEQ applies the EQ predicate on the "monthly_window_start" field.
  446. func MonthlyWindowStartEQ(v time.Time) predicate.UserSubscription {
  447. return predicate.UserSubscription(sql.FieldEQ(FieldMonthlyWindowStart, v))
  448. }
  449. // MonthlyWindowStartNEQ applies the NEQ predicate on the "monthly_window_start" field.
  450. func MonthlyWindowStartNEQ(v time.Time) predicate.UserSubscription {
  451. return predicate.UserSubscription(sql.FieldNEQ(FieldMonthlyWindowStart, v))
  452. }
  453. // MonthlyWindowStartIn applies the In predicate on the "monthly_window_start" field.
  454. func MonthlyWindowStartIn(vs ...time.Time) predicate.UserSubscription {
  455. return predicate.UserSubscription(sql.FieldIn(FieldMonthlyWindowStart, vs...))
  456. }
  457. // MonthlyWindowStartNotIn applies the NotIn predicate on the "monthly_window_start" field.
  458. func MonthlyWindowStartNotIn(vs ...time.Time) predicate.UserSubscription {
  459. return predicate.UserSubscription(sql.FieldNotIn(FieldMonthlyWindowStart, vs...))
  460. }
  461. // MonthlyWindowStartGT applies the GT predicate on the "monthly_window_start" field.
  462. func MonthlyWindowStartGT(v time.Time) predicate.UserSubscription {
  463. return predicate.UserSubscription(sql.FieldGT(FieldMonthlyWindowStart, v))
  464. }
  465. // MonthlyWindowStartGTE applies the GTE predicate on the "monthly_window_start" field.
  466. func MonthlyWindowStartGTE(v time.Time) predicate.UserSubscription {
  467. return predicate.UserSubscription(sql.FieldGTE(FieldMonthlyWindowStart, v))
  468. }
  469. // MonthlyWindowStartLT applies the LT predicate on the "monthly_window_start" field.
  470. func MonthlyWindowStartLT(v time.Time) predicate.UserSubscription {
  471. return predicate.UserSubscription(sql.FieldLT(FieldMonthlyWindowStart, v))
  472. }
  473. // MonthlyWindowStartLTE applies the LTE predicate on the "monthly_window_start" field.
  474. func MonthlyWindowStartLTE(v time.Time) predicate.UserSubscription {
  475. return predicate.UserSubscription(sql.FieldLTE(FieldMonthlyWindowStart, v))
  476. }
  477. // MonthlyWindowStartIsNil applies the IsNil predicate on the "monthly_window_start" field.
  478. func MonthlyWindowStartIsNil() predicate.UserSubscription {
  479. return predicate.UserSubscription(sql.FieldIsNull(FieldMonthlyWindowStart))
  480. }
  481. // MonthlyWindowStartNotNil applies the NotNil predicate on the "monthly_window_start" field.
  482. func MonthlyWindowStartNotNil() predicate.UserSubscription {
  483. return predicate.UserSubscription(sql.FieldNotNull(FieldMonthlyWindowStart))
  484. }
  485. // DailyUsageUsdEQ applies the EQ predicate on the "daily_usage_usd" field.
  486. func DailyUsageUsdEQ(v float64) predicate.UserSubscription {
  487. return predicate.UserSubscription(sql.FieldEQ(FieldDailyUsageUsd, v))
  488. }
  489. // DailyUsageUsdNEQ applies the NEQ predicate on the "daily_usage_usd" field.
  490. func DailyUsageUsdNEQ(v float64) predicate.UserSubscription {
  491. return predicate.UserSubscription(sql.FieldNEQ(FieldDailyUsageUsd, v))
  492. }
  493. // DailyUsageUsdIn applies the In predicate on the "daily_usage_usd" field.
  494. func DailyUsageUsdIn(vs ...float64) predicate.UserSubscription {
  495. return predicate.UserSubscription(sql.FieldIn(FieldDailyUsageUsd, vs...))
  496. }
  497. // DailyUsageUsdNotIn applies the NotIn predicate on the "daily_usage_usd" field.
  498. func DailyUsageUsdNotIn(vs ...float64) predicate.UserSubscription {
  499. return predicate.UserSubscription(sql.FieldNotIn(FieldDailyUsageUsd, vs...))
  500. }
  501. // DailyUsageUsdGT applies the GT predicate on the "daily_usage_usd" field.
  502. func DailyUsageUsdGT(v float64) predicate.UserSubscription {
  503. return predicate.UserSubscription(sql.FieldGT(FieldDailyUsageUsd, v))
  504. }
  505. // DailyUsageUsdGTE applies the GTE predicate on the "daily_usage_usd" field.
  506. func DailyUsageUsdGTE(v float64) predicate.UserSubscription {
  507. return predicate.UserSubscription(sql.FieldGTE(FieldDailyUsageUsd, v))
  508. }
  509. // DailyUsageUsdLT applies the LT predicate on the "daily_usage_usd" field.
  510. func DailyUsageUsdLT(v float64) predicate.UserSubscription {
  511. return predicate.UserSubscription(sql.FieldLT(FieldDailyUsageUsd, v))
  512. }
  513. // DailyUsageUsdLTE applies the LTE predicate on the "daily_usage_usd" field.
  514. func DailyUsageUsdLTE(v float64) predicate.UserSubscription {
  515. return predicate.UserSubscription(sql.FieldLTE(FieldDailyUsageUsd, v))
  516. }
  517. // WeeklyUsageUsdEQ applies the EQ predicate on the "weekly_usage_usd" field.
  518. func WeeklyUsageUsdEQ(v float64) predicate.UserSubscription {
  519. return predicate.UserSubscription(sql.FieldEQ(FieldWeeklyUsageUsd, v))
  520. }
  521. // WeeklyUsageUsdNEQ applies the NEQ predicate on the "weekly_usage_usd" field.
  522. func WeeklyUsageUsdNEQ(v float64) predicate.UserSubscription {
  523. return predicate.UserSubscription(sql.FieldNEQ(FieldWeeklyUsageUsd, v))
  524. }
  525. // WeeklyUsageUsdIn applies the In predicate on the "weekly_usage_usd" field.
  526. func WeeklyUsageUsdIn(vs ...float64) predicate.UserSubscription {
  527. return predicate.UserSubscription(sql.FieldIn(FieldWeeklyUsageUsd, vs...))
  528. }
  529. // WeeklyUsageUsdNotIn applies the NotIn predicate on the "weekly_usage_usd" field.
  530. func WeeklyUsageUsdNotIn(vs ...float64) predicate.UserSubscription {
  531. return predicate.UserSubscription(sql.FieldNotIn(FieldWeeklyUsageUsd, vs...))
  532. }
  533. // WeeklyUsageUsdGT applies the GT predicate on the "weekly_usage_usd" field.
  534. func WeeklyUsageUsdGT(v float64) predicate.UserSubscription {
  535. return predicate.UserSubscription(sql.FieldGT(FieldWeeklyUsageUsd, v))
  536. }
  537. // WeeklyUsageUsdGTE applies the GTE predicate on the "weekly_usage_usd" field.
  538. func WeeklyUsageUsdGTE(v float64) predicate.UserSubscription {
  539. return predicate.UserSubscription(sql.FieldGTE(FieldWeeklyUsageUsd, v))
  540. }
  541. // WeeklyUsageUsdLT applies the LT predicate on the "weekly_usage_usd" field.
  542. func WeeklyUsageUsdLT(v float64) predicate.UserSubscription {
  543. return predicate.UserSubscription(sql.FieldLT(FieldWeeklyUsageUsd, v))
  544. }
  545. // WeeklyUsageUsdLTE applies the LTE predicate on the "weekly_usage_usd" field.
  546. func WeeklyUsageUsdLTE(v float64) predicate.UserSubscription {
  547. return predicate.UserSubscription(sql.FieldLTE(FieldWeeklyUsageUsd, v))
  548. }
  549. // MonthlyUsageUsdEQ applies the EQ predicate on the "monthly_usage_usd" field.
  550. func MonthlyUsageUsdEQ(v float64) predicate.UserSubscription {
  551. return predicate.UserSubscription(sql.FieldEQ(FieldMonthlyUsageUsd, v))
  552. }
  553. // MonthlyUsageUsdNEQ applies the NEQ predicate on the "monthly_usage_usd" field.
  554. func MonthlyUsageUsdNEQ(v float64) predicate.UserSubscription {
  555. return predicate.UserSubscription(sql.FieldNEQ(FieldMonthlyUsageUsd, v))
  556. }
  557. // MonthlyUsageUsdIn applies the In predicate on the "monthly_usage_usd" field.
  558. func MonthlyUsageUsdIn(vs ...float64) predicate.UserSubscription {
  559. return predicate.UserSubscription(sql.FieldIn(FieldMonthlyUsageUsd, vs...))
  560. }
  561. // MonthlyUsageUsdNotIn applies the NotIn predicate on the "monthly_usage_usd" field.
  562. func MonthlyUsageUsdNotIn(vs ...float64) predicate.UserSubscription {
  563. return predicate.UserSubscription(sql.FieldNotIn(FieldMonthlyUsageUsd, vs...))
  564. }
  565. // MonthlyUsageUsdGT applies the GT predicate on the "monthly_usage_usd" field.
  566. func MonthlyUsageUsdGT(v float64) predicate.UserSubscription {
  567. return predicate.UserSubscription(sql.FieldGT(FieldMonthlyUsageUsd, v))
  568. }
  569. // MonthlyUsageUsdGTE applies the GTE predicate on the "monthly_usage_usd" field.
  570. func MonthlyUsageUsdGTE(v float64) predicate.UserSubscription {
  571. return predicate.UserSubscription(sql.FieldGTE(FieldMonthlyUsageUsd, v))
  572. }
  573. // MonthlyUsageUsdLT applies the LT predicate on the "monthly_usage_usd" field.
  574. func MonthlyUsageUsdLT(v float64) predicate.UserSubscription {
  575. return predicate.UserSubscription(sql.FieldLT(FieldMonthlyUsageUsd, v))
  576. }
  577. // MonthlyUsageUsdLTE applies the LTE predicate on the "monthly_usage_usd" field.
  578. func MonthlyUsageUsdLTE(v float64) predicate.UserSubscription {
  579. return predicate.UserSubscription(sql.FieldLTE(FieldMonthlyUsageUsd, v))
  580. }
  581. // AssignedByEQ applies the EQ predicate on the "assigned_by" field.
  582. func AssignedByEQ(v int64) predicate.UserSubscription {
  583. return predicate.UserSubscription(sql.FieldEQ(FieldAssignedBy, v))
  584. }
  585. // AssignedByNEQ applies the NEQ predicate on the "assigned_by" field.
  586. func AssignedByNEQ(v int64) predicate.UserSubscription {
  587. return predicate.UserSubscription(sql.FieldNEQ(FieldAssignedBy, v))
  588. }
  589. // AssignedByIn applies the In predicate on the "assigned_by" field.
  590. func AssignedByIn(vs ...int64) predicate.UserSubscription {
  591. return predicate.UserSubscription(sql.FieldIn(FieldAssignedBy, vs...))
  592. }
  593. // AssignedByNotIn applies the NotIn predicate on the "assigned_by" field.
  594. func AssignedByNotIn(vs ...int64) predicate.UserSubscription {
  595. return predicate.UserSubscription(sql.FieldNotIn(FieldAssignedBy, vs...))
  596. }
  597. // AssignedByIsNil applies the IsNil predicate on the "assigned_by" field.
  598. func AssignedByIsNil() predicate.UserSubscription {
  599. return predicate.UserSubscription(sql.FieldIsNull(FieldAssignedBy))
  600. }
  601. // AssignedByNotNil applies the NotNil predicate on the "assigned_by" field.
  602. func AssignedByNotNil() predicate.UserSubscription {
  603. return predicate.UserSubscription(sql.FieldNotNull(FieldAssignedBy))
  604. }
  605. // AssignedAtEQ applies the EQ predicate on the "assigned_at" field.
  606. func AssignedAtEQ(v time.Time) predicate.UserSubscription {
  607. return predicate.UserSubscription(sql.FieldEQ(FieldAssignedAt, v))
  608. }
  609. // AssignedAtNEQ applies the NEQ predicate on the "assigned_at" field.
  610. func AssignedAtNEQ(v time.Time) predicate.UserSubscription {
  611. return predicate.UserSubscription(sql.FieldNEQ(FieldAssignedAt, v))
  612. }
  613. // AssignedAtIn applies the In predicate on the "assigned_at" field.
  614. func AssignedAtIn(vs ...time.Time) predicate.UserSubscription {
  615. return predicate.UserSubscription(sql.FieldIn(FieldAssignedAt, vs...))
  616. }
  617. // AssignedAtNotIn applies the NotIn predicate on the "assigned_at" field.
  618. func AssignedAtNotIn(vs ...time.Time) predicate.UserSubscription {
  619. return predicate.UserSubscription(sql.FieldNotIn(FieldAssignedAt, vs...))
  620. }
  621. // AssignedAtGT applies the GT predicate on the "assigned_at" field.
  622. func AssignedAtGT(v time.Time) predicate.UserSubscription {
  623. return predicate.UserSubscription(sql.FieldGT(FieldAssignedAt, v))
  624. }
  625. // AssignedAtGTE applies the GTE predicate on the "assigned_at" field.
  626. func AssignedAtGTE(v time.Time) predicate.UserSubscription {
  627. return predicate.UserSubscription(sql.FieldGTE(FieldAssignedAt, v))
  628. }
  629. // AssignedAtLT applies the LT predicate on the "assigned_at" field.
  630. func AssignedAtLT(v time.Time) predicate.UserSubscription {
  631. return predicate.UserSubscription(sql.FieldLT(FieldAssignedAt, v))
  632. }
  633. // AssignedAtLTE applies the LTE predicate on the "assigned_at" field.
  634. func AssignedAtLTE(v time.Time) predicate.UserSubscription {
  635. return predicate.UserSubscription(sql.FieldLTE(FieldAssignedAt, v))
  636. }
  637. // NotesEQ applies the EQ predicate on the "notes" field.
  638. func NotesEQ(v string) predicate.UserSubscription {
  639. return predicate.UserSubscription(sql.FieldEQ(FieldNotes, v))
  640. }
  641. // NotesNEQ applies the NEQ predicate on the "notes" field.
  642. func NotesNEQ(v string) predicate.UserSubscription {
  643. return predicate.UserSubscription(sql.FieldNEQ(FieldNotes, v))
  644. }
  645. // NotesIn applies the In predicate on the "notes" field.
  646. func NotesIn(vs ...string) predicate.UserSubscription {
  647. return predicate.UserSubscription(sql.FieldIn(FieldNotes, vs...))
  648. }
  649. // NotesNotIn applies the NotIn predicate on the "notes" field.
  650. func NotesNotIn(vs ...string) predicate.UserSubscription {
  651. return predicate.UserSubscription(sql.FieldNotIn(FieldNotes, vs...))
  652. }
  653. // NotesGT applies the GT predicate on the "notes" field.
  654. func NotesGT(v string) predicate.UserSubscription {
  655. return predicate.UserSubscription(sql.FieldGT(FieldNotes, v))
  656. }
  657. // NotesGTE applies the GTE predicate on the "notes" field.
  658. func NotesGTE(v string) predicate.UserSubscription {
  659. return predicate.UserSubscription(sql.FieldGTE(FieldNotes, v))
  660. }
  661. // NotesLT applies the LT predicate on the "notes" field.
  662. func NotesLT(v string) predicate.UserSubscription {
  663. return predicate.UserSubscription(sql.FieldLT(FieldNotes, v))
  664. }
  665. // NotesLTE applies the LTE predicate on the "notes" field.
  666. func NotesLTE(v string) predicate.UserSubscription {
  667. return predicate.UserSubscription(sql.FieldLTE(FieldNotes, v))
  668. }
  669. // NotesContains applies the Contains predicate on the "notes" field.
  670. func NotesContains(v string) predicate.UserSubscription {
  671. return predicate.UserSubscription(sql.FieldContains(FieldNotes, v))
  672. }
  673. // NotesHasPrefix applies the HasPrefix predicate on the "notes" field.
  674. func NotesHasPrefix(v string) predicate.UserSubscription {
  675. return predicate.UserSubscription(sql.FieldHasPrefix(FieldNotes, v))
  676. }
  677. // NotesHasSuffix applies the HasSuffix predicate on the "notes" field.
  678. func NotesHasSuffix(v string) predicate.UserSubscription {
  679. return predicate.UserSubscription(sql.FieldHasSuffix(FieldNotes, v))
  680. }
  681. // NotesIsNil applies the IsNil predicate on the "notes" field.
  682. func NotesIsNil() predicate.UserSubscription {
  683. return predicate.UserSubscription(sql.FieldIsNull(FieldNotes))
  684. }
  685. // NotesNotNil applies the NotNil predicate on the "notes" field.
  686. func NotesNotNil() predicate.UserSubscription {
  687. return predicate.UserSubscription(sql.FieldNotNull(FieldNotes))
  688. }
  689. // NotesEqualFold applies the EqualFold predicate on the "notes" field.
  690. func NotesEqualFold(v string) predicate.UserSubscription {
  691. return predicate.UserSubscription(sql.FieldEqualFold(FieldNotes, v))
  692. }
  693. // NotesContainsFold applies the ContainsFold predicate on the "notes" field.
  694. func NotesContainsFold(v string) predicate.UserSubscription {
  695. return predicate.UserSubscription(sql.FieldContainsFold(FieldNotes, v))
  696. }
  697. // HasUser applies the HasEdge predicate on the "user" edge.
  698. func HasUser() predicate.UserSubscription {
  699. return predicate.UserSubscription(func(s *sql.Selector) {
  700. step := sqlgraph.NewStep(
  701. sqlgraph.From(Table, FieldID),
  702. sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
  703. )
  704. sqlgraph.HasNeighbors(s, step)
  705. })
  706. }
  707. // HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
  708. func HasUserWith(preds ...predicate.User) predicate.UserSubscription {
  709. return predicate.UserSubscription(func(s *sql.Selector) {
  710. step := newUserStep()
  711. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  712. for _, p := range preds {
  713. p(s)
  714. }
  715. })
  716. })
  717. }
  718. // HasGroup applies the HasEdge predicate on the "group" edge.
  719. func HasGroup() predicate.UserSubscription {
  720. return predicate.UserSubscription(func(s *sql.Selector) {
  721. step := sqlgraph.NewStep(
  722. sqlgraph.From(Table, FieldID),
  723. sqlgraph.Edge(sqlgraph.M2O, true, GroupTable, GroupColumn),
  724. )
  725. sqlgraph.HasNeighbors(s, step)
  726. })
  727. }
  728. // HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).
  729. func HasGroupWith(preds ...predicate.Group) predicate.UserSubscription {
  730. return predicate.UserSubscription(func(s *sql.Selector) {
  731. step := newGroupStep()
  732. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  733. for _, p := range preds {
  734. p(s)
  735. }
  736. })
  737. })
  738. }
  739. // HasAssignedByUser applies the HasEdge predicate on the "assigned_by_user" edge.
  740. func HasAssignedByUser() predicate.UserSubscription {
  741. return predicate.UserSubscription(func(s *sql.Selector) {
  742. step := sqlgraph.NewStep(
  743. sqlgraph.From(Table, FieldID),
  744. sqlgraph.Edge(sqlgraph.M2O, true, AssignedByUserTable, AssignedByUserColumn),
  745. )
  746. sqlgraph.HasNeighbors(s, step)
  747. })
  748. }
  749. // HasAssignedByUserWith applies the HasEdge predicate on the "assigned_by_user" edge with a given conditions (other predicates).
  750. func HasAssignedByUserWith(preds ...predicate.User) predicate.UserSubscription {
  751. return predicate.UserSubscription(func(s *sql.Selector) {
  752. step := newAssignedByUserStep()
  753. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  754. for _, p := range preds {
  755. p(s)
  756. }
  757. })
  758. })
  759. }
  760. // HasUsageLogs applies the HasEdge predicate on the "usage_logs" edge.
  761. func HasUsageLogs() predicate.UserSubscription {
  762. return predicate.UserSubscription(func(s *sql.Selector) {
  763. step := sqlgraph.NewStep(
  764. sqlgraph.From(Table, FieldID),
  765. sqlgraph.Edge(sqlgraph.O2M, false, UsageLogsTable, UsageLogsColumn),
  766. )
  767. sqlgraph.HasNeighbors(s, step)
  768. })
  769. }
  770. // HasUsageLogsWith applies the HasEdge predicate on the "usage_logs" edge with a given conditions (other predicates).
  771. func HasUsageLogsWith(preds ...predicate.UsageLog) predicate.UserSubscription {
  772. return predicate.UserSubscription(func(s *sql.Selector) {
  773. step := newUsageLogsStep()
  774. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  775. for _, p := range preds {
  776. p(s)
  777. }
  778. })
  779. })
  780. }
  781. // And groups predicates with the AND operator between them.
  782. func And(predicates ...predicate.UserSubscription) predicate.UserSubscription {
  783. return predicate.UserSubscription(sql.AndPredicates(predicates...))
  784. }
  785. // Or groups predicates with the OR operator between them.
  786. func Or(predicates ...predicate.UserSubscription) predicate.UserSubscription {
  787. return predicate.UserSubscription(sql.OrPredicates(predicates...))
  788. }
  789. // Not applies the not operator on the given predicate.
  790. func Not(p predicate.UserSubscription) predicate.UserSubscription {
  791. return predicate.UserSubscription(sql.NotPredicates(p))
  792. }