feat(db): logs, manualprints added

This commit is contained in:
2025-03-19 17:07:37 -05:00
parent 34b80cf236
commit 0914b53341
8 changed files with 2279 additions and 0 deletions

View File

@@ -10,6 +10,8 @@ export const logs = pgTable(
username: text("username").default("LST_Serivce"),
service: text("service").notNull().default("system"),
message: text("message").notNull(),
checked: boolean("checked").default(false),
checkedAt: timestamp("checkedAt"),
created_at: timestamp("add_Date").defaultNow(),
},
(table) => [

View File

@@ -0,0 +1,20 @@
import {text, pgTable, timestamp, uuid, integer} from "drizzle-orm/pg-core";
import {createInsertSchema, createSelectSchema} from "drizzle-zod";
import {z} from "zod";
export const manualPrinting = pgTable("manualPrinting", {
print_id: uuid("print_id").defaultRandom().primaryKey(),
line: integer("line"),
printReason: text("printReason").notNull(),
initials: text("initials").notNull(),
additionalComments: text("additionalComments").notNull(),
add_date: timestamp("add_date").defaultNow(),
add_user: text("add_user"),
});
// Schema for inserting a user - can be used to validate API requests
// export const insertRolesSchema = createInsertSchema(roles, {
// name: z.string().min(3, {message: "Role name must be more than 3 letters"}),
// });
// Schema for selecting a Expenses - can be used to validate API responses
export const selectRolesSchema = createSelectSchema(manualPrinting);