diff --git a/prisma/seed.ts b/prisma/seed.ts index d66611b..ce1d287 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -18,7 +18,49 @@ import { AdvancementRuleType, } from '@prisma/client' import bcrypt from 'bcryptjs' -import { defaultRoundConfig } from '../src/types/competition-configs' +// Inline default configs so seed has ZERO dependency on src/ (not available in Docker prod image) +function defaultRoundConfig(roundType: RoundType): Record { + const defaults: Record Record> = { + INTAKE: () => ({ + allowDrafts: true, draftExpiryDays: 30, + acceptedCategories: ['STARTUP', 'BUSINESS_CONCEPT'], + maxFileSizeMB: 50, maxFilesPerSlot: 1, allowedMimeTypes: ['application/pdf'], + lateSubmissionNotification: true, publicFormEnabled: false, customFields: [], + }), + FILTERING: () => ({ + rules: [], aiScreeningEnabled: true, manualReviewEnabled: true, + aiConfidenceThresholds: { high: 0.85, medium: 0.6, low: 0.4 }, + autoAdvanceEligible: false, duplicateDetectionEnabled: true, batchSize: 20, + }), + EVALUATION: () => ({ + requiredReviewsPerProject: 3, scoringMode: 'criteria', requireFeedback: true, + feedbackMinLength: 0, requireAllCriteriaScored: true, coiRequired: true, + peerReviewEnabled: false, anonymizationLevel: 'fully_anonymous', + aiSummaryEnabled: false, generateAiShortlist: false, advancementMode: 'admin_selection', + }), + SUBMISSION: () => ({ + eligibleStatuses: ['PASSED'], notifyEligibleTeams: true, lockPreviousWindows: true, + }), + MENTORING: () => ({ + eligibility: 'requested_only', chatEnabled: true, fileUploadEnabled: true, + fileCommentsEnabled: true, filePromotionEnabled: true, autoAssignMentors: false, + }), + LIVE_FINAL: () => ({ + juryVotingEnabled: true, votingMode: 'simple', audienceVotingEnabled: false, + audienceVoteWeight: 0, audienceVotingMode: 'per_project', audienceMaxFavorites: 3, + audienceRequireIdentification: false, audienceRevealTiming: 'at_deliberation', + deliberationEnabled: false, deliberationDurationMinutes: 30, showAudienceVotesToJury: false, + presentationOrderMode: 'manual', presentationDurationMinutes: 15, qaDurationMinutes: 5, + revealPolicy: 'ceremony', + }), + DELIBERATION: () => ({ + juryGroupId: 'PLACEHOLDER', mode: 'SINGLE_WINNER_VOTE', + showCollectiveRankings: false, showPriorJuryData: false, + tieBreakMethod: 'ADMIN_DECIDES', votingDuration: 60, topN: 3, allowAdminOverride: true, + }), + } + return defaults[roundType]() +} import { readFileSync } from 'fs' import { parse } from 'csv-parse/sync' import { join, dirname } from 'path'