Documentation
¶
Index ¶
- Variables
- func Create(ctx context.Context, s *Schema, tables []*schema.Table, ...) error
- func Diff(ctx context.Context, url string, opts ...schema.MigrateOption) error
- func NamedDiff(ctx context.Context, url, name string, opts ...schema.MigrateOption) error
- type Schema
- func (s *Schema) Create(ctx context.Context, opts ...schema.MigrateOption) error
- func (s *Schema) Diff(ctx context.Context, opts ...schema.MigrateOption) error
- func (s *Schema) NamedDiff(ctx context.Context, name string, opts ...schema.MigrateOption) error
- func (s *Schema) WriteTo(ctx context.Context, w io.Writer, opts ...schema.MigrateOption) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // WithGlobalUniqueID sets the universal ids options to the migration. // If this option is enabled, ent migration will allocate a 1<<32 range // for the ids of each entity (table). // Note that this option cannot be applied on tables that already exist. WithGlobalUniqueID = schema.WithGlobalUniqueID // WithDropColumn sets the drop column option to the migration. // If this option is enabled, ent migration will drop old columns // that were used for both fields and edges. This defaults to false. WithDropColumn = schema.WithDropColumn // WithDropIndex sets the drop index option to the migration. // If this option is enabled, ent migration will drop old indexes // that were defined in the schema. This defaults to false. // Note that unique constraints are defined using `UNIQUE INDEX`, // and therefore, it's recommended to enable this option to get more // flexibility in the schema changes. WithDropIndex = schema.WithDropIndex // WithForeignKeys enables creating foreign-key in schema DDL. This defaults to true. WithForeignKeys = schema.WithForeignKeys )
View Source
var ( // APITokensColumns holds the columns for the "api_tokens" table. APITokensColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "token", Type: field.TypeString, Unique: true}, {Name: "expires_at", Type: field.TypeTime, Nullable: true}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "scopes", Type: field.TypeJSON, Nullable: true}, {Name: "last_used_at", Type: field.TypeTime, Nullable: true}, {Name: "is_active", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "revoked_reason", Type: field.TypeString, Nullable: true}, {Name: "revoked_by", Type: field.TypeString, Nullable: true}, {Name: "revoked_at", Type: field.TypeTime, Nullable: true}, {Name: "sso_authorizations", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // APITokensTable holds the schema information for the "api_tokens" table. APITokensTable = &schema.Table{ Name: "api_tokens", Columns: APITokensColumns, PrimaryKey: []*schema.Column{APITokensColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "api_tokens_organizations_api_tokens", Columns: []*schema.Column{APITokensColumns[19]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "apitoken_owner_id", Unique: false, Columns: []*schema.Column{APITokensColumns[19]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "apitoken_token", Unique: false, Columns: []*schema.Column{APITokensColumns[9]}, }, }, } // ActionPlansColumns holds the columns for the "action_plans" table. ActionPlansColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "revision", Type: field.TypeString, Nullable: true, Default: "v0.0.1"}, {Name: "name", Type: field.TypeString}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PUBLISHED", "DRAFT", "NEEDS_APPROVAL", "APPROVED", "ARCHIVED"}, Default: "DRAFT"}, {Name: "action_plan_type", Type: field.TypeString, Nullable: true}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "approval_required", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "review_due", Type: field.TypeTime, Nullable: true}, {Name: "review_frequency", Type: field.TypeEnum, Nullable: true, Enums: []string{"YEARLY", "QUARTERLY", "BIANNUALLY", "MONTHLY"}, Default: "YEARLY"}, {Name: "summary", Type: field.TypeString, Nullable: true}, {Name: "tag_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_tag_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "control_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_control_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "improvement_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_improvement_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "url", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "action_plan_kind_name", Type: field.TypeString, Nullable: true}, {Name: "title", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "due_date", Type: field.TypeTime, Nullable: true}, {Name: "completed_at", Type: field.TypeTime, Nullable: true}, {Name: "priority", Type: field.TypeEnum, Nullable: true, Enums: []string{"LOW", "MEDIUM", "HIGH", "CRITICAL"}}, {Name: "requires_approval", Type: field.TypeBool, Default: false}, {Name: "blocked", Type: field.TypeBool, Default: false}, {Name: "blocker_reason", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "raw_payload", Type: field.TypeJSON, Nullable: true}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "approver_id", Type: field.TypeString, Nullable: true}, {Name: "delegate_id", Type: field.TypeString, Nullable: true}, {Name: "action_plan_kind_id", Type: field.TypeString, Nullable: true}, {Name: "file_id", Type: field.TypeString, Nullable: true}, {Name: "custom_type_enum_action_plans", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "subcontrol_action_plans", Type: field.TypeString, Nullable: true}, {Name: "user_action_plans", Type: field.TypeString, Nullable: true}, } // ActionPlansTable holds the schema information for the "action_plans" table. ActionPlansTable = &schema.Table{ Name: "action_plans", Columns: ActionPlansColumns, PrimaryKey: []*schema.Column{ActionPlansColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "action_plans_groups_approver", Columns: []*schema.Column{ActionPlansColumns[39]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "action_plans_groups_delegate", Columns: []*schema.Column{ActionPlansColumns[40]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "action_plans_custom_type_enums_action_plan_kind", Columns: []*schema.Column{ActionPlansColumns[41]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "action_plans_files_file", Columns: []*schema.Column{ActionPlansColumns[42]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "action_plans_custom_type_enums_action_plans", Columns: []*schema.Column{ActionPlansColumns[43]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "action_plans_organizations_action_plans", Columns: []*schema.Column{ActionPlansColumns[44]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "action_plans_subcontrols_action_plans", Columns: []*schema.Column{ActionPlansColumns[45]}, RefColumns: []*schema.Column{SubcontrolsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "action_plans_users_action_plans", Columns: []*schema.Column{ActionPlansColumns[46]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "actionplan_owner_id", Unique: false, Columns: []*schema.Column{ActionPlansColumns[44]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // ActionPlanHistoryColumns holds the columns for the "action_plan_history" table. ActionPlanHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "revision", Type: field.TypeString, Nullable: true, Default: "v0.0.1"}, {Name: "name", Type: field.TypeString}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PUBLISHED", "DRAFT", "NEEDS_APPROVAL", "APPROVED", "ARCHIVED"}, Default: "DRAFT"}, {Name: "action_plan_type", Type: field.TypeString, Nullable: true}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "approval_required", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "review_due", Type: field.TypeTime, Nullable: true}, {Name: "review_frequency", Type: field.TypeEnum, Nullable: true, Enums: []string{"YEARLY", "QUARTERLY", "BIANNUALLY", "MONTHLY"}, Default: "YEARLY"}, {Name: "approver_id", Type: field.TypeString, Nullable: true}, {Name: "delegate_id", Type: field.TypeString, Nullable: true}, {Name: "summary", Type: field.TypeString, Nullable: true}, {Name: "tag_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_tag_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "control_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_control_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "improvement_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_improvement_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "url", Type: field.TypeString, Nullable: true}, {Name: "file_id", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "action_plan_kind_name", Type: field.TypeString, Nullable: true}, {Name: "action_plan_kind_id", Type: field.TypeString, Nullable: true}, {Name: "title", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "due_date", Type: field.TypeTime, Nullable: true}, {Name: "completed_at", Type: field.TypeTime, Nullable: true}, {Name: "priority", Type: field.TypeEnum, Nullable: true, Enums: []string{"LOW", "MEDIUM", "HIGH", "CRITICAL"}}, {Name: "requires_approval", Type: field.TypeBool, Default: false}, {Name: "blocked", Type: field.TypeBool, Default: false}, {Name: "blocker_reason", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "raw_payload", Type: field.TypeJSON, Nullable: true}, {Name: "source", Type: field.TypeString, Nullable: true}, } // ActionPlanHistoryTable holds the schema information for the "action_plan_history" table. ActionPlanHistoryTable = &schema.Table{ Name: "action_plan_history", Columns: ActionPlanHistoryColumns, PrimaryKey: []*schema.Column{ActionPlanHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "actionplanhistory_history_time", Unique: false, Columns: []*schema.Column{ActionPlanHistoryColumns[1]}, }, }, } // AssessmentsColumns holds the columns for the "assessments" table. AssessmentsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "assessment_type", Type: field.TypeEnum, Enums: []string{"INTERNAL", "EXTERNAL"}, Default: "INTERNAL"}, {Name: "jsonconfig", Type: field.TypeJSON, Nullable: true}, {Name: "uischema", Type: field.TypeJSON, Nullable: true}, {Name: "response_due_duration", Type: field.TypeInt64, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "template_id", Type: field.TypeString, Nullable: true}, } // AssessmentsTable holds the schema information for the "assessments" table. AssessmentsTable = &schema.Table{ Name: "assessments", Columns: AssessmentsColumns, PrimaryKey: []*schema.Column{AssessmentsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "assessments_organizations_assessments", Columns: []*schema.Column{AssessmentsColumns[13]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "assessments_templates_assessments", Columns: []*schema.Column{AssessmentsColumns[14]}, RefColumns: []*schema.Column{TemplatesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "assessment_owner_id", Unique: false, Columns: []*schema.Column{AssessmentsColumns[13]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "assessment_name_owner_id", Unique: true, Columns: []*schema.Column{AssessmentsColumns[8], AssessmentsColumns[13]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // AssessmentHistoryColumns holds the columns for the "assessment_history" table. AssessmentHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "assessment_type", Type: field.TypeEnum, Enums: []string{"INTERNAL", "EXTERNAL"}, Default: "INTERNAL"}, {Name: "template_id", Type: field.TypeString, Nullable: true}, {Name: "jsonconfig", Type: field.TypeJSON, Nullable: true}, {Name: "uischema", Type: field.TypeJSON, Nullable: true}, {Name: "response_due_duration", Type: field.TypeInt64, Nullable: true}, } // AssessmentHistoryTable holds the schema information for the "assessment_history" table. AssessmentHistoryTable = &schema.Table{ Name: "assessment_history", Columns: AssessmentHistoryColumns, PrimaryKey: []*schema.Column{AssessmentHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "assessmenthistory_history_time", Unique: false, Columns: []*schema.Column{AssessmentHistoryColumns[1]}, }, }, } // AssessmentResponsesColumns holds the columns for the "assessment_responses" table. AssessmentResponsesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "email", Type: field.TypeString}, {Name: "send_attempts", Type: field.TypeInt, Default: 1}, {Name: "status", Type: field.TypeEnum, Enums: []string{"NOT_STARTED", "SENT", "COMPLETED", "OVERDUE"}, Default: "SENT"}, {Name: "assigned_at", Type: field.TypeTime}, {Name: "started_at", Type: field.TypeTime}, {Name: "completed_at", Type: field.TypeTime, Nullable: true}, {Name: "due_date", Type: field.TypeTime, Nullable: true}, {Name: "assessment_id", Type: field.TypeString}, {Name: "document_data_id", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // AssessmentResponsesTable holds the schema information for the "assessment_responses" table. AssessmentResponsesTable = &schema.Table{ Name: "assessment_responses", Columns: AssessmentResponsesColumns, PrimaryKey: []*schema.Column{AssessmentResponsesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "assessment_responses_assessments_assessment_responses", Columns: []*schema.Column{AssessmentResponsesColumns[14]}, RefColumns: []*schema.Column{AssessmentsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "assessment_responses_document_data_document", Columns: []*schema.Column{AssessmentResponsesColumns[15]}, RefColumns: []*schema.Column{DocumentDataColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "assessment_responses_organizations_assessment_responses", Columns: []*schema.Column{AssessmentResponsesColumns[16]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "assessmentresponse_owner_id", Unique: false, Columns: []*schema.Column{AssessmentResponsesColumns[16]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "assessmentresponse_assessment_id_email", Unique: true, Columns: []*schema.Column{AssessmentResponsesColumns[14], AssessmentResponsesColumns[7]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "assessmentresponse_status", Unique: false, Columns: []*schema.Column{AssessmentResponsesColumns[9]}, }, { Name: "assessmentresponse_due_date", Unique: false, Columns: []*schema.Column{AssessmentResponsesColumns[13]}, }, { Name: "assessmentresponse_assigned_at", Unique: false, Columns: []*schema.Column{AssessmentResponsesColumns[10]}, }, { Name: "assessmentresponse_completed_at", Unique: false, Columns: []*schema.Column{AssessmentResponsesColumns[12]}, }, }, } // AssessmentResponseHistoryColumns holds the columns for the "assessment_response_history" table. AssessmentResponseHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "assessment_id", Type: field.TypeString}, {Name: "email", Type: field.TypeString}, {Name: "send_attempts", Type: field.TypeInt, Default: 1}, {Name: "status", Type: field.TypeEnum, Enums: []string{"NOT_STARTED", "SENT", "COMPLETED", "OVERDUE"}, Default: "SENT"}, {Name: "assigned_at", Type: field.TypeTime}, {Name: "started_at", Type: field.TypeTime}, {Name: "completed_at", Type: field.TypeTime, Nullable: true}, {Name: "due_date", Type: field.TypeTime, Nullable: true}, {Name: "document_data_id", Type: field.TypeString, Nullable: true}, } // AssessmentResponseHistoryTable holds the schema information for the "assessment_response_history" table. AssessmentResponseHistoryTable = &schema.Table{ Name: "assessment_response_history", Columns: AssessmentResponseHistoryColumns, PrimaryKey: []*schema.Column{AssessmentResponseHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "assessmentresponsehistory_history_time", Unique: false, Columns: []*schema.Column{AssessmentResponseHistoryColumns[1]}, }, }, } // AssetsColumns holds the columns for the "assets" table. AssetsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "asset_type", Type: field.TypeEnum, Enums: []string{"TECHNOLOGY", "DOMAIN", "DEVICE", "TELEPHONE"}, Default: "TECHNOLOGY"}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "identifier", Type: field.TypeString, Nullable: true}, {Name: "website", Type: field.TypeString, Nullable: true}, {Name: "cpe", Type: field.TypeString, Nullable: true}, {Name: "categories", Type: field.TypeJSON, Nullable: true}, {Name: "finding_assets", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "remediation_assets", Type: field.TypeString, Nullable: true}, {Name: "review_assets", Type: field.TypeString, Nullable: true}, {Name: "risk_assets", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_assets", Type: field.TypeString, Nullable: true}, } // AssetsTable holds the schema information for the "assets" table. AssetsTable = &schema.Table{ Name: "assets", Columns: AssetsColumns, PrimaryKey: []*schema.Column{AssetsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "assets_findings_assets", Columns: []*schema.Column{AssetsColumns[18]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "assets_organizations_assets", Columns: []*schema.Column{AssetsColumns[19]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "assets_remediations_assets", Columns: []*schema.Column{AssetsColumns[20]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "assets_reviews_assets", Columns: []*schema.Column{AssetsColumns[21]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "assets_risks_assets", Columns: []*schema.Column{AssetsColumns[22]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "assets_vulnerabilities_assets", Columns: []*schema.Column{AssetsColumns[23]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "asset_owner_id", Unique: false, Columns: []*schema.Column{AssetsColumns[19]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "asset_name_owner_id", Unique: true, Columns: []*schema.Column{AssetsColumns[12], AssetsColumns[19]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // AssetHistoryColumns holds the columns for the "asset_history" table. AssetHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "asset_type", Type: field.TypeEnum, Enums: []string{"TECHNOLOGY", "DOMAIN", "DEVICE", "TELEPHONE"}, Default: "TECHNOLOGY"}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "identifier", Type: field.TypeString, Nullable: true}, {Name: "website", Type: field.TypeString, Nullable: true}, {Name: "cpe", Type: field.TypeString, Nullable: true}, {Name: "categories", Type: field.TypeJSON, Nullable: true}, } // AssetHistoryTable holds the schema information for the "asset_history" table. AssetHistoryTable = &schema.Table{ Name: "asset_history", Columns: AssetHistoryColumns, PrimaryKey: []*schema.Column{AssetHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "assethistory_history_time", Unique: false, Columns: []*schema.Column{AssetHistoryColumns[1]}, }, }, } // ContactsColumns holds the columns for the "contacts" table. ContactsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "full_name", Type: field.TypeString, Size: 64}, {Name: "title", Type: field.TypeString, Nullable: true}, {Name: "company", Type: field.TypeString, Nullable: true}, {Name: "email", Type: field.TypeString, Nullable: true}, {Name: "phone_number", Type: field.TypeString, Nullable: true}, {Name: "address", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"ACTIVE", "INACTIVE", "DEACTIVATED", "SUSPENDED", "ONBOARDING"}, Default: "ACTIVE"}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // ContactsTable holds the schema information for the "contacts" table. ContactsTable = &schema.Table{ Name: "contacts", Columns: ContactsColumns, PrimaryKey: []*schema.Column{ContactsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "contacts_organizations_contacts", Columns: []*schema.Column{ContactsColumns[15]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "contact_owner_id", Unique: false, Columns: []*schema.Column{ContactsColumns[15]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // ContactHistoryColumns holds the columns for the "contact_history" table. ContactHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "full_name", Type: field.TypeString, Size: 64}, {Name: "title", Type: field.TypeString, Nullable: true}, {Name: "company", Type: field.TypeString, Nullable: true}, {Name: "email", Type: field.TypeString, Nullable: true}, {Name: "phone_number", Type: field.TypeString, Nullable: true}, {Name: "address", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"ACTIVE", "INACTIVE", "DEACTIVATED", "SUSPENDED", "ONBOARDING"}, Default: "ACTIVE"}, } // ContactHistoryTable holds the schema information for the "contact_history" table. ContactHistoryTable = &schema.Table{ Name: "contact_history", Columns: ContactHistoryColumns, PrimaryKey: []*schema.Column{ContactHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "contacthistory_history_time", Unique: false, Columns: []*schema.Column{ContactHistoryColumns[1]}, }, }, } // ControlsColumns holds the columns for the "controls" table. ControlsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "title", Type: field.TypeString, Nullable: true}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "aliases", Type: field.TypeJSON, Nullable: true}, {Name: "reference_id", Type: field.TypeString, Nullable: true}, {Name: "auditor_reference_id", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PREPARING", "NEEDS_APPROVAL", "CHANGES_REQUESTED", "APPROVED", "ARCHIVED", "NOT_IMPLEMENTED", "NOT_APPLICABLE"}, Default: "NOT_IMPLEMENTED"}, {Name: "source", Type: field.TypeEnum, Nullable: true, Enums: []string{"FRAMEWORK", "TEMPLATE", "USER_DEFINED", "IMPORTED"}, Default: "USER_DEFINED"}, {Name: "reference_framework", Type: field.TypeString, Nullable: true}, {Name: "reference_framework_revision", Type: field.TypeString, Nullable: true}, {Name: "control_type", Type: field.TypeEnum, Nullable: true, Enums: []string{"PREVENTATIVE", "DETECTIVE", "CORRECTIVE", "DETERRENT"}, Default: "PREVENTATIVE"}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "category_id", Type: field.TypeString, Nullable: true}, {Name: "subcategory", Type: field.TypeString, Nullable: true}, {Name: "mapped_categories", Type: field.TypeJSON, Nullable: true}, {Name: "assessment_objectives", Type: field.TypeJSON, Nullable: true}, {Name: "assessment_methods", Type: field.TypeJSON, Nullable: true}, {Name: "control_questions", Type: field.TypeJSON, Nullable: true}, {Name: "implementation_guidance", Type: field.TypeJSON, Nullable: true}, {Name: "example_evidence", Type: field.TypeJSON, Nullable: true}, {Name: "references", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "control_kind_name", Type: field.TypeString, Nullable: true}, {Name: "ref_code", Type: field.TypeString}, {Name: "control_owner_id", Type: field.TypeString, Nullable: true}, {Name: "delegate_id", Type: field.TypeString, Nullable: true}, {Name: "responsible_party_id", Type: field.TypeString, Nullable: true}, {Name: "control_kind_id", Type: field.TypeString, Nullable: true}, {Name: "custom_type_enum_controls", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "remediation_controls", Type: field.TypeString, Nullable: true}, {Name: "review_controls", Type: field.TypeString, Nullable: true}, {Name: "standard_id", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_controls", Type: field.TypeString, Nullable: true}, } // ControlsTable holds the schema information for the "controls" table. ControlsTable = &schema.Table{ Name: "controls", Columns: ControlsColumns, PrimaryKey: []*schema.Column{ControlsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "controls_groups_control_owner", Columns: []*schema.Column{ControlsColumns[34]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "controls_groups_delegate", Columns: []*schema.Column{ControlsColumns[35]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "controls_entities_responsible_party", Columns: []*schema.Column{ControlsColumns[36]}, RefColumns: []*schema.Column{EntitiesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "controls_custom_type_enums_control_kind", Columns: []*schema.Column{ControlsColumns[37]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "controls_custom_type_enums_controls", Columns: []*schema.Column{ControlsColumns[38]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "controls_organizations_controls", Columns: []*schema.Column{ControlsColumns[39]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "controls_remediations_controls", Columns: []*schema.Column{ControlsColumns[40]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "controls_reviews_controls", Columns: []*schema.Column{ControlsColumns[41]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "controls_standards_controls", Columns: []*schema.Column{ControlsColumns[42]}, RefColumns: []*schema.Column{StandardsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "controls_vulnerabilities_controls", Columns: []*schema.Column{ControlsColumns[43]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "control_display_id_owner_id", Unique: true, Columns: []*schema.Column{ControlsColumns[7], ControlsColumns[39]}, }, { Name: "control_owner_id", Unique: false, Columns: []*schema.Column{ControlsColumns[39]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "control_standard_id_ref_code", Unique: true, Columns: []*schema.Column{ControlsColumns[42], ControlsColumns[33]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL AND owner_id is NULL", }, }, { Name: "control_standard_id_ref_code_owner_id", Unique: true, Columns: []*schema.Column{ControlsColumns[42], ControlsColumns[33], ControlsColumns[39]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL AND owner_id is not NULL and standard_id is not NULL", }, }, { Name: "control_ref_code_owner_id", Unique: true, Columns: []*schema.Column{ControlsColumns[33], ControlsColumns[39]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL AND owner_id is not NULL and standard_id is NULL", }, }, { Name: "control_standard_id_deleted_at_owner_id", Unique: false, Columns: []*schema.Column{ControlsColumns[42], ControlsColumns[5], ControlsColumns[39]}, }, { Name: "control_reference_id_deleted_at_owner_id", Unique: false, Columns: []*schema.Column{ControlsColumns[12], ControlsColumns[5], ControlsColumns[39]}, }, { Name: "control_auditor_reference_id_deleted_at_owner_id", Unique: false, Columns: []*schema.Column{ControlsColumns[13], ControlsColumns[5], ControlsColumns[39]}, }, }, } // ControlHistoryColumns holds the columns for the "control_history" table. ControlHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "title", Type: field.TypeString, Nullable: true}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "aliases", Type: field.TypeJSON, Nullable: true}, {Name: "reference_id", Type: field.TypeString, Nullable: true}, {Name: "auditor_reference_id", Type: field.TypeString, Nullable: true}, {Name: "responsible_party_id", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PREPARING", "NEEDS_APPROVAL", "CHANGES_REQUESTED", "APPROVED", "ARCHIVED", "NOT_IMPLEMENTED", "NOT_APPLICABLE"}, Default: "NOT_IMPLEMENTED"}, {Name: "source", Type: field.TypeEnum, Nullable: true, Enums: []string{"FRAMEWORK", "TEMPLATE", "USER_DEFINED", "IMPORTED"}, Default: "USER_DEFINED"}, {Name: "reference_framework", Type: field.TypeString, Nullable: true}, {Name: "reference_framework_revision", Type: field.TypeString, Nullable: true}, {Name: "control_type", Type: field.TypeEnum, Nullable: true, Enums: []string{"PREVENTATIVE", "DETECTIVE", "CORRECTIVE", "DETERRENT"}, Default: "PREVENTATIVE"}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "category_id", Type: field.TypeString, Nullable: true}, {Name: "subcategory", Type: field.TypeString, Nullable: true}, {Name: "mapped_categories", Type: field.TypeJSON, Nullable: true}, {Name: "assessment_objectives", Type: field.TypeJSON, Nullable: true}, {Name: "assessment_methods", Type: field.TypeJSON, Nullable: true}, {Name: "control_questions", Type: field.TypeJSON, Nullable: true}, {Name: "implementation_guidance", Type: field.TypeJSON, Nullable: true}, {Name: "example_evidence", Type: field.TypeJSON, Nullable: true}, {Name: "references", Type: field.TypeJSON, Nullable: true}, {Name: "control_owner_id", Type: field.TypeString, Nullable: true}, {Name: "delegate_id", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "control_kind_name", Type: field.TypeString, Nullable: true}, {Name: "control_kind_id", Type: field.TypeString, Nullable: true}, {Name: "ref_code", Type: field.TypeString}, {Name: "standard_id", Type: field.TypeString, Nullable: true}, } // ControlHistoryTable holds the schema information for the "control_history" table. ControlHistoryTable = &schema.Table{ Name: "control_history", Columns: ControlHistoryColumns, PrimaryKey: []*schema.Column{ControlHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "controlhistory_history_time", Unique: false, Columns: []*schema.Column{ControlHistoryColumns[1]}, }, }, } // ControlImplementationsColumns holds the columns for the "control_implementations" table. ControlImplementationsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PUBLISHED", "DRAFT", "NEEDS_APPROVAL", "APPROVED", "ARCHIVED"}, Default: "DRAFT"}, {Name: "implementation_date", Type: field.TypeTime, Nullable: true}, {Name: "verified", Type: field.TypeBool, Nullable: true}, {Name: "verification_date", Type: field.TypeTime, Nullable: true}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "evidence_control_implementations", Type: field.TypeString, Nullable: true}, {Name: "internal_policy_control_implementations", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // ControlImplementationsTable holds the schema information for the "control_implementations" table. ControlImplementationsTable = &schema.Table{ Name: "control_implementations", Columns: ControlImplementationsColumns, PrimaryKey: []*schema.Column{ControlImplementationsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_implementations_evidences_control_implementations", Columns: []*schema.Column{ControlImplementationsColumns[16]}, RefColumns: []*schema.Column{EvidencesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "control_implementations_internal_policies_control_implementations", Columns: []*schema.Column{ControlImplementationsColumns[17]}, RefColumns: []*schema.Column{InternalPoliciesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "control_implementations_organizations_control_implementations", Columns: []*schema.Column{ControlImplementationsColumns[18]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "controlimplementation_owner_id", Unique: false, Columns: []*schema.Column{ControlImplementationsColumns[18]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // ControlImplementationHistoryColumns holds the columns for the "control_implementation_history" table. ControlImplementationHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PUBLISHED", "DRAFT", "NEEDS_APPROVAL", "APPROVED", "ARCHIVED"}, Default: "DRAFT"}, {Name: "implementation_date", Type: field.TypeTime, Nullable: true}, {Name: "verified", Type: field.TypeBool, Nullable: true}, {Name: "verification_date", Type: field.TypeTime, Nullable: true}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, } // ControlImplementationHistoryTable holds the schema information for the "control_implementation_history" table. ControlImplementationHistoryTable = &schema.Table{ Name: "control_implementation_history", Columns: ControlImplementationHistoryColumns, PrimaryKey: []*schema.Column{ControlImplementationHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "controlimplementationhistory_history_time", Unique: false, Columns: []*schema.Column{ControlImplementationHistoryColumns[1]}, }, }, } // ControlObjectivesColumns holds the columns for the "control_objectives" table. ControlObjectivesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "revision", Type: field.TypeString, Nullable: true, Default: "v0.0.1"}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "desired_outcome", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"ACTIVE", "ARCHIVED", "DRAFT"}, Default: "DRAFT"}, {Name: "source", Type: field.TypeEnum, Nullable: true, Enums: []string{"FRAMEWORK", "TEMPLATE", "USER_DEFINED", "IMPORTED"}, Default: "USER_DEFINED"}, {Name: "control_objective_type", Type: field.TypeString, Nullable: true}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "subcategory", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // ControlObjectivesTable holds the schema information for the "control_objectives" table. ControlObjectivesTable = &schema.Table{ Name: "control_objectives", Columns: ControlObjectivesColumns, PrimaryKey: []*schema.Column{ControlObjectivesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_objectives_organizations_control_objectives", Columns: []*schema.Column{ControlObjectivesColumns[20]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "controlobjective_display_id_owner_id", Unique: true, Columns: []*schema.Column{ControlObjectivesColumns[7], ControlObjectivesColumns[20]}, }, { Name: "controlobjective_owner_id", Unique: false, Columns: []*schema.Column{ControlObjectivesColumns[20]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // ControlObjectiveHistoryColumns holds the columns for the "control_objective_history" table. ControlObjectiveHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "revision", Type: field.TypeString, Nullable: true, Default: "v0.0.1"}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "desired_outcome", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"ACTIVE", "ARCHIVED", "DRAFT"}, Default: "DRAFT"}, {Name: "source", Type: field.TypeEnum, Nullable: true, Enums: []string{"FRAMEWORK", "TEMPLATE", "USER_DEFINED", "IMPORTED"}, Default: "USER_DEFINED"}, {Name: "control_objective_type", Type: field.TypeString, Nullable: true}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "subcategory", Type: field.TypeString, Nullable: true}, } // ControlObjectiveHistoryTable holds the schema information for the "control_objective_history" table. ControlObjectiveHistoryTable = &schema.Table{ Name: "control_objective_history", Columns: ControlObjectiveHistoryColumns, PrimaryKey: []*schema.Column{ControlObjectiveHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "controlobjectivehistory_history_time", Unique: false, Columns: []*schema.Column{ControlObjectiveHistoryColumns[1]}, }, }, } // CustomDomainsColumns holds the columns for the "custom_domains" table. CustomDomainsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "cname_record", Type: field.TypeString, Size: 255}, {Name: "mappable_domain_id", Type: field.TypeString}, {Name: "dns_verification_id", Type: field.TypeString, Nullable: true}, {Name: "dns_verification_custom_domains", Type: field.TypeString, Nullable: true}, {Name: "mappable_domain_custom_domains", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // CustomDomainsTable holds the schema information for the "custom_domains" table. CustomDomainsTable = &schema.Table{ Name: "custom_domains", Columns: CustomDomainsColumns, PrimaryKey: []*schema.Column{CustomDomainsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "custom_domains_mappable_domains_mappable_domain", Columns: []*schema.Column{CustomDomainsColumns[12]}, RefColumns: []*schema.Column{MappableDomainsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "custom_domains_dns_verifications_dns_verification", Columns: []*schema.Column{CustomDomainsColumns[13]}, RefColumns: []*schema.Column{DNSVerificationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "custom_domains_dns_verifications_custom_domains", Columns: []*schema.Column{CustomDomainsColumns[14]}, RefColumns: []*schema.Column{DNSVerificationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "custom_domains_mappable_domains_custom_domains", Columns: []*schema.Column{CustomDomainsColumns[15]}, RefColumns: []*schema.Column{MappableDomainsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "custom_domains_organizations_custom_domains", Columns: []*schema.Column{CustomDomainsColumns[16]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "customdomain_owner_id", Unique: false, Columns: []*schema.Column{CustomDomainsColumns[16]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "customdomain_cname_record", Unique: true, Columns: []*schema.Column{CustomDomainsColumns[11]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // CustomDomainHistoryColumns holds the columns for the "custom_domain_history" table. CustomDomainHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "cname_record", Type: field.TypeString, Size: 255}, {Name: "mappable_domain_id", Type: field.TypeString}, {Name: "dns_verification_id", Type: field.TypeString, Nullable: true}, } // CustomDomainHistoryTable holds the schema information for the "custom_domain_history" table. CustomDomainHistoryTable = &schema.Table{ Name: "custom_domain_history", Columns: CustomDomainHistoryColumns, PrimaryKey: []*schema.Column{CustomDomainHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "customdomainhistory_history_time", Unique: false, Columns: []*schema.Column{CustomDomainHistoryColumns[1]}, }, }, } // CustomTypeEnumsColumns holds the columns for the "custom_type_enums" table. CustomTypeEnumsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "object_type", Type: field.TypeString}, {Name: "field", Type: field.TypeString, Default: "kind"}, {Name: "name", Type: field.TypeString, SchemaType: map[string]string{"postgres": "citext"}}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "color", Type: field.TypeString, Nullable: true}, {Name: "icon", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // CustomTypeEnumsTable holds the schema information for the "custom_type_enums" table. CustomTypeEnumsTable = &schema.Table{ Name: "custom_type_enums", Columns: CustomTypeEnumsColumns, PrimaryKey: []*schema.Column{CustomTypeEnumsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "custom_type_enums_organizations_custom_type_enums", Columns: []*schema.Column{CustomTypeEnumsColumns[16]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "customtypeenum_owner_id", Unique: false, Columns: []*schema.Column{CustomTypeEnumsColumns[16]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "customtypeenum_name_owner_id", Unique: true, Columns: []*schema.Column{CustomTypeEnumsColumns[12], CustomTypeEnumsColumns[16]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "customtypeenum_object_type", Unique: false, Columns: []*schema.Column{CustomTypeEnumsColumns[10]}, }, }, } // DNSVerificationsColumns holds the columns for the "dns_verifications" table. DNSVerificationsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "cloudflare_hostname_id", Type: field.TypeString, Size: 64}, {Name: "dns_txt_record", Type: field.TypeString, Size: 255}, {Name: "dns_txt_value", Type: field.TypeString, Size: 64}, {Name: "dns_verification_status", Type: field.TypeEnum, Enums: []string{"active", "pending", "active_redeploying", "moved", "pending_deletion", "deleted", "pending_blocked", "pending_migration", "pending_provisioned", "test_pending", "test_active", "test_active_apex", "test_blocked", "test_failed", "provisioned", "blocked"}, Default: "pending"}, {Name: "dns_verification_status_reason", Type: field.TypeString, Nullable: true, Size: 255}, {Name: "acme_challenge_path", Type: field.TypeString, Nullable: true, Size: 255}, {Name: "expected_acme_challenge_value", Type: field.TypeString, Nullable: true, Size: 64}, {Name: "acme_challenge_status", Type: field.TypeEnum, Enums: []string{"initializing", "pending_validation", "deleted", "pending_issuance", "pending_deployment", "pending_deletion", "pending_expiration", "expired", "active", "initializing_timed_out", "validation_timed_out", "issuance_timed_out", "deployment_timed_out", "deletion_timed_out", "pending_cleanup", "staging_deployment", "staging_active", "deactivating", "inactive", "backup_issued", "holding_deployment"}, Default: "initializing"}, {Name: "acme_challenge_status_reason", Type: field.TypeString, Nullable: true, Size: 255}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // DNSVerificationsTable holds the schema information for the "dns_verifications" table. DNSVerificationsTable = &schema.Table{ Name: "dns_verifications", Columns: DNSVerificationsColumns, PrimaryKey: []*schema.Column{DNSVerificationsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "dns_verifications_organizations_dns_verifications", Columns: []*schema.Column{DNSVerificationsColumns[17]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "dnsverification_owner_id", Unique: false, Columns: []*schema.Column{DNSVerificationsColumns[17]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "dnsverification_cloudflare_hostname_id", Unique: true, Columns: []*schema.Column{DNSVerificationsColumns[8]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // DNSVerificationHistoryColumns holds the columns for the "dns_verification_history" table. DNSVerificationHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "cloudflare_hostname_id", Type: field.TypeString, Size: 64}, {Name: "dns_txt_record", Type: field.TypeString, Size: 255}, {Name: "dns_txt_value", Type: field.TypeString, Size: 64}, {Name: "dns_verification_status", Type: field.TypeEnum, Enums: []string{"active", "pending", "active_redeploying", "moved", "pending_deletion", "deleted", "pending_blocked", "pending_migration", "pending_provisioned", "test_pending", "test_active", "test_active_apex", "test_blocked", "test_failed", "provisioned", "blocked"}, Default: "pending"}, {Name: "dns_verification_status_reason", Type: field.TypeString, Nullable: true, Size: 255}, {Name: "acme_challenge_path", Type: field.TypeString, Nullable: true, Size: 255}, {Name: "expected_acme_challenge_value", Type: field.TypeString, Nullable: true, Size: 64}, {Name: "acme_challenge_status", Type: field.TypeEnum, Enums: []string{"initializing", "pending_validation", "deleted", "pending_issuance", "pending_deployment", "pending_deletion", "pending_expiration", "expired", "active", "initializing_timed_out", "validation_timed_out", "issuance_timed_out", "deployment_timed_out", "deletion_timed_out", "pending_cleanup", "staging_deployment", "staging_active", "deactivating", "inactive", "backup_issued", "holding_deployment"}, Default: "initializing"}, {Name: "acme_challenge_status_reason", Type: field.TypeString, Nullable: true, Size: 255}, } // DNSVerificationHistoryTable holds the schema information for the "dns_verification_history" table. DNSVerificationHistoryTable = &schema.Table{ Name: "dns_verification_history", Columns: DNSVerificationHistoryColumns, PrimaryKey: []*schema.Column{DNSVerificationHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "dnsverificationhistory_history_time", Unique: false, Columns: []*schema.Column{DNSVerificationHistoryColumns[1]}, }, }, } // DirectoryAccountsColumns holds the columns for the "directory_accounts" table. DirectoryAccountsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "external_id", Type: field.TypeString}, {Name: "secondary_key", Type: field.TypeString, Nullable: true}, {Name: "canonical_email", Type: field.TypeString, Nullable: true}, {Name: "display_name", Type: field.TypeString, Nullable: true}, {Name: "given_name", Type: field.TypeString, Nullable: true}, {Name: "family_name", Type: field.TypeString, Nullable: true}, {Name: "job_title", Type: field.TypeString, Nullable: true}, {Name: "department", Type: field.TypeString, Nullable: true}, {Name: "organization_unit", Type: field.TypeString, Nullable: true}, {Name: "account_type", Type: field.TypeEnum, Nullable: true, Enums: []string{"USER", "SERVICE", "SHARED", "GUEST"}, Default: "USER"}, {Name: "status", Type: field.TypeEnum, Enums: []string{"ACTIVE", "INACTIVE", "SUSPENDED", "DELETED"}, Default: "ACTIVE"}, {Name: "mfa_state", Type: field.TypeEnum, Enums: []string{"UNKNOWN", "DISABLED", "ENABLED", "ENFORCED"}, Default: "UNKNOWN"}, {Name: "last_seen_ip", Type: field.TypeString, Nullable: true}, {Name: "last_login_at", Type: field.TypeTime, Nullable: true}, {Name: "observed_at", Type: field.TypeTime}, {Name: "profile_hash", Type: field.TypeString, Default: ""}, {Name: "profile", Type: field.TypeJSON, Nullable: true}, {Name: "raw_profile_file_id", Type: field.TypeString, Nullable: true}, {Name: "source_version", Type: field.TypeString, Nullable: true}, {Name: "integration_id", Type: field.TypeString}, {Name: "directory_sync_run_id", Type: field.TypeString}, {Name: "directory_sync_run_directory_accounts", Type: field.TypeString, Nullable: true}, {Name: "integration_directory_accounts", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // DirectoryAccountsTable holds the schema information for the "directory_accounts" table. DirectoryAccountsTable = &schema.Table{ Name: "directory_accounts", Columns: DirectoryAccountsColumns, PrimaryKey: []*schema.Column{DirectoryAccountsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "directory_accounts_integrations_integration", Columns: []*schema.Column{DirectoryAccountsColumns[26]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "directory_accounts_directory_sync_runs_directory_sync_run", Columns: []*schema.Column{DirectoryAccountsColumns[27]}, RefColumns: []*schema.Column{DirectorySyncRunsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "directory_accounts_directory_sync_runs_directory_accounts", Columns: []*schema.Column{DirectoryAccountsColumns[28]}, RefColumns: []*schema.Column{DirectorySyncRunsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "directory_accounts_integrations_directory_accounts", Columns: []*schema.Column{DirectoryAccountsColumns[29]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "directory_accounts_organizations_directory_accounts", Columns: []*schema.Column{DirectoryAccountsColumns[30]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "directoryaccount_display_id_owner_id", Unique: true, Columns: []*schema.Column{DirectoryAccountsColumns[5], DirectoryAccountsColumns[30]}, }, { Name: "directoryaccount_integration_id_external_id_directory_sync_run_id", Unique: true, Columns: []*schema.Column{DirectoryAccountsColumns[26], DirectoryAccountsColumns[7], DirectoryAccountsColumns[27]}, }, { Name: "directoryaccount_directory_sync_run_id_canonical_email", Unique: false, Columns: []*schema.Column{DirectoryAccountsColumns[27], DirectoryAccountsColumns[9]}, }, { Name: "directoryaccount_integration_id_canonical_email", Unique: false, Columns: []*schema.Column{DirectoryAccountsColumns[26], DirectoryAccountsColumns[9]}, }, { Name: "directoryaccount_owner_id_canonical_email", Unique: false, Columns: []*schema.Column{DirectoryAccountsColumns[30], DirectoryAccountsColumns[9]}, }, }, } // DirectoryAccountHistoryColumns holds the columns for the "directory_account_history" table. DirectoryAccountHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "integration_id", Type: field.TypeString}, {Name: "directory_sync_run_id", Type: field.TypeString}, {Name: "external_id", Type: field.TypeString}, {Name: "secondary_key", Type: field.TypeString, Nullable: true}, {Name: "canonical_email", Type: field.TypeString, Nullable: true}, {Name: "display_name", Type: field.TypeString, Nullable: true}, {Name: "given_name", Type: field.TypeString, Nullable: true}, {Name: "family_name", Type: field.TypeString, Nullable: true}, {Name: "job_title", Type: field.TypeString, Nullable: true}, {Name: "department", Type: field.TypeString, Nullable: true}, {Name: "organization_unit", Type: field.TypeString, Nullable: true}, {Name: "account_type", Type: field.TypeEnum, Nullable: true, Enums: []string{"USER", "SERVICE", "SHARED", "GUEST"}, Default: "USER"}, {Name: "status", Type: field.TypeEnum, Enums: []string{"ACTIVE", "INACTIVE", "SUSPENDED", "DELETED"}, Default: "ACTIVE"}, {Name: "mfa_state", Type: field.TypeEnum, Enums: []string{"UNKNOWN", "DISABLED", "ENABLED", "ENFORCED"}, Default: "UNKNOWN"}, {Name: "last_seen_ip", Type: field.TypeString, Nullable: true}, {Name: "last_login_at", Type: field.TypeTime, Nullable: true}, {Name: "observed_at", Type: field.TypeTime}, {Name: "profile_hash", Type: field.TypeString, Default: ""}, {Name: "profile", Type: field.TypeJSON, Nullable: true}, {Name: "raw_profile_file_id", Type: field.TypeString, Nullable: true}, {Name: "source_version", Type: field.TypeString, Nullable: true}, } // DirectoryAccountHistoryTable holds the schema information for the "directory_account_history" table. DirectoryAccountHistoryTable = &schema.Table{ Name: "directory_account_history", Columns: DirectoryAccountHistoryColumns, PrimaryKey: []*schema.Column{DirectoryAccountHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "directoryaccounthistory_history_time", Unique: false, Columns: []*schema.Column{DirectoryAccountHistoryColumns[1]}, }, }, } // DirectoryGroupsColumns holds the columns for the "directory_groups" table. DirectoryGroupsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "external_id", Type: field.TypeString}, {Name: "email", Type: field.TypeString, Nullable: true}, {Name: "display_name", Type: field.TypeString, Nullable: true}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "classification", Type: field.TypeEnum, Enums: []string{"SECURITY", "DISTRIBUTION", "TEAM", "DYNAMIC"}, Default: "TEAM"}, {Name: "status", Type: field.TypeEnum, Enums: []string{"ACTIVE", "INACTIVE", "DELETED"}, Default: "ACTIVE"}, {Name: "external_sharing_allowed", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "member_count", Type: field.TypeInt, Nullable: true}, {Name: "observed_at", Type: field.TypeTime}, {Name: "profile_hash", Type: field.TypeString, Default: ""}, {Name: "profile", Type: field.TypeJSON, Nullable: true}, {Name: "raw_profile_file_id", Type: field.TypeString, Nullable: true}, {Name: "source_version", Type: field.TypeString, Nullable: true}, {Name: "integration_id", Type: field.TypeString}, {Name: "directory_sync_run_id", Type: field.TypeString}, {Name: "directory_sync_run_directory_groups", Type: field.TypeString, Nullable: true}, {Name: "integration_directory_groups", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // DirectoryGroupsTable holds the schema information for the "directory_groups" table. DirectoryGroupsTable = &schema.Table{ Name: "directory_groups", Columns: DirectoryGroupsColumns, PrimaryKey: []*schema.Column{DirectoryGroupsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "directory_groups_integrations_integration", Columns: []*schema.Column{DirectoryGroupsColumns[20]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "directory_groups_directory_sync_runs_directory_sync_run", Columns: []*schema.Column{DirectoryGroupsColumns[21]}, RefColumns: []*schema.Column{DirectorySyncRunsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "directory_groups_directory_sync_runs_directory_groups", Columns: []*schema.Column{DirectoryGroupsColumns[22]}, RefColumns: []*schema.Column{DirectorySyncRunsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "directory_groups_integrations_directory_groups", Columns: []*schema.Column{DirectoryGroupsColumns[23]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "directory_groups_organizations_directory_groups", Columns: []*schema.Column{DirectoryGroupsColumns[24]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "directorygroup_display_id_owner_id", Unique: true, Columns: []*schema.Column{DirectoryGroupsColumns[5], DirectoryGroupsColumns[24]}, }, { Name: "directorygroup_integration_id_external_id_directory_sync_run_id", Unique: true, Columns: []*schema.Column{DirectoryGroupsColumns[20], DirectoryGroupsColumns[7], DirectoryGroupsColumns[21]}, }, { Name: "directorygroup_directory_sync_run_id_email", Unique: false, Columns: []*schema.Column{DirectoryGroupsColumns[21], DirectoryGroupsColumns[8]}, }, { Name: "directorygroup_integration_id_email", Unique: false, Columns: []*schema.Column{DirectoryGroupsColumns[20], DirectoryGroupsColumns[8]}, }, { Name: "directorygroup_owner_id_email", Unique: false, Columns: []*schema.Column{DirectoryGroupsColumns[24], DirectoryGroupsColumns[8]}, }, }, } // DirectoryGroupHistoryColumns holds the columns for the "directory_group_history" table. DirectoryGroupHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "integration_id", Type: field.TypeString}, {Name: "directory_sync_run_id", Type: field.TypeString}, {Name: "external_id", Type: field.TypeString}, {Name: "email", Type: field.TypeString, Nullable: true}, {Name: "display_name", Type: field.TypeString, Nullable: true}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "classification", Type: field.TypeEnum, Enums: []string{"SECURITY", "DISTRIBUTION", "TEAM", "DYNAMIC"}, Default: "TEAM"}, {Name: "status", Type: field.TypeEnum, Enums: []string{"ACTIVE", "INACTIVE", "DELETED"}, Default: "ACTIVE"}, {Name: "external_sharing_allowed", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "member_count", Type: field.TypeInt, Nullable: true}, {Name: "observed_at", Type: field.TypeTime}, {Name: "profile_hash", Type: field.TypeString, Default: ""}, {Name: "profile", Type: field.TypeJSON, Nullable: true}, {Name: "raw_profile_file_id", Type: field.TypeString, Nullable: true}, {Name: "source_version", Type: field.TypeString, Nullable: true}, } // DirectoryGroupHistoryTable holds the schema information for the "directory_group_history" table. DirectoryGroupHistoryTable = &schema.Table{ Name: "directory_group_history", Columns: DirectoryGroupHistoryColumns, PrimaryKey: []*schema.Column{DirectoryGroupHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "directorygrouphistory_history_time", Unique: false, Columns: []*schema.Column{DirectoryGroupHistoryColumns[1]}, }, }, } // DirectoryMembershipsColumns holds the columns for the "directory_memberships" table. DirectoryMembershipsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "role", Type: field.TypeEnum, Nullable: true, Enums: []string{"MEMBER", "MANAGER", "OWNER"}, Default: "MEMBER"}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "first_seen_at", Type: field.TypeTime, Nullable: true}, {Name: "last_seen_at", Type: field.TypeTime, Nullable: true}, {Name: "observed_at", Type: field.TypeTime}, {Name: "last_confirmed_run_id", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "integration_id", Type: field.TypeString}, {Name: "directory_sync_run_id", Type: field.TypeString}, {Name: "directory_account_id", Type: field.TypeString}, {Name: "directory_group_id", Type: field.TypeString}, {Name: "directory_sync_run_directory_memberships", Type: field.TypeString, Nullable: true}, {Name: "integration_directory_memberships", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // DirectoryMembershipsTable holds the schema information for the "directory_memberships" table. DirectoryMembershipsTable = &schema.Table{ Name: "directory_memberships", Columns: DirectoryMembershipsColumns, PrimaryKey: []*schema.Column{DirectoryMembershipsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "directory_memberships_integrations_integration", Columns: []*schema.Column{DirectoryMembershipsColumns[13]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "directory_memberships_directory_sync_runs_directory_sync_run", Columns: []*schema.Column{DirectoryMembershipsColumns[14]}, RefColumns: []*schema.Column{DirectorySyncRunsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "directory_memberships_directory_accounts_directory_account", Columns: []*schema.Column{DirectoryMembershipsColumns[15]}, RefColumns: []*schema.Column{DirectoryAccountsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "directory_memberships_directory_groups_directory_group", Columns: []*schema.Column{DirectoryMembershipsColumns[16]}, RefColumns: []*schema.Column{DirectoryGroupsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "directory_memberships_directory_sync_runs_directory_memberships", Columns: []*schema.Column{DirectoryMembershipsColumns[17]}, RefColumns: []*schema.Column{DirectorySyncRunsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "directory_memberships_integrations_directory_memberships", Columns: []*schema.Column{DirectoryMembershipsColumns[18]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "directory_memberships_organizations_directory_memberships", Columns: []*schema.Column{DirectoryMembershipsColumns[19]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "directorymembership_display_id_owner_id", Unique: true, Columns: []*schema.Column{DirectoryMembershipsColumns[5], DirectoryMembershipsColumns[19]}, }, { Name: "directorymembership_directory_account_id_directory_group_id_directory_sync_run_id", Unique: true, Columns: []*schema.Column{DirectoryMembershipsColumns[15], DirectoryMembershipsColumns[16], DirectoryMembershipsColumns[14]}, }, { Name: "directorymembership_directory_sync_run_id", Unique: false, Columns: []*schema.Column{DirectoryMembershipsColumns[14]}, }, { Name: "directorymembership_integration_id_directory_sync_run_id", Unique: false, Columns: []*schema.Column{DirectoryMembershipsColumns[13], DirectoryMembershipsColumns[14]}, }, { Name: "directorymembership_directory_account_id_directory_group_id", Unique: true, Columns: []*schema.Column{DirectoryMembershipsColumns[15], DirectoryMembershipsColumns[16]}, }, }, } // DirectoryMembershipHistoryColumns holds the columns for the "directory_membership_history" table. DirectoryMembershipHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "integration_id", Type: field.TypeString}, {Name: "directory_sync_run_id", Type: field.TypeString}, {Name: "directory_account_id", Type: field.TypeString}, {Name: "directory_group_id", Type: field.TypeString}, {Name: "role", Type: field.TypeEnum, Nullable: true, Enums: []string{"MEMBER", "MANAGER", "OWNER"}, Default: "MEMBER"}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "first_seen_at", Type: field.TypeTime, Nullable: true}, {Name: "last_seen_at", Type: field.TypeTime, Nullable: true}, {Name: "observed_at", Type: field.TypeTime}, {Name: "last_confirmed_run_id", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, } // DirectoryMembershipHistoryTable holds the schema information for the "directory_membership_history" table. DirectoryMembershipHistoryTable = &schema.Table{ Name: "directory_membership_history", Columns: DirectoryMembershipHistoryColumns, PrimaryKey: []*schema.Column{DirectoryMembershipHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "directorymembershiphistory_history_time", Unique: false, Columns: []*schema.Column{DirectoryMembershipHistoryColumns[1]}, }, }, } // DirectorySyncRunsColumns holds the columns for the "directory_sync_runs" table. DirectorySyncRunsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "status", Type: field.TypeEnum, Enums: []string{"PENDING", "RUNNING", "COMPLETED", "FAILED"}, Default: "PENDING"}, {Name: "started_at", Type: field.TypeTime}, {Name: "completed_at", Type: field.TypeTime, Nullable: true}, {Name: "source_cursor", Type: field.TypeString, Nullable: true}, {Name: "full_count", Type: field.TypeInt, Default: 0}, {Name: "delta_count", Type: field.TypeInt, Default: 0}, {Name: "error", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "raw_manifest_file_id", Type: field.TypeString, Nullable: true}, {Name: "stats", Type: field.TypeJSON, Nullable: true}, {Name: "integration_id", Type: field.TypeString}, {Name: "integration_directory_sync_runs", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // DirectorySyncRunsTable holds the schema information for the "directory_sync_runs" table. DirectorySyncRunsTable = &schema.Table{ Name: "directory_sync_runs", Columns: DirectorySyncRunsColumns, PrimaryKey: []*schema.Column{DirectorySyncRunsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "directory_sync_runs_integrations_integration", Columns: []*schema.Column{DirectorySyncRunsColumns[15]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "directory_sync_runs_integrations_directory_sync_runs", Columns: []*schema.Column{DirectorySyncRunsColumns[16]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "directory_sync_runs_organizations_directory_sync_runs", Columns: []*schema.Column{DirectorySyncRunsColumns[17]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "directorysyncrun_display_id_owner_id", Unique: true, Columns: []*schema.Column{DirectorySyncRunsColumns[5], DirectorySyncRunsColumns[17]}, }, { Name: "directorysyncrun_integration_id_started_at", Unique: false, Columns: []*schema.Column{DirectorySyncRunsColumns[15], DirectorySyncRunsColumns[7]}, }, }, } // DocumentDataColumns holds the columns for the "document_data" table. DocumentDataColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "data", Type: field.TypeJSON}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "template_id", Type: field.TypeString, Nullable: true}, } // DocumentDataTable holds the schema information for the "document_data" table. DocumentDataTable = &schema.Table{ Name: "document_data", Columns: DocumentDataColumns, PrimaryKey: []*schema.Column{DocumentDataColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "document_data_organizations_documents", Columns: []*schema.Column{DocumentDataColumns[9]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "document_data_templates_documents", Columns: []*schema.Column{DocumentDataColumns[10]}, RefColumns: []*schema.Column{TemplatesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "documentdata_owner_id", Unique: false, Columns: []*schema.Column{DocumentDataColumns[9]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // DocumentDataHistoryColumns holds the columns for the "document_data_history" table. DocumentDataHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "template_id", Type: field.TypeString, Nullable: true}, {Name: "data", Type: field.TypeJSON}, } // DocumentDataHistoryTable holds the schema information for the "document_data_history" table. DocumentDataHistoryTable = &schema.Table{ Name: "document_data_history", Columns: DocumentDataHistoryColumns, PrimaryKey: []*schema.Column{DocumentDataHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "documentdatahistory_history_time", Unique: false, Columns: []*schema.Column{DocumentDataHistoryColumns[1]}, }, }, } // EmailVerificationTokensColumns holds the columns for the "email_verification_tokens" table. EmailVerificationTokensColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "token", Type: field.TypeString, Unique: true}, {Name: "ttl", Type: field.TypeTime}, {Name: "email", Type: field.TypeString}, {Name: "secret", Type: field.TypeBytes}, {Name: "owner_id", Type: field.TypeString}, } // EmailVerificationTokensTable holds the schema information for the "email_verification_tokens" table. EmailVerificationTokensTable = &schema.Table{ Name: "email_verification_tokens", Columns: EmailVerificationTokensColumns, PrimaryKey: []*schema.Column{EmailVerificationTokensColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "email_verification_tokens_users_email_verification_tokens", Columns: []*schema.Column{EmailVerificationTokensColumns[11]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.NoAction, }, }, Indexes: []*schema.Index{ { Name: "emailverificationtoken_token", Unique: true, Columns: []*schema.Column{EmailVerificationTokensColumns[7]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // EntitiesColumns holds the columns for the "entities" table. EntitiesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString, Nullable: true, SchemaType: map[string]string{"postgres": "citext"}}, {Name: "display_name", Type: field.TypeString, Nullable: true, Size: 64}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "domains", Type: field.TypeJSON, Nullable: true}, {Name: "status", Type: field.TypeString, Nullable: true, Default: "active"}, {Name: "entity_type_id", Type: field.TypeString, Nullable: true}, {Name: "entity_type_entities", Type: field.TypeString, Nullable: true}, {Name: "finding_entities", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "remediation_entities", Type: field.TypeString, Nullable: true}, {Name: "review_entities", Type: field.TypeString, Nullable: true}, {Name: "risk_entities", Type: field.TypeString, Nullable: true}, {Name: "scan_entities", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_entities", Type: field.TypeString, Nullable: true}, } // EntitiesTable holds the schema information for the "entities" table. EntitiesTable = &schema.Table{ Name: "entities", Columns: EntitiesColumns, PrimaryKey: []*schema.Column{EntitiesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "entities_entity_types_entity_type", Columns: []*schema.Column{EntitiesColumns[16]}, RefColumns: []*schema.Column{EntityTypesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "entities_entity_types_entities", Columns: []*schema.Column{EntitiesColumns[17]}, RefColumns: []*schema.Column{EntityTypesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "entities_findings_entities", Columns: []*schema.Column{EntitiesColumns[18]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "entities_organizations_entities", Columns: []*schema.Column{EntitiesColumns[19]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "entities_remediations_entities", Columns: []*schema.Column{EntitiesColumns[20]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "entities_reviews_entities", Columns: []*schema.Column{EntitiesColumns[21]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "entities_risks_entities", Columns: []*schema.Column{EntitiesColumns[22]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "entities_scans_entities", Columns: []*schema.Column{EntitiesColumns[23]}, RefColumns: []*schema.Column{ScansColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "entities_vulnerabilities_entities", Columns: []*schema.Column{EntitiesColumns[24]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "entity_owner_id", Unique: false, Columns: []*schema.Column{EntitiesColumns[19]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "entity_name_owner_id", Unique: true, Columns: []*schema.Column{EntitiesColumns[11], EntitiesColumns[19]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // EntityHistoryColumns holds the columns for the "entity_history" table. EntityHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString, Nullable: true, SchemaType: map[string]string{"postgres": "citext"}}, {Name: "display_name", Type: field.TypeString, Nullable: true, Size: 64}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "domains", Type: field.TypeJSON, Nullable: true}, {Name: "entity_type_id", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeString, Nullable: true, Default: "active"}, } // EntityHistoryTable holds the schema information for the "entity_history" table. EntityHistoryTable = &schema.Table{ Name: "entity_history", Columns: EntityHistoryColumns, PrimaryKey: []*schema.Column{EntityHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "entityhistory_history_time", Unique: false, Columns: []*schema.Column{EntityHistoryColumns[1]}, }, }, } // EntityTypesColumns holds the columns for the "entity_types" table. EntityTypesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString, Size: 64, SchemaType: map[string]string{"postgres": "citext"}}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // EntityTypesTable holds the schema information for the "entity_types" table. EntityTypesTable = &schema.Table{ Name: "entity_types", Columns: EntityTypesColumns, PrimaryKey: []*schema.Column{EntityTypesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "entity_types_organizations_entity_types", Columns: []*schema.Column{EntityTypesColumns[12]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "entitytype_owner_id", Unique: false, Columns: []*schema.Column{EntityTypesColumns[12]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "entitytype_name_owner_id", Unique: true, Columns: []*schema.Column{EntityTypesColumns[11], EntityTypesColumns[12]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // EntityTypeHistoryColumns holds the columns for the "entity_type_history" table. EntityTypeHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString, Size: 64, SchemaType: map[string]string{"postgres": "citext"}}, } // EntityTypeHistoryTable holds the schema information for the "entity_type_history" table. EntityTypeHistoryTable = &schema.Table{ Name: "entity_type_history", Columns: EntityTypeHistoryColumns, PrimaryKey: []*schema.Column{EntityTypeHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "entitytypehistory_history_time", Unique: false, Columns: []*schema.Column{EntityTypeHistoryColumns[1]}, }, }, } // EventsColumns holds the columns for the "events" table. EventsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "event_id", Type: field.TypeString, Nullable: true}, {Name: "correlation_id", Type: field.TypeString, Nullable: true}, {Name: "event_type", Type: field.TypeString}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "directory_membership_events", Type: field.TypeString, Nullable: true}, {Name: "export_events", Type: field.TypeString, Nullable: true}, } // EventsTable holds the schema information for the "events" table. EventsTable = &schema.Table{ Name: "events", Columns: EventsColumns, PrimaryKey: []*schema.Column{EventsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "events_directory_memberships_events", Columns: []*schema.Column{EventsColumns[10]}, RefColumns: []*schema.Column{DirectoryMembershipsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "events_exports_events", Columns: []*schema.Column{EventsColumns[11]}, RefColumns: []*schema.Column{ExportsColumns[0]}, OnDelete: schema.SetNull, }, }, } // EvidencesColumns holds the columns for the "evidences" table. EvidencesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "collection_procedure", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "creation_date", Type: field.TypeTime}, {Name: "renewal_date", Type: field.TypeTime, Nullable: true}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "is_automated", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "url", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"SUBMITTED", "READY_FOR_AUDITOR", "AUDITOR_APPROVED", "IN_REVIEW", "MISSING_ARTIFACT", "NEEDS_RENEWAL", "REJECTED", "READY", "APPROVED"}, Default: "SUBMITTED"}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // EvidencesTable holds the schema information for the "evidences" table. EvidencesTable = &schema.Table{ Name: "evidences", Columns: EvidencesColumns, PrimaryKey: []*schema.Column{EvidencesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "evidences_organizations_evidence", Columns: []*schema.Column{EvidencesColumns[18]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "evidence_display_id_owner_id", Unique: true, Columns: []*schema.Column{EvidencesColumns[7], EvidencesColumns[18]}, }, { Name: "evidence_owner_id", Unique: false, Columns: []*schema.Column{EvidencesColumns[18]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // EvidenceHistoryColumns holds the columns for the "evidence_history" table. EvidenceHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "collection_procedure", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "creation_date", Type: field.TypeTime}, {Name: "renewal_date", Type: field.TypeTime, Nullable: true}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "is_automated", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "url", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"SUBMITTED", "READY_FOR_AUDITOR", "AUDITOR_APPROVED", "IN_REVIEW", "MISSING_ARTIFACT", "NEEDS_RENEWAL", "REJECTED", "READY", "APPROVED"}, Default: "SUBMITTED"}, } // EvidenceHistoryTable holds the schema information for the "evidence_history" table. EvidenceHistoryTable = &schema.Table{ Name: "evidence_history", Columns: EvidenceHistoryColumns, PrimaryKey: []*schema.Column{EvidenceHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "evidencehistory_history_time", Unique: false, Columns: []*schema.Column{EvidenceHistoryColumns[1]}, }, }, } // ExportsColumns holds the columns for the "exports" table. ExportsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "export_type", Type: field.TypeEnum, Enums: []string{"CONTROL", "DIRECTORY_MEMBERSHIP", "EVIDENCE", "FINDING", "INTERNAL_POLICY", "PROCEDURE", "REMEDIATION", "REVIEW", "RISK", "SUBPROCESSOR", "SUBSCRIBER", "TASK", "VULNERABILITY"}}, {Name: "format", Type: field.TypeEnum, Enums: []string{"CSV"}, Default: "CSV"}, {Name: "status", Type: field.TypeEnum, Enums: []string{"PENDING", "FAILED", "READY", "NODATA"}, Default: "PENDING"}, {Name: "requestor_id", Type: field.TypeString, Nullable: true}, {Name: "fields", Type: field.TypeJSON, Nullable: true}, {Name: "filters", Type: field.TypeString, Nullable: true}, {Name: "error_message", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // ExportsTable holds the schema information for the "exports" table. ExportsTable = &schema.Table{ Name: "exports", Columns: ExportsColumns, PrimaryKey: []*schema.Column{ExportsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "exports_organizations_exports", Columns: []*schema.Column{ExportsColumns[14]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "export_owner_id", Unique: false, Columns: []*schema.Column{ExportsColumns[14]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // FilesColumns holds the columns for the "files" table. FilesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "provided_file_name", Type: field.TypeString}, {Name: "provided_file_extension", Type: field.TypeString}, {Name: "provided_file_size", Type: field.TypeInt64, Nullable: true}, {Name: "persisted_file_size", Type: field.TypeInt64, Nullable: true}, {Name: "detected_mime_type", Type: field.TypeString, Nullable: true}, {Name: "md5_hash", Type: field.TypeString, Nullable: true}, {Name: "detected_content_type", Type: field.TypeString}, {Name: "store_key", Type: field.TypeString, Nullable: true}, {Name: "category_type", Type: field.TypeString, Nullable: true}, {Name: "uri", Type: field.TypeString, Nullable: true}, {Name: "storage_scheme", Type: field.TypeString, Nullable: true}, {Name: "storage_volume", Type: field.TypeString, Nullable: true}, {Name: "storage_path", Type: field.TypeString, Nullable: true}, {Name: "file_contents", Type: field.TypeBytes, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "storage_region", Type: field.TypeString, Nullable: true}, {Name: "storage_provider", Type: field.TypeString, Nullable: true}, {Name: "last_accessed_at", Type: field.TypeTime, Nullable: true}, {Name: "export_files", Type: field.TypeString, Nullable: true}, {Name: "finding_files", Type: field.TypeString, Nullable: true}, {Name: "integration_files", Type: field.TypeString, Nullable: true}, {Name: "note_files", Type: field.TypeString, Nullable: true}, {Name: "remediation_files", Type: field.TypeString, Nullable: true}, {Name: "review_files", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_files", Type: field.TypeString, Nullable: true}, } // FilesTable holds the schema information for the "files" table. FilesTable = &schema.Table{ Name: "files", Columns: FilesColumns, PrimaryKey: []*schema.Column{FilesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "files_exports_files", Columns: []*schema.Column{FilesColumns[29]}, RefColumns: []*schema.Column{ExportsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "files_findings_files", Columns: []*schema.Column{FilesColumns[30]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "files_integrations_files", Columns: []*schema.Column{FilesColumns[31]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "files_notes_files", Columns: []*schema.Column{FilesColumns[32]}, RefColumns: []*schema.Column{NotesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "files_remediations_files", Columns: []*schema.Column{FilesColumns[33]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "files_reviews_files", Columns: []*schema.Column{FilesColumns[34]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "files_vulnerabilities_files", Columns: []*schema.Column{FilesColumns[35]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, }, } // FileDownloadTokensColumns holds the columns for the "file_download_tokens" table. FileDownloadTokensColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "token", Type: field.TypeString, Unique: true, Nullable: true}, {Name: "ttl", Type: field.TypeTime, Nullable: true}, {Name: "user_id", Type: field.TypeString, Nullable: true}, {Name: "organization_id", Type: field.TypeString, Nullable: true}, {Name: "file_id", Type: field.TypeString, Nullable: true}, {Name: "secret", Type: field.TypeBytes, Nullable: true}, {Name: "owner_id", Type: field.TypeString}, } // FileDownloadTokensTable holds the schema information for the "file_download_tokens" table. FileDownloadTokensTable = &schema.Table{ Name: "file_download_tokens", Columns: FileDownloadTokensColumns, PrimaryKey: []*schema.Column{FileDownloadTokensColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "file_download_tokens_users_file_download_tokens", Columns: []*schema.Column{FileDownloadTokensColumns[13]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.NoAction, }, }, Indexes: []*schema.Index{ { Name: "filedownloadtoken_token", Unique: true, Columns: []*schema.Column{FileDownloadTokensColumns[7]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // FileHistoryColumns holds the columns for the "file_history" table. FileHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "provided_file_name", Type: field.TypeString}, {Name: "provided_file_extension", Type: field.TypeString}, {Name: "provided_file_size", Type: field.TypeInt64, Nullable: true}, {Name: "persisted_file_size", Type: field.TypeInt64, Nullable: true}, {Name: "detected_mime_type", Type: field.TypeString, Nullable: true}, {Name: "md5_hash", Type: field.TypeString, Nullable: true}, {Name: "detected_content_type", Type: field.TypeString}, {Name: "store_key", Type: field.TypeString, Nullable: true}, {Name: "category_type", Type: field.TypeString, Nullable: true}, {Name: "uri", Type: field.TypeString, Nullable: true}, {Name: "storage_scheme", Type: field.TypeString, Nullable: true}, {Name: "storage_volume", Type: field.TypeString, Nullable: true}, {Name: "storage_path", Type: field.TypeString, Nullable: true}, {Name: "file_contents", Type: field.TypeBytes, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "storage_region", Type: field.TypeString, Nullable: true}, {Name: "storage_provider", Type: field.TypeString, Nullable: true}, {Name: "last_accessed_at", Type: field.TypeTime, Nullable: true}, } // FileHistoryTable holds the schema information for the "file_history" table. FileHistoryTable = &schema.Table{ Name: "file_history", Columns: FileHistoryColumns, PrimaryKey: []*schema.Column{FileHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "filehistory_history_time", Unique: false, Columns: []*schema.Column{FileHistoryColumns[1]}, }, }, } // FindingsColumns holds the columns for the "findings" table. FindingsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "external_id", Type: field.TypeString, Nullable: true}, {Name: "external_owner_id", Type: field.TypeString, Nullable: true}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "resource_name", Type: field.TypeString, Nullable: true}, {Name: "display_name", Type: field.TypeString, Nullable: true}, {Name: "state", Type: field.TypeString, Nullable: true}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "categories", Type: field.TypeJSON, Nullable: true}, {Name: "finding_class", Type: field.TypeString, Nullable: true}, {Name: "severity", Type: field.TypeString, Nullable: true}, {Name: "numeric_severity", Type: field.TypeFloat64, Nullable: true}, {Name: "score", Type: field.TypeFloat64, Nullable: true}, {Name: "impact", Type: field.TypeFloat64, Nullable: true}, {Name: "exploitability", Type: field.TypeFloat64, Nullable: true}, {Name: "priority", Type: field.TypeString, Nullable: true}, {Name: "open", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "blocks_production", Type: field.TypeBool, Nullable: true}, {Name: "production", Type: field.TypeBool, Nullable: true}, {Name: "public", Type: field.TypeBool, Nullable: true}, {Name: "validated", Type: field.TypeBool, Nullable: true}, {Name: "assessment_id", Type: field.TypeString, Nullable: true}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "recommendation", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "recommended_actions", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "references", Type: field.TypeJSON, Nullable: true}, {Name: "steps_to_reproduce", Type: field.TypeJSON, Nullable: true}, {Name: "targets", Type: field.TypeJSON, Nullable: true}, {Name: "target_details", Type: field.TypeJSON, Nullable: true}, {Name: "vector", Type: field.TypeString, Nullable: true}, {Name: "remediation_sla", Type: field.TypeInt, Nullable: true}, {Name: "status", Type: field.TypeString, Nullable: true}, {Name: "event_time", Type: field.TypeTime, Nullable: true}, {Name: "reported_at", Type: field.TypeTime, Nullable: true}, {Name: "source_updated_at", Type: field.TypeTime, Nullable: true}, {Name: "external_uri", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "raw_payload", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "remediation_findings", Type: field.TypeString, Nullable: true}, {Name: "review_findings", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_findings", Type: field.TypeString, Nullable: true}, } // FindingsTable holds the schema information for the "findings" table. FindingsTable = &schema.Table{ Name: "findings", Columns: FindingsColumns, PrimaryKey: []*schema.Column{FindingsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "findings_organizations_findings", Columns: []*schema.Column{FindingsColumns[49]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "findings_remediations_findings", Columns: []*schema.Column{FindingsColumns[50]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "findings_reviews_findings", Columns: []*schema.Column{FindingsColumns[51]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "findings_vulnerabilities_findings", Columns: []*schema.Column{FindingsColumns[52]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "finding_display_id_owner_id", Unique: true, Columns: []*schema.Column{FindingsColumns[7], FindingsColumns[49]}, }, { Name: "finding_owner_id", Unique: false, Columns: []*schema.Column{FindingsColumns[49]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "finding_external_id_external_owner_id_owner_id", Unique: true, Columns: []*schema.Column{FindingsColumns[12], FindingsColumns[13], FindingsColumns[49]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // FindingControlsColumns holds the columns for the "finding_controls" table. FindingControlsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "external_standard", Type: field.TypeString, Nullable: true}, {Name: "external_standard_version", Type: field.TypeString, Nullable: true}, {Name: "external_control_id", Type: field.TypeString, Nullable: true}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "discovered_at", Type: field.TypeTime, Nullable: true}, {Name: "finding_id", Type: field.TypeString}, {Name: "control_id", Type: field.TypeString}, {Name: "standard_id", Type: field.TypeString, Nullable: true}, } // FindingControlsTable holds the schema information for the "finding_controls" table. FindingControlsTable = &schema.Table{ Name: "finding_controls", Columns: FindingControlsColumns, PrimaryKey: []*schema.Column{FindingControlsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "finding_controls_findings_finding", Columns: []*schema.Column{FindingControlsColumns[11]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "finding_controls_controls_control", Columns: []*schema.Column{FindingControlsColumns[12]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "finding_controls_standards_standard", Columns: []*schema.Column{FindingControlsColumns[13]}, RefColumns: []*schema.Column{StandardsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "findingcontrol_finding_id_control_id", Unique: true, Columns: []*schema.Column{FindingControlsColumns[11], FindingControlsColumns[12]}, }, }, } // FindingControlHistoryColumns holds the columns for the "finding_control_history" table. FindingControlHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "finding_id", Type: field.TypeString}, {Name: "control_id", Type: field.TypeString}, {Name: "standard_id", Type: field.TypeString, Nullable: true}, {Name: "external_standard", Type: field.TypeString, Nullable: true}, {Name: "external_standard_version", Type: field.TypeString, Nullable: true}, {Name: "external_control_id", Type: field.TypeString, Nullable: true}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "discovered_at", Type: field.TypeTime, Nullable: true}, } // FindingControlHistoryTable holds the schema information for the "finding_control_history" table. FindingControlHistoryTable = &schema.Table{ Name: "finding_control_history", Columns: FindingControlHistoryColumns, PrimaryKey: []*schema.Column{FindingControlHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "findingcontrolhistory_history_time", Unique: false, Columns: []*schema.Column{FindingControlHistoryColumns[1]}, }, }, } // FindingHistoryColumns holds the columns for the "finding_history" table. FindingHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "external_id", Type: field.TypeString, Nullable: true}, {Name: "external_owner_id", Type: field.TypeString, Nullable: true}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "resource_name", Type: field.TypeString, Nullable: true}, {Name: "display_name", Type: field.TypeString, Nullable: true}, {Name: "state", Type: field.TypeString, Nullable: true}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "categories", Type: field.TypeJSON, Nullable: true}, {Name: "finding_class", Type: field.TypeString, Nullable: true}, {Name: "severity", Type: field.TypeString, Nullable: true}, {Name: "numeric_severity", Type: field.TypeFloat64, Nullable: true}, {Name: "score", Type: field.TypeFloat64, Nullable: true}, {Name: "impact", Type: field.TypeFloat64, Nullable: true}, {Name: "exploitability", Type: field.TypeFloat64, Nullable: true}, {Name: "priority", Type: field.TypeString, Nullable: true}, {Name: "open", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "blocks_production", Type: field.TypeBool, Nullable: true}, {Name: "production", Type: field.TypeBool, Nullable: true}, {Name: "public", Type: field.TypeBool, Nullable: true}, {Name: "validated", Type: field.TypeBool, Nullable: true}, {Name: "assessment_id", Type: field.TypeString, Nullable: true}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "recommendation", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "recommended_actions", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "references", Type: field.TypeJSON, Nullable: true}, {Name: "steps_to_reproduce", Type: field.TypeJSON, Nullable: true}, {Name: "targets", Type: field.TypeJSON, Nullable: true}, {Name: "target_details", Type: field.TypeJSON, Nullable: true}, {Name: "vector", Type: field.TypeString, Nullable: true}, {Name: "remediation_sla", Type: field.TypeInt, Nullable: true}, {Name: "status", Type: field.TypeString, Nullable: true}, {Name: "event_time", Type: field.TypeTime, Nullable: true}, {Name: "reported_at", Type: field.TypeTime, Nullable: true}, {Name: "source_updated_at", Type: field.TypeTime, Nullable: true}, {Name: "external_uri", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "raw_payload", Type: field.TypeJSON, Nullable: true}, } // FindingHistoryTable holds the schema information for the "finding_history" table. FindingHistoryTable = &schema.Table{ Name: "finding_history", Columns: FindingHistoryColumns, PrimaryKey: []*schema.Column{FindingHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "findinghistory_history_time", Unique: false, Columns: []*schema.Column{FindingHistoryColumns[1]}, }, }, } // GroupsColumns holds the columns for the "groups" table. GroupsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "name", Type: field.TypeString, SchemaType: map[string]string{"postgres": "citext"}}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "is_managed", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "gravatar_logo_url", Type: field.TypeString, Nullable: true}, {Name: "logo_url", Type: field.TypeString, Nullable: true}, {Name: "display_name", Type: field.TypeString, Size: 64, Default: ""}, {Name: "scim_external_id", Type: field.TypeString, Nullable: true}, {Name: "scim_display_name", Type: field.TypeString, Nullable: true}, {Name: "scim_active", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "scim_group_mailing", Type: field.TypeString, Nullable: true}, {Name: "assessment_blocked_groups", Type: field.TypeString, Nullable: true}, {Name: "assessment_editors", Type: field.TypeString, Nullable: true}, {Name: "assessment_viewers", Type: field.TypeString, Nullable: true}, {Name: "asset_blocked_groups", Type: field.TypeString, Nullable: true}, {Name: "asset_editors", Type: field.TypeString, Nullable: true}, {Name: "asset_viewers", Type: field.TypeString, Nullable: true}, {Name: "finding_blocked_groups", Type: field.TypeString, Nullable: true}, {Name: "finding_editors", Type: field.TypeString, Nullable: true}, {Name: "finding_viewers", Type: field.TypeString, Nullable: true}, {Name: "organization_control_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_control_implementation_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_control_objective_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_evidence_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_group_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_internal_policy_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_mapped_control_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_narrative_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_procedure_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_program_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_risk_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_scheduled_job_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_standard_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_template_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_subprocessor_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_trust_center_doc_creators", Type: field.TypeString, Nullable: true}, {Name: "organization_trust_center_subprocessor_creators", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "remediation_blocked_groups", Type: field.TypeString, Nullable: true}, {Name: "remediation_editors", Type: field.TypeString, Nullable: true}, {Name: "remediation_viewers", Type: field.TypeString, Nullable: true}, {Name: "review_blocked_groups", Type: field.TypeString, Nullable: true}, {Name: "review_editors", Type: field.TypeString, Nullable: true}, {Name: "review_viewers", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_blocked_groups", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_editors", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_viewers", Type: field.TypeString, Nullable: true}, {Name: "workflow_definition_groups", Type: field.TypeString, Nullable: true}, } // GroupsTable holds the schema information for the "groups" table. GroupsTable = &schema.Table{ Name: "groups", Columns: GroupsColumns, PrimaryKey: []*schema.Column{GroupsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "groups_assessments_blocked_groups", Columns: []*schema.Column{GroupsColumns[19]}, RefColumns: []*schema.Column{AssessmentsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_assessments_editors", Columns: []*schema.Column{GroupsColumns[20]}, RefColumns: []*schema.Column{AssessmentsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_assessments_viewers", Columns: []*schema.Column{GroupsColumns[21]}, RefColumns: []*schema.Column{AssessmentsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_assets_blocked_groups", Columns: []*schema.Column{GroupsColumns[22]}, RefColumns: []*schema.Column{AssetsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_assets_editors", Columns: []*schema.Column{GroupsColumns[23]}, RefColumns: []*schema.Column{AssetsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_assets_viewers", Columns: []*schema.Column{GroupsColumns[24]}, RefColumns: []*schema.Column{AssetsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_findings_blocked_groups", Columns: []*schema.Column{GroupsColumns[25]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_findings_editors", Columns: []*schema.Column{GroupsColumns[26]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_findings_viewers", Columns: []*schema.Column{GroupsColumns[27]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_control_creators", Columns: []*schema.Column{GroupsColumns[28]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_control_implementation_creators", Columns: []*schema.Column{GroupsColumns[29]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_control_objective_creators", Columns: []*schema.Column{GroupsColumns[30]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_evidence_creators", Columns: []*schema.Column{GroupsColumns[31]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_group_creators", Columns: []*schema.Column{GroupsColumns[32]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_internal_policy_creators", Columns: []*schema.Column{GroupsColumns[33]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_mapped_control_creators", Columns: []*schema.Column{GroupsColumns[34]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_narrative_creators", Columns: []*schema.Column{GroupsColumns[35]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_procedure_creators", Columns: []*schema.Column{GroupsColumns[36]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_program_creators", Columns: []*schema.Column{GroupsColumns[37]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_risk_creators", Columns: []*schema.Column{GroupsColumns[38]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_scheduled_job_creators", Columns: []*schema.Column{GroupsColumns[39]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_standard_creators", Columns: []*schema.Column{GroupsColumns[40]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_template_creators", Columns: []*schema.Column{GroupsColumns[41]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_subprocessor_creators", Columns: []*schema.Column{GroupsColumns[42]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_trust_center_doc_creators", Columns: []*schema.Column{GroupsColumns[43]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_trust_center_subprocessor_creators", Columns: []*schema.Column{GroupsColumns[44]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_organizations_groups", Columns: []*schema.Column{GroupsColumns[45]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_remediations_blocked_groups", Columns: []*schema.Column{GroupsColumns[46]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_remediations_editors", Columns: []*schema.Column{GroupsColumns[47]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_remediations_viewers", Columns: []*schema.Column{GroupsColumns[48]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_reviews_blocked_groups", Columns: []*schema.Column{GroupsColumns[49]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_reviews_editors", Columns: []*schema.Column{GroupsColumns[50]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_reviews_viewers", Columns: []*schema.Column{GroupsColumns[51]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_vulnerabilities_blocked_groups", Columns: []*schema.Column{GroupsColumns[52]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_vulnerabilities_editors", Columns: []*schema.Column{GroupsColumns[53]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_vulnerabilities_viewers", Columns: []*schema.Column{GroupsColumns[54]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "groups_workflow_definitions_groups", Columns: []*schema.Column{GroupsColumns[55]}, RefColumns: []*schema.Column{WorkflowDefinitionsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "group_display_id_owner_id", Unique: true, Columns: []*schema.Column{GroupsColumns[7], GroupsColumns[45]}, }, { Name: "group_owner_id", Unique: false, Columns: []*schema.Column{GroupsColumns[45]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "group_name_owner_id", Unique: true, Columns: []*schema.Column{GroupsColumns[9], GroupsColumns[45]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // GroupHistoryColumns holds the columns for the "group_history" table. GroupHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString, SchemaType: map[string]string{"postgres": "citext"}}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "is_managed", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "gravatar_logo_url", Type: field.TypeString, Nullable: true}, {Name: "logo_url", Type: field.TypeString, Nullable: true}, {Name: "display_name", Type: field.TypeString, Size: 64, Default: ""}, {Name: "scim_external_id", Type: field.TypeString, Nullable: true}, {Name: "scim_display_name", Type: field.TypeString, Nullable: true}, {Name: "scim_active", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "scim_group_mailing", Type: field.TypeString, Nullable: true}, } // GroupHistoryTable holds the schema information for the "group_history" table. GroupHistoryTable = &schema.Table{ Name: "group_history", Columns: GroupHistoryColumns, PrimaryKey: []*schema.Column{GroupHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "grouphistory_history_time", Unique: false, Columns: []*schema.Column{GroupHistoryColumns[1]}, }, }, } // GroupMembershipsColumns holds the columns for the "group_memberships" table. GroupMembershipsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "role", Type: field.TypeEnum, Enums: []string{"ADMIN", "MEMBER"}, Default: "MEMBER"}, {Name: "group_id", Type: field.TypeString}, {Name: "user_id", Type: field.TypeString}, {Name: "group_membership_org_membership", Type: field.TypeString, Nullable: true}, } // GroupMembershipsTable holds the schema information for the "group_memberships" table. GroupMembershipsTable = &schema.Table{ Name: "group_memberships", Columns: GroupMembershipsColumns, PrimaryKey: []*schema.Column{GroupMembershipsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "group_memberships_groups_group", Columns: []*schema.Column{GroupMembershipsColumns[6]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "group_memberships_users_user", Columns: []*schema.Column{GroupMembershipsColumns[7]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "group_memberships_org_memberships_org_membership", Columns: []*schema.Column{GroupMembershipsColumns[8]}, RefColumns: []*schema.Column{OrgMembershipsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "groupmembership_user_id_group_id", Unique: true, Columns: []*schema.Column{GroupMembershipsColumns[7], GroupMembershipsColumns[6]}, }, }, } // GroupMembershipHistoryColumns holds the columns for the "group_membership_history" table. GroupMembershipHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "role", Type: field.TypeEnum, Enums: []string{"ADMIN", "MEMBER"}, Default: "MEMBER"}, {Name: "group_id", Type: field.TypeString}, {Name: "user_id", Type: field.TypeString}, } // GroupMembershipHistoryTable holds the schema information for the "group_membership_history" table. GroupMembershipHistoryTable = &schema.Table{ Name: "group_membership_history", Columns: GroupMembershipHistoryColumns, PrimaryKey: []*schema.Column{GroupMembershipHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "groupmembershiphistory_history_time", Unique: false, Columns: []*schema.Column{GroupMembershipHistoryColumns[1]}, }, }, } // GroupSettingsColumns holds the columns for the "group_settings" table. GroupSettingsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "visibility", Type: field.TypeEnum, Enums: []string{"PUBLIC", "PRIVATE"}, Default: "PUBLIC"}, {Name: "join_policy", Type: field.TypeEnum, Enums: []string{"OPEN", "INVITE_ONLY", "APPLICATION_ONLY", "INVITE_OR_APPLICATION"}, Default: "INVITE_OR_APPLICATION"}, {Name: "sync_to_slack", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "sync_to_github", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "group_id", Type: field.TypeString, Unique: true, Nullable: true}, } // GroupSettingsTable holds the schema information for the "group_settings" table. GroupSettingsTable = &schema.Table{ Name: "group_settings", Columns: GroupSettingsColumns, PrimaryKey: []*schema.Column{GroupSettingsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "group_settings_groups_setting", Columns: []*schema.Column{GroupSettingsColumns[11]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, }, } // GroupSettingHistoryColumns holds the columns for the "group_setting_history" table. GroupSettingHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "visibility", Type: field.TypeEnum, Enums: []string{"PUBLIC", "PRIVATE"}, Default: "PUBLIC"}, {Name: "join_policy", Type: field.TypeEnum, Enums: []string{"OPEN", "INVITE_ONLY", "APPLICATION_ONLY", "INVITE_OR_APPLICATION"}, Default: "INVITE_OR_APPLICATION"}, {Name: "sync_to_slack", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "sync_to_github", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "group_id", Type: field.TypeString, Nullable: true}, } // GroupSettingHistoryTable holds the schema information for the "group_setting_history" table. GroupSettingHistoryTable = &schema.Table{ Name: "group_setting_history", Columns: GroupSettingHistoryColumns, PrimaryKey: []*schema.Column{GroupSettingHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "groupsettinghistory_history_time", Unique: false, Columns: []*schema.Column{GroupSettingHistoryColumns[1]}, }, }, } // HushesColumns holds the columns for the "hushes" table. HushesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "kind", Type: field.TypeString, Nullable: true}, {Name: "secret_name", Type: field.TypeString, Nullable: true}, {Name: "secret_value", Type: field.TypeString, Nullable: true}, {Name: "credential_set", Type: field.TypeJSON, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "last_used_at", Type: field.TypeTime, Nullable: true}, {Name: "expires_at", Type: field.TypeTime, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // HushesTable holds the schema information for the "hushes" table. HushesTable = &schema.Table{ Name: "hushes", Columns: HushesColumns, PrimaryKey: []*schema.Column{HushesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "hushes_organizations_secrets", Columns: []*schema.Column{HushesColumns[19]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "hush_owner_id", Unique: false, Columns: []*schema.Column{HushesColumns[19]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // HushHistoryColumns holds the columns for the "hush_history" table. HushHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "kind", Type: field.TypeString, Nullable: true}, {Name: "secret_name", Type: field.TypeString, Nullable: true}, {Name: "secret_value", Type: field.TypeString, Nullable: true}, {Name: "credential_set", Type: field.TypeJSON, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "last_used_at", Type: field.TypeTime, Nullable: true}, {Name: "expires_at", Type: field.TypeTime, Nullable: true}, } // HushHistoryTable holds the schema information for the "hush_history" table. HushHistoryTable = &schema.Table{ Name: "hush_history", Columns: HushHistoryColumns, PrimaryKey: []*schema.Column{HushHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "hushhistory_history_time", Unique: false, Columns: []*schema.Column{HushHistoryColumns[1]}, }, }, } // ImpersonationEventsColumns holds the columns for the "impersonation_events" table. ImpersonationEventsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "impersonation_type", Type: field.TypeEnum, Enums: []string{"SUPPORT", "ADMIN", "JOB"}}, {Name: "action", Type: field.TypeEnum, Enums: []string{"START", "STOP"}}, {Name: "reason", Type: field.TypeString, Nullable: true}, {Name: "ip_address", Type: field.TypeString, Nullable: true}, {Name: "user_agent", Type: field.TypeString, Nullable: true}, {Name: "scopes", Type: field.TypeJSON, Nullable: true}, {Name: "organization_id", Type: field.TypeString}, {Name: "user_id", Type: field.TypeString}, {Name: "target_user_id", Type: field.TypeString}, } // ImpersonationEventsTable holds the schema information for the "impersonation_events" table. ImpersonationEventsTable = &schema.Table{ Name: "impersonation_events", Columns: ImpersonationEventsColumns, PrimaryKey: []*schema.Column{ImpersonationEventsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "impersonation_events_organizations_impersonation_events", Columns: []*schema.Column{ImpersonationEventsColumns[14]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "impersonation_events_users_impersonation_events", Columns: []*schema.Column{ImpersonationEventsColumns[15]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "impersonation_events_users_targeted_impersonations", Columns: []*schema.Column{ImpersonationEventsColumns[16]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.NoAction, }, }, } // IntegrationsColumns holds the columns for the "integrations" table. IntegrationsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "kind", Type: field.TypeString, Nullable: true}, {Name: "integration_type", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "file_integrations", Type: field.TypeString, Nullable: true}, {Name: "group_integrations", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // IntegrationsTable holds the schema information for the "integrations" table. IntegrationsTable = &schema.Table{ Name: "integrations", Columns: IntegrationsColumns, PrimaryKey: []*schema.Column{IntegrationsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "integrations_files_integrations", Columns: []*schema.Column{IntegrationsColumns[16]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "integrations_groups_integrations", Columns: []*schema.Column{IntegrationsColumns[17]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "integrations_organizations_integrations", Columns: []*schema.Column{IntegrationsColumns[18]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "integration_owner_id", Unique: false, Columns: []*schema.Column{IntegrationsColumns[18]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // IntegrationHistoryColumns holds the columns for the "integration_history" table. IntegrationHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "kind", Type: field.TypeString, Nullable: true}, {Name: "integration_type", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, } // IntegrationHistoryTable holds the schema information for the "integration_history" table. IntegrationHistoryTable = &schema.Table{ Name: "integration_history", Columns: IntegrationHistoryColumns, PrimaryKey: []*schema.Column{IntegrationHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "integrationhistory_history_time", Unique: false, Columns: []*schema.Column{IntegrationHistoryColumns[1]}, }, }, } // InternalPoliciesColumns holds the columns for the "internal_policies" table. InternalPoliciesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "revision", Type: field.TypeString, Nullable: true, Default: "v0.0.1"}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PUBLISHED", "DRAFT", "NEEDS_APPROVAL", "APPROVED", "ARCHIVED"}, Default: "DRAFT"}, {Name: "policy_type", Type: field.TypeString, Nullable: true}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "approval_required", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "review_due", Type: field.TypeTime, Nullable: true}, {Name: "review_frequency", Type: field.TypeEnum, Nullable: true, Enums: []string{"YEARLY", "QUARTERLY", "BIANNUALLY", "MONTHLY"}, Default: "YEARLY"}, {Name: "summary", Type: field.TypeString, Nullable: true}, {Name: "tag_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_tag_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "control_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_control_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "improvement_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_improvement_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "url", Type: field.TypeString, Nullable: true}, {Name: "internal_policy_kind_name", Type: field.TypeString, Nullable: true}, {Name: "custom_type_enum_internal_policies", Type: field.TypeString, Nullable: true}, {Name: "approver_id", Type: field.TypeString, Nullable: true}, {Name: "delegate_id", Type: field.TypeString, Nullable: true}, {Name: "internal_policy_kind_id", Type: field.TypeString, Nullable: true}, {Name: "file_id", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // InternalPoliciesTable holds the schema information for the "internal_policies" table. InternalPoliciesTable = &schema.Table{ Name: "internal_policies", Columns: InternalPoliciesColumns, PrimaryKey: []*schema.Column{InternalPoliciesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "internal_policies_custom_type_enums_internal_policies", Columns: []*schema.Column{InternalPoliciesColumns[29]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "internal_policies_groups_approver", Columns: []*schema.Column{InternalPoliciesColumns[30]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "internal_policies_groups_delegate", Columns: []*schema.Column{InternalPoliciesColumns[31]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "internal_policies_custom_type_enums_internal_policy_kind", Columns: []*schema.Column{InternalPoliciesColumns[32]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "internal_policies_files_file", Columns: []*schema.Column{InternalPoliciesColumns[33]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "internal_policies_organizations_internal_policies", Columns: []*schema.Column{InternalPoliciesColumns[34]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "internalpolicy_display_id_owner_id", Unique: true, Columns: []*schema.Column{InternalPoliciesColumns[7], InternalPoliciesColumns[34]}, }, { Name: "internalpolicy_owner_id", Unique: false, Columns: []*schema.Column{InternalPoliciesColumns[34]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // InternalPolicyHistoryColumns holds the columns for the "internal_policy_history" table. InternalPolicyHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "revision", Type: field.TypeString, Nullable: true, Default: "v0.0.1"}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PUBLISHED", "DRAFT", "NEEDS_APPROVAL", "APPROVED", "ARCHIVED"}, Default: "DRAFT"}, {Name: "policy_type", Type: field.TypeString, Nullable: true}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "approval_required", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "review_due", Type: field.TypeTime, Nullable: true}, {Name: "review_frequency", Type: field.TypeEnum, Nullable: true, Enums: []string{"YEARLY", "QUARTERLY", "BIANNUALLY", "MONTHLY"}, Default: "YEARLY"}, {Name: "approver_id", Type: field.TypeString, Nullable: true}, {Name: "delegate_id", Type: field.TypeString, Nullable: true}, {Name: "summary", Type: field.TypeString, Nullable: true}, {Name: "tag_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_tag_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "control_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_control_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "improvement_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_improvement_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "url", Type: field.TypeString, Nullable: true}, {Name: "file_id", Type: field.TypeString, Nullable: true}, {Name: "internal_policy_kind_name", Type: field.TypeString, Nullable: true}, {Name: "internal_policy_kind_id", Type: field.TypeString, Nullable: true}, } // InternalPolicyHistoryTable holds the schema information for the "internal_policy_history" table. InternalPolicyHistoryTable = &schema.Table{ Name: "internal_policy_history", Columns: InternalPolicyHistoryColumns, PrimaryKey: []*schema.Column{InternalPolicyHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "internalpolicyhistory_history_time", Unique: false, Columns: []*schema.Column{InternalPolicyHistoryColumns[1]}, }, }, } // InvitesColumns holds the columns for the "invites" table. InvitesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "token", Type: field.TypeString, Unique: true}, {Name: "expires", Type: field.TypeTime, Nullable: true}, {Name: "recipient", Type: field.TypeString}, {Name: "status", Type: field.TypeEnum, Enums: []string{"INVITATION_SENT", "APPROVAL_REQUIRED", "INVITATION_ACCEPTED", "INVITATION_EXPIRED"}, Default: "INVITATION_SENT"}, {Name: "role", Type: field.TypeEnum, Enums: []string{"ADMIN", "MEMBER", "OWNER"}, Default: "MEMBER"}, {Name: "send_attempts", Type: field.TypeInt, Default: 1}, {Name: "requestor_id", Type: field.TypeString, Nullable: true}, {Name: "secret", Type: field.TypeBytes}, {Name: "ownership_transfer", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // InvitesTable holds the schema information for the "invites" table. InvitesTable = &schema.Table{ Name: "invites", Columns: InvitesColumns, PrimaryKey: []*schema.Column{InvitesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "invites_organizations_invites", Columns: []*schema.Column{InvitesColumns[16]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "invite_owner_id", Unique: false, Columns: []*schema.Column{InvitesColumns[16]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "invite_recipient_owner_id", Unique: true, Columns: []*schema.Column{InvitesColumns[9], InvitesColumns[16]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // JobResultsColumns holds the columns for the "job_results" table. JobResultsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"CANCELED", "SUCCESS", "PENDING", "FAILED"}}, {Name: "exit_code", Type: field.TypeInt}, {Name: "finished_at", Type: field.TypeTime}, {Name: "started_at", Type: field.TypeTime}, {Name: "log", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "scheduled_job_id", Type: field.TypeString}, {Name: "file_id", Type: field.TypeString}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // JobResultsTable holds the schema information for the "job_results" table. JobResultsTable = &schema.Table{ Name: "job_results", Columns: JobResultsColumns, PrimaryKey: []*schema.Column{JobResultsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "job_results_scheduled_jobs_scheduled_job", Columns: []*schema.Column{JobResultsColumns[12]}, RefColumns: []*schema.Column{ScheduledJobsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "job_results_files_file", Columns: []*schema.Column{JobResultsColumns[13]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "job_results_organizations_job_results", Columns: []*schema.Column{JobResultsColumns[14]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "jobresult_owner_id", Unique: false, Columns: []*schema.Column{JobResultsColumns[14]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // JobRunnersColumns holds the columns for the "job_runners" table. JobRunnersColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "status", Type: field.TypeEnum, Enums: []string{"ONLINE", "OFFLINE"}, Default: "OFFLINE"}, {Name: "ip_address", Type: field.TypeString, Nullable: true}, {Name: "last_seen", Type: field.TypeTime, Nullable: true}, {Name: "version", Type: field.TypeString, Nullable: true}, {Name: "os", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // JobRunnersTable holds the schema information for the "job_runners" table. JobRunnersTable = &schema.Table{ Name: "job_runners", Columns: JobRunnersColumns, PrimaryKey: []*schema.Column{JobRunnersColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "job_runners_organizations_job_runners", Columns: []*schema.Column{JobRunnersColumns[18]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "jobrunner_display_id_owner_id", Unique: true, Columns: []*schema.Column{JobRunnersColumns[7], JobRunnersColumns[18]}, }, { Name: "jobrunner_owner_id", Unique: false, Columns: []*schema.Column{JobRunnersColumns[18]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // JobRunnerRegistrationTokensColumns holds the columns for the "job_runner_registration_tokens" table. JobRunnerRegistrationTokensColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "token", Type: field.TypeString, Unique: true}, {Name: "expires_at", Type: field.TypeTime}, {Name: "last_used_at", Type: field.TypeTime, Nullable: true}, {Name: "job_runner_id", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // JobRunnerRegistrationTokensTable holds the schema information for the "job_runner_registration_tokens" table. JobRunnerRegistrationTokensTable = &schema.Table{ Name: "job_runner_registration_tokens", Columns: JobRunnerRegistrationTokensColumns, PrimaryKey: []*schema.Column{JobRunnerRegistrationTokensColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "job_runner_registration_tokens_job_runners_job_runner", Columns: []*schema.Column{JobRunnerRegistrationTokensColumns[11]}, RefColumns: []*schema.Column{JobRunnersColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "job_runner_registration_tokens_organizations_job_runner_registration_tokens", Columns: []*schema.Column{JobRunnerRegistrationTokensColumns[12]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "jobrunnerregistrationtoken_owner_id", Unique: false, Columns: []*schema.Column{JobRunnerRegistrationTokensColumns[12]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // JobRunnerTokensColumns holds the columns for the "job_runner_tokens" table. JobRunnerTokensColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "token", Type: field.TypeString, Unique: true}, {Name: "expires_at", Type: field.TypeTime, Nullable: true}, {Name: "last_used_at", Type: field.TypeTime, Nullable: true}, {Name: "is_active", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "revoked_reason", Type: field.TypeString, Nullable: true}, {Name: "revoked_by", Type: field.TypeString, Nullable: true}, {Name: "revoked_at", Type: field.TypeTime, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // JobRunnerTokensTable holds the schema information for the "job_runner_tokens" table. JobRunnerTokensTable = &schema.Table{ Name: "job_runner_tokens", Columns: JobRunnerTokensColumns, PrimaryKey: []*schema.Column{JobRunnerTokensColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "job_runner_tokens_organizations_job_runner_tokens", Columns: []*schema.Column{JobRunnerTokensColumns[15]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "jobrunnertoken_owner_id", Unique: false, Columns: []*schema.Column{JobRunnerTokensColumns[15]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "jobrunnertoken_token_expires_at_is_active", Unique: false, Columns: []*schema.Column{JobRunnerTokensColumns[8], JobRunnerTokensColumns[9], JobRunnerTokensColumns[11]}, }, }, } // JobTemplatesColumns holds the columns for the "job_templates" table. JobTemplatesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "title", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "platform", Type: field.TypeEnum, Enums: []string{"GO", "TS"}}, {Name: "windmill_path", Type: field.TypeString, Nullable: true}, {Name: "download_url", Type: field.TypeString}, {Name: "configuration", Type: field.TypeJSON, Nullable: true}, {Name: "cron", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // JobTemplatesTable holds the schema information for the "job_templates" table. JobTemplatesTable = &schema.Table{ Name: "job_templates", Columns: JobTemplatesColumns, PrimaryKey: []*schema.Column{JobTemplatesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "job_templates_organizations_job_templates", Columns: []*schema.Column{JobTemplatesColumns[19]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "jobtemplate_display_id_owner_id", Unique: true, Columns: []*schema.Column{JobTemplatesColumns[7], JobTemplatesColumns[19]}, }, { Name: "jobtemplate_owner_id", Unique: false, Columns: []*schema.Column{JobTemplatesColumns[19]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // JobTemplateHistoryColumns holds the columns for the "job_template_history" table. JobTemplateHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "title", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "platform", Type: field.TypeEnum, Enums: []string{"GO", "TS"}}, {Name: "windmill_path", Type: field.TypeString, Nullable: true}, {Name: "download_url", Type: field.TypeString}, {Name: "configuration", Type: field.TypeJSON, Nullable: true}, {Name: "cron", Type: field.TypeString, Nullable: true}, } // JobTemplateHistoryTable holds the schema information for the "job_template_history" table. JobTemplateHistoryTable = &schema.Table{ Name: "job_template_history", Columns: JobTemplateHistoryColumns, PrimaryKey: []*schema.Column{JobTemplateHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "jobtemplatehistory_history_time", Unique: false, Columns: []*schema.Column{JobTemplateHistoryColumns[1]}, }, }, } // MappableDomainsColumns holds the columns for the "mappable_domains" table. MappableDomainsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "name", Type: field.TypeString, Size: 255}, {Name: "zone_id", Type: field.TypeString}, } // MappableDomainsTable holds the schema information for the "mappable_domains" table. MappableDomainsTable = &schema.Table{ Name: "mappable_domains", Columns: MappableDomainsColumns, PrimaryKey: []*schema.Column{MappableDomainsColumns[0]}, Indexes: []*schema.Index{ { Name: "mappabledomain_name", Unique: true, Columns: []*schema.Column{MappableDomainsColumns[8]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // MappableDomainHistoryColumns holds the columns for the "mappable_domain_history" table. MappableDomainHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "name", Type: field.TypeString, Size: 255}, {Name: "zone_id", Type: field.TypeString}, } // MappableDomainHistoryTable holds the schema information for the "mappable_domain_history" table. MappableDomainHistoryTable = &schema.Table{ Name: "mappable_domain_history", Columns: MappableDomainHistoryColumns, PrimaryKey: []*schema.Column{MappableDomainHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "mappabledomainhistory_history_time", Unique: false, Columns: []*schema.Column{MappableDomainHistoryColumns[1]}, }, }, } // MappedControlsColumns holds the columns for the "mapped_controls" table. MappedControlsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "mapping_type", Type: field.TypeEnum, Enums: []string{"EQUAL", "SUPERSET", "SUBSET", "INTERSECT", "PARTIAL"}, Default: "EQUAL"}, {Name: "relation", Type: field.TypeString, Nullable: true}, {Name: "confidence", Type: field.TypeInt, Nullable: true}, {Name: "source", Type: field.TypeEnum, Nullable: true, Enums: []string{"MANUAL", "SUGGESTED", "IMPORTED"}, Default: "MANUAL"}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // MappedControlsTable holds the schema information for the "mapped_controls" table. MappedControlsTable = &schema.Table{ Name: "mapped_controls", Columns: MappedControlsColumns, PrimaryKey: []*schema.Column{MappedControlsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "mapped_controls_organizations_mapped_controls", Columns: []*schema.Column{MappedControlsColumns[15]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "mappedcontrol_owner_id", Unique: false, Columns: []*schema.Column{MappedControlsColumns[15]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // MappedControlHistoryColumns holds the columns for the "mapped_control_history" table. MappedControlHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "mapping_type", Type: field.TypeEnum, Enums: []string{"EQUAL", "SUPERSET", "SUBSET", "INTERSECT", "PARTIAL"}, Default: "EQUAL"}, {Name: "relation", Type: field.TypeString, Nullable: true}, {Name: "confidence", Type: field.TypeInt, Nullable: true}, {Name: "source", Type: field.TypeEnum, Nullable: true, Enums: []string{"MANUAL", "SUGGESTED", "IMPORTED"}, Default: "MANUAL"}, } // MappedControlHistoryTable holds the schema information for the "mapped_control_history" table. MappedControlHistoryTable = &schema.Table{ Name: "mapped_control_history", Columns: MappedControlHistoryColumns, PrimaryKey: []*schema.Column{MappedControlHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "mappedcontrolhistory_history_time", Unique: false, Columns: []*schema.Column{MappedControlHistoryColumns[1]}, }, }, } // NarrativesColumns holds the columns for the "narratives" table. NarrativesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "control_objective_narratives", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "subcontrol_narratives", Type: field.TypeString, Nullable: true}, } // NarrativesTable holds the schema information for the "narratives" table. NarrativesTable = &schema.Table{ Name: "narratives", Columns: NarrativesColumns, PrimaryKey: []*schema.Column{NarrativesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "narratives_control_objectives_narratives", Columns: []*schema.Column{NarrativesColumns[15]}, RefColumns: []*schema.Column{ControlObjectivesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "narratives_organizations_narratives", Columns: []*schema.Column{NarrativesColumns[16]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "narratives_subcontrols_narratives", Columns: []*schema.Column{NarrativesColumns[17]}, RefColumns: []*schema.Column{SubcontrolsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "narrative_display_id_owner_id", Unique: true, Columns: []*schema.Column{NarrativesColumns[7], NarrativesColumns[16]}, }, { Name: "narrative_owner_id", Unique: false, Columns: []*schema.Column{NarrativesColumns[16]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // NarrativeHistoryColumns holds the columns for the "narrative_history" table. NarrativeHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, } // NarrativeHistoryTable holds the schema information for the "narrative_history" table. NarrativeHistoryTable = &schema.Table{ Name: "narrative_history", Columns: NarrativeHistoryColumns, PrimaryKey: []*schema.Column{NarrativeHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "narrativehistory_history_time", Unique: false, Columns: []*schema.Column{NarrativeHistoryColumns[1]}, }, }, } // NotesColumns holds the columns for the "notes" table. NotesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "text", Type: field.TypeString, Size: 2147483647}, {Name: "control_comments", Type: field.TypeString, Nullable: true}, {Name: "entity_notes", Type: field.TypeString, Nullable: true}, {Name: "evidence_comments", Type: field.TypeString, Nullable: true}, {Name: "finding_comments", Type: field.TypeString, Nullable: true}, {Name: "internal_policy_comments", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "procedure_comments", Type: field.TypeString, Nullable: true}, {Name: "program_notes", Type: field.TypeString, Nullable: true}, {Name: "remediation_comments", Type: field.TypeString, Nullable: true}, {Name: "review_comments", Type: field.TypeString, Nullable: true}, {Name: "risk_comments", Type: field.TypeString, Nullable: true}, {Name: "subcontrol_comments", Type: field.TypeString, Nullable: true}, {Name: "task_comments", Type: field.TypeString, Nullable: true}, {Name: "trust_center_posts", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_comments", Type: field.TypeString, Nullable: true}, } // NotesTable holds the schema information for the "notes" table. NotesTable = &schema.Table{ Name: "notes", Columns: NotesColumns, PrimaryKey: []*schema.Column{NotesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "notes_controls_comments", Columns: []*schema.Column{NotesColumns[9]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_entities_notes", Columns: []*schema.Column{NotesColumns[10]}, RefColumns: []*schema.Column{EntitiesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_evidences_comments", Columns: []*schema.Column{NotesColumns[11]}, RefColumns: []*schema.Column{EvidencesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_findings_comments", Columns: []*schema.Column{NotesColumns[12]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_internal_policies_comments", Columns: []*schema.Column{NotesColumns[13]}, RefColumns: []*schema.Column{InternalPoliciesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_organizations_notes", Columns: []*schema.Column{NotesColumns[14]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_procedures_comments", Columns: []*schema.Column{NotesColumns[15]}, RefColumns: []*schema.Column{ProceduresColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_programs_notes", Columns: []*schema.Column{NotesColumns[16]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_remediations_comments", Columns: []*schema.Column{NotesColumns[17]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_reviews_comments", Columns: []*schema.Column{NotesColumns[18]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_risks_comments", Columns: []*schema.Column{NotesColumns[19]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_subcontrols_comments", Columns: []*schema.Column{NotesColumns[20]}, RefColumns: []*schema.Column{SubcontrolsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_tasks_comments", Columns: []*schema.Column{NotesColumns[21]}, RefColumns: []*schema.Column{TasksColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_trust_centers_posts", Columns: []*schema.Column{NotesColumns[22]}, RefColumns: []*schema.Column{TrustCentersColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notes_vulnerabilities_comments", Columns: []*schema.Column{NotesColumns[23]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "note_display_id_owner_id", Unique: true, Columns: []*schema.Column{NotesColumns[7], NotesColumns[14]}, }, { Name: "note_owner_id", Unique: false, Columns: []*schema.Column{NotesColumns[14]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // NoteHistoryColumns holds the columns for the "note_history" table. NoteHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "text", Type: field.TypeString, Size: 2147483647}, } // NoteHistoryTable holds the schema information for the "note_history" table. NoteHistoryTable = &schema.Table{ Name: "note_history", Columns: NoteHistoryColumns, PrimaryKey: []*schema.Column{NoteHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "notehistory_history_time", Unique: false, Columns: []*schema.Column{NoteHistoryColumns[1]}, }, }, } // NotificationsColumns holds the columns for the "notifications" table. NotificationsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "notification_type", Type: field.TypeEnum, Enums: []string{"ORGANIZATION", "USER"}}, {Name: "object_type", Type: field.TypeString}, {Name: "title", Type: field.TypeString}, {Name: "body", Type: field.TypeString, Size: 2147483647}, {Name: "data", Type: field.TypeJSON, Nullable: true}, {Name: "read_at", Type: field.TypeTime, Nullable: true}, {Name: "channels", Type: field.TypeJSON, Nullable: true}, {Name: "topic", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "user_id", Type: field.TypeString, Nullable: true}, } // NotificationsTable holds the schema information for the "notifications" table. NotificationsTable = &schema.Table{ Name: "notifications", Columns: NotificationsColumns, PrimaryKey: []*schema.Column{NotificationsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "notifications_organizations_notifications", Columns: []*schema.Column{NotificationsColumns[14]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "notifications_users_notifications", Columns: []*schema.Column{NotificationsColumns[15]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "notification_user_id_read_at_owner_id", Unique: false, Columns: []*schema.Column{NotificationsColumns[15], NotificationsColumns[11], NotificationsColumns[14]}, }, }, } // OnboardingsColumns holds the columns for the "onboardings" table. OnboardingsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "company_name", Type: field.TypeString}, {Name: "domains", Type: field.TypeJSON, Nullable: true}, {Name: "company_details", Type: field.TypeJSON, Nullable: true}, {Name: "user_details", Type: field.TypeJSON, Nullable: true}, {Name: "compliance", Type: field.TypeJSON, Nullable: true}, {Name: "organization_id", Type: field.TypeString, Nullable: true}, } // OnboardingsTable holds the schema information for the "onboardings" table. OnboardingsTable = &schema.Table{ Name: "onboardings", Columns: OnboardingsColumns, PrimaryKey: []*schema.Column{OnboardingsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "onboardings_organizations_organization", Columns: []*schema.Column{OnboardingsColumns[8]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, } // OrgMembershipsColumns holds the columns for the "org_memberships" table. OrgMembershipsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "role", Type: field.TypeEnum, Enums: []string{"ADMIN", "MEMBER", "OWNER"}, Default: "MEMBER"}, {Name: "organization_id", Type: field.TypeString}, {Name: "user_id", Type: field.TypeString}, } // OrgMembershipsTable holds the schema information for the "org_memberships" table. OrgMembershipsTable = &schema.Table{ Name: "org_memberships", Columns: OrgMembershipsColumns, PrimaryKey: []*schema.Column{OrgMembershipsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "org_memberships_organizations_organization", Columns: []*schema.Column{OrgMembershipsColumns[6]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "org_memberships_users_user", Columns: []*schema.Column{OrgMembershipsColumns[7]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.NoAction, }, }, Indexes: []*schema.Index{ { Name: "orgmembership_user_id_organization_id", Unique: true, Columns: []*schema.Column{OrgMembershipsColumns[7], OrgMembershipsColumns[6]}, }, }, } // OrgMembershipHistoryColumns holds the columns for the "org_membership_history" table. OrgMembershipHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "role", Type: field.TypeEnum, Enums: []string{"ADMIN", "MEMBER", "OWNER"}, Default: "MEMBER"}, {Name: "organization_id", Type: field.TypeString}, {Name: "user_id", Type: field.TypeString}, } // OrgMembershipHistoryTable holds the schema information for the "org_membership_history" table. OrgMembershipHistoryTable = &schema.Table{ Name: "org_membership_history", Columns: OrgMembershipHistoryColumns, PrimaryKey: []*schema.Column{OrgMembershipHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "orgmembershiphistory_history_time", Unique: false, Columns: []*schema.Column{OrgMembershipHistoryColumns[1]}, }, }, } // OrgModulesColumns holds the columns for the "org_modules" table. OrgModulesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "module", Type: field.TypeString}, {Name: "price", Type: field.TypeJSON, Nullable: true}, {Name: "stripe_price_id", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeString, Nullable: true}, {Name: "visibility", Type: field.TypeString, Nullable: true}, {Name: "active", Type: field.TypeBool, Default: true}, {Name: "module_lookup_key", Type: field.TypeString, Nullable: true}, {Name: "price_id", Type: field.TypeString, Nullable: true}, {Name: "org_product_org_modules", Type: field.TypeString, Nullable: true}, {Name: "subscription_id", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // OrgModulesTable holds the schema information for the "org_modules" table. OrgModulesTable = &schema.Table{ Name: "org_modules", Columns: OrgModulesColumns, PrimaryKey: []*schema.Column{OrgModulesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "org_modules_org_products_org_modules", Columns: []*schema.Column{OrgModulesColumns[16]}, RefColumns: []*schema.Column{OrgProductsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "org_modules_org_subscriptions_modules", Columns: []*schema.Column{OrgModulesColumns[17]}, RefColumns: []*schema.Column{OrgSubscriptionsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "org_modules_organizations_org_modules", Columns: []*schema.Column{OrgModulesColumns[18]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "orgmodule_owner_id", Unique: false, Columns: []*schema.Column{OrgModulesColumns[18]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // OrgPricesColumns holds the columns for the "org_prices" table. OrgPricesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "price", Type: field.TypeJSON, Nullable: true}, {Name: "stripe_price_id", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeString, Nullable: true}, {Name: "active", Type: field.TypeBool, Default: true}, {Name: "product_id", Type: field.TypeString, Nullable: true}, {Name: "subscription_id", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // OrgPricesTable holds the schema information for the "org_prices" table. OrgPricesTable = &schema.Table{ Name: "org_prices", Columns: OrgPricesColumns, PrimaryKey: []*schema.Column{OrgPricesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "org_prices_org_subscriptions_prices", Columns: []*schema.Column{OrgPricesColumns[13]}, RefColumns: []*schema.Column{OrgSubscriptionsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "org_prices_organizations_org_prices", Columns: []*schema.Column{OrgPricesColumns[14]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "orgprice_owner_id", Unique: false, Columns: []*schema.Column{OrgPricesColumns[14]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // OrgProductsColumns holds the columns for the "org_products" table. OrgProductsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "module", Type: field.TypeString}, {Name: "stripe_product_id", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeString, Nullable: true}, {Name: "active", Type: field.TypeBool, Default: true}, {Name: "price_id", Type: field.TypeString, Nullable: true}, {Name: "org_module_org_products", Type: field.TypeString, Nullable: true}, {Name: "subscription_id", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // OrgProductsTable holds the schema information for the "org_products" table. OrgProductsTable = &schema.Table{ Name: "org_products", Columns: OrgProductsColumns, PrimaryKey: []*schema.Column{OrgProductsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "org_products_org_modules_org_products", Columns: []*schema.Column{OrgProductsColumns[13]}, RefColumns: []*schema.Column{OrgModulesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "org_products_org_subscriptions_products", Columns: []*schema.Column{OrgProductsColumns[14]}, RefColumns: []*schema.Column{OrgSubscriptionsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "org_products_organizations_org_products", Columns: []*schema.Column{OrgProductsColumns[15]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "orgproduct_owner_id", Unique: false, Columns: []*schema.Column{OrgProductsColumns[15]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // OrgSubscriptionsColumns holds the columns for the "org_subscriptions" table. OrgSubscriptionsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "stripe_subscription_id", Type: field.TypeString, Nullable: true}, {Name: "stripe_subscription_status", Type: field.TypeString, Nullable: true}, {Name: "active", Type: field.TypeBool, Default: true}, {Name: "expires_at", Type: field.TypeTime, Nullable: true}, {Name: "trial_expires_at", Type: field.TypeTime, Nullable: true}, {Name: "days_until_due", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // OrgSubscriptionsTable holds the schema information for the "org_subscriptions" table. OrgSubscriptionsTable = &schema.Table{ Name: "org_subscriptions", Columns: OrgSubscriptionsColumns, PrimaryKey: []*schema.Column{OrgSubscriptionsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "org_subscriptions_organizations_org_subscriptions", Columns: []*schema.Column{OrgSubscriptionsColumns[14]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "orgsubscription_owner_id", Unique: false, Columns: []*schema.Column{OrgSubscriptionsColumns[14]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // OrgSubscriptionHistoryColumns holds the columns for the "org_subscription_history" table. OrgSubscriptionHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "stripe_subscription_id", Type: field.TypeString, Nullable: true}, {Name: "stripe_subscription_status", Type: field.TypeString, Nullable: true}, {Name: "active", Type: field.TypeBool, Default: true}, {Name: "expires_at", Type: field.TypeTime, Nullable: true}, {Name: "trial_expires_at", Type: field.TypeTime, Nullable: true}, {Name: "days_until_due", Type: field.TypeString, Nullable: true}, } // OrgSubscriptionHistoryTable holds the schema information for the "org_subscription_history" table. OrgSubscriptionHistoryTable = &schema.Table{ Name: "org_subscription_history", Columns: OrgSubscriptionHistoryColumns, PrimaryKey: []*schema.Column{OrgSubscriptionHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "orgsubscriptionhistory_history_time", Unique: false, Columns: []*schema.Column{OrgSubscriptionHistoryColumns[1]}, }, }, } // OrganizationsColumns holds the columns for the "organizations" table. OrganizationsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "name", Type: field.TypeString, Size: 160, SchemaType: map[string]string{"postgres": "citext"}}, {Name: "display_name", Type: field.TypeString, Size: 64, Default: ""}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "personal_org", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "avatar_remote_url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "avatar_updated_at", Type: field.TypeTime, Nullable: true}, {Name: "dedicated_db", Type: field.TypeBool, Default: false}, {Name: "stripe_customer_id", Type: field.TypeString, Unique: true, Nullable: true}, {Name: "parent_organization_id", Type: field.TypeString, Nullable: true}, {Name: "avatar_local_file_id", Type: field.TypeString, Nullable: true}, } // OrganizationsTable holds the schema information for the "organizations" table. OrganizationsTable = &schema.Table{ Name: "organizations", Columns: OrganizationsColumns, PrimaryKey: []*schema.Column{OrganizationsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "organizations_organizations_children", Columns: []*schema.Column{OrganizationsColumns[16]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "organizations_files_avatar_file", Columns: []*schema.Column{OrganizationsColumns[17]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "organization_name", Unique: true, Columns: []*schema.Column{OrganizationsColumns[8]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // OrganizationHistoryColumns holds the columns for the "organization_history" table. OrganizationHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "name", Type: field.TypeString, Size: 160, SchemaType: map[string]string{"postgres": "citext"}}, {Name: "display_name", Type: field.TypeString, Size: 64, Default: ""}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "parent_organization_id", Type: field.TypeString, Nullable: true}, {Name: "personal_org", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "avatar_remote_url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "avatar_local_file_id", Type: field.TypeString, Nullable: true}, {Name: "avatar_updated_at", Type: field.TypeTime, Nullable: true}, {Name: "dedicated_db", Type: field.TypeBool, Default: false}, {Name: "stripe_customer_id", Type: field.TypeString, Nullable: true}, } // OrganizationHistoryTable holds the schema information for the "organization_history" table. OrganizationHistoryTable = &schema.Table{ Name: "organization_history", Columns: OrganizationHistoryColumns, PrimaryKey: []*schema.Column{OrganizationHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "organizationhistory_history_time", Unique: false, Columns: []*schema.Column{OrganizationHistoryColumns[1]}, }, }, } // OrganizationSettingsColumns holds the columns for the "organization_settings" table. OrganizationSettingsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "domains", Type: field.TypeJSON, Nullable: true}, {Name: "billing_contact", Type: field.TypeString, Nullable: true}, {Name: "billing_email", Type: field.TypeString, Nullable: true}, {Name: "billing_phone", Type: field.TypeString, Nullable: true}, {Name: "billing_address", Type: field.TypeJSON, Nullable: true}, {Name: "tax_identifier", Type: field.TypeString, Nullable: true}, {Name: "geo_location", Type: field.TypeEnum, Nullable: true, Enums: []string{"AMER", "EMEA", "APAC"}, Default: "AMER"}, {Name: "billing_notifications_enabled", Type: field.TypeBool, Default: true}, {Name: "allowed_email_domains", Type: field.TypeJSON, Nullable: true}, {Name: "allow_matching_domains_autojoin", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "identity_provider", Type: field.TypeEnum, Nullable: true, Enums: []string{"OKTA", "ONE_LOGIN", "GOOGLE_WORKSPACE", "SLACK", "GITHUB", "MICROSOFT_ENTRA_ID", "GENERIC_OIDC", "NONE"}, Default: "NONE"}, {Name: "identity_provider_client_id", Type: field.TypeString, Nullable: true}, {Name: "identity_provider_client_secret", Type: field.TypeString, Nullable: true}, {Name: "identity_provider_metadata_endpoint", Type: field.TypeString, Nullable: true}, {Name: "identity_provider_auth_tested", Type: field.TypeBool, Default: false}, {Name: "identity_provider_entity_id", Type: field.TypeString, Nullable: true}, {Name: "oidc_discovery_endpoint", Type: field.TypeString, Nullable: true}, {Name: "saml_signin_url", Type: field.TypeString, Nullable: true}, {Name: "saml_issuer", Type: field.TypeString, Nullable: true}, {Name: "saml_cert", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "identity_provider_login_enforced", Type: field.TypeBool, Default: false}, {Name: "multifactor_auth_enforced", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "compliance_webhook_token", Type: field.TypeString, Unique: true, Nullable: true}, {Name: "payment_method_added", Type: field.TypeBool, Default: false}, {Name: "organization_id", Type: field.TypeString, Unique: true, Nullable: true}, } // OrganizationSettingsTable holds the schema information for the "organization_settings" table. OrganizationSettingsTable = &schema.Table{ Name: "organization_settings", Columns: OrganizationSettingsColumns, PrimaryKey: []*schema.Column{OrganizationSettingsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "organization_settings_organizations_setting", Columns: []*schema.Column{OrganizationSettingsColumns[32]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, } // OrganizationSettingHistoryColumns holds the columns for the "organization_setting_history" table. OrganizationSettingHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "domains", Type: field.TypeJSON, Nullable: true}, {Name: "billing_contact", Type: field.TypeString, Nullable: true}, {Name: "billing_email", Type: field.TypeString, Nullable: true}, {Name: "billing_phone", Type: field.TypeString, Nullable: true}, {Name: "billing_address", Type: field.TypeJSON, Nullable: true}, {Name: "tax_identifier", Type: field.TypeString, Nullable: true}, {Name: "geo_location", Type: field.TypeEnum, Nullable: true, Enums: []string{"AMER", "EMEA", "APAC"}, Default: "AMER"}, {Name: "organization_id", Type: field.TypeString, Nullable: true}, {Name: "billing_notifications_enabled", Type: field.TypeBool, Default: true}, {Name: "allowed_email_domains", Type: field.TypeJSON, Nullable: true}, {Name: "allow_matching_domains_autojoin", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "identity_provider", Type: field.TypeEnum, Nullable: true, Enums: []string{"OKTA", "ONE_LOGIN", "GOOGLE_WORKSPACE", "SLACK", "GITHUB", "MICROSOFT_ENTRA_ID", "GENERIC_OIDC", "NONE"}, Default: "NONE"}, {Name: "identity_provider_client_id", Type: field.TypeString, Nullable: true}, {Name: "identity_provider_client_secret", Type: field.TypeString, Nullable: true}, {Name: "identity_provider_metadata_endpoint", Type: field.TypeString, Nullable: true}, {Name: "identity_provider_auth_tested", Type: field.TypeBool, Default: false}, {Name: "identity_provider_entity_id", Type: field.TypeString, Nullable: true}, {Name: "oidc_discovery_endpoint", Type: field.TypeString, Nullable: true}, {Name: "saml_signin_url", Type: field.TypeString, Nullable: true}, {Name: "saml_issuer", Type: field.TypeString, Nullable: true}, {Name: "saml_cert", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "identity_provider_login_enforced", Type: field.TypeBool, Default: false}, {Name: "multifactor_auth_enforced", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "compliance_webhook_token", Type: field.TypeString, Nullable: true}, {Name: "payment_method_added", Type: field.TypeBool, Default: false}, } // OrganizationSettingHistoryTable holds the schema information for the "organization_setting_history" table. OrganizationSettingHistoryTable = &schema.Table{ Name: "organization_setting_history", Columns: OrganizationSettingHistoryColumns, PrimaryKey: []*schema.Column{OrganizationSettingHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "organizationsettinghistory_history_time", Unique: false, Columns: []*schema.Column{OrganizationSettingHistoryColumns[1]}, }, }, } // PasswordResetTokensColumns holds the columns for the "password_reset_tokens" table. PasswordResetTokensColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "token", Type: field.TypeString, Unique: true}, {Name: "ttl", Type: field.TypeTime}, {Name: "email", Type: field.TypeString}, {Name: "secret", Type: field.TypeBytes}, {Name: "owner_id", Type: field.TypeString}, } // PasswordResetTokensTable holds the schema information for the "password_reset_tokens" table. PasswordResetTokensTable = &schema.Table{ Name: "password_reset_tokens", Columns: PasswordResetTokensColumns, PrimaryKey: []*schema.Column{PasswordResetTokensColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "password_reset_tokens_users_password_reset_tokens", Columns: []*schema.Column{PasswordResetTokensColumns[11]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.NoAction, }, }, Indexes: []*schema.Index{ { Name: "passwordresettoken_token", Unique: true, Columns: []*schema.Column{PasswordResetTokensColumns[7]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // PersonalAccessTokensColumns holds the columns for the "personal_access_tokens" table. PersonalAccessTokensColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "token", Type: field.TypeString, Unique: true}, {Name: "expires_at", Type: field.TypeTime, Nullable: true}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "scopes", Type: field.TypeJSON, Nullable: true}, {Name: "sso_authorizations", Type: field.TypeJSON, Nullable: true}, {Name: "last_used_at", Type: field.TypeTime, Nullable: true}, {Name: "is_active", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "revoked_reason", Type: field.TypeString, Nullable: true}, {Name: "revoked_by", Type: field.TypeString, Nullable: true}, {Name: "revoked_at", Type: field.TypeTime, Nullable: true}, {Name: "owner_id", Type: field.TypeString}, } // PersonalAccessTokensTable holds the schema information for the "personal_access_tokens" table. PersonalAccessTokensTable = &schema.Table{ Name: "personal_access_tokens", Columns: PersonalAccessTokensColumns, PrimaryKey: []*schema.Column{PersonalAccessTokensColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "personal_access_tokens_users_personal_access_tokens", Columns: []*schema.Column{PersonalAccessTokensColumns[19]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.NoAction, }, }, Indexes: []*schema.Index{ { Name: "personalaccesstoken_token", Unique: false, Columns: []*schema.Column{PersonalAccessTokensColumns[9]}, }, }, } // ProceduresColumns holds the columns for the "procedures" table. ProceduresColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "revision", Type: field.TypeString, Nullable: true, Default: "v0.0.1"}, {Name: "name", Type: field.TypeString}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PUBLISHED", "DRAFT", "NEEDS_APPROVAL", "APPROVED", "ARCHIVED"}, Default: "DRAFT"}, {Name: "procedure_type", Type: field.TypeString, Nullable: true}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "approval_required", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "review_due", Type: field.TypeTime, Nullable: true}, {Name: "review_frequency", Type: field.TypeEnum, Nullable: true, Enums: []string{"YEARLY", "QUARTERLY", "BIANNUALLY", "MONTHLY"}, Default: "YEARLY"}, {Name: "summary", Type: field.TypeString, Nullable: true}, {Name: "tag_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_tag_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "control_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_control_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "improvement_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_improvement_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "url", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "procedure_kind_name", Type: field.TypeString, Nullable: true}, {Name: "control_objective_procedures", Type: field.TypeString, Nullable: true}, {Name: "custom_type_enum_procedures", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "approver_id", Type: field.TypeString, Nullable: true}, {Name: "delegate_id", Type: field.TypeString, Nullable: true}, {Name: "procedure_kind_id", Type: field.TypeString, Nullable: true}, {Name: "file_id", Type: field.TypeString, Nullable: true}, } // ProceduresTable holds the schema information for the "procedures" table. ProceduresTable = &schema.Table{ Name: "procedures", Columns: ProceduresColumns, PrimaryKey: []*schema.Column{ProceduresColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "procedures_control_objectives_procedures", Columns: []*schema.Column{ProceduresColumns[29]}, RefColumns: []*schema.Column{ControlObjectivesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "procedures_custom_type_enums_procedures", Columns: []*schema.Column{ProceduresColumns[30]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "procedures_organizations_procedures", Columns: []*schema.Column{ProceduresColumns[31]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "procedures_groups_approver", Columns: []*schema.Column{ProceduresColumns[32]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "procedures_groups_delegate", Columns: []*schema.Column{ProceduresColumns[33]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "procedures_custom_type_enums_procedure_kind", Columns: []*schema.Column{ProceduresColumns[34]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "procedures_files_file", Columns: []*schema.Column{ProceduresColumns[35]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "procedure_display_id_owner_id", Unique: true, Columns: []*schema.Column{ProceduresColumns[7], ProceduresColumns[31]}, }, { Name: "procedure_owner_id", Unique: false, Columns: []*schema.Column{ProceduresColumns[31]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // ProcedureHistoryColumns holds the columns for the "procedure_history" table. ProcedureHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "revision", Type: field.TypeString, Nullable: true, Default: "v0.0.1"}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PUBLISHED", "DRAFT", "NEEDS_APPROVAL", "APPROVED", "ARCHIVED"}, Default: "DRAFT"}, {Name: "procedure_type", Type: field.TypeString, Nullable: true}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "approval_required", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "review_due", Type: field.TypeTime, Nullable: true}, {Name: "review_frequency", Type: field.TypeEnum, Nullable: true, Enums: []string{"YEARLY", "QUARTERLY", "BIANNUALLY", "MONTHLY"}, Default: "YEARLY"}, {Name: "approver_id", Type: field.TypeString, Nullable: true}, {Name: "delegate_id", Type: field.TypeString, Nullable: true}, {Name: "summary", Type: field.TypeString, Nullable: true}, {Name: "tag_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_tag_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "control_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_control_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "improvement_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "dismissed_improvement_suggestions", Type: field.TypeJSON, Nullable: true}, {Name: "url", Type: field.TypeString, Nullable: true}, {Name: "file_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "procedure_kind_name", Type: field.TypeString, Nullable: true}, {Name: "procedure_kind_id", Type: field.TypeString, Nullable: true}, } // ProcedureHistoryTable holds the schema information for the "procedure_history" table. ProcedureHistoryTable = &schema.Table{ Name: "procedure_history", Columns: ProcedureHistoryColumns, PrimaryKey: []*schema.Column{ProcedureHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "procedurehistory_history_time", Unique: false, Columns: []*schema.Column{ProcedureHistoryColumns[1]}, }, }, } // ProgramsColumns holds the columns for the "programs" table. ProgramsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "program_kind_name", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"NOT_STARTED", "IN_PROGRESS", "ACTION_REQUIRED", "READY_FOR_AUDITOR", "COMPLETED", "ARCHIVED"}, Default: "NOT_STARTED"}, {Name: "program_type", Type: field.TypeEnum, Enums: []string{"FRAMEWORK", "GAP_ANALYSIS", "RISK_ASSESSMENT", "OTHER"}, Default: "FRAMEWORK"}, {Name: "framework_name", Type: field.TypeString, Nullable: true}, {Name: "start_date", Type: field.TypeTime, Nullable: true}, {Name: "end_date", Type: field.TypeTime, Nullable: true}, {Name: "auditor_ready", Type: field.TypeBool, Default: false}, {Name: "auditor_write_comments", Type: field.TypeBool, Default: false}, {Name: "auditor_read_comments", Type: field.TypeBool, Default: false}, {Name: "audit_firm", Type: field.TypeString, Nullable: true}, {Name: "auditor", Type: field.TypeString, Nullable: true}, {Name: "auditor_email", Type: field.TypeString, Nullable: true}, {Name: "custom_type_enum_programs", Type: field.TypeString, Nullable: true}, {Name: "finding_programs", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "program_kind_id", Type: field.TypeString, Nullable: true}, {Name: "remediation_programs", Type: field.TypeString, Nullable: true}, {Name: "review_programs", Type: field.TypeString, Nullable: true}, {Name: "program_owner_id", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_programs", Type: field.TypeString, Nullable: true}, } // ProgramsTable holds the schema information for the "programs" table. ProgramsTable = &schema.Table{ Name: "programs", Columns: ProgramsColumns, PrimaryKey: []*schema.Column{ProgramsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "programs_custom_type_enums_programs", Columns: []*schema.Column{ProgramsColumns[23]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "programs_findings_programs", Columns: []*schema.Column{ProgramsColumns[24]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "programs_organizations_programs", Columns: []*schema.Column{ProgramsColumns[25]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "programs_custom_type_enums_program_kind", Columns: []*schema.Column{ProgramsColumns[26]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "programs_remediations_programs", Columns: []*schema.Column{ProgramsColumns[27]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "programs_reviews_programs", Columns: []*schema.Column{ProgramsColumns[28]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "programs_users_programs_owned", Columns: []*schema.Column{ProgramsColumns[29]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "programs_vulnerabilities_programs", Columns: []*schema.Column{ProgramsColumns[30]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "program_display_id_owner_id", Unique: true, Columns: []*schema.Column{ProgramsColumns[7], ProgramsColumns[25]}, }, { Name: "program_owner_id", Unique: false, Columns: []*schema.Column{ProgramsColumns[25]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // ProgramHistoryColumns holds the columns for the "program_history" table. ProgramHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "program_kind_name", Type: field.TypeString, Nullable: true}, {Name: "program_kind_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"NOT_STARTED", "IN_PROGRESS", "ACTION_REQUIRED", "READY_FOR_AUDITOR", "COMPLETED", "ARCHIVED"}, Default: "NOT_STARTED"}, {Name: "program_type", Type: field.TypeEnum, Enums: []string{"FRAMEWORK", "GAP_ANALYSIS", "RISK_ASSESSMENT", "OTHER"}, Default: "FRAMEWORK"}, {Name: "framework_name", Type: field.TypeString, Nullable: true}, {Name: "start_date", Type: field.TypeTime, Nullable: true}, {Name: "end_date", Type: field.TypeTime, Nullable: true}, {Name: "auditor_ready", Type: field.TypeBool, Default: false}, {Name: "auditor_write_comments", Type: field.TypeBool, Default: false}, {Name: "auditor_read_comments", Type: field.TypeBool, Default: false}, {Name: "audit_firm", Type: field.TypeString, Nullable: true}, {Name: "auditor", Type: field.TypeString, Nullable: true}, {Name: "auditor_email", Type: field.TypeString, Nullable: true}, {Name: "program_owner_id", Type: field.TypeString, Nullable: true}, } // ProgramHistoryTable holds the schema information for the "program_history" table. ProgramHistoryTable = &schema.Table{ Name: "program_history", Columns: ProgramHistoryColumns, PrimaryKey: []*schema.Column{ProgramHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "programhistory_history_time", Unique: false, Columns: []*schema.Column{ProgramHistoryColumns[1]}, }, }, } // ProgramMembershipsColumns holds the columns for the "program_memberships" table. ProgramMembershipsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "role", Type: field.TypeEnum, Enums: []string{"ADMIN", "MEMBER"}, Default: "MEMBER"}, {Name: "program_id", Type: field.TypeString}, {Name: "user_id", Type: field.TypeString}, {Name: "program_membership_org_membership", Type: field.TypeString, Nullable: true}, } // ProgramMembershipsTable holds the schema information for the "program_memberships" table. ProgramMembershipsTable = &schema.Table{ Name: "program_memberships", Columns: ProgramMembershipsColumns, PrimaryKey: []*schema.Column{ProgramMembershipsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_memberships_programs_program", Columns: []*schema.Column{ProgramMembershipsColumns[6]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "program_memberships_users_user", Columns: []*schema.Column{ProgramMembershipsColumns[7]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "program_memberships_org_memberships_org_membership", Columns: []*schema.Column{ProgramMembershipsColumns[8]}, RefColumns: []*schema.Column{OrgMembershipsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "programmembership_user_id_program_id", Unique: true, Columns: []*schema.Column{ProgramMembershipsColumns[7], ProgramMembershipsColumns[6]}, }, }, } // ProgramMembershipHistoryColumns holds the columns for the "program_membership_history" table. ProgramMembershipHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "role", Type: field.TypeEnum, Enums: []string{"ADMIN", "MEMBER"}, Default: "MEMBER"}, {Name: "program_id", Type: field.TypeString}, {Name: "user_id", Type: field.TypeString}, } // ProgramMembershipHistoryTable holds the schema information for the "program_membership_history" table. ProgramMembershipHistoryTable = &schema.Table{ Name: "program_membership_history", Columns: ProgramMembershipHistoryColumns, PrimaryKey: []*schema.Column{ProgramMembershipHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "programmembershiphistory_history_time", Unique: false, Columns: []*schema.Column{ProgramMembershipHistoryColumns[1]}, }, }, } // RemediationsColumns holds the columns for the "remediations" table. RemediationsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "external_id", Type: field.TypeString, Nullable: true}, {Name: "external_owner_id", Type: field.TypeString, Nullable: true}, {Name: "title", Type: field.TypeString, Nullable: true}, {Name: "state", Type: field.TypeString, Nullable: true}, {Name: "intent", Type: field.TypeString, Nullable: true}, {Name: "summary", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "explanation", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "instructions", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "owner_reference", Type: field.TypeString, Nullable: true}, {Name: "repository_uri", Type: field.TypeString, Nullable: true}, {Name: "pull_request_uri", Type: field.TypeString, Nullable: true}, {Name: "ticket_reference", Type: field.TypeString, Nullable: true}, {Name: "due_at", Type: field.TypeTime, Nullable: true}, {Name: "completed_at", Type: field.TypeTime, Nullable: true}, {Name: "pr_generated_at", Type: field.TypeTime, Nullable: true}, {Name: "error", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "external_uri", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "finding_remediations", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "review_remediations", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_remediations", Type: field.TypeString, Nullable: true}, } // RemediationsTable holds the schema information for the "remediations" table. RemediationsTable = &schema.Table{ Name: "remediations", Columns: RemediationsColumns, PrimaryKey: []*schema.Column{RemediationsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "remediations_findings_remediations", Columns: []*schema.Column{RemediationsColumns[31]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "remediations_organizations_remediations", Columns: []*schema.Column{RemediationsColumns[32]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "remediations_reviews_remediations", Columns: []*schema.Column{RemediationsColumns[33]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "remediations_vulnerabilities_remediations", Columns: []*schema.Column{RemediationsColumns[34]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "remediation_display_id_owner_id", Unique: true, Columns: []*schema.Column{RemediationsColumns[7], RemediationsColumns[32]}, }, { Name: "remediation_owner_id", Unique: false, Columns: []*schema.Column{RemediationsColumns[32]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "remediation_external_id_external_owner_id_owner_id", Unique: true, Columns: []*schema.Column{RemediationsColumns[12], RemediationsColumns[13], RemediationsColumns[32]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // RemediationHistoryColumns holds the columns for the "remediation_history" table. RemediationHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "external_id", Type: field.TypeString, Nullable: true}, {Name: "external_owner_id", Type: field.TypeString, Nullable: true}, {Name: "title", Type: field.TypeString, Nullable: true}, {Name: "state", Type: field.TypeString, Nullable: true}, {Name: "intent", Type: field.TypeString, Nullable: true}, {Name: "summary", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "explanation", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "instructions", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "owner_reference", Type: field.TypeString, Nullable: true}, {Name: "repository_uri", Type: field.TypeString, Nullable: true}, {Name: "pull_request_uri", Type: field.TypeString, Nullable: true}, {Name: "ticket_reference", Type: field.TypeString, Nullable: true}, {Name: "due_at", Type: field.TypeTime, Nullable: true}, {Name: "completed_at", Type: field.TypeTime, Nullable: true}, {Name: "pr_generated_at", Type: field.TypeTime, Nullable: true}, {Name: "error", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "external_uri", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, } // RemediationHistoryTable holds the schema information for the "remediation_history" table. RemediationHistoryTable = &schema.Table{ Name: "remediation_history", Columns: RemediationHistoryColumns, PrimaryKey: []*schema.Column{RemediationHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "remediationhistory_history_time", Unique: false, Columns: []*schema.Column{RemediationHistoryColumns[1]}, }, }, } // ReviewsColumns holds the columns for the "reviews" table. ReviewsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "external_id", Type: field.TypeString, Nullable: true}, {Name: "external_owner_id", Type: field.TypeString, Nullable: true}, {Name: "title", Type: field.TypeString}, {Name: "state", Type: field.TypeString, Nullable: true}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "classification", Type: field.TypeString, Nullable: true}, {Name: "summary", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "reporter", Type: field.TypeString, Nullable: true}, {Name: "approved", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "reviewed_at", Type: field.TypeTime, Nullable: true}, {Name: "reported_at", Type: field.TypeTime, Nullable: true}, {Name: "approved_at", Type: field.TypeTime, Nullable: true}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "external_uri", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "raw_payload", Type: field.TypeJSON, Nullable: true}, {Name: "finding_reviews", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "remediation_reviews", Type: field.TypeString, Nullable: true}, {Name: "reviewer_id", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_reviews", Type: field.TypeString, Nullable: true}, } // ReviewsTable holds the schema information for the "reviews" table. ReviewsTable = &schema.Table{ Name: "reviews", Columns: ReviewsColumns, PrimaryKey: []*schema.Column{ReviewsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "reviews_findings_reviews", Columns: []*schema.Column{ReviewsColumns[28]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "reviews_organizations_reviews", Columns: []*schema.Column{ReviewsColumns[29]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "reviews_remediations_reviews", Columns: []*schema.Column{ReviewsColumns[30]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "reviews_users_reviewer", Columns: []*schema.Column{ReviewsColumns[31]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "reviews_vulnerabilities_reviews", Columns: []*schema.Column{ReviewsColumns[32]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "review_owner_id", Unique: false, Columns: []*schema.Column{ReviewsColumns[29]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "review_external_id_external_owner_id_owner_id", Unique: true, Columns: []*schema.Column{ReviewsColumns[11], ReviewsColumns[12], ReviewsColumns[29]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // ReviewHistoryColumns holds the columns for the "review_history" table. ReviewHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "external_id", Type: field.TypeString, Nullable: true}, {Name: "external_owner_id", Type: field.TypeString, Nullable: true}, {Name: "title", Type: field.TypeString}, {Name: "state", Type: field.TypeString, Nullable: true}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "classification", Type: field.TypeString, Nullable: true}, {Name: "summary", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "reporter", Type: field.TypeString, Nullable: true}, {Name: "approved", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "reviewed_at", Type: field.TypeTime, Nullable: true}, {Name: "reported_at", Type: field.TypeTime, Nullable: true}, {Name: "approved_at", Type: field.TypeTime, Nullable: true}, {Name: "reviewer_id", Type: field.TypeString, Nullable: true}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "external_uri", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "raw_payload", Type: field.TypeJSON, Nullable: true}, } // ReviewHistoryTable holds the schema information for the "review_history" table. ReviewHistoryTable = &schema.Table{ Name: "review_history", Columns: ReviewHistoryColumns, PrimaryKey: []*schema.Column{ReviewHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "reviewhistory_history_time", Unique: false, Columns: []*schema.Column{ReviewHistoryColumns[1]}, }, }, } // RisksColumns holds the columns for the "risks" table. RisksColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "risk_kind_name", Type: field.TypeString, Nullable: true}, {Name: "risk_category_name", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"OPEN", "IN_PROGRESS", "ONGOING", "MITIGATED", "ARCHIVED"}, Default: "OPEN"}, {Name: "risk_type", Type: field.TypeString, Nullable: true}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "impact", Type: field.TypeEnum, Nullable: true, Enums: []string{"LOW", "MODERATE", "HIGH", "CRITICAL"}, Default: "MODERATE"}, {Name: "likelihood", Type: field.TypeEnum, Nullable: true, Enums: []string{"UNLIKELY", "LIKELY", "HIGHLY_LIKELY"}, Default: "LIKELY"}, {Name: "score", Type: field.TypeInt, Nullable: true}, {Name: "mitigation", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "business_costs", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "control_objective_risks", Type: field.TypeString, Nullable: true}, {Name: "custom_type_enum_risks", Type: field.TypeString, Nullable: true}, {Name: "custom_type_enum_risk_categories", Type: field.TypeString, Nullable: true}, {Name: "finding_risks", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "remediation_risks", Type: field.TypeString, Nullable: true}, {Name: "review_risks", Type: field.TypeString, Nullable: true}, {Name: "risk_kind_id", Type: field.TypeString, Nullable: true}, {Name: "risk_category_id", Type: field.TypeString, Nullable: true}, {Name: "stakeholder_id", Type: field.TypeString, Nullable: true}, {Name: "delegate_id", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_risks", Type: field.TypeString, Nullable: true}, } // RisksTable holds the schema information for the "risks" table. RisksTable = &schema.Table{ Name: "risks", Columns: RisksColumns, PrimaryKey: []*schema.Column{RisksColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "risks_control_objectives_risks", Columns: []*schema.Column{RisksColumns[21]}, RefColumns: []*schema.Column{ControlObjectivesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "risks_custom_type_enums_risks", Columns: []*schema.Column{RisksColumns[22]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "risks_custom_type_enums_risk_categories", Columns: []*schema.Column{RisksColumns[23]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "risks_findings_risks", Columns: []*schema.Column{RisksColumns[24]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "risks_organizations_risks", Columns: []*schema.Column{RisksColumns[25]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "risks_remediations_risks", Columns: []*schema.Column{RisksColumns[26]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "risks_reviews_risks", Columns: []*schema.Column{RisksColumns[27]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "risks_custom_type_enums_risk_kind", Columns: []*schema.Column{RisksColumns[28]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "risks_custom_type_enums_risk_category", Columns: []*schema.Column{RisksColumns[29]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "risks_groups_stakeholder", Columns: []*schema.Column{RisksColumns[30]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "risks_groups_delegate", Columns: []*schema.Column{RisksColumns[31]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "risks_vulnerabilities_risks", Columns: []*schema.Column{RisksColumns[32]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "risk_display_id_owner_id", Unique: true, Columns: []*schema.Column{RisksColumns[7], RisksColumns[25]}, }, { Name: "risk_owner_id", Unique: false, Columns: []*schema.Column{RisksColumns[25]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // RiskHistoryColumns holds the columns for the "risk_history" table. RiskHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "risk_kind_name", Type: field.TypeString, Nullable: true}, {Name: "risk_kind_id", Type: field.TypeString, Nullable: true}, {Name: "risk_category_name", Type: field.TypeString, Nullable: true}, {Name: "risk_category_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"OPEN", "IN_PROGRESS", "ONGOING", "MITIGATED", "ARCHIVED"}, Default: "OPEN"}, {Name: "risk_type", Type: field.TypeString, Nullable: true}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "impact", Type: field.TypeEnum, Nullable: true, Enums: []string{"LOW", "MODERATE", "HIGH", "CRITICAL"}, Default: "MODERATE"}, {Name: "likelihood", Type: field.TypeEnum, Nullable: true, Enums: []string{"UNLIKELY", "LIKELY", "HIGHLY_LIKELY"}, Default: "LIKELY"}, {Name: "score", Type: field.TypeInt, Nullable: true}, {Name: "mitigation", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "business_costs", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "stakeholder_id", Type: field.TypeString, Nullable: true}, {Name: "delegate_id", Type: field.TypeString, Nullable: true}, } // RiskHistoryTable holds the schema information for the "risk_history" table. RiskHistoryTable = &schema.Table{ Name: "risk_history", Columns: RiskHistoryColumns, PrimaryKey: []*schema.Column{RiskHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "riskhistory_history_time", Unique: false, Columns: []*schema.Column{RiskHistoryColumns[1]}, }, }, } // ScansColumns holds the columns for the "scans" table. ScansColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "target", Type: field.TypeString}, {Name: "scan_type", Type: field.TypeEnum, Enums: []string{"DOMAIN", "VULNERABILITY", "VENDOR", "PROVIDER"}, Default: "DOMAIN"}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"PENDING", "PROCESSING", "COMPLETED", "FAILED"}, Default: "PROCESSING"}, {Name: "control_scans", Type: field.TypeString, Nullable: true}, {Name: "entity_scans", Type: field.TypeString, Nullable: true}, {Name: "finding_scans", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "risk_scans", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_scans", Type: field.TypeString, Nullable: true}, } // ScansTable holds the schema information for the "scans" table. ScansTable = &schema.Table{ Name: "scans", Columns: ScansColumns, PrimaryKey: []*schema.Column{ScansColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "scans_controls_scans", Columns: []*schema.Column{ScansColumns[12]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "scans_entities_scans", Columns: []*schema.Column{ScansColumns[13]}, RefColumns: []*schema.Column{EntitiesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "scans_findings_scans", Columns: []*schema.Column{ScansColumns[14]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "scans_organizations_scans", Columns: []*schema.Column{ScansColumns[15]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "scans_risks_scans", Columns: []*schema.Column{ScansColumns[16]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "scans_vulnerabilities_scans", Columns: []*schema.Column{ScansColumns[17]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "scan_owner_id", Unique: false, Columns: []*schema.Column{ScansColumns[15]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // ScanHistoryColumns holds the columns for the "scan_history" table. ScanHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "target", Type: field.TypeString}, {Name: "scan_type", Type: field.TypeEnum, Enums: []string{"DOMAIN", "VULNERABILITY", "VENDOR", "PROVIDER"}, Default: "DOMAIN"}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"PENDING", "PROCESSING", "COMPLETED", "FAILED"}, Default: "PROCESSING"}, } // ScanHistoryTable holds the schema information for the "scan_history" table. ScanHistoryTable = &schema.Table{ Name: "scan_history", Columns: ScanHistoryColumns, PrimaryKey: []*schema.Column{ScanHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "scanhistory_history_time", Unique: false, Columns: []*schema.Column{ScanHistoryColumns[1]}, }, }, } // ScheduledJobsColumns holds the columns for the "scheduled_jobs" table. ScheduledJobsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "active", Type: field.TypeBool, Default: true}, {Name: "configuration", Type: field.TypeJSON, Nullable: true}, {Name: "cron", Type: field.TypeString, Nullable: true}, {Name: "job_id", Type: field.TypeString}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "job_runner_id", Type: field.TypeString, Nullable: true}, } // ScheduledJobsTable holds the schema information for the "scheduled_jobs" table. ScheduledJobsTable = &schema.Table{ Name: "scheduled_jobs", Columns: ScheduledJobsColumns, PrimaryKey: []*schema.Column{ScheduledJobsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "scheduled_jobs_job_templates_scheduled_jobs", Columns: []*schema.Column{ScheduledJobsColumns[11]}, RefColumns: []*schema.Column{JobTemplatesColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "scheduled_jobs_organizations_scheduled_jobs", Columns: []*schema.Column{ScheduledJobsColumns[12]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "scheduled_jobs_job_runners_job_runner", Columns: []*schema.Column{ScheduledJobsColumns[13]}, RefColumns: []*schema.Column{JobRunnersColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "scheduledjob_display_id_owner_id", Unique: true, Columns: []*schema.Column{ScheduledJobsColumns[7], ScheduledJobsColumns[12]}, }, { Name: "scheduledjob_owner_id", Unique: false, Columns: []*schema.Column{ScheduledJobsColumns[12]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // ScheduledJobHistoryColumns holds the columns for the "scheduled_job_history" table. ScheduledJobHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "job_id", Type: field.TypeString}, {Name: "active", Type: field.TypeBool, Default: true}, {Name: "configuration", Type: field.TypeJSON, Nullable: true}, {Name: "cron", Type: field.TypeString, Nullable: true}, {Name: "job_runner_id", Type: field.TypeString, Nullable: true}, } // ScheduledJobHistoryTable holds the schema information for the "scheduled_job_history" table. ScheduledJobHistoryTable = &schema.Table{ Name: "scheduled_job_history", Columns: ScheduledJobHistoryColumns, PrimaryKey: []*schema.Column{ScheduledJobHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "scheduledjobhistory_history_time", Unique: false, Columns: []*schema.Column{ScheduledJobHistoryColumns[1]}, }, }, } // ScheduledJobRunsColumns holds the columns for the "scheduled_job_runs" table. ScheduledJobRunsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"PENDING", "ACQUIRED"}, Default: "PENDING"}, {Name: "expected_execution_time", Type: field.TypeTime}, {Name: "script", Type: field.TypeString}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "scheduled_job_id", Type: field.TypeString}, {Name: "job_runner_id", Type: field.TypeString}, } // ScheduledJobRunsTable holds the schema information for the "scheduled_job_runs" table. ScheduledJobRunsTable = &schema.Table{ Name: "scheduled_job_runs", Columns: ScheduledJobRunsColumns, PrimaryKey: []*schema.Column{ScheduledJobRunsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "scheduled_job_runs_organizations_scheduled_job_runs", Columns: []*schema.Column{ScheduledJobRunsColumns[10]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "scheduled_job_runs_scheduled_jobs_scheduled_job", Columns: []*schema.Column{ScheduledJobRunsColumns[11]}, RefColumns: []*schema.Column{ScheduledJobsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "scheduled_job_runs_job_runners_job_runner", Columns: []*schema.Column{ScheduledJobRunsColumns[12]}, RefColumns: []*schema.Column{JobRunnersColumns[0]}, OnDelete: schema.NoAction, }, }, Indexes: []*schema.Index{ { Name: "scheduledjobrun_owner_id", Unique: false, Columns: []*schema.Column{ScheduledJobRunsColumns[10]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // StandardsColumns holds the columns for the "standards" table. StandardsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "revision", Type: field.TypeString, Nullable: true, Default: "v0.0.1"}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "short_name", Type: field.TypeString, Nullable: true}, {Name: "framework", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "governing_body_logo_url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "governing_body", Type: field.TypeString, Nullable: true}, {Name: "domains", Type: field.TypeJSON, Nullable: true}, {Name: "link", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"ACTIVE", "DRAFT", "ARCHIVED"}, Default: "ACTIVE"}, {Name: "is_public", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "free_to_use", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "standard_type", Type: field.TypeString, Nullable: true}, {Name: "version", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "logo_file_id", Type: field.TypeString, Nullable: true}, } // StandardsTable holds the schema information for the "standards" table. StandardsTable = &schema.Table{ Name: "standards", Columns: StandardsColumns, PrimaryKey: []*schema.Column{StandardsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "standards_organizations_standards", Columns: []*schema.Column{StandardsColumns[25]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "standards_files_logo_file", Columns: []*schema.Column{StandardsColumns[26]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "standard_owner_id", Unique: false, Columns: []*schema.Column{StandardsColumns[25]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // StandardHistoryColumns holds the columns for the "standard_history" table. StandardHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "revision", Type: field.TypeString, Nullable: true, Default: "v0.0.1"}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "short_name", Type: field.TypeString, Nullable: true}, {Name: "framework", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "governing_body_logo_url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "governing_body", Type: field.TypeString, Nullable: true}, {Name: "domains", Type: field.TypeJSON, Nullable: true}, {Name: "link", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"ACTIVE", "DRAFT", "ARCHIVED"}, Default: "ACTIVE"}, {Name: "is_public", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "free_to_use", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "standard_type", Type: field.TypeString, Nullable: true}, {Name: "version", Type: field.TypeString, Nullable: true}, {Name: "logo_file_id", Type: field.TypeString, Nullable: true}, } // StandardHistoryTable holds the schema information for the "standard_history" table. StandardHistoryTable = &schema.Table{ Name: "standard_history", Columns: StandardHistoryColumns, PrimaryKey: []*schema.Column{StandardHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "standardhistory_history_time", Unique: false, Columns: []*schema.Column{StandardHistoryColumns[1]}, }, }, } // SubcontrolsColumns holds the columns for the "subcontrols" table. SubcontrolsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "title", Type: field.TypeString, Nullable: true}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "aliases", Type: field.TypeJSON, Nullable: true}, {Name: "reference_id", Type: field.TypeString, Nullable: true}, {Name: "auditor_reference_id", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PREPARING", "NEEDS_APPROVAL", "CHANGES_REQUESTED", "APPROVED", "ARCHIVED", "NOT_IMPLEMENTED", "NOT_APPLICABLE"}, Default: "NOT_IMPLEMENTED"}, {Name: "source", Type: field.TypeEnum, Nullable: true, Enums: []string{"FRAMEWORK", "TEMPLATE", "USER_DEFINED", "IMPORTED"}, Default: "USER_DEFINED"}, {Name: "reference_framework", Type: field.TypeString, Nullable: true}, {Name: "reference_framework_revision", Type: field.TypeString, Nullable: true}, {Name: "control_type", Type: field.TypeEnum, Nullable: true, Enums: []string{"PREVENTATIVE", "DETECTIVE", "CORRECTIVE", "DETERRENT"}, Default: "PREVENTATIVE"}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "category_id", Type: field.TypeString, Nullable: true}, {Name: "subcategory", Type: field.TypeString, Nullable: true}, {Name: "mapped_categories", Type: field.TypeJSON, Nullable: true}, {Name: "assessment_objectives", Type: field.TypeJSON, Nullable: true}, {Name: "assessment_methods", Type: field.TypeJSON, Nullable: true}, {Name: "control_questions", Type: field.TypeJSON, Nullable: true}, {Name: "implementation_guidance", Type: field.TypeJSON, Nullable: true}, {Name: "example_evidence", Type: field.TypeJSON, Nullable: true}, {Name: "references", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "subcontrol_kind_name", Type: field.TypeString, Nullable: true}, {Name: "ref_code", Type: field.TypeString}, {Name: "control_id", Type: field.TypeString}, {Name: "custom_type_enum_subcontrols", Type: field.TypeString, Nullable: true}, {Name: "finding_subcontrols", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "program_subcontrols", Type: field.TypeString, Nullable: true}, {Name: "remediation_subcontrols", Type: field.TypeString, Nullable: true}, {Name: "review_subcontrols", Type: field.TypeString, Nullable: true}, {Name: "control_owner_id", Type: field.TypeString, Nullable: true}, {Name: "delegate_id", Type: field.TypeString, Nullable: true}, {Name: "responsible_party_id", Type: field.TypeString, Nullable: true}, {Name: "subcontrol_kind_id", Type: field.TypeString, Nullable: true}, {Name: "user_subcontrols", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_subcontrols", Type: field.TypeString, Nullable: true}, } // SubcontrolsTable holds the schema information for the "subcontrols" table. SubcontrolsTable = &schema.Table{ Name: "subcontrols", Columns: SubcontrolsColumns, PrimaryKey: []*schema.Column{SubcontrolsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "subcontrols_controls_subcontrols", Columns: []*schema.Column{SubcontrolsColumns[34]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "subcontrols_custom_type_enums_subcontrols", Columns: []*schema.Column{SubcontrolsColumns[35]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "subcontrols_findings_subcontrols", Columns: []*schema.Column{SubcontrolsColumns[36]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "subcontrols_organizations_subcontrols", Columns: []*schema.Column{SubcontrolsColumns[37]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "subcontrols_programs_subcontrols", Columns: []*schema.Column{SubcontrolsColumns[38]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "subcontrols_remediations_subcontrols", Columns: []*schema.Column{SubcontrolsColumns[39]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "subcontrols_reviews_subcontrols", Columns: []*schema.Column{SubcontrolsColumns[40]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "subcontrols_groups_control_owner", Columns: []*schema.Column{SubcontrolsColumns[41]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "subcontrols_groups_delegate", Columns: []*schema.Column{SubcontrolsColumns[42]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "subcontrols_entities_responsible_party", Columns: []*schema.Column{SubcontrolsColumns[43]}, RefColumns: []*schema.Column{EntitiesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "subcontrols_custom_type_enums_subcontrol_kind", Columns: []*schema.Column{SubcontrolsColumns[44]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "subcontrols_users_subcontrols", Columns: []*schema.Column{SubcontrolsColumns[45]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "subcontrols_vulnerabilities_subcontrols", Columns: []*schema.Column{SubcontrolsColumns[46]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "subcontrol_display_id_owner_id", Unique: true, Columns: []*schema.Column{SubcontrolsColumns[7], SubcontrolsColumns[37]}, }, { Name: "subcontrol_owner_id", Unique: false, Columns: []*schema.Column{SubcontrolsColumns[37]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "subcontrol_control_id_ref_code", Unique: true, Columns: []*schema.Column{SubcontrolsColumns[34], SubcontrolsColumns[33]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "subcontrol_control_id_ref_code_owner_id", Unique: false, Columns: []*schema.Column{SubcontrolsColumns[34], SubcontrolsColumns[33], SubcontrolsColumns[37]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "subcontrol_reference_id_deleted_at_owner_id", Unique: false, Columns: []*schema.Column{SubcontrolsColumns[12], SubcontrolsColumns[5], SubcontrolsColumns[37]}, }, { Name: "subcontrol_auditor_reference_id_deleted_at_owner_id", Unique: false, Columns: []*schema.Column{SubcontrolsColumns[13], SubcontrolsColumns[5], SubcontrolsColumns[37]}, }, }, } // SubcontrolHistoryColumns holds the columns for the "subcontrol_history" table. SubcontrolHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "title", Type: field.TypeString, Nullable: true}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "aliases", Type: field.TypeJSON, Nullable: true}, {Name: "reference_id", Type: field.TypeString, Nullable: true}, {Name: "auditor_reference_id", Type: field.TypeString, Nullable: true}, {Name: "responsible_party_id", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PREPARING", "NEEDS_APPROVAL", "CHANGES_REQUESTED", "APPROVED", "ARCHIVED", "NOT_IMPLEMENTED", "NOT_APPLICABLE"}, Default: "NOT_IMPLEMENTED"}, {Name: "source", Type: field.TypeEnum, Nullable: true, Enums: []string{"FRAMEWORK", "TEMPLATE", "USER_DEFINED", "IMPORTED"}, Default: "USER_DEFINED"}, {Name: "reference_framework", Type: field.TypeString, Nullable: true}, {Name: "reference_framework_revision", Type: field.TypeString, Nullable: true}, {Name: "control_type", Type: field.TypeEnum, Nullable: true, Enums: []string{"PREVENTATIVE", "DETECTIVE", "CORRECTIVE", "DETERRENT"}, Default: "PREVENTATIVE"}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "category_id", Type: field.TypeString, Nullable: true}, {Name: "subcategory", Type: field.TypeString, Nullable: true}, {Name: "mapped_categories", Type: field.TypeJSON, Nullable: true}, {Name: "assessment_objectives", Type: field.TypeJSON, Nullable: true}, {Name: "assessment_methods", Type: field.TypeJSON, Nullable: true}, {Name: "control_questions", Type: field.TypeJSON, Nullable: true}, {Name: "implementation_guidance", Type: field.TypeJSON, Nullable: true}, {Name: "example_evidence", Type: field.TypeJSON, Nullable: true}, {Name: "references", Type: field.TypeJSON, Nullable: true}, {Name: "control_owner_id", Type: field.TypeString, Nullable: true}, {Name: "delegate_id", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "subcontrol_kind_name", Type: field.TypeString, Nullable: true}, {Name: "subcontrol_kind_id", Type: field.TypeString, Nullable: true}, {Name: "ref_code", Type: field.TypeString}, {Name: "control_id", Type: field.TypeString}, } // SubcontrolHistoryTable holds the schema information for the "subcontrol_history" table. SubcontrolHistoryTable = &schema.Table{ Name: "subcontrol_history", Columns: SubcontrolHistoryColumns, PrimaryKey: []*schema.Column{SubcontrolHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "subcontrolhistory_history_time", Unique: false, Columns: []*schema.Column{SubcontrolHistoryColumns[1]}, }, }, } // SubprocessorsColumns holds the columns for the "subprocessors" table. SubprocessorsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "logo_remote_url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "logo_file_id", Type: field.TypeString, Nullable: true}, } // SubprocessorsTable holds the schema information for the "subprocessors" table. SubprocessorsTable = &schema.Table{ Name: "subprocessors", Columns: SubprocessorsColumns, PrimaryKey: []*schema.Column{SubprocessorsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "subprocessors_organizations_subprocessors", Columns: []*schema.Column{SubprocessorsColumns[14]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "subprocessors_files_logo_file", Columns: []*schema.Column{SubprocessorsColumns[15]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "subprocessor_owner_id", Unique: false, Columns: []*schema.Column{SubprocessorsColumns[14]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "subprocessor_name_owner_id", Unique: true, Columns: []*schema.Column{SubprocessorsColumns[11], SubprocessorsColumns[14]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // SubprocessorHistoryColumns holds the columns for the "subprocessor_history" table. SubprocessorHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "logo_remote_url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "logo_file_id", Type: field.TypeString, Nullable: true}, } // SubprocessorHistoryTable holds the schema information for the "subprocessor_history" table. SubprocessorHistoryTable = &schema.Table{ Name: "subprocessor_history", Columns: SubprocessorHistoryColumns, PrimaryKey: []*schema.Column{SubprocessorHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "subprocessorhistory_history_time", Unique: false, Columns: []*schema.Column{SubprocessorHistoryColumns[1]}, }, }, } // SubscribersColumns holds the columns for the "subscribers" table. SubscribersColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "email", Type: field.TypeString}, {Name: "phone_number", Type: field.TypeString, Nullable: true}, {Name: "verified_email", Type: field.TypeBool, Default: false}, {Name: "verified_phone", Type: field.TypeBool, Default: false}, {Name: "active", Type: field.TypeBool, Default: false}, {Name: "token", Type: field.TypeString, Unique: true}, {Name: "ttl", Type: field.TypeTime}, {Name: "secret", Type: field.TypeBytes}, {Name: "unsubscribed", Type: field.TypeBool, Default: false}, {Name: "send_attempts", Type: field.TypeInt, Default: 1}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // SubscribersTable holds the schema information for the "subscribers" table. SubscribersTable = &schema.Table{ Name: "subscribers", Columns: SubscribersColumns, PrimaryKey: []*schema.Column{SubscribersColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "subscribers_organizations_subscribers", Columns: []*schema.Column{SubscribersColumns[18]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "subscriber_owner_id", Unique: false, Columns: []*schema.Column{SubscribersColumns[18]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "subscriber_email_owner_id", Unique: true, Columns: []*schema.Column{SubscribersColumns[8], SubscribersColumns[18]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL and unsubscribed = false", }, }, }, } // TfaSettingsColumns holds the columns for the "tfa_settings" table. TfaSettingsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tfa_secret", Type: field.TypeString, Nullable: true}, {Name: "verified", Type: field.TypeBool, Default: false}, {Name: "recovery_codes", Type: field.TypeJSON, Nullable: true}, {Name: "phone_otp_allowed", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "email_otp_allowed", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "totp_allowed", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // TfaSettingsTable holds the schema information for the "tfa_settings" table. TfaSettingsTable = &schema.Table{ Name: "tfa_settings", Columns: TfaSettingsColumns, PrimaryKey: []*schema.Column{TfaSettingsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "tfa_settings_users_tfa_settings", Columns: []*schema.Column{TfaSettingsColumns[13]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "tfasetting_owner_id", Unique: true, Columns: []*schema.Column{TfaSettingsColumns[13]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // TagDefinitionsColumns holds the columns for the "tag_definitions" table. TagDefinitionsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString, SchemaType: map[string]string{"postgres": "citext"}}, {Name: "aliases", Type: field.TypeJSON, Nullable: true}, {Name: "slug", Type: field.TypeString, Nullable: true, SchemaType: map[string]string{"postgres": "citext"}}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "color", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "workflow_definition_tag_definitions", Type: field.TypeString, Nullable: true}, } // TagDefinitionsTable holds the schema information for the "tag_definitions" table. TagDefinitionsTable = &schema.Table{ Name: "tag_definitions", Columns: TagDefinitionsColumns, PrimaryKey: []*schema.Column{TagDefinitionsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "tag_definitions_organizations_tag_definitions", Columns: []*schema.Column{TagDefinitionsColumns[15]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "tag_definitions_workflow_definitions_tag_definitions", Columns: []*schema.Column{TagDefinitionsColumns[16]}, RefColumns: []*schema.Column{WorkflowDefinitionsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "tagdefinition_owner_id", Unique: false, Columns: []*schema.Column{TagDefinitionsColumns[15]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "tagdefinition_slug_owner_id", Unique: true, Columns: []*schema.Column{TagDefinitionsColumns[12], TagDefinitionsColumns[15]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "tagdefinition_name_owner_id", Unique: true, Columns: []*schema.Column{TagDefinitionsColumns[10], TagDefinitionsColumns[15]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // TasksColumns holds the columns for the "tasks" table. TasksColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "task_kind_name", Type: field.TypeString, Nullable: true}, {Name: "title", Type: field.TypeString}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "status", Type: field.TypeEnum, Enums: []string{"OPEN", "IN_PROGRESS", "IN_REVIEW", "COMPLETED", "WONT_DO"}, Default: "OPEN"}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "due", Type: field.TypeTime, Nullable: true}, {Name: "completed", Type: field.TypeTime, Nullable: true}, {Name: "system_generated", Type: field.TypeBool, Default: false}, {Name: "idempotency_key", Type: field.TypeString, Nullable: true}, {Name: "external_reference_url", Type: field.TypeJSON, Nullable: true}, {Name: "custom_type_enum_tasks", Type: field.TypeString, Nullable: true}, {Name: "finding_tasks", Type: field.TypeString, Nullable: true}, {Name: "integration_tasks", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "remediation_tasks", Type: field.TypeString, Nullable: true}, {Name: "review_tasks", Type: field.TypeString, Nullable: true}, {Name: "task_kind_id", Type: field.TypeString, Nullable: true}, {Name: "assigner_id", Type: field.TypeString, Nullable: true}, {Name: "assignee_id", Type: field.TypeString, Nullable: true}, {Name: "vulnerability_tasks", Type: field.TypeString, Nullable: true}, } // TasksTable holds the schema information for the "tasks" table. TasksTable = &schema.Table{ Name: "tasks", Columns: TasksColumns, PrimaryKey: []*schema.Column{TasksColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "tasks_custom_type_enums_tasks", Columns: []*schema.Column{TasksColumns[19]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "tasks_findings_tasks", Columns: []*schema.Column{TasksColumns[20]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "tasks_integrations_tasks", Columns: []*schema.Column{TasksColumns[21]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "tasks_organizations_tasks", Columns: []*schema.Column{TasksColumns[22]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "tasks_remediations_tasks", Columns: []*schema.Column{TasksColumns[23]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "tasks_reviews_tasks", Columns: []*schema.Column{TasksColumns[24]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "tasks_custom_type_enums_task_kind", Columns: []*schema.Column{TasksColumns[25]}, RefColumns: []*schema.Column{CustomTypeEnumsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "tasks_users_assigner_tasks", Columns: []*schema.Column{TasksColumns[26]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "tasks_users_assignee_tasks", Columns: []*schema.Column{TasksColumns[27]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "tasks_vulnerabilities_tasks", Columns: []*schema.Column{TasksColumns[28]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "task_display_id_owner_id", Unique: true, Columns: []*schema.Column{TasksColumns[7], TasksColumns[22]}, }, { Name: "task_owner_id", Unique: false, Columns: []*schema.Column{TasksColumns[22]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // TaskHistoryColumns holds the columns for the "task_history" table. TaskHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "task_kind_name", Type: field.TypeString, Nullable: true}, {Name: "task_kind_id", Type: field.TypeString, Nullable: true}, {Name: "title", Type: field.TypeString}, {Name: "details", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "status", Type: field.TypeEnum, Enums: []string{"OPEN", "IN_PROGRESS", "IN_REVIEW", "COMPLETED", "WONT_DO"}, Default: "OPEN"}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "due", Type: field.TypeTime, Nullable: true}, {Name: "completed", Type: field.TypeTime, Nullable: true}, {Name: "assignee_id", Type: field.TypeString, Nullable: true}, {Name: "assigner_id", Type: field.TypeString, Nullable: true}, {Name: "system_generated", Type: field.TypeBool, Default: false}, {Name: "idempotency_key", Type: field.TypeString, Nullable: true}, {Name: "external_reference_url", Type: field.TypeJSON, Nullable: true}, } // TaskHistoryTable holds the schema information for the "task_history" table. TaskHistoryTable = &schema.Table{ Name: "task_history", Columns: TaskHistoryColumns, PrimaryKey: []*schema.Column{TaskHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "taskhistory_history_time", Unique: false, Columns: []*schema.Column{TaskHistoryColumns[1]}, }, }, } // TemplatesColumns holds the columns for the "templates" table. TemplatesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "template_type", Type: field.TypeEnum, Enums: []string{"ROOTTEMPLATE", "DOCUMENT"}, Default: "DOCUMENT"}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "kind", Type: field.TypeEnum, Nullable: true, Enums: []string{"QUESTIONNAIRE", "TRUSTCENTER_NDA"}, Default: "QUESTIONNAIRE"}, {Name: "jsonconfig", Type: field.TypeJSON}, {Name: "uischema", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, } // TemplatesTable holds the schema information for the "templates" table. TemplatesTable = &schema.Table{ Name: "templates", Columns: TemplatesColumns, PrimaryKey: []*schema.Column{TemplatesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "templates_organizations_templates", Columns: []*schema.Column{TemplatesColumns[17]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "templates_trust_centers_templates", Columns: []*schema.Column{TemplatesColumns[18]}, RefColumns: []*schema.Column{TrustCentersColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "template_owner_id", Unique: false, Columns: []*schema.Column{TemplatesColumns[17]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "template_name_owner_id_template_type", Unique: true, Columns: []*schema.Column{TemplatesColumns[11], TemplatesColumns[17], TemplatesColumns[12]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "template_trust_center_id", Unique: true, Columns: []*schema.Column{TemplatesColumns[18]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL and kind = 'TRUSTCENTER_NDA'", }, }, }, } // TemplateHistoryColumns holds the columns for the "template_history" table. TemplateHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "template_type", Type: field.TypeEnum, Enums: []string{"ROOTTEMPLATE", "DOCUMENT"}, Default: "DOCUMENT"}, {Name: "description", Type: field.TypeString, Nullable: true}, {Name: "kind", Type: field.TypeEnum, Nullable: true, Enums: []string{"QUESTIONNAIRE", "TRUSTCENTER_NDA"}, Default: "QUESTIONNAIRE"}, {Name: "jsonconfig", Type: field.TypeJSON}, {Name: "uischema", Type: field.TypeJSON, Nullable: true}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, } // TemplateHistoryTable holds the schema information for the "template_history" table. TemplateHistoryTable = &schema.Table{ Name: "template_history", Columns: TemplateHistoryColumns, PrimaryKey: []*schema.Column{TemplateHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "templatehistory_history_time", Unique: false, Columns: []*schema.Column{TemplateHistoryColumns[1]}, }, }, } // TrustCentersColumns holds the columns for the "trust_centers" table. TrustCentersColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "slug", Type: field.TypeString, Nullable: true, Size: 160}, {Name: "pirsch_domain_id", Type: field.TypeString, Nullable: true}, {Name: "pirsch_identification_code", Type: field.TypeString, Nullable: true}, {Name: "preview_status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PROVISIONING", "READY", "FAILED", "DEPROVISIONING", "NONE"}, Default: "NONE"}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "custom_domain_id", Type: field.TypeString, Nullable: true}, {Name: "preview_domain_id", Type: field.TypeString, Nullable: true}, {Name: "trust_center_setting", Type: field.TypeString, Nullable: true}, {Name: "trust_center_preview_setting", Type: field.TypeString, Nullable: true}, {Name: "trust_center_watermark_config", Type: field.TypeString, Nullable: true}, } // TrustCentersTable holds the schema information for the "trust_centers" table. TrustCentersTable = &schema.Table{ Name: "trust_centers", Columns: TrustCentersColumns, PrimaryKey: []*schema.Column{TrustCentersColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "trust_centers_organizations_trust_centers", Columns: []*schema.Column{TrustCentersColumns[12]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trust_centers_custom_domains_custom_domain", Columns: []*schema.Column{TrustCentersColumns[13]}, RefColumns: []*schema.Column{CustomDomainsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trust_centers_custom_domains_preview_domain", Columns: []*schema.Column{TrustCentersColumns[14]}, RefColumns: []*schema.Column{CustomDomainsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trust_centers_trust_center_settings_setting", Columns: []*schema.Column{TrustCentersColumns[15]}, RefColumns: []*schema.Column{TrustCenterSettingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trust_centers_trust_center_settings_preview_setting", Columns: []*schema.Column{TrustCentersColumns[16]}, RefColumns: []*schema.Column{TrustCenterSettingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trust_centers_trust_center_watermark_configs_watermark_config", Columns: []*schema.Column{TrustCentersColumns[17]}, RefColumns: []*schema.Column{TrustCenterWatermarkConfigsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "trustcenter_owner_id", Unique: false, Columns: []*schema.Column{TrustCentersColumns[12]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "trustcenter_slug", Unique: true, Columns: []*schema.Column{TrustCentersColumns[8]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // TrustCenterCompliancesColumns holds the columns for the "trust_center_compliances" table. TrustCenterCompliancesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "standard_id", Type: field.TypeString}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, } // TrustCenterCompliancesTable holds the schema information for the "trust_center_compliances" table. TrustCenterCompliancesTable = &schema.Table{ Name: "trust_center_compliances", Columns: TrustCenterCompliancesColumns, PrimaryKey: []*schema.Column{TrustCenterCompliancesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "trust_center_compliances_standards_trust_center_compliances", Columns: []*schema.Column{TrustCenterCompliancesColumns[8]}, RefColumns: []*schema.Column{StandardsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "trust_center_compliances_trust_centers_trust_center_compliances", Columns: []*schema.Column{TrustCenterCompliancesColumns[9]}, RefColumns: []*schema.Column{TrustCentersColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "trustcentercompliance_standard_id_trust_center_id", Unique: true, Columns: []*schema.Column{TrustCenterCompliancesColumns[8], TrustCenterCompliancesColumns[9]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // TrustCenterComplianceHistoryColumns holds the columns for the "trust_center_compliance_history" table. TrustCenterComplianceHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "standard_id", Type: field.TypeString}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, } // TrustCenterComplianceHistoryTable holds the schema information for the "trust_center_compliance_history" table. TrustCenterComplianceHistoryTable = &schema.Table{ Name: "trust_center_compliance_history", Columns: TrustCenterComplianceHistoryColumns, PrimaryKey: []*schema.Column{TrustCenterComplianceHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "trustcentercompliancehistory_history_time", Unique: false, Columns: []*schema.Column{TrustCenterComplianceHistoryColumns[1]}, }, }, } // TrustCenterDocsColumns holds the columns for the "trust_center_docs" table. TrustCenterDocsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "title", Type: field.TypeString}, {Name: "category", Type: field.TypeString}, {Name: "watermarking_enabled", Type: field.TypeBool, Default: false}, {Name: "watermark_status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "DISABLED"}, Default: "DISABLED"}, {Name: "visibility", Type: field.TypeEnum, Nullable: true, Enums: []string{"PUBLICLY_VISIBLE", "PROTECTED", "NOT_VISIBLE"}, Default: "NOT_VISIBLE"}, {Name: "standard_id", Type: field.TypeString, Nullable: true}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, {Name: "file_id", Type: field.TypeString, Nullable: true}, {Name: "original_file_id", Type: field.TypeString, Nullable: true}, } // TrustCenterDocsTable holds the schema information for the "trust_center_docs" table. TrustCenterDocsTable = &schema.Table{ Name: "trust_center_docs", Columns: TrustCenterDocsColumns, PrimaryKey: []*schema.Column{TrustCenterDocsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "trust_center_docs_standards_trust_center_docs", Columns: []*schema.Column{TrustCenterDocsColumns[13]}, RefColumns: []*schema.Column{StandardsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trust_center_docs_trust_centers_trust_center_docs", Columns: []*schema.Column{TrustCenterDocsColumns[14]}, RefColumns: []*schema.Column{TrustCentersColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trust_center_docs_files_file", Columns: []*schema.Column{TrustCenterDocsColumns[15]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trust_center_docs_files_original_file", Columns: []*schema.Column{TrustCenterDocsColumns[16]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, }, } // TrustCenterDocHistoryColumns holds the columns for the "trust_center_doc_history" table. TrustCenterDocHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, {Name: "title", Type: field.TypeString}, {Name: "category", Type: field.TypeString}, {Name: "file_id", Type: field.TypeString, Nullable: true}, {Name: "original_file_id", Type: field.TypeString, Nullable: true}, {Name: "watermarking_enabled", Type: field.TypeBool, Default: false}, {Name: "watermark_status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "DISABLED"}, Default: "DISABLED"}, {Name: "visibility", Type: field.TypeEnum, Nullable: true, Enums: []string{"PUBLICLY_VISIBLE", "PROTECTED", "NOT_VISIBLE"}, Default: "NOT_VISIBLE"}, {Name: "standard_id", Type: field.TypeString, Nullable: true}, } // TrustCenterDocHistoryTable holds the schema information for the "trust_center_doc_history" table. TrustCenterDocHistoryTable = &schema.Table{ Name: "trust_center_doc_history", Columns: TrustCenterDocHistoryColumns, PrimaryKey: []*schema.Column{TrustCenterDocHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "trustcenterdochistory_history_time", Unique: false, Columns: []*schema.Column{TrustCenterDocHistoryColumns[1]}, }, }, } // TrustCenterHistoryColumns holds the columns for the "trust_center_history" table. TrustCenterHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "slug", Type: field.TypeString, Nullable: true, Size: 160}, {Name: "custom_domain_id", Type: field.TypeString, Nullable: true}, {Name: "preview_domain_id", Type: field.TypeString, Nullable: true}, {Name: "pirsch_domain_id", Type: field.TypeString, Nullable: true}, {Name: "pirsch_identification_code", Type: field.TypeString, Nullable: true}, {Name: "preview_status", Type: field.TypeEnum, Nullable: true, Enums: []string{"PROVISIONING", "READY", "FAILED", "DEPROVISIONING", "NONE"}, Default: "NONE"}, } // TrustCenterHistoryTable holds the schema information for the "trust_center_history" table. TrustCenterHistoryTable = &schema.Table{ Name: "trust_center_history", Columns: TrustCenterHistoryColumns, PrimaryKey: []*schema.Column{TrustCenterHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "trustcenterhistory_history_time", Unique: false, Columns: []*schema.Column{TrustCenterHistoryColumns[1]}, }, }, } // TrustCenterSettingsColumns holds the columns for the "trust_center_settings" table. TrustCenterSettingsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, {Name: "title", Type: field.TypeString, Nullable: true, Size: 160}, {Name: "overview", Type: field.TypeString, Nullable: true, Size: 1024}, {Name: "logo_remote_url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "favicon_remote_url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "theme_mode", Type: field.TypeEnum, Nullable: true, Enums: []string{"EASY", "ADVANCED"}, Default: "EASY"}, {Name: "primary_color", Type: field.TypeString, Nullable: true}, {Name: "font", Type: field.TypeString, Nullable: true}, {Name: "foreground_color", Type: field.TypeString, Nullable: true}, {Name: "background_color", Type: field.TypeString, Nullable: true}, {Name: "accent_color", Type: field.TypeString, Nullable: true}, {Name: "secondary_background_color", Type: field.TypeString, Nullable: true}, {Name: "secondary_foreground_color", Type: field.TypeString, Nullable: true}, {Name: "environment", Type: field.TypeEnum, Nullable: true, Enums: []string{"LIVE", "PREVIEW"}, Default: "LIVE"}, {Name: "logo_local_file_id", Type: field.TypeString, Nullable: true}, {Name: "favicon_local_file_id", Type: field.TypeString, Nullable: true}, } // TrustCenterSettingsTable holds the schema information for the "trust_center_settings" table. TrustCenterSettingsTable = &schema.Table{ Name: "trust_center_settings", Columns: TrustCenterSettingsColumns, PrimaryKey: []*schema.Column{TrustCenterSettingsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "trust_center_settings_files_logo_file", Columns: []*schema.Column{TrustCenterSettingsColumns[21]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trust_center_settings_files_favicon_file", Columns: []*schema.Column{TrustCenterSettingsColumns[22]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "trustcentersetting_trust_center_id_environment", Unique: true, Columns: []*schema.Column{TrustCenterSettingsColumns[7], TrustCenterSettingsColumns[20]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // TrustCenterSettingHistoryColumns holds the columns for the "trust_center_setting_history" table. TrustCenterSettingHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, {Name: "title", Type: field.TypeString, Nullable: true, Size: 160}, {Name: "overview", Type: field.TypeString, Nullable: true, Size: 1024}, {Name: "logo_remote_url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "logo_local_file_id", Type: field.TypeString, Nullable: true}, {Name: "favicon_remote_url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "favicon_local_file_id", Type: field.TypeString, Nullable: true}, {Name: "theme_mode", Type: field.TypeEnum, Nullable: true, Enums: []string{"EASY", "ADVANCED"}, Default: "EASY"}, {Name: "primary_color", Type: field.TypeString, Nullable: true}, {Name: "font", Type: field.TypeString, Nullable: true}, {Name: "foreground_color", Type: field.TypeString, Nullable: true}, {Name: "background_color", Type: field.TypeString, Nullable: true}, {Name: "accent_color", Type: field.TypeString, Nullable: true}, {Name: "secondary_background_color", Type: field.TypeString, Nullable: true}, {Name: "secondary_foreground_color", Type: field.TypeString, Nullable: true}, {Name: "environment", Type: field.TypeEnum, Nullable: true, Enums: []string{"LIVE", "PREVIEW"}, Default: "LIVE"}, } // TrustCenterSettingHistoryTable holds the schema information for the "trust_center_setting_history" table. TrustCenterSettingHistoryTable = &schema.Table{ Name: "trust_center_setting_history", Columns: TrustCenterSettingHistoryColumns, PrimaryKey: []*schema.Column{TrustCenterSettingHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "trustcentersettinghistory_history_time", Unique: false, Columns: []*schema.Column{TrustCenterSettingHistoryColumns[1]}, }, }, } // TrustCenterSubprocessorsColumns holds the columns for the "trust_center_subprocessors" table. TrustCenterSubprocessorsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "countries", Type: field.TypeJSON, Nullable: true}, {Name: "category", Type: field.TypeString, Size: 255}, {Name: "subprocessor_id", Type: field.TypeString}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, } // TrustCenterSubprocessorsTable holds the schema information for the "trust_center_subprocessors" table. TrustCenterSubprocessorsTable = &schema.Table{ Name: "trust_center_subprocessors", Columns: TrustCenterSubprocessorsColumns, PrimaryKey: []*schema.Column{TrustCenterSubprocessorsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "trust_center_subprocessors_subprocessors_trust_center_subprocessors", Columns: []*schema.Column{TrustCenterSubprocessorsColumns[9]}, RefColumns: []*schema.Column{SubprocessorsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "trust_center_subprocessors_trust_centers_trust_center_subprocessors", Columns: []*schema.Column{TrustCenterSubprocessorsColumns[10]}, RefColumns: []*schema.Column{TrustCentersColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "trustcentersubprocessor_subprocessor_id_trust_center_id", Unique: true, Columns: []*schema.Column{TrustCenterSubprocessorsColumns[9], TrustCenterSubprocessorsColumns[10]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // TrustCenterSubprocessorHistoryColumns holds the columns for the "trust_center_subprocessor_history" table. TrustCenterSubprocessorHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "subprocessor_id", Type: field.TypeString}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, {Name: "countries", Type: field.TypeJSON, Nullable: true}, {Name: "category", Type: field.TypeString, Size: 255}, } // TrustCenterSubprocessorHistoryTable holds the schema information for the "trust_center_subprocessor_history" table. TrustCenterSubprocessorHistoryTable = &schema.Table{ Name: "trust_center_subprocessor_history", Columns: TrustCenterSubprocessorHistoryColumns, PrimaryKey: []*schema.Column{TrustCenterSubprocessorHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "trustcentersubprocessorhistory_history_time", Unique: false, Columns: []*schema.Column{TrustCenterSubprocessorHistoryColumns[1]}, }, }, } // TrustCenterWatermarkConfigsColumns holds the columns for the "trust_center_watermark_configs" table. TrustCenterWatermarkConfigsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, {Name: "is_enabled", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "text", Type: field.TypeString, Nullable: true, Size: 255}, {Name: "font_size", Type: field.TypeFloat64, Nullable: true, Default: 48}, {Name: "opacity", Type: field.TypeFloat64, Nullable: true, Default: 0.3}, {Name: "rotation", Type: field.TypeFloat64, Nullable: true, Default: 45}, {Name: "color", Type: field.TypeString, Nullable: true, Default: "#808080"}, {Name: "font", Type: field.TypeEnum, Nullable: true, Enums: []string{"COURIER", "COURIER_BOLD", "COURIER_BOLDOBLIQUE", "COURIER_OBLIQUE", "HELVETICA", "HELVETICA_BOLD", "HELVETICA_BOLDOBLIQUE", "HELVETICA_OBLIQUE", "SYMBOL", "TIMES_BOLD", "TIMES_BOLDITALIC", "TIMES_ITALIC", "TIMES_ROMAN"}, Default: "HELVETICA"}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "logo_id", Type: field.TypeString, Nullable: true}, } // TrustCenterWatermarkConfigsTable holds the schema information for the "trust_center_watermark_configs" table. TrustCenterWatermarkConfigsTable = &schema.Table{ Name: "trust_center_watermark_configs", Columns: TrustCenterWatermarkConfigsColumns, PrimaryKey: []*schema.Column{TrustCenterWatermarkConfigsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "trust_center_watermark_configs_organizations_trust_center_watermark_configs", Columns: []*schema.Column{TrustCenterWatermarkConfigsColumns[15]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trust_center_watermark_configs_files_file", Columns: []*schema.Column{TrustCenterWatermarkConfigsColumns[16]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "trustcenterwatermarkconfig_owner_id", Unique: false, Columns: []*schema.Column{TrustCenterWatermarkConfigsColumns[15]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "trustcenterwatermarkconfig_trust_center_id", Unique: true, Columns: []*schema.Column{TrustCenterWatermarkConfigsColumns[7]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // TrustCenterWatermarkConfigHistoryColumns holds the columns for the "trust_center_watermark_config_history" table. TrustCenterWatermarkConfigHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, {Name: "is_enabled", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "logo_id", Type: field.TypeString, Nullable: true}, {Name: "text", Type: field.TypeString, Nullable: true, Size: 255}, {Name: "font_size", Type: field.TypeFloat64, Nullable: true, Default: 48}, {Name: "opacity", Type: field.TypeFloat64, Nullable: true, Default: 0.3}, {Name: "rotation", Type: field.TypeFloat64, Nullable: true, Default: 45}, {Name: "color", Type: field.TypeString, Nullable: true, Default: "#808080"}, {Name: "font", Type: field.TypeEnum, Nullable: true, Enums: []string{"COURIER", "COURIER_BOLD", "COURIER_BOLDOBLIQUE", "COURIER_OBLIQUE", "HELVETICA", "HELVETICA_BOLD", "HELVETICA_BOLDOBLIQUE", "HELVETICA_OBLIQUE", "SYMBOL", "TIMES_BOLD", "TIMES_BOLDITALIC", "TIMES_ITALIC", "TIMES_ROMAN"}, Default: "HELVETICA"}, } // TrustCenterWatermarkConfigHistoryTable holds the schema information for the "trust_center_watermark_config_history" table. TrustCenterWatermarkConfigHistoryTable = &schema.Table{ Name: "trust_center_watermark_config_history", Columns: TrustCenterWatermarkConfigHistoryColumns, PrimaryKey: []*schema.Column{TrustCenterWatermarkConfigHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "trustcenterwatermarkconfighistory_history_time", Unique: false, Columns: []*schema.Column{TrustCenterWatermarkConfigHistoryColumns[1]}, }, }, } // TrustcenterEntitiesColumns holds the columns for the "trustcenter_entities" table. TrustcenterEntitiesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "name", Type: field.TypeString}, {Name: "file_trustcenter_entities", Type: field.TypeString, Nullable: true}, {Name: "trust_center_trustcenter_entities", Type: field.TypeString, Nullable: true}, {Name: "logo_file_id", Type: field.TypeString, Nullable: true}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, {Name: "entity_type_id", Type: field.TypeString, Nullable: true}, } // TrustcenterEntitiesTable holds the schema information for the "trustcenter_entities" table. TrustcenterEntitiesTable = &schema.Table{ Name: "trustcenter_entities", Columns: TrustcenterEntitiesColumns, PrimaryKey: []*schema.Column{TrustcenterEntitiesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "trustcenter_entities_files_trustcenter_entities", Columns: []*schema.Column{TrustcenterEntitiesColumns[9]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trustcenter_entities_trust_centers_trustcenter_entities", Columns: []*schema.Column{TrustcenterEntitiesColumns[10]}, RefColumns: []*schema.Column{TrustCentersColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trustcenter_entities_files_logo_file", Columns: []*schema.Column{TrustcenterEntitiesColumns[11]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trustcenter_entities_trust_centers_trust_center", Columns: []*schema.Column{TrustcenterEntitiesColumns[12]}, RefColumns: []*schema.Column{TrustCentersColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "trustcenter_entities_entity_types_entity_type", Columns: []*schema.Column{TrustcenterEntitiesColumns[13]}, RefColumns: []*schema.Column{EntityTypesColumns[0]}, OnDelete: schema.SetNull, }, }, } // TrustcenterEntityHistoryColumns holds the columns for the "trustcenter_entity_history" table. TrustcenterEntityHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "logo_file_id", Type: field.TypeString, Nullable: true}, {Name: "url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "trust_center_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "entity_type_id", Type: field.TypeString, Nullable: true}, } // TrustcenterEntityHistoryTable holds the schema information for the "trustcenter_entity_history" table. TrustcenterEntityHistoryTable = &schema.Table{ Name: "trustcenter_entity_history", Columns: TrustcenterEntityHistoryColumns, PrimaryKey: []*schema.Column{TrustcenterEntityHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "trustcenterentityhistory_history_time", Unique: false, Columns: []*schema.Column{TrustcenterEntityHistoryColumns[1]}, }, }, } // UsersColumns holds the columns for the "users" table. UsersColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString, Unique: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "email", Type: field.TypeString}, {Name: "first_name", Type: field.TypeString, Nullable: true, Size: 64}, {Name: "last_name", Type: field.TypeString, Nullable: true, Size: 64}, {Name: "display_name", Type: field.TypeString, Size: 64}, {Name: "avatar_remote_url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "avatar_updated_at", Type: field.TypeTime, Nullable: true}, {Name: "last_seen", Type: field.TypeTime, Nullable: true}, {Name: "last_login_provider", Type: field.TypeEnum, Nullable: true, Enums: []string{"CREDENTIALS", "GOOGLE", "GITHUB", "WEBAUTHN", "OIDC"}}, {Name: "password", Type: field.TypeString, Nullable: true}, {Name: "sub", Type: field.TypeString, Unique: true, Nullable: true}, {Name: "auth_provider", Type: field.TypeEnum, Enums: []string{"CREDENTIALS", "GOOGLE", "GITHUB", "WEBAUTHN", "OIDC"}, Default: "CREDENTIALS"}, {Name: "role", Type: field.TypeEnum, Nullable: true, Enums: []string{"ADMIN", "MEMBER", "USER"}, Default: "USER"}, {Name: "scim_external_id", Type: field.TypeString, Nullable: true}, {Name: "scim_username", Type: field.TypeString, Nullable: true}, {Name: "scim_active", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "scim_preferred_language", Type: field.TypeString, Nullable: true}, {Name: "scim_locale", Type: field.TypeString, Nullable: true}, {Name: "avatar_local_file_id", Type: field.TypeString, Nullable: true}, } // UsersTable holds the schema information for the "users" table. UsersTable = &schema.Table{ Name: "users", Columns: UsersColumns, PrimaryKey: []*schema.Column{UsersColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "users_files_avatar_file", Columns: []*schema.Column{UsersColumns[26]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "user_email", Unique: true, Columns: []*schema.Column{UsersColumns[9]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // UserHistoryColumns holds the columns for the "user_history" table. UserHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "email", Type: field.TypeString}, {Name: "first_name", Type: field.TypeString, Nullable: true, Size: 64}, {Name: "last_name", Type: field.TypeString, Nullable: true, Size: 64}, {Name: "display_name", Type: field.TypeString, Size: 64}, {Name: "avatar_remote_url", Type: field.TypeString, Nullable: true, Size: 2048}, {Name: "avatar_local_file_id", Type: field.TypeString, Nullable: true}, {Name: "avatar_updated_at", Type: field.TypeTime, Nullable: true}, {Name: "last_seen", Type: field.TypeTime, Nullable: true}, {Name: "last_login_provider", Type: field.TypeEnum, Nullable: true, Enums: []string{"CREDENTIALS", "GOOGLE", "GITHUB", "WEBAUTHN", "OIDC"}}, {Name: "password", Type: field.TypeString, Nullable: true}, {Name: "sub", Type: field.TypeString, Nullable: true}, {Name: "auth_provider", Type: field.TypeEnum, Enums: []string{"CREDENTIALS", "GOOGLE", "GITHUB", "WEBAUTHN", "OIDC"}, Default: "CREDENTIALS"}, {Name: "role", Type: field.TypeEnum, Nullable: true, Enums: []string{"ADMIN", "MEMBER", "USER"}, Default: "USER"}, {Name: "scim_external_id", Type: field.TypeString, Nullable: true}, {Name: "scim_username", Type: field.TypeString, Nullable: true}, {Name: "scim_active", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "scim_preferred_language", Type: field.TypeString, Nullable: true}, {Name: "scim_locale", Type: field.TypeString, Nullable: true}, } // UserHistoryTable holds the schema information for the "user_history" table. UserHistoryTable = &schema.Table{ Name: "user_history", Columns: UserHistoryColumns, PrimaryKey: []*schema.Column{UserHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "userhistory_history_time", Unique: false, Columns: []*schema.Column{UserHistoryColumns[1]}, }, }, } // UserSettingsColumns holds the columns for the "user_settings" table. UserSettingsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "locked", Type: field.TypeBool, Default: false}, {Name: "silenced_at", Type: field.TypeTime, Nullable: true}, {Name: "suspended_at", Type: field.TypeTime, Nullable: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"ACTIVE", "INACTIVE", "DEACTIVATED", "SUSPENDED", "ONBOARDING"}, Default: "ACTIVE"}, {Name: "email_confirmed", Type: field.TypeBool, Default: false}, {Name: "is_webauthn_allowed", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "is_tfa_enabled", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "phone_number", Type: field.TypeString, Nullable: true}, {Name: "user_id", Type: field.TypeString, Unique: true, Nullable: true}, {Name: "user_setting_default_org", Type: field.TypeString, Nullable: true}, } // UserSettingsTable holds the schema information for the "user_settings" table. UserSettingsTable = &schema.Table{ Name: "user_settings", Columns: UserSettingsColumns, PrimaryKey: []*schema.Column{UserSettingsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "user_settings_users_setting", Columns: []*schema.Column{UserSettingsColumns[16]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "user_settings_organizations_default_org", Columns: []*schema.Column{UserSettingsColumns[17]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, } // UserSettingHistoryColumns holds the columns for the "user_setting_history" table. UserSettingHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "user_id", Type: field.TypeString, Nullable: true}, {Name: "locked", Type: field.TypeBool, Default: false}, {Name: "silenced_at", Type: field.TypeTime, Nullable: true}, {Name: "suspended_at", Type: field.TypeTime, Nullable: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"ACTIVE", "INACTIVE", "DEACTIVATED", "SUSPENDED", "ONBOARDING"}, Default: "ACTIVE"}, {Name: "email_confirmed", Type: field.TypeBool, Default: false}, {Name: "is_webauthn_allowed", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "is_tfa_enabled", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "phone_number", Type: field.TypeString, Nullable: true}, } // UserSettingHistoryTable holds the schema information for the "user_setting_history" table. UserSettingHistoryTable = &schema.Table{ Name: "user_setting_history", Columns: UserSettingHistoryColumns, PrimaryKey: []*schema.Column{UserSettingHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "usersettinghistory_history_time", Unique: false, Columns: []*schema.Column{UserSettingHistoryColumns[1]}, }, }, } // VulnerabilitiesColumns holds the columns for the "vulnerabilities" table. VulnerabilitiesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "external_owner_id", Type: field.TypeString, Nullable: true}, {Name: "external_id", Type: field.TypeString}, {Name: "cve_id", Type: field.TypeString, Nullable: true}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "display_name", Type: field.TypeString, Nullable: true}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "severity", Type: field.TypeString, Nullable: true}, {Name: "score", Type: field.TypeFloat64, Nullable: true}, {Name: "impact", Type: field.TypeFloat64, Nullable: true}, {Name: "exploitability", Type: field.TypeFloat64, Nullable: true}, {Name: "priority", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeString, Nullable: true}, {Name: "summary", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "vector", Type: field.TypeString, Nullable: true}, {Name: "remediation_sla", Type: field.TypeInt, Nullable: true}, {Name: "open", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "blocking", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "production", Type: field.TypeBool, Nullable: true}, {Name: "public", Type: field.TypeBool, Nullable: true}, {Name: "validated", Type: field.TypeBool, Nullable: true}, {Name: "references", Type: field.TypeJSON, Nullable: true}, {Name: "impacts", Type: field.TypeJSON, Nullable: true}, {Name: "published_at", Type: field.TypeTime, Nullable: true}, {Name: "discovered_at", Type: field.TypeTime, Nullable: true}, {Name: "source_updated_at", Type: field.TypeTime, Nullable: true}, {Name: "external_uri", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "raw_payload", Type: field.TypeJSON, Nullable: true}, {Name: "finding_vulnerabilities", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "remediation_vulnerabilities", Type: field.TypeString, Nullable: true}, {Name: "review_vulnerabilities", Type: field.TypeString, Nullable: true}, } // VulnerabilitiesTable holds the schema information for the "vulnerabilities" table. VulnerabilitiesTable = &schema.Table{ Name: "vulnerabilities", Columns: VulnerabilitiesColumns, PrimaryKey: []*schema.Column{VulnerabilitiesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "vulnerabilities_findings_vulnerabilities", Columns: []*schema.Column{VulnerabilitiesColumns[41]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "vulnerabilities_organizations_vulnerabilities", Columns: []*schema.Column{VulnerabilitiesColumns[42]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "vulnerabilities_remediations_vulnerabilities", Columns: []*schema.Column{VulnerabilitiesColumns[43]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "vulnerabilities_reviews_vulnerabilities", Columns: []*schema.Column{VulnerabilitiesColumns[44]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "vulnerability_display_id_owner_id", Unique: true, Columns: []*schema.Column{VulnerabilitiesColumns[7], VulnerabilitiesColumns[42]}, }, { Name: "vulnerability_owner_id", Unique: false, Columns: []*schema.Column{VulnerabilitiesColumns[42]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "vulnerability_external_id_owner_id", Unique: true, Columns: []*schema.Column{VulnerabilitiesColumns[13], VulnerabilitiesColumns[42]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "vulnerability_cve_id_owner_id", Unique: true, Columns: []*schema.Column{VulnerabilitiesColumns[14], VulnerabilitiesColumns[42]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // VulnerabilityHistoryColumns holds the columns for the "vulnerability_history" table. VulnerabilityHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "external_owner_id", Type: field.TypeString, Nullable: true}, {Name: "external_id", Type: field.TypeString}, {Name: "cve_id", Type: field.TypeString, Nullable: true}, {Name: "source", Type: field.TypeString, Nullable: true}, {Name: "display_name", Type: field.TypeString, Nullable: true}, {Name: "category", Type: field.TypeString, Nullable: true}, {Name: "severity", Type: field.TypeString, Nullable: true}, {Name: "score", Type: field.TypeFloat64, Nullable: true}, {Name: "impact", Type: field.TypeFloat64, Nullable: true}, {Name: "exploitability", Type: field.TypeFloat64, Nullable: true}, {Name: "priority", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeString, Nullable: true}, {Name: "summary", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "vector", Type: field.TypeString, Nullable: true}, {Name: "remediation_sla", Type: field.TypeInt, Nullable: true}, {Name: "open", Type: field.TypeBool, Nullable: true, Default: true}, {Name: "blocking", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "production", Type: field.TypeBool, Nullable: true}, {Name: "public", Type: field.TypeBool, Nullable: true}, {Name: "validated", Type: field.TypeBool, Nullable: true}, {Name: "references", Type: field.TypeJSON, Nullable: true}, {Name: "impacts", Type: field.TypeJSON, Nullable: true}, {Name: "published_at", Type: field.TypeTime, Nullable: true}, {Name: "discovered_at", Type: field.TypeTime, Nullable: true}, {Name: "source_updated_at", Type: field.TypeTime, Nullable: true}, {Name: "external_uri", Type: field.TypeString, Nullable: true}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "raw_payload", Type: field.TypeJSON, Nullable: true}, } // VulnerabilityHistoryTable holds the schema information for the "vulnerability_history" table. VulnerabilityHistoryTable = &schema.Table{ Name: "vulnerability_history", Columns: VulnerabilityHistoryColumns, PrimaryKey: []*schema.Column{VulnerabilityHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "vulnerabilityhistory_history_time", Unique: false, Columns: []*schema.Column{VulnerabilityHistoryColumns[1]}, }, }, } // WebauthnsColumns holds the columns for the "webauthns" table. WebauthnsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "credential_id", Type: field.TypeBytes, Unique: true, Nullable: true}, {Name: "public_key", Type: field.TypeBytes, Nullable: true}, {Name: "attestation_type", Type: field.TypeString, Nullable: true}, {Name: "aaguid", Type: field.TypeOther, SchemaType: map[string]string{"postgres": "bytea"}}, {Name: "sign_count", Type: field.TypeInt32}, {Name: "transports", Type: field.TypeJSON}, {Name: "backup_eligible", Type: field.TypeBool, Default: false}, {Name: "backup_state", Type: field.TypeBool, Default: false}, {Name: "user_present", Type: field.TypeBool, Default: false}, {Name: "user_verified", Type: field.TypeBool, Default: false}, {Name: "owner_id", Type: field.TypeString}, } // WebauthnsTable holds the schema information for the "webauthns" table. WebauthnsTable = &schema.Table{ Name: "webauthns", Columns: WebauthnsColumns, PrimaryKey: []*schema.Column{WebauthnsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "webauthns_users_webauthns", Columns: []*schema.Column{WebauthnsColumns[16]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.NoAction, }, }, } // WorkflowAssignmentsColumns holds the columns for the "workflow_assignments" table. WorkflowAssignmentsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "assignment_key", Type: field.TypeString}, {Name: "role", Type: field.TypeString, Default: "APPROVER"}, {Name: "label", Type: field.TypeString, Nullable: true}, {Name: "required", Type: field.TypeBool, Default: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"PENDING", "APPROVED", "REJECTED"}, Default: "PENDING"}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "decided_at", Type: field.TypeTime, Nullable: true}, {Name: "notes", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "workflow_instance_id", Type: field.TypeString}, {Name: "actor_user_id", Type: field.TypeString, Nullable: true}, {Name: "actor_group_id", Type: field.TypeString, Nullable: true}, {Name: "workflow_instance_workflow_assignments", Type: field.TypeString, Nullable: true}, } // WorkflowAssignmentsTable holds the schema information for the "workflow_assignments" table. WorkflowAssignmentsTable = &schema.Table{ Name: "workflow_assignments", Columns: WorkflowAssignmentsColumns, PrimaryKey: []*schema.Column{WorkflowAssignmentsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "workflow_assignments_organizations_workflow_assignments", Columns: []*schema.Column{WorkflowAssignmentsColumns[17]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_assignments_workflow_instances_workflow_instance", Columns: []*schema.Column{WorkflowAssignmentsColumns[18]}, RefColumns: []*schema.Column{WorkflowInstancesColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "workflow_assignments_users_user", Columns: []*schema.Column{WorkflowAssignmentsColumns[19]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_assignments_groups_group", Columns: []*schema.Column{WorkflowAssignmentsColumns[20]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_assignments_workflow_instances_workflow_assignments", Columns: []*schema.Column{WorkflowAssignmentsColumns[21]}, RefColumns: []*schema.Column{WorkflowInstancesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "workflowassignment_display_id_owner_id", Unique: true, Columns: []*schema.Column{WorkflowAssignmentsColumns[7], WorkflowAssignmentsColumns[17]}, }, { Name: "workflowassignment_owner_id", Unique: false, Columns: []*schema.Column{WorkflowAssignmentsColumns[17]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "workflowassignment_workflow_instance_id_assignment_key", Unique: true, Columns: []*schema.Column{WorkflowAssignmentsColumns[18], WorkflowAssignmentsColumns[9]}, }, }, } // WorkflowAssignmentHistoryColumns holds the columns for the "workflow_assignment_history" table. WorkflowAssignmentHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "workflow_instance_id", Type: field.TypeString}, {Name: "assignment_key", Type: field.TypeString}, {Name: "role", Type: field.TypeString, Default: "APPROVER"}, {Name: "label", Type: field.TypeString, Nullable: true}, {Name: "required", Type: field.TypeBool, Default: true}, {Name: "status", Type: field.TypeEnum, Enums: []string{"PENDING", "APPROVED", "REJECTED"}, Default: "PENDING"}, {Name: "metadata", Type: field.TypeJSON, Nullable: true}, {Name: "decided_at", Type: field.TypeTime, Nullable: true}, {Name: "actor_user_id", Type: field.TypeString, Nullable: true}, {Name: "actor_group_id", Type: field.TypeString, Nullable: true}, {Name: "notes", Type: field.TypeString, Nullable: true, Size: 2147483647}, } // WorkflowAssignmentHistoryTable holds the schema information for the "workflow_assignment_history" table. WorkflowAssignmentHistoryTable = &schema.Table{ Name: "workflow_assignment_history", Columns: WorkflowAssignmentHistoryColumns, PrimaryKey: []*schema.Column{WorkflowAssignmentHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "workflowassignmenthistory_history_time", Unique: false, Columns: []*schema.Column{WorkflowAssignmentHistoryColumns[1]}, }, }, } // WorkflowAssignmentTargetsColumns holds the columns for the "workflow_assignment_targets" table. WorkflowAssignmentTargetsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "target_type", Type: field.TypeEnum, Enums: []string{"USER", "GROUP", "ROLE", "RESOLVER"}}, {Name: "resolver_key", Type: field.TypeString, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "workflow_assignment_workflow_assignment_targets", Type: field.TypeString, Nullable: true}, {Name: "workflow_assignment_id", Type: field.TypeString}, {Name: "target_user_id", Type: field.TypeString, Nullable: true}, {Name: "target_group_id", Type: field.TypeString, Nullable: true}, } // WorkflowAssignmentTargetsTable holds the schema information for the "workflow_assignment_targets" table. WorkflowAssignmentTargetsTable = &schema.Table{ Name: "workflow_assignment_targets", Columns: WorkflowAssignmentTargetsColumns, PrimaryKey: []*schema.Column{WorkflowAssignmentTargetsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "workflow_assignment_targets_organizations_workflow_assignment_targets", Columns: []*schema.Column{WorkflowAssignmentTargetsColumns[11]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_assignment_targets_workflow_assignments_workflow_assignment_targets", Columns: []*schema.Column{WorkflowAssignmentTargetsColumns[12]}, RefColumns: []*schema.Column{WorkflowAssignmentsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_assignment_targets_workflow_assignments_workflow_assignment", Columns: []*schema.Column{WorkflowAssignmentTargetsColumns[13]}, RefColumns: []*schema.Column{WorkflowAssignmentsColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "workflow_assignment_targets_users_user", Columns: []*schema.Column{WorkflowAssignmentTargetsColumns[14]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_assignment_targets_groups_group", Columns: []*schema.Column{WorkflowAssignmentTargetsColumns[15]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "workflowassignmenttarget_display_id_owner_id", Unique: true, Columns: []*schema.Column{WorkflowAssignmentTargetsColumns[7], WorkflowAssignmentTargetsColumns[11]}, }, { Name: "workflowassignmenttarget_owner_id", Unique: false, Columns: []*schema.Column{WorkflowAssignmentTargetsColumns[11]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "workflowassignmenttarget_workflow_assignment_id", Unique: false, Columns: []*schema.Column{WorkflowAssignmentTargetsColumns[13]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at IS NULL", }, }, { Name: "workflowassignmenttarget_workflow_assignment_id_target_type_target_user_id_target_group_id_resolver_key", Unique: true, Columns: []*schema.Column{WorkflowAssignmentTargetsColumns[13], WorkflowAssignmentTargetsColumns[9], WorkflowAssignmentTargetsColumns[14], WorkflowAssignmentTargetsColumns[15], WorkflowAssignmentTargetsColumns[10]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at IS NULL", }, }, }, } // WorkflowAssignmentTargetHistoryColumns holds the columns for the "workflow_assignment_target_history" table. WorkflowAssignmentTargetHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "workflow_assignment_id", Type: field.TypeString}, {Name: "target_type", Type: field.TypeEnum, Enums: []string{"USER", "GROUP", "ROLE", "RESOLVER"}}, {Name: "target_user_id", Type: field.TypeString, Nullable: true}, {Name: "target_group_id", Type: field.TypeString, Nullable: true}, {Name: "resolver_key", Type: field.TypeString, Nullable: true}, } // WorkflowAssignmentTargetHistoryTable holds the schema information for the "workflow_assignment_target_history" table. WorkflowAssignmentTargetHistoryTable = &schema.Table{ Name: "workflow_assignment_target_history", Columns: WorkflowAssignmentTargetHistoryColumns, PrimaryKey: []*schema.Column{WorkflowAssignmentTargetHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "workflowassignmenttargethistory_history_time", Unique: false, Columns: []*schema.Column{WorkflowAssignmentTargetHistoryColumns[1]}, }, }, } // WorkflowDefinitionsColumns holds the columns for the "workflow_definitions" table. WorkflowDefinitionsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "workflow_kind", Type: field.TypeEnum, Enums: []string{"APPROVAL", "LIFECYCLE", "NOTIFICATION"}}, {Name: "schema_type", Type: field.TypeString}, {Name: "revision", Type: field.TypeInt, Default: 1}, {Name: "draft", Type: field.TypeBool, Default: true}, {Name: "published_at", Type: field.TypeTime, Nullable: true}, {Name: "cooldown_seconds", Type: field.TypeInt, Default: 0}, {Name: "is_default", Type: field.TypeBool, Default: false}, {Name: "active", Type: field.TypeBool, Default: true}, {Name: "trigger_operations", Type: field.TypeJSON, Nullable: true}, {Name: "trigger_fields", Type: field.TypeJSON, Nullable: true}, {Name: "definition_json", Type: field.TypeJSON, Nullable: true}, {Name: "tracked_fields", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, } // WorkflowDefinitionsTable holds the schema information for the "workflow_definitions" table. WorkflowDefinitionsTable = &schema.Table{ Name: "workflow_definitions", Columns: WorkflowDefinitionsColumns, PrimaryKey: []*schema.Column{WorkflowDefinitionsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "workflow_definitions_organizations_workflow_definitions", Columns: []*schema.Column{WorkflowDefinitionsColumns[26]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "workflowdefinition_display_id_owner_id", Unique: true, Columns: []*schema.Column{WorkflowDefinitionsColumns[7], WorkflowDefinitionsColumns[26]}, }, { Name: "workflowdefinition_owner_id", Unique: false, Columns: []*schema.Column{WorkflowDefinitionsColumns[26]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // WorkflowDefinitionHistoryColumns holds the columns for the "workflow_definition_history" table. WorkflowDefinitionHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "system_owned", Type: field.TypeBool, Nullable: true, Default: false}, {Name: "internal_notes", Type: field.TypeString, Nullable: true}, {Name: "system_internal_id", Type: field.TypeString, Nullable: true}, {Name: "name", Type: field.TypeString}, {Name: "description", Type: field.TypeString, Nullable: true, Size: 2147483647}, {Name: "workflow_kind", Type: field.TypeEnum, Enums: []string{"APPROVAL", "LIFECYCLE", "NOTIFICATION"}}, {Name: "schema_type", Type: field.TypeString}, {Name: "revision", Type: field.TypeInt, Default: 1}, {Name: "draft", Type: field.TypeBool, Default: true}, {Name: "published_at", Type: field.TypeTime, Nullable: true}, {Name: "cooldown_seconds", Type: field.TypeInt, Default: 0}, {Name: "is_default", Type: field.TypeBool, Default: false}, {Name: "active", Type: field.TypeBool, Default: true}, {Name: "trigger_operations", Type: field.TypeJSON, Nullable: true}, {Name: "trigger_fields", Type: field.TypeJSON, Nullable: true}, {Name: "definition_json", Type: field.TypeJSON, Nullable: true}, {Name: "tracked_fields", Type: field.TypeJSON, Nullable: true}, } // WorkflowDefinitionHistoryTable holds the schema information for the "workflow_definition_history" table. WorkflowDefinitionHistoryTable = &schema.Table{ Name: "workflow_definition_history", Columns: WorkflowDefinitionHistoryColumns, PrimaryKey: []*schema.Column{WorkflowDefinitionHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "workflowdefinitionhistory_history_time", Unique: false, Columns: []*schema.Column{WorkflowDefinitionHistoryColumns[1]}, }, }, } // WorkflowEventsColumns holds the columns for the "workflow_events" table. WorkflowEventsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "event_type", Type: field.TypeEnum, Enums: []string{"ACTION", "TRIGGER", "DECISION"}}, {Name: "payload", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "workflow_instance_id", Type: field.TypeString}, {Name: "workflow_instance_workflow_events", Type: field.TypeString, Nullable: true}, } // WorkflowEventsTable holds the schema information for the "workflow_events" table. WorkflowEventsTable = &schema.Table{ Name: "workflow_events", Columns: WorkflowEventsColumns, PrimaryKey: []*schema.Column{WorkflowEventsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "workflow_events_organizations_workflow_events", Columns: []*schema.Column{WorkflowEventsColumns[11]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_events_workflow_instances_workflow_instance", Columns: []*schema.Column{WorkflowEventsColumns[12]}, RefColumns: []*schema.Column{WorkflowInstancesColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "workflow_events_workflow_instances_workflow_events", Columns: []*schema.Column{WorkflowEventsColumns[13]}, RefColumns: []*schema.Column{WorkflowInstancesColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "workflowevent_display_id_owner_id", Unique: true, Columns: []*schema.Column{WorkflowEventsColumns[7], WorkflowEventsColumns[11]}, }, { Name: "workflowevent_owner_id", Unique: false, Columns: []*schema.Column{WorkflowEventsColumns[11]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, }, } // WorkflowEventHistoryColumns holds the columns for the "workflow_event_history" table. WorkflowEventHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "workflow_instance_id", Type: field.TypeString}, {Name: "event_type", Type: field.TypeEnum, Enums: []string{"ACTION", "TRIGGER", "DECISION"}}, {Name: "payload", Type: field.TypeJSON, Nullable: true}, } // WorkflowEventHistoryTable holds the schema information for the "workflow_event_history" table. WorkflowEventHistoryTable = &schema.Table{ Name: "workflow_event_history", Columns: WorkflowEventHistoryColumns, PrimaryKey: []*schema.Column{WorkflowEventHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "workfloweventhistory_history_time", Unique: false, Columns: []*schema.Column{WorkflowEventHistoryColumns[1]}, }, }, } // WorkflowInstancesColumns holds the columns for the "workflow_instances" table. WorkflowInstancesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "state", Type: field.TypeEnum, Enums: []string{"RUNNING", "COMPLETED", "FAILED", "PAUSED"}, Default: "RUNNING"}, {Name: "context", Type: field.TypeJSON, Nullable: true}, {Name: "last_evaluated_at", Type: field.TypeTime, Nullable: true}, {Name: "definition_snapshot", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "workflow_definition_id", Type: field.TypeString}, } // WorkflowInstancesTable holds the schema information for the "workflow_instances" table. WorkflowInstancesTable = &schema.Table{ Name: "workflow_instances", Columns: WorkflowInstancesColumns, PrimaryKey: []*schema.Column{WorkflowInstancesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "workflow_instances_organizations_workflow_instances", Columns: []*schema.Column{WorkflowInstancesColumns[13]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_instances_workflow_definitions_workflow_definition", Columns: []*schema.Column{WorkflowInstancesColumns[14]}, RefColumns: []*schema.Column{WorkflowDefinitionsColumns[0]}, OnDelete: schema.NoAction, }, }, Indexes: []*schema.Index{ { Name: "workflowinstance_display_id_owner_id", Unique: true, Columns: []*schema.Column{WorkflowInstancesColumns[7], WorkflowInstancesColumns[13]}, }, { Name: "workflowinstance_owner_id", Unique: false, Columns: []*schema.Column{WorkflowInstancesColumns[13]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at is NULL", }, }, { Name: "workflowinstance_workflow_definition_id", Unique: false, Columns: []*schema.Column{WorkflowInstancesColumns[14]}, Annotation: &entsql.IndexAnnotation{ Where: "deleted_at IS NULL", }, }, }, } // WorkflowInstanceHistoryColumns holds the columns for the "workflow_instance_history" table. WorkflowInstanceHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "deleted_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "tags", Type: field.TypeJSON, Nullable: true}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "workflow_definition_id", Type: field.TypeString}, {Name: "state", Type: field.TypeEnum, Enums: []string{"RUNNING", "COMPLETED", "FAILED", "PAUSED"}, Default: "RUNNING"}, {Name: "context", Type: field.TypeJSON, Nullable: true}, {Name: "last_evaluated_at", Type: field.TypeTime, Nullable: true}, {Name: "definition_snapshot", Type: field.TypeJSON, Nullable: true}, } // WorkflowInstanceHistoryTable holds the schema information for the "workflow_instance_history" table. WorkflowInstanceHistoryTable = &schema.Table{ Name: "workflow_instance_history", Columns: WorkflowInstanceHistoryColumns, PrimaryKey: []*schema.Column{WorkflowInstanceHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "workflowinstancehistory_history_time", Unique: false, Columns: []*schema.Column{WorkflowInstanceHistoryColumns[1]}, }, }, } // WorkflowObjectRefsColumns holds the columns for the "workflow_object_refs" table. WorkflowObjectRefsColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "workflow_instance_workflow_object_refs", Type: field.TypeString, Nullable: true}, {Name: "workflow_instance_id", Type: field.TypeString}, {Name: "control_id", Type: field.TypeString, Nullable: true}, {Name: "task_id", Type: field.TypeString, Nullable: true}, {Name: "internal_policy_id", Type: field.TypeString, Nullable: true}, {Name: "finding_id", Type: field.TypeString, Nullable: true}, {Name: "directory_account_id", Type: field.TypeString, Nullable: true}, {Name: "directory_group_id", Type: field.TypeString, Nullable: true}, {Name: "directory_membership_id", Type: field.TypeString, Nullable: true}, } // WorkflowObjectRefsTable holds the schema information for the "workflow_object_refs" table. WorkflowObjectRefsTable = &schema.Table{ Name: "workflow_object_refs", Columns: WorkflowObjectRefsColumns, PrimaryKey: []*schema.Column{WorkflowObjectRefsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "workflow_object_refs_organizations_workflow_object_refs", Columns: []*schema.Column{WorkflowObjectRefsColumns[6]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_object_refs_workflow_instances_workflow_object_refs", Columns: []*schema.Column{WorkflowObjectRefsColumns[7]}, RefColumns: []*schema.Column{WorkflowInstancesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_object_refs_workflow_instances_workflow_instance", Columns: []*schema.Column{WorkflowObjectRefsColumns[8]}, RefColumns: []*schema.Column{WorkflowInstancesColumns[0]}, OnDelete: schema.NoAction, }, { Symbol: "workflow_object_refs_controls_control", Columns: []*schema.Column{WorkflowObjectRefsColumns[9]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_object_refs_tasks_task", Columns: []*schema.Column{WorkflowObjectRefsColumns[10]}, RefColumns: []*schema.Column{TasksColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_object_refs_internal_policies_internal_policy", Columns: []*schema.Column{WorkflowObjectRefsColumns[11]}, RefColumns: []*schema.Column{InternalPoliciesColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_object_refs_findings_finding", Columns: []*schema.Column{WorkflowObjectRefsColumns[12]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_object_refs_directory_accounts_directory_account", Columns: []*schema.Column{WorkflowObjectRefsColumns[13]}, RefColumns: []*schema.Column{DirectoryAccountsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_object_refs_directory_groups_directory_group", Columns: []*schema.Column{WorkflowObjectRefsColumns[14]}, RefColumns: []*schema.Column{DirectoryGroupsColumns[0]}, OnDelete: schema.SetNull, }, { Symbol: "workflow_object_refs_directory_memberships_directory_membership", Columns: []*schema.Column{WorkflowObjectRefsColumns[15]}, RefColumns: []*schema.Column{DirectoryMembershipsColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "workflowobjectref_display_id_owner_id", Unique: true, Columns: []*schema.Column{WorkflowObjectRefsColumns[5], WorkflowObjectRefsColumns[6]}, }, { Name: "workflowobjectref_workflow_instance_id_control_id", Unique: true, Columns: []*schema.Column{WorkflowObjectRefsColumns[8], WorkflowObjectRefsColumns[9]}, }, { Name: "workflowobjectref_workflow_instance_id_task_id", Unique: true, Columns: []*schema.Column{WorkflowObjectRefsColumns[8], WorkflowObjectRefsColumns[10]}, }, { Name: "workflowobjectref_workflow_instance_id_internal_policy_id", Unique: true, Columns: []*schema.Column{WorkflowObjectRefsColumns[8], WorkflowObjectRefsColumns[11]}, }, { Name: "workflowobjectref_workflow_instance_id_finding_id", Unique: true, Columns: []*schema.Column{WorkflowObjectRefsColumns[8], WorkflowObjectRefsColumns[12]}, }, { Name: "workflowobjectref_workflow_instance_id_directory_account_id", Unique: true, Columns: []*schema.Column{WorkflowObjectRefsColumns[8], WorkflowObjectRefsColumns[13]}, }, { Name: "workflowobjectref_workflow_instance_id_directory_group_id", Unique: true, Columns: []*schema.Column{WorkflowObjectRefsColumns[8], WorkflowObjectRefsColumns[14]}, }, { Name: "workflowobjectref_workflow_instance_id_directory_membership_id", Unique: true, Columns: []*schema.Column{WorkflowObjectRefsColumns[8], WorkflowObjectRefsColumns[15]}, }, }, } // WorkflowObjectRefHistoryColumns holds the columns for the "workflow_object_ref_history" table. WorkflowObjectRefHistoryColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, {Name: "history_time", Type: field.TypeTime}, {Name: "ref", Type: field.TypeString, Nullable: true}, {Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "updated_at", Type: field.TypeTime, Nullable: true}, {Name: "created_by", Type: field.TypeString, Nullable: true}, {Name: "updated_by", Type: field.TypeString, Nullable: true}, {Name: "display_id", Type: field.TypeString}, {Name: "owner_id", Type: field.TypeString, Nullable: true}, {Name: "workflow_instance_id", Type: field.TypeString}, {Name: "control_id", Type: field.TypeString, Nullable: true}, {Name: "task_id", Type: field.TypeString, Nullable: true}, {Name: "internal_policy_id", Type: field.TypeString, Nullable: true}, {Name: "finding_id", Type: field.TypeString, Nullable: true}, {Name: "directory_account_id", Type: field.TypeString, Nullable: true}, {Name: "directory_group_id", Type: field.TypeString, Nullable: true}, {Name: "directory_membership_id", Type: field.TypeString, Nullable: true}, } // WorkflowObjectRefHistoryTable holds the schema information for the "workflow_object_ref_history" table. WorkflowObjectRefHistoryTable = &schema.Table{ Name: "workflow_object_ref_history", Columns: WorkflowObjectRefHistoryColumns, PrimaryKey: []*schema.Column{WorkflowObjectRefHistoryColumns[0]}, Indexes: []*schema.Index{ { Name: "workflowobjectrefhistory_history_time", Unique: false, Columns: []*schema.Column{WorkflowObjectRefHistoryColumns[1]}, }, }, } // ActionPlanTasksColumns holds the columns for the "action_plan_tasks" table. ActionPlanTasksColumns = []*schema.Column{ {Name: "action_plan_id", Type: field.TypeString}, {Name: "task_id", Type: field.TypeString}, } // ActionPlanTasksTable holds the schema information for the "action_plan_tasks" table. ActionPlanTasksTable = &schema.Table{ Name: "action_plan_tasks", Columns: ActionPlanTasksColumns, PrimaryKey: []*schema.Column{ActionPlanTasksColumns[0], ActionPlanTasksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "action_plan_tasks_action_plan_id", Columns: []*schema.Column{ActionPlanTasksColumns[0]}, RefColumns: []*schema.Column{ActionPlansColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "action_plan_tasks_task_id", Columns: []*schema.Column{ActionPlanTasksColumns[1]}, RefColumns: []*schema.Column{TasksColumns[0]}, OnDelete: schema.Cascade, }, }, } // ContactFilesColumns holds the columns for the "contact_files" table. ContactFilesColumns = []*schema.Column{ {Name: "contact_id", Type: field.TypeString}, {Name: "file_id", Type: field.TypeString}, } // ContactFilesTable holds the schema information for the "contact_files" table. ContactFilesTable = &schema.Table{ Name: "contact_files", Columns: ContactFilesColumns, PrimaryKey: []*schema.Column{ContactFilesColumns[0], ContactFilesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "contact_files_contact_id", Columns: []*schema.Column{ContactFilesColumns[0]}, RefColumns: []*schema.Column{ContactsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "contact_files_file_id", Columns: []*schema.Column{ContactFilesColumns[1]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlControlObjectivesColumns holds the columns for the "control_control_objectives" table. ControlControlObjectivesColumns = []*schema.Column{ {Name: "control_id", Type: field.TypeString}, {Name: "control_objective_id", Type: field.TypeString}, } // ControlControlObjectivesTable holds the schema information for the "control_control_objectives" table. ControlControlObjectivesTable = &schema.Table{ Name: "control_control_objectives", Columns: ControlControlObjectivesColumns, PrimaryKey: []*schema.Column{ControlControlObjectivesColumns[0], ControlControlObjectivesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_control_objectives_control_id", Columns: []*schema.Column{ControlControlObjectivesColumns[0]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_control_objectives_control_objective_id", Columns: []*schema.Column{ControlControlObjectivesColumns[1]}, RefColumns: []*schema.Column{ControlObjectivesColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlTasksColumns holds the columns for the "control_tasks" table. ControlTasksColumns = []*schema.Column{ {Name: "control_id", Type: field.TypeString}, {Name: "task_id", Type: field.TypeString}, } // ControlTasksTable holds the schema information for the "control_tasks" table. ControlTasksTable = &schema.Table{ Name: "control_tasks", Columns: ControlTasksColumns, PrimaryKey: []*schema.Column{ControlTasksColumns[0], ControlTasksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_tasks_control_id", Columns: []*schema.Column{ControlTasksColumns[0]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_tasks_task_id", Columns: []*schema.Column{ControlTasksColumns[1]}, RefColumns: []*schema.Column{TasksColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlNarrativesColumns holds the columns for the "control_narratives" table. ControlNarrativesColumns = []*schema.Column{ {Name: "control_id", Type: field.TypeString}, {Name: "narrative_id", Type: field.TypeString}, } // ControlNarrativesTable holds the schema information for the "control_narratives" table. ControlNarrativesTable = &schema.Table{ Name: "control_narratives", Columns: ControlNarrativesColumns, PrimaryKey: []*schema.Column{ControlNarrativesColumns[0], ControlNarrativesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_narratives_control_id", Columns: []*schema.Column{ControlNarrativesColumns[0]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_narratives_narrative_id", Columns: []*schema.Column{ControlNarrativesColumns[1]}, RefColumns: []*schema.Column{NarrativesColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlRisksColumns holds the columns for the "control_risks" table. ControlRisksColumns = []*schema.Column{ {Name: "control_id", Type: field.TypeString}, {Name: "risk_id", Type: field.TypeString}, } // ControlRisksTable holds the schema information for the "control_risks" table. ControlRisksTable = &schema.Table{ Name: "control_risks", Columns: ControlRisksColumns, PrimaryKey: []*schema.Column{ControlRisksColumns[0], ControlRisksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_risks_control_id", Columns: []*schema.Column{ControlRisksColumns[0]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_risks_risk_id", Columns: []*schema.Column{ControlRisksColumns[1]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlActionPlansColumns holds the columns for the "control_action_plans" table. ControlActionPlansColumns = []*schema.Column{ {Name: "control_id", Type: field.TypeString}, {Name: "action_plan_id", Type: field.TypeString}, } // ControlActionPlansTable holds the schema information for the "control_action_plans" table. ControlActionPlansTable = &schema.Table{ Name: "control_action_plans", Columns: ControlActionPlansColumns, PrimaryKey: []*schema.Column{ControlActionPlansColumns[0], ControlActionPlansColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_action_plans_control_id", Columns: []*schema.Column{ControlActionPlansColumns[0]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_action_plans_action_plan_id", Columns: []*schema.Column{ControlActionPlansColumns[1]}, RefColumns: []*schema.Column{ActionPlansColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlProceduresColumns holds the columns for the "control_procedures" table. ControlProceduresColumns = []*schema.Column{ {Name: "control_id", Type: field.TypeString}, {Name: "procedure_id", Type: field.TypeString}, } // ControlProceduresTable holds the schema information for the "control_procedures" table. ControlProceduresTable = &schema.Table{ Name: "control_procedures", Columns: ControlProceduresColumns, PrimaryKey: []*schema.Column{ControlProceduresColumns[0], ControlProceduresColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_procedures_control_id", Columns: []*schema.Column{ControlProceduresColumns[0]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_procedures_procedure_id", Columns: []*schema.Column{ControlProceduresColumns[1]}, RefColumns: []*schema.Column{ProceduresColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlBlockedGroupsColumns holds the columns for the "control_blocked_groups" table. ControlBlockedGroupsColumns = []*schema.Column{ {Name: "control_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ControlBlockedGroupsTable holds the schema information for the "control_blocked_groups" table. ControlBlockedGroupsTable = &schema.Table{ Name: "control_blocked_groups", Columns: ControlBlockedGroupsColumns, PrimaryKey: []*schema.Column{ControlBlockedGroupsColumns[0], ControlBlockedGroupsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_blocked_groups_control_id", Columns: []*schema.Column{ControlBlockedGroupsColumns[0]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_blocked_groups_group_id", Columns: []*schema.Column{ControlBlockedGroupsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlEditorsColumns holds the columns for the "control_editors" table. ControlEditorsColumns = []*schema.Column{ {Name: "control_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ControlEditorsTable holds the schema information for the "control_editors" table. ControlEditorsTable = &schema.Table{ Name: "control_editors", Columns: ControlEditorsColumns, PrimaryKey: []*schema.Column{ControlEditorsColumns[0], ControlEditorsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_editors_control_id", Columns: []*schema.Column{ControlEditorsColumns[0]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_editors_group_id", Columns: []*schema.Column{ControlEditorsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlAssetsColumns holds the columns for the "control_assets" table. ControlAssetsColumns = []*schema.Column{ {Name: "control_id", Type: field.TypeString}, {Name: "asset_id", Type: field.TypeString}, } // ControlAssetsTable holds the schema information for the "control_assets" table. ControlAssetsTable = &schema.Table{ Name: "control_assets", Columns: ControlAssetsColumns, PrimaryKey: []*schema.Column{ControlAssetsColumns[0], ControlAssetsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_assets_control_id", Columns: []*schema.Column{ControlAssetsColumns[0]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_assets_asset_id", Columns: []*schema.Column{ControlAssetsColumns[1]}, RefColumns: []*schema.Column{AssetsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlControlImplementationsColumns holds the columns for the "control_control_implementations" table. ControlControlImplementationsColumns = []*schema.Column{ {Name: "control_id", Type: field.TypeString}, {Name: "control_implementation_id", Type: field.TypeString}, } // ControlControlImplementationsTable holds the schema information for the "control_control_implementations" table. ControlControlImplementationsTable = &schema.Table{ Name: "control_control_implementations", Columns: ControlControlImplementationsColumns, PrimaryKey: []*schema.Column{ControlControlImplementationsColumns[0], ControlControlImplementationsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_control_implementations_control_id", Columns: []*schema.Column{ControlControlImplementationsColumns[0]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_control_implementations_control_implementation_id", Columns: []*schema.Column{ControlControlImplementationsColumns[1]}, RefColumns: []*schema.Column{ControlImplementationsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlImplementationBlockedGroupsColumns holds the columns for the "control_implementation_blocked_groups" table. ControlImplementationBlockedGroupsColumns = []*schema.Column{ {Name: "control_implementation_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ControlImplementationBlockedGroupsTable holds the schema information for the "control_implementation_blocked_groups" table. ControlImplementationBlockedGroupsTable = &schema.Table{ Name: "control_implementation_blocked_groups", Columns: ControlImplementationBlockedGroupsColumns, PrimaryKey: []*schema.Column{ControlImplementationBlockedGroupsColumns[0], ControlImplementationBlockedGroupsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_implementation_blocked_groups_control_implementation_id", Columns: []*schema.Column{ControlImplementationBlockedGroupsColumns[0]}, RefColumns: []*schema.Column{ControlImplementationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_implementation_blocked_groups_group_id", Columns: []*schema.Column{ControlImplementationBlockedGroupsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlImplementationEditorsColumns holds the columns for the "control_implementation_editors" table. ControlImplementationEditorsColumns = []*schema.Column{ {Name: "control_implementation_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ControlImplementationEditorsTable holds the schema information for the "control_implementation_editors" table. ControlImplementationEditorsTable = &schema.Table{ Name: "control_implementation_editors", Columns: ControlImplementationEditorsColumns, PrimaryKey: []*schema.Column{ControlImplementationEditorsColumns[0], ControlImplementationEditorsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_implementation_editors_control_implementation_id", Columns: []*schema.Column{ControlImplementationEditorsColumns[0]}, RefColumns: []*schema.Column{ControlImplementationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_implementation_editors_group_id", Columns: []*schema.Column{ControlImplementationEditorsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlImplementationViewersColumns holds the columns for the "control_implementation_viewers" table. ControlImplementationViewersColumns = []*schema.Column{ {Name: "control_implementation_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ControlImplementationViewersTable holds the schema information for the "control_implementation_viewers" table. ControlImplementationViewersTable = &schema.Table{ Name: "control_implementation_viewers", Columns: ControlImplementationViewersColumns, PrimaryKey: []*schema.Column{ControlImplementationViewersColumns[0], ControlImplementationViewersColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_implementation_viewers_control_implementation_id", Columns: []*schema.Column{ControlImplementationViewersColumns[0]}, RefColumns: []*schema.Column{ControlImplementationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_implementation_viewers_group_id", Columns: []*schema.Column{ControlImplementationViewersColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlImplementationTasksColumns holds the columns for the "control_implementation_tasks" table. ControlImplementationTasksColumns = []*schema.Column{ {Name: "control_implementation_id", Type: field.TypeString}, {Name: "task_id", Type: field.TypeString}, } // ControlImplementationTasksTable holds the schema information for the "control_implementation_tasks" table. ControlImplementationTasksTable = &schema.Table{ Name: "control_implementation_tasks", Columns: ControlImplementationTasksColumns, PrimaryKey: []*schema.Column{ControlImplementationTasksColumns[0], ControlImplementationTasksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_implementation_tasks_control_implementation_id", Columns: []*schema.Column{ControlImplementationTasksColumns[0]}, RefColumns: []*schema.Column{ControlImplementationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_implementation_tasks_task_id", Columns: []*schema.Column{ControlImplementationTasksColumns[1]}, RefColumns: []*schema.Column{TasksColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlObjectiveBlockedGroupsColumns holds the columns for the "control_objective_blocked_groups" table. ControlObjectiveBlockedGroupsColumns = []*schema.Column{ {Name: "control_objective_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ControlObjectiveBlockedGroupsTable holds the schema information for the "control_objective_blocked_groups" table. ControlObjectiveBlockedGroupsTable = &schema.Table{ Name: "control_objective_blocked_groups", Columns: ControlObjectiveBlockedGroupsColumns, PrimaryKey: []*schema.Column{ControlObjectiveBlockedGroupsColumns[0], ControlObjectiveBlockedGroupsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_objective_blocked_groups_control_objective_id", Columns: []*schema.Column{ControlObjectiveBlockedGroupsColumns[0]}, RefColumns: []*schema.Column{ControlObjectivesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_objective_blocked_groups_group_id", Columns: []*schema.Column{ControlObjectiveBlockedGroupsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlObjectiveEditorsColumns holds the columns for the "control_objective_editors" table. ControlObjectiveEditorsColumns = []*schema.Column{ {Name: "control_objective_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ControlObjectiveEditorsTable holds the schema information for the "control_objective_editors" table. ControlObjectiveEditorsTable = &schema.Table{ Name: "control_objective_editors", Columns: ControlObjectiveEditorsColumns, PrimaryKey: []*schema.Column{ControlObjectiveEditorsColumns[0], ControlObjectiveEditorsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_objective_editors_control_objective_id", Columns: []*schema.Column{ControlObjectiveEditorsColumns[0]}, RefColumns: []*schema.Column{ControlObjectivesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_objective_editors_group_id", Columns: []*schema.Column{ControlObjectiveEditorsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlObjectiveViewersColumns holds the columns for the "control_objective_viewers" table. ControlObjectiveViewersColumns = []*schema.Column{ {Name: "control_objective_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ControlObjectiveViewersTable holds the schema information for the "control_objective_viewers" table. ControlObjectiveViewersTable = &schema.Table{ Name: "control_objective_viewers", Columns: ControlObjectiveViewersColumns, PrimaryKey: []*schema.Column{ControlObjectiveViewersColumns[0], ControlObjectiveViewersColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_objective_viewers_control_objective_id", Columns: []*schema.Column{ControlObjectiveViewersColumns[0]}, RefColumns: []*schema.Column{ControlObjectivesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_objective_viewers_group_id", Columns: []*schema.Column{ControlObjectiveViewersColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ControlObjectiveTasksColumns holds the columns for the "control_objective_tasks" table. ControlObjectiveTasksColumns = []*schema.Column{ {Name: "control_objective_id", Type: field.TypeString}, {Name: "task_id", Type: field.TypeString}, } // ControlObjectiveTasksTable holds the schema information for the "control_objective_tasks" table. ControlObjectiveTasksTable = &schema.Table{ Name: "control_objective_tasks", Columns: ControlObjectiveTasksColumns, PrimaryKey: []*schema.Column{ControlObjectiveTasksColumns[0], ControlObjectiveTasksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "control_objective_tasks_control_objective_id", Columns: []*schema.Column{ControlObjectiveTasksColumns[0]}, RefColumns: []*schema.Column{ControlObjectivesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "control_objective_tasks_task_id", Columns: []*schema.Column{ControlObjectiveTasksColumns[1]}, RefColumns: []*schema.Column{TasksColumns[0]}, OnDelete: schema.Cascade, }, }, } // DocumentDataFilesColumns holds the columns for the "document_data_files" table. DocumentDataFilesColumns = []*schema.Column{ {Name: "document_data_id", Type: field.TypeString}, {Name: "file_id", Type: field.TypeString}, } // DocumentDataFilesTable holds the schema information for the "document_data_files" table. DocumentDataFilesTable = &schema.Table{ Name: "document_data_files", Columns: DocumentDataFilesColumns, PrimaryKey: []*schema.Column{DocumentDataFilesColumns[0], DocumentDataFilesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "document_data_files_document_data_id", Columns: []*schema.Column{DocumentDataFilesColumns[0]}, RefColumns: []*schema.Column{DocumentDataColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "document_data_files_file_id", Columns: []*schema.Column{DocumentDataFilesColumns[1]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.Cascade, }, }, } // EntityBlockedGroupsColumns holds the columns for the "entity_blocked_groups" table. EntityBlockedGroupsColumns = []*schema.Column{ {Name: "entity_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // EntityBlockedGroupsTable holds the schema information for the "entity_blocked_groups" table. EntityBlockedGroupsTable = &schema.Table{ Name: "entity_blocked_groups", Columns: EntityBlockedGroupsColumns, PrimaryKey: []*schema.Column{EntityBlockedGroupsColumns[0], EntityBlockedGroupsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "entity_blocked_groups_entity_id", Columns: []*schema.Column{EntityBlockedGroupsColumns[0]}, RefColumns: []*schema.Column{EntitiesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "entity_blocked_groups_group_id", Columns: []*schema.Column{EntityBlockedGroupsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // EntityEditorsColumns holds the columns for the "entity_editors" table. EntityEditorsColumns = []*schema.Column{ {Name: "entity_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // EntityEditorsTable holds the schema information for the "entity_editors" table. EntityEditorsTable = &schema.Table{ Name: "entity_editors", Columns: EntityEditorsColumns, PrimaryKey: []*schema.Column{EntityEditorsColumns[0], EntityEditorsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "entity_editors_entity_id", Columns: []*schema.Column{EntityEditorsColumns[0]}, RefColumns: []*schema.Column{EntitiesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "entity_editors_group_id", Columns: []*schema.Column{EntityEditorsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // EntityViewersColumns holds the columns for the "entity_viewers" table. EntityViewersColumns = []*schema.Column{ {Name: "entity_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // EntityViewersTable holds the schema information for the "entity_viewers" table. EntityViewersTable = &schema.Table{ Name: "entity_viewers", Columns: EntityViewersColumns, PrimaryKey: []*schema.Column{EntityViewersColumns[0], EntityViewersColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "entity_viewers_entity_id", Columns: []*schema.Column{EntityViewersColumns[0]}, RefColumns: []*schema.Column{EntitiesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "entity_viewers_group_id", Columns: []*schema.Column{EntityViewersColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // EntityContactsColumns holds the columns for the "entity_contacts" table. EntityContactsColumns = []*schema.Column{ {Name: "entity_id", Type: field.TypeString}, {Name: "contact_id", Type: field.TypeString}, } // EntityContactsTable holds the schema information for the "entity_contacts" table. EntityContactsTable = &schema.Table{ Name: "entity_contacts", Columns: EntityContactsColumns, PrimaryKey: []*schema.Column{EntityContactsColumns[0], EntityContactsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "entity_contacts_entity_id", Columns: []*schema.Column{EntityContactsColumns[0]}, RefColumns: []*schema.Column{EntitiesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "entity_contacts_contact_id", Columns: []*schema.Column{EntityContactsColumns[1]}, RefColumns: []*schema.Column{ContactsColumns[0]}, OnDelete: schema.Cascade, }, }, } // EntityDocumentsColumns holds the columns for the "entity_documents" table. EntityDocumentsColumns = []*schema.Column{ {Name: "entity_id", Type: field.TypeString}, {Name: "document_data_id", Type: field.TypeString}, } // EntityDocumentsTable holds the schema information for the "entity_documents" table. EntityDocumentsTable = &schema.Table{ Name: "entity_documents", Columns: EntityDocumentsColumns, PrimaryKey: []*schema.Column{EntityDocumentsColumns[0], EntityDocumentsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "entity_documents_entity_id", Columns: []*schema.Column{EntityDocumentsColumns[0]}, RefColumns: []*schema.Column{EntitiesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "entity_documents_document_data_id", Columns: []*schema.Column{EntityDocumentsColumns[1]}, RefColumns: []*schema.Column{DocumentDataColumns[0]}, OnDelete: schema.Cascade, }, }, } // EntityFilesColumns holds the columns for the "entity_files" table. EntityFilesColumns = []*schema.Column{ {Name: "entity_id", Type: field.TypeString}, {Name: "file_id", Type: field.TypeString}, } // EntityFilesTable holds the schema information for the "entity_files" table. EntityFilesTable = &schema.Table{ Name: "entity_files", Columns: EntityFilesColumns, PrimaryKey: []*schema.Column{EntityFilesColumns[0], EntityFilesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "entity_files_entity_id", Columns: []*schema.Column{EntityFilesColumns[0]}, RefColumns: []*schema.Column{EntitiesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "entity_files_file_id", Columns: []*schema.Column{EntityFilesColumns[1]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.Cascade, }, }, } // EntityAssetsColumns holds the columns for the "entity_assets" table. EntityAssetsColumns = []*schema.Column{ {Name: "entity_id", Type: field.TypeString}, {Name: "asset_id", Type: field.TypeString}, } // EntityAssetsTable holds the schema information for the "entity_assets" table. EntityAssetsTable = &schema.Table{ Name: "entity_assets", Columns: EntityAssetsColumns, PrimaryKey: []*schema.Column{EntityAssetsColumns[0], EntityAssetsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "entity_assets_entity_id", Columns: []*schema.Column{EntityAssetsColumns[0]}, RefColumns: []*schema.Column{EntitiesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "entity_assets_asset_id", Columns: []*schema.Column{EntityAssetsColumns[1]}, RefColumns: []*schema.Column{AssetsColumns[0]}, OnDelete: schema.Cascade, }, }, } // EvidenceControlsColumns holds the columns for the "evidence_controls" table. EvidenceControlsColumns = []*schema.Column{ {Name: "evidence_id", Type: field.TypeString}, {Name: "control_id", Type: field.TypeString}, } // EvidenceControlsTable holds the schema information for the "evidence_controls" table. EvidenceControlsTable = &schema.Table{ Name: "evidence_controls", Columns: EvidenceControlsColumns, PrimaryKey: []*schema.Column{EvidenceControlsColumns[0], EvidenceControlsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "evidence_controls_evidence_id", Columns: []*schema.Column{EvidenceControlsColumns[0]}, RefColumns: []*schema.Column{EvidencesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "evidence_controls_control_id", Columns: []*schema.Column{EvidenceControlsColumns[1]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, }, } // EvidenceSubcontrolsColumns holds the columns for the "evidence_subcontrols" table. EvidenceSubcontrolsColumns = []*schema.Column{ {Name: "evidence_id", Type: field.TypeString}, {Name: "subcontrol_id", Type: field.TypeString}, } // EvidenceSubcontrolsTable holds the schema information for the "evidence_subcontrols" table. EvidenceSubcontrolsTable = &schema.Table{ Name: "evidence_subcontrols", Columns: EvidenceSubcontrolsColumns, PrimaryKey: []*schema.Column{EvidenceSubcontrolsColumns[0], EvidenceSubcontrolsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "evidence_subcontrols_evidence_id", Columns: []*schema.Column{EvidenceSubcontrolsColumns[0]}, RefColumns: []*schema.Column{EvidencesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "evidence_subcontrols_subcontrol_id", Columns: []*schema.Column{EvidenceSubcontrolsColumns[1]}, RefColumns: []*schema.Column{SubcontrolsColumns[0]}, OnDelete: schema.Cascade, }, }, } // EvidenceControlObjectivesColumns holds the columns for the "evidence_control_objectives" table. EvidenceControlObjectivesColumns = []*schema.Column{ {Name: "evidence_id", Type: field.TypeString}, {Name: "control_objective_id", Type: field.TypeString}, } // EvidenceControlObjectivesTable holds the schema information for the "evidence_control_objectives" table. EvidenceControlObjectivesTable = &schema.Table{ Name: "evidence_control_objectives", Columns: EvidenceControlObjectivesColumns, PrimaryKey: []*schema.Column{EvidenceControlObjectivesColumns[0], EvidenceControlObjectivesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "evidence_control_objectives_evidence_id", Columns: []*schema.Column{EvidenceControlObjectivesColumns[0]}, RefColumns: []*schema.Column{EvidencesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "evidence_control_objectives_control_objective_id", Columns: []*schema.Column{EvidenceControlObjectivesColumns[1]}, RefColumns: []*schema.Column{ControlObjectivesColumns[0]}, OnDelete: schema.Cascade, }, }, } // EvidenceFilesColumns holds the columns for the "evidence_files" table. EvidenceFilesColumns = []*schema.Column{ {Name: "evidence_id", Type: field.TypeString}, {Name: "file_id", Type: field.TypeString}, } // EvidenceFilesTable holds the schema information for the "evidence_files" table. EvidenceFilesTable = &schema.Table{ Name: "evidence_files", Columns: EvidenceFilesColumns, PrimaryKey: []*schema.Column{EvidenceFilesColumns[0], EvidenceFilesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "evidence_files_evidence_id", Columns: []*schema.Column{EvidenceFilesColumns[0]}, RefColumns: []*schema.Column{EvidencesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "evidence_files_file_id", Columns: []*schema.Column{EvidenceFilesColumns[1]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.Cascade, }, }, } // FileEventsColumns holds the columns for the "file_events" table. FileEventsColumns = []*schema.Column{ {Name: "file_id", Type: field.TypeString}, {Name: "event_id", Type: field.TypeString}, } // FileEventsTable holds the schema information for the "file_events" table. FileEventsTable = &schema.Table{ Name: "file_events", Columns: FileEventsColumns, PrimaryKey: []*schema.Column{FileEventsColumns[0], FileEventsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "file_events_file_id", Columns: []*schema.Column{FileEventsColumns[0]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "file_events_event_id", Columns: []*schema.Column{FileEventsColumns[1]}, RefColumns: []*schema.Column{EventsColumns[0]}, OnDelete: schema.Cascade, }, }, } // FileSecretsColumns holds the columns for the "file_secrets" table. FileSecretsColumns = []*schema.Column{ {Name: "file_id", Type: field.TypeString}, {Name: "hush_id", Type: field.TypeString}, } // FileSecretsTable holds the schema information for the "file_secrets" table. FileSecretsTable = &schema.Table{ Name: "file_secrets", Columns: FileSecretsColumns, PrimaryKey: []*schema.Column{FileSecretsColumns[0], FileSecretsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "file_secrets_file_id", Columns: []*schema.Column{FileSecretsColumns[0]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "file_secrets_hush_id", Columns: []*schema.Column{FileSecretsColumns[1]}, RefColumns: []*schema.Column{HushesColumns[0]}, OnDelete: schema.Cascade, }, }, } // FindingActionPlansColumns holds the columns for the "finding_action_plans" table. FindingActionPlansColumns = []*schema.Column{ {Name: "finding_id", Type: field.TypeString}, {Name: "action_plan_id", Type: field.TypeString}, } // FindingActionPlansTable holds the schema information for the "finding_action_plans" table. FindingActionPlansTable = &schema.Table{ Name: "finding_action_plans", Columns: FindingActionPlansColumns, PrimaryKey: []*schema.Column{FindingActionPlansColumns[0], FindingActionPlansColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "finding_action_plans_finding_id", Columns: []*schema.Column{FindingActionPlansColumns[0]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "finding_action_plans_action_plan_id", Columns: []*schema.Column{FindingActionPlansColumns[1]}, RefColumns: []*schema.Column{ActionPlansColumns[0]}, OnDelete: schema.Cascade, }, }, } // GroupEventsColumns holds the columns for the "group_events" table. GroupEventsColumns = []*schema.Column{ {Name: "group_id", Type: field.TypeString}, {Name: "event_id", Type: field.TypeString}, } // GroupEventsTable holds the schema information for the "group_events" table. GroupEventsTable = &schema.Table{ Name: "group_events", Columns: GroupEventsColumns, PrimaryKey: []*schema.Column{GroupEventsColumns[0], GroupEventsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "group_events_group_id", Columns: []*schema.Column{GroupEventsColumns[0]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "group_events_event_id", Columns: []*schema.Column{GroupEventsColumns[1]}, RefColumns: []*schema.Column{EventsColumns[0]}, OnDelete: schema.Cascade, }, }, } // GroupFilesColumns holds the columns for the "group_files" table. GroupFilesColumns = []*schema.Column{ {Name: "group_id", Type: field.TypeString}, {Name: "file_id", Type: field.TypeString}, } // GroupFilesTable holds the schema information for the "group_files" table. GroupFilesTable = &schema.Table{ Name: "group_files", Columns: GroupFilesColumns, PrimaryKey: []*schema.Column{GroupFilesColumns[0], GroupFilesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "group_files_group_id", Columns: []*schema.Column{GroupFilesColumns[0]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "group_files_file_id", Columns: []*schema.Column{GroupFilesColumns[1]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.Cascade, }, }, } // GroupTasksColumns holds the columns for the "group_tasks" table. GroupTasksColumns = []*schema.Column{ {Name: "group_id", Type: field.TypeString}, {Name: "task_id", Type: field.TypeString}, } // GroupTasksTable holds the schema information for the "group_tasks" table. GroupTasksTable = &schema.Table{ Name: "group_tasks", Columns: GroupTasksColumns, PrimaryKey: []*schema.Column{GroupTasksColumns[0], GroupTasksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "group_tasks_group_id", Columns: []*schema.Column{GroupTasksColumns[0]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "group_tasks_task_id", Columns: []*schema.Column{GroupTasksColumns[1]}, RefColumns: []*schema.Column{TasksColumns[0]}, OnDelete: schema.Cascade, }, }, } // GroupMembershipEventsColumns holds the columns for the "group_membership_events" table. GroupMembershipEventsColumns = []*schema.Column{ {Name: "group_membership_id", Type: field.TypeString}, {Name: "event_id", Type: field.TypeString}, } // GroupMembershipEventsTable holds the schema information for the "group_membership_events" table. GroupMembershipEventsTable = &schema.Table{ Name: "group_membership_events", Columns: GroupMembershipEventsColumns, PrimaryKey: []*schema.Column{GroupMembershipEventsColumns[0], GroupMembershipEventsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "group_membership_events_group_membership_id", Columns: []*schema.Column{GroupMembershipEventsColumns[0]}, RefColumns: []*schema.Column{GroupMembershipsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "group_membership_events_event_id", Columns: []*schema.Column{GroupMembershipEventsColumns[1]}, RefColumns: []*schema.Column{EventsColumns[0]}, OnDelete: schema.Cascade, }, }, } // HushEventsColumns holds the columns for the "hush_events" table. HushEventsColumns = []*schema.Column{ {Name: "hush_id", Type: field.TypeString}, {Name: "event_id", Type: field.TypeString}, } // HushEventsTable holds the schema information for the "hush_events" table. HushEventsTable = &schema.Table{ Name: "hush_events", Columns: HushEventsColumns, PrimaryKey: []*schema.Column{HushEventsColumns[0], HushEventsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "hush_events_hush_id", Columns: []*schema.Column{HushEventsColumns[0]}, RefColumns: []*schema.Column{HushesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "hush_events_event_id", Columns: []*schema.Column{HushEventsColumns[1]}, RefColumns: []*schema.Column{EventsColumns[0]}, OnDelete: schema.Cascade, }, }, } // IntegrationSecretsColumns holds the columns for the "integration_secrets" table. IntegrationSecretsColumns = []*schema.Column{ {Name: "integration_id", Type: field.TypeString}, {Name: "hush_id", Type: field.TypeString}, } // IntegrationSecretsTable holds the schema information for the "integration_secrets" table. IntegrationSecretsTable = &schema.Table{ Name: "integration_secrets", Columns: IntegrationSecretsColumns, PrimaryKey: []*schema.Column{IntegrationSecretsColumns[0], IntegrationSecretsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "integration_secrets_integration_id", Columns: []*schema.Column{IntegrationSecretsColumns[0]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "integration_secrets_hush_id", Columns: []*schema.Column{IntegrationSecretsColumns[1]}, RefColumns: []*schema.Column{HushesColumns[0]}, OnDelete: schema.Cascade, }, }, } // IntegrationEventsColumns holds the columns for the "integration_events" table. IntegrationEventsColumns = []*schema.Column{ {Name: "integration_id", Type: field.TypeString}, {Name: "event_id", Type: field.TypeString}, } // IntegrationEventsTable holds the schema information for the "integration_events" table. IntegrationEventsTable = &schema.Table{ Name: "integration_events", Columns: IntegrationEventsColumns, PrimaryKey: []*schema.Column{IntegrationEventsColumns[0], IntegrationEventsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "integration_events_integration_id", Columns: []*schema.Column{IntegrationEventsColumns[0]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "integration_events_event_id", Columns: []*schema.Column{IntegrationEventsColumns[1]}, RefColumns: []*schema.Column{EventsColumns[0]}, OnDelete: schema.Cascade, }, }, } // IntegrationFindingsColumns holds the columns for the "integration_findings" table. IntegrationFindingsColumns = []*schema.Column{ {Name: "integration_id", Type: field.TypeString}, {Name: "finding_id", Type: field.TypeString}, } // IntegrationFindingsTable holds the schema information for the "integration_findings" table. IntegrationFindingsTable = &schema.Table{ Name: "integration_findings", Columns: IntegrationFindingsColumns, PrimaryKey: []*schema.Column{IntegrationFindingsColumns[0], IntegrationFindingsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "integration_findings_integration_id", Columns: []*schema.Column{IntegrationFindingsColumns[0]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "integration_findings_finding_id", Columns: []*schema.Column{IntegrationFindingsColumns[1]}, RefColumns: []*schema.Column{FindingsColumns[0]}, OnDelete: schema.Cascade, }, }, } // IntegrationVulnerabilitiesColumns holds the columns for the "integration_vulnerabilities" table. IntegrationVulnerabilitiesColumns = []*schema.Column{ {Name: "integration_id", Type: field.TypeString}, {Name: "vulnerability_id", Type: field.TypeString}, } // IntegrationVulnerabilitiesTable holds the schema information for the "integration_vulnerabilities" table. IntegrationVulnerabilitiesTable = &schema.Table{ Name: "integration_vulnerabilities", Columns: IntegrationVulnerabilitiesColumns, PrimaryKey: []*schema.Column{IntegrationVulnerabilitiesColumns[0], IntegrationVulnerabilitiesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "integration_vulnerabilities_integration_id", Columns: []*schema.Column{IntegrationVulnerabilitiesColumns[0]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "integration_vulnerabilities_vulnerability_id", Columns: []*schema.Column{IntegrationVulnerabilitiesColumns[1]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.Cascade, }, }, } // IntegrationReviewsColumns holds the columns for the "integration_reviews" table. IntegrationReviewsColumns = []*schema.Column{ {Name: "integration_id", Type: field.TypeString}, {Name: "review_id", Type: field.TypeString}, } // IntegrationReviewsTable holds the schema information for the "integration_reviews" table. IntegrationReviewsTable = &schema.Table{ Name: "integration_reviews", Columns: IntegrationReviewsColumns, PrimaryKey: []*schema.Column{IntegrationReviewsColumns[0], IntegrationReviewsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "integration_reviews_integration_id", Columns: []*schema.Column{IntegrationReviewsColumns[0]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "integration_reviews_review_id", Columns: []*schema.Column{IntegrationReviewsColumns[1]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.Cascade, }, }, } // IntegrationRemediationsColumns holds the columns for the "integration_remediations" table. IntegrationRemediationsColumns = []*schema.Column{ {Name: "integration_id", Type: field.TypeString}, {Name: "remediation_id", Type: field.TypeString}, } // IntegrationRemediationsTable holds the schema information for the "integration_remediations" table. IntegrationRemediationsTable = &schema.Table{ Name: "integration_remediations", Columns: IntegrationRemediationsColumns, PrimaryKey: []*schema.Column{IntegrationRemediationsColumns[0], IntegrationRemediationsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "integration_remediations_integration_id", Columns: []*schema.Column{IntegrationRemediationsColumns[0]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "integration_remediations_remediation_id", Columns: []*schema.Column{IntegrationRemediationsColumns[1]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.Cascade, }, }, } // IntegrationActionPlansColumns holds the columns for the "integration_action_plans" table. IntegrationActionPlansColumns = []*schema.Column{ {Name: "integration_id", Type: field.TypeString}, {Name: "action_plan_id", Type: field.TypeString}, } // IntegrationActionPlansTable holds the schema information for the "integration_action_plans" table. IntegrationActionPlansTable = &schema.Table{ Name: "integration_action_plans", Columns: IntegrationActionPlansColumns, PrimaryKey: []*schema.Column{IntegrationActionPlansColumns[0], IntegrationActionPlansColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "integration_action_plans_integration_id", Columns: []*schema.Column{IntegrationActionPlansColumns[0]}, RefColumns: []*schema.Column{IntegrationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "integration_action_plans_action_plan_id", Columns: []*schema.Column{IntegrationActionPlansColumns[1]}, RefColumns: []*schema.Column{ActionPlansColumns[0]}, OnDelete: schema.Cascade, }, }, } // InternalPolicyBlockedGroupsColumns holds the columns for the "internal_policy_blocked_groups" table. InternalPolicyBlockedGroupsColumns = []*schema.Column{ {Name: "internal_policy_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // InternalPolicyBlockedGroupsTable holds the schema information for the "internal_policy_blocked_groups" table. InternalPolicyBlockedGroupsTable = &schema.Table{ Name: "internal_policy_blocked_groups", Columns: InternalPolicyBlockedGroupsColumns, PrimaryKey: []*schema.Column{InternalPolicyBlockedGroupsColumns[0], InternalPolicyBlockedGroupsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "internal_policy_blocked_groups_internal_policy_id", Columns: []*schema.Column{InternalPolicyBlockedGroupsColumns[0]}, RefColumns: []*schema.Column{InternalPoliciesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "internal_policy_blocked_groups_group_id", Columns: []*schema.Column{InternalPolicyBlockedGroupsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // InternalPolicyEditorsColumns holds the columns for the "internal_policy_editors" table. InternalPolicyEditorsColumns = []*schema.Column{ {Name: "internal_policy_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // InternalPolicyEditorsTable holds the schema information for the "internal_policy_editors" table. InternalPolicyEditorsTable = &schema.Table{ Name: "internal_policy_editors", Columns: InternalPolicyEditorsColumns, PrimaryKey: []*schema.Column{InternalPolicyEditorsColumns[0], InternalPolicyEditorsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "internal_policy_editors_internal_policy_id", Columns: []*schema.Column{InternalPolicyEditorsColumns[0]}, RefColumns: []*schema.Column{InternalPoliciesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "internal_policy_editors_group_id", Columns: []*schema.Column{InternalPolicyEditorsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // InternalPolicyControlObjectivesColumns holds the columns for the "internal_policy_control_objectives" table. InternalPolicyControlObjectivesColumns = []*schema.Column{ {Name: "internal_policy_id", Type: field.TypeString}, {Name: "control_objective_id", Type: field.TypeString}, } // InternalPolicyControlObjectivesTable holds the schema information for the "internal_policy_control_objectives" table. InternalPolicyControlObjectivesTable = &schema.Table{ Name: "internal_policy_control_objectives", Columns: InternalPolicyControlObjectivesColumns, PrimaryKey: []*schema.Column{InternalPolicyControlObjectivesColumns[0], InternalPolicyControlObjectivesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "internal_policy_control_objectives_internal_policy_id", Columns: []*schema.Column{InternalPolicyControlObjectivesColumns[0]}, RefColumns: []*schema.Column{InternalPoliciesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "internal_policy_control_objectives_control_objective_id", Columns: []*schema.Column{InternalPolicyControlObjectivesColumns[1]}, RefColumns: []*schema.Column{ControlObjectivesColumns[0]}, OnDelete: schema.Cascade, }, }, } // InternalPolicyControlsColumns holds the columns for the "internal_policy_controls" table. InternalPolicyControlsColumns = []*schema.Column{ {Name: "internal_policy_id", Type: field.TypeString}, {Name: "control_id", Type: field.TypeString}, } // InternalPolicyControlsTable holds the schema information for the "internal_policy_controls" table. InternalPolicyControlsTable = &schema.Table{ Name: "internal_policy_controls", Columns: InternalPolicyControlsColumns, PrimaryKey: []*schema.Column{InternalPolicyControlsColumns[0], InternalPolicyControlsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "internal_policy_controls_internal_policy_id", Columns: []*schema.Column{InternalPolicyControlsColumns[0]}, RefColumns: []*schema.Column{InternalPoliciesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "internal_policy_controls_control_id", Columns: []*schema.Column{InternalPolicyControlsColumns[1]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, }, } // InternalPolicySubcontrolsColumns holds the columns for the "internal_policy_subcontrols" table. InternalPolicySubcontrolsColumns = []*schema.Column{ {Name: "internal_policy_id", Type: field.TypeString}, {Name: "subcontrol_id", Type: field.TypeString}, } // InternalPolicySubcontrolsTable holds the schema information for the "internal_policy_subcontrols" table. InternalPolicySubcontrolsTable = &schema.Table{ Name: "internal_policy_subcontrols", Columns: InternalPolicySubcontrolsColumns, PrimaryKey: []*schema.Column{InternalPolicySubcontrolsColumns[0], InternalPolicySubcontrolsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "internal_policy_subcontrols_internal_policy_id", Columns: []*schema.Column{InternalPolicySubcontrolsColumns[0]}, RefColumns: []*schema.Column{InternalPoliciesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "internal_policy_subcontrols_subcontrol_id", Columns: []*schema.Column{InternalPolicySubcontrolsColumns[1]}, RefColumns: []*schema.Column{SubcontrolsColumns[0]}, OnDelete: schema.Cascade, }, }, } // InternalPolicyProceduresColumns holds the columns for the "internal_policy_procedures" table. InternalPolicyProceduresColumns = []*schema.Column{ {Name: "internal_policy_id", Type: field.TypeString}, {Name: "procedure_id", Type: field.TypeString}, } // InternalPolicyProceduresTable holds the schema information for the "internal_policy_procedures" table. InternalPolicyProceduresTable = &schema.Table{ Name: "internal_policy_procedures", Columns: InternalPolicyProceduresColumns, PrimaryKey: []*schema.Column{InternalPolicyProceduresColumns[0], InternalPolicyProceduresColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "internal_policy_procedures_internal_policy_id", Columns: []*schema.Column{InternalPolicyProceduresColumns[0]}, RefColumns: []*schema.Column{InternalPoliciesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "internal_policy_procedures_procedure_id", Columns: []*schema.Column{InternalPolicyProceduresColumns[1]}, RefColumns: []*schema.Column{ProceduresColumns[0]}, OnDelete: schema.Cascade, }, }, } // InternalPolicyNarrativesColumns holds the columns for the "internal_policy_narratives" table. InternalPolicyNarrativesColumns = []*schema.Column{ {Name: "internal_policy_id", Type: field.TypeString}, {Name: "narrative_id", Type: field.TypeString}, } // InternalPolicyNarrativesTable holds the schema information for the "internal_policy_narratives" table. InternalPolicyNarrativesTable = &schema.Table{ Name: "internal_policy_narratives", Columns: InternalPolicyNarrativesColumns, PrimaryKey: []*schema.Column{InternalPolicyNarrativesColumns[0], InternalPolicyNarrativesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "internal_policy_narratives_internal_policy_id", Columns: []*schema.Column{InternalPolicyNarrativesColumns[0]}, RefColumns: []*schema.Column{InternalPoliciesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "internal_policy_narratives_narrative_id", Columns: []*schema.Column{InternalPolicyNarrativesColumns[1]}, RefColumns: []*schema.Column{NarrativesColumns[0]}, OnDelete: schema.Cascade, }, }, } // InternalPolicyTasksColumns holds the columns for the "internal_policy_tasks" table. InternalPolicyTasksColumns = []*schema.Column{ {Name: "internal_policy_id", Type: field.TypeString}, {Name: "task_id", Type: field.TypeString}, } // InternalPolicyTasksTable holds the schema information for the "internal_policy_tasks" table. InternalPolicyTasksTable = &schema.Table{ Name: "internal_policy_tasks", Columns: InternalPolicyTasksColumns, PrimaryKey: []*schema.Column{InternalPolicyTasksColumns[0], InternalPolicyTasksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "internal_policy_tasks_internal_policy_id", Columns: []*schema.Column{InternalPolicyTasksColumns[0]}, RefColumns: []*schema.Column{InternalPoliciesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "internal_policy_tasks_task_id", Columns: []*schema.Column{InternalPolicyTasksColumns[1]}, RefColumns: []*schema.Column{TasksColumns[0]}, OnDelete: schema.Cascade, }, }, } // InternalPolicyRisksColumns holds the columns for the "internal_policy_risks" table. InternalPolicyRisksColumns = []*schema.Column{ {Name: "internal_policy_id", Type: field.TypeString}, {Name: "risk_id", Type: field.TypeString}, } // InternalPolicyRisksTable holds the schema information for the "internal_policy_risks" table. InternalPolicyRisksTable = &schema.Table{ Name: "internal_policy_risks", Columns: InternalPolicyRisksColumns, PrimaryKey: []*schema.Column{InternalPolicyRisksColumns[0], InternalPolicyRisksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "internal_policy_risks_internal_policy_id", Columns: []*schema.Column{InternalPolicyRisksColumns[0]}, RefColumns: []*schema.Column{InternalPoliciesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "internal_policy_risks_risk_id", Columns: []*schema.Column{InternalPolicyRisksColumns[1]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.Cascade, }, }, } // InviteEventsColumns holds the columns for the "invite_events" table. InviteEventsColumns = []*schema.Column{ {Name: "invite_id", Type: field.TypeString}, {Name: "event_id", Type: field.TypeString}, } // InviteEventsTable holds the schema information for the "invite_events" table. InviteEventsTable = &schema.Table{ Name: "invite_events", Columns: InviteEventsColumns, PrimaryKey: []*schema.Column{InviteEventsColumns[0], InviteEventsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "invite_events_invite_id", Columns: []*schema.Column{InviteEventsColumns[0]}, RefColumns: []*schema.Column{InvitesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "invite_events_event_id", Columns: []*schema.Column{InviteEventsColumns[1]}, RefColumns: []*schema.Column{EventsColumns[0]}, OnDelete: schema.Cascade, }, }, } // InviteGroupsColumns holds the columns for the "invite_groups" table. InviteGroupsColumns = []*schema.Column{ {Name: "invite_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // InviteGroupsTable holds the schema information for the "invite_groups" table. InviteGroupsTable = &schema.Table{ Name: "invite_groups", Columns: InviteGroupsColumns, PrimaryKey: []*schema.Column{InviteGroupsColumns[0], InviteGroupsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "invite_groups_invite_id", Columns: []*schema.Column{InviteGroupsColumns[0]}, RefColumns: []*schema.Column{InvitesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "invite_groups_group_id", Columns: []*schema.Column{InviteGroupsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // JobRunnerJobRunnerTokensColumns holds the columns for the "job_runner_job_runner_tokens" table. JobRunnerJobRunnerTokensColumns = []*schema.Column{ {Name: "job_runner_id", Type: field.TypeString}, {Name: "job_runner_token_id", Type: field.TypeString}, } // JobRunnerJobRunnerTokensTable holds the schema information for the "job_runner_job_runner_tokens" table. JobRunnerJobRunnerTokensTable = &schema.Table{ Name: "job_runner_job_runner_tokens", Columns: JobRunnerJobRunnerTokensColumns, PrimaryKey: []*schema.Column{JobRunnerJobRunnerTokensColumns[0], JobRunnerJobRunnerTokensColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "job_runner_job_runner_tokens_job_runner_id", Columns: []*schema.Column{JobRunnerJobRunnerTokensColumns[0]}, RefColumns: []*schema.Column{JobRunnersColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "job_runner_job_runner_tokens_job_runner_token_id", Columns: []*schema.Column{JobRunnerJobRunnerTokensColumns[1]}, RefColumns: []*schema.Column{JobRunnerTokensColumns[0]}, OnDelete: schema.Cascade, }, }, } // MappedControlBlockedGroupsColumns holds the columns for the "mapped_control_blocked_groups" table. MappedControlBlockedGroupsColumns = []*schema.Column{ {Name: "mapped_control_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // MappedControlBlockedGroupsTable holds the schema information for the "mapped_control_blocked_groups" table. MappedControlBlockedGroupsTable = &schema.Table{ Name: "mapped_control_blocked_groups", Columns: MappedControlBlockedGroupsColumns, PrimaryKey: []*schema.Column{MappedControlBlockedGroupsColumns[0], MappedControlBlockedGroupsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "mapped_control_blocked_groups_mapped_control_id", Columns: []*schema.Column{MappedControlBlockedGroupsColumns[0]}, RefColumns: []*schema.Column{MappedControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "mapped_control_blocked_groups_group_id", Columns: []*schema.Column{MappedControlBlockedGroupsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // MappedControlEditorsColumns holds the columns for the "mapped_control_editors" table. MappedControlEditorsColumns = []*schema.Column{ {Name: "mapped_control_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // MappedControlEditorsTable holds the schema information for the "mapped_control_editors" table. MappedControlEditorsTable = &schema.Table{ Name: "mapped_control_editors", Columns: MappedControlEditorsColumns, PrimaryKey: []*schema.Column{MappedControlEditorsColumns[0], MappedControlEditorsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "mapped_control_editors_mapped_control_id", Columns: []*schema.Column{MappedControlEditorsColumns[0]}, RefColumns: []*schema.Column{MappedControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "mapped_control_editors_group_id", Columns: []*schema.Column{MappedControlEditorsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // MappedControlFromControlsColumns holds the columns for the "mapped_control_from_controls" table. MappedControlFromControlsColumns = []*schema.Column{ {Name: "mapped_control_id", Type: field.TypeString}, {Name: "control_id", Type: field.TypeString}, } // MappedControlFromControlsTable holds the schema information for the "mapped_control_from_controls" table. MappedControlFromControlsTable = &schema.Table{ Name: "mapped_control_from_controls", Columns: MappedControlFromControlsColumns, PrimaryKey: []*schema.Column{MappedControlFromControlsColumns[0], MappedControlFromControlsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "mapped_control_from_controls_mapped_control_id", Columns: []*schema.Column{MappedControlFromControlsColumns[0]}, RefColumns: []*schema.Column{MappedControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "mapped_control_from_controls_control_id", Columns: []*schema.Column{MappedControlFromControlsColumns[1]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, }, } // MappedControlToControlsColumns holds the columns for the "mapped_control_to_controls" table. MappedControlToControlsColumns = []*schema.Column{ {Name: "mapped_control_id", Type: field.TypeString}, {Name: "control_id", Type: field.TypeString}, } // MappedControlToControlsTable holds the schema information for the "mapped_control_to_controls" table. MappedControlToControlsTable = &schema.Table{ Name: "mapped_control_to_controls", Columns: MappedControlToControlsColumns, PrimaryKey: []*schema.Column{MappedControlToControlsColumns[0], MappedControlToControlsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "mapped_control_to_controls_mapped_control_id", Columns: []*schema.Column{MappedControlToControlsColumns[0]}, RefColumns: []*schema.Column{MappedControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "mapped_control_to_controls_control_id", Columns: []*schema.Column{MappedControlToControlsColumns[1]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, }, } // MappedControlFromSubcontrolsColumns holds the columns for the "mapped_control_from_subcontrols" table. MappedControlFromSubcontrolsColumns = []*schema.Column{ {Name: "mapped_control_id", Type: field.TypeString}, {Name: "subcontrol_id", Type: field.TypeString}, } // MappedControlFromSubcontrolsTable holds the schema information for the "mapped_control_from_subcontrols" table. MappedControlFromSubcontrolsTable = &schema.Table{ Name: "mapped_control_from_subcontrols", Columns: MappedControlFromSubcontrolsColumns, PrimaryKey: []*schema.Column{MappedControlFromSubcontrolsColumns[0], MappedControlFromSubcontrolsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "mapped_control_from_subcontrols_mapped_control_id", Columns: []*schema.Column{MappedControlFromSubcontrolsColumns[0]}, RefColumns: []*schema.Column{MappedControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "mapped_control_from_subcontrols_subcontrol_id", Columns: []*schema.Column{MappedControlFromSubcontrolsColumns[1]}, RefColumns: []*schema.Column{SubcontrolsColumns[0]}, OnDelete: schema.Cascade, }, }, } // MappedControlToSubcontrolsColumns holds the columns for the "mapped_control_to_subcontrols" table. MappedControlToSubcontrolsColumns = []*schema.Column{ {Name: "mapped_control_id", Type: field.TypeString}, {Name: "subcontrol_id", Type: field.TypeString}, } // MappedControlToSubcontrolsTable holds the schema information for the "mapped_control_to_subcontrols" table. MappedControlToSubcontrolsTable = &schema.Table{ Name: "mapped_control_to_subcontrols", Columns: MappedControlToSubcontrolsColumns, PrimaryKey: []*schema.Column{MappedControlToSubcontrolsColumns[0], MappedControlToSubcontrolsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "mapped_control_to_subcontrols_mapped_control_id", Columns: []*schema.Column{MappedControlToSubcontrolsColumns[0]}, RefColumns: []*schema.Column{MappedControlsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "mapped_control_to_subcontrols_subcontrol_id", Columns: []*schema.Column{MappedControlToSubcontrolsColumns[1]}, RefColumns: []*schema.Column{SubcontrolsColumns[0]}, OnDelete: schema.Cascade, }, }, } // NarrativeBlockedGroupsColumns holds the columns for the "narrative_blocked_groups" table. NarrativeBlockedGroupsColumns = []*schema.Column{ {Name: "narrative_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // NarrativeBlockedGroupsTable holds the schema information for the "narrative_blocked_groups" table. NarrativeBlockedGroupsTable = &schema.Table{ Name: "narrative_blocked_groups", Columns: NarrativeBlockedGroupsColumns, PrimaryKey: []*schema.Column{NarrativeBlockedGroupsColumns[0], NarrativeBlockedGroupsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "narrative_blocked_groups_narrative_id", Columns: []*schema.Column{NarrativeBlockedGroupsColumns[0]}, RefColumns: []*schema.Column{NarrativesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "narrative_blocked_groups_group_id", Columns: []*schema.Column{NarrativeBlockedGroupsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // NarrativeEditorsColumns holds the columns for the "narrative_editors" table. NarrativeEditorsColumns = []*schema.Column{ {Name: "narrative_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // NarrativeEditorsTable holds the schema information for the "narrative_editors" table. NarrativeEditorsTable = &schema.Table{ Name: "narrative_editors", Columns: NarrativeEditorsColumns, PrimaryKey: []*schema.Column{NarrativeEditorsColumns[0], NarrativeEditorsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "narrative_editors_narrative_id", Columns: []*schema.Column{NarrativeEditorsColumns[0]}, RefColumns: []*schema.Column{NarrativesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "narrative_editors_group_id", Columns: []*schema.Column{NarrativeEditorsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // NarrativeViewersColumns holds the columns for the "narrative_viewers" table. NarrativeViewersColumns = []*schema.Column{ {Name: "narrative_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // NarrativeViewersTable holds the schema information for the "narrative_viewers" table. NarrativeViewersTable = &schema.Table{ Name: "narrative_viewers", Columns: NarrativeViewersColumns, PrimaryKey: []*schema.Column{NarrativeViewersColumns[0], NarrativeViewersColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "narrative_viewers_narrative_id", Columns: []*schema.Column{NarrativeViewersColumns[0]}, RefColumns: []*schema.Column{NarrativesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "narrative_viewers_group_id", Columns: []*schema.Column{NarrativeViewersColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // OrgMembershipEventsColumns holds the columns for the "org_membership_events" table. OrgMembershipEventsColumns = []*schema.Column{ {Name: "org_membership_id", Type: field.TypeString}, {Name: "event_id", Type: field.TypeString}, } // OrgMembershipEventsTable holds the schema information for the "org_membership_events" table. OrgMembershipEventsTable = &schema.Table{ Name: "org_membership_events", Columns: OrgMembershipEventsColumns, PrimaryKey: []*schema.Column{OrgMembershipEventsColumns[0], OrgMembershipEventsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "org_membership_events_org_membership_id", Columns: []*schema.Column{OrgMembershipEventsColumns[0]}, RefColumns: []*schema.Column{OrgMembershipsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "org_membership_events_event_id", Columns: []*schema.Column{OrgMembershipEventsColumns[1]}, RefColumns: []*schema.Column{EventsColumns[0]}, OnDelete: schema.Cascade, }, }, } // OrgModuleOrgPricesColumns holds the columns for the "org_module_org_prices" table. OrgModuleOrgPricesColumns = []*schema.Column{ {Name: "org_module_id", Type: field.TypeString}, {Name: "org_price_id", Type: field.TypeString}, } // OrgModuleOrgPricesTable holds the schema information for the "org_module_org_prices" table. OrgModuleOrgPricesTable = &schema.Table{ Name: "org_module_org_prices", Columns: OrgModuleOrgPricesColumns, PrimaryKey: []*schema.Column{OrgModuleOrgPricesColumns[0], OrgModuleOrgPricesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "org_module_org_prices_org_module_id", Columns: []*schema.Column{OrgModuleOrgPricesColumns[0]}, RefColumns: []*schema.Column{OrgModulesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "org_module_org_prices_org_price_id", Columns: []*schema.Column{OrgModuleOrgPricesColumns[1]}, RefColumns: []*schema.Column{OrgPricesColumns[0]}, OnDelete: schema.Cascade, }, }, } // OrgProductOrgPricesColumns holds the columns for the "org_product_org_prices" table. OrgProductOrgPricesColumns = []*schema.Column{ {Name: "org_product_id", Type: field.TypeString}, {Name: "org_price_id", Type: field.TypeString}, } // OrgProductOrgPricesTable holds the schema information for the "org_product_org_prices" table. OrgProductOrgPricesTable = &schema.Table{ Name: "org_product_org_prices", Columns: OrgProductOrgPricesColumns, PrimaryKey: []*schema.Column{OrgProductOrgPricesColumns[0], OrgProductOrgPricesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "org_product_org_prices_org_product_id", Columns: []*schema.Column{OrgProductOrgPricesColumns[0]}, RefColumns: []*schema.Column{OrgProductsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "org_product_org_prices_org_price_id", Columns: []*schema.Column{OrgProductOrgPricesColumns[1]}, RefColumns: []*schema.Column{OrgPricesColumns[0]}, OnDelete: schema.Cascade, }, }, } // OrgSubscriptionEventsColumns holds the columns for the "org_subscription_events" table. OrgSubscriptionEventsColumns = []*schema.Column{ {Name: "org_subscription_id", Type: field.TypeString}, {Name: "event_id", Type: field.TypeString}, } // OrgSubscriptionEventsTable holds the schema information for the "org_subscription_events" table. OrgSubscriptionEventsTable = &schema.Table{ Name: "org_subscription_events", Columns: OrgSubscriptionEventsColumns, PrimaryKey: []*schema.Column{OrgSubscriptionEventsColumns[0], OrgSubscriptionEventsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "org_subscription_events_org_subscription_id", Columns: []*schema.Column{OrgSubscriptionEventsColumns[0]}, RefColumns: []*schema.Column{OrgSubscriptionsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "org_subscription_events_event_id", Columns: []*schema.Column{OrgSubscriptionEventsColumns[1]}, RefColumns: []*schema.Column{EventsColumns[0]}, OnDelete: schema.Cascade, }, }, } // OrganizationPersonalAccessTokensColumns holds the columns for the "organization_personal_access_tokens" table. OrganizationPersonalAccessTokensColumns = []*schema.Column{ {Name: "organization_id", Type: field.TypeString}, {Name: "personal_access_token_id", Type: field.TypeString}, } // OrganizationPersonalAccessTokensTable holds the schema information for the "organization_personal_access_tokens" table. OrganizationPersonalAccessTokensTable = &schema.Table{ Name: "organization_personal_access_tokens", Columns: OrganizationPersonalAccessTokensColumns, PrimaryKey: []*schema.Column{OrganizationPersonalAccessTokensColumns[0], OrganizationPersonalAccessTokensColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "organization_personal_access_tokens_organization_id", Columns: []*schema.Column{OrganizationPersonalAccessTokensColumns[0]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "organization_personal_access_tokens_personal_access_token_id", Columns: []*schema.Column{OrganizationPersonalAccessTokensColumns[1]}, RefColumns: []*schema.Column{PersonalAccessTokensColumns[0]}, OnDelete: schema.Cascade, }, }, } // OrganizationFilesColumns holds the columns for the "organization_files" table. OrganizationFilesColumns = []*schema.Column{ {Name: "organization_id", Type: field.TypeString}, {Name: "file_id", Type: field.TypeString}, } // OrganizationFilesTable holds the schema information for the "organization_files" table. OrganizationFilesTable = &schema.Table{ Name: "organization_files", Columns: OrganizationFilesColumns, PrimaryKey: []*schema.Column{OrganizationFilesColumns[0], OrganizationFilesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "organization_files_organization_id", Columns: []*schema.Column{OrganizationFilesColumns[0]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "organization_files_file_id", Columns: []*schema.Column{OrganizationFilesColumns[1]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.Cascade, }, }, } // OrganizationEventsColumns holds the columns for the "organization_events" table. OrganizationEventsColumns = []*schema.Column{ {Name: "organization_id", Type: field.TypeString}, {Name: "event_id", Type: field.TypeString}, } // OrganizationEventsTable holds the schema information for the "organization_events" table. OrganizationEventsTable = &schema.Table{ Name: "organization_events", Columns: OrganizationEventsColumns, PrimaryKey: []*schema.Column{OrganizationEventsColumns[0], OrganizationEventsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "organization_events_organization_id", Columns: []*schema.Column{OrganizationEventsColumns[0]}, RefColumns: []*schema.Column{OrganizationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "organization_events_event_id", Columns: []*schema.Column{OrganizationEventsColumns[1]}, RefColumns: []*schema.Column{EventsColumns[0]}, OnDelete: schema.Cascade, }, }, } // OrganizationSettingFilesColumns holds the columns for the "organization_setting_files" table. OrganizationSettingFilesColumns = []*schema.Column{ {Name: "organization_setting_id", Type: field.TypeString}, {Name: "file_id", Type: field.TypeString}, } // OrganizationSettingFilesTable holds the schema information for the "organization_setting_files" table. OrganizationSettingFilesTable = &schema.Table{ Name: "organization_setting_files", Columns: OrganizationSettingFilesColumns, PrimaryKey: []*schema.Column{OrganizationSettingFilesColumns[0], OrganizationSettingFilesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "organization_setting_files_organization_setting_id", Columns: []*schema.Column{OrganizationSettingFilesColumns[0]}, RefColumns: []*schema.Column{OrganizationSettingsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "organization_setting_files_file_id", Columns: []*schema.Column{OrganizationSettingFilesColumns[1]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.Cascade, }, }, } // PersonalAccessTokenEventsColumns holds the columns for the "personal_access_token_events" table. PersonalAccessTokenEventsColumns = []*schema.Column{ {Name: "personal_access_token_id", Type: field.TypeString}, {Name: "event_id", Type: field.TypeString}, } // PersonalAccessTokenEventsTable holds the schema information for the "personal_access_token_events" table. PersonalAccessTokenEventsTable = &schema.Table{ Name: "personal_access_token_events", Columns: PersonalAccessTokenEventsColumns, PrimaryKey: []*schema.Column{PersonalAccessTokenEventsColumns[0], PersonalAccessTokenEventsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "personal_access_token_events_personal_access_token_id", Columns: []*schema.Column{PersonalAccessTokenEventsColumns[0]}, RefColumns: []*schema.Column{PersonalAccessTokensColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "personal_access_token_events_event_id", Columns: []*schema.Column{PersonalAccessTokenEventsColumns[1]}, RefColumns: []*schema.Column{EventsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProcedureBlockedGroupsColumns holds the columns for the "procedure_blocked_groups" table. ProcedureBlockedGroupsColumns = []*schema.Column{ {Name: "procedure_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ProcedureBlockedGroupsTable holds the schema information for the "procedure_blocked_groups" table. ProcedureBlockedGroupsTable = &schema.Table{ Name: "procedure_blocked_groups", Columns: ProcedureBlockedGroupsColumns, PrimaryKey: []*schema.Column{ProcedureBlockedGroupsColumns[0], ProcedureBlockedGroupsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "procedure_blocked_groups_procedure_id", Columns: []*schema.Column{ProcedureBlockedGroupsColumns[0]}, RefColumns: []*schema.Column{ProceduresColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "procedure_blocked_groups_group_id", Columns: []*schema.Column{ProcedureBlockedGroupsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProcedureEditorsColumns holds the columns for the "procedure_editors" table. ProcedureEditorsColumns = []*schema.Column{ {Name: "procedure_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ProcedureEditorsTable holds the schema information for the "procedure_editors" table. ProcedureEditorsTable = &schema.Table{ Name: "procedure_editors", Columns: ProcedureEditorsColumns, PrimaryKey: []*schema.Column{ProcedureEditorsColumns[0], ProcedureEditorsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "procedure_editors_procedure_id", Columns: []*schema.Column{ProcedureEditorsColumns[0]}, RefColumns: []*schema.Column{ProceduresColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "procedure_editors_group_id", Columns: []*schema.Column{ProcedureEditorsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProcedureNarrativesColumns holds the columns for the "procedure_narratives" table. ProcedureNarrativesColumns = []*schema.Column{ {Name: "procedure_id", Type: field.TypeString}, {Name: "narrative_id", Type: field.TypeString}, } // ProcedureNarrativesTable holds the schema information for the "procedure_narratives" table. ProcedureNarrativesTable = &schema.Table{ Name: "procedure_narratives", Columns: ProcedureNarrativesColumns, PrimaryKey: []*schema.Column{ProcedureNarrativesColumns[0], ProcedureNarrativesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "procedure_narratives_procedure_id", Columns: []*schema.Column{ProcedureNarrativesColumns[0]}, RefColumns: []*schema.Column{ProceduresColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "procedure_narratives_narrative_id", Columns: []*schema.Column{ProcedureNarrativesColumns[1]}, RefColumns: []*schema.Column{NarrativesColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProcedureRisksColumns holds the columns for the "procedure_risks" table. ProcedureRisksColumns = []*schema.Column{ {Name: "procedure_id", Type: field.TypeString}, {Name: "risk_id", Type: field.TypeString}, } // ProcedureRisksTable holds the schema information for the "procedure_risks" table. ProcedureRisksTable = &schema.Table{ Name: "procedure_risks", Columns: ProcedureRisksColumns, PrimaryKey: []*schema.Column{ProcedureRisksColumns[0], ProcedureRisksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "procedure_risks_procedure_id", Columns: []*schema.Column{ProcedureRisksColumns[0]}, RefColumns: []*schema.Column{ProceduresColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "procedure_risks_risk_id", Columns: []*schema.Column{ProcedureRisksColumns[1]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProcedureTasksColumns holds the columns for the "procedure_tasks" table. ProcedureTasksColumns = []*schema.Column{ {Name: "procedure_id", Type: field.TypeString}, {Name: "task_id", Type: field.TypeString}, } // ProcedureTasksTable holds the schema information for the "procedure_tasks" table. ProcedureTasksTable = &schema.Table{ Name: "procedure_tasks", Columns: ProcedureTasksColumns, PrimaryKey: []*schema.Column{ProcedureTasksColumns[0], ProcedureTasksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "procedure_tasks_procedure_id", Columns: []*schema.Column{ProcedureTasksColumns[0]}, RefColumns: []*schema.Column{ProceduresColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "procedure_tasks_task_id", Columns: []*schema.Column{ProcedureTasksColumns[1]}, RefColumns: []*schema.Column{TasksColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProgramBlockedGroupsColumns holds the columns for the "program_blocked_groups" table. ProgramBlockedGroupsColumns = []*schema.Column{ {Name: "program_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ProgramBlockedGroupsTable holds the schema information for the "program_blocked_groups" table. ProgramBlockedGroupsTable = &schema.Table{ Name: "program_blocked_groups", Columns: ProgramBlockedGroupsColumns, PrimaryKey: []*schema.Column{ProgramBlockedGroupsColumns[0], ProgramBlockedGroupsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_blocked_groups_program_id", Columns: []*schema.Column{ProgramBlockedGroupsColumns[0]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "program_blocked_groups_group_id", Columns: []*schema.Column{ProgramBlockedGroupsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProgramEditorsColumns holds the columns for the "program_editors" table. ProgramEditorsColumns = []*schema.Column{ {Name: "program_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ProgramEditorsTable holds the schema information for the "program_editors" table. ProgramEditorsTable = &schema.Table{ Name: "program_editors", Columns: ProgramEditorsColumns, PrimaryKey: []*schema.Column{ProgramEditorsColumns[0], ProgramEditorsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_editors_program_id", Columns: []*schema.Column{ProgramEditorsColumns[0]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "program_editors_group_id", Columns: []*schema.Column{ProgramEditorsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProgramViewersColumns holds the columns for the "program_viewers" table. ProgramViewersColumns = []*schema.Column{ {Name: "program_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ProgramViewersTable holds the schema information for the "program_viewers" table. ProgramViewersTable = &schema.Table{ Name: "program_viewers", Columns: ProgramViewersColumns, PrimaryKey: []*schema.Column{ProgramViewersColumns[0], ProgramViewersColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_viewers_program_id", Columns: []*schema.Column{ProgramViewersColumns[0]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "program_viewers_group_id", Columns: []*schema.Column{ProgramViewersColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProgramControlsColumns holds the columns for the "program_controls" table. ProgramControlsColumns = []*schema.Column{ {Name: "program_id", Type: field.TypeString}, {Name: "control_id", Type: field.TypeString}, } // ProgramControlsTable holds the schema information for the "program_controls" table. ProgramControlsTable = &schema.Table{ Name: "program_controls", Columns: ProgramControlsColumns, PrimaryKey: []*schema.Column{ProgramControlsColumns[0], ProgramControlsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_controls_program_id", Columns: []*schema.Column{ProgramControlsColumns[0]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "program_controls_control_id", Columns: []*schema.Column{ProgramControlsColumns[1]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProgramControlObjectivesColumns holds the columns for the "program_control_objectives" table. ProgramControlObjectivesColumns = []*schema.Column{ {Name: "program_id", Type: field.TypeString}, {Name: "control_objective_id", Type: field.TypeString}, } // ProgramControlObjectivesTable holds the schema information for the "program_control_objectives" table. ProgramControlObjectivesTable = &schema.Table{ Name: "program_control_objectives", Columns: ProgramControlObjectivesColumns, PrimaryKey: []*schema.Column{ProgramControlObjectivesColumns[0], ProgramControlObjectivesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_control_objectives_program_id", Columns: []*schema.Column{ProgramControlObjectivesColumns[0]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "program_control_objectives_control_objective_id", Columns: []*schema.Column{ProgramControlObjectivesColumns[1]}, RefColumns: []*schema.Column{ControlObjectivesColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProgramInternalPoliciesColumns holds the columns for the "program_internal_policies" table. ProgramInternalPoliciesColumns = []*schema.Column{ {Name: "program_id", Type: field.TypeString}, {Name: "internal_policy_id", Type: field.TypeString}, } // ProgramInternalPoliciesTable holds the schema information for the "program_internal_policies" table. ProgramInternalPoliciesTable = &schema.Table{ Name: "program_internal_policies", Columns: ProgramInternalPoliciesColumns, PrimaryKey: []*schema.Column{ProgramInternalPoliciesColumns[0], ProgramInternalPoliciesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_internal_policies_program_id", Columns: []*schema.Column{ProgramInternalPoliciesColumns[0]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "program_internal_policies_internal_policy_id", Columns: []*schema.Column{ProgramInternalPoliciesColumns[1]}, RefColumns: []*schema.Column{InternalPoliciesColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProgramProceduresColumns holds the columns for the "program_procedures" table. ProgramProceduresColumns = []*schema.Column{ {Name: "program_id", Type: field.TypeString}, {Name: "procedure_id", Type: field.TypeString}, } // ProgramProceduresTable holds the schema information for the "program_procedures" table. ProgramProceduresTable = &schema.Table{ Name: "program_procedures", Columns: ProgramProceduresColumns, PrimaryKey: []*schema.Column{ProgramProceduresColumns[0], ProgramProceduresColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_procedures_program_id", Columns: []*schema.Column{ProgramProceduresColumns[0]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "program_procedures_procedure_id", Columns: []*schema.Column{ProgramProceduresColumns[1]}, RefColumns: []*schema.Column{ProceduresColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProgramRisksColumns holds the columns for the "program_risks" table. ProgramRisksColumns = []*schema.Column{ {Name: "program_id", Type: field.TypeString}, {Name: "risk_id", Type: field.TypeString}, } // ProgramRisksTable holds the schema information for the "program_risks" table. ProgramRisksTable = &schema.Table{ Name: "program_risks", Columns: ProgramRisksColumns, PrimaryKey: []*schema.Column{ProgramRisksColumns[0], ProgramRisksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_risks_program_id", Columns: []*schema.Column{ProgramRisksColumns[0]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "program_risks_risk_id", Columns: []*schema.Column{ProgramRisksColumns[1]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProgramTasksColumns holds the columns for the "program_tasks" table. ProgramTasksColumns = []*schema.Column{ {Name: "program_id", Type: field.TypeString}, {Name: "task_id", Type: field.TypeString}, } // ProgramTasksTable holds the schema information for the "program_tasks" table. ProgramTasksTable = &schema.Table{ Name: "program_tasks", Columns: ProgramTasksColumns, PrimaryKey: []*schema.Column{ProgramTasksColumns[0], ProgramTasksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_tasks_program_id", Columns: []*schema.Column{ProgramTasksColumns[0]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "program_tasks_task_id", Columns: []*schema.Column{ProgramTasksColumns[1]}, RefColumns: []*schema.Column{TasksColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProgramFilesColumns holds the columns for the "program_files" table. ProgramFilesColumns = []*schema.Column{ {Name: "program_id", Type: field.TypeString}, {Name: "file_id", Type: field.TypeString}, } // ProgramFilesTable holds the schema information for the "program_files" table. ProgramFilesTable = &schema.Table{ Name: "program_files", Columns: ProgramFilesColumns, PrimaryKey: []*schema.Column{ProgramFilesColumns[0], ProgramFilesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_files_program_id", Columns: []*schema.Column{ProgramFilesColumns[0]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "program_files_file_id", Columns: []*schema.Column{ProgramFilesColumns[1]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProgramEvidenceColumns holds the columns for the "program_evidence" table. ProgramEvidenceColumns = []*schema.Column{ {Name: "program_id", Type: field.TypeString}, {Name: "evidence_id", Type: field.TypeString}, } // ProgramEvidenceTable holds the schema information for the "program_evidence" table. ProgramEvidenceTable = &schema.Table{ Name: "program_evidence", Columns: ProgramEvidenceColumns, PrimaryKey: []*schema.Column{ProgramEvidenceColumns[0], ProgramEvidenceColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_evidence_program_id", Columns: []*schema.Column{ProgramEvidenceColumns[0]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "program_evidence_evidence_id", Columns: []*schema.Column{ProgramEvidenceColumns[1]}, RefColumns: []*schema.Column{EvidencesColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProgramNarrativesColumns holds the columns for the "program_narratives" table. ProgramNarrativesColumns = []*schema.Column{ {Name: "program_id", Type: field.TypeString}, {Name: "narrative_id", Type: field.TypeString}, } // ProgramNarrativesTable holds the schema information for the "program_narratives" table. ProgramNarrativesTable = &schema.Table{ Name: "program_narratives", Columns: ProgramNarrativesColumns, PrimaryKey: []*schema.Column{ProgramNarrativesColumns[0], ProgramNarrativesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_narratives_program_id", Columns: []*schema.Column{ProgramNarrativesColumns[0]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "program_narratives_narrative_id", Columns: []*schema.Column{ProgramNarrativesColumns[1]}, RefColumns: []*schema.Column{NarrativesColumns[0]}, OnDelete: schema.Cascade, }, }, } // ProgramActionPlansColumns holds the columns for the "program_action_plans" table. ProgramActionPlansColumns = []*schema.Column{ {Name: "program_id", Type: field.TypeString}, {Name: "action_plan_id", Type: field.TypeString}, } // ProgramActionPlansTable holds the schema information for the "program_action_plans" table. ProgramActionPlansTable = &schema.Table{ Name: "program_action_plans", Columns: ProgramActionPlansColumns, PrimaryKey: []*schema.Column{ProgramActionPlansColumns[0], ProgramActionPlansColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "program_action_plans_program_id", Columns: []*schema.Column{ProgramActionPlansColumns[0]}, RefColumns: []*schema.Column{ProgramsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "program_action_plans_action_plan_id", Columns: []*schema.Column{ProgramActionPlansColumns[1]}, RefColumns: []*schema.Column{ActionPlansColumns[0]}, OnDelete: schema.Cascade, }, }, } // RemediationActionPlansColumns holds the columns for the "remediation_action_plans" table. RemediationActionPlansColumns = []*schema.Column{ {Name: "remediation_id", Type: field.TypeString}, {Name: "action_plan_id", Type: field.TypeString}, } // RemediationActionPlansTable holds the schema information for the "remediation_action_plans" table. RemediationActionPlansTable = &schema.Table{ Name: "remediation_action_plans", Columns: RemediationActionPlansColumns, PrimaryKey: []*schema.Column{RemediationActionPlansColumns[0], RemediationActionPlansColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "remediation_action_plans_remediation_id", Columns: []*schema.Column{RemediationActionPlansColumns[0]}, RefColumns: []*schema.Column{RemediationsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "remediation_action_plans_action_plan_id", Columns: []*schema.Column{RemediationActionPlansColumns[1]}, RefColumns: []*schema.Column{ActionPlansColumns[0]}, OnDelete: schema.Cascade, }, }, } // ReviewActionPlansColumns holds the columns for the "review_action_plans" table. ReviewActionPlansColumns = []*schema.Column{ {Name: "review_id", Type: field.TypeString}, {Name: "action_plan_id", Type: field.TypeString}, } // ReviewActionPlansTable holds the schema information for the "review_action_plans" table. ReviewActionPlansTable = &schema.Table{ Name: "review_action_plans", Columns: ReviewActionPlansColumns, PrimaryKey: []*schema.Column{ReviewActionPlansColumns[0], ReviewActionPlansColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "review_action_plans_review_id", Columns: []*schema.Column{ReviewActionPlansColumns[0]}, RefColumns: []*schema.Column{ReviewsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "review_action_plans_action_plan_id", Columns: []*schema.Column{ReviewActionPlansColumns[1]}, RefColumns: []*schema.Column{ActionPlansColumns[0]}, OnDelete: schema.Cascade, }, }, } // RiskBlockedGroupsColumns holds the columns for the "risk_blocked_groups" table. RiskBlockedGroupsColumns = []*schema.Column{ {Name: "risk_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // RiskBlockedGroupsTable holds the schema information for the "risk_blocked_groups" table. RiskBlockedGroupsTable = &schema.Table{ Name: "risk_blocked_groups", Columns: RiskBlockedGroupsColumns, PrimaryKey: []*schema.Column{RiskBlockedGroupsColumns[0], RiskBlockedGroupsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "risk_blocked_groups_risk_id", Columns: []*schema.Column{RiskBlockedGroupsColumns[0]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "risk_blocked_groups_group_id", Columns: []*schema.Column{RiskBlockedGroupsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // RiskEditorsColumns holds the columns for the "risk_editors" table. RiskEditorsColumns = []*schema.Column{ {Name: "risk_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // RiskEditorsTable holds the schema information for the "risk_editors" table. RiskEditorsTable = &schema.Table{ Name: "risk_editors", Columns: RiskEditorsColumns, PrimaryKey: []*schema.Column{RiskEditorsColumns[0], RiskEditorsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "risk_editors_risk_id", Columns: []*schema.Column{RiskEditorsColumns[0]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "risk_editors_group_id", Columns: []*schema.Column{RiskEditorsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // RiskViewersColumns holds the columns for the "risk_viewers" table. RiskViewersColumns = []*schema.Column{ {Name: "risk_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // RiskViewersTable holds the schema information for the "risk_viewers" table. RiskViewersTable = &schema.Table{ Name: "risk_viewers", Columns: RiskViewersColumns, PrimaryKey: []*schema.Column{RiskViewersColumns[0], RiskViewersColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "risk_viewers_risk_id", Columns: []*schema.Column{RiskViewersColumns[0]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "risk_viewers_group_id", Columns: []*schema.Column{RiskViewersColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // RiskActionPlansColumns holds the columns for the "risk_action_plans" table. RiskActionPlansColumns = []*schema.Column{ {Name: "risk_id", Type: field.TypeString}, {Name: "action_plan_id", Type: field.TypeString}, } // RiskActionPlansTable holds the schema information for the "risk_action_plans" table. RiskActionPlansTable = &schema.Table{ Name: "risk_action_plans", Columns: RiskActionPlansColumns, PrimaryKey: []*schema.Column{RiskActionPlansColumns[0], RiskActionPlansColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "risk_action_plans_risk_id", Columns: []*schema.Column{RiskActionPlansColumns[0]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "risk_action_plans_action_plan_id", Columns: []*schema.Column{RiskActionPlansColumns[1]}, RefColumns: []*schema.Column{ActionPlansColumns[0]}, OnDelete: schema.Cascade, }, }, } // RiskTasksColumns holds the columns for the "risk_tasks" table. RiskTasksColumns = []*schema.Column{ {Name: "risk_id", Type: field.TypeString}, {Name: "task_id", Type: field.TypeString}, } // RiskTasksTable holds the schema information for the "risk_tasks" table. RiskTasksTable = &schema.Table{ Name: "risk_tasks", Columns: RiskTasksColumns, PrimaryKey: []*schema.Column{RiskTasksColumns[0], RiskTasksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "risk_tasks_risk_id", Columns: []*schema.Column{RiskTasksColumns[0]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "risk_tasks_task_id", Columns: []*schema.Column{RiskTasksColumns[1]}, RefColumns: []*schema.Column{TasksColumns[0]}, OnDelete: schema.Cascade, }, }, } // ScanBlockedGroupsColumns holds the columns for the "scan_blocked_groups" table. ScanBlockedGroupsColumns = []*schema.Column{ {Name: "scan_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ScanBlockedGroupsTable holds the schema information for the "scan_blocked_groups" table. ScanBlockedGroupsTable = &schema.Table{ Name: "scan_blocked_groups", Columns: ScanBlockedGroupsColumns, PrimaryKey: []*schema.Column{ScanBlockedGroupsColumns[0], ScanBlockedGroupsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "scan_blocked_groups_scan_id", Columns: []*schema.Column{ScanBlockedGroupsColumns[0]}, RefColumns: []*schema.Column{ScansColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "scan_blocked_groups_group_id", Columns: []*schema.Column{ScanBlockedGroupsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ScanEditorsColumns holds the columns for the "scan_editors" table. ScanEditorsColumns = []*schema.Column{ {Name: "scan_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ScanEditorsTable holds the schema information for the "scan_editors" table. ScanEditorsTable = &schema.Table{ Name: "scan_editors", Columns: ScanEditorsColumns, PrimaryKey: []*schema.Column{ScanEditorsColumns[0], ScanEditorsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "scan_editors_scan_id", Columns: []*schema.Column{ScanEditorsColumns[0]}, RefColumns: []*schema.Column{ScansColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "scan_editors_group_id", Columns: []*schema.Column{ScanEditorsColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ScanViewersColumns holds the columns for the "scan_viewers" table. ScanViewersColumns = []*schema.Column{ {Name: "scan_id", Type: field.TypeString}, {Name: "group_id", Type: field.TypeString}, } // ScanViewersTable holds the schema information for the "scan_viewers" table. ScanViewersTable = &schema.Table{ Name: "scan_viewers", Columns: ScanViewersColumns, PrimaryKey: []*schema.Column{ScanViewersColumns[0], ScanViewersColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "scan_viewers_scan_id", Columns: []*schema.Column{ScanViewersColumns[0]}, RefColumns: []*schema.Column{ScansColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "scan_viewers_group_id", Columns: []*schema.Column{ScanViewersColumns[1]}, RefColumns: []*schema.Column{GroupsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ScanAssetsColumns holds the columns for the "scan_assets" table. ScanAssetsColumns = []*schema.Column{ {Name: "scan_id", Type: field.TypeString}, {Name: "asset_id", Type: field.TypeString}, } // ScanAssetsTable holds the schema information for the "scan_assets" table. ScanAssetsTable = &schema.Table{ Name: "scan_assets", Columns: ScanAssetsColumns, PrimaryKey: []*schema.Column{ScanAssetsColumns[0], ScanAssetsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "scan_assets_scan_id", Columns: []*schema.Column{ScanAssetsColumns[0]}, RefColumns: []*schema.Column{ScansColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "scan_assets_asset_id", Columns: []*schema.Column{ScanAssetsColumns[1]}, RefColumns: []*schema.Column{AssetsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ScheduledJobControlsColumns holds the columns for the "scheduled_job_controls" table. ScheduledJobControlsColumns = []*schema.Column{ {Name: "scheduled_job_id", Type: field.TypeString}, {Name: "control_id", Type: field.TypeString}, } // ScheduledJobControlsTable holds the schema information for the "scheduled_job_controls" table. ScheduledJobControlsTable = &schema.Table{ Name: "scheduled_job_controls", Columns: ScheduledJobControlsColumns, PrimaryKey: []*schema.Column{ScheduledJobControlsColumns[0], ScheduledJobControlsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "scheduled_job_controls_scheduled_job_id", Columns: []*schema.Column{ScheduledJobControlsColumns[0]}, RefColumns: []*schema.Column{ScheduledJobsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "scheduled_job_controls_control_id", Columns: []*schema.Column{ScheduledJobControlsColumns[1]}, RefColumns: []*schema.Column{ControlsColumns[0]}, OnDelete: schema.Cascade, }, }, } // ScheduledJobSubcontrolsColumns holds the columns for the "scheduled_job_subcontrols" table. ScheduledJobSubcontrolsColumns = []*schema.Column{ {Name: "scheduled_job_id", Type: field.TypeString}, {Name: "subcontrol_id", Type: field.TypeString}, } // ScheduledJobSubcontrolsTable holds the schema information for the "scheduled_job_subcontrols" table. ScheduledJobSubcontrolsTable = &schema.Table{ Name: "scheduled_job_subcontrols", Columns: ScheduledJobSubcontrolsColumns, PrimaryKey: []*schema.Column{ScheduledJobSubcontrolsColumns[0], ScheduledJobSubcontrolsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "scheduled_job_subcontrols_scheduled_job_id", Columns: []*schema.Column{ScheduledJobSubcontrolsColumns[0]}, RefColumns: []*schema.Column{ScheduledJobsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "scheduled_job_subcontrols_subcontrol_id", Columns: []*schema.Column{ScheduledJobSubcontrolsColumns[1]}, RefColumns: []*schema.Column{SubcontrolsColumns[0]}, OnDelete: schema.Cascade, }, }, } // SubcontrolControlObjectivesColumns holds the columns for the "subcontrol_control_objectives" table. SubcontrolControlObjectivesColumns = []*schema.Column{ {Name: "subcontrol_id", Type: field.TypeString}, {Name: "control_objective_id", Type: field.TypeString}, } // SubcontrolControlObjectivesTable holds the schema information for the "subcontrol_control_objectives" table. SubcontrolControlObjectivesTable = &schema.Table{ Name: "subcontrol_control_objectives", Columns: SubcontrolControlObjectivesColumns, PrimaryKey: []*schema.Column{SubcontrolControlObjectivesColumns[0], SubcontrolControlObjectivesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "subcontrol_control_objectives_subcontrol_id", Columns: []*schema.Column{SubcontrolControlObjectivesColumns[0]}, RefColumns: []*schema.Column{SubcontrolsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "subcontrol_control_objectives_control_objective_id", Columns: []*schema.Column{SubcontrolControlObjectivesColumns[1]}, RefColumns: []*schema.Column{ControlObjectivesColumns[0]}, OnDelete: schema.Cascade, }, }, } // SubcontrolTasksColumns holds the columns for the "subcontrol_tasks" table. SubcontrolTasksColumns = []*schema.Column{ {Name: "subcontrol_id", Type: field.TypeString}, {Name: "task_id", Type: field.TypeString}, } // SubcontrolTasksTable holds the schema information for the "subcontrol_tasks" table. SubcontrolTasksTable = &schema.Table{ Name: "subcontrol_tasks", Columns: SubcontrolTasksColumns, PrimaryKey: []*schema.Column{SubcontrolTasksColumns[0], SubcontrolTasksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "subcontrol_tasks_subcontrol_id", Columns: []*schema.Column{SubcontrolTasksColumns[0]}, RefColumns: []*schema.Column{SubcontrolsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "subcontrol_tasks_task_id", Columns: []*schema.Column{SubcontrolTasksColumns[1]}, RefColumns: []*schema.Column{TasksColumns[0]}, OnDelete: schema.Cascade, }, }, } // SubcontrolRisksColumns holds the columns for the "subcontrol_risks" table. SubcontrolRisksColumns = []*schema.Column{ {Name: "subcontrol_id", Type: field.TypeString}, {Name: "risk_id", Type: field.TypeString}, } // SubcontrolRisksTable holds the schema information for the "subcontrol_risks" table. SubcontrolRisksTable = &schema.Table{ Name: "subcontrol_risks", Columns: SubcontrolRisksColumns, PrimaryKey: []*schema.Column{SubcontrolRisksColumns[0], SubcontrolRisksColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "subcontrol_risks_subcontrol_id", Columns: []*schema.Column{SubcontrolRisksColumns[0]}, RefColumns: []*schema.Column{SubcontrolsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "subcontrol_risks_risk_id", Columns: []*schema.Column{SubcontrolRisksColumns[1]}, RefColumns: []*schema.Column{RisksColumns[0]}, OnDelete: schema.Cascade, }, }, } // SubcontrolProceduresColumns holds the columns for the "subcontrol_procedures" table. SubcontrolProceduresColumns = []*schema.Column{ {Name: "subcontrol_id", Type: field.TypeString}, {Name: "procedure_id", Type: field.TypeString}, } // SubcontrolProceduresTable holds the schema information for the "subcontrol_procedures" table. SubcontrolProceduresTable = &schema.Table{ Name: "subcontrol_procedures", Columns: SubcontrolProceduresColumns, PrimaryKey: []*schema.Column{SubcontrolProceduresColumns[0], SubcontrolProceduresColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "subcontrol_procedures_subcontrol_id", Columns: []*schema.Column{SubcontrolProceduresColumns[0]}, RefColumns: []*schema.Column{SubcontrolsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "subcontrol_procedures_procedure_id", Columns: []*schema.Column{SubcontrolProceduresColumns[1]}, RefColumns: []*schema.Column{ProceduresColumns[0]}, OnDelete: schema.Cascade, }, }, } // SubcontrolControlImplementationsColumns holds the columns for the "subcontrol_control_implementations" table. SubcontrolControlImplementationsColumns = []*schema.Column{ {Name: "subcontrol_id", Type: field.TypeString}, {Name: "control_implementation_id", Type: field.TypeString}, } // SubcontrolControlImplementationsTable holds the schema information for the "subcontrol_control_implementations" table. SubcontrolControlImplementationsTable = &schema.Table{ Name: "subcontrol_control_implementations", Columns: SubcontrolControlImplementationsColumns, PrimaryKey: []*schema.Column{SubcontrolControlImplementationsColumns[0], SubcontrolControlImplementationsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "subcontrol_control_implementations_subcontrol_id", Columns: []*schema.Column{SubcontrolControlImplementationsColumns[0]}, RefColumns: []*schema.Column{SubcontrolsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "subcontrol_control_implementations_control_implementation_id", Columns: []*schema.Column{SubcontrolControlImplementationsColumns[1]}, RefColumns: []*schema.Column{ControlImplementationsColumns[0]}, OnDelete: schema.Cascade, }, }, } // SubscriberEventsColumns holds the columns for the "subscriber_events" table. SubscriberEventsColumns = []*schema.Column{ {Name: "subscriber_id", Type: field.TypeString}, {Name: "event_id", Type: field.TypeString}, } // SubscriberEventsTable holds the schema information for the "subscriber_events" table. SubscriberEventsTable = &schema.Table{ Name: "subscriber_events", Columns: SubscriberEventsColumns, PrimaryKey: []*schema.Column{SubscriberEventsColumns[0], SubscriberEventsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "subscriber_events_subscriber_id", Columns: []*schema.Column{SubscriberEventsColumns[0]}, RefColumns: []*schema.Column{SubscribersColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "subscriber_events_event_id", Columns: []*schema.Column{SubscriberEventsColumns[1]}, RefColumns: []*schema.Column{EventsColumns[0]}, OnDelete: schema.Cascade, }, }, } // TaskEvidenceColumns holds the columns for the "task_evidence" table. TaskEvidenceColumns = []*schema.Column{ {Name: "task_id", Type: field.TypeString}, {Name: "evidence_id", Type: field.TypeString}, } // TaskEvidenceTable holds the schema information for the "task_evidence" table. TaskEvidenceTable = &schema.Table{ Name: "task_evidence", Columns: TaskEvidenceColumns, PrimaryKey: []*schema.Column{TaskEvidenceColumns[0], TaskEvidenceColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "task_evidence_task_id", Columns: []*schema.Column{TaskEvidenceColumns[0]}, RefColumns: []*schema.Column{TasksColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "task_evidence_evidence_id", Columns: []*schema.Column{TaskEvidenceColumns[1]}, RefColumns: []*schema.Column{EvidencesColumns[0]}, OnDelete: schema.Cascade, }, }, } // TemplateFilesColumns holds the columns for the "template_files" table. TemplateFilesColumns = []*schema.Column{ {Name: "template_id", Type: field.TypeString}, {Name: "file_id", Type: field.TypeString}, } // TemplateFilesTable holds the schema information for the "template_files" table. TemplateFilesTable = &schema.Table{ Name: "template_files", Columns: TemplateFilesColumns, PrimaryKey: []*schema.Column{TemplateFilesColumns[0], TemplateFilesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "template_files_template_id", Columns: []*schema.Column{TemplateFilesColumns[0]}, RefColumns: []*schema.Column{TemplatesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "template_files_file_id", Columns: []*schema.Column{TemplateFilesColumns[1]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.Cascade, }, }, } // TrustCenterSettingFilesColumns holds the columns for the "trust_center_setting_files" table. TrustCenterSettingFilesColumns = []*schema.Column{ {Name: "trust_center_setting_id", Type: field.TypeString}, {Name: "file_id", Type: field.TypeString}, } // TrustCenterSettingFilesTable holds the schema information for the "trust_center_setting_files" table. TrustCenterSettingFilesTable = &schema.Table{ Name: "trust_center_setting_files", Columns: TrustCenterSettingFilesColumns, PrimaryKey: []*schema.Column{TrustCenterSettingFilesColumns[0], TrustCenterSettingFilesColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "trust_center_setting_files_trust_center_setting_id", Columns: []*schema.Column{TrustCenterSettingFilesColumns[0]}, RefColumns: []*schema.Column{TrustCenterSettingsColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "trust_center_setting_files_file_id", Columns: []*schema.Column{TrustCenterSettingFilesColumns[1]}, RefColumns: []*schema.Column{FilesColumns[0]}, OnDelete: schema.Cascade, }, }, } // UserEventsColumns holds the columns for the "user_events" table. UserEventsColumns = []*schema.Column{ {Name: "user_id", Type: field.TypeString}, {Name: "event_id", Type: field.TypeString}, } // UserEventsTable holds the schema information for the "user_events" table. UserEventsTable = &schema.Table{ Name: "user_events", Columns: UserEventsColumns, PrimaryKey: []*schema.Column{UserEventsColumns[0], UserEventsColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "user_events_user_id", Columns: []*schema.Column{UserEventsColumns[0]}, RefColumns: []*schema.Column{UsersColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "user_events_event_id", Columns: []*schema.Column{UserEventsColumns[1]}, RefColumns: []*schema.Column{EventsColumns[0]}, OnDelete: schema.Cascade, }, }, } // VulnerabilityActionPlansColumns holds the columns for the "vulnerability_action_plans" table. VulnerabilityActionPlansColumns = []*schema.Column{ {Name: "vulnerability_id", Type: field.TypeString}, {Name: "action_plan_id", Type: field.TypeString}, } // VulnerabilityActionPlansTable holds the schema information for the "vulnerability_action_plans" table. VulnerabilityActionPlansTable = &schema.Table{ Name: "vulnerability_action_plans", Columns: VulnerabilityActionPlansColumns, PrimaryKey: []*schema.Column{VulnerabilityActionPlansColumns[0], VulnerabilityActionPlansColumns[1]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "vulnerability_action_plans_vulnerability_id", Columns: []*schema.Column{VulnerabilityActionPlansColumns[0]}, RefColumns: []*schema.Column{VulnerabilitiesColumns[0]}, OnDelete: schema.Cascade, }, { Symbol: "vulnerability_action_plans_action_plan_id", Columns: []*schema.Column{VulnerabilityActionPlansColumns[1]}, RefColumns: []*schema.Column{ActionPlansColumns[0]}, OnDelete: schema.Cascade, }, }, } // Tables holds all the tables in the schema. Tables = []*schema.Table{}/* 272 elements not displayed */ )
Functions ¶
func Create ¶
func Create(ctx context.Context, s *Schema, tables []*schema.Table, opts ...schema.MigrateOption) error
Create creates all table resources using the given schema driver.
Types ¶
type Schema ¶
type Schema struct {
// contains filtered or unexported fields
}
Schema is the API for creating, migrating and dropping a schema.
func (*Schema) Diff ¶
Diff creates a migration file containing the statements to resolve the diff between the Ent schema and the connected database.
func (*Schema) NamedDiff ¶
NamedDiff creates a named migration file containing the statements to resolve the diff between the Ent schema and the connected database.
Click to show internal directories.
Click to hide internal directories.