feat: Full petmaster CRM with NestJS API and React frontend
- Client management (CRUD with JSONB custom fields) - Pet profiles - Service catalog with per-client pricing - Booking calendar with recurring appointments - Invoicing with Stripe integration - Real-time messaging (WebSocket) - Self-booking portal - Staff assignment - Docker multi-stage builds - Prisma schema + seed
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
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();
|
||||
});
|
||||
Reference in New Issue
Block a user