Add seeds and move to uuid (#80)

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Charles Bochet 2023-04-26 16:42:01 +02:00 committed by GitHub
parent 5aec7ca730
commit 6c7eb53333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 523 additions and 5935 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -39,11 +39,12 @@ const StyledEditable = styled.div`
left: -1px;
width: calc(100% + 2px);
height: calc(100% + 2px);
border: 1px solid ${(props) => props.theme.blue};
border: 1px solid ${(props) => props.theme.text20};
border-radius: 4px;
pointer-events: none;
display: block;
z-index: 1;
box-shadow: 0px 3px 12px rgba(0, 0, 0, 0.09);
}
`;

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
export interface Company {
id: number;
id: string;
name: string;
domain: string;
domain_name: string;
}

View File

@ -3,7 +3,7 @@ import { mapGqlPerson, mapPerson } from './person.interface';
describe('mapPerson', () => {
it('should map person', () => {
const person = mapPerson({
id: 1,
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b',
firstname: 'John',
lastname: 'Doe',
email: '',
@ -12,9 +12,9 @@ describe('mapPerson', () => {
created_at: '',
company: {
__typename: '',
id: 1,
company_name: '',
company_domain: '',
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b',
name: '',
domain_name: '',
},
__typename: '',
});
@ -23,19 +23,19 @@ describe('mapPerson', () => {
it('should map person back', () => {
const person = mapGqlPerson({
id: 1,
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b',
fullName: 'John Doe',
email: '',
phone: '',
city: '',
company: {
id: 1,
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b',
name: '',
domain: '',
domain_name: '',
},
creationDate: new Date(),
pipe: {
id: 3,
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6c',
name: '',
icon: '',
},

View File

@ -2,7 +2,7 @@ import { Company } from './company.interface';
import { Pipe } from './pipe.interface';
export type Person = {
id: number;
id: string;
fullName: string;
picture?: string;
email: string;
@ -18,14 +18,14 @@ export type GraphqlQueryPerson = {
city: string;
company: {
__typename: string;
id: number;
company_name: string;
company_domain: string;
id: string;
name: string;
domain_name: string;
};
created_at: string;
email: string;
firstname: string;
id: number;
id: string;
lastname: string;
phone: string;
__typename: string;
@ -33,11 +33,11 @@ export type GraphqlQueryPerson = {
export type GraphqlMutationPerson = {
city: string;
company_id?: number;
company_id?: string;
created_at: string;
email: string;
firstname: string;
id: number;
id: string;
lastname: string;
phone: string;
__typename: string;
@ -46,12 +46,16 @@ export type GraphqlMutationPerson = {
export const mapPerson = (person: GraphqlQueryPerson): Person => ({
fullName: `${person.firstname} ${person.lastname}`,
creationDate: new Date(person.created_at),
pipe: { name: 'coucou', id: 1, icon: '💰' },
pipe: {
name: 'coucou',
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b',
icon: '💰',
},
...person,
company: {
id: person.company.id,
name: person.company.company_name,
domain: person.company.company_domain,
name: person.company.name,
domain_name: person.company.domain_name,
},
countryCode: 'FR',
});

View File

@ -1,5 +1,5 @@
export interface Pipe {
id: number;
id: string;
name: string;
icon: string;
}

View File

@ -1,5 +1,5 @@
export interface User {
id: number;
id: string;
email: string;
first_name: string;
last_name: string;

View File

@ -1,5 +1,5 @@
export interface Workspace {
id: number;
id: string;
name: string;
logo: string;
}

File diff suppressed because one or more lines are too long

View File

@ -2,15 +2,15 @@ import { GraphqlQueryPerson } from '../../interfaces/person.interface';
export const defaultData: Array<GraphqlQueryPerson> = [
{
id: 1,
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b',
__typename: 'Person',
firstname: 'Alexandre',
lastname: 'Prot',
email: 'alexandre@qonto.com',
company: {
id: 1,
company_name: 'Qonto',
company_domain: 'qonto.com',
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6c',
name: 'Qonto',
domain_name: 'qonto.com',
__typename: 'Company',
},
phone: '06 12 34 56 78',
@ -19,15 +19,15 @@ export const defaultData: Array<GraphqlQueryPerson> = [
city: 'Paris',
},
{
id: 2,
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6d',
__typename: 'Person',
firstname: 'Alexandre',
lastname: 'Prot',
email: 'alexandre@qonto.com',
company: {
id: 1,
company_name: 'LinkedIn',
company_domain: 'linkedin.com',
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6e',
name: 'LinkedIn',
domain_name: 'linkedin.com',
__typename: 'Company',
},
phone: '06 12 34 56 78',
@ -36,15 +36,15 @@ export const defaultData: Array<GraphqlQueryPerson> = [
city: 'Paris',
},
{
id: 3,
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6f',
__typename: 'Person',
firstname: 'Alexandre',
lastname: 'Prot',
email: 'alexandre@qonto.com',
company: {
id: 1,
company_name: 'Sequoia',
company_domain: 'sequoiacap.com',
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6g',
name: 'Sequoia',
domain_name: 'sequoiacap.com',
__typename: 'Company',
},
phone: '06 12 34 56 78',
@ -54,15 +54,15 @@ export const defaultData: Array<GraphqlQueryPerson> = [
},
{
id: 4,
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6h',
__typename: 'Person',
firstname: 'Alexandre',
lastname: 'Prot',
email: 'alexandre@qonto.com',
company: {
id: 1,
company_name: 'Facebook',
company_domain: 'facebook.com',
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6i',
name: 'Facebook',
domain_name: 'facebook.com',
__typename: 'Company',
},
phone: '06 12 34 56 78',

View File

@ -112,7 +112,7 @@ export const peopleColumns = [
<ClickableCell href="#">
<CompanyChip
name={props.row.original.company.name}
picture={`https://www.google.com/s2/favicons?domain=${props.row.original.company.domain}&sz=256`}
picture={`https://www.google.com/s2/favicons?domain=${props.row.original.company.domain_name}&sz=256`}
/>
</ClickableCell>
),

View File

@ -24,16 +24,16 @@ jest.mock('../../../apollo', () => {
it('updates a person', async () => {
const result = await updatePerson({
fullName: 'John Doe',
id: 1,
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6c',
email: 'john@example.com',
company: {
id: 2,
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6b',
name: 'ACME',
domain: 'example.com',
domain_name: 'example.com',
},
phone: '+1 (555) 123-4567',
pipe: {
id: 3,
id: '7dfbc3f7-6e5e-4128-957e-8d86808cdf6d',
name: 'Customer',
icon: '!',
},

View File

@ -21,7 +21,7 @@ export const reduceSortsToOrderBy = (
acc['firstname'] = order;
acc['lastname'] = order;
} else if (id === 'company_name') {
acc['company'] = { company_name: order };
acc['company'] = { name: order };
} else {
acc[id] = order;
}
@ -42,8 +42,8 @@ export const GET_PEOPLE = gql`
created_at
company {
id
company_name
company_domain
name
domain_name
}
}
}

View File

@ -4,12 +4,12 @@ import { apiClient } from '../../apollo';
export const UPDATE_PERSON = gql`
mutation UpdatePeople(
$id: Int
$id: uuid
$firstname: String
$lastname: String
$phone: String
$city: String
$company_id: Int
$company_id: uuid
$email: String
) {
update_people(
@ -27,8 +27,8 @@ export const UPDATE_PERSON = gql`
returning {
city
company {
company_domain
company_name
domain_name
name
id
}
email

View File

@ -91,6 +91,15 @@ object_relationships:
- name: defaultRoleByRole
using:
foreign_key_constraint_on: default_role
- name: workspace_member
using:
manual_configuration:
column_mapping:
id: user_id
insertion_order: null
remote_table:
name: workspace_members
schema: public
array_relationships:
- name: refreshTokens
using:
@ -120,13 +129,6 @@ array_relationships:
table:
name: user_providers
schema: auth
- name: workspace_member
using:
foreign_key_constraint_on:
column: user_id
table:
name: workspace_members
schema: public
event_triggers:
- name: user-created
definition:

View File

@ -1,41 +1,56 @@
table:
name: companies
schema: public
object_relationships:
- name: workspace
using:
foreign_key_constraint_on: workspace_id
insert_permissions:
- role: user
permission:
check: {}
check:
workspace_id:
_eq: x-hasura-workspace-id
columns:
- id
- workspace_id
- company_domain
- company_name
- name
- domain_name
- created_at
- updated_at
- deleted_at
select_permissions:
- role: user
permission:
columns:
- domain_name
- name
- created_at
- deleted_at
- updated_at
- id
- workspace_id
- company_domain
- company_name
- created_at
- updated_at
filter: {}
filter:
workspace_id:
_eq: x-hasura-workspace-id
update_permissions:
- role: user
permission:
columns:
- domain_name
- name
- created_at
- deleted_at
- updated_at
- id
- workspace_id
- company_domain
- company_name
- created_at
- updated_at
filter: {}
check: {}
filter:
workspace_id:
_eq: x-hasura-workspace-id
check: null
delete_permissions:
- role: user
permission:
filter: {}
filter:
workspace_id:
_eq: x-hasura-workspace-id

View File

@ -11,50 +11,61 @@ object_relationships:
insert_permissions:
- role: user
permission:
check: {}
check:
workspace_id:
_eq: x-hasura-workspace-id
columns:
- company_id
- id
- workspace_id
- city
- email
- firstname
- lastname
- phone
- created_at
- deleted_at
- updated_at
- company_id
- id
- workspace_id
select_permissions:
- role: user
permission:
columns:
- company_id
- id
- workspace_id
- city
- email
- firstname
- lastname
- phone
- created_at
- deleted_at
- updated_at
filter: {}
- company_id
- id
- workspace_id
filter:
workspace_id:
_eq: x-hasura-workspace-id
update_permissions:
- role: user
permission:
columns:
- company_id
- id
- workspace_id
- city
- email
- firstname
- lastname
- phone
- created_at
- deleted_at
- updated_at
filter: {}
check: {}
- company_id
- id
- workspace_id
filter:
workspace_id:
_eq: x-hasura-workspace-id
check: null
delete_permissions:
- role: user
permission:
filter: {}
filter:
workspace_id:
_eq: x-hasura-workspace-id

View File

@ -1,3 +1,7 @@
table:
name: workspace_members
schema: public
object_relationships:
- name: workspace
using:
foreign_key_constraint_on: workspace_id

View File

@ -0,0 +1,3 @@
-- No down migration

View File

@ -0,0 +1,5 @@
DROP table "public"."people";
DROP table "public"."companies";
DROP table "public"."workspace_members";
DROP table "public"."workspaces";

View File

@ -0,0 +1 @@
DROP TABLE "public"."workspaces";

View File

@ -0,0 +1,34 @@
CREATE TABLE "public"."workspaces" ("id" uuid NOT NULL, "domain_name" text NOT NULL, "display_name" text NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), "deleted_at" timestamptz, PRIMARY KEY ("id") , UNIQUE ("domain_name"), UNIQUE ("id"));
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."updated_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_workspaces_updated_at"
BEFORE UPDATE ON "public"."workspaces"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
COMMENT ON TRIGGER "set_public_workspaces_updated_at" ON "public"."workspaces"
IS 'trigger to set value of column "updated_at" to current timestamp on row update';
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_deleted_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."deleted_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_workspaces_deleted_at"
BEFORE UPDATE ON "public"."workspaces"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_deleted_at"();
COMMENT ON TRIGGER "set_public_workspaces_deleted_at" ON "public"."workspaces"
IS 'trigger to set value of column "deleted_at" to current timestamp on row update';

View File

@ -0,0 +1 @@
DROP TABLE "public"."workspace_members";

View File

@ -0,0 +1,17 @@
CREATE TABLE "public"."workspace_members" ("id" uuid NOT NULL, "workspace_id" uuid NOT NULL, "user_id" uuid NOT NULL, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), "deleted_at" timestamptz, PRIMARY KEY ("id") , FOREIGN KEY ("workspace_id") REFERENCES "public"."workspaces"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("id"));
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."updated_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_workspace_members_updated_at"
BEFORE UPDATE ON "public"."workspace_members"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
COMMENT ON TRIGGER "set_public_workspace_members_updated_at" ON "public"."workspace_members"
IS 'trigger to set value of column "updated_at" to current timestamp on row update';

View File

@ -0,0 +1 @@
DROP TABLE "public"."companies";

View File

@ -0,0 +1,17 @@
CREATE TABLE "public"."companies" ("id" uuid NOT NULL, "workspace_id" uuid NOT NULL, "name" text, "domain_name" text, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), "deleted_at" timestamptz DEFAULT now(), PRIMARY KEY ("id") , FOREIGN KEY ("workspace_id") REFERENCES "public"."workspaces"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("id"));
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."updated_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_companies_updated_at"
BEFORE UPDATE ON "public"."companies"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
COMMENT ON TRIGGER "set_public_companies_updated_at" ON "public"."companies"
IS 'trigger to set value of column "updated_at" to current timestamp on row update';

View File

@ -0,0 +1 @@
DROP TABLE "public"."people";

View File

@ -0,0 +1,34 @@
CREATE TABLE "public"."people" ("id" uuid NOT NULL, "workspace_id" uuid NOT NULL, "firstname" text, "lastname" text, "email" text, "phone" text, "city" text, "company_id" uuid, "created_at" timestamptz NOT NULL DEFAULT now(), "updated_at" timestamptz NOT NULL DEFAULT now(), "deleted_at" timestamptz, PRIMARY KEY ("id") , FOREIGN KEY ("workspace_id") REFERENCES "public"."workspaces"("id") ON UPDATE restrict ON DELETE restrict, FOREIGN KEY ("company_id") REFERENCES "public"."companies"("id") ON UPDATE restrict ON DELETE restrict, UNIQUE ("id"));
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_updated_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."updated_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_people_updated_at"
BEFORE UPDATE ON "public"."people"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_updated_at"();
COMMENT ON TRIGGER "set_public_people_updated_at" ON "public"."people"
IS 'trigger to set value of column "updated_at" to current timestamp on row update';
CREATE OR REPLACE FUNCTION "public"."set_current_timestamp_deleted_at"()
RETURNS TRIGGER AS $$
DECLARE
_new record;
BEGIN
_new := NEW;
_new."deleted_at" = NOW();
RETURN _new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER "set_public_people_deleted_at"
BEFORE UPDATE ON "public"."people"
FOR EACH ROW
EXECUTE PROCEDURE "public"."set_current_timestamp_deleted_at"();
COMMENT ON TRIGGER "set_public_people_deleted_at" ON "public"."people"
IS 'trigger to set value of column "deleted_at" to current timestamp on row update';

View File

@ -0,0 +1,27 @@
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('fe256b39-3ec3-4fe3-8997-b76aa0bfa408', 'Linkedin', 'linkedin.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('118995f3-5d81-46d6-bf83-f7fd33ea6102', 'Facebook', 'facebook.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:07:53.823422+00', '2023-04-26 10:07:53.823422+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('04b2e9f5-0713-40a5-8216-82802401d33e', 'Qonto', 'qonto.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:08:05.924319+00', '2023-04-26 10:08:05.924319+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('460b6fb1-ed89-413a-b31a-962986e67bb4', 'Microsoft', 'microsoft.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:08:50.960684+00', '2023-04-26 10:08:50.960684+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('89bb825c-171e-4bcc-9cf7-43448d6fb278', 'Airbnb', 'airbnb.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:08:54.724515+00', '2023-04-26 10:08:54.724515+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('0d940997-c21e-4ec2-873b-de4264d89025', 'Google', 'google.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:08:58.054814+00', '2023-04-26 10:08:58.054814+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('1d3a1c6e-707e-44dc-a1d2-30030bf1a944', 'Netflix', 'netflix.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:09:02.578364+00', '2023-04-26 10:09:02.578364+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('7a93d1e5-3f74-492d-a101-2a70f50a1645', 'Libeo', 'libeo.io', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:09:15.570408+00', '2023-04-26 10:09:15.570408+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('9d162de6-cfbf-4156-a790-e39854dcd4eb', 'Claap', 'claap.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:09:25.656555+00', '2023-04-26 10:09:25.656555+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('aaffcfbd-f86b-419f-b794-02319abe8637', 'Hasura', 'hasura.io', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:09:43.694113+00', '2023-04-26 10:09:43.694113+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('f33dc242-5518-4553-9433-42d8eb82834b', 'Wework', 'wework.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:10:02.737419+00', '2023-04-26 10:10:02.737419+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('a7bc68d5-f79e-40dd-bd06-c36e6abb4678', 'Samsung', 'samsung.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:10:15.396606+00', '2023-04-26 10:10:15.396606+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('a674fa6c-1455-4c57-afaf-dd5dc086361d', 'Algolia', 'algolia.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:10:32.530184+00', '2023-04-26 10:10:32.530184+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('c10b7dac-fcfc-4bf6-8eea-af497fbaaf42', 'Heroku', 'heroku.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:10:36.755503+00', '2023-04-26 10:10:36.755503+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('6672b0aa-fe9c-4651-85c7-07a35bd504a6', 'Shopify', 'shopify.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:11:47.124207+00', '2023-04-26 10:11:47.124207+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('6a6b78a6-94a3-4f6b-b519-91b138b75c3b', 'Zoom', 'zoom.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:11:56.224394+00', '2023-04-26 10:11:56.224394+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('b396e6b9-dc5c-4643-bcff-61b6cf7523ae', 'Aircall', 'aircall.io', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:12:42.33625+00', '2023-04-26 10:12:42.33625+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('72fb963e-d149-448a-928e-3bc9228c6454', 'Swile', 'swile.co', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:13:15.57356+00', '2023-04-26 10:13:15.57356+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('5c21e19e-e049-4393-8c09-3e3f8fb09ecb', 'BeReal', 'bereal.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:13:29.712485+00', '2023-04-26 10:13:29.712485+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('cd53b57b-1212-44a8-97b7-d772c5969cbf', 'Luko', 'luko.eu', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:13:41.510408+00', '2023-04-26 10:13:41.510408+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('294af8c8-9e08-4e52-b621-4da7b9d6dd68', 'Lydia', 'lydia-app.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:14:07.008155+00', '2023-04-26 10:14:07.008155+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('9575afbd-6aa4-4f22-82a1-f13d42489640', 'Pigment', 'gopigment.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-26 10:14:21.636428+00', '2023-04-26 10:14:21.636428+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('b1cfd51b-a831-455f-ba07-4e30671e1dc3', 'Apple', 'apple.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-03-21 06:30:25.39474+00', '2023-04-26 10:14:47.075952+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('6e4c6afd-4bc9-4477-a77c-89afe6b430d7', 'Slack', 'slack.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-03-21 06:30:25.39474+00', '2023-04-26 10:15:10.291459+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('8b5a4010-ed66-4464-8e5a-9ecc875943f9', 'Figma', 'figma.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-01 06:30:25.39474+00', '2023-04-26 10:15:31.229817+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('2667d28d-f341-4613-ba80-167cd793d018', 'Payfit', 'payfit.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-01 06:30:25.39474+00', '2023-04-26 10:15:35.121895+00');
INSERT INTO public.companies (id, "name", domain_name, workspace_id, created_at, updated_at) VALUES ('b5e2085f-7abf-4035-b043-f7fd200e0f85', 'Ornikar', 'orknikar.com', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2023-04-01 06:30:25.39474+00', '2023-04-26 10:15:40.10136+00');

View File

@ -0,0 +1,76 @@
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('86083141-1c0e-494c-a1b6-85b1c6fefaa5', 'Christoph', 'Calisto', '+33789012345', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'fe256b39-3ec3-4fe3-8997-b76aa0bfa408', 'christoph.calisto@linkedin.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('0aa00beb-ac73-4797-824e-87a1f5aea9e0', 'Sylvie', 'Palmer', '+33780123456', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'fe256b39-3ec3-4fe3-8997-b76aa0bfa408', 'sylvie.palmer@linkedin.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('93c72d2e-f517-42fd-80ae-14173b3b70ae', 'Christopher', 'Gonzalez', '+33789012345', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '04b2e9f5-0713-40a5-8216-82802401d33e', 'christopher.gonzalez@qonto.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('eeeacacf-eee1-4690-ad2c-8619e5b56a2e', 'Ashley', 'Parker', '+33780123456', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '04b2e9f5-0713-40a5-8216-82802401d33e', 'ashley.parker@qonto.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('9b324a88-6784-4449-afdf-dc62cb8702f2', 'Nicholas', 'Wright', '+33781234567', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '460b6fb1-ed89-413a-b31a-962986e67bb4', 'nicholas.wright@microsoft.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('1d151852-490f-4466-8391-733cfd66a0c8', 'Isabella', 'Scott', '+33782345678', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '460b6fb1-ed89-413a-b31a-962986e67bb4', 'isabella.scott@microsoft.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('98406e26-80f1-4dff-b570-a74942528de3', 'Matthew', 'Green', '+33783456789', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '460b6fb1-ed89-413a-b31a-962986e67bb4', 'matthew.green@microsoft.com', '2023-04-21 06:30:38.116677+00', '2023-04-24 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('a2e78a5f-338b-46df-8811-fa08c7d19d35', 'Elizabeth', 'Baker', '+33784567890', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '89bb825c-171e-4bcc-9cf7-43448d6fb278', 'elizabeth.baker@airbnb.com', '2023-04-21 06:30:38.116677+00', '2023-04-24 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('ca1f5bf3-64ad-4b0e-bbfd-e9fd795b7016', 'Christopher', 'Nelson', '+33785678901', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '89bb825c-171e-4bcc-9cf7-43448d6fb278', 'christopher.nelson@airbnb.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('56955422-5d54-41b7-ba36-f0d20e1417ae', 'Avery', 'Carter', '+33786789012', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '89bb825c-171e-4bcc-9cf7-43448d6fb278', 'avery.carter@airbnb.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('755035db-623d-41fe-92e7-dd45b7c568e1', 'Ethan', 'Mitchell', '+33787890123', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '0d940997-c21e-4ec2-873b-de4264d89025', 'ethan.mitchell@google.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('240da2ec-2d40-4e49-8df4-9c6a049190df', 'Madison', 'Perez', '+33788901234', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '0d940997-c21e-4ec2-873b-de4264d89025', 'madison.perez@google.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('9adbb6b4-c3da-4e30-907a-5a6f20a64e79', 'Joshua', 'Roberts', '+33789012345', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '0d940997-c21e-4ec2-873b-de4264d89025', 'joshua.roberts@google.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('0fa33305-749a-41bf-acf9-96510bedcf19', 'Natalie', 'Turner', '+33780123456', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '1d3a1c6e-707e-44dc-a1d2-30030bf1a944', 'natalie.turner@netflix.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('4bb4338b-2a54-4c78-8aa3-aed256ac8efa', 'Alexander', 'Phillips', '+33781234567', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '1d3a1c6e-707e-44dc-a1d2-30030bf1a944', 'alexander.phillips@netflix.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('93e907fb-6f36-4654-9e8c-1bfb312a0baa', 'Aaliyah', 'Campbell', '+33782345678', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '1d3a1c6e-707e-44dc-a1d2-30030bf1a944', 'aaliyah.campbell@netflix.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('33fc097a-5bf8-4c1e-8332-8a1585c7781c', 'Cameron', 'Parker', '+33783456789', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '7a93d1e5-3f74-492d-a101-2a70f50a1645', 'cameron.parker@libeo.io', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('0cb4e47e-8bb9-4770-8e0f-f57bb02e7513', 'Chloe', 'Evans', '+33784567890', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '7a93d1e5-3f74-492d-a101-2a70f50a1645', 'chloe.evans@libeo.io', '2023-04-21 06:30:38.116677+00', '2023-05-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('73e62504-597a-4fe8-9424-3ad5fb708d47', 'William', 'Edwards', '+33785678901', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '7a93d1e5-3f74-492d-a101-2a70f50a1645', 'william.edwards@libeo.io', '2023-04-21 06:30:38.116677+00', '2023-05-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('dcbcba4b-1e11-47ab-9141-33c888929c64', 'Aria', 'Collins', '+33786789012', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '9d162de6-cfbf-4156-a790-e39854dcd4eb', 'aria.collins@claap.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('916a3825-711a-4453-a5ad-32ed2d9b5ade', 'Lucas', 'Stewart', '+33787890123', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '9d162de6-cfbf-4156-a790-e39854dcd4eb', 'lucas.stewart@claap.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('9e90fe97-29f4-4187-8c58-2675893e5b47', 'Oliver', 'Garcia', '+33789012345', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'aaffcfbd-f86b-419f-b794-02319abe8637', 'oliver.garcia@hasura.io', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('f5d0e4c6-10bd-4f61-9784-37369a3d95a5', 'Victoria', 'Allen', '+33780123456', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'aaffcfbd-f86b-419f-b794-02319abe8637', 'victoria.allen@hasura.io', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('d4f6a0ec-3f3b-442e-80eb-37b3e95eff09', 'Henry', 'Green', '+33781234567', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'aaffcfbd-f86b-419f-b794-02319abe8637', 'henry.green@hasura.io', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('7652a886-30d2-4692-bb46-bdeb9d6a0a8c', 'Evelyn', 'Cruz', '+33782345678', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'f33dc242-5518-4553-9433-42d8eb82834b', 'evelyn.cruz@wework.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('5b4733e5-3d3c-4d57-aca8-cc74458bfa9a', 'Mason', 'Reed', '+33783456789', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'f33dc242-5518-4553-9433-42d8eb82834b', 'mason.reed@wework.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('67e913bb-0960-49ac-9ef8-74ceb18ef6e4', 'Emma', 'Bryant', '+33784567890', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'f33dc242-5518-4553-9433-42d8eb82834b', 'emma.bryant@wework.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('afd1e334-2a03-427c-a6ce-19bcc14cd737', 'Liam', 'Harris', '+33785678901', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'a7bc68d5-f79e-40dd-bd06-c36e6abb4678', 'liam.harris@samsung.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('19532475-f924-4229-8d09-bf8d1b0a6968', 'Sophia', 'Young', '+33786789012', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'a7bc68d5-f79e-40dd-bd06-c36e6abb4678', 'sophia.young@samsung.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('ff8d1dac-9fd5-4bed-8c48-da4a94e62805', 'Benjamin', 'Lee', '+33787890123', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'a7bc68d5-f79e-40dd-bd06-c36e6abb4678', 'benjamin.lee@samsung.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('fe2a17e9-79be-45ea-947b-092ffa7c5b25', 'Avery', 'Kim', '+33788901234', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'a674fa6c-1455-4c57-afaf-dd5dc086361d', 'avery.kim@algolia.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('840493fe-63d2-4d8d-a1f8-d51f2ed0e906', 'Noah', 'Martin', '+33789012345', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'a674fa6c-1455-4c57-afaf-dd5dc086361d', 'noah.martin@algolia.com', '2023-04-21 06:30:38.116677+00', '2023-04-23 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('83c8e2c6-06f3-449e-b211-7a5ddf4ce6cd', 'Isabella', 'Chen', '+33780123456', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'a674fa6c-1455-4c57-afaf-dd5dc086361d', 'isabella.chen@algolia.com', '2023-04-21 06:30:38.116677+00', '2023-04-23 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('15bb8b60-3b01-4fb5-b954-35a190416e1f', 'William', 'Nguyen', '+33781234567', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'c10b7dac-fcfc-4bf6-8eea-af497fbaaf42', 'william.nguyen@heroku.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('f4ca2c23-d128-4147-be7d-1765f8fd6e51', 'Sofia', 'Wong', '+33782345678', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'c10b7dac-fcfc-4bf6-8eea-af497fbaaf42', 'sofia.wong@heroku.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('5eae47fc-5ddc-43ab-945a-e4f8be4b1768', 'James', 'Zhang', '+33783456789', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'c10b7dac-fcfc-4bf6-8eea-af497fbaaf42', 'james.zhang@heroku.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('46bc6dee-7da1-4498-b572-ea82132c41af', 'Ella', 'Ramirez', '+33784567890', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '6672b0aa-fe9c-4651-85c7-07a35bd504a6', 'ella.ramirez@shopify.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('c5b59d44-4f32-474f-9e6c-fb0d093e7883', 'Alexander', 'Scott', '+33785678901', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '6672b0aa-fe9c-4651-85c7-07a35bd504a6', 'alexander.scott@shopify.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('1d7a0dcf-1308-466b-a55f-db30513d6422', 'Mia', 'Parker', '+33786789012', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '6672b0aa-fe9c-4651-85c7-07a35bd504a6', 'mia.parker@shopify.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('5e06aa7d-31a4-42ae-af5a-f72d6d8658d7', 'Ethan', 'Gonzalez', '+33787890123', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '6672b0aa-fe9c-4651-85c7-07a35bd504a6', 'ethan.gonzalez@zoom.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('d47978fb-f9e1-47fe-beb1-cc1ec17e6045', 'Charlotte', 'Smith', '+33788901234', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '6a6b78a6-94a3-4f6b-b519-91b138b75c3b', 'charlotte.smith@zoom.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('a4331aac-f6d2-427f-a52f-7553de81d643', 'Daniel', 'Choi', '+33789012345', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '6a6b78a6-94a3-4f6b-b519-91b138b75c3b', 'daniel.choi@zoom.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('1b13ed6f-0d0b-4030-b560-83e9154fe570', 'Aria', 'Khan', '+33780123456', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'b396e6b9-dc5c-4643-bcff-61b6cf7523ae', 'aria.khan@aircall.io', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('871c54e4-9b97-43fa-b896-498b3dd9a9d6', 'Michael', 'Gupta', '+33781234567', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'b396e6b9-dc5c-4643-bcff-61b6cf7523ae', 'michael.gupta@aircall.io', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('a5e99de6-0e46-48d3-b15f-46dd5eb8ce89', 'Abigail', 'Patel', '+33782345678', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'b396e6b9-dc5c-4643-bcff-61b6cf7523ae', 'abigail.patel@aircall.io', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('5246ed82-5b6b-47e7-9c58-9eecaab20e76', 'William', 'Kim', '+33783456789', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '72fb963e-d149-448a-928e-3bc9228c6454', 'william.kim@swile.co', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('f3e77c27-f729-4350-89a6-c3bcb7e3bd4c', 'Emily', 'Nguyen', '+33784567890', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '72fb963e-d149-448a-928e-3bc9228c6454', 'emily.nguyen@swile.co', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('8fe4591a-26c6-4e74-a7f6-eedd9480ba92', 'Joseph', 'Wang', '+33785678901', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '72fb963e-d149-448a-928e-3bc9228c6454', 'joseph.wang@swile.co', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('682fbf08-7a63-492f-bfee-66c3ad382638', 'Madison', 'Tran', '+33786789012', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '5c21e19e-e049-4393-8c09-3e3f8fb09ecb', 'madison.tran@bereal.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('e83c02a9-9de7-4cea-9677-d2370f14c64d', 'Owen', 'Gonzales', '+33787890123', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '5c21e19e-e049-4393-8c09-3e3f8fb09ecb', 'owen.gonzales@bereal.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('2ec18c66-db82-4176-81d3-33393960c8f5', 'Chloe', 'Chang', '+33788901234', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '5c21e19e-e049-4393-8c09-3e3f8fb09ecb', 'chloe.chang@bereal.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('8f27e821-ec2b-4dd8-8394-a0abf13917cb', 'Jackson', 'Park', '+33789012345', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'cd53b57b-1212-44a8-97b7-d772c5969cbf', 'jackson.park@luko.eu', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('eeb07239-09f4-4567-9af9-628152540345', 'Olivia', 'Lee', '+33780123456', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'cd53b57b-1212-44a8-97b7-d772c5969cbf', 'olivia.lee@luko.eu', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('bc171d0d-ba47-4319-9edf-a910500b420e', 'Ethan', 'Garcia', '+33781234567', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'cd53b57b-1212-44a8-97b7-d772c5969cbf', 'ethan.garcia@luko.eu', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('7d6b55dd-f28c-4cf9-b79a-4a3ac0ecb0c2', 'Avery', 'Mendoza', '+33782345678', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '294af8c8-9e08-4e52-b621-4da7b9d6dd68', 'avery.mendoza@lydia-app.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('f97a2829-6624-42b3-a693-99523ab7ddc3', 'Lucas', 'Hernandez', '+33783456789', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '294af8c8-9e08-4e52-b621-4da7b9d6dd68', 'lucas.hernandez@lydia-app.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('ef437c14-ef0c-404b-9b26-c5ed73c14097', 'Mia', 'Wilson', '+33784567890', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '294af8c8-9e08-4e52-b621-4da7b9d6dd68', 'mia.wilson@lydia-app.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('e75454a4-025b-467a-8ce7-04fcee1a278e', 'Daniel', 'Anderson', '+33785678901', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '9575afbd-6aa4-4f22-82a1-f13d42489640', 'daniel.anderson@gopigment.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('3e6188ef-9e20-4089-9d2e-f1dd5bc9f98a', 'Sophia', 'Thomas', '+33786789012', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '9575afbd-6aa4-4f22-82a1-f13d42489640', 'sophia.thomas@gopigment.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('2d21e632-6dd0-44c8-a2e2-73e45e61ab00', 'Benjamin', 'Jackson', '+33787890123', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '9575afbd-6aa4-4f22-82a1-f13d42489640', 'benjamin.jackson@gopigment.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('1d35e7b6-33d4-48a5-8048-f814de457f8b', 'Isabella', 'White', '+33788901234', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'b5e2085f-7abf-4035-b043-f7fd200e0f85', 'isabella.white@orknikar.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('abd57cbf-d473-4763-9d90-81931dffaf4a', 'Jacob', 'Harris', '+33789012345', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'b5e2085f-7abf-4035-b043-f7fd200e0f85', 'jacob.harris@orknikar.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('7fc51349-e237-4272-a180-9e9f2693c3e3', 'Ava', 'Clark', '+33780123456', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'b5e2085f-7abf-4035-b043-f7fd200e0f85', 'ava.clark@orknikar.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('d53c1645-4453-42f1-a619-1a6de22e56a5', 'Matthew', 'Rodriguez', '+33781234567', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2667d28d-f341-4613-ba80-167cd793d018', 'matthew.rodriguez@payfit.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('550da8ac-33c9-40fc-a787-ab87d77558b6', 'Charlotte', 'Martinez', '+33782345678', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2667d28d-f341-4613-ba80-167cd793d018', 'charlotte.martinez@payfit.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('6b372323-a8e9-4ec5-8e7f-cbae393bc3a9', 'Andrew', 'Garcia', '+33783456789', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '2667d28d-f341-4613-ba80-167cd793d018', 'andrew.garcia@payfit.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('6ee8836c-2bfd-4a11-97ed-901bedfc08e5', 'Emma', 'Lopez', '+33784567890', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '8b5a4010-ed66-4464-8e5a-9ecc875943f9', 'emma.lopez@figma.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('0b915bdf-2adf-4d1d-91ae-8ae14696f110', 'William', 'Gonzalez', '+33785678901', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '8b5a4010-ed66-4464-8e5a-9ecc875943f9', 'william.gonzalez@figma.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('6734b045-403e-4ceb-b8be-f1b55c40d271', 'Victoria', 'Rivera', '+33786789012', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '8b5a4010-ed66-4464-8e5a-9ecc875943f9', 'victoria.rivera@figma.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('e4cfcf25-4319-476f-9f04-e6b83bc8f385', 'Daniel', 'Gomez', '+33787890123', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '6e4c6afd-4bc9-4477-a77c-89afe6b430d7', 'daniel.gomez@slack.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('e3cfcf25-4319-476f-9f04-e6b83bc8f385', 'Jacob', 'Torres', '+33789012345', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '6e4c6afd-4bc9-4477-a77c-89afe6b430d7', 'jacob.torres@slack.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('e2cfcf25-4319-476f-9f04-e6b83bc8f385', 'Samantha', 'Flores', '+33780123456', 'Los Angeles', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', '6e4c6afd-4bc9-4477-a77c-89afe6b430d7', 'samantha.flores@slack.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('e1cfcf25-4319-476f-9f04-e6b83bc8f385', 'Ryan', 'Collins', '+33781234567', 'Seattle', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'b1cfd51b-a831-455f-ba07-4e30671e1dc3', 'ryan.collins@apple.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('e0cfcf25-4319-476f-9f04-e6b83bc8f385', 'Aria', 'Stewart', '+33782345678', 'New York', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'b1cfd51b-a831-455f-ba07-4e30671e1dc3', 'aria.stewart@apple.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');
INSERT INTO public.people (id, firstname, lastname, phone, city, workspace_id, company_id, email, created_at, updated_at) VALUES ('e9cfcf25-4319-476f-9f04-e6b83bc8f385', 'Elijah', 'Sanchez', '+33783456789', 'San Francisco', '7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'b1cfd51b-a831-455f-ba07-4e30671e1dc3', 'elijah.sanchez@apple.com', '2023-04-21 06:30:38.116677+00', '2023-04-21 06:30:38.116677+00');

View File

@ -0,0 +1,3 @@
SET check_function_bodies = false;
INSERT INTO public.workspaces (id, domain_name, display_name, created_at, updated_at, deleted_at) VALUES ('7ed9d212-1c25-4d02-bf25-6aeccf7ea419', 'twenty.com', 'Twenty', '2023-04-26 12:54:27.094743+00', '2023-04-26 12:54:27.094743+00', NULL);
INSERT INTO public.workspaces (id, domain_name, display_name, created_at, updated_at, deleted_at) VALUES ('5d5fe082-8577-44b6-a1dd-b86951a975aa', 'claap.com', 'Claap', '2023-04-26 12:54:46.799314+00', '2023-04-26 12:54:46.799314+00', NULL);

View File

@ -19,7 +19,8 @@
"jest-mock-extended": "^3.0.4",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.2.0"
"rxjs": "^7.2.0",
"uuid": "^9.0.0"
},
"devDependencies": {
"@nestjs/cli": "^9.0.0",

View File

@ -31,7 +31,8 @@
"jest-mock-extended": "^3.0.4",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.2.0"
"rxjs": "^7.2.0",
"uuid": "^9.0.0"
},
"devDependencies": {
"@nestjs/cli": "^9.0.0",

View File

@ -8,18 +8,18 @@ datasource db {
}
model WorkspaceMember {
id Int @id @default(autoincrement())
id String @id
created_at DateTime @default(now())
updated_at DateTime @updatedAt
deleted_at DateTime?
user_id String @unique
workspace_id Int
workspace_id String
@@map("workspace_members")
}
model Workspace {
id Int @id @default(autoincrement())
id String @id
created_at DateTime @default(now())
updated_at DateTime @updatedAt
deleted_at DateTime?

View File

@ -2,6 +2,7 @@ import { Injectable } from '@nestjs/common';
import { Prisma, WorkspaceMember } from '@prisma/client';
import { PrismaService } from '../database/prisma.service';
@Injectable()
export class UserRepository {
constructor(private prisma: PrismaService) {}
@ -14,6 +15,7 @@ export class UserRepository {
user_id: data.user_id,
},
create: {
id: data.id,
user_id: data.user_id,
workspace_id: data.workspace_id,
},

View File

@ -5,7 +5,7 @@ import {
import { UserRepository } from './user.repository';
import { Injectable, Response } from '@nestjs/common';
import { WorkspaceRepository } from './workspace.repository';
import { response } from 'express';
import { v4 } from 'uuid';
interface User {
id: number;
@ -42,6 +42,7 @@ export class UserService {
const workspaceMember = await this.repository.upsertWorkspaceMember({
data: {
id: v4(),
user_id: String(evt.event.data.new.id),
workspace_id: workspace.id,
},