users table endpoints. auth to fix

This commit is contained in:
2025-07-25 18:38:24 +03:00
parent e729e84872
commit 08d2ebb1b7
21 changed files with 734 additions and 2 deletions

19
tables.sql Normal file
View File

@ -0,0 +1,19 @@
CREATE TABLE public.users (
id serial NOT NULL,
username text NOT NULL,
"password" text NOT NULL,
groups_ids integer[] NULL,
last_seen_at timestamp with time zone NULL,
created_at timestamp with time zone NULL,
CONSTRAINT userid_pk PRIMARY KEY (id),
CONSTRAINT username_unique UNIQUE (username)
);
CREATE TABLE public.groups (
id serial NOT NULL,
groupname text NOT NULL,
join_code text NOT NULL,
users_ids integer[] NULL,
created_at timestamp with time zone NULL,
CONSTRAINT groupname_unique UNIQUE (username)
);