feat: scaffold holiday booking project
This commit is contained in:
31
prisma/seed.ts
Normal file
31
prisma/seed.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
async function main() {
|
||||
const existing = await prisma.siteSettings.findFirst();
|
||||
|
||||
if (existing) {
|
||||
return;
|
||||
}
|
||||
|
||||
await prisma.siteSettings.create({
|
||||
data: {
|
||||
businessName: 'Holiday Property Booking',
|
||||
tagline: 'Curated stays, clear availability, and a direct booking flow.',
|
||||
contactEmail: 'hello@example.com',
|
||||
defaultSeoTitle: 'Holiday Property Booking',
|
||||
defaultSeoDescription: 'Book holiday properties with live availability, clear pricing, and secure checkout.',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
main()
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
process.exitCode = 1;
|
||||
})
|
||||
.finally(async () => {
|
||||
await prisma.$disconnect();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user