Refactor tutorial and user models to replace fileName with id, update related components and services for consistency

This commit is contained in:
liosha84
2025-08-10 11:27:22 +03:00
parent d45fd83593
commit c840adb229
23 changed files with 112 additions and 456 deletions
@@ -0,0 +1,12 @@
CREATE TABLE IF NOT EXISTS public.refreshtoken
(
id bigint NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 9223372036854775807 CACHE 1 ),
user_id bigint NOT NULL,
token character varying COLLATE pg_catalog."default" NOT NULL,
expiry_date timestamp with time zone,
CONSTRAINT refreshtoken_pkey PRIMARY KEY (id),
CONSTRAINT "FK_refreshtoken_users" FOREIGN KEY (user_id)
REFERENCES public.users (id) MATCH SIMPLE
ON UPDATE NO ACTION
ON DELETE NO ACTION
);