recator placement of code

This commit is contained in:
2026-02-17 11:46:57 -06:00
parent 31f8c368d9
commit 23c000fa7f
77 changed files with 4528 additions and 2697 deletions

View File

@@ -0,0 +1,31 @@
import {
boolean,
integer,
pgTable,
text,
timestamp,
uuid,
} from "drizzle-orm/pg-core";
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
import type { z } from "zod";
export const datamart = pgTable("datamart", {
id: uuid("id").defaultRandom().primaryKey(),
name: text("name").unique(),
description: text("description").notNull(),
query: text("query"),
version: integer("version").default(1).notNull(),
active: boolean("active").default(true),
options: text("options").default(""),
public: boolean("public_access").default(false),
add_date: timestamp("add_date").defaultNow(),
add_user: text("add_user").default("lst-system"),
upd_date: timestamp("upd_date").defaultNow(),
upd_user: text("upd_user").default("lst-system"),
});
export const datamartSchema = createSelectSchema(datamart);
export const newDataMartSchema = createInsertSchema(datamart);
export type Datamart = z.infer<typeof datamartSchema>;
export type NewDatamart = z.infer<typeof newDataMartSchema>;