forked from suyuan32/simple-admin-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
where.go
805 lines (651 loc) · 27.9 KB
/
where.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
// Code generated by ent, DO NOT EDIT.
package department
import (
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/huuhoait/simple-admin-core/rpc/ent/predicate"
)
// ID filters vertices based on their ID field.
func ID(id uint64) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id uint64) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id uint64) predicate.Department {
return predicate.Department(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...uint64) predicate.Department {
return predicate.Department(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...uint64) predicate.Department {
return predicate.Department(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id uint64) predicate.Department {
return predicate.Department(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id uint64) predicate.Department {
return predicate.Department(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id uint64) predicate.Department {
return predicate.Department(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id uint64) predicate.Department {
return predicate.Department(sql.FieldLTE(FieldID, id))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldCreatedAt, v))
}
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAt(v time.Time) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldUpdatedAt, v))
}
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
func Status(v uint8) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldStatus, v))
}
// Sort applies equality check predicate on the "sort" field. It's identical to SortEQ.
func Sort(v uint32) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldSort, v))
}
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
func Name(v string) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldName, v))
}
// Ancestors applies equality check predicate on the "ancestors" field. It's identical to AncestorsEQ.
func Ancestors(v string) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldAncestors, v))
}
// Leader applies equality check predicate on the "leader" field. It's identical to LeaderEQ.
func Leader(v string) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldLeader, v))
}
// Phone applies equality check predicate on the "phone" field. It's identical to PhoneEQ.
func Phone(v string) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldPhone, v))
}
// Email applies equality check predicate on the "email" field. It's identical to EmailEQ.
func Email(v string) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldEmail, v))
}
// Remark applies equality check predicate on the "remark" field. It's identical to RemarkEQ.
func Remark(v string) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldRemark, v))
}
// ParentID applies equality check predicate on the "parent_id" field. It's identical to ParentIDEQ.
func ParentID(v uint64) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldParentID, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.Department {
return predicate.Department(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.Department {
return predicate.Department(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.Department {
return predicate.Department(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.Department {
return predicate.Department(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.Department {
return predicate.Department(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.Department {
return predicate.Department(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.Department {
return predicate.Department(sql.FieldLTE(FieldCreatedAt, v))
}
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtEQ(v time.Time) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldUpdatedAt, v))
}
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNEQ(v time.Time) predicate.Department {
return predicate.Department(sql.FieldNEQ(FieldUpdatedAt, v))
}
// UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIn(vs ...time.Time) predicate.Department {
return predicate.Department(sql.FieldIn(FieldUpdatedAt, vs...))
}
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotIn(vs ...time.Time) predicate.Department {
return predicate.Department(sql.FieldNotIn(FieldUpdatedAt, vs...))
}
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGT(v time.Time) predicate.Department {
return predicate.Department(sql.FieldGT(FieldUpdatedAt, v))
}
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtGTE(v time.Time) predicate.Department {
return predicate.Department(sql.FieldGTE(FieldUpdatedAt, v))
}
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLT(v time.Time) predicate.Department {
return predicate.Department(sql.FieldLT(FieldUpdatedAt, v))
}
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtLTE(v time.Time) predicate.Department {
return predicate.Department(sql.FieldLTE(FieldUpdatedAt, v))
}
// StatusEQ applies the EQ predicate on the "status" field.
func StatusEQ(v uint8) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldStatus, v))
}
// StatusNEQ applies the NEQ predicate on the "status" field.
func StatusNEQ(v uint8) predicate.Department {
return predicate.Department(sql.FieldNEQ(FieldStatus, v))
}
// StatusIn applies the In predicate on the "status" field.
func StatusIn(vs ...uint8) predicate.Department {
return predicate.Department(sql.FieldIn(FieldStatus, vs...))
}
// StatusNotIn applies the NotIn predicate on the "status" field.
func StatusNotIn(vs ...uint8) predicate.Department {
return predicate.Department(sql.FieldNotIn(FieldStatus, vs...))
}
// StatusGT applies the GT predicate on the "status" field.
func StatusGT(v uint8) predicate.Department {
return predicate.Department(sql.FieldGT(FieldStatus, v))
}
// StatusGTE applies the GTE predicate on the "status" field.
func StatusGTE(v uint8) predicate.Department {
return predicate.Department(sql.FieldGTE(FieldStatus, v))
}
// StatusLT applies the LT predicate on the "status" field.
func StatusLT(v uint8) predicate.Department {
return predicate.Department(sql.FieldLT(FieldStatus, v))
}
// StatusLTE applies the LTE predicate on the "status" field.
func StatusLTE(v uint8) predicate.Department {
return predicate.Department(sql.FieldLTE(FieldStatus, v))
}
// StatusIsNil applies the IsNil predicate on the "status" field.
func StatusIsNil() predicate.Department {
return predicate.Department(sql.FieldIsNull(FieldStatus))
}
// StatusNotNil applies the NotNil predicate on the "status" field.
func StatusNotNil() predicate.Department {
return predicate.Department(sql.FieldNotNull(FieldStatus))
}
// SortEQ applies the EQ predicate on the "sort" field.
func SortEQ(v uint32) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldSort, v))
}
// SortNEQ applies the NEQ predicate on the "sort" field.
func SortNEQ(v uint32) predicate.Department {
return predicate.Department(sql.FieldNEQ(FieldSort, v))
}
// SortIn applies the In predicate on the "sort" field.
func SortIn(vs ...uint32) predicate.Department {
return predicate.Department(sql.FieldIn(FieldSort, vs...))
}
// SortNotIn applies the NotIn predicate on the "sort" field.
func SortNotIn(vs ...uint32) predicate.Department {
return predicate.Department(sql.FieldNotIn(FieldSort, vs...))
}
// SortGT applies the GT predicate on the "sort" field.
func SortGT(v uint32) predicate.Department {
return predicate.Department(sql.FieldGT(FieldSort, v))
}
// SortGTE applies the GTE predicate on the "sort" field.
func SortGTE(v uint32) predicate.Department {
return predicate.Department(sql.FieldGTE(FieldSort, v))
}
// SortLT applies the LT predicate on the "sort" field.
func SortLT(v uint32) predicate.Department {
return predicate.Department(sql.FieldLT(FieldSort, v))
}
// SortLTE applies the LTE predicate on the "sort" field.
func SortLTE(v uint32) predicate.Department {
return predicate.Department(sql.FieldLTE(FieldSort, v))
}
// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldName, v))
}
// NameNEQ applies the NEQ predicate on the "name" field.
func NameNEQ(v string) predicate.Department {
return predicate.Department(sql.FieldNEQ(FieldName, v))
}
// NameIn applies the In predicate on the "name" field.
func NameIn(vs ...string) predicate.Department {
return predicate.Department(sql.FieldIn(FieldName, vs...))
}
// NameNotIn applies the NotIn predicate on the "name" field.
func NameNotIn(vs ...string) predicate.Department {
return predicate.Department(sql.FieldNotIn(FieldName, vs...))
}
// NameGT applies the GT predicate on the "name" field.
func NameGT(v string) predicate.Department {
return predicate.Department(sql.FieldGT(FieldName, v))
}
// NameGTE applies the GTE predicate on the "name" field.
func NameGTE(v string) predicate.Department {
return predicate.Department(sql.FieldGTE(FieldName, v))
}
// NameLT applies the LT predicate on the "name" field.
func NameLT(v string) predicate.Department {
return predicate.Department(sql.FieldLT(FieldName, v))
}
// NameLTE applies the LTE predicate on the "name" field.
func NameLTE(v string) predicate.Department {
return predicate.Department(sql.FieldLTE(FieldName, v))
}
// NameContains applies the Contains predicate on the "name" field.
func NameContains(v string) predicate.Department {
return predicate.Department(sql.FieldContains(FieldName, v))
}
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasPrefix(v string) predicate.Department {
return predicate.Department(sql.FieldHasPrefix(FieldName, v))
}
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
func NameHasSuffix(v string) predicate.Department {
return predicate.Department(sql.FieldHasSuffix(FieldName, v))
}
// NameEqualFold applies the EqualFold predicate on the "name" field.
func NameEqualFold(v string) predicate.Department {
return predicate.Department(sql.FieldEqualFold(FieldName, v))
}
// NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameContainsFold(v string) predicate.Department {
return predicate.Department(sql.FieldContainsFold(FieldName, v))
}
// AncestorsEQ applies the EQ predicate on the "ancestors" field.
func AncestorsEQ(v string) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldAncestors, v))
}
// AncestorsNEQ applies the NEQ predicate on the "ancestors" field.
func AncestorsNEQ(v string) predicate.Department {
return predicate.Department(sql.FieldNEQ(FieldAncestors, v))
}
// AncestorsIn applies the In predicate on the "ancestors" field.
func AncestorsIn(vs ...string) predicate.Department {
return predicate.Department(sql.FieldIn(FieldAncestors, vs...))
}
// AncestorsNotIn applies the NotIn predicate on the "ancestors" field.
func AncestorsNotIn(vs ...string) predicate.Department {
return predicate.Department(sql.FieldNotIn(FieldAncestors, vs...))
}
// AncestorsGT applies the GT predicate on the "ancestors" field.
func AncestorsGT(v string) predicate.Department {
return predicate.Department(sql.FieldGT(FieldAncestors, v))
}
// AncestorsGTE applies the GTE predicate on the "ancestors" field.
func AncestorsGTE(v string) predicate.Department {
return predicate.Department(sql.FieldGTE(FieldAncestors, v))
}
// AncestorsLT applies the LT predicate on the "ancestors" field.
func AncestorsLT(v string) predicate.Department {
return predicate.Department(sql.FieldLT(FieldAncestors, v))
}
// AncestorsLTE applies the LTE predicate on the "ancestors" field.
func AncestorsLTE(v string) predicate.Department {
return predicate.Department(sql.FieldLTE(FieldAncestors, v))
}
// AncestorsContains applies the Contains predicate on the "ancestors" field.
func AncestorsContains(v string) predicate.Department {
return predicate.Department(sql.FieldContains(FieldAncestors, v))
}
// AncestorsHasPrefix applies the HasPrefix predicate on the "ancestors" field.
func AncestorsHasPrefix(v string) predicate.Department {
return predicate.Department(sql.FieldHasPrefix(FieldAncestors, v))
}
// AncestorsHasSuffix applies the HasSuffix predicate on the "ancestors" field.
func AncestorsHasSuffix(v string) predicate.Department {
return predicate.Department(sql.FieldHasSuffix(FieldAncestors, v))
}
// AncestorsIsNil applies the IsNil predicate on the "ancestors" field.
func AncestorsIsNil() predicate.Department {
return predicate.Department(sql.FieldIsNull(FieldAncestors))
}
// AncestorsNotNil applies the NotNil predicate on the "ancestors" field.
func AncestorsNotNil() predicate.Department {
return predicate.Department(sql.FieldNotNull(FieldAncestors))
}
// AncestorsEqualFold applies the EqualFold predicate on the "ancestors" field.
func AncestorsEqualFold(v string) predicate.Department {
return predicate.Department(sql.FieldEqualFold(FieldAncestors, v))
}
// AncestorsContainsFold applies the ContainsFold predicate on the "ancestors" field.
func AncestorsContainsFold(v string) predicate.Department {
return predicate.Department(sql.FieldContainsFold(FieldAncestors, v))
}
// LeaderEQ applies the EQ predicate on the "leader" field.
func LeaderEQ(v string) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldLeader, v))
}
// LeaderNEQ applies the NEQ predicate on the "leader" field.
func LeaderNEQ(v string) predicate.Department {
return predicate.Department(sql.FieldNEQ(FieldLeader, v))
}
// LeaderIn applies the In predicate on the "leader" field.
func LeaderIn(vs ...string) predicate.Department {
return predicate.Department(sql.FieldIn(FieldLeader, vs...))
}
// LeaderNotIn applies the NotIn predicate on the "leader" field.
func LeaderNotIn(vs ...string) predicate.Department {
return predicate.Department(sql.FieldNotIn(FieldLeader, vs...))
}
// LeaderGT applies the GT predicate on the "leader" field.
func LeaderGT(v string) predicate.Department {
return predicate.Department(sql.FieldGT(FieldLeader, v))
}
// LeaderGTE applies the GTE predicate on the "leader" field.
func LeaderGTE(v string) predicate.Department {
return predicate.Department(sql.FieldGTE(FieldLeader, v))
}
// LeaderLT applies the LT predicate on the "leader" field.
func LeaderLT(v string) predicate.Department {
return predicate.Department(sql.FieldLT(FieldLeader, v))
}
// LeaderLTE applies the LTE predicate on the "leader" field.
func LeaderLTE(v string) predicate.Department {
return predicate.Department(sql.FieldLTE(FieldLeader, v))
}
// LeaderContains applies the Contains predicate on the "leader" field.
func LeaderContains(v string) predicate.Department {
return predicate.Department(sql.FieldContains(FieldLeader, v))
}
// LeaderHasPrefix applies the HasPrefix predicate on the "leader" field.
func LeaderHasPrefix(v string) predicate.Department {
return predicate.Department(sql.FieldHasPrefix(FieldLeader, v))
}
// LeaderHasSuffix applies the HasSuffix predicate on the "leader" field.
func LeaderHasSuffix(v string) predicate.Department {
return predicate.Department(sql.FieldHasSuffix(FieldLeader, v))
}
// LeaderEqualFold applies the EqualFold predicate on the "leader" field.
func LeaderEqualFold(v string) predicate.Department {
return predicate.Department(sql.FieldEqualFold(FieldLeader, v))
}
// LeaderContainsFold applies the ContainsFold predicate on the "leader" field.
func LeaderContainsFold(v string) predicate.Department {
return predicate.Department(sql.FieldContainsFold(FieldLeader, v))
}
// PhoneEQ applies the EQ predicate on the "phone" field.
func PhoneEQ(v string) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldPhone, v))
}
// PhoneNEQ applies the NEQ predicate on the "phone" field.
func PhoneNEQ(v string) predicate.Department {
return predicate.Department(sql.FieldNEQ(FieldPhone, v))
}
// PhoneIn applies the In predicate on the "phone" field.
func PhoneIn(vs ...string) predicate.Department {
return predicate.Department(sql.FieldIn(FieldPhone, vs...))
}
// PhoneNotIn applies the NotIn predicate on the "phone" field.
func PhoneNotIn(vs ...string) predicate.Department {
return predicate.Department(sql.FieldNotIn(FieldPhone, vs...))
}
// PhoneGT applies the GT predicate on the "phone" field.
func PhoneGT(v string) predicate.Department {
return predicate.Department(sql.FieldGT(FieldPhone, v))
}
// PhoneGTE applies the GTE predicate on the "phone" field.
func PhoneGTE(v string) predicate.Department {
return predicate.Department(sql.FieldGTE(FieldPhone, v))
}
// PhoneLT applies the LT predicate on the "phone" field.
func PhoneLT(v string) predicate.Department {
return predicate.Department(sql.FieldLT(FieldPhone, v))
}
// PhoneLTE applies the LTE predicate on the "phone" field.
func PhoneLTE(v string) predicate.Department {
return predicate.Department(sql.FieldLTE(FieldPhone, v))
}
// PhoneContains applies the Contains predicate on the "phone" field.
func PhoneContains(v string) predicate.Department {
return predicate.Department(sql.FieldContains(FieldPhone, v))
}
// PhoneHasPrefix applies the HasPrefix predicate on the "phone" field.
func PhoneHasPrefix(v string) predicate.Department {
return predicate.Department(sql.FieldHasPrefix(FieldPhone, v))
}
// PhoneHasSuffix applies the HasSuffix predicate on the "phone" field.
func PhoneHasSuffix(v string) predicate.Department {
return predicate.Department(sql.FieldHasSuffix(FieldPhone, v))
}
// PhoneEqualFold applies the EqualFold predicate on the "phone" field.
func PhoneEqualFold(v string) predicate.Department {
return predicate.Department(sql.FieldEqualFold(FieldPhone, v))
}
// PhoneContainsFold applies the ContainsFold predicate on the "phone" field.
func PhoneContainsFold(v string) predicate.Department {
return predicate.Department(sql.FieldContainsFold(FieldPhone, v))
}
// EmailEQ applies the EQ predicate on the "email" field.
func EmailEQ(v string) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldEmail, v))
}
// EmailNEQ applies the NEQ predicate on the "email" field.
func EmailNEQ(v string) predicate.Department {
return predicate.Department(sql.FieldNEQ(FieldEmail, v))
}
// EmailIn applies the In predicate on the "email" field.
func EmailIn(vs ...string) predicate.Department {
return predicate.Department(sql.FieldIn(FieldEmail, vs...))
}
// EmailNotIn applies the NotIn predicate on the "email" field.
func EmailNotIn(vs ...string) predicate.Department {
return predicate.Department(sql.FieldNotIn(FieldEmail, vs...))
}
// EmailGT applies the GT predicate on the "email" field.
func EmailGT(v string) predicate.Department {
return predicate.Department(sql.FieldGT(FieldEmail, v))
}
// EmailGTE applies the GTE predicate on the "email" field.
func EmailGTE(v string) predicate.Department {
return predicate.Department(sql.FieldGTE(FieldEmail, v))
}
// EmailLT applies the LT predicate on the "email" field.
func EmailLT(v string) predicate.Department {
return predicate.Department(sql.FieldLT(FieldEmail, v))
}
// EmailLTE applies the LTE predicate on the "email" field.
func EmailLTE(v string) predicate.Department {
return predicate.Department(sql.FieldLTE(FieldEmail, v))
}
// EmailContains applies the Contains predicate on the "email" field.
func EmailContains(v string) predicate.Department {
return predicate.Department(sql.FieldContains(FieldEmail, v))
}
// EmailHasPrefix applies the HasPrefix predicate on the "email" field.
func EmailHasPrefix(v string) predicate.Department {
return predicate.Department(sql.FieldHasPrefix(FieldEmail, v))
}
// EmailHasSuffix applies the HasSuffix predicate on the "email" field.
func EmailHasSuffix(v string) predicate.Department {
return predicate.Department(sql.FieldHasSuffix(FieldEmail, v))
}
// EmailEqualFold applies the EqualFold predicate on the "email" field.
func EmailEqualFold(v string) predicate.Department {
return predicate.Department(sql.FieldEqualFold(FieldEmail, v))
}
// EmailContainsFold applies the ContainsFold predicate on the "email" field.
func EmailContainsFold(v string) predicate.Department {
return predicate.Department(sql.FieldContainsFold(FieldEmail, v))
}
// RemarkEQ applies the EQ predicate on the "remark" field.
func RemarkEQ(v string) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldRemark, v))
}
// RemarkNEQ applies the NEQ predicate on the "remark" field.
func RemarkNEQ(v string) predicate.Department {
return predicate.Department(sql.FieldNEQ(FieldRemark, v))
}
// RemarkIn applies the In predicate on the "remark" field.
func RemarkIn(vs ...string) predicate.Department {
return predicate.Department(sql.FieldIn(FieldRemark, vs...))
}
// RemarkNotIn applies the NotIn predicate on the "remark" field.
func RemarkNotIn(vs ...string) predicate.Department {
return predicate.Department(sql.FieldNotIn(FieldRemark, vs...))
}
// RemarkGT applies the GT predicate on the "remark" field.
func RemarkGT(v string) predicate.Department {
return predicate.Department(sql.FieldGT(FieldRemark, v))
}
// RemarkGTE applies the GTE predicate on the "remark" field.
func RemarkGTE(v string) predicate.Department {
return predicate.Department(sql.FieldGTE(FieldRemark, v))
}
// RemarkLT applies the LT predicate on the "remark" field.
func RemarkLT(v string) predicate.Department {
return predicate.Department(sql.FieldLT(FieldRemark, v))
}
// RemarkLTE applies the LTE predicate on the "remark" field.
func RemarkLTE(v string) predicate.Department {
return predicate.Department(sql.FieldLTE(FieldRemark, v))
}
// RemarkContains applies the Contains predicate on the "remark" field.
func RemarkContains(v string) predicate.Department {
return predicate.Department(sql.FieldContains(FieldRemark, v))
}
// RemarkHasPrefix applies the HasPrefix predicate on the "remark" field.
func RemarkHasPrefix(v string) predicate.Department {
return predicate.Department(sql.FieldHasPrefix(FieldRemark, v))
}
// RemarkHasSuffix applies the HasSuffix predicate on the "remark" field.
func RemarkHasSuffix(v string) predicate.Department {
return predicate.Department(sql.FieldHasSuffix(FieldRemark, v))
}
// RemarkIsNil applies the IsNil predicate on the "remark" field.
func RemarkIsNil() predicate.Department {
return predicate.Department(sql.FieldIsNull(FieldRemark))
}
// RemarkNotNil applies the NotNil predicate on the "remark" field.
func RemarkNotNil() predicate.Department {
return predicate.Department(sql.FieldNotNull(FieldRemark))
}
// RemarkEqualFold applies the EqualFold predicate on the "remark" field.
func RemarkEqualFold(v string) predicate.Department {
return predicate.Department(sql.FieldEqualFold(FieldRemark, v))
}
// RemarkContainsFold applies the ContainsFold predicate on the "remark" field.
func RemarkContainsFold(v string) predicate.Department {
return predicate.Department(sql.FieldContainsFold(FieldRemark, v))
}
// ParentIDEQ applies the EQ predicate on the "parent_id" field.
func ParentIDEQ(v uint64) predicate.Department {
return predicate.Department(sql.FieldEQ(FieldParentID, v))
}
// ParentIDNEQ applies the NEQ predicate on the "parent_id" field.
func ParentIDNEQ(v uint64) predicate.Department {
return predicate.Department(sql.FieldNEQ(FieldParentID, v))
}
// ParentIDIn applies the In predicate on the "parent_id" field.
func ParentIDIn(vs ...uint64) predicate.Department {
return predicate.Department(sql.FieldIn(FieldParentID, vs...))
}
// ParentIDNotIn applies the NotIn predicate on the "parent_id" field.
func ParentIDNotIn(vs ...uint64) predicate.Department {
return predicate.Department(sql.FieldNotIn(FieldParentID, vs...))
}
// ParentIDIsNil applies the IsNil predicate on the "parent_id" field.
func ParentIDIsNil() predicate.Department {
return predicate.Department(sql.FieldIsNull(FieldParentID))
}
// ParentIDNotNil applies the NotNil predicate on the "parent_id" field.
func ParentIDNotNil() predicate.Department {
return predicate.Department(sql.FieldNotNull(FieldParentID))
}
// HasParent applies the HasEdge predicate on the "parent" edge.
func HasParent() predicate.Department {
return predicate.Department(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasParentWith applies the HasEdge predicate on the "parent" edge with a given conditions (other predicates).
func HasParentWith(preds ...predicate.Department) predicate.Department {
return predicate.Department(func(s *sql.Selector) {
step := newParentStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasChildren applies the HasEdge predicate on the "children" edge.
func HasChildren() predicate.Department {
return predicate.Department(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, ChildrenTable, ChildrenColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasChildrenWith applies the HasEdge predicate on the "children" edge with a given conditions (other predicates).
func HasChildrenWith(preds ...predicate.Department) predicate.Department {
return predicate.Department(func(s *sql.Selector) {
step := newChildrenStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// HasUsers applies the HasEdge predicate on the "users" edge.
func HasUsers() predicate.Department {
return predicate.Department(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, true, UsersTable, UsersColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasUsersWith applies the HasEdge predicate on the "users" edge with a given conditions (other predicates).
func HasUsersWith(preds ...predicate.User) predicate.Department {
return predicate.Department(func(s *sql.Selector) {
step := newUsersStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.Department) predicate.Department {
return predicate.Department(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.Department) predicate.Department {
return predicate.Department(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.Department) predicate.Department {
return predicate.Department(sql.NotPredicates(p))
}