refactor(modules): moved modules to app to control everything based on there active setting

This commit is contained in:
2025-10-29 21:57:11 -05:00
parent 6493e0398a
commit 99b2d762d6
35 changed files with 5807 additions and 121 deletions

View File

@@ -0,0 +1,23 @@
CREATE TABLE "forecast_Data" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"customer_article_number" text,
"date_requested" timestamp DEFAULT now(),
"quantity" real,
"request_date" timestamp NOT NULL,
"article" integer,
"customer_id" integer NOT NULL,
"created_at" timestamp DEFAULT now()
);
--> statement-breakpoint
CREATE TABLE "modules" (
"module_id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"name" text NOT NULL,
"active" boolean DEFAULT false,
"roles" jsonb DEFAULT '["view","systemAdmin"]'::jsonb NOT NULL,
"add_User" text DEFAULT 'LST_System' NOT NULL,
"add_Date" timestamp DEFAULT now(),
"upd_User" text DEFAULT 'LST_System' NOT NULL,
"upd_date" timestamp DEFAULT now()
);
--> statement-breakpoint
CREATE UNIQUE INDEX "module_name" ON "modules" USING btree ("name");