feat(database): settings added in

This commit is contained in:
2025-03-04 16:42:26 -06:00
parent 9b7e60cad0
commit 44ba7d9feb
12 changed files with 2185 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
import {text, pgTable, timestamp, boolean, uuid, uniqueIndex} from "drizzle-orm/pg-core";
import {text, pgTable, timestamp, boolean, uuid, uniqueIndex, jsonb} from "drizzle-orm/pg-core";
import {createSelectSchema} from "drizzle-zod";
//import {z} from "zod";
@@ -8,7 +8,8 @@ export const modules = pgTable(
module_id: uuid("module_id").defaultRandom().primaryKey(),
name: text("name").notNull(),
active: boolean("active").default(false),
roles: text("roles").notNull().default(`["view", "systemAdmin"]`), // ["view", "technician", "supervisor","manager", "admin","systemAdmin"]
//roles: text("roles").notNull().default(`["view", "systemAdmin"]`), // ["view", "technician", "supervisor","manager", "admin","systemAdmin"]
roles: jsonb("roles").notNull().default(["view", "systemAdmin"]), // ["view", "technician", "supervisor","manager", "admin","systemAdmin"]
add_User: text("add_User").default("LST_System").notNull(),
add_Date: timestamp("add_Date").defaultNow(),
upd_user: text("upd_User").default("LST_System").notNull(),