Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

6.8 KB
Raw Blame
INSERT INTO public."macro_user" (id, username, email, stripe_customer_id)
VALUES
    ('a1111111-1111-1111-1111-111111111111', '[email protected]', '[email protected]', 'stripe-owner'),
    ('a2222222-2222-2222-2222-222222222222', '[email protected]', '[email protected]', 'stripe-viewer');

INSERT INTO public."User" (id, email, "stripeCustomerId", macro_user_id)
VALUES
    ('macro|[email protected]', '[email protected]', 'stripe-owner', 'a1111111-1111-1111-1111-111111111111'),
    ('macro|[email protected]', '[email protected]', 'stripe-viewer', 'a2222222-2222-2222-2222-222222222222');

INSERT INTO public."Project"
    (id, name, "userId", "parentId", "createdAt", "updatedAt", "deletedAt", "uploadPending", "uploadRequestId")
VALUES
    ('10000000-0000-0000-0000-000000000001', 'Root', 'macro|[email protected]', NULL, '2024-01-01', '2024-01-05', NULL, false, NULL),
    ('10000000-0000-0000-0000-000000000002', 'First child', 'macro|[email protected]', '10000000-0000-0000-0000-000000000001', '2024-01-02', '2024-01-02', NULL, false, NULL),
    ('10000000-0000-0000-0000-000000000003', 'Grandchild', 'macro|[email protected]', '10000000-0000-0000-0000-000000000002', '2024-01-03', '2024-01-03', NULL, false, NULL),
    ('10000000-0000-0000-0000-000000000004', 'Deleted child', 'macro|[email protected]', '10000000-0000-0000-0000-000000000001', '2024-01-04', '2024-01-04', '2024-02-01', false, NULL),
    ('10000000-0000-0000-0000-000000000005', 'Shared history', 'macro|[email protected]', NULL, '2024-01-05', '2024-01-06', NULL, false, NULL),
    ('10000000-0000-0000-0000-000000000006', 'Owner pending', 'macro|[email protected]', NULL, '2024-01-06', '2024-01-07', NULL, true, 'request-owner'),
    ('10000000-0000-0000-0000-000000000007', 'Viewer pending', 'macro|[email protected]', NULL, '2024-01-07', '2024-01-08', NULL, true, 'request-viewer'),
    ('10000000-0000-0000-0000-000000000008', 'Nested pending', 'macro|[email protected]', '10000000-0000-0000-0000-000000000006', '2024-01-08', '2024-01-09', NULL, true, 'request-owner'),
    ('10000000-0000-0000-0000-000000000009', 'Deleted root', 'macro|[email protected]', NULL, '2024-01-09', '2024-01-10', '2024-02-02', false, NULL);

INSERT INTO public."UserHistory" ("userId", "itemId", "itemType")
VALUES
    ('macro|[email protected]', '10000000-0000-0000-0000-000000000001', 'project'),
    ('macro|[email protected]', '10000000-0000-0000-0000-000000000005', 'project'),
    ('macro|[email protected]', '10000000-0000-0000-0000-000000000006', 'project'),
    ('macro|[email protected]', '10000000-0000-0000-0000-000000000009', 'project');

INSERT INTO public."SharePermission" (id, "linkShare", "linkShareAccessLevel")
VALUES ('share-root', 'PUBLIC', 'edit');
INSERT INTO public."ProjectPermission" ("projectId", "sharePermissionId")
VALUES ('10000000-0000-0000-0000-000000000001', 'share-root');
INSERT INTO public."ChannelSharePermission" (share_permission_id, channel_id, access_level)
VALUES ('share-root', 'channel-one', 'view');

INSERT INTO public."Document" (id, name, "fileType", owner, "projectId", "createdAt", "updatedAt", "deletedAt")
VALUES
    ('20000000-0000-0000-0000-000000000001', 'Document', 'pdf', 'macro|[email protected]', '10000000-0000-0000-0000-000000000001', '2024-01-03', '2024-01-03', NULL),
    ('20000000-0000-0000-0000-000000000002', 'Deleted document', 'pdf', 'macro|[email protected]', '10000000-0000-0000-0000-000000000001', '2024-01-04', '2024-01-04', '2024-02-01');
