Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
-- Fixture for testing get_user_remaining_tiers
-- With unique user_id constraint, each user can only be in one team
INSERT INTO "macro_user" (id, username, email, stripe_customer_id)
VALUES
('a1111111-1111-1111-1111-111111111111', '[email protected]', '[email protected]', 'cus_owner'),
('a2222222-2222-2222-2222-222222222222', '[email protected]', '[email protected]', 'cus_single'),
('a3333333-3333-3333-3333-333333333333', '[email protected]', '[email protected]', 'cus_none');
INSERT INTO "User" ("id", "email", "name", "stripeCustomerId", "macro_user_id") VALUES
('macro|[email protected]', '[email protected]', 'Owner', 'cus_owner', 'a1111111-1111-1111-1111-111111111111'),
('macro|[email protected]', '[email protected]', 'Single', 'cus_single', 'a2222222-2222-2222-2222-222222222222'),
('macro|[email protected]', '[email protected]', 'NoTeam', 'cus_none', 'a3333333-3333-3333-3333-333333333333');
INSERT INTO team(id, name, owner_id, subscription_id, seat_count)
VALUES ('aaaa1111-1111-1111-1111-111111111111', 'Team A', 'macro|[email protected]', 'sub_a', 2),
('bbbb2222-2222-2222-2222-222222222222', 'Team B', 'macro|[email protected]', 'sub_b', 1);
INSERT INTO team_user (team_id, user_id, team_role)
VALUES
('aaaa1111-1111-1111-1111-111111111111', 'macro|[email protected]', 'owner'),
('bbbb2222-2222-2222-2222-222222222222', 'macro|[email protected]', 'owner');