import { PrismaClient } from '@prisma/client';

const prisma = new PrismaClient();

async function main() {
  console.log('Seeding testimonials...');

  const testimonials = [
    {
      id: 'testimonial-1',
      name: 'Sarah Mitchell',
      company: 'TechVentures Inc.',
      role: 'CEO',
      content: 'Alpha CPA transformed our chaotic books into a clear financial picture. Their tax preparation saved us over $30K last year. The attention to detail and proactive communication set them apart from any accounting firm we have worked with.',
      rating: 5,
    },
    {
      id: 'testimonial-2',
      name: 'James Patterson',
      company: 'Harbor Restaurants',
      role: 'Owner',
      content: 'The payroll services are seamless. Our employees are always paid on time, and all the tax withholdings are handled perfectly. A real lifesaver for our multi-location restaurant business.',
      rating: 5,
    },
    {
      id: 'testimonial-3',
      name: 'Michelle Kim',
      company: 'Design Studio Co.',
      role: 'Founder',
      content: 'As a small business owner, I was overwhelmed by sales tax compliance across multiple states. Alpha CPA made it effortless. Their team is responsive, knowledgeable, and truly cares about our success.',
      rating: 5,
    },
    {
      id: 'testimonial-4',
      name: 'Robert Chen',
      company: 'Chen Manufacturing',
      role: 'CFO',
      content: 'We switched to Alpha CPA for our bookkeeping needs and have never looked back. Monthly financial statements are delivered on time, and their QuickBooks expertise has streamlined our entire accounting workflow.',
      rating: 5,
    },
    {
      id: 'testimonial-5',
      name: 'Lisa Fernandez',
      company: 'Suncoast Realty Group',
      role: 'Managing Partner',
      content: 'Their tax planning strategies have saved our real estate group hundreds of thousands in taxes over the past three years. The team understands complex business structures and always finds opportunities for optimization.',
      rating: 5,
    },
    {
      id: 'testimonial-6',
      name: 'David Thompson',
      company: 'Thompson & Associates',
      role: 'Attorney',
      content: 'I recommend Alpha CPA to all my clients who need reliable accounting services. Their professionalism, accuracy, and client-first approach make them the gold standard in CPA services.',
      rating: 5,
    },
  ];

  for (const t of testimonials) {
    await prisma.testimonial.upsert({
      where: { id: t.id },
      update: {
        name: t.name,
        company: t.company,
        role: t.role,
        content: t.content,
        rating: t.rating,
      },
      create: t,
    });
  }

  console.log('Seeding complete!');
}

main()
  .catch((e: any) => {
    console.error(e);
    process.exit(1);
  })
  .finally(async () => {
    await prisma.$disconnect();
  });