INSERT INTO public."DocumentInstance" ("documentId", "revisionName", sha, "createdAt", "updatedAt")
VALUES
    ('20000000-0000-0000-0000-000000000001', 'Document', 'sha-one', '2024-01-03', '2024-01-03'),
    ('20000000-0000-0000-0000-000000000002', 'Deleted document', 'sha-two', '2024-01-04', '2024-01-04');

INSERT INTO public."Chat" (id, name, "userId", "projectId", "createdAt", "updatedAt", "deletedAt")
VALUES
    ('30000000-0000-0000-0000-000000000001', 'Chat', 'macro|[email protected]', '10000000-0000-0000-0000-000000000001', '2024-01-04', '2024-01-04', NULL),
    ('30000000-0000-0000-0000-000000000002', 'Deleted chat', 'macro|[email protected]', '10000000-0000-0000-0000-000000000001', '2024-01-05', '2024-01-05', '2024-02-01');

INSERT INTO public.entity_access (entity_id, entity_type, source_id, source_type, access_level)
VALUES
    ('10000000-0000-0000-0000-000000000001', 'project', 'macro|[email protected]', 'user', 'owner'),
    ('10000000-0000-0000-0000-000000000001', 'project', 'macro|[email protected]', 'user', 'view'),
    ('10000000-0000-0000-0000-000000000002', 'project', 'macro|[email protected]', 'user', 'owner'),
    ('10000000-0000-0000-0000-000000000003', 'project', 'macro|[email protected]', 'user', 'owner'),
    ('10000000-0000-0000-0000-000000000005', 'project', 'macro|[email protected]', 'user', 'owner'),
    ('10000000-0000-0000-0000-000000000006', 'project', 'macro|[email protected]', 'user', 'owner'),
    ('10000000-0000-0000-0000-000000000007', 'project', 'macro|[email protected]', 'user', 'owner'),
    ('10000000-0000-0000-0000-000000000008', 'project', 'macro|[email protected]', 'user', 'owner'),
    ('20000000-0000-0000-0000-000000000001', 'document', 'macro|[email protected]', 'user', 'owner'),
    ('30000000-0000-0000-0000-000000000001', 'chat', 'macro|[email protected]', 'user', 'owner');

INSERT INTO public.entity (id, entity_type, owner_type, owner_id, created_at, updated_at, deleted_at)
VALUES
    ('10000000-0000-0000-0000-000000000001', 'project', 'user', 'macro|[email protected]', '2024-01-01', '2024-01-05', NULL),
    ('10000000-0000-0000-0000-000000000002', 'project', 'user', 'macro|[email protected]', '2024-01-02', '2024-01-02', NULL),
    ('10000000-0000-0000-0000-000000000003', 'project', 'user', 'macro|[email protected]', '2024-01-03', '2024-01-03', NULL),
    ('10000000-0000-0000-0000-000000000004', 'project', 'user', 'macro|[email protected]', '2024-01-04', '2024-01-04', '2024-02-01'),
    ('10000000-0000-0000-0000-000000000005', 'project', 'user', 'macro|[email protected]', '2024-01-05', '2024-01-06', NULL),
    ('10000000-0000-0000-0000-000000000006', 'project', 'user', 'macro|[email protected]', '2024-01-06', '2024-01-07', NULL),
    ('10000000-0000-0000-0000-000000000007', 'project', 'user', 'macro|[email protected]', '2024-01-07', '2024-01-08', NULL),
    ('10000000-0000-0000-0000-000000000008', 'project', 'user', 'macro|[email protected]', '2024-01-08', '2024-01-09', NULL),
    ('10000000-0000-0000-0000-000000000009', 'project', 'user', 'macro|[email protected]', '2024-01-09', '2024-01-10', '2024-02-02'),
    ('20000000-0000-0000-0000-000000000001', 'document', 'user', 'macro|[email protected]', '2024-01-03', '2024-01-03', NULL),
    ('20000000-0000-0000-0000-000000000002', 'document', 'user', 'macro|[email protected]', '2024-01-04', '2024-01-04', '2024-02-01'),
    ('30000000-0000-0000-0000-000000000001', 'chat', 'user', 'macro|[email protected]', '2024-01-04', '2024-01-04', NULL),
    ('30000000-0000-0000-0000-000000000002', 'chat', 'user', 'macro|[email protected]', '2024-01-05', '2024-01-05', '2024-02-01');