Files
lst_v3/backend/db/schema/ordersImports.schema.ts
Blake Matthes 47b149d1ea
All checks were successful
Build and Push LST Docker Image / docker (push) Successful in 4m26s
feat(dm): migrated all the dm topics
2026-06-26 11:05:17 -05:00

24 lines
1.0 KiB
TypeScript

import { jsonb, pgTable, text, timestamp, uuid } from "drizzle-orm/pg-core";
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
import type { z } from "zod";
export const orderImport = pgTable("order_import", {
id: uuid("id").defaultRandom().primaryKey(),
receivingPlantId: text("receiving_plant_id").notNull(),
documentName: text("documentName"),
sender: text("sender"),
customerId: text("customer_id"),
invoiceAddressId: text("invoice_address_id"),
rawData: jsonb("raw_data").default([]),
add_date: timestamp("add_date", { withTimezone: true }).defaultNow(),
add_user: text("add_user").default("lst-system"),
upd_date: timestamp("upd_date", { withTimezone: true }).defaultNow(),
upd_user: text("upd_user").default("lst-system"),
});
export const orderImportSchema = createSelectSchema(orderImport);
export const newOrderImportSchema = createInsertSchema(orderImport);
export type OrderImport = z.infer<typeof orderImportSchema>;
export type NewOrderImport = z.infer<typeof newOrderImportSchema>;