feat: persist candidate questionnaires and enforce company quotas

This commit is contained in:
TakuyaYagam1 committed 2026-10-07 15:47:10 +03:00
1 parent 73c7caa225
commit 3a61a8e8bb
51 files changed
+6280 -38

No files matched your search

@@ -39,12 +39,16 @@ var (
// organizationTables are emptied together: memberships reference both
// users and organizations. Creation snapshots reference idempotency records.
organizationTables = []pgx.Identifier{
{"company_invitation_quota_usage"}, {"company_card_view_quota_usage"},
organizationCreationResultsTable, membershipsTable, organizationRepresentativesTable, organizationsTable,
}
candidateQuestionnaireTables = []pgx.Identifier{
{"candidate_questionnaire_specializations"}, {"candidate_questionnaires"},
}
// usersDependentTables is every table that references users, directly or
// through another table of the list. A TRUNCATE of users must name all of
// them, so a migration that adds such a table adds it here.
usersDependentTables = slices.Concat(identityTables, deliveryTables, consentTables, organizationTables, candidateProfileTables, candidatePrivacyTables)
usersDependentTables = slices.Concat(identityTables, deliveryTables, consentTables, organizationTables, candidateProfileTables, candidateQuestionnaireTables, candidatePrivacyTables)
)
// organizationFixture works on the bootstrap database. The tables are