From 1a2241c40e10193c5ff7008a7b7b36cc1d855d96 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Tue, 25 Mar 2025 15:55:45 +0900 Subject: initial commit --- db/schema/items.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/schema/items.ts (limited to 'db/schema/items.ts') diff --git a/db/schema/items.ts b/db/schema/items.ts new file mode 100644 index 00000000..1d4b0ded --- /dev/null +++ b/db/schema/items.ts @@ -0,0 +1,12 @@ +import { pgTable, varchar, text, timestamp ,serial} from "drizzle-orm/pg-core" + +export const items = pgTable("items", { + id: serial("id").primaryKey(), + itemCode: varchar("item_code", { length: 100 }).unique(), + itemName: varchar("item_name", { length: 255 }).notNull(), + description: text("description"), + createdAt: timestamp("created_at").defaultNow().notNull(), + updatedAt: timestamp("updated_at").defaultNow().notNull(), +}); + +export type Item = typeof items.$inferSelect -- cgit v1.2.3