feat(ocme cycle counts): tracking of cycle counts and when they were done
This commit is contained in:
37
database/schema/ocmeCycleCounts.ts
Normal file
37
database/schema/ocmeCycleCounts.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import {
|
||||
text,
|
||||
pgTable,
|
||||
numeric,
|
||||
timestamp,
|
||||
boolean,
|
||||
uuid,
|
||||
integer,
|
||||
jsonb,
|
||||
} from "drizzle-orm/pg-core";
|
||||
import { createSelectSchema } from "drizzle-zod";
|
||||
|
||||
export const ocmeCycleCounts = pgTable(
|
||||
"ocmeCycleCounts",
|
||||
{
|
||||
ocme_id: uuid("ocme_id").defaultRandom().primaryKey(),
|
||||
laneId: integer("laneId").notNull(),
|
||||
warehouseName: text("warehouseName").notNull(),
|
||||
laneName: text("laneName").notNull(),
|
||||
good: boolean("good").default(false),
|
||||
cycleCount: jsonb("cycleCount").default([]),
|
||||
add_User: text("add_User").default("LST_System").notNull(),
|
||||
add_Date: timestamp("add_Date").defaultNow(),
|
||||
},
|
||||
(table) => [
|
||||
// uniqueIndex('emailUniqueIndex').on(sql`lower(${table.email})`),
|
||||
// uniqueIndex("role_name").on(table.name),
|
||||
//uniqueIndex("ocme_runningNr").on(table.runningNr),
|
||||
]
|
||||
);
|
||||
|
||||
// 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(ocmeCycleCounts);
|
||||
Reference in New Issue
Block a user