feat(db): logs, manualprints added
This commit is contained in:
@@ -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) => [
|
||||
|
||||
20
database/schema/ocpManualPrint.ts
Normal file
20
database/schema/ocpManualPrint.ts
Normal 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);
|
||||
Reference in New Issue
Block a user