where.go 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380
  1. // Code generated by ent, DO NOT EDIT.
  2. package apikey
  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.APIKey {
  11. return predicate.APIKey(sql.FieldEQ(FieldID, id))
  12. }
  13. // IDEQ applies the EQ predicate on the ID field.
  14. func IDEQ(id int64) predicate.APIKey {
  15. return predicate.APIKey(sql.FieldEQ(FieldID, id))
  16. }
  17. // IDNEQ applies the NEQ predicate on the ID field.
  18. func IDNEQ(id int64) predicate.APIKey {
  19. return predicate.APIKey(sql.FieldNEQ(FieldID, id))
  20. }
  21. // IDIn applies the In predicate on the ID field.
  22. func IDIn(ids ...int64) predicate.APIKey {
  23. return predicate.APIKey(sql.FieldIn(FieldID, ids...))
  24. }
  25. // IDNotIn applies the NotIn predicate on the ID field.
  26. func IDNotIn(ids ...int64) predicate.APIKey {
  27. return predicate.APIKey(sql.FieldNotIn(FieldID, ids...))
  28. }
  29. // IDGT applies the GT predicate on the ID field.
  30. func IDGT(id int64) predicate.APIKey {
  31. return predicate.APIKey(sql.FieldGT(FieldID, id))
  32. }
  33. // IDGTE applies the GTE predicate on the ID field.
  34. func IDGTE(id int64) predicate.APIKey {
  35. return predicate.APIKey(sql.FieldGTE(FieldID, id))
  36. }
  37. // IDLT applies the LT predicate on the ID field.
  38. func IDLT(id int64) predicate.APIKey {
  39. return predicate.APIKey(sql.FieldLT(FieldID, id))
  40. }
  41. // IDLTE applies the LTE predicate on the ID field.
  42. func IDLTE(id int64) predicate.APIKey {
  43. return predicate.APIKey(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.APIKey {
  47. return predicate.APIKey(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.APIKey {
  51. return predicate.APIKey(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.APIKey {
  55. return predicate.APIKey(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.APIKey {
  59. return predicate.APIKey(sql.FieldEQ(FieldUserID, v))
  60. }
  61. // Key applies equality check predicate on the "key" field. It's identical to KeyEQ.
  62. func Key(v string) predicate.APIKey {
  63. return predicate.APIKey(sql.FieldEQ(FieldKey, v))
  64. }
  65. // KeyHash applies equality check predicate on the "key_hash" field. It's identical to KeyHashEQ.
  66. func KeyHash(v string) predicate.APIKey {
  67. return predicate.APIKey(sql.FieldEQ(FieldKeyHash, v))
  68. }
  69. // KeyPrefix applies equality check predicate on the "key_prefix" field. It's identical to KeyPrefixEQ.
  70. func KeyPrefix(v string) predicate.APIKey {
  71. return predicate.APIKey(sql.FieldEQ(FieldKeyPrefix, v))
  72. }
  73. // Name applies equality check predicate on the "name" field. It's identical to NameEQ.
  74. func Name(v string) predicate.APIKey {
  75. return predicate.APIKey(sql.FieldEQ(FieldName, v))
  76. }
  77. // GroupID applies equality check predicate on the "group_id" field. It's identical to GroupIDEQ.
  78. func GroupID(v int64) predicate.APIKey {
  79. return predicate.APIKey(sql.FieldEQ(FieldGroupID, v))
  80. }
  81. // Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
  82. func Status(v string) predicate.APIKey {
  83. return predicate.APIKey(sql.FieldEQ(FieldStatus, v))
  84. }
  85. // LastUsedAt applies equality check predicate on the "last_used_at" field. It's identical to LastUsedAtEQ.
  86. func LastUsedAt(v time.Time) predicate.APIKey {
  87. return predicate.APIKey(sql.FieldEQ(FieldLastUsedAt, v))
  88. }
  89. // Quota applies equality check predicate on the "quota" field. It's identical to QuotaEQ.
  90. func Quota(v float64) predicate.APIKey {
  91. return predicate.APIKey(sql.FieldEQ(FieldQuota, v))
  92. }
  93. // QuotaUsed applies equality check predicate on the "quota_used" field. It's identical to QuotaUsedEQ.
  94. func QuotaUsed(v float64) predicate.APIKey {
  95. return predicate.APIKey(sql.FieldEQ(FieldQuotaUsed, v))
  96. }
  97. // ExpiresAt applies equality check predicate on the "expires_at" field. It's identical to ExpiresAtEQ.
  98. func ExpiresAt(v time.Time) predicate.APIKey {
  99. return predicate.APIKey(sql.FieldEQ(FieldExpiresAt, v))
  100. }
  101. // RateLimit5h applies equality check predicate on the "rate_limit_5h" field. It's identical to RateLimit5hEQ.
  102. func RateLimit5h(v float64) predicate.APIKey {
  103. return predicate.APIKey(sql.FieldEQ(FieldRateLimit5h, v))
  104. }
  105. // RateLimit1d applies equality check predicate on the "rate_limit_1d" field. It's identical to RateLimit1dEQ.
  106. func RateLimit1d(v float64) predicate.APIKey {
  107. return predicate.APIKey(sql.FieldEQ(FieldRateLimit1d, v))
  108. }
  109. // RateLimit7d applies equality check predicate on the "rate_limit_7d" field. It's identical to RateLimit7dEQ.
  110. func RateLimit7d(v float64) predicate.APIKey {
  111. return predicate.APIKey(sql.FieldEQ(FieldRateLimit7d, v))
  112. }
  113. // Usage5h applies equality check predicate on the "usage_5h" field. It's identical to Usage5hEQ.
  114. func Usage5h(v float64) predicate.APIKey {
  115. return predicate.APIKey(sql.FieldEQ(FieldUsage5h, v))
  116. }
  117. // Usage1d applies equality check predicate on the "usage_1d" field. It's identical to Usage1dEQ.
  118. func Usage1d(v float64) predicate.APIKey {
  119. return predicate.APIKey(sql.FieldEQ(FieldUsage1d, v))
  120. }
  121. // Usage7d applies equality check predicate on the "usage_7d" field. It's identical to Usage7dEQ.
  122. func Usage7d(v float64) predicate.APIKey {
  123. return predicate.APIKey(sql.FieldEQ(FieldUsage7d, v))
  124. }
  125. // Window5hStart applies equality check predicate on the "window_5h_start" field. It's identical to Window5hStartEQ.
  126. func Window5hStart(v time.Time) predicate.APIKey {
  127. return predicate.APIKey(sql.FieldEQ(FieldWindow5hStart, v))
  128. }
  129. // Window1dStart applies equality check predicate on the "window_1d_start" field. It's identical to Window1dStartEQ.
  130. func Window1dStart(v time.Time) predicate.APIKey {
  131. return predicate.APIKey(sql.FieldEQ(FieldWindow1dStart, v))
  132. }
  133. // Window7dStart applies equality check predicate on the "window_7d_start" field. It's identical to Window7dStartEQ.
  134. func Window7dStart(v time.Time) predicate.APIKey {
  135. return predicate.APIKey(sql.FieldEQ(FieldWindow7dStart, v))
  136. }
  137. // CreatedAtEQ applies the EQ predicate on the "created_at" field.
  138. func CreatedAtEQ(v time.Time) predicate.APIKey {
  139. return predicate.APIKey(sql.FieldEQ(FieldCreatedAt, v))
  140. }
  141. // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
  142. func CreatedAtNEQ(v time.Time) predicate.APIKey {
  143. return predicate.APIKey(sql.FieldNEQ(FieldCreatedAt, v))
  144. }
  145. // CreatedAtIn applies the In predicate on the "created_at" field.
  146. func CreatedAtIn(vs ...time.Time) predicate.APIKey {
  147. return predicate.APIKey(sql.FieldIn(FieldCreatedAt, vs...))
  148. }
  149. // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
  150. func CreatedAtNotIn(vs ...time.Time) predicate.APIKey {
  151. return predicate.APIKey(sql.FieldNotIn(FieldCreatedAt, vs...))
  152. }
  153. // CreatedAtGT applies the GT predicate on the "created_at" field.
  154. func CreatedAtGT(v time.Time) predicate.APIKey {
  155. return predicate.APIKey(sql.FieldGT(FieldCreatedAt, v))
  156. }
  157. // CreatedAtGTE applies the GTE predicate on the "created_at" field.
  158. func CreatedAtGTE(v time.Time) predicate.APIKey {
  159. return predicate.APIKey(sql.FieldGTE(FieldCreatedAt, v))
  160. }
  161. // CreatedAtLT applies the LT predicate on the "created_at" field.
  162. func CreatedAtLT(v time.Time) predicate.APIKey {
  163. return predicate.APIKey(sql.FieldLT(FieldCreatedAt, v))
  164. }
  165. // CreatedAtLTE applies the LTE predicate on the "created_at" field.
  166. func CreatedAtLTE(v time.Time) predicate.APIKey {
  167. return predicate.APIKey(sql.FieldLTE(FieldCreatedAt, v))
  168. }
  169. // UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
  170. func UpdatedAtEQ(v time.Time) predicate.APIKey {
  171. return predicate.APIKey(sql.FieldEQ(FieldUpdatedAt, v))
  172. }
  173. // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
  174. func UpdatedAtNEQ(v time.Time) predicate.APIKey {
  175. return predicate.APIKey(sql.FieldNEQ(FieldUpdatedAt, v))
  176. }
  177. // UpdatedAtIn applies the In predicate on the "updated_at" field.
  178. func UpdatedAtIn(vs ...time.Time) predicate.APIKey {
  179. return predicate.APIKey(sql.FieldIn(FieldUpdatedAt, vs...))
  180. }
  181. // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
  182. func UpdatedAtNotIn(vs ...time.Time) predicate.APIKey {
  183. return predicate.APIKey(sql.FieldNotIn(FieldUpdatedAt, vs...))
  184. }
  185. // UpdatedAtGT applies the GT predicate on the "updated_at" field.
  186. func UpdatedAtGT(v time.Time) predicate.APIKey {
  187. return predicate.APIKey(sql.FieldGT(FieldUpdatedAt, v))
  188. }
  189. // UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
  190. func UpdatedAtGTE(v time.Time) predicate.APIKey {
  191. return predicate.APIKey(sql.FieldGTE(FieldUpdatedAt, v))
  192. }
  193. // UpdatedAtLT applies the LT predicate on the "updated_at" field.
  194. func UpdatedAtLT(v time.Time) predicate.APIKey {
  195. return predicate.APIKey(sql.FieldLT(FieldUpdatedAt, v))
  196. }
  197. // UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
  198. func UpdatedAtLTE(v time.Time) predicate.APIKey {
  199. return predicate.APIKey(sql.FieldLTE(FieldUpdatedAt, v))
  200. }
  201. // DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
  202. func DeletedAtEQ(v time.Time) predicate.APIKey {
  203. return predicate.APIKey(sql.FieldEQ(FieldDeletedAt, v))
  204. }
  205. // DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
  206. func DeletedAtNEQ(v time.Time) predicate.APIKey {
  207. return predicate.APIKey(sql.FieldNEQ(FieldDeletedAt, v))
  208. }
  209. // DeletedAtIn applies the In predicate on the "deleted_at" field.
  210. func DeletedAtIn(vs ...time.Time) predicate.APIKey {
  211. return predicate.APIKey(sql.FieldIn(FieldDeletedAt, vs...))
  212. }
  213. // DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
  214. func DeletedAtNotIn(vs ...time.Time) predicate.APIKey {
  215. return predicate.APIKey(sql.FieldNotIn(FieldDeletedAt, vs...))
  216. }
  217. // DeletedAtGT applies the GT predicate on the "deleted_at" field.
  218. func DeletedAtGT(v time.Time) predicate.APIKey {
  219. return predicate.APIKey(sql.FieldGT(FieldDeletedAt, v))
  220. }
  221. // DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
  222. func DeletedAtGTE(v time.Time) predicate.APIKey {
  223. return predicate.APIKey(sql.FieldGTE(FieldDeletedAt, v))
  224. }
  225. // DeletedAtLT applies the LT predicate on the "deleted_at" field.
  226. func DeletedAtLT(v time.Time) predicate.APIKey {
  227. return predicate.APIKey(sql.FieldLT(FieldDeletedAt, v))
  228. }
  229. // DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
  230. func DeletedAtLTE(v time.Time) predicate.APIKey {
  231. return predicate.APIKey(sql.FieldLTE(FieldDeletedAt, v))
  232. }
  233. // DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
  234. func DeletedAtIsNil() predicate.APIKey {
  235. return predicate.APIKey(sql.FieldIsNull(FieldDeletedAt))
  236. }
  237. // DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
  238. func DeletedAtNotNil() predicate.APIKey {
  239. return predicate.APIKey(sql.FieldNotNull(FieldDeletedAt))
  240. }
  241. // UserIDEQ applies the EQ predicate on the "user_id" field.
  242. func UserIDEQ(v int64) predicate.APIKey {
  243. return predicate.APIKey(sql.FieldEQ(FieldUserID, v))
  244. }
  245. // UserIDNEQ applies the NEQ predicate on the "user_id" field.
  246. func UserIDNEQ(v int64) predicate.APIKey {
  247. return predicate.APIKey(sql.FieldNEQ(FieldUserID, v))
  248. }
  249. // UserIDIn applies the In predicate on the "user_id" field.
  250. func UserIDIn(vs ...int64) predicate.APIKey {
  251. return predicate.APIKey(sql.FieldIn(FieldUserID, vs...))
  252. }
  253. // UserIDNotIn applies the NotIn predicate on the "user_id" field.
  254. func UserIDNotIn(vs ...int64) predicate.APIKey {
  255. return predicate.APIKey(sql.FieldNotIn(FieldUserID, vs...))
  256. }
  257. // KeyEQ applies the EQ predicate on the "key" field.
  258. func KeyEQ(v string) predicate.APIKey {
  259. return predicate.APIKey(sql.FieldEQ(FieldKey, v))
  260. }
  261. // KeyNEQ applies the NEQ predicate on the "key" field.
  262. func KeyNEQ(v string) predicate.APIKey {
  263. return predicate.APIKey(sql.FieldNEQ(FieldKey, v))
  264. }
  265. // KeyIn applies the In predicate on the "key" field.
  266. func KeyIn(vs ...string) predicate.APIKey {
  267. return predicate.APIKey(sql.FieldIn(FieldKey, vs...))
  268. }
  269. // KeyNotIn applies the NotIn predicate on the "key" field.
  270. func KeyNotIn(vs ...string) predicate.APIKey {
  271. return predicate.APIKey(sql.FieldNotIn(FieldKey, vs...))
  272. }
  273. // KeyGT applies the GT predicate on the "key" field.
  274. func KeyGT(v string) predicate.APIKey {
  275. return predicate.APIKey(sql.FieldGT(FieldKey, v))
  276. }
  277. // KeyGTE applies the GTE predicate on the "key" field.
  278. func KeyGTE(v string) predicate.APIKey {
  279. return predicate.APIKey(sql.FieldGTE(FieldKey, v))
  280. }
  281. // KeyLT applies the LT predicate on the "key" field.
  282. func KeyLT(v string) predicate.APIKey {
  283. return predicate.APIKey(sql.FieldLT(FieldKey, v))
  284. }
  285. // KeyLTE applies the LTE predicate on the "key" field.
  286. func KeyLTE(v string) predicate.APIKey {
  287. return predicate.APIKey(sql.FieldLTE(FieldKey, v))
  288. }
  289. // KeyContains applies the Contains predicate on the "key" field.
  290. func KeyContains(v string) predicate.APIKey {
  291. return predicate.APIKey(sql.FieldContains(FieldKey, v))
  292. }
  293. // KeyHasPrefix applies the HasPrefix predicate on the "key" field.
  294. func KeyHasPrefix(v string) predicate.APIKey {
  295. return predicate.APIKey(sql.FieldHasPrefix(FieldKey, v))
  296. }
  297. // KeyHasSuffix applies the HasSuffix predicate on the "key" field.
  298. func KeyHasSuffix(v string) predicate.APIKey {
  299. return predicate.APIKey(sql.FieldHasSuffix(FieldKey, v))
  300. }
  301. // KeyIsNil applies the IsNil predicate on the "key" field.
  302. func KeyIsNil() predicate.APIKey {
  303. return predicate.APIKey(sql.FieldIsNull(FieldKey))
  304. }
  305. // KeyNotNil applies the NotNil predicate on the "key" field.
  306. func KeyNotNil() predicate.APIKey {
  307. return predicate.APIKey(sql.FieldNotNull(FieldKey))
  308. }
  309. // KeyEqualFold applies the EqualFold predicate on the "key" field.
  310. func KeyEqualFold(v string) predicate.APIKey {
  311. return predicate.APIKey(sql.FieldEqualFold(FieldKey, v))
  312. }
  313. // KeyContainsFold applies the ContainsFold predicate on the "key" field.
  314. func KeyContainsFold(v string) predicate.APIKey {
  315. return predicate.APIKey(sql.FieldContainsFold(FieldKey, v))
  316. }
  317. // KeyHashEQ applies the EQ predicate on the "key_hash" field.
  318. func KeyHashEQ(v string) predicate.APIKey {
  319. return predicate.APIKey(sql.FieldEQ(FieldKeyHash, v))
  320. }
  321. // KeyHashNEQ applies the NEQ predicate on the "key_hash" field.
  322. func KeyHashNEQ(v string) predicate.APIKey {
  323. return predicate.APIKey(sql.FieldNEQ(FieldKeyHash, v))
  324. }
  325. // KeyHashIn applies the In predicate on the "key_hash" field.
  326. func KeyHashIn(vs ...string) predicate.APIKey {
  327. return predicate.APIKey(sql.FieldIn(FieldKeyHash, vs...))
  328. }
  329. // KeyHashNotIn applies the NotIn predicate on the "key_hash" field.
  330. func KeyHashNotIn(vs ...string) predicate.APIKey {
  331. return predicate.APIKey(sql.FieldNotIn(FieldKeyHash, vs...))
  332. }
  333. // KeyHashGT applies the GT predicate on the "key_hash" field.
  334. func KeyHashGT(v string) predicate.APIKey {
  335. return predicate.APIKey(sql.FieldGT(FieldKeyHash, v))
  336. }
  337. // KeyHashGTE applies the GTE predicate on the "key_hash" field.
  338. func KeyHashGTE(v string) predicate.APIKey {
  339. return predicate.APIKey(sql.FieldGTE(FieldKeyHash, v))
  340. }
  341. // KeyHashLT applies the LT predicate on the "key_hash" field.
  342. func KeyHashLT(v string) predicate.APIKey {
  343. return predicate.APIKey(sql.FieldLT(FieldKeyHash, v))
  344. }
  345. // KeyHashLTE applies the LTE predicate on the "key_hash" field.
  346. func KeyHashLTE(v string) predicate.APIKey {
  347. return predicate.APIKey(sql.FieldLTE(FieldKeyHash, v))
  348. }
  349. // KeyHashContains applies the Contains predicate on the "key_hash" field.
  350. func KeyHashContains(v string) predicate.APIKey {
  351. return predicate.APIKey(sql.FieldContains(FieldKeyHash, v))
  352. }
  353. // KeyHashHasPrefix applies the HasPrefix predicate on the "key_hash" field.
  354. func KeyHashHasPrefix(v string) predicate.APIKey {
  355. return predicate.APIKey(sql.FieldHasPrefix(FieldKeyHash, v))
  356. }
  357. // KeyHashHasSuffix applies the HasSuffix predicate on the "key_hash" field.
  358. func KeyHashHasSuffix(v string) predicate.APIKey {
  359. return predicate.APIKey(sql.FieldHasSuffix(FieldKeyHash, v))
  360. }
  361. // KeyHashIsNil applies the IsNil predicate on the "key_hash" field.
  362. func KeyHashIsNil() predicate.APIKey {
  363. return predicate.APIKey(sql.FieldIsNull(FieldKeyHash))
  364. }
  365. // KeyHashNotNil applies the NotNil predicate on the "key_hash" field.
  366. func KeyHashNotNil() predicate.APIKey {
  367. return predicate.APIKey(sql.FieldNotNull(FieldKeyHash))
  368. }
  369. // KeyHashEqualFold applies the EqualFold predicate on the "key_hash" field.
  370. func KeyHashEqualFold(v string) predicate.APIKey {
  371. return predicate.APIKey(sql.FieldEqualFold(FieldKeyHash, v))
  372. }
  373. // KeyHashContainsFold applies the ContainsFold predicate on the "key_hash" field.
  374. func KeyHashContainsFold(v string) predicate.APIKey {
  375. return predicate.APIKey(sql.FieldContainsFold(FieldKeyHash, v))
  376. }
  377. // KeyPrefixEQ applies the EQ predicate on the "key_prefix" field.
  378. func KeyPrefixEQ(v string) predicate.APIKey {
  379. return predicate.APIKey(sql.FieldEQ(FieldKeyPrefix, v))
  380. }
  381. // KeyPrefixNEQ applies the NEQ predicate on the "key_prefix" field.
  382. func KeyPrefixNEQ(v string) predicate.APIKey {
  383. return predicate.APIKey(sql.FieldNEQ(FieldKeyPrefix, v))
  384. }
  385. // KeyPrefixIn applies the In predicate on the "key_prefix" field.
  386. func KeyPrefixIn(vs ...string) predicate.APIKey {
  387. return predicate.APIKey(sql.FieldIn(FieldKeyPrefix, vs...))
  388. }
  389. // KeyPrefixNotIn applies the NotIn predicate on the "key_prefix" field.
  390. func KeyPrefixNotIn(vs ...string) predicate.APIKey {
  391. return predicate.APIKey(sql.FieldNotIn(FieldKeyPrefix, vs...))
  392. }
  393. // KeyPrefixGT applies the GT predicate on the "key_prefix" field.
  394. func KeyPrefixGT(v string) predicate.APIKey {
  395. return predicate.APIKey(sql.FieldGT(FieldKeyPrefix, v))
  396. }
  397. // KeyPrefixGTE applies the GTE predicate on the "key_prefix" field.
  398. func KeyPrefixGTE(v string) predicate.APIKey {
  399. return predicate.APIKey(sql.FieldGTE(FieldKeyPrefix, v))
  400. }
  401. // KeyPrefixLT applies the LT predicate on the "key_prefix" field.
  402. func KeyPrefixLT(v string) predicate.APIKey {
  403. return predicate.APIKey(sql.FieldLT(FieldKeyPrefix, v))
  404. }
  405. // KeyPrefixLTE applies the LTE predicate on the "key_prefix" field.
  406. func KeyPrefixLTE(v string) predicate.APIKey {
  407. return predicate.APIKey(sql.FieldLTE(FieldKeyPrefix, v))
  408. }
  409. // KeyPrefixContains applies the Contains predicate on the "key_prefix" field.
  410. func KeyPrefixContains(v string) predicate.APIKey {
  411. return predicate.APIKey(sql.FieldContains(FieldKeyPrefix, v))
  412. }
  413. // KeyPrefixHasPrefix applies the HasPrefix predicate on the "key_prefix" field.
  414. func KeyPrefixHasPrefix(v string) predicate.APIKey {
  415. return predicate.APIKey(sql.FieldHasPrefix(FieldKeyPrefix, v))
  416. }
  417. // KeyPrefixHasSuffix applies the HasSuffix predicate on the "key_prefix" field.
  418. func KeyPrefixHasSuffix(v string) predicate.APIKey {
  419. return predicate.APIKey(sql.FieldHasSuffix(FieldKeyPrefix, v))
  420. }
  421. // KeyPrefixIsNil applies the IsNil predicate on the "key_prefix" field.
  422. func KeyPrefixIsNil() predicate.APIKey {
  423. return predicate.APIKey(sql.FieldIsNull(FieldKeyPrefix))
  424. }
  425. // KeyPrefixNotNil applies the NotNil predicate on the "key_prefix" field.
  426. func KeyPrefixNotNil() predicate.APIKey {
  427. return predicate.APIKey(sql.FieldNotNull(FieldKeyPrefix))
  428. }
  429. // KeyPrefixEqualFold applies the EqualFold predicate on the "key_prefix" field.
  430. func KeyPrefixEqualFold(v string) predicate.APIKey {
  431. return predicate.APIKey(sql.FieldEqualFold(FieldKeyPrefix, v))
  432. }
  433. // KeyPrefixContainsFold applies the ContainsFold predicate on the "key_prefix" field.
  434. func KeyPrefixContainsFold(v string) predicate.APIKey {
  435. return predicate.APIKey(sql.FieldContainsFold(FieldKeyPrefix, v))
  436. }
  437. // NameEQ applies the EQ predicate on the "name" field.
  438. func NameEQ(v string) predicate.APIKey {
  439. return predicate.APIKey(sql.FieldEQ(FieldName, v))
  440. }
  441. // NameNEQ applies the NEQ predicate on the "name" field.
  442. func NameNEQ(v string) predicate.APIKey {
  443. return predicate.APIKey(sql.FieldNEQ(FieldName, v))
  444. }
  445. // NameIn applies the In predicate on the "name" field.
  446. func NameIn(vs ...string) predicate.APIKey {
  447. return predicate.APIKey(sql.FieldIn(FieldName, vs...))
  448. }
  449. // NameNotIn applies the NotIn predicate on the "name" field.
  450. func NameNotIn(vs ...string) predicate.APIKey {
  451. return predicate.APIKey(sql.FieldNotIn(FieldName, vs...))
  452. }
  453. // NameGT applies the GT predicate on the "name" field.
  454. func NameGT(v string) predicate.APIKey {
  455. return predicate.APIKey(sql.FieldGT(FieldName, v))
  456. }
  457. // NameGTE applies the GTE predicate on the "name" field.
  458. func NameGTE(v string) predicate.APIKey {
  459. return predicate.APIKey(sql.FieldGTE(FieldName, v))
  460. }
  461. // NameLT applies the LT predicate on the "name" field.
  462. func NameLT(v string) predicate.APIKey {
  463. return predicate.APIKey(sql.FieldLT(FieldName, v))
  464. }
  465. // NameLTE applies the LTE predicate on the "name" field.
  466. func NameLTE(v string) predicate.APIKey {
  467. return predicate.APIKey(sql.FieldLTE(FieldName, v))
  468. }
  469. // NameContains applies the Contains predicate on the "name" field.
  470. func NameContains(v string) predicate.APIKey {
  471. return predicate.APIKey(sql.FieldContains(FieldName, v))
  472. }
  473. // NameHasPrefix applies the HasPrefix predicate on the "name" field.
  474. func NameHasPrefix(v string) predicate.APIKey {
  475. return predicate.APIKey(sql.FieldHasPrefix(FieldName, v))
  476. }
  477. // NameHasSuffix applies the HasSuffix predicate on the "name" field.
  478. func NameHasSuffix(v string) predicate.APIKey {
  479. return predicate.APIKey(sql.FieldHasSuffix(FieldName, v))
  480. }
  481. // NameEqualFold applies the EqualFold predicate on the "name" field.
  482. func NameEqualFold(v string) predicate.APIKey {
  483. return predicate.APIKey(sql.FieldEqualFold(FieldName, v))
  484. }
  485. // NameContainsFold applies the ContainsFold predicate on the "name" field.
  486. func NameContainsFold(v string) predicate.APIKey {
  487. return predicate.APIKey(sql.FieldContainsFold(FieldName, v))
  488. }
  489. // GroupIDEQ applies the EQ predicate on the "group_id" field.
  490. func GroupIDEQ(v int64) predicate.APIKey {
  491. return predicate.APIKey(sql.FieldEQ(FieldGroupID, v))
  492. }
  493. // GroupIDNEQ applies the NEQ predicate on the "group_id" field.
  494. func GroupIDNEQ(v int64) predicate.APIKey {
  495. return predicate.APIKey(sql.FieldNEQ(FieldGroupID, v))
  496. }
  497. // GroupIDIn applies the In predicate on the "group_id" field.
  498. func GroupIDIn(vs ...int64) predicate.APIKey {
  499. return predicate.APIKey(sql.FieldIn(FieldGroupID, vs...))
  500. }
  501. // GroupIDNotIn applies the NotIn predicate on the "group_id" field.
  502. func GroupIDNotIn(vs ...int64) predicate.APIKey {
  503. return predicate.APIKey(sql.FieldNotIn(FieldGroupID, vs...))
  504. }
  505. // GroupIDIsNil applies the IsNil predicate on the "group_id" field.
  506. func GroupIDIsNil() predicate.APIKey {
  507. return predicate.APIKey(sql.FieldIsNull(FieldGroupID))
  508. }
  509. // GroupIDNotNil applies the NotNil predicate on the "group_id" field.
  510. func GroupIDNotNil() predicate.APIKey {
  511. return predicate.APIKey(sql.FieldNotNull(FieldGroupID))
  512. }
  513. // StatusEQ applies the EQ predicate on the "status" field.
  514. func StatusEQ(v string) predicate.APIKey {
  515. return predicate.APIKey(sql.FieldEQ(FieldStatus, v))
  516. }
  517. // StatusNEQ applies the NEQ predicate on the "status" field.
  518. func StatusNEQ(v string) predicate.APIKey {
  519. return predicate.APIKey(sql.FieldNEQ(FieldStatus, v))
  520. }
  521. // StatusIn applies the In predicate on the "status" field.
  522. func StatusIn(vs ...string) predicate.APIKey {
  523. return predicate.APIKey(sql.FieldIn(FieldStatus, vs...))
  524. }
  525. // StatusNotIn applies the NotIn predicate on the "status" field.
  526. func StatusNotIn(vs ...string) predicate.APIKey {
  527. return predicate.APIKey(sql.FieldNotIn(FieldStatus, vs...))
  528. }
  529. // StatusGT applies the GT predicate on the "status" field.
  530. func StatusGT(v string) predicate.APIKey {
  531. return predicate.APIKey(sql.FieldGT(FieldStatus, v))
  532. }
  533. // StatusGTE applies the GTE predicate on the "status" field.
  534. func StatusGTE(v string) predicate.APIKey {
  535. return predicate.APIKey(sql.FieldGTE(FieldStatus, v))
  536. }
  537. // StatusLT applies the LT predicate on the "status" field.
  538. func StatusLT(v string) predicate.APIKey {
  539. return predicate.APIKey(sql.FieldLT(FieldStatus, v))
  540. }
  541. // StatusLTE applies the LTE predicate on the "status" field.
  542. func StatusLTE(v string) predicate.APIKey {
  543. return predicate.APIKey(sql.FieldLTE(FieldStatus, v))
  544. }
  545. // StatusContains applies the Contains predicate on the "status" field.
  546. func StatusContains(v string) predicate.APIKey {
  547. return predicate.APIKey(sql.FieldContains(FieldStatus, v))
  548. }
  549. // StatusHasPrefix applies the HasPrefix predicate on the "status" field.
  550. func StatusHasPrefix(v string) predicate.APIKey {
  551. return predicate.APIKey(sql.FieldHasPrefix(FieldStatus, v))
  552. }
  553. // StatusHasSuffix applies the HasSuffix predicate on the "status" field.
  554. func StatusHasSuffix(v string) predicate.APIKey {
  555. return predicate.APIKey(sql.FieldHasSuffix(FieldStatus, v))
  556. }
  557. // StatusEqualFold applies the EqualFold predicate on the "status" field.
  558. func StatusEqualFold(v string) predicate.APIKey {
  559. return predicate.APIKey(sql.FieldEqualFold(FieldStatus, v))
  560. }
  561. // StatusContainsFold applies the ContainsFold predicate on the "status" field.
  562. func StatusContainsFold(v string) predicate.APIKey {
  563. return predicate.APIKey(sql.FieldContainsFold(FieldStatus, v))
  564. }
  565. // LastUsedAtEQ applies the EQ predicate on the "last_used_at" field.
  566. func LastUsedAtEQ(v time.Time) predicate.APIKey {
  567. return predicate.APIKey(sql.FieldEQ(FieldLastUsedAt, v))
  568. }
  569. // LastUsedAtNEQ applies the NEQ predicate on the "last_used_at" field.
  570. func LastUsedAtNEQ(v time.Time) predicate.APIKey {
  571. return predicate.APIKey(sql.FieldNEQ(FieldLastUsedAt, v))
  572. }
  573. // LastUsedAtIn applies the In predicate on the "last_used_at" field.
  574. func LastUsedAtIn(vs ...time.Time) predicate.APIKey {
  575. return predicate.APIKey(sql.FieldIn(FieldLastUsedAt, vs...))
  576. }
  577. // LastUsedAtNotIn applies the NotIn predicate on the "last_used_at" field.
  578. func LastUsedAtNotIn(vs ...time.Time) predicate.APIKey {
  579. return predicate.APIKey(sql.FieldNotIn(FieldLastUsedAt, vs...))
  580. }
  581. // LastUsedAtGT applies the GT predicate on the "last_used_at" field.
  582. func LastUsedAtGT(v time.Time) predicate.APIKey {
  583. return predicate.APIKey(sql.FieldGT(FieldLastUsedAt, v))
  584. }
  585. // LastUsedAtGTE applies the GTE predicate on the "last_used_at" field.
  586. func LastUsedAtGTE(v time.Time) predicate.APIKey {
  587. return predicate.APIKey(sql.FieldGTE(FieldLastUsedAt, v))
  588. }
  589. // LastUsedAtLT applies the LT predicate on the "last_used_at" field.
  590. func LastUsedAtLT(v time.Time) predicate.APIKey {
  591. return predicate.APIKey(sql.FieldLT(FieldLastUsedAt, v))
  592. }
  593. // LastUsedAtLTE applies the LTE predicate on the "last_used_at" field.
  594. func LastUsedAtLTE(v time.Time) predicate.APIKey {
  595. return predicate.APIKey(sql.FieldLTE(FieldLastUsedAt, v))
  596. }
  597. // LastUsedAtIsNil applies the IsNil predicate on the "last_used_at" field.
  598. func LastUsedAtIsNil() predicate.APIKey {
  599. return predicate.APIKey(sql.FieldIsNull(FieldLastUsedAt))
  600. }
  601. // LastUsedAtNotNil applies the NotNil predicate on the "last_used_at" field.
  602. func LastUsedAtNotNil() predicate.APIKey {
  603. return predicate.APIKey(sql.FieldNotNull(FieldLastUsedAt))
  604. }
  605. // IPWhitelistIsNil applies the IsNil predicate on the "ip_whitelist" field.
  606. func IPWhitelistIsNil() predicate.APIKey {
  607. return predicate.APIKey(sql.FieldIsNull(FieldIPWhitelist))
  608. }
  609. // IPWhitelistNotNil applies the NotNil predicate on the "ip_whitelist" field.
  610. func IPWhitelistNotNil() predicate.APIKey {
  611. return predicate.APIKey(sql.FieldNotNull(FieldIPWhitelist))
  612. }
  613. // IPBlacklistIsNil applies the IsNil predicate on the "ip_blacklist" field.
  614. func IPBlacklistIsNil() predicate.APIKey {
  615. return predicate.APIKey(sql.FieldIsNull(FieldIPBlacklist))
  616. }
  617. // IPBlacklistNotNil applies the NotNil predicate on the "ip_blacklist" field.
  618. func IPBlacklistNotNil() predicate.APIKey {
  619. return predicate.APIKey(sql.FieldNotNull(FieldIPBlacklist))
  620. }
  621. // QuotaEQ applies the EQ predicate on the "quota" field.
  622. func QuotaEQ(v float64) predicate.APIKey {
  623. return predicate.APIKey(sql.FieldEQ(FieldQuota, v))
  624. }
  625. // QuotaNEQ applies the NEQ predicate on the "quota" field.
  626. func QuotaNEQ(v float64) predicate.APIKey {
  627. return predicate.APIKey(sql.FieldNEQ(FieldQuota, v))
  628. }
  629. // QuotaIn applies the In predicate on the "quota" field.
  630. func QuotaIn(vs ...float64) predicate.APIKey {
  631. return predicate.APIKey(sql.FieldIn(FieldQuota, vs...))
  632. }
  633. // QuotaNotIn applies the NotIn predicate on the "quota" field.
  634. func QuotaNotIn(vs ...float64) predicate.APIKey {
  635. return predicate.APIKey(sql.FieldNotIn(FieldQuota, vs...))
  636. }
  637. // QuotaGT applies the GT predicate on the "quota" field.
  638. func QuotaGT(v float64) predicate.APIKey {
  639. return predicate.APIKey(sql.FieldGT(FieldQuota, v))
  640. }
  641. // QuotaGTE applies the GTE predicate on the "quota" field.
  642. func QuotaGTE(v float64) predicate.APIKey {
  643. return predicate.APIKey(sql.FieldGTE(FieldQuota, v))
  644. }
  645. // QuotaLT applies the LT predicate on the "quota" field.
  646. func QuotaLT(v float64) predicate.APIKey {
  647. return predicate.APIKey(sql.FieldLT(FieldQuota, v))
  648. }
  649. // QuotaLTE applies the LTE predicate on the "quota" field.
  650. func QuotaLTE(v float64) predicate.APIKey {
  651. return predicate.APIKey(sql.FieldLTE(FieldQuota, v))
  652. }
  653. // QuotaUsedEQ applies the EQ predicate on the "quota_used" field.
  654. func QuotaUsedEQ(v float64) predicate.APIKey {
  655. return predicate.APIKey(sql.FieldEQ(FieldQuotaUsed, v))
  656. }
  657. // QuotaUsedNEQ applies the NEQ predicate on the "quota_used" field.
  658. func QuotaUsedNEQ(v float64) predicate.APIKey {
  659. return predicate.APIKey(sql.FieldNEQ(FieldQuotaUsed, v))
  660. }
  661. // QuotaUsedIn applies the In predicate on the "quota_used" field.
  662. func QuotaUsedIn(vs ...float64) predicate.APIKey {
  663. return predicate.APIKey(sql.FieldIn(FieldQuotaUsed, vs...))
  664. }
  665. // QuotaUsedNotIn applies the NotIn predicate on the "quota_used" field.
  666. func QuotaUsedNotIn(vs ...float64) predicate.APIKey {
  667. return predicate.APIKey(sql.FieldNotIn(FieldQuotaUsed, vs...))
  668. }
  669. // QuotaUsedGT applies the GT predicate on the "quota_used" field.
  670. func QuotaUsedGT(v float64) predicate.APIKey {
  671. return predicate.APIKey(sql.FieldGT(FieldQuotaUsed, v))
  672. }
  673. // QuotaUsedGTE applies the GTE predicate on the "quota_used" field.
  674. func QuotaUsedGTE(v float64) predicate.APIKey {
  675. return predicate.APIKey(sql.FieldGTE(FieldQuotaUsed, v))
  676. }
  677. // QuotaUsedLT applies the LT predicate on the "quota_used" field.
  678. func QuotaUsedLT(v float64) predicate.APIKey {
  679. return predicate.APIKey(sql.FieldLT(FieldQuotaUsed, v))
  680. }
  681. // QuotaUsedLTE applies the LTE predicate on the "quota_used" field.
  682. func QuotaUsedLTE(v float64) predicate.APIKey {
  683. return predicate.APIKey(sql.FieldLTE(FieldQuotaUsed, v))
  684. }
  685. // ExpiresAtEQ applies the EQ predicate on the "expires_at" field.
  686. func ExpiresAtEQ(v time.Time) predicate.APIKey {
  687. return predicate.APIKey(sql.FieldEQ(FieldExpiresAt, v))
  688. }
  689. // ExpiresAtNEQ applies the NEQ predicate on the "expires_at" field.
  690. func ExpiresAtNEQ(v time.Time) predicate.APIKey {
  691. return predicate.APIKey(sql.FieldNEQ(FieldExpiresAt, v))
  692. }
  693. // ExpiresAtIn applies the In predicate on the "expires_at" field.
  694. func ExpiresAtIn(vs ...time.Time) predicate.APIKey {
  695. return predicate.APIKey(sql.FieldIn(FieldExpiresAt, vs...))
  696. }
  697. // ExpiresAtNotIn applies the NotIn predicate on the "expires_at" field.
  698. func ExpiresAtNotIn(vs ...time.Time) predicate.APIKey {
  699. return predicate.APIKey(sql.FieldNotIn(FieldExpiresAt, vs...))
  700. }
  701. // ExpiresAtGT applies the GT predicate on the "expires_at" field.
  702. func ExpiresAtGT(v time.Time) predicate.APIKey {
  703. return predicate.APIKey(sql.FieldGT(FieldExpiresAt, v))
  704. }
  705. // ExpiresAtGTE applies the GTE predicate on the "expires_at" field.
  706. func ExpiresAtGTE(v time.Time) predicate.APIKey {
  707. return predicate.APIKey(sql.FieldGTE(FieldExpiresAt, v))
  708. }
  709. // ExpiresAtLT applies the LT predicate on the "expires_at" field.
  710. func ExpiresAtLT(v time.Time) predicate.APIKey {
  711. return predicate.APIKey(sql.FieldLT(FieldExpiresAt, v))
  712. }
  713. // ExpiresAtLTE applies the LTE predicate on the "expires_at" field.
  714. func ExpiresAtLTE(v time.Time) predicate.APIKey {
  715. return predicate.APIKey(sql.FieldLTE(FieldExpiresAt, v))
  716. }
  717. // ExpiresAtIsNil applies the IsNil predicate on the "expires_at" field.
  718. func ExpiresAtIsNil() predicate.APIKey {
  719. return predicate.APIKey(sql.FieldIsNull(FieldExpiresAt))
  720. }
  721. // ExpiresAtNotNil applies the NotNil predicate on the "expires_at" field.
  722. func ExpiresAtNotNil() predicate.APIKey {
  723. return predicate.APIKey(sql.FieldNotNull(FieldExpiresAt))
  724. }
  725. // RateLimit5hEQ applies the EQ predicate on the "rate_limit_5h" field.
  726. func RateLimit5hEQ(v float64) predicate.APIKey {
  727. return predicate.APIKey(sql.FieldEQ(FieldRateLimit5h, v))
  728. }
  729. // RateLimit5hNEQ applies the NEQ predicate on the "rate_limit_5h" field.
  730. func RateLimit5hNEQ(v float64) predicate.APIKey {
  731. return predicate.APIKey(sql.FieldNEQ(FieldRateLimit5h, v))
  732. }
  733. // RateLimit5hIn applies the In predicate on the "rate_limit_5h" field.
  734. func RateLimit5hIn(vs ...float64) predicate.APIKey {
  735. return predicate.APIKey(sql.FieldIn(FieldRateLimit5h, vs...))
  736. }
  737. // RateLimit5hNotIn applies the NotIn predicate on the "rate_limit_5h" field.
  738. func RateLimit5hNotIn(vs ...float64) predicate.APIKey {
  739. return predicate.APIKey(sql.FieldNotIn(FieldRateLimit5h, vs...))
  740. }
  741. // RateLimit5hGT applies the GT predicate on the "rate_limit_5h" field.
  742. func RateLimit5hGT(v float64) predicate.APIKey {
  743. return predicate.APIKey(sql.FieldGT(FieldRateLimit5h, v))
  744. }
  745. // RateLimit5hGTE applies the GTE predicate on the "rate_limit_5h" field.
  746. func RateLimit5hGTE(v float64) predicate.APIKey {
  747. return predicate.APIKey(sql.FieldGTE(FieldRateLimit5h, v))
  748. }
  749. // RateLimit5hLT applies the LT predicate on the "rate_limit_5h" field.
  750. func RateLimit5hLT(v float64) predicate.APIKey {
  751. return predicate.APIKey(sql.FieldLT(FieldRateLimit5h, v))
  752. }
  753. // RateLimit5hLTE applies the LTE predicate on the "rate_limit_5h" field.
  754. func RateLimit5hLTE(v float64) predicate.APIKey {
  755. return predicate.APIKey(sql.FieldLTE(FieldRateLimit5h, v))
  756. }
  757. // RateLimit1dEQ applies the EQ predicate on the "rate_limit_1d" field.
  758. func RateLimit1dEQ(v float64) predicate.APIKey {
  759. return predicate.APIKey(sql.FieldEQ(FieldRateLimit1d, v))
  760. }
  761. // RateLimit1dNEQ applies the NEQ predicate on the "rate_limit_1d" field.
  762. func RateLimit1dNEQ(v float64) predicate.APIKey {
  763. return predicate.APIKey(sql.FieldNEQ(FieldRateLimit1d, v))
  764. }
  765. // RateLimit1dIn applies the In predicate on the "rate_limit_1d" field.
  766. func RateLimit1dIn(vs ...float64) predicate.APIKey {
  767. return predicate.APIKey(sql.FieldIn(FieldRateLimit1d, vs...))
  768. }
  769. // RateLimit1dNotIn applies the NotIn predicate on the "rate_limit_1d" field.
  770. func RateLimit1dNotIn(vs ...float64) predicate.APIKey {
  771. return predicate.APIKey(sql.FieldNotIn(FieldRateLimit1d, vs...))
  772. }
  773. // RateLimit1dGT applies the GT predicate on the "rate_limit_1d" field.
  774. func RateLimit1dGT(v float64) predicate.APIKey {
  775. return predicate.APIKey(sql.FieldGT(FieldRateLimit1d, v))
  776. }
  777. // RateLimit1dGTE applies the GTE predicate on the "rate_limit_1d" field.
  778. func RateLimit1dGTE(v float64) predicate.APIKey {
  779. return predicate.APIKey(sql.FieldGTE(FieldRateLimit1d, v))
  780. }
  781. // RateLimit1dLT applies the LT predicate on the "rate_limit_1d" field.
  782. func RateLimit1dLT(v float64) predicate.APIKey {
  783. return predicate.APIKey(sql.FieldLT(FieldRateLimit1d, v))
  784. }
  785. // RateLimit1dLTE applies the LTE predicate on the "rate_limit_1d" field.
  786. func RateLimit1dLTE(v float64) predicate.APIKey {
  787. return predicate.APIKey(sql.FieldLTE(FieldRateLimit1d, v))
  788. }
  789. // RateLimit7dEQ applies the EQ predicate on the "rate_limit_7d" field.
  790. func RateLimit7dEQ(v float64) predicate.APIKey {
  791. return predicate.APIKey(sql.FieldEQ(FieldRateLimit7d, v))
  792. }
  793. // RateLimit7dNEQ applies the NEQ predicate on the "rate_limit_7d" field.
  794. func RateLimit7dNEQ(v float64) predicate.APIKey {
  795. return predicate.APIKey(sql.FieldNEQ(FieldRateLimit7d, v))
  796. }
  797. // RateLimit7dIn applies the In predicate on the "rate_limit_7d" field.
  798. func RateLimit7dIn(vs ...float64) predicate.APIKey {
  799. return predicate.APIKey(sql.FieldIn(FieldRateLimit7d, vs...))
  800. }
  801. // RateLimit7dNotIn applies the NotIn predicate on the "rate_limit_7d" field.
  802. func RateLimit7dNotIn(vs ...float64) predicate.APIKey {
  803. return predicate.APIKey(sql.FieldNotIn(FieldRateLimit7d, vs...))
  804. }
  805. // RateLimit7dGT applies the GT predicate on the "rate_limit_7d" field.
  806. func RateLimit7dGT(v float64) predicate.APIKey {
  807. return predicate.APIKey(sql.FieldGT(FieldRateLimit7d, v))
  808. }
  809. // RateLimit7dGTE applies the GTE predicate on the "rate_limit_7d" field.
  810. func RateLimit7dGTE(v float64) predicate.APIKey {
  811. return predicate.APIKey(sql.FieldGTE(FieldRateLimit7d, v))
  812. }
  813. // RateLimit7dLT applies the LT predicate on the "rate_limit_7d" field.
  814. func RateLimit7dLT(v float64) predicate.APIKey {
  815. return predicate.APIKey(sql.FieldLT(FieldRateLimit7d, v))
  816. }
  817. // RateLimit7dLTE applies the LTE predicate on the "rate_limit_7d" field.
  818. func RateLimit7dLTE(v float64) predicate.APIKey {
  819. return predicate.APIKey(sql.FieldLTE(FieldRateLimit7d, v))
  820. }
  821. // Usage5hEQ applies the EQ predicate on the "usage_5h" field.
  822. func Usage5hEQ(v float64) predicate.APIKey {
  823. return predicate.APIKey(sql.FieldEQ(FieldUsage5h, v))
  824. }
  825. // Usage5hNEQ applies the NEQ predicate on the "usage_5h" field.
  826. func Usage5hNEQ(v float64) predicate.APIKey {
  827. return predicate.APIKey(sql.FieldNEQ(FieldUsage5h, v))
  828. }
  829. // Usage5hIn applies the In predicate on the "usage_5h" field.
  830. func Usage5hIn(vs ...float64) predicate.APIKey {
  831. return predicate.APIKey(sql.FieldIn(FieldUsage5h, vs...))
  832. }
  833. // Usage5hNotIn applies the NotIn predicate on the "usage_5h" field.
  834. func Usage5hNotIn(vs ...float64) predicate.APIKey {
  835. return predicate.APIKey(sql.FieldNotIn(FieldUsage5h, vs...))
  836. }
  837. // Usage5hGT applies the GT predicate on the "usage_5h" field.
  838. func Usage5hGT(v float64) predicate.APIKey {
  839. return predicate.APIKey(sql.FieldGT(FieldUsage5h, v))
  840. }
  841. // Usage5hGTE applies the GTE predicate on the "usage_5h" field.
  842. func Usage5hGTE(v float64) predicate.APIKey {
  843. return predicate.APIKey(sql.FieldGTE(FieldUsage5h, v))
  844. }
  845. // Usage5hLT applies the LT predicate on the "usage_5h" field.
  846. func Usage5hLT(v float64) predicate.APIKey {
  847. return predicate.APIKey(sql.FieldLT(FieldUsage5h, v))
  848. }
  849. // Usage5hLTE applies the LTE predicate on the "usage_5h" field.
  850. func Usage5hLTE(v float64) predicate.APIKey {
  851. return predicate.APIKey(sql.FieldLTE(FieldUsage5h, v))
  852. }
  853. // Usage1dEQ applies the EQ predicate on the "usage_1d" field.
  854. func Usage1dEQ(v float64) predicate.APIKey {
  855. return predicate.APIKey(sql.FieldEQ(FieldUsage1d, v))
  856. }
  857. // Usage1dNEQ applies the NEQ predicate on the "usage_1d" field.
  858. func Usage1dNEQ(v float64) predicate.APIKey {
  859. return predicate.APIKey(sql.FieldNEQ(FieldUsage1d, v))
  860. }
  861. // Usage1dIn applies the In predicate on the "usage_1d" field.
  862. func Usage1dIn(vs ...float64) predicate.APIKey {
  863. return predicate.APIKey(sql.FieldIn(FieldUsage1d, vs...))
  864. }
  865. // Usage1dNotIn applies the NotIn predicate on the "usage_1d" field.
  866. func Usage1dNotIn(vs ...float64) predicate.APIKey {
  867. return predicate.APIKey(sql.FieldNotIn(FieldUsage1d, vs...))
  868. }
  869. // Usage1dGT applies the GT predicate on the "usage_1d" field.
  870. func Usage1dGT(v float64) predicate.APIKey {
  871. return predicate.APIKey(sql.FieldGT(FieldUsage1d, v))
  872. }
  873. // Usage1dGTE applies the GTE predicate on the "usage_1d" field.
  874. func Usage1dGTE(v float64) predicate.APIKey {
  875. return predicate.APIKey(sql.FieldGTE(FieldUsage1d, v))
  876. }
  877. // Usage1dLT applies the LT predicate on the "usage_1d" field.
  878. func Usage1dLT(v float64) predicate.APIKey {
  879. return predicate.APIKey(sql.FieldLT(FieldUsage1d, v))
  880. }
  881. // Usage1dLTE applies the LTE predicate on the "usage_1d" field.
  882. func Usage1dLTE(v float64) predicate.APIKey {
  883. return predicate.APIKey(sql.FieldLTE(FieldUsage1d, v))
  884. }
  885. // Usage7dEQ applies the EQ predicate on the "usage_7d" field.
  886. func Usage7dEQ(v float64) predicate.APIKey {
  887. return predicate.APIKey(sql.FieldEQ(FieldUsage7d, v))
  888. }
  889. // Usage7dNEQ applies the NEQ predicate on the "usage_7d" field.
  890. func Usage7dNEQ(v float64) predicate.APIKey {
  891. return predicate.APIKey(sql.FieldNEQ(FieldUsage7d, v))
  892. }
  893. // Usage7dIn applies the In predicate on the "usage_7d" field.
  894. func Usage7dIn(vs ...float64) predicate.APIKey {
  895. return predicate.APIKey(sql.FieldIn(FieldUsage7d, vs...))
  896. }
  897. // Usage7dNotIn applies the NotIn predicate on the "usage_7d" field.
  898. func Usage7dNotIn(vs ...float64) predicate.APIKey {
  899. return predicate.APIKey(sql.FieldNotIn(FieldUsage7d, vs...))
  900. }
  901. // Usage7dGT applies the GT predicate on the "usage_7d" field.
  902. func Usage7dGT(v float64) predicate.APIKey {
  903. return predicate.APIKey(sql.FieldGT(FieldUsage7d, v))
  904. }
  905. // Usage7dGTE applies the GTE predicate on the "usage_7d" field.
  906. func Usage7dGTE(v float64) predicate.APIKey {
  907. return predicate.APIKey(sql.FieldGTE(FieldUsage7d, v))
  908. }
  909. // Usage7dLT applies the LT predicate on the "usage_7d" field.
  910. func Usage7dLT(v float64) predicate.APIKey {
  911. return predicate.APIKey(sql.FieldLT(FieldUsage7d, v))
  912. }
  913. // Usage7dLTE applies the LTE predicate on the "usage_7d" field.
  914. func Usage7dLTE(v float64) predicate.APIKey {
  915. return predicate.APIKey(sql.FieldLTE(FieldUsage7d, v))
  916. }
  917. // Window5hStartEQ applies the EQ predicate on the "window_5h_start" field.
  918. func Window5hStartEQ(v time.Time) predicate.APIKey {
  919. return predicate.APIKey(sql.FieldEQ(FieldWindow5hStart, v))
  920. }
  921. // Window5hStartNEQ applies the NEQ predicate on the "window_5h_start" field.
  922. func Window5hStartNEQ(v time.Time) predicate.APIKey {
  923. return predicate.APIKey(sql.FieldNEQ(FieldWindow5hStart, v))
  924. }
  925. // Window5hStartIn applies the In predicate on the "window_5h_start" field.
  926. func Window5hStartIn(vs ...time.Time) predicate.APIKey {
  927. return predicate.APIKey(sql.FieldIn(FieldWindow5hStart, vs...))
  928. }
  929. // Window5hStartNotIn applies the NotIn predicate on the "window_5h_start" field.
  930. func Window5hStartNotIn(vs ...time.Time) predicate.APIKey {
  931. return predicate.APIKey(sql.FieldNotIn(FieldWindow5hStart, vs...))
  932. }
  933. // Window5hStartGT applies the GT predicate on the "window_5h_start" field.
  934. func Window5hStartGT(v time.Time) predicate.APIKey {
  935. return predicate.APIKey(sql.FieldGT(FieldWindow5hStart, v))
  936. }
  937. // Window5hStartGTE applies the GTE predicate on the "window_5h_start" field.
  938. func Window5hStartGTE(v time.Time) predicate.APIKey {
  939. return predicate.APIKey(sql.FieldGTE(FieldWindow5hStart, v))
  940. }
  941. // Window5hStartLT applies the LT predicate on the "window_5h_start" field.
  942. func Window5hStartLT(v time.Time) predicate.APIKey {
  943. return predicate.APIKey(sql.FieldLT(FieldWindow5hStart, v))
  944. }
  945. // Window5hStartLTE applies the LTE predicate on the "window_5h_start" field.
  946. func Window5hStartLTE(v time.Time) predicate.APIKey {
  947. return predicate.APIKey(sql.FieldLTE(FieldWindow5hStart, v))
  948. }
  949. // Window5hStartIsNil applies the IsNil predicate on the "window_5h_start" field.
  950. func Window5hStartIsNil() predicate.APIKey {
  951. return predicate.APIKey(sql.FieldIsNull(FieldWindow5hStart))
  952. }
  953. // Window5hStartNotNil applies the NotNil predicate on the "window_5h_start" field.
  954. func Window5hStartNotNil() predicate.APIKey {
  955. return predicate.APIKey(sql.FieldNotNull(FieldWindow5hStart))
  956. }
  957. // Window1dStartEQ applies the EQ predicate on the "window_1d_start" field.
  958. func Window1dStartEQ(v time.Time) predicate.APIKey {
  959. return predicate.APIKey(sql.FieldEQ(FieldWindow1dStart, v))
  960. }
  961. // Window1dStartNEQ applies the NEQ predicate on the "window_1d_start" field.
  962. func Window1dStartNEQ(v time.Time) predicate.APIKey {
  963. return predicate.APIKey(sql.FieldNEQ(FieldWindow1dStart, v))
  964. }
  965. // Window1dStartIn applies the In predicate on the "window_1d_start" field.
  966. func Window1dStartIn(vs ...time.Time) predicate.APIKey {
  967. return predicate.APIKey(sql.FieldIn(FieldWindow1dStart, vs...))
  968. }
  969. // Window1dStartNotIn applies the NotIn predicate on the "window_1d_start" field.
  970. func Window1dStartNotIn(vs ...time.Time) predicate.APIKey {
  971. return predicate.APIKey(sql.FieldNotIn(FieldWindow1dStart, vs...))
  972. }
  973. // Window1dStartGT applies the GT predicate on the "window_1d_start" field.
  974. func Window1dStartGT(v time.Time) predicate.APIKey {
  975. return predicate.APIKey(sql.FieldGT(FieldWindow1dStart, v))
  976. }
  977. // Window1dStartGTE applies the GTE predicate on the "window_1d_start" field.
  978. func Window1dStartGTE(v time.Time) predicate.APIKey {
  979. return predicate.APIKey(sql.FieldGTE(FieldWindow1dStart, v))
  980. }
  981. // Window1dStartLT applies the LT predicate on the "window_1d_start" field.
  982. func Window1dStartLT(v time.Time) predicate.APIKey {
  983. return predicate.APIKey(sql.FieldLT(FieldWindow1dStart, v))
  984. }
  985. // Window1dStartLTE applies the LTE predicate on the "window_1d_start" field.
  986. func Window1dStartLTE(v time.Time) predicate.APIKey {
  987. return predicate.APIKey(sql.FieldLTE(FieldWindow1dStart, v))
  988. }
  989. // Window1dStartIsNil applies the IsNil predicate on the "window_1d_start" field.
  990. func Window1dStartIsNil() predicate.APIKey {
  991. return predicate.APIKey(sql.FieldIsNull(FieldWindow1dStart))
  992. }
  993. // Window1dStartNotNil applies the NotNil predicate on the "window_1d_start" field.
  994. func Window1dStartNotNil() predicate.APIKey {
  995. return predicate.APIKey(sql.FieldNotNull(FieldWindow1dStart))
  996. }
  997. // Window7dStartEQ applies the EQ predicate on the "window_7d_start" field.
  998. func Window7dStartEQ(v time.Time) predicate.APIKey {
  999. return predicate.APIKey(sql.FieldEQ(FieldWindow7dStart, v))
  1000. }
  1001. // Window7dStartNEQ applies the NEQ predicate on the "window_7d_start" field.
  1002. func Window7dStartNEQ(v time.Time) predicate.APIKey {
  1003. return predicate.APIKey(sql.FieldNEQ(FieldWindow7dStart, v))
  1004. }
  1005. // Window7dStartIn applies the In predicate on the "window_7d_start" field.
  1006. func Window7dStartIn(vs ...time.Time) predicate.APIKey {
  1007. return predicate.APIKey(sql.FieldIn(FieldWindow7dStart, vs...))
  1008. }
  1009. // Window7dStartNotIn applies the NotIn predicate on the "window_7d_start" field.
  1010. func Window7dStartNotIn(vs ...time.Time) predicate.APIKey {
  1011. return predicate.APIKey(sql.FieldNotIn(FieldWindow7dStart, vs...))
  1012. }
  1013. // Window7dStartGT applies the GT predicate on the "window_7d_start" field.
  1014. func Window7dStartGT(v time.Time) predicate.APIKey {
  1015. return predicate.APIKey(sql.FieldGT(FieldWindow7dStart, v))
  1016. }
  1017. // Window7dStartGTE applies the GTE predicate on the "window_7d_start" field.
  1018. func Window7dStartGTE(v time.Time) predicate.APIKey {
  1019. return predicate.APIKey(sql.FieldGTE(FieldWindow7dStart, v))
  1020. }
  1021. // Window7dStartLT applies the LT predicate on the "window_7d_start" field.
  1022. func Window7dStartLT(v time.Time) predicate.APIKey {
  1023. return predicate.APIKey(sql.FieldLT(FieldWindow7dStart, v))
  1024. }
  1025. // Window7dStartLTE applies the LTE predicate on the "window_7d_start" field.
  1026. func Window7dStartLTE(v time.Time) predicate.APIKey {
  1027. return predicate.APIKey(sql.FieldLTE(FieldWindow7dStart, v))
  1028. }
  1029. // Window7dStartIsNil applies the IsNil predicate on the "window_7d_start" field.
  1030. func Window7dStartIsNil() predicate.APIKey {
  1031. return predicate.APIKey(sql.FieldIsNull(FieldWindow7dStart))
  1032. }
  1033. // Window7dStartNotNil applies the NotNil predicate on the "window_7d_start" field.
  1034. func Window7dStartNotNil() predicate.APIKey {
  1035. return predicate.APIKey(sql.FieldNotNull(FieldWindow7dStart))
  1036. }
  1037. // HasUser applies the HasEdge predicate on the "user" edge.
  1038. func HasUser() predicate.APIKey {
  1039. return predicate.APIKey(func(s *sql.Selector) {
  1040. step := sqlgraph.NewStep(
  1041. sqlgraph.From(Table, FieldID),
  1042. sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
  1043. )
  1044. sqlgraph.HasNeighbors(s, step)
  1045. })
  1046. }
  1047. // HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
  1048. func HasUserWith(preds ...predicate.User) predicate.APIKey {
  1049. return predicate.APIKey(func(s *sql.Selector) {
  1050. step := newUserStep()
  1051. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  1052. for _, p := range preds {
  1053. p(s)
  1054. }
  1055. })
  1056. })
  1057. }
  1058. // HasGroup applies the HasEdge predicate on the "group" edge.
  1059. func HasGroup() predicate.APIKey {
  1060. return predicate.APIKey(func(s *sql.Selector) {
  1061. step := sqlgraph.NewStep(
  1062. sqlgraph.From(Table, FieldID),
  1063. sqlgraph.Edge(sqlgraph.M2O, true, GroupTable, GroupColumn),
  1064. )
  1065. sqlgraph.HasNeighbors(s, step)
  1066. })
  1067. }
  1068. // HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).
  1069. func HasGroupWith(preds ...predicate.Group) predicate.APIKey {
  1070. return predicate.APIKey(func(s *sql.Selector) {
  1071. step := newGroupStep()
  1072. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  1073. for _, p := range preds {
  1074. p(s)
  1075. }
  1076. })
  1077. })
  1078. }
  1079. // HasUsageLogs applies the HasEdge predicate on the "usage_logs" edge.
  1080. func HasUsageLogs() predicate.APIKey {
  1081. return predicate.APIKey(func(s *sql.Selector) {
  1082. step := sqlgraph.NewStep(
  1083. sqlgraph.From(Table, FieldID),
  1084. sqlgraph.Edge(sqlgraph.O2M, false, UsageLogsTable, UsageLogsColumn),
  1085. )
  1086. sqlgraph.HasNeighbors(s, step)
  1087. })
  1088. }
  1089. // HasUsageLogsWith applies the HasEdge predicate on the "usage_logs" edge with a given conditions (other predicates).
  1090. func HasUsageLogsWith(preds ...predicate.UsageLog) predicate.APIKey {
  1091. return predicate.APIKey(func(s *sql.Selector) {
  1092. step := newUsageLogsStep()
  1093. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  1094. for _, p := range preds {
  1095. p(s)
  1096. }
  1097. })
  1098. })
  1099. }
  1100. // And groups predicates with the AND operator between them.
  1101. func And(predicates ...predicate.APIKey) predicate.APIKey {
  1102. return predicate.APIKey(sql.AndPredicates(predicates...))
  1103. }
  1104. // Or groups predicates with the OR operator between them.
  1105. func Or(predicates ...predicate.APIKey) predicate.APIKey {
  1106. return predicate.APIKey(sql.OrPredicates(predicates...))
  1107. }
  1108. // Not applies the not operator on the given predicate.
  1109. func Not(p predicate.APIKey) predicate.APIKey {
  1110. return predicate.APIKey(sql.NotPredicates(p))
  1111. }