Added account member API.

This commit is contained in:
2026-10-11 10:00:04 +02:00
parent 6ee0317186
commit 21f0c17af9
27 changed files with 994 additions and 8 deletions
@@ -1,5 +1,7 @@
CREATE TABLE account_members (
id UUID DEFAULT gen_random_uuid (),
account_id UUID NOT NULL CONSTRAINT fk_account_members_account REFERENCES accounts (id),
user_id UUID NOT NULL CONSTRAINT fk_account_members_user REFERENCES users (id),
PRIMARY KEY (account_id, user_id)
PRIMARY KEY (id, account_id),
CONSTRAINT uq_account_members_account_user UNIQUE (account_id, user_id)
);
@@ -50,12 +50,14 @@ VALUES (
);
INSERT INTO
account_members (account_id, user_id)
account_members (id, account_id, user_id)
VALUES (
'00000000-0000-0000-0006-000000000001',
'00000000-0000-0000-0003-000000000001',
'00000000-0000-0000-0000-000000000001'
),
(
'00000000-0000-0000-0006-000000000002',
'00000000-0000-0000-0003-000000000002',
'00000000-0000-0000-0000-000000000002'
);