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

+1 -4
View File
@@ -19,7 +19,6 @@ export interface BrandReleaseSnapshot {
templatePackageManifest?: ReturnType<typeof getTemplatePackageManifestForVisualKey> | null;
brand: Record<string, unknown> | null;
installation: Record<string, unknown> | null;
modules: unknown[];
fields: unknown[];
offerings: unknown[];
forms: unknown[];
@@ -31,14 +30,13 @@ export async function buildBrandReleaseSnapshot(
database: Prisma.TransactionClient,
brandId: string,
): Promise<BrandReleaseSnapshot> {
const [brand, installation, modules, fields, offerings, forms, trustContents, capabilities] =
const [brand, installation, fields, offerings, forms, trustContents, capabilities] =
await Promise.all([
database.brandProfile.findUnique({ where: { id: brandId } }),
database.brandTemplateInstallation.findFirst({
where: { brandId },
orderBy: { updatedAt: "desc" },
}),
database.brandModule.findMany({ where: { brandId }, orderBy: { sortOrder: "asc" } }),
database.brandFieldDefinition.findMany({ where: { brandId }, orderBy: { sortOrder: "asc" } }),
database.offering.findMany({ where: { brandId }, orderBy: { sortOrder: "asc" } }),
database.inquiryForm.findMany({ where: { brandId }, orderBy: { updatedAt: "desc" } }),
@@ -66,7 +64,6 @@ export async function buildBrandReleaseSnapshot(
templatePackageManifest: getTemplatePackageManifestForVisualKey(visualKey) ?? null,
brand: brand ? jsonObject(brand) : null,
installation: installation ? jsonObject(installation) : null,
modules: modules.map((item) => jsonObject(item)),
fields: fields.map((item) => jsonObject(item)),
offerings: offerings.map((item) => jsonObject(item)),
forms: forms.map((item) => jsonObject(item)),