refactor: 退役运行时视觉模块并泛化模板门禁

This commit is contained in:
que01 committed 2026-09-26 22:30:26 +08:00
1 parent 25d1fe983c
commit e2e2340bfe
56 files changed
+290 -1037

No files matched your search

-20
View File
@@ -702,26 +702,6 @@ async function ensureRuntimeContent(brandId: string, template: RuntimeSeedTempla
data: { isEnabled: false },
});
}
const moduleDefinitions = [
["founder-card", "主理人介绍"],
["brand-hero", "品牌首屏"],
["trust-proof", "信任与案例"],
["offering-list", "业务提供项"],
["inquiry", "咨询入口"],
] as const;
for (const [sortOrder, [type, title]] of moduleDefinitions.entries()) {
const existing = await prisma.brandModule.findFirst({ where: { brandId, type } });
if (existing) {
await prisma.brandModule.update({
where: { id: existing.id },
data: { isEnabled: true, sortOrder, title },
});
} else {
await prisma.brandModule.create({
data: { brandId, type, title, sortOrder, source: "seed", isEnabled: true },
});
}
}
const incompleteOfferings = await prisma.offering.findMany({
where: { brandId, isEnabled: true, coverUrl: null },
select: { id: true, name: true },