feat: Реализована функциональность списка желаний с бэкенд API, базой данных и пользовательским интерфейсом.

This commit is contained in:
2025-12-06 11:08:07 +03:00
parent 07c1285bb9
commit 7eb4fb731b
42 changed files with 1610 additions and 44 deletions

View File

@@ -0,0 +1,29 @@
CREATE TABLE "wishlist_categories" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"name" text NOT NULL,
"slug" text NOT NULL,
"min_price" integer DEFAULT 0 NOT NULL,
"max_price" integer,
"color" text,
"icon" text,
"order" integer DEFAULT 0 NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
CONSTRAINT "wishlist_categories_name_unique" UNIQUE("name"),
CONSTRAINT "wishlist_categories_slug_unique" UNIQUE("slug")
);
--> statement-breakpoint
CREATE TABLE "wishlist_items" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"title" text NOT NULL,
"description" text,
"price" integer NOT NULL,
"currency" text DEFAULT 'RUB' NOT NULL,
"link" text,
"images" text[] DEFAULT ARRAY[]::text[] NOT NULL,
"category_id" uuid NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "wishlist_items" ADD CONSTRAINT "wishlist_items_category_id_wishlist_categories_id_fk" FOREIGN KEY ("category_id") REFERENCES "public"."wishlist_categories"("id") ON DELETE restrict ON UPDATE no action;