import { DataSource } from 'typeorm';

const tableName = 'person';

export const seedPeople = async (
  workspaceDataSource: DataSource,
  schemaName: string,
) => {
  await workspaceDataSource
    .createQueryBuilder()
    .insert()
    .into(`${schemaName}.${tableName}`, [
      'id',
      'firstName',
      'lastName',
      'phone',
      'city',
      'companyId',
      'email',
    ])
    .orIgnore()
    .values([
      {
        id: '86083141-1c0e-494c-a1b6-85b1c6fefaa5',
        firstName: 'Christoph',
        lastName: 'Callisto',
        phone: '+33789012345',
        city: 'Seattle',
        companyId: 'fe256b39-3ec3-4fe3-8997-b76aa0bfa408',
        email: 'christoph.calisto@linkedin.com',
      },
      {
        id: '0aa00beb-ac73-4797-824e-87a1f5aea9e0',
        firstName: 'Sylvie',
        lastName: 'Palmer',
        phone: '+33780123456',
        city: 'Los Angeles',
        companyId: 'fe256b39-3ec3-4fe3-8997-b76aa0bfa408',
        email: 'sylvie.palmer@linkedin.com',
      },
      {
        id: '93c72d2e-f517-42fd-80ae-14173b3b70ae',
        firstName: 'Christopher',
        lastName: 'Gonzalez',
        phone: '+33789012345',
        city: 'Seattle',
        companyId: '118995f3-5d81-46d6-bf83-f7fd33ea6102',
        email: 'christopher.gonzalez@qonto.com',
      },
      {
        id: 'eeeacacf-eee1-4690-ad2c-8619e5b56a2e',
        firstName: 'Ashley',
        lastName: 'Parker',
        phone: '+33780123456',
        city: 'Los Angeles',
        companyId: '118995f3-5d81-46d6-bf83-f7fd33ea6102',
        email: 'ashley.parker@qonto.com',
      },
      {
        id: '9b324a88-6784-4449-afdf-dc62cb8702f2',
        firstName: 'Nicholas',
        lastName: 'Wright',
        phone: '+33781234567',
        city: 'Seattle',
        companyId: '460b6fb1-ed89-413a-b31a-962986e67bb4',
        email: 'nicholas.wright@microsoft.com',
      },
      {
        id: '1d151852-490f-4466-8391-733cfd66a0c8',
        firstName: 'Isabella',
        lastName: 'Scott',
        phone: '+33782345678',
        city: 'New York',
        companyId: '460b6fb1-ed89-413a-b31a-962986e67bb4',
        email: 'isabella.scott@microsoft.com',
      },
      {
        id: '98406e26-80f1-4dff-b570-a74942528de3',
        firstName: 'Matthew',
        lastName: 'Green',
        phone: '+33783456789',
        city: 'Seattle',
        companyId: '460b6fb1-ed89-413a-b31a-962986e67bb4',
        email: 'matthew.green@microsoft.com',
      },
      {
        id: 'a2e78a5f-338b-46df-8811-fa08c7d19d35',
        firstName: 'Elizabeth',
        lastName: 'Baker',
        phone: '+33784567890',
        city: 'New York',
        companyId: '0d940997-c21e-4ec2-873b-de4264d89025',
        email: 'elizabeth.baker@airbnb.com',
      },
      {
        id: 'ca1f5bf3-64ad-4b0e-bbfd-e9fd795b7016',
        firstName: 'Christopher',
        lastName: 'Nelson',
        phone: '+33785678901',
        city: 'San Francisco',
        companyId: '0d940997-c21e-4ec2-873b-de4264d89025',
        email: 'christopher.nelson@airbnb.com',
      },
      {
        id: '56955422-5d54-41b7-ba36-f0d20e1417ae',
        firstName: 'Avery',
        lastName: 'Carter',
        phone: '+33786789012',
        city: 'New York',
        companyId: '0d940997-c21e-4ec2-873b-de4264d89025',
        email: 'avery.carter@airbnb.com',
      },
      {
        id: '755035db-623d-41fe-92e7-dd45b7c568e1',
        firstName: 'Ethan',
        lastName: 'Mitchell',
        phone: '+33787890123',
        city: 'Los Angeles',
        companyId: '0d940997-c21e-4ec2-873b-de4264d89025',
        email: 'ethan.mitchell@google.com',
      },
      {
        id: '240da2ec-2d40-4e49-8df4-9c6a049190ef',
        firstName: 'Madison',
        lastName: 'Perez',
        phone: '+33788901234',
        city: 'Seattle',
        companyId: '0d940997-c21e-4ec2-873b-de4264d89025',
        email: 'madison.perez@google.com',
      },
      {
        id: '240da2ec-2d40-4e49-8df4-9c6a049190df',
        firstName: 'Bertrand',
        lastName: 'Voulzy',
        phone: '+33788901234',
        city: 'Seattle',
        companyId: '0d940997-c21e-4ec2-873b-de4264d89025',
        email: 'bertrand.voulzy@google.com',
      },
      {
        id: '240da2ec-2d40-4e49-8df4-9c6a049191de',
        firstName: 'Louis',
        lastName: 'Duss',
        phone: '+33788901234',
        city: 'Seattle',
        companyId: 'a7bc68d5-f79e-40dd-bd06-c36e6abb4678',
        email: 'louis.duss@google.com',
      },
      {
        id: '240da2ec-2d40-4e49-8df4-9c6a049191df',
        firstName: 'Lorie',
        lastName: 'Vladim',
        phone: '+33788901235',
        city: 'Seattle',
        companyId: 'a674fa6c-1455-4c57-afaf-dd5dc086361d',
        email: 'lorie.vladim@google.com',
      },
    ])
    .execute();
};
