-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathentity.go
More file actions
1644 lines (1508 loc) · 72.1 KB
/
Copy pathentity.go
File metadata and controls
1644 lines (1508 loc) · 72.1 KB
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
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by ent, DO NOT EDIT.
package entity
import (
"fmt"
"time"
"entgo.io/ent"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/99designs/gqlgen/graphql"
"github.com/theopenlane/core/common/enums"
)
const (
// Label holds the string label denoting the entity type in the database.
Label = "entity"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
FieldUpdatedAt = "updated_at"
// FieldCreatedBy holds the string denoting the created_by field in the database.
FieldCreatedBy = "created_by"
// FieldUpdatedBy holds the string denoting the updated_by field in the database.
FieldUpdatedBy = "updated_by"
// FieldDeletedAt holds the string denoting the deleted_at field in the database.
FieldDeletedAt = "deleted_at"
// FieldDeletedBy holds the string denoting the deleted_by field in the database.
FieldDeletedBy = "deleted_by"
// FieldTags holds the string denoting the tags field in the database.
FieldTags = "tags"
// FieldOwnerID holds the string denoting the owner_id field in the database.
FieldOwnerID = "owner_id"
// FieldInternalOwner holds the string denoting the internal_owner field in the database.
FieldInternalOwner = "internal_owner"
// FieldInternalOwnerUserID holds the string denoting the internal_owner_user_id field in the database.
FieldInternalOwnerUserID = "internal_owner_user_id"
// FieldInternalOwnerGroupID holds the string denoting the internal_owner_group_id field in the database.
FieldInternalOwnerGroupID = "internal_owner_group_id"
// FieldReviewedBy holds the string denoting the reviewed_by field in the database.
FieldReviewedBy = "reviewed_by"
// FieldReviewedByUserID holds the string denoting the reviewed_by_user_id field in the database.
FieldReviewedByUserID = "reviewed_by_user_id"
// FieldReviewedByGroupID holds the string denoting the reviewed_by_group_id field in the database.
FieldReviewedByGroupID = "reviewed_by_group_id"
// FieldLastReviewedAt holds the string denoting the last_reviewed_at field in the database.
FieldLastReviewedAt = "last_reviewed_at"
// FieldSystemOwned holds the string denoting the system_owned field in the database.
FieldSystemOwned = "system_owned"
// FieldInternalNotes holds the string denoting the internal_notes field in the database.
FieldInternalNotes = "internal_notes"
// FieldSystemInternalID holds the string denoting the system_internal_id field in the database.
FieldSystemInternalID = "system_internal_id"
// FieldEntityRelationshipStateName holds the string denoting the entity_relationship_state_name field in the database.
FieldEntityRelationshipStateName = "entity_relationship_state_name"
// FieldEntityRelationshipStateID holds the string denoting the entity_relationship_state_id field in the database.
FieldEntityRelationshipStateID = "entity_relationship_state_id"
// FieldEntitySecurityQuestionnaireStatusName holds the string denoting the entity_security_questionnaire_status_name field in the database.
FieldEntitySecurityQuestionnaireStatusName = "entity_security_questionnaire_status_name"
// FieldEntitySecurityQuestionnaireStatusID holds the string denoting the entity_security_questionnaire_status_id field in the database.
FieldEntitySecurityQuestionnaireStatusID = "entity_security_questionnaire_status_id"
// FieldEntitySourceTypeName holds the string denoting the entity_source_type_name field in the database.
FieldEntitySourceTypeName = "entity_source_type_name"
// FieldEntitySourceTypeID holds the string denoting the entity_source_type_id field in the database.
FieldEntitySourceTypeID = "entity_source_type_id"
// FieldEnvironmentName holds the string denoting the environment_name field in the database.
FieldEnvironmentName = "environment_name"
// FieldEnvironmentID holds the string denoting the environment_id field in the database.
FieldEnvironmentID = "environment_id"
// FieldScopeName holds the string denoting the scope_name field in the database.
FieldScopeName = "scope_name"
// FieldScopeID holds the string denoting the scope_id field in the database.
FieldScopeID = "scope_id"
// FieldName holds the string denoting the name field in the database.
FieldName = "name"
// FieldDisplayName holds the string denoting the display_name field in the database.
FieldDisplayName = "display_name"
// FieldDescription holds the string denoting the description field in the database.
FieldDescription = "description"
// FieldDomains holds the string denoting the domains field in the database.
FieldDomains = "domains"
// FieldEntityTypeID holds the string denoting the entity_type_id field in the database.
FieldEntityTypeID = "entity_type_id"
// FieldStatus holds the string denoting the status field in the database.
FieldStatus = "status"
// FieldApprovedForUse holds the string denoting the approved_for_use field in the database.
FieldApprovedForUse = "approved_for_use"
// FieldLinkedAssetIds holds the string denoting the linked_asset_ids field in the database.
FieldLinkedAssetIds = "linked_asset_ids"
// FieldHasSoc2 holds the string denoting the has_soc2 field in the database.
FieldHasSoc2 = "has_soc2"
// FieldSoc2PeriodEnd holds the string denoting the soc2_period_end field in the database.
FieldSoc2PeriodEnd = "soc2_period_end"
// FieldContractStartDate holds the string denoting the contract_start_date field in the database.
FieldContractStartDate = "contract_start_date"
// FieldContractEndDate holds the string denoting the contract_end_date field in the database.
FieldContractEndDate = "contract_end_date"
// FieldAutoRenews holds the string denoting the auto_renews field in the database.
FieldAutoRenews = "auto_renews"
// FieldTerminationNoticeDays holds the string denoting the termination_notice_days field in the database.
FieldTerminationNoticeDays = "termination_notice_days"
// FieldAnnualSpend holds the string denoting the annual_spend field in the database.
FieldAnnualSpend = "annual_spend"
// FieldSpendCurrency holds the string denoting the spend_currency field in the database.
FieldSpendCurrency = "spend_currency"
// FieldBillingModel holds the string denoting the billing_model field in the database.
FieldBillingModel = "billing_model"
// FieldRenewalRisk holds the string denoting the renewal_risk field in the database.
FieldRenewalRisk = "renewal_risk"
// FieldSSOEnforced holds the string denoting the sso_enforced field in the database.
FieldSSOEnforced = "sso_enforced"
// FieldMfaSupported holds the string denoting the mfa_supported field in the database.
FieldMfaSupported = "mfa_supported"
// FieldMfaEnforced holds the string denoting the mfa_enforced field in the database.
FieldMfaEnforced = "mfa_enforced"
// FieldStatusPageURL holds the string denoting the status_page_url field in the database.
FieldStatusPageURL = "status_page_url"
// FieldProvidedServices holds the string denoting the provided_services field in the database.
FieldProvidedServices = "provided_services"
// FieldLinks holds the string denoting the links field in the database.
FieldLinks = "links"
// FieldRiskRating holds the string denoting the risk_rating field in the database.
FieldRiskRating = "risk_rating"
// FieldRiskScore holds the string denoting the risk_score field in the database.
FieldRiskScore = "risk_score"
// FieldRiskScoreCoverage holds the string denoting the risk_score_coverage field in the database.
FieldRiskScoreCoverage = "risk_score_coverage"
// FieldTier holds the string denoting the tier field in the database.
FieldTier = "tier"
// FieldReviewFrequency holds the string denoting the review_frequency field in the database.
FieldReviewFrequency = "review_frequency"
// FieldNextReviewAt holds the string denoting the next_review_at field in the database.
FieldNextReviewAt = "next_review_at"
// FieldContractRenewalAt holds the string denoting the contract_renewal_at field in the database.
FieldContractRenewalAt = "contract_renewal_at"
// FieldVendorMetadata holds the string denoting the vendor_metadata field in the database.
FieldVendorMetadata = "vendor_metadata"
// FieldLogoRemoteURL holds the string denoting the logo_remote_url field in the database.
FieldLogoRemoteURL = "logo_remote_url"
// FieldLogoFileID holds the string denoting the logo_file_id field in the database.
FieldLogoFileID = "logo_file_id"
// FieldExternalID holds the string denoting the external_id field in the database.
FieldExternalID = "external_id"
// FieldObservedAt holds the string denoting the observed_at field in the database.
FieldObservedAt = "observed_at"
// EdgeOwner holds the string denoting the owner edge name in mutations.
EdgeOwner = "owner"
// EdgeBlockedGroups holds the string denoting the blocked_groups edge name in mutations.
EdgeBlockedGroups = "blocked_groups"
// EdgeEditors holds the string denoting the editors edge name in mutations.
EdgeEditors = "editors"
// EdgeViewers holds the string denoting the viewers edge name in mutations.
EdgeViewers = "viewers"
// EdgeInternalOwnerUser holds the string denoting the internal_owner_user edge name in mutations.
EdgeInternalOwnerUser = "internal_owner_user"
// EdgeInternalOwnerGroup holds the string denoting the internal_owner_group edge name in mutations.
EdgeInternalOwnerGroup = "internal_owner_group"
// EdgeReviewedByUser holds the string denoting the reviewed_by_user edge name in mutations.
EdgeReviewedByUser = "reviewed_by_user"
// EdgeReviewedByGroup holds the string denoting the reviewed_by_group edge name in mutations.
EdgeReviewedByGroup = "reviewed_by_group"
// EdgeEntityRelationshipState holds the string denoting the entity_relationship_state edge name in mutations.
EdgeEntityRelationshipState = "entity_relationship_state"
// EdgeEntitySecurityQuestionnaireStatus holds the string denoting the entity_security_questionnaire_status edge name in mutations.
EdgeEntitySecurityQuestionnaireStatus = "entity_security_questionnaire_status"
// EdgeEntitySourceType holds the string denoting the entity_source_type edge name in mutations.
EdgeEntitySourceType = "entity_source_type"
// EdgeEnvironment holds the string denoting the environment edge name in mutations.
EdgeEnvironment = "environment"
// EdgeScope holds the string denoting the scope edge name in mutations.
EdgeScope = "scope"
// EdgeContacts holds the string denoting the contacts edge name in mutations.
EdgeContacts = "contacts"
// EdgeDocuments holds the string denoting the documents edge name in mutations.
EdgeDocuments = "documents"
// EdgeNotes holds the string denoting the notes edge name in mutations.
EdgeNotes = "notes"
// EdgeFiles holds the string denoting the files edge name in mutations.
EdgeFiles = "files"
// EdgeAssets holds the string denoting the assets edge name in mutations.
EdgeAssets = "assets"
// EdgeScans holds the string denoting the scans edge name in mutations.
EdgeScans = "scans"
// EdgeCampaigns holds the string denoting the campaigns edge name in mutations.
EdgeCampaigns = "campaigns"
// EdgeAssessmentResponses holds the string denoting the assessment_responses edge name in mutations.
EdgeAssessmentResponses = "assessment_responses"
// EdgeVendorRiskScores holds the string denoting the vendor_risk_scores edge name in mutations.
EdgeVendorRiskScores = "vendor_risk_scores"
// EdgeIntegrations holds the string denoting the integrations edge name in mutations.
EdgeIntegrations = "integrations"
// EdgeSubprocessors holds the string denoting the subprocessors edge name in mutations.
EdgeSubprocessors = "subprocessors"
// EdgeAuthMethods holds the string denoting the auth_methods edge name in mutations.
EdgeAuthMethods = "auth_methods"
// EdgeEmployerIdentityHolders holds the string denoting the employer_identity_holders edge name in mutations.
EdgeEmployerIdentityHolders = "employer_identity_holders"
// EdgeIdentityHolders holds the string denoting the identity_holders edge name in mutations.
EdgeIdentityHolders = "identity_holders"
// EdgeControls holds the string denoting the controls edge name in mutations.
EdgeControls = "controls"
// EdgeSubcontrols holds the string denoting the subcontrols edge name in mutations.
EdgeSubcontrols = "subcontrols"
// EdgePlatforms holds the string denoting the platforms edge name in mutations.
EdgePlatforms = "platforms"
// EdgeOutOfScopePlatforms holds the string denoting the out_of_scope_platforms edge name in mutations.
EdgeOutOfScopePlatforms = "out_of_scope_platforms"
// EdgeSourcePlatforms holds the string denoting the source_platforms edge name in mutations.
EdgeSourcePlatforms = "source_platforms"
// EdgeEntityType holds the string denoting the entity_type edge name in mutations.
EdgeEntityType = "entity_type"
// EdgeLogoFile holds the string denoting the logo_file edge name in mutations.
EdgeLogoFile = "logo_file"
// EdgeInternalPolicies holds the string denoting the internal_policies edge name in mutations.
EdgeInternalPolicies = "internal_policies"
// Table holds the table name of the entity in the database.
Table = "entities"
// OwnerTable is the table that holds the owner relation/edge.
OwnerTable = "entities"
// OwnerInverseTable is the table name for the Organization entity.
// It exists in this package in order to avoid circular dependency with the "organization" package.
OwnerInverseTable = "organizations"
// OwnerColumn is the table column denoting the owner relation/edge.
OwnerColumn = "owner_id"
// BlockedGroupsTable is the table that holds the blocked_groups relation/edge. The primary key declared below.
BlockedGroupsTable = "entity_blocked_groups"
// BlockedGroupsInverseTable is the table name for the Group entity.
// It exists in this package in order to avoid circular dependency with the "group" package.
BlockedGroupsInverseTable = "groups"
// EditorsTable is the table that holds the editors relation/edge. The primary key declared below.
EditorsTable = "entity_editors"
// EditorsInverseTable is the table name for the Group entity.
// It exists in this package in order to avoid circular dependency with the "group" package.
EditorsInverseTable = "groups"
// ViewersTable is the table that holds the viewers relation/edge. The primary key declared below.
ViewersTable = "entity_viewers"
// ViewersInverseTable is the table name for the Group entity.
// It exists in this package in order to avoid circular dependency with the "group" package.
ViewersInverseTable = "groups"
// InternalOwnerUserTable is the table that holds the internal_owner_user relation/edge.
InternalOwnerUserTable = "entities"
// InternalOwnerUserInverseTable is the table name for the User entity.
// It exists in this package in order to avoid circular dependency with the "user" package.
InternalOwnerUserInverseTable = "users"
// InternalOwnerUserColumn is the table column denoting the internal_owner_user relation/edge.
InternalOwnerUserColumn = "internal_owner_user_id"
// InternalOwnerGroupTable is the table that holds the internal_owner_group relation/edge.
InternalOwnerGroupTable = "entities"
// InternalOwnerGroupInverseTable is the table name for the Group entity.
// It exists in this package in order to avoid circular dependency with the "group" package.
InternalOwnerGroupInverseTable = "groups"
// InternalOwnerGroupColumn is the table column denoting the internal_owner_group relation/edge.
InternalOwnerGroupColumn = "internal_owner_group_id"
// ReviewedByUserTable is the table that holds the reviewed_by_user relation/edge.
ReviewedByUserTable = "entities"
// ReviewedByUserInverseTable is the table name for the User entity.
// It exists in this package in order to avoid circular dependency with the "user" package.
ReviewedByUserInverseTable = "users"
// ReviewedByUserColumn is the table column denoting the reviewed_by_user relation/edge.
ReviewedByUserColumn = "reviewed_by_user_id"
// ReviewedByGroupTable is the table that holds the reviewed_by_group relation/edge.
ReviewedByGroupTable = "entities"
// ReviewedByGroupInverseTable is the table name for the Group entity.
// It exists in this package in order to avoid circular dependency with the "group" package.
ReviewedByGroupInverseTable = "groups"
// ReviewedByGroupColumn is the table column denoting the reviewed_by_group relation/edge.
ReviewedByGroupColumn = "reviewed_by_group_id"
// EntityRelationshipStateTable is the table that holds the entity_relationship_state relation/edge.
EntityRelationshipStateTable = "entities"
// EntityRelationshipStateInverseTable is the table name for the CustomTypeEnum entity.
// It exists in this package in order to avoid circular dependency with the "customtypeenum" package.
EntityRelationshipStateInverseTable = "custom_type_enums"
// EntityRelationshipStateColumn is the table column denoting the entity_relationship_state relation/edge.
EntityRelationshipStateColumn = "entity_relationship_state_id"
// EntitySecurityQuestionnaireStatusTable is the table that holds the entity_security_questionnaire_status relation/edge.
EntitySecurityQuestionnaireStatusTable = "entities"
// EntitySecurityQuestionnaireStatusInverseTable is the table name for the CustomTypeEnum entity.
// It exists in this package in order to avoid circular dependency with the "customtypeenum" package.
EntitySecurityQuestionnaireStatusInverseTable = "custom_type_enums"
// EntitySecurityQuestionnaireStatusColumn is the table column denoting the entity_security_questionnaire_status relation/edge.
EntitySecurityQuestionnaireStatusColumn = "entity_security_questionnaire_status_id"
// EntitySourceTypeTable is the table that holds the entity_source_type relation/edge.
EntitySourceTypeTable = "entities"
// EntitySourceTypeInverseTable is the table name for the CustomTypeEnum entity.
// It exists in this package in order to avoid circular dependency with the "customtypeenum" package.
EntitySourceTypeInverseTable = "custom_type_enums"
// EntitySourceTypeColumn is the table column denoting the entity_source_type relation/edge.
EntitySourceTypeColumn = "entity_source_type_id"
// EnvironmentTable is the table that holds the environment relation/edge.
EnvironmentTable = "entities"
// EnvironmentInverseTable is the table name for the CustomTypeEnum entity.
// It exists in this package in order to avoid circular dependency with the "customtypeenum" package.
EnvironmentInverseTable = "custom_type_enums"
// EnvironmentColumn is the table column denoting the environment relation/edge.
EnvironmentColumn = "environment_id"
// ScopeTable is the table that holds the scope relation/edge.
ScopeTable = "entities"
// ScopeInverseTable is the table name for the CustomTypeEnum entity.
// It exists in this package in order to avoid circular dependency with the "customtypeenum" package.
ScopeInverseTable = "custom_type_enums"
// ScopeColumn is the table column denoting the scope relation/edge.
ScopeColumn = "scope_id"
// ContactsTable is the table that holds the contacts relation/edge. The primary key declared below.
ContactsTable = "entity_contacts"
// ContactsInverseTable is the table name for the Contact entity.
// It exists in this package in order to avoid circular dependency with the "contact" package.
ContactsInverseTable = "contacts"
// DocumentsTable is the table that holds the documents relation/edge. The primary key declared below.
DocumentsTable = "entity_documents"
// DocumentsInverseTable is the table name for the DocumentData entity.
// It exists in this package in order to avoid circular dependency with the "documentdata" package.
DocumentsInverseTable = "document_data"
// NotesTable is the table that holds the notes relation/edge.
NotesTable = "notes"
// NotesInverseTable is the table name for the Note entity.
// It exists in this package in order to avoid circular dependency with the "note" package.
NotesInverseTable = "notes"
// NotesColumn is the table column denoting the notes relation/edge.
NotesColumn = "entity_notes"
// FilesTable is the table that holds the files relation/edge. The primary key declared below.
FilesTable = "entity_files"
// FilesInverseTable is the table name for the File entity.
// It exists in this package in order to avoid circular dependency with the "file" package.
FilesInverseTable = "files"
// AssetsTable is the table that holds the assets relation/edge. The primary key declared below.
AssetsTable = "entity_assets"
// AssetsInverseTable is the table name for the Asset entity.
// It exists in this package in order to avoid circular dependency with the "asset" package.
AssetsInverseTable = "assets"
// ScansTable is the table that holds the scans relation/edge.
ScansTable = "scans"
// ScansInverseTable is the table name for the Scan entity.
// It exists in this package in order to avoid circular dependency with the "scan" package.
ScansInverseTable = "scans"
// ScansColumn is the table column denoting the scans relation/edge.
ScansColumn = "entity_scans"
// CampaignsTable is the table that holds the campaigns relation/edge.
CampaignsTable = "campaigns"
// CampaignsInverseTable is the table name for the Campaign entity.
// It exists in this package in order to avoid circular dependency with the "campaign" package.
CampaignsInverseTable = "campaigns"
// CampaignsColumn is the table column denoting the campaigns relation/edge.
CampaignsColumn = "entity_id"
// AssessmentResponsesTable is the table that holds the assessment_responses relation/edge.
AssessmentResponsesTable = "assessment_responses"
// AssessmentResponsesInverseTable is the table name for the AssessmentResponse entity.
// It exists in this package in order to avoid circular dependency with the "assessmentresponse" package.
AssessmentResponsesInverseTable = "assessment_responses"
// AssessmentResponsesColumn is the table column denoting the assessment_responses relation/edge.
AssessmentResponsesColumn = "entity_id"
// VendorRiskScoresTable is the table that holds the vendor_risk_scores relation/edge.
VendorRiskScoresTable = "vendor_risk_scores"
// VendorRiskScoresInverseTable is the table name for the VendorRiskScore entity.
// It exists in this package in order to avoid circular dependency with the "vendorriskscore" package.
VendorRiskScoresInverseTable = "vendor_risk_scores"
// VendorRiskScoresColumn is the table column denoting the vendor_risk_scores relation/edge.
VendorRiskScoresColumn = "entity_vendor_risk_scores"
// IntegrationsTable is the table that holds the integrations relation/edge. The primary key declared below.
IntegrationsTable = "entity_integrations"
// IntegrationsInverseTable is the table name for the Integration entity.
// It exists in this package in order to avoid circular dependency with the "integration" package.
IntegrationsInverseTable = "integrations"
// SubprocessorsTable is the table that holds the subprocessors relation/edge. The primary key declared below.
SubprocessorsTable = "entity_subprocessors"
// SubprocessorsInverseTable is the table name for the Subprocessor entity.
// It exists in this package in order to avoid circular dependency with the "subprocessor" package.
SubprocessorsInverseTable = "subprocessors"
// AuthMethodsTable is the table that holds the auth_methods relation/edge.
AuthMethodsTable = "custom_type_enums"
// AuthMethodsInverseTable is the table name for the CustomTypeEnum entity.
// It exists in this package in order to avoid circular dependency with the "customtypeenum" package.
AuthMethodsInverseTable = "custom_type_enums"
// AuthMethodsColumn is the table column denoting the auth_methods relation/edge.
AuthMethodsColumn = "entity_auth_methods"
// EmployerIdentityHoldersTable is the table that holds the employer_identity_holders relation/edge.
EmployerIdentityHoldersTable = "identity_holders"
// EmployerIdentityHoldersInverseTable is the table name for the IdentityHolder entity.
// It exists in this package in order to avoid circular dependency with the "identityholder" package.
EmployerIdentityHoldersInverseTable = "identity_holders"
// EmployerIdentityHoldersColumn is the table column denoting the employer_identity_holders relation/edge.
EmployerIdentityHoldersColumn = "employer_entity_id"
// IdentityHoldersTable is the table that holds the identity_holders relation/edge. The primary key declared below.
IdentityHoldersTable = "identity_holder_entities"
// IdentityHoldersInverseTable is the table name for the IdentityHolder entity.
// It exists in this package in order to avoid circular dependency with the "identityholder" package.
IdentityHoldersInverseTable = "identity_holders"
// ControlsTable is the table that holds the controls relation/edge. The primary key declared below.
ControlsTable = "control_entities"
// ControlsInverseTable is the table name for the Control entity.
// It exists in this package in order to avoid circular dependency with the "control" package.
ControlsInverseTable = "controls"
// SubcontrolsTable is the table that holds the subcontrols relation/edge. The primary key declared below.
SubcontrolsTable = "subcontrol_entities"
// SubcontrolsInverseTable is the table name for the Subcontrol entity.
// It exists in this package in order to avoid circular dependency with the "subcontrol" package.
SubcontrolsInverseTable = "subcontrols"
// PlatformsTable is the table that holds the platforms relation/edge. The primary key declared below.
PlatformsTable = "platform_entities"
// PlatformsInverseTable is the table name for the Platform entity.
// It exists in this package in order to avoid circular dependency with the "platform" package.
PlatformsInverseTable = "platforms"
// OutOfScopePlatformsTable is the table that holds the out_of_scope_platforms relation/edge. The primary key declared below.
OutOfScopePlatformsTable = "platform_out_of_scope_vendors"
// OutOfScopePlatformsInverseTable is the table name for the Platform entity.
// It exists in this package in order to avoid circular dependency with the "platform" package.
OutOfScopePlatformsInverseTable = "platforms"
// SourcePlatformsTable is the table that holds the source_platforms relation/edge. The primary key declared below.
SourcePlatformsTable = "platform_source_entities"
// SourcePlatformsInverseTable is the table name for the Platform entity.
// It exists in this package in order to avoid circular dependency with the "platform" package.
SourcePlatformsInverseTable = "platforms"
// EntityTypeTable is the table that holds the entity_type relation/edge.
EntityTypeTable = "entities"
// EntityTypeInverseTable is the table name for the EntityType entity.
// It exists in this package in order to avoid circular dependency with the "entitytype" package.
EntityTypeInverseTable = "entity_types"
// EntityTypeColumn is the table column denoting the entity_type relation/edge.
EntityTypeColumn = "entity_type_id"
// LogoFileTable is the table that holds the logo_file relation/edge.
LogoFileTable = "entities"
// LogoFileInverseTable is the table name for the File entity.
// It exists in this package in order to avoid circular dependency with the "file" package.
LogoFileInverseTable = "files"
// LogoFileColumn is the table column denoting the logo_file relation/edge.
LogoFileColumn = "logo_file_id"
// InternalPoliciesTable is the table that holds the internal_policies relation/edge. The primary key declared below.
InternalPoliciesTable = "internal_policy_entities"
// InternalPoliciesInverseTable is the table name for the InternalPolicy entity.
// It exists in this package in order to avoid circular dependency with the "internalpolicy" package.
InternalPoliciesInverseTable = "internal_policies"
)
// Columns holds all SQL columns for entity fields.
var Columns = []string{
FieldID,
FieldCreatedAt,
FieldUpdatedAt,
FieldCreatedBy,
FieldUpdatedBy,
FieldDeletedAt,
FieldDeletedBy,
FieldTags,
FieldOwnerID,
FieldInternalOwner,
FieldInternalOwnerUserID,
FieldInternalOwnerGroupID,
FieldReviewedBy,
FieldReviewedByUserID,
FieldReviewedByGroupID,
FieldLastReviewedAt,
FieldSystemOwned,
FieldInternalNotes,
FieldSystemInternalID,
FieldEntityRelationshipStateName,
FieldEntityRelationshipStateID,
FieldEntitySecurityQuestionnaireStatusName,
FieldEntitySecurityQuestionnaireStatusID,
FieldEntitySourceTypeName,
FieldEntitySourceTypeID,
FieldEnvironmentName,
FieldEnvironmentID,
FieldScopeName,
FieldScopeID,
FieldName,
FieldDisplayName,
FieldDescription,
FieldDomains,
FieldEntityTypeID,
FieldStatus,
FieldApprovedForUse,
FieldLinkedAssetIds,
FieldHasSoc2,
FieldSoc2PeriodEnd,
FieldContractStartDate,
FieldContractEndDate,
FieldAutoRenews,
FieldTerminationNoticeDays,
FieldAnnualSpend,
FieldSpendCurrency,
FieldBillingModel,
FieldRenewalRisk,
FieldSSOEnforced,
FieldMfaSupported,
FieldMfaEnforced,
FieldStatusPageURL,
FieldProvidedServices,
FieldLinks,
FieldRiskRating,
FieldRiskScore,
FieldRiskScoreCoverage,
FieldTier,
FieldReviewFrequency,
FieldNextReviewAt,
FieldContractRenewalAt,
FieldVendorMetadata,
FieldLogoRemoteURL,
FieldLogoFileID,
FieldExternalID,
FieldObservedAt,
}
// ForeignKeys holds the SQL foreign-keys that are owned by the "entities"
// table and are not defined as standalone fields in the schema.
var ForeignKeys = []string{
"entity_type_entities",
"finding_entities",
"remediation_entities",
"review_entities",
"risk_entities",
"scan_entities",
"vulnerability_entities",
}
var (
// BlockedGroupsPrimaryKey and BlockedGroupsColumn2 are the table columns denoting the
// primary key for the blocked_groups relation (M2M).
BlockedGroupsPrimaryKey = []string{"entity_id", "group_id"}
// EditorsPrimaryKey and EditorsColumn2 are the table columns denoting the
// primary key for the editors relation (M2M).
EditorsPrimaryKey = []string{"entity_id", "group_id"}
// ViewersPrimaryKey and ViewersColumn2 are the table columns denoting the
// primary key for the viewers relation (M2M).
ViewersPrimaryKey = []string{"entity_id", "group_id"}
// ContactsPrimaryKey and ContactsColumn2 are the table columns denoting the
// primary key for the contacts relation (M2M).
ContactsPrimaryKey = []string{"entity_id", "contact_id"}
// DocumentsPrimaryKey and DocumentsColumn2 are the table columns denoting the
// primary key for the documents relation (M2M).
DocumentsPrimaryKey = []string{"entity_id", "document_data_id"}
// FilesPrimaryKey and FilesColumn2 are the table columns denoting the
// primary key for the files relation (M2M).
FilesPrimaryKey = []string{"entity_id", "file_id"}
// AssetsPrimaryKey and AssetsColumn2 are the table columns denoting the
// primary key for the assets relation (M2M).
AssetsPrimaryKey = []string{"entity_id", "asset_id"}
// IntegrationsPrimaryKey and IntegrationsColumn2 are the table columns denoting the
// primary key for the integrations relation (M2M).
IntegrationsPrimaryKey = []string{"entity_id", "integration_id"}
// SubprocessorsPrimaryKey and SubprocessorsColumn2 are the table columns denoting the
// primary key for the subprocessors relation (M2M).
SubprocessorsPrimaryKey = []string{"entity_id", "subprocessor_id"}
// IdentityHoldersPrimaryKey and IdentityHoldersColumn2 are the table columns denoting the
// primary key for the identity_holders relation (M2M).
IdentityHoldersPrimaryKey = []string{"identity_holder_id", "entity_id"}
// ControlsPrimaryKey and ControlsColumn2 are the table columns denoting the
// primary key for the controls relation (M2M).
ControlsPrimaryKey = []string{"control_id", "entity_id"}
// SubcontrolsPrimaryKey and SubcontrolsColumn2 are the table columns denoting the
// primary key for the subcontrols relation (M2M).
SubcontrolsPrimaryKey = []string{"subcontrol_id", "entity_id"}
// PlatformsPrimaryKey and PlatformsColumn2 are the table columns denoting the
// primary key for the platforms relation (M2M).
PlatformsPrimaryKey = []string{"platform_id", "entity_id"}
// OutOfScopePlatformsPrimaryKey and OutOfScopePlatformsColumn2 are the table columns denoting the
// primary key for the out_of_scope_platforms relation (M2M).
OutOfScopePlatformsPrimaryKey = []string{"platform_id", "entity_id"}
// SourcePlatformsPrimaryKey and SourcePlatformsColumn2 are the table columns denoting the
// primary key for the source_platforms relation (M2M).
SourcePlatformsPrimaryKey = []string{"platform_id", "entity_id"}
// InternalPoliciesPrimaryKey and InternalPoliciesColumn2 are the table columns denoting the
// primary key for the internal_policies relation (M2M).
InternalPoliciesPrimaryKey = []string{"internal_policy_id", "entity_id"}
)
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
for i := range ForeignKeys {
if column == ForeignKeys[i] {
return true
}
}
return false
}
// Note that the variables below are initialized by the runtime
// package on the initialization of the application. Therefore,
// it should be imported in the main as follows:
//
// import _ "github.com/theopenlane/core/internal/ent/generated/runtime"
var (
Hooks [20]ent.Hook
Interceptors [3]ent.Interceptor
Policy ent.Policy
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
DefaultCreatedAt func() time.Time
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
DefaultUpdatedAt func() time.Time
// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
UpdateDefaultUpdatedAt func() time.Time
// DefaultTags holds the default value on creation for the "tags" field.
DefaultTags []string
// OwnerIDValidator is a validator for the "owner_id" field. It is called by the builders before save.
OwnerIDValidator func(string) error
// DefaultSystemOwned holds the default value on creation for the "system_owned" field.
DefaultSystemOwned bool
// NameValidator is a validator for the "name" field. It is called by the builders before save.
NameValidator func(string) error
// DisplayNameValidator is a validator for the "display_name" field. It is called by the builders before save.
DisplayNameValidator func(string) error
// DomainsValidator is a validator for the "domains" field. It is called by the builders before save.
DomainsValidator func([]string) error
// DefaultApprovedForUse holds the default value on creation for the "approved_for_use" field.
DefaultApprovedForUse bool
// DefaultLinkedAssetIds holds the default value on creation for the "linked_asset_ids" field.
DefaultLinkedAssetIds []string
// DefaultHasSoc2 holds the default value on creation for the "has_soc2" field.
DefaultHasSoc2 bool
// DefaultAutoRenews holds the default value on creation for the "auto_renews" field.
DefaultAutoRenews bool
// DefaultSpendCurrency holds the default value on creation for the "spend_currency" field.
DefaultSpendCurrency string
// DefaultSSOEnforced holds the default value on creation for the "sso_enforced" field.
DefaultSSOEnforced bool
// DefaultMfaSupported holds the default value on creation for the "mfa_supported" field.
DefaultMfaSupported bool
// DefaultMfaEnforced holds the default value on creation for the "mfa_enforced" field.
DefaultMfaEnforced bool
// StatusPageURLValidator is a validator for the "status_page_url" field. It is called by the builders before save.
StatusPageURLValidator func(string) error
// DefaultProvidedServices holds the default value on creation for the "provided_services" field.
DefaultProvidedServices []string
// DefaultLinks holds the default value on creation for the "links" field.
DefaultLinks []string
// LinksValidator is a validator for the "links" field. It is called by the builders before save.
LinksValidator func([]string) error
// LogoRemoteURLValidator is a validator for the "logo_remote_url" field. It is called by the builders before save.
LogoRemoteURLValidator func(string) error
// DefaultID holds the default value on creation for the "id" field.
DefaultID func() string
)
const DefaultStatus enums.EntityStatus = "ACTIVE"
// StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
func StatusValidator(s enums.EntityStatus) error {
switch s.String() {
case "DRAFT", "UNDER_REVIEW", "APPROVED", "RESTRICTED", "REJECTED", "ACTIVE", "SUSPENDED", "OFFBOARDING", "TERMINATED":
return nil
default:
return fmt.Errorf("entity: invalid enum value for status field: %q", s)
}
}
const DefaultTier enums.VendorTier = "LOW"
// TierValidator is a validator for the "tier" field enum values. It is called by the builders before save.
func TierValidator(t enums.VendorTier) error {
switch t.String() {
case "CRITICAL", "HIGH", "STANDARD", "LOW":
return nil
default:
return fmt.Errorf("entity: invalid enum value for tier field: %q", t)
}
}
const DefaultReviewFrequency enums.Frequency = "YEARLY"
// ReviewFrequencyValidator is a validator for the "review_frequency" field enum values. It is called by the builders before save.
func ReviewFrequencyValidator(rf enums.Frequency) error {
switch rf.String() {
case "YEARLY", "QUARTERLY", "BIANNUALLY", "MONTHLY", "NONE":
return nil
default:
return fmt.Errorf("entity: invalid enum value for review_frequency field: %q", rf)
}
}
// OrderOption defines the ordering options for the Entity queries.
type OrderOption func(*sql.Selector)
// ByID orders the results by the id field.
func ByID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldID, opts...).ToFunc()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
// ByUpdatedAt orders the results by the updated_at field.
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
}
// ByCreatedBy orders the results by the created_by field.
func ByCreatedBy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedBy, opts...).ToFunc()
}
// ByUpdatedBy orders the results by the updated_by field.
func ByUpdatedBy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUpdatedBy, opts...).ToFunc()
}
// ByDeletedAt orders the results by the deleted_at field.
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
}
// ByDeletedBy orders the results by the deleted_by field.
func ByDeletedBy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDeletedBy, opts...).ToFunc()
}
// ByOwnerID orders the results by the owner_id field.
func ByOwnerID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOwnerID, opts...).ToFunc()
}
// ByInternalOwner orders the results by the internal_owner field.
func ByInternalOwner(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldInternalOwner, opts...).ToFunc()
}
// ByInternalOwnerUserID orders the results by the internal_owner_user_id field.
func ByInternalOwnerUserID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldInternalOwnerUserID, opts...).ToFunc()
}
// ByInternalOwnerGroupID orders the results by the internal_owner_group_id field.
func ByInternalOwnerGroupID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldInternalOwnerGroupID, opts...).ToFunc()
}
// ByReviewedBy orders the results by the reviewed_by field.
func ByReviewedBy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldReviewedBy, opts...).ToFunc()
}
// ByReviewedByUserID orders the results by the reviewed_by_user_id field.
func ByReviewedByUserID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldReviewedByUserID, opts...).ToFunc()
}
// ByReviewedByGroupID orders the results by the reviewed_by_group_id field.
func ByReviewedByGroupID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldReviewedByGroupID, opts...).ToFunc()
}
// ByLastReviewedAt orders the results by the last_reviewed_at field.
func ByLastReviewedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLastReviewedAt, opts...).ToFunc()
}
// BySystemOwned orders the results by the system_owned field.
func BySystemOwned(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSystemOwned, opts...).ToFunc()
}
// ByInternalNotes orders the results by the internal_notes field.
func ByInternalNotes(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldInternalNotes, opts...).ToFunc()
}
// BySystemInternalID orders the results by the system_internal_id field.
func BySystemInternalID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSystemInternalID, opts...).ToFunc()
}
// ByEntityRelationshipStateName orders the results by the entity_relationship_state_name field.
func ByEntityRelationshipStateName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEntityRelationshipStateName, opts...).ToFunc()
}
// ByEntityRelationshipStateID orders the results by the entity_relationship_state_id field.
func ByEntityRelationshipStateID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEntityRelationshipStateID, opts...).ToFunc()
}
// ByEntitySecurityQuestionnaireStatusName orders the results by the entity_security_questionnaire_status_name field.
func ByEntitySecurityQuestionnaireStatusName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEntitySecurityQuestionnaireStatusName, opts...).ToFunc()
}
// ByEntitySecurityQuestionnaireStatusID orders the results by the entity_security_questionnaire_status_id field.
func ByEntitySecurityQuestionnaireStatusID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEntitySecurityQuestionnaireStatusID, opts...).ToFunc()
}
// ByEntitySourceTypeName orders the results by the entity_source_type_name field.
func ByEntitySourceTypeName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEntitySourceTypeName, opts...).ToFunc()
}
// ByEntitySourceTypeID orders the results by the entity_source_type_id field.
func ByEntitySourceTypeID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEntitySourceTypeID, opts...).ToFunc()
}
// ByEnvironmentName orders the results by the environment_name field.
func ByEnvironmentName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEnvironmentName, opts...).ToFunc()
}
// ByEnvironmentID orders the results by the environment_id field.
func ByEnvironmentID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEnvironmentID, opts...).ToFunc()
}
// ByScopeName orders the results by the scope_name field.
func ByScopeName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldScopeName, opts...).ToFunc()
}
// ByScopeID orders the results by the scope_id field.
func ByScopeID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldScopeID, opts...).ToFunc()
}
// ByName orders the results by the name field.
func ByName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldName, opts...).ToFunc()
}
// ByDisplayName orders the results by the display_name field.
func ByDisplayName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDisplayName, opts...).ToFunc()
}
// ByDescription orders the results by the description field.
func ByDescription(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDescription, opts...).ToFunc()
}
// ByEntityTypeID orders the results by the entity_type_id field.
func ByEntityTypeID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEntityTypeID, opts...).ToFunc()
}
// ByStatus orders the results by the status field.
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStatus, opts...).ToFunc()
}
// ByApprovedForUse orders the results by the approved_for_use field.
func ByApprovedForUse(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldApprovedForUse, opts...).ToFunc()
}
// ByHasSoc2 orders the results by the has_soc2 field.
func ByHasSoc2(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldHasSoc2, opts...).ToFunc()
}
// BySoc2PeriodEnd orders the results by the soc2_period_end field.
func BySoc2PeriodEnd(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSoc2PeriodEnd, opts...).ToFunc()
}
// ByContractStartDate orders the results by the contract_start_date field.
func ByContractStartDate(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldContractStartDate, opts...).ToFunc()
}
// ByContractEndDate orders the results by the contract_end_date field.
func ByContractEndDate(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldContractEndDate, opts...).ToFunc()
}
// ByAutoRenews orders the results by the auto_renews field.
func ByAutoRenews(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAutoRenews, opts...).ToFunc()
}
// ByTerminationNoticeDays orders the results by the termination_notice_days field.
func ByTerminationNoticeDays(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTerminationNoticeDays, opts...).ToFunc()
}
// ByAnnualSpend orders the results by the annual_spend field.
func ByAnnualSpend(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAnnualSpend, opts...).ToFunc()
}
// BySpendCurrency orders the results by the spend_currency field.
func BySpendCurrency(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSpendCurrency, opts...).ToFunc()
}
// ByBillingModel orders the results by the billing_model field.
func ByBillingModel(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBillingModel, opts...).ToFunc()
}
// ByRenewalRisk orders the results by the renewal_risk field.
func ByRenewalRisk(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRenewalRisk, opts...).ToFunc()
}
// BySSOEnforced orders the results by the sso_enforced field.
func BySSOEnforced(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSSOEnforced, opts...).ToFunc()
}
// ByMfaSupported orders the results by the mfa_supported field.
func ByMfaSupported(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMfaSupported, opts...).ToFunc()
}
// ByMfaEnforced orders the results by the mfa_enforced field.
func ByMfaEnforced(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMfaEnforced, opts...).ToFunc()
}
// ByStatusPageURL orders the results by the status_page_url field.
func ByStatusPageURL(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStatusPageURL, opts...).ToFunc()
}
// ByRiskRating orders the results by the risk_rating field.
func ByRiskRating(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRiskRating, opts...).ToFunc()
}
// ByRiskScore orders the results by the risk_score field.
func ByRiskScore(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRiskScore, opts...).ToFunc()
}
// ByRiskScoreCoverage orders the results by the risk_score_coverage field.
func ByRiskScoreCoverage(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRiskScoreCoverage, opts...).ToFunc()
}
// ByTier orders the results by the tier field.
func ByTier(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTier, opts...).ToFunc()
}
// ByReviewFrequency orders the results by the review_frequency field.
func ByReviewFrequency(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldReviewFrequency, opts...).ToFunc()
}
// ByNextReviewAt orders the results by the next_review_at field.
func ByNextReviewAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldNextReviewAt, opts...).ToFunc()
}
// ByContractRenewalAt orders the results by the contract_renewal_at field.
func ByContractRenewalAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldContractRenewalAt, opts...).ToFunc()
}
// ByLogoRemoteURL orders the results by the logo_remote_url field.
func ByLogoRemoteURL(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLogoRemoteURL, opts...).ToFunc()
}
// ByLogoFileID orders the results by the logo_file_id field.
func ByLogoFileID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLogoFileID, opts...).ToFunc()
}
// ByExternalID orders the results by the external_id field.
func ByExternalID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldExternalID, opts...).ToFunc()
}
// ByObservedAt orders the results by the observed_at field.
func ByObservedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldObservedAt, opts...).ToFunc()
}
// ByOwnerField orders the results by owner field.
func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newOwnerStep(), sql.OrderByField(field, opts...))
}
}
// ByBlockedGroupsCount orders the results by blocked_groups count.
func ByBlockedGroupsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newBlockedGroupsStep(), opts...)
}
}
// ByBlockedGroups orders the results by blocked_groups terms.
func ByBlockedGroups(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newBlockedGroupsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByEditorsCount orders the results by editors count.
func ByEditorsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newEditorsStep(), opts...)
}
}