Files

33 lines
1.1 KiB
TypeScript
Raw Permalink Normal View History

import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
// Create default services
const services = [
{ name: 'Full Groom', description: 'Complete bath, haircut, nail trim', duration: 90, basePrice: 75 },
{ name: 'Bath & Brush', description: 'Thorough bath with brushing', duration: 45, basePrice: 45 },
{ name: 'Nail Trim', description: 'Quick nail clipping', duration: 15, basePrice: 15 },
{ name: 'Dog Walking', description: '30 minute supervised walk', duration: 30, basePrice: 25 },
{ name: 'Boarding (Standard)', description: 'Overnight boarding with feeding', duration: 1440, basePrice: 55 },
{ name: 'Drop-in Visit', description: '20 min play/walk visit', duration: 20, basePrice: 30 },
];
for (const svc of services) {
await prisma.service.upsert({
where: { name: svc.name },
update: svc,
create: svc,
});
}
console.log('Seed completed: default services created');
}
main().catch((e) => {
console.error(e);
process.exit(1);
}).finally(async () => {
await prisma.$disconnect();
});