where.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  1. // Code generated by ent, DO NOT EDIT.
  2. package securitypolicykeyword
  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.SecurityPolicyKeyword {
  11. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldID, id))
  12. }
  13. // IDEQ applies the EQ predicate on the ID field.
  14. func IDEQ(id int64) predicate.SecurityPolicyKeyword {
  15. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldID, id))
  16. }
  17. // IDNEQ applies the NEQ predicate on the ID field.
  18. func IDNEQ(id int64) predicate.SecurityPolicyKeyword {
  19. return predicate.SecurityPolicyKeyword(sql.FieldNEQ(FieldID, id))
  20. }
  21. // IDIn applies the In predicate on the ID field.
  22. func IDIn(ids ...int64) predicate.SecurityPolicyKeyword {
  23. return predicate.SecurityPolicyKeyword(sql.FieldIn(FieldID, ids...))
  24. }
  25. // IDNotIn applies the NotIn predicate on the ID field.
  26. func IDNotIn(ids ...int64) predicate.SecurityPolicyKeyword {
  27. return predicate.SecurityPolicyKeyword(sql.FieldNotIn(FieldID, ids...))
  28. }
  29. // IDGT applies the GT predicate on the ID field.
  30. func IDGT(id int64) predicate.SecurityPolicyKeyword {
  31. return predicate.SecurityPolicyKeyword(sql.FieldGT(FieldID, id))
  32. }
  33. // IDGTE applies the GTE predicate on the ID field.
  34. func IDGTE(id int64) predicate.SecurityPolicyKeyword {
  35. return predicate.SecurityPolicyKeyword(sql.FieldGTE(FieldID, id))
  36. }
  37. // IDLT applies the LT predicate on the ID field.
  38. func IDLT(id int64) predicate.SecurityPolicyKeyword {
  39. return predicate.SecurityPolicyKeyword(sql.FieldLT(FieldID, id))
  40. }
  41. // IDLTE applies the LTE predicate on the ID field.
  42. func IDLTE(id int64) predicate.SecurityPolicyKeyword {
  43. return predicate.SecurityPolicyKeyword(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.SecurityPolicyKeyword {
  47. return predicate.SecurityPolicyKeyword(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.SecurityPolicyKeyword {
  51. return predicate.SecurityPolicyKeyword(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.SecurityPolicyKeyword {
  55. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldDeletedAt, v))
  56. }
  57. // GroupID applies equality check predicate on the "group_id" field. It's identical to GroupIDEQ.
  58. func GroupID(v int64) predicate.SecurityPolicyKeyword {
  59. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldGroupID, v))
  60. }
  61. // Keyword applies equality check predicate on the "keyword" field. It's identical to KeywordEQ.
  62. func Keyword(v string) predicate.SecurityPolicyKeyword {
  63. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldKeyword, v))
  64. }
  65. // Category applies equality check predicate on the "category" field. It's identical to CategoryEQ.
  66. func Category(v string) predicate.SecurityPolicyKeyword {
  67. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldCategory, v))
  68. }
  69. // Enabled applies equality check predicate on the "enabled" field. It's identical to EnabledEQ.
  70. func Enabled(v bool) predicate.SecurityPolicyKeyword {
  71. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldEnabled, v))
  72. }
  73. // CreatedAtEQ applies the EQ predicate on the "created_at" field.
  74. func CreatedAtEQ(v time.Time) predicate.SecurityPolicyKeyword {
  75. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldCreatedAt, v))
  76. }
  77. // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
  78. func CreatedAtNEQ(v time.Time) predicate.SecurityPolicyKeyword {
  79. return predicate.SecurityPolicyKeyword(sql.FieldNEQ(FieldCreatedAt, v))
  80. }
  81. // CreatedAtIn applies the In predicate on the "created_at" field.
  82. func CreatedAtIn(vs ...time.Time) predicate.SecurityPolicyKeyword {
  83. return predicate.SecurityPolicyKeyword(sql.FieldIn(FieldCreatedAt, vs...))
  84. }
  85. // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
  86. func CreatedAtNotIn(vs ...time.Time) predicate.SecurityPolicyKeyword {
  87. return predicate.SecurityPolicyKeyword(sql.FieldNotIn(FieldCreatedAt, vs...))
  88. }
  89. // CreatedAtGT applies the GT predicate on the "created_at" field.
  90. func CreatedAtGT(v time.Time) predicate.SecurityPolicyKeyword {
  91. return predicate.SecurityPolicyKeyword(sql.FieldGT(FieldCreatedAt, v))
  92. }
  93. // CreatedAtGTE applies the GTE predicate on the "created_at" field.
  94. func CreatedAtGTE(v time.Time) predicate.SecurityPolicyKeyword {
  95. return predicate.SecurityPolicyKeyword(sql.FieldGTE(FieldCreatedAt, v))
  96. }
  97. // CreatedAtLT applies the LT predicate on the "created_at" field.
  98. func CreatedAtLT(v time.Time) predicate.SecurityPolicyKeyword {
  99. return predicate.SecurityPolicyKeyword(sql.FieldLT(FieldCreatedAt, v))
  100. }
  101. // CreatedAtLTE applies the LTE predicate on the "created_at" field.
  102. func CreatedAtLTE(v time.Time) predicate.SecurityPolicyKeyword {
  103. return predicate.SecurityPolicyKeyword(sql.FieldLTE(FieldCreatedAt, v))
  104. }
  105. // UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
  106. func UpdatedAtEQ(v time.Time) predicate.SecurityPolicyKeyword {
  107. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldUpdatedAt, v))
  108. }
  109. // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
  110. func UpdatedAtNEQ(v time.Time) predicate.SecurityPolicyKeyword {
  111. return predicate.SecurityPolicyKeyword(sql.FieldNEQ(FieldUpdatedAt, v))
  112. }
  113. // UpdatedAtIn applies the In predicate on the "updated_at" field.
  114. func UpdatedAtIn(vs ...time.Time) predicate.SecurityPolicyKeyword {
  115. return predicate.SecurityPolicyKeyword(sql.FieldIn(FieldUpdatedAt, vs...))
  116. }
  117. // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
  118. func UpdatedAtNotIn(vs ...time.Time) predicate.SecurityPolicyKeyword {
  119. return predicate.SecurityPolicyKeyword(sql.FieldNotIn(FieldUpdatedAt, vs...))
  120. }
  121. // UpdatedAtGT applies the GT predicate on the "updated_at" field.
  122. func UpdatedAtGT(v time.Time) predicate.SecurityPolicyKeyword {
  123. return predicate.SecurityPolicyKeyword(sql.FieldGT(FieldUpdatedAt, v))
  124. }
  125. // UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
  126. func UpdatedAtGTE(v time.Time) predicate.SecurityPolicyKeyword {
  127. return predicate.SecurityPolicyKeyword(sql.FieldGTE(FieldUpdatedAt, v))
  128. }
  129. // UpdatedAtLT applies the LT predicate on the "updated_at" field.
  130. func UpdatedAtLT(v time.Time) predicate.SecurityPolicyKeyword {
  131. return predicate.SecurityPolicyKeyword(sql.FieldLT(FieldUpdatedAt, v))
  132. }
  133. // UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
  134. func UpdatedAtLTE(v time.Time) predicate.SecurityPolicyKeyword {
  135. return predicate.SecurityPolicyKeyword(sql.FieldLTE(FieldUpdatedAt, v))
  136. }
  137. // DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
  138. func DeletedAtEQ(v time.Time) predicate.SecurityPolicyKeyword {
  139. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldDeletedAt, v))
  140. }
  141. // DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
  142. func DeletedAtNEQ(v time.Time) predicate.SecurityPolicyKeyword {
  143. return predicate.SecurityPolicyKeyword(sql.FieldNEQ(FieldDeletedAt, v))
  144. }
  145. // DeletedAtIn applies the In predicate on the "deleted_at" field.
  146. func DeletedAtIn(vs ...time.Time) predicate.SecurityPolicyKeyword {
  147. return predicate.SecurityPolicyKeyword(sql.FieldIn(FieldDeletedAt, vs...))
  148. }
  149. // DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
  150. func DeletedAtNotIn(vs ...time.Time) predicate.SecurityPolicyKeyword {
  151. return predicate.SecurityPolicyKeyword(sql.FieldNotIn(FieldDeletedAt, vs...))
  152. }
  153. // DeletedAtGT applies the GT predicate on the "deleted_at" field.
  154. func DeletedAtGT(v time.Time) predicate.SecurityPolicyKeyword {
  155. return predicate.SecurityPolicyKeyword(sql.FieldGT(FieldDeletedAt, v))
  156. }
  157. // DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
  158. func DeletedAtGTE(v time.Time) predicate.SecurityPolicyKeyword {
  159. return predicate.SecurityPolicyKeyword(sql.FieldGTE(FieldDeletedAt, v))
  160. }
  161. // DeletedAtLT applies the LT predicate on the "deleted_at" field.
  162. func DeletedAtLT(v time.Time) predicate.SecurityPolicyKeyword {
  163. return predicate.SecurityPolicyKeyword(sql.FieldLT(FieldDeletedAt, v))
  164. }
  165. // DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
  166. func DeletedAtLTE(v time.Time) predicate.SecurityPolicyKeyword {
  167. return predicate.SecurityPolicyKeyword(sql.FieldLTE(FieldDeletedAt, v))
  168. }
  169. // DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
  170. func DeletedAtIsNil() predicate.SecurityPolicyKeyword {
  171. return predicate.SecurityPolicyKeyword(sql.FieldIsNull(FieldDeletedAt))
  172. }
  173. // DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
  174. func DeletedAtNotNil() predicate.SecurityPolicyKeyword {
  175. return predicate.SecurityPolicyKeyword(sql.FieldNotNull(FieldDeletedAt))
  176. }
  177. // GroupIDEQ applies the EQ predicate on the "group_id" field.
  178. func GroupIDEQ(v int64) predicate.SecurityPolicyKeyword {
  179. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldGroupID, v))
  180. }
  181. // GroupIDNEQ applies the NEQ predicate on the "group_id" field.
  182. func GroupIDNEQ(v int64) predicate.SecurityPolicyKeyword {
  183. return predicate.SecurityPolicyKeyword(sql.FieldNEQ(FieldGroupID, v))
  184. }
  185. // GroupIDIn applies the In predicate on the "group_id" field.
  186. func GroupIDIn(vs ...int64) predicate.SecurityPolicyKeyword {
  187. return predicate.SecurityPolicyKeyword(sql.FieldIn(FieldGroupID, vs...))
  188. }
  189. // GroupIDNotIn applies the NotIn predicate on the "group_id" field.
  190. func GroupIDNotIn(vs ...int64) predicate.SecurityPolicyKeyword {
  191. return predicate.SecurityPolicyKeyword(sql.FieldNotIn(FieldGroupID, vs...))
  192. }
  193. // GroupIDIsNil applies the IsNil predicate on the "group_id" field.
  194. func GroupIDIsNil() predicate.SecurityPolicyKeyword {
  195. return predicate.SecurityPolicyKeyword(sql.FieldIsNull(FieldGroupID))
  196. }
  197. // GroupIDNotNil applies the NotNil predicate on the "group_id" field.
  198. func GroupIDNotNil() predicate.SecurityPolicyKeyword {
  199. return predicate.SecurityPolicyKeyword(sql.FieldNotNull(FieldGroupID))
  200. }
  201. // KeywordEQ applies the EQ predicate on the "keyword" field.
  202. func KeywordEQ(v string) predicate.SecurityPolicyKeyword {
  203. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldKeyword, v))
  204. }
  205. // KeywordNEQ applies the NEQ predicate on the "keyword" field.
  206. func KeywordNEQ(v string) predicate.SecurityPolicyKeyword {
  207. return predicate.SecurityPolicyKeyword(sql.FieldNEQ(FieldKeyword, v))
  208. }
  209. // KeywordIn applies the In predicate on the "keyword" field.
  210. func KeywordIn(vs ...string) predicate.SecurityPolicyKeyword {
  211. return predicate.SecurityPolicyKeyword(sql.FieldIn(FieldKeyword, vs...))
  212. }
  213. // KeywordNotIn applies the NotIn predicate on the "keyword" field.
  214. func KeywordNotIn(vs ...string) predicate.SecurityPolicyKeyword {
  215. return predicate.SecurityPolicyKeyword(sql.FieldNotIn(FieldKeyword, vs...))
  216. }
  217. // KeywordGT applies the GT predicate on the "keyword" field.
  218. func KeywordGT(v string) predicate.SecurityPolicyKeyword {
  219. return predicate.SecurityPolicyKeyword(sql.FieldGT(FieldKeyword, v))
  220. }
  221. // KeywordGTE applies the GTE predicate on the "keyword" field.
  222. func KeywordGTE(v string) predicate.SecurityPolicyKeyword {
  223. return predicate.SecurityPolicyKeyword(sql.FieldGTE(FieldKeyword, v))
  224. }
  225. // KeywordLT applies the LT predicate on the "keyword" field.
  226. func KeywordLT(v string) predicate.SecurityPolicyKeyword {
  227. return predicate.SecurityPolicyKeyword(sql.FieldLT(FieldKeyword, v))
  228. }
  229. // KeywordLTE applies the LTE predicate on the "keyword" field.
  230. func KeywordLTE(v string) predicate.SecurityPolicyKeyword {
  231. return predicate.SecurityPolicyKeyword(sql.FieldLTE(FieldKeyword, v))
  232. }
  233. // KeywordContains applies the Contains predicate on the "keyword" field.
  234. func KeywordContains(v string) predicate.SecurityPolicyKeyword {
  235. return predicate.SecurityPolicyKeyword(sql.FieldContains(FieldKeyword, v))
  236. }
  237. // KeywordHasPrefix applies the HasPrefix predicate on the "keyword" field.
  238. func KeywordHasPrefix(v string) predicate.SecurityPolicyKeyword {
  239. return predicate.SecurityPolicyKeyword(sql.FieldHasPrefix(FieldKeyword, v))
  240. }
  241. // KeywordHasSuffix applies the HasSuffix predicate on the "keyword" field.
  242. func KeywordHasSuffix(v string) predicate.SecurityPolicyKeyword {
  243. return predicate.SecurityPolicyKeyword(sql.FieldHasSuffix(FieldKeyword, v))
  244. }
  245. // KeywordEqualFold applies the EqualFold predicate on the "keyword" field.
  246. func KeywordEqualFold(v string) predicate.SecurityPolicyKeyword {
  247. return predicate.SecurityPolicyKeyword(sql.FieldEqualFold(FieldKeyword, v))
  248. }
  249. // KeywordContainsFold applies the ContainsFold predicate on the "keyword" field.
  250. func KeywordContainsFold(v string) predicate.SecurityPolicyKeyword {
  251. return predicate.SecurityPolicyKeyword(sql.FieldContainsFold(FieldKeyword, v))
  252. }
  253. // CategoryEQ applies the EQ predicate on the "category" field.
  254. func CategoryEQ(v string) predicate.SecurityPolicyKeyword {
  255. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldCategory, v))
  256. }
  257. // CategoryNEQ applies the NEQ predicate on the "category" field.
  258. func CategoryNEQ(v string) predicate.SecurityPolicyKeyword {
  259. return predicate.SecurityPolicyKeyword(sql.FieldNEQ(FieldCategory, v))
  260. }
  261. // CategoryIn applies the In predicate on the "category" field.
  262. func CategoryIn(vs ...string) predicate.SecurityPolicyKeyword {
  263. return predicate.SecurityPolicyKeyword(sql.FieldIn(FieldCategory, vs...))
  264. }
  265. // CategoryNotIn applies the NotIn predicate on the "category" field.
  266. func CategoryNotIn(vs ...string) predicate.SecurityPolicyKeyword {
  267. return predicate.SecurityPolicyKeyword(sql.FieldNotIn(FieldCategory, vs...))
  268. }
  269. // CategoryGT applies the GT predicate on the "category" field.
  270. func CategoryGT(v string) predicate.SecurityPolicyKeyword {
  271. return predicate.SecurityPolicyKeyword(sql.FieldGT(FieldCategory, v))
  272. }
  273. // CategoryGTE applies the GTE predicate on the "category" field.
  274. func CategoryGTE(v string) predicate.SecurityPolicyKeyword {
  275. return predicate.SecurityPolicyKeyword(sql.FieldGTE(FieldCategory, v))
  276. }
  277. // CategoryLT applies the LT predicate on the "category" field.
  278. func CategoryLT(v string) predicate.SecurityPolicyKeyword {
  279. return predicate.SecurityPolicyKeyword(sql.FieldLT(FieldCategory, v))
  280. }
  281. // CategoryLTE applies the LTE predicate on the "category" field.
  282. func CategoryLTE(v string) predicate.SecurityPolicyKeyword {
  283. return predicate.SecurityPolicyKeyword(sql.FieldLTE(FieldCategory, v))
  284. }
  285. // CategoryContains applies the Contains predicate on the "category" field.
  286. func CategoryContains(v string) predicate.SecurityPolicyKeyword {
  287. return predicate.SecurityPolicyKeyword(sql.FieldContains(FieldCategory, v))
  288. }
  289. // CategoryHasPrefix applies the HasPrefix predicate on the "category" field.
  290. func CategoryHasPrefix(v string) predicate.SecurityPolicyKeyword {
  291. return predicate.SecurityPolicyKeyword(sql.FieldHasPrefix(FieldCategory, v))
  292. }
  293. // CategoryHasSuffix applies the HasSuffix predicate on the "category" field.
  294. func CategoryHasSuffix(v string) predicate.SecurityPolicyKeyword {
  295. return predicate.SecurityPolicyKeyword(sql.FieldHasSuffix(FieldCategory, v))
  296. }
  297. // CategoryEqualFold applies the EqualFold predicate on the "category" field.
  298. func CategoryEqualFold(v string) predicate.SecurityPolicyKeyword {
  299. return predicate.SecurityPolicyKeyword(sql.FieldEqualFold(FieldCategory, v))
  300. }
  301. // CategoryContainsFold applies the ContainsFold predicate on the "category" field.
  302. func CategoryContainsFold(v string) predicate.SecurityPolicyKeyword {
  303. return predicate.SecurityPolicyKeyword(sql.FieldContainsFold(FieldCategory, v))
  304. }
  305. // EnabledEQ applies the EQ predicate on the "enabled" field.
  306. func EnabledEQ(v bool) predicate.SecurityPolicyKeyword {
  307. return predicate.SecurityPolicyKeyword(sql.FieldEQ(FieldEnabled, v))
  308. }
  309. // EnabledNEQ applies the NEQ predicate on the "enabled" field.
  310. func EnabledNEQ(v bool) predicate.SecurityPolicyKeyword {
  311. return predicate.SecurityPolicyKeyword(sql.FieldNEQ(FieldEnabled, v))
  312. }
  313. // HasGroup applies the HasEdge predicate on the "group" edge.
  314. func HasGroup() predicate.SecurityPolicyKeyword {
  315. return predicate.SecurityPolicyKeyword(func(s *sql.Selector) {
  316. step := sqlgraph.NewStep(
  317. sqlgraph.From(Table, FieldID),
  318. sqlgraph.Edge(sqlgraph.M2O, false, GroupTable, GroupColumn),
  319. )
  320. sqlgraph.HasNeighbors(s, step)
  321. })
  322. }
  323. // HasGroupWith applies the HasEdge predicate on the "group" edge with a given conditions (other predicates).
  324. func HasGroupWith(preds ...predicate.Group) predicate.SecurityPolicyKeyword {
  325. return predicate.SecurityPolicyKeyword(func(s *sql.Selector) {
  326. step := newGroupStep()
  327. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  328. for _, p := range preds {
  329. p(s)
  330. }
  331. })
  332. })
  333. }
  334. // And groups predicates with the AND operator between them.
  335. func And(predicates ...predicate.SecurityPolicyKeyword) predicate.SecurityPolicyKeyword {
  336. return predicate.SecurityPolicyKeyword(sql.AndPredicates(predicates...))
  337. }
  338. // Or groups predicates with the OR operator between them.
  339. func Or(predicates ...predicate.SecurityPolicyKeyword) predicate.SecurityPolicyKeyword {
  340. return predicate.SecurityPolicyKeyword(sql.OrPredicates(predicates...))
  341. }
  342. // Not applies the not operator on the given predicate.
  343. func Not(p predicate.SecurityPolicyKeyword) predicate.SecurityPolicyKeyword {
  344. return predicate.SecurityPolicyKeyword(sql.NotPredicates(p))
  345. }