summaryrefslogtreecommitdiff
path: root/db/schema/contract.ts
diff options
context:
space:
mode:
Diffstat (limited to 'db/schema/contract.ts')
-rw-r--r--db/schema/contract.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/db/schema/contract.ts b/db/schema/contract.ts
index 1d628442..226fecfa 100644
--- a/db/schema/contract.ts
+++ b/db/schema/contract.ts
@@ -14,13 +14,14 @@ import {
import { projects } from "./projects"
import { vendorContacts, vendors } from "./vendors"
import { eq, sql } from "drizzle-orm";
+import { items } from "./items";
// ============ contracts (계약/PO 정보) ============
export const contracts = pgTable("contracts", {
// 주 키
id: integer("id").primaryKey().generatedAlwaysAsIdentity(),
- // 프로젝트와 벤더 참조
+ // 프로젝트와 협력업체 참조
projectId: integer("project_id")
.notNull()
.references(() => projects.id, { onDelete: "cascade" }),
@@ -81,7 +82,7 @@ export const contractItems = pgTable("contract_items", {
itemId: integer("item_id")
.notNull()
- // .references(() => items.id, { onDelete: "cascade" })
+ .references(() => items.id, { onDelete: "cascade" })
,
// --- 품목(아이템) 단위 정보 ---