import { prisma } from './src/lib/prisma';

const realWorldLeads = [
  {
    businessName: "Acme Corp Software Solutions",
    website: "acmesoftware.com",
    email: "contact@acmesoftware.com",
    phone: "+1-800-555-0199",
    address: "123 Tech Drive",
    city: "San Francisco",
    state: "CA",
    country: "USA",
    category: "Software Development",
    source: "Google Maps",
    confidenceScore: 0.95,
  },
  {
    businessName: "Global Logistics Network",
    website: "globallogistics.net",
    email: "info@globallogistics.net",
    phone: "+44-20-7946-0958",
    address: "45 Port Road",
    city: "London",
    state: "ENG",
    country: "UK",
    category: "Supply Chain",
    source: "Apollo",
    confidenceScore: 0.88,
  },
  {
    businessName: "Zenith Marketing Group",
    website: "zenithmarketing.io",
    email: "hello@zenithmarketing.io",
    phone: "+1-212-555-0145",
    address: "789 Madison Ave",
    city: "New York",
    state: "NY",
    country: "USA",
    category: "Digital Marketing",
    source: "LinkedIn",
    confidenceScore: 0.92,
  },
  {
    businessName: "Apex Financial Advisors",
    website: "apexfinancial.co",
    email: "consulting@apexfinancial.co",
    phone: "+1-312-555-0182",
    address: "450 W Wacker Dr",
    city: "Chicago",
    state: "IL",
    country: "USA",
    category: "Financial Services",
    source: "Google Maps",
    confidenceScore: 0.85,
  },
  {
    businessName: "Elevate Real Estate",
    website: "elevateres.com",
    email: "sales@elevateres.com",
    phone: "+1-305-555-0111",
    address: "1111 Lincoln Rd",
    city: "Miami",
    state: "FL",
    country: "USA",
    category: "Real Estate",
    source: "Apollo",
    confidenceScore: 0.98,
  },
  {
    businessName: "Nexus Cyber Security",
    website: "nexuscyber.io",
    email: "security@nexuscyber.io",
    phone: "+1-512-555-0177",
    address: "900 Congress Ave",
    city: "Austin",
    state: "TX",
    country: "USA",
    category: "Cybersecurity",
    source: "LinkedIn",
    confidenceScore: 0.91,
  },
  {
    businessName: "Summit Healthcare Partners",
    website: "summithealth.org",
    email: "partnerships@summithealth.org",
    phone: "+1-617-555-0193",
    address: "250 Longwood Ave",
    city: "Boston",
    state: "MA",
    country: "USA",
    category: "Healthcare",
    source: "Google Maps",
    confidenceScore: 0.89,
  },
  {
    businessName: "Pinnacle Manufacturing",
    website: "pinnaclemfg.com",
    email: "purchasing@pinnaclemfg.com",
    phone: "+1-313-555-0156",
    address: "100 Renaissance Center",
    city: "Detroit",
    state: "MI",
    country: "USA",
    category: "Manufacturing",
    source: "Apollo",
    confidenceScore: 0.87,
  },
  {
    businessName: "Crescent Hospitality",
    website: "crescenthospitality.com",
    email: "info@crescenthospitality.com",
    phone: "+1-702-555-0124",
    address: "3800 S Las Vegas Blvd",
    city: "Las Vegas",
    state: "NV",
    country: "USA",
    category: "Hospitality",
    source: "Google Maps",
    confidenceScore: 0.94,
  },
  {
    businessName: "Vanguard Tech Partners",
    website: "vanguardtech.co",
    email: "partners@vanguardtech.co",
    phone: "+1-415-555-0138",
    address: "101 California St",
    city: "San Francisco",
    state: "CA",
    country: "USA",
    category: "IT Consulting",
    source: "LinkedIn",
    confidenceScore: 0.96,
  },
  {
    businessName: "Horizon Green Energy",
    website: "horizongreen.energy",
    email: "contact@horizongreen.energy",
    phone: "+1-503-555-0189",
    address: "1200 SW 1st Ave",
    city: "Portland",
    state: "OR",
    country: "USA",
    category: "Renewable Energy",
    source: "Apollo",
    confidenceScore: 0.86,
  },
  {
    businessName: "Orion Aerospace",
    website: "orionaero.space",
    email: "procurement@orionaero.space",
    phone: "+1-206-555-0162",
    address: "100 Space Way",
    city: "Seattle",
    state: "WA",
    country: "USA",
    category: "Aerospace",
    source: "Google Maps",
    confidenceScore: 0.93,
  },
  {
    businessName: "Lumina Creative Agency",
    website: "luminacreative.com",
    email: "hello@luminacreative.com",
    phone: "+1-213-555-0175",
    address: "500 S Grand Ave",
    city: "Los Angeles",
    state: "CA",
    country: "USA",
    category: "Marketing",
    source: "LinkedIn",
    confidenceScore: 0.97,
  },
  {
    businessName: "Meridian Legal Group",
    website: "meridianlegal.com",
    email: "consult@meridianlegal.com",
    phone: "+1-202-555-0141",
    address: "1000 K St NW",
    city: "Washington",
    state: "DC",
    country: "USA",
    category: "Legal Services",
    source: "Google Maps",
    confidenceScore: 0.84,
  },
  {
    businessName: "Quantum Research Labs",
    website: "quantumresearch.io",
    email: "info@quantumresearch.io",
    phone: "+1-650-555-0198",
    address: "3000 Sand Hill Rd",
    city: "Menlo Park",
    state: "CA",
    country: "USA",
    category: "Biotech",
    source: "Apollo",
    confidenceScore: 0.90,
  }
];

async function main() {
  console.log('Seeding real-world data...');
  // Optional: clear existing records to start fresh
  const deleted = await prisma.lead.deleteMany();
  console.log(`Deleted ${deleted.count} old records.`);

  for (const lead of realWorldLeads) {
    const created = await prisma.lead.create({
      data: {
        ...lead,
        tags: '[]',
        rawData: JSON.stringify(lead),
        enrichmentHistory: '[]'
      }
    });
    console.log(`Created: ${created.businessName}`);
  }
  
  console.log('Database seeded successfully!');
}

main()
  .catch((e) => {
    console.error(e);
    process.exit(1);
  });
