diff options
Diffstat (limited to 'db/schema/techSales.ts')
| -rw-r--r-- | db/schema/techSales.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/db/schema/techSales.ts b/db/schema/techSales.ts index 744d22cc..87802f52 100644 --- a/db/schema/techSales.ts +++ b/db/schema/techSales.ts @@ -58,6 +58,7 @@ export type TechSalesRfqStatus = typeof TECH_SALES_RFQ_STATUSES[keyof typeof TEC // 기술영업 벤더 견적서 상태 export const TECH_SALES_QUOTATION_STATUSES = { + ASSIGNED: "Assigned", // 벤더 할당됨 (아직 RFQ 전송 안됨) DRAFT: "Draft", SUBMITTED: "Submitted", REVISED: "Revised", @@ -69,6 +70,12 @@ export type TechSalesQuotationStatus = typeof TECH_SALES_QUOTATION_STATUSES[keyo // 상태 설정 객체 (UI에서 사용) export const TECH_SALES_QUOTATION_STATUS_CONFIG = { + [TECH_SALES_QUOTATION_STATUSES.ASSIGNED]: { + label: "할당됨", + variant: "outline" as const, + description: "벤더에게 할당됨 (RFQ 미전송)", + color: "text-gray-600", + }, [TECH_SALES_QUOTATION_STATUSES.DRAFT]: { label: "초안", variant: "secondary" as const, @@ -190,7 +197,7 @@ export const techSalesAttachments = pgTable( "tech_sales_attachments", { id: serial("id").primaryKey(), - attachmentType: varchar("attachment_type", { length: 50 }).notNull(), // 'RFQ_COMMON', 'VENDOR_SPECIFIC' + attachmentType: varchar("attachment_type", { length: 50 }).notNull(), // 'RFQ_COMMON', 'VENDOR_SPECIFIC', TBE_RESULT, CBE_RESULT techSalesRfqId: integer("tech_sales_rfq_id").references( () => techSalesRfqs.id, { onDelete: "cascade" } @@ -233,7 +240,7 @@ export const techSalesVendorQuotations = pgTable( // 상태 관리 status: varchar("status", { length: 30 }) .$type<TechSalesQuotationStatus>() - .default(TECH_SALES_QUOTATION_STATUSES.DRAFT) + .default(TECH_SALES_QUOTATION_STATUSES.ASSIGNED) .notNull(), // 기타 정보 @@ -345,6 +352,7 @@ export const techSalesVendorQuotationAttachments = pgTable("tech_sales_vendor_qu quotationId: integer("quotation_id") .notNull() .references(() => techSalesVendorQuotations.id, { onDelete: "cascade" }), + revisionId: integer("revision_id").notNull().default(0), // 리비전 ID 추가 (기본값 0) fileName: varchar("file_name", { length: 255 }).notNull(), originalFileName: varchar("original_file_name", { length: 255 }).notNull(), fileSize: integer("file_size").notNull(), |
