18 lines
518 B
TypeScript
18 lines
518 B
TypeScript
import { PrismaClient, ProductStatus } from '@prisma/client';
|
|||
|
|
|
||
|
|
export async function seedProducts(prisma: PrismaClient): Promise<void> {
|
||
|
|
// eslint-disable-next-line no-console
|
||
|
|
console.log(' -> Seeding baseline products...');
|
||
|
|
|
||
|
|
await prisma.product.upsert({
|
||
|
|
where: { code: 'CORE_PLATFORM' },
|
||
|
|
update: {},
|
||
|
|
create: {
|
||
|
|
code: 'CORE_PLATFORM',
|
||
|
|
name: 'Core SupportHub Platform',
|
||
|
|
description: 'Main enterprise ticketing and support engine',
|
||
|
|
status: ProductStatus.ACTIVE,
|
||
|
|
},
|
||
|
|
});
|
||
|
|
}
|