summaryrefslogtreecommitdiff
path: root/db/schema/pq.ts
diff options
context:
space:
mode:
Diffstat (limited to 'db/schema/pq.ts')
-rw-r--r--db/schema/pq.ts19
1 files changed, 13 insertions, 6 deletions
diff --git a/db/schema/pq.ts b/db/schema/pq.ts
index b233119f..11d55473 100644
--- a/db/schema/pq.ts
+++ b/db/schema/pq.ts
@@ -132,13 +132,13 @@ export const vendorPQSubmissions = pgTable("vendor_pq_submissions", {
status: varchar("status", {
length: 20,
enum: [
- "REQUESTED",
- "SUBMITTED",
- "APPROVED",
- "REJECTED",
+ "REQUESTED", // PQ 요청됨
+ "SUBMITTED", // PQ 제출됨
+ "APPROVED", // PQ 승인됨
+ "REJECTED", // PQ 거절됨
"QM_REVIEWING", // QM 검토중
- "QM_APPROVED", // QM 승인
- "QM_REJECTED" // QM 거절
+ "QM_APPROVED", // QM 승인됨
+ "QM_REJECTED" // QM 거절됨
]
}).notNull().default("REQUESTED"),
dueDate: timestamp("due_date"),
@@ -255,6 +255,7 @@ export const vendorInvestigations = pgTable("vendor_investigations", {
length: 50,
enum: [
"PLANNED", // 계획됨
+ "QM_REVIEW_CONFIRMED", // QM 검토 확정
"IN_PROGRESS", // 진행 중
"COMPLETED", // 완료됨
"CANCELED", // 취소됨
@@ -265,6 +266,11 @@ export const vendorInvestigations = pgTable("vendor_investigations", {
.notNull()
.default("PLANNED"),
+ // 보완요청 여부 (최초 보완 요청이 있었는지 기록)
+ hasSupplementRequested: boolean("has_supplement_requested")
+ .notNull()
+ .default(false),
+
// 실사 주소
investigationAddress: text("investigation_address"),
@@ -403,6 +409,7 @@ export const vendorInvestigationsView = pgView(
evaluationScore: vendorInvestigations.evaluationScore,
evaluationResult: vendorInvestigations.evaluationResult,
investigationNotes: vendorInvestigations.investigationNotes,
+ hasSupplementRequested: vendorInvestigations.hasSupplementRequested,
createdAt: vendorInvestigations.createdAt,
updatedAt: vendorInvestigations.updatedAt,