feat(invoices): added invoice + linking to forklift

This commit is contained in:
2025-11-04 22:12:08 -06:00
parent 577584ef4d
commit 2e05f6eeee
24 changed files with 13782 additions and 17 deletions

View File

@@ -23,7 +23,7 @@ const status = pgEnum("forklift_status", [
export const forklifts = pgTable("forklifts", {
forklift_id: uuid("forklift_id").defaultRandom().primaryKey(),
forkliftNumber: serial("forklift_number").notNull(),
serialNumber: text("serial_number").notNull(),
serialNumber: text("serial_number").unique().notNull(),
model: text("model").notNull(),
plant: text("plant")
.notNull()
@@ -41,8 +41,8 @@ export const forklifts = pgTable("forklifts", {
dataPlate: text("data_plate"),
add_date: timestamp("add_date").defaultNow(),
add_user: text("add_user").default("LST"),
upd_date: timestamp("add_date").defaultNow(),
upd_user: text("add_user").default("LST"),
upd_date: timestamp("upd_date").defaultNow(),
upd_user: text("upd_user").default("LST"),
});
export const forkliftsSchema = createSelectSchema(forklifts);