Files
lst/app/src/pkg/db/schema/forecastEDIData.ts
Blake Matthes 425f8f5f71 feat(frontend): migrated old > new silo adjustments
moved the apps around so we can use 1 url for cors bs
2025-10-25 17:22:51 -05:00

30 lines
906 B
TypeScript

import {
boolean,
integer,
jsonb,
pgTable,
real,
text,
timestamp,
uuid,
} from "drizzle-orm/pg-core";
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
import { z } from "zod";
export const forecastData = pgTable("forecast_Data", {
id: uuid("id").defaultRandom().primaryKey(),
customerArticleNumber: text("customer_article_number"),
dateRequested: timestamp("date_requested").defaultNow(),
quantity: real("quantity"),
requestDate: timestamp("request_date").notNull(),
article: integer("article"),
customerID: integer("customer_id").notNull(),
createdAt: timestamp("created_at").defaultNow(),
});
export const forecastDataSchema = createSelectSchema(forecastData);
export const newForecastDataSchema = createInsertSchema(forecastData);
export type ForecastData = z.infer<typeof forecastDataSchema>;
export type NewForecastData = z.infer<typeof newForecastDataSchema>;