const { PrismaClient } = require('@prisma/client'); const prisma = new PrismaClient(); const sampleTemplates = [ { name: "Welcome Email", value: "welcome_email", description: "Welcome email for new users", subject: "Welcome to our platform!", preheader: "Get started with your new account", email_content: `
Thank you for joining our platform. We're excited to have you aboard!
Here are some things you can do to get started:
If you have any questions, feel free to reach out to our support team.
Best regards,
The Team
Hi {{user_name}},
You recently requested to reset your password. Click the button below to proceed:
If you didn't request this, please ignore this email.
This link will expire in 24 hours.
`, category: "security", channels: ["email"], status: "Active", version: "1.0", is_personal: false, from_name: "Security Team", reply_to: "security@example.com", track_opens: true, variables: [ { name: "user_name", description: "User's full name", required: true }, { name: "reset_url", description: "Password reset URL", required: true } ], is_active: true, created_by: "system", updated_by: "system" }, { name: "Order Confirmation", value: "order_confirmation", description: "Order confirmation notification", subject: "Order Confirmed - {{order_number}}", preheader: "Your order has been confirmed", email_content: `Hi {{customer_name}},
Your order {{order_number}} has been confirmed!
Order Total: {{order_total}}
Estimated delivery: {{delivery_date}}
You can track your order status in your account dashboard.
Thank you for your business!
`, push_title: "Order Confirmed!", push_body: "Your order {{order_number}} has been confirmed and is being processed.", category: "orders", channels: ["email", "push"], status: "Active", version: "1.0", is_personal: false, from_name: "Orders Team", reply_to: "orders@example.com", track_opens: true, variables: [ { name: "customer_name", description: "Customer's name", required: true }, { name: "order_number", description: "Order number", required: true }, { name: "order_total", description: "Order total amount", required: true }, { name: "delivery_date", description: "Estimated delivery date", required: true } ], is_active: true, created_by: "system", updated_by: "system" }, { name: "Marketing Newsletter", value: "marketing_newsletter", description: "Monthly marketing newsletter", subject: "{{newsletter_title}} - Don't miss out!", preheader: "Exclusive offers and updates inside", email_content: `Hi {{subscriber_name}},
Here are this month's highlights:
Don't forget to follow us on social media for daily updates!
Best regards,
Marketing Team