diff options
Diffstat (limited to 'db')
| -rw-r--r-- | db/schema/items.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/db/schema/items.ts b/db/schema/items.ts index d7640049..e9c10058 100644 --- a/db/schema/items.ts +++ b/db/schema/items.ts @@ -88,4 +88,21 @@ export type ItemOffshoreHull = typeof itemOffshoreHull.$inferSelect; //각 테이블별 컬럼 변경(itemid -> itemCode) +// 품목 관리 테이블 - 사용자 요구사항에 맞게 설계 +export const procurementItems = pgTable("procurement_items", { + id: serial("id").primaryKey(), + itemCode: varchar("item_code", { length: 100 }), + itemName: varchar("item_name", { length: 255 }).notNull(), + material: varchar("material", { length: 100 }), // 재질 + specification: varchar("specification", { length: 255 }), // 규격 + unit: varchar("unit", { length: 50 }), // 단위 + isActive: varchar("is_active", { length: 1 }).default('Y').notNull(), // 활성화여부 (Y/N) + createdBy: varchar("created_by", { length: 100 }), // 등록자 + createdAt: timestamp("created_at").defaultNow().notNull(), // 등록일시 + updatedAt: timestamp("updated_at").defaultNow().notNull(), // 수정일시 +}); + +export type ProcurementItem = typeof procurementItems.$inferSelect; +export type ProcurementItemInsert = typeof procurementItems.$inferInsert; + |
