ec-nest/prisma/seed-catalog.ts
liuyun 198517bde4 feat(c0): 长护服务菜单组 + 目录 seed 骨架
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 12:42:53 +08:00

18 lines
795 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { PrismaClient } from '@prisma/client';
export async function seedCatalog(prisma: PrismaClient): Promise<void> {
// loc_config 骨架(昆明 + 占位州市)
await prisma.locConfig.upsert({
where: { locCode: '530100' },
update: { locName: '昆明市', svcSource: 'local' },
create: { locCode: '530100', locName: '昆明市', svcSource: 'local' },
});
// L1/L2/L3 目录项:C0 先落结构 + 少量样例(如「协助翻身叩背排痰」),
// 全量 36/45 项数据在 C1 上线前由运营导入(字段结构已就绪)。
await prisma.svcNational.upsert({
where: { natCode: 'L0000106010010000' },
update: {},
create: { natCode: 'L0000106010010000', natName: '协助翻身叩背排痰', natCategory: 'life', isMedical: false },
});
}