feat(ocp): added labeling logs in
This commit is contained in:
29
database/schema/prodLabels.ts
Normal file
29
database/schema/prodLabels.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import {
|
||||
integer,
|
||||
pgTable,
|
||||
uuid,
|
||||
uniqueIndex,
|
||||
text,
|
||||
timestamp,
|
||||
} from "drizzle-orm/pg-core";
|
||||
import { createSelectSchema } from "drizzle-zod";
|
||||
|
||||
export const prodlabels = pgTable(
|
||||
"prodlabels",
|
||||
{
|
||||
label_id: uuid("label_id").defaultRandom().primaryKey(),
|
||||
printerID: integer("printerID"),
|
||||
printerName: text("printerName"),
|
||||
line: integer("line"),
|
||||
runningNr: integer("runningNr").notNull(),
|
||||
status: text("status"),
|
||||
add_date: timestamp("add_date"),
|
||||
upd_date: timestamp("upd_date"),
|
||||
},
|
||||
(table) => [
|
||||
//uniqueIndex("emailUniqueIndex").on(sql`lower(${table.email})`),
|
||||
uniqueIndex("runningNr").on(table.runningNr),
|
||||
]
|
||||
);
|
||||
|
||||
export const prodlabelsSchema = createSelectSchema(prodlabels);
|
||||
Reference in New Issue
Block a user