feat: WC2026 赛事 seed、生产上线初始化脚本与目录归档
重构 seed 为 WC2026 72 场小组赛与 48 强优胜盘;新增 production 模式仅保留 admin 与赛事示例;提供 prod-init-db 全量重置脚本;管理端 i18n 分包与赛事归档能力。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -64,7 +64,7 @@ export async function syncWc2026OutrightMarket(
|
||||
const forceCanonical = options.forceCanonical ?? false;
|
||||
const league = await prisma.league.findUnique({ where: { code: WC2026_LEAGUE_CODE } });
|
||||
if (!league) {
|
||||
throw new Error(`League ${WC2026_LEAGUE_CODE} not found — run seedSportsDemo first`);
|
||||
throw new Error(`League ${WC2026_LEAGUE_CODE} not found — run seedCatalog first`);
|
||||
}
|
||||
|
||||
const placeholder = await upsertTeam(prisma, {
|
||||
@@ -96,10 +96,14 @@ export async function syncWc2026OutrightMarket(
|
||||
displayOrder: 0,
|
||||
},
|
||||
});
|
||||
} else if (match.status === 'DRAFT') {
|
||||
} else if (match.status === 'DRAFT' || match.status === 'SETTLED' || match.status === 'CLOSED') {
|
||||
match = await prisma.match.update({
|
||||
where: { id: match.id },
|
||||
data: { status: 'PUBLISHED', publishTime: match.publishTime ?? new Date() },
|
||||
data: {
|
||||
status: 'PUBLISHED',
|
||||
publishTime: match.publishTime ?? new Date(),
|
||||
closeTime: null,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user